html_url
stringlengths
48
51
title
stringlengths
5
268
comments
stringlengths
70
51.8k
body
stringlengths
0
29.8k
comment_length
int64
16
1.52k
text
stringlengths
164
54.1k
embeddings
sequence
https://github.com/huggingface/datasets/issues/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.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
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.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
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.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@lhoestq the proposed branch is faster, but overall training speedup is a few percentage points. I couldn't figure out how to include the GitHub branch into setup.py, so I couldn't start NVidia optimized Docker-based pre-training run. But on bare metal, there is a slight improvement. I'll do some more performance traces.
**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%.
51
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%. @lhoestq the proposed branch is faster, but overall training speedup is a few percentage points. I couldn't figure out how to include the GitHub branch into setup.py, so I couldn't start NVidia optimized Docker-based pre-training run. But on bare metal, there is a slight improvement. I'll do some more performance traces.
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Hi @vblagoje, to install Datasets from @lhoestq PR reference #2505, you can use: ```shell pip install git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head#egg=datasets ```
**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%.
18
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 @vblagoje, to install Datasets from @lhoestq PR reference #2505, you can use: ```shell pip install git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head#egg=datasets ```
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
Hey @albertvillanova yes thank you, I am aware, I can easily pull it from a terminal command line but then I can't automate docker image builds as dependencies are picked up from setup.py and for some reason setup.py doesn't accept this string format.
**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%.
43
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%. Hey @albertvillanova yes thank you, I am aware, I can easily pull it from a terminal command line but then I can't automate docker image builds as dependencies are picked up from setup.py and for some reason setup.py doesn't accept this string format.
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@vblagoje in that case, you can add this to your `setup.py`: ```python install_requires=[ "datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head", ```
**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%.
17
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%. @vblagoje in that case, you can add this to your `setup.py`: ```python install_requires=[ "datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head", ```
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@lhoestq @thomwolf @albertvillanova The new approach is definitely faster, dataloader now takes less than 3% cumulative time (pink rectangle two rectangles to the right of tensor.py backward invocation) ![Screen Shot 2021-06-16 at 3 05 06 PM](https://user-images.githubusercontent.com/458335/122224432-19de4700-ce82-11eb-982f-d45d4bcc1e41.png) When we drill down into dataloader next invocation we get: ![Screen Shot 2021-06-16 at 3 09 56 PM](https://user-images.githubusercontent.com/458335/122224976-a1c45100-ce82-11eb-8d40-59194740d616.png) And finally format_batch: ![Screen Shot 2021-06-16 at 3 11 07 PM](https://user-images.githubusercontent.com/458335/122225132-cae4e180-ce82-11eb-8a16-967ab7c1c2aa.png) Not sure this could be further improved but this is definitely a decent step forward.
**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%.
80
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%. @lhoestq @thomwolf @albertvillanova The new approach is definitely faster, dataloader now takes less than 3% cumulative time (pink rectangle two rectangles to the right of tensor.py backward invocation) ![Screen Shot 2021-06-16 at 3 05 06 PM](https://user-images.githubusercontent.com/458335/122224432-19de4700-ce82-11eb-982f-d45d4bcc1e41.png) When we drill down into dataloader next invocation we get: ![Screen Shot 2021-06-16 at 3 09 56 PM](https://user-images.githubusercontent.com/458335/122224976-a1c45100-ce82-11eb-8d40-59194740d616.png) And finally format_batch: ![Screen Shot 2021-06-16 at 3 11 07 PM](https://user-images.githubusercontent.com/458335/122225132-cae4e180-ce82-11eb-8a16-967ab7c1c2aa.png) Not sure this could be further improved but this is definitely a decent step forward.
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
> ```python > datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head > ``` @albertvillanova how would I replace datasets dependency in https://github.com/huggingface/transformers/blob/master/setup.py as the above approach is not working.
**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%.
24
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%. > ```python > datasets @ git+ssh://git@github.com/huggingface/datasets.git@refs/pull/2505/head > ``` @albertvillanova how would I replace datasets dependency in https://github.com/huggingface/transformers/blob/master/setup.py as the above approach is not working.
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@vblagoje I tested my proposed approach before posting it here and it worked for me. Is it not working in your case because of the SSH protocol? In that case you could try the same approach but using HTTPS: ``` "datasets @ git+https://github.com/huggingface/datasets.git@refs/pull/2505/head", ```
**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%.
44
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%. @vblagoje I tested my proposed approach before posting it here and it worked for me. Is it not working in your case because of the SSH protocol? In that case you could try the same approach but using HTTPS: ``` "datasets @ git+https://github.com/huggingface/datasets.git@refs/pull/2505/head", ```
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2498
Improve torch formatting performance
@albertvillanova of course it works. Apologies. I needed to change datasets in all deps references , like [here](https://github.com/huggingface/transformers/blob/master/setup.py#L235) for example.
**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%. @albertvillanova of course it works. Apologies. I needed to change datasets in all deps references , like [here](https://github.com/huggingface/transformers/blob/master/setup.py#L235) for example.
[ -0.35013532638549805, -0.2402968406677246, -0.07366824150085449, 0.1903572529554367, 0.1027538999915123, 0.14770635962486267, 0.2599889934062958, 0.6868165731430054, -0.12113015353679657, -0.06412002444267273, -0.3566419780254364, 0.2431405484676361, -0.11459852010011673, -0.03322073444724083, 0.06633522361516953, -0.3101109266281128, 0.0007665827870368958, 0.10030800849199295, -0.06789612770080566, -0.13086211681365967, -0.10192406922578812, -0.42416369915008545, 0.05567824840545654, -0.23089207708835602, -0.1764657199382782, 0.143389031291008, -0.07297074049711227, 0.004990179091691971, -0.01477799378335476, -0.39140811562538147, -0.016801990568637848, 0.20411209762096405, 0.1916383057832718, 0.23665562272071838, -0.0001087393902707845, -0.02196245640516281, 0.10556335747241974, 0.029854929074645042, -0.3094548285007477, 0.2616172730922699, 0.32627159357070923, -0.31579017639160156, 0.05455996096134186, -0.20534224808216095, -0.4622156620025635, -0.20446480810642242, -0.011553915217518806, -0.3079187870025635, 0.04370926320552826, 0.032494332641363144, 0.1543280929327011, 0.2567412555217743, -0.3000166118144989, 0.18780530989170074, 0.32916268706321716, 0.48526549339294434, -0.1752861738204956, 0.09862008690834045, 0.3001522123813629, 0.029168350622057915, -0.5153073668479919, 0.6179617643356323, -0.17225757241249084, -0.03250305727124214, 0.17719489336013794, 0.06036936491727829, -0.24245521426200867, -0.11645013093948364, -0.08242093026638031, 0.40601903200149536, 0.03252445161342621, -0.24458926916122437, -0.5007596611976624, -0.44534993171691895, -0.030952833592891693, -0.5959247350692749, -0.10014718025922775, 0.111388199031353, -0.28344231843948364, 0.1466880440711975, -0.0680338591337204, 0.036880526691675186, -0.12036436051130295, -0.09613679349422455, -0.05475850775837898, 0.25879377126693726, 0.24107299745082855, -0.2225954830646515, 0.09051409363746643, 0.19611386954784393, 0.45579954981803894, -0.11577935516834259, 0.27609750628471375, -0.004552692174911499, -0.35223251581192017, -0.16664165258407593, -0.023672275245189667, -0.18670925498008728, -0.15297484397888184, -0.06688906252384186, 0.12647847831249237, 0.5531219840049744, -0.09119188040494919, -0.019700966775417328, -0.23726147413253784, 0.03756026178598404, -0.1032603457570076, 0.21059183776378632, 0.19669969379901886, -0.118680439889431, 0.06776347756385803, 0.19367557764053345, -0.0780177041888237, -0.049307286739349365, -0.3120102286338806, 0.1427364945411682, -0.48154568672180176, -0.08429025113582611, -0.18622125685214996, 0.025211362168192863, -0.13065527379512787, -0.1333499401807785, 0.04096152260899544, 0.31119734048843384, -0.2863076627254486, 0.19483327865600586, 0.16808445751667023, -0.14746202528476715, -0.24756193161010742, -0.26792585849761963, 0.05119393393397331, 0.17039605975151062, -0.2893528640270233, 0.006973749026656151, 0.2033194899559021, -0.24583041667938232, -0.09343065321445465, -0.07095514237880707, 0.07478560507297516, 0.388759046792984, 0.02003285102546215, -0.22809775173664093, 0.4766444265842438, -0.027101997286081314, -0.06796316057443619, 0.013656334951519966, 0.1813703030347824, 0.5773719549179077, -0.2796095907688141, 0.15739990770816803, -0.1916833519935608, -0.20621715486049652, -0.15920808911323547, 0.1019587367773056, 0.07004435360431671, 0.007334958761930466, 0.06688331067562103, 0.34242701530456543, 0.13319149613380432, 0.07672066986560822, 0.12647217512130737, -0.2490808516740799, -0.3356602191925049, -0.11782275885343552, 0.3001022934913635, 0.30322375893592834, -0.1989404559135437, -0.04738591983914375, 0.47587287425994873, 0.34417852759361267, 0.4220888018608093, 0.4858787953853607, -0.3000441789627075, 0.11796949803829193, -0.02902454510331154, 0.00725623220205307, 0.3716587722301483, -0.36978259682655334, -0.12970733642578125, 0.3484441936016083, 0.07491359114646912, 0.27083975076675415, 0.16083940863609314, 0.19488370418548584, 0.4046298861503601, -0.005936785601079464, 0.07297417521476746, 0.39548927545547485, 0.008220789954066277, -0.049947671592235565, -0.482464998960495, -0.17390650510787964, 0.4433809518814087, 0.39572644233703613, 0.05743418633937836, -0.3865261375904083, -0.11886433511972427, -0.10473915189504623, 0.4031054675579071, -0.3227173984050751, 0.1457480937242508, 0.10898647457361221, -0.17205823957920074, 0.15341338515281677, 0.015173645690083504, 0.2190544605255127, -0.11219426244497299, 0.22421002388000488, -0.36455073952674866, 0.3796460032463074, 0.04791228100657463, -0.1950644999742508, 0.3231678009033203, -0.03614523634314537, -0.003982875496149063, -0.25541967153549194, 0.04070751368999481, -0.04461783170700073, -0.20460262894630432, 0.025377001613378525, 0.04244584962725639, 0.3719463646411896, -0.2666938304901123, 0.11531154811382294, -0.2319299429655075, 0.11067293584346771, 0.052905380725860596, -0.05287354066967964, -0.05345344915986061, 0.2816495895385742, 0.06501039117574692, -0.04305204004049301, -0.07917871326208115, 0.1298169493675232, -0.13434115052223206, 0.20282484591007233, -0.2158794105052948, 0.1773775964975357, 0.418503999710083, -0.12596145272254944, 0.29379552602767944, 0.17013846337795258, -0.024878941476345062, -0.1208951473236084, -0.42238283157348633, 0.7661342620849609, 0.4835476279258728, 0.1557842195034027, -0.1161571741104126, -0.21867740154266357, -0.222104012966156, 0.1484176367521286, 0.056070856750011444, 0.08440457284450531, 0.5234324932098389, 0.13681940734386444, 0.17340388894081116, 0.08097924292087555, -0.41778773069381714, 0.37128162384033203, 0.3411574959754944, 0.005134858191013336, -0.1374358832836151, 0.43637004494667053, -0.07853854447603226, -0.3662791848182678, 0.3380373418331146, -0.550646185874939, -0.00509895384311676, 0.2330383062362671, 0.23336796462535858, 0.02353242225944996, -0.01775997504591942, -0.03146374598145485, 0.0983770415186882, 0.010549575090408325, -0.05427692458033562, 0.01268380880355835, 0.21903590857982635, 0.2533148229122162, -0.07325073331594467, -0.09442104399204254, -0.1324290931224823, 0.02365817502140999, -0.1572205275297165, 0.12378572672605515, -0.41272109746932983, -0.10316678136587143, -0.155376136302948, -0.3362695872783661, -0.0705445408821106, -0.17990975081920624, 0.030072955414652824, 0.13778646290302277, -0.028504833579063416, 0.1710876077413559, 0.021794162690639496, 0.046973273158073425, 0.05702967941761017, -0.22337706387043, -0.17397823929786682, -0.1969989687204361, -0.03078443557024002, 0.03385380282998085, 0.14755964279174805, -0.03262823820114136, 0.3699905574321747, -0.006934940814971924, 0.1059628501534462, 0.0763375386595726, -0.2765931785106659, 0.048594482243061066, -0.1336110681295395, -0.2551209032535553, 0.04960886389017105, -0.12589725852012634, -0.2280787229537964, -0.12080254405736923, 0.09727287292480469, 0.001779286190867424, 0.058724068105220795, -0.1553664654493332, -0.09026386588811874, 0.18178127706050873, -0.019235610961914062, -0.22558137774467468, -0.24595950543880463, -0.30734944343566895, -0.04960642009973526, -0.1677563339471817, 0.15653753280639648, -0.2041863054037094, -0.028364818543195724, 0.13088321685791016, 0.20822449028491974, 0.04565916955471039, 0.02368113398551941, -0.42927730083465576, 0.4179662764072418, -0.2306927740573883, -0.16887815296649933, -0.401109516620636, -0.020249921828508377, 0.00005058199167251587, 0.36734479665756226, -0.4472314119338989, 0.21421471238136292, -0.06474312394857407, 0.1862572580575943, -0.24602508544921875, -0.1165195107460022, 0.14454954862594604, 0.2486152946949005, -0.09356870502233505, 0.008100010454654694, 0.07200388610363007, -0.15417581796646118, -0.23297888040542603, 0.10221614688634872, -0.07459939271211624, 0.30419671535491943, 0.3246067464351654, 0.6840357184410095, -0.061722394078969955, -0.345792680978775, 0.10292747616767883, 0.1235019788146019, 0.10423067212104797, -0.09333723038434982, -0.23231501877307892, 0.12217705696821213, -0.2074725329875946, 0.3181700110435486, 0.3299955725669861, -0.053586483001708984, -0.21739231050014496, -0.013857753947377205, -0.2203805148601532, 0.1459466814994812, -0.2429204136133194, 0.6411698460578918, -0.4819489121437073, 0.2805367112159729, -0.09434463083744049, 0.47749772667884827, -0.267218679189682, -0.2383500337600708, 0.29150596261024475, -0.006821990013122559, 0.2728026211261749, -0.1776014119386673, 0.10382340848445892, -0.17983528971672058, -0.49148857593536377, 0.24443507194519043, 0.38476505875587463, 0.19534826278686523, 0.03308932110667229, -0.012956053018569946, 0.19633501768112183, -0.056744176894426346, 0.265669584274292, 0.006643231958150864, -0.1794695109128952, 0.165277898311615, -0.5235357284545898, -0.19511951506137848, 0.009396139532327652, -0.003670457750558853, -0.07097126543521881, -0.07673397660255432, 0.27617108821868896, -0.11872344464063644, -0.39650899171829224, 0.2941376864910126, -0.05354924499988556, -0.05985289067029953, -0.0008520586416125298, 0.05153605714440346, -0.011456936597824097, -0.12476145476102829, 0.16677282750606537, 0.07657240331172943, -0.010711515322327614, -0.21172699332237244, -0.05749509111046791, -0.11023350059986115, 0.2859831750392914, 0.3494950532913208, 0.025546088814735413, -0.1026386246085167, 0.021711910143494606, 0.11759831011295319, 0.07751549035310745, 0.3361070454120636, 0.47614046931266785, 0.07305487990379333, -0.37654024362564087, 0.046519212424755096, -0.034541573375463486, -0.09407130628824234, 0.21856048703193665, 0.5431830883026123, 0.09415340423583984, 0.357247918844223, -0.2959465980529785, 0.003148600459098816, -0.44047293066978455, 0.12412241101264954, 0.07991121709346771, 0.016461092978715897, -0.5305217504501343, -0.5308508276939392, 0.44491368532180786, 0.09528903663158417, -0.007360927760601044, 0.30800139904022217, -0.19862337410449982, -0.1722663789987564, 0.43405866622924805, 0.46194180846214294, 1.0132728815078735, 0.018463432788848877, 0.4371160566806793, 0.07837918400764465, -0.3031279444694519, -0.010949920862913132, -0.6706627011299133, 0.24126510322093964, -0.39932918548583984, -0.22910575568675995, -0.016653303056955338, 0.020678263157606125, 0.15239962935447693, -0.06725838780403137, 0.020589318126440048, 0.03182327002286911, 0.1562063843011856, 0.09961429238319397, -0.052722908556461334, 0.18215905129909515, 0.21333588659763336, -0.7044988870620728, -0.2040032148361206, 0.11375044286251068, 0.09074999392032623, 0.11755846440792084, -0.048960600048303604, -0.25799477100372314, -0.16638141870498657, 0.1905657947063446, -0.13835787773132324, -0.04506237059831619, -0.2100946307182312, 0.0955529659986496, -0.2639066278934479, -0.8112198710441589, 0.3461894690990448, 0.11804483830928802, 0.17771142721176147, 0.1102321594953537, 0.008975768461823463, 0.1276240050792694, 0.11280906200408936, 0.33758750557899475, 0.19162245094776154, -0.3779071867465973, 0.34236738085746765, -0.018887409940361977, 0.003991127014160156, 0.20391258597373962, 0.045379266142845154, -0.18854928016662598, -0.030591338872909546, -0.04270647466182709, 0.28334492444992065, -0.16243009269237518, 0.08990508317947388, -0.11142139136791229, -0.05001695454120636, -0.24637386202812195, 0.1121336966753006, 0.13389620184898376, -0.09504061192274094, 0.24689334630966187, -0.004864431917667389, -0.262728214263916, -0.26011574268341064, 0.509530782699585, 0.15353775024414062, -0.11776988953351974, 0.16912662982940674, 0.32075750827789307, -0.5200850367546082, -0.15202537178993225, 0.21273750066757202, 0.452996164560318, -0.31429022550582886, -0.13947202265262604, -0.10357918590307236, -0.08572950959205627, -0.09490971267223358, -0.11065240204334259, -0.08580182492733002, -0.17949825525283813, -0.1017007902264595, 0.1357041597366333, -0.40161409974098206, -0.08848150074481964, -0.2072799652814865, 0.26217520236968994, 0.005984269082546234, 0.4504779279232025, -0.20523592829704285, 0.25692427158355713, -0.3582395911216736, -0.11573672294616699, 0.18900029361248016, 0.2031717300415039, -0.12233223021030426, 0.1105046272277832, 0.1015334203839302, 0.23654717206954956, 0.047012463212013245, 0.38061559200286865, -0.013310272246599197, -0.1437842845916748, -0.21117371320724487, 0.13594506680965424, -0.16302454471588135, -0.2040039598941803, 0.18534526228904724, 0.07138185948133469, -0.2378407120704651, -0.39862722158432007, 0.20836329460144043, 0.1215953603386879, 0.07943005859851837, 0.26502129435539246, 0.17490637302398682, 0.14563500881195068, -0.011683931574225426, 0.1614363193511963, 0.04361078888177872, 0.35005617141723633, -0.13124047219753265, -0.033134594559669495, -0.15472330152988434, -0.18167689442634583, 0.019409511238336563, 0.16297650337219238, 0.4281500577926636, 0.09542302042245865, 0.3320987820625305, 0.027960246428847313, 0.02676526829600334, -0.18606320023536682, 0.3409809172153473, -0.08449004590511322, -0.062081027776002884, -0.26387298107147217, 0.345656156539917, 0.1365155279636383, -0.0907139778137207, -0.06269580125808716, -0.13555409014225006, -0.41723325848579407, 0.15794327855110168, 0.18290211260318756, 0.5511485934257507, 0.4552232623100281, 0.16137632727622986, -0.06117403134703636, 0.041216570883989334, -0.2157760113477707, -0.16084393858909607, 0.4734087288379669, 0.25229188799858093, -0.015894118696451187, 0.2946074903011322, 0.06074819341301918, 0.1728644073009491, 0.19793029129505157, 0.16690975427627563, 0.5242637395858765, 0.44370242953300476, 0.22663332521915436, -0.16032618284225464, -0.28039124608039856, -0.2760699689388275, 0.07497674971818924, 0.09503930807113647, 0.434154212474823, -0.16329601407051086, 0.26831457018852234, -0.012611913494765759, -0.46388891339302063, 0.18484929203987122, 0.5748348832130432, -0.2423255443572998, -0.07486473023891449, 0.21023713052272797, -0.019163571298122406, -0.34950295090675354, 0.09301403164863586, -0.10507208108901978, -0.07509978115558624, -0.015653550624847412, 0.3138207495212555, 0.03484019637107849, 0.01915137842297554, 0.1164429783821106, -0.16677311062812805, 0.4328155219554901, -0.21308854222297668, -0.05874647945165634, 0.03408152610063553, 0.005026929080486298, -0.06483463943004608, -0.05554898828268051, 0.20038938522338867, -0.09766337275505066, -0.37714046239852905, -0.037999462336301804, -0.20765620470046997, 0.11538121104240417, 0.1750670224428177, 0.08639442175626755, -0.047186627984046936, -0.22251243889331818, 0.3377094268798828, 0.027160244062542915, -0.18818069994449615, 0.06818173825740814, 0.021009590476751328, -0.07886068522930145, -0.06442378461360931, 0.19694864749908447, 0.3674181401729584, -0.17136621475219727, -0.21732687950134277, -0.3684084117412567, -0.24444469809532166, -0.19971568882465363, 0.5486782789230347, -0.08734700828790665, -0.03353264927864075, 0.09559360146522522, 0.10148146748542786, 0.08621691167354584, 0.6552406549453735, 0.08003959059715271, 0.10044083744287491, -0.30571678280830383, -0.10018041729927063, -0.01984800025820732, -0.03477700799703598, -0.030332040041685104, -0.13634350895881653, 0.0663217231631279, -0.03536410629749298, 0.25372928380966187, -0.01605534553527832, -0.06540647149085999, -0.19823892414569855, 0.25221654772758484, 0.34217941761016846, -0.3151421546936035, 0.19319431483745575, -0.5118904709815979, 0.15018142759799957, -0.12944434583187103, -0.22087714076042175, 0.21895475685596466, 0.201865091919899, 0.08278838545084, -0.283098042011261, -0.15040914714336395, 0.2201904058456421, 0.12713421881198883, 0.4697135388851166, -0.09937406331300735, 0.03842465579509735, -0.1637730896472931, -0.24263042211532593, -0.11561517417430878, 0.17853081226348877, -0.15644089877605438, 0.1788851022720337, 0.15880730748176575, 0.3668154776096344, 0.1120525598526001, -0.5914243459701538, -0.2831096947193146, 0.6362105011940002, 0.1218942403793335, -0.1333908587694168, -0.1297859102487564, 0.30113741755485535, -0.1914127767086029, -0.008940128609538078, 0.11733792722225189, 0.3214927613735199, 0.4039698839187622, 0.11564774811267853, -0.6210434436798096, -0.2591514587402344, 0.33287304639816284, -0.2074272185564041, -0.07195870578289032, -0.159703329205513, -0.0799204558134079, 0.26900428533554077, 0.5017661452293396, -0.755147397518158, -0.12310118973255157, 0.12834131717681885, 0.09595821797847748, -0.09908218681812286, 0.3250206410884857, 0.32278749346733093, 0.0367262028157711, -0.3005054295063019, -0.03767760097980499, -0.15676140785217285, -0.016944877803325653, -0.3125457465648651, -0.29178154468536377 ]
https://github.com/huggingface/datasets/issues/2481
Delete extracted files to save disk space
My suggestion for this would be to have this enabled by default. Plus I don't know if there should be a dedicated issue to that is another functionality. But I propose layered building rather than all at once. That is: 1. uncompress a handful of files via a generator enough to generate one arrow file 2. process arrow file 1 3. delete all the files that went in and aren't needed anymore. rinse and repeat. 1. This way much less disc space will be required - e.g. on JZ we won't be running into inode limitation, also it'd help with the collaborative hub training project 2. The user doesn't need to go and manually clean up all the huge files that were left after pre-processing 3. It would already include deleting temp files this issue is talking about I wonder if the new streaming API would be of help, except here the streaming would be into arrow files as the destination, rather than dataloaders.
As discussed with @stas00 and @lhoestq, allowing the deletion of extracted files would save a great amount of disk space to typical user.
164
Delete extracted files to save disk space As discussed with @stas00 and @lhoestq, allowing the deletion of extracted files would save a great amount of disk space to typical user. My suggestion for this would be to have this enabled by default. Plus I don't know if there should be a dedicated issue to that is another functionality. But I propose layered building rather than all at once. That is: 1. uncompress a handful of files via a generator enough to generate one arrow file 2. process arrow file 1 3. delete all the files that went in and aren't needed anymore. rinse and repeat. 1. This way much less disc space will be required - e.g. on JZ we won't be running into inode limitation, also it'd help with the collaborative hub training project 2. The user doesn't need to go and manually clean up all the huge files that were left after pre-processing 3. It would already include deleting temp files this issue is talking about I wonder if the new streaming API would be of help, except here the streaming would be into arrow files as the destination, rather than dataloaders.
[ -0.1356213241815567, -0.3015793561935425, -0.17145225405693054, 0.15534216165542603, -0.07602398097515106, -0.04031509533524513, -0.12200264632701874, 0.5078598856925964, -0.07595331966876984, 0.5109496116638184, 0.18390405178070068, 0.39844653010368347, -0.3721126317977905, 0.25196102261543274, -0.11078453063964844, -0.19185100495815277, -0.09775982052087784, 0.38792482018470764, 0.08525548875331879, 0.16641736030578613, -0.01133739948272705, -0.16016295552253723, 0.016019098460674286, -0.1735655516386032, -0.16104695200920105, -0.20366717875003815, 0.1742883324623108, 0.015063006430864334, -0.3164537847042084, -0.3642846643924713, -0.0983542874455452, 0.11704300343990326, 0.1618458777666092, 0.2395249903202057, -0.00010682138963602483, -0.2105756402015686, 0.1879487931728363, -0.0319867804646492, -0.38386163115501404, 0.25327712297439575, -0.06443573534488678, -0.2182501256465912, 0.020983949303627014, 0.029909394681453705, 0.11388831585645676, -0.35895007848739624, -0.009173201397061348, -0.2793228030204773, 0.6590777635574341, -0.15229582786560059, 0.21113212406635284, 0.16158398985862732, -0.3104894757270813, 0.1768415868282318, 0.016183480620384216, 0.3898812532424927, -0.3480929732322693, 0.12108741700649261, 0.42068520188331604, 0.13988670706748962, 0.0320923775434494, 0.3903597295284271, -0.0615994930267334, -0.0733974426984787, 0.5608956813812256, -0.2504020035266876, -0.0018343329429626465, -0.6491252183914185, 0.10091102868318558, 0.05914143845438957, 0.2640399634838104, -0.03024744987487793, -0.1682361215353012, -0.3032599687576294, 0.18261708319187164, -0.4667099714279175, 0.14776192605495453, 0.13485592603683472, -0.2945112884044647, 0.07949274033308029, -0.1151307225227356, -0.3062003552913666, -0.39893168210983276, -0.05965803563594818, 0.4848080575466156, -0.15651173889636993, 0.045629844069480896, -0.14605161547660828, 0.3003852367401123, 0.1841185986995697, 0.3356780409812927, -0.08329568058252335, 0.03730194270610809, 0.08915738761425018, -0.02739456668496132, -0.24790702760219574, -0.07088490575551987, -0.20191478729248047, -0.15835359692573547, 0.2543638050556183, 0.5093024373054504, 0.20726147294044495, 0.2530675232410431, 0.03607141971588135, 0.08246023952960968, 0.14074130356311798, 0.022518061101436615, -0.3135816156864166, 0.2208508402109146, 0.08109112083911896, 0.1876421868801117, -0.03581155091524124, -0.15974275767803192, 0.038552381098270416, -0.12258535623550415, -0.05924203246831894, -0.00996018573641777, 0.026474852114915848, -0.005467483773827553, -0.031695641577243805, 0.08157788962125778, 0.134926900267601, 0.05082051455974579, -0.08022455126047134, 0.2607171833515167, 0.5838688015937805, -0.05230192095041275, 0.22845609486103058, 0.05385776609182358, -0.16589415073394775, 0.0019474872387945652, 0.04668031260371208, -0.13679496943950653, 0.12424145638942719, 0.2767368257045746, -0.19850201904773712, -0.0007489272393286228, -0.1014561653137207, 0.0445222407579422, -0.14023011922836304, 0.40408822894096375, 0.13305287063121796, 0.16630223393440247, 0.17915789783000946, -0.14524973928928375, -0.2906929850578308, -0.16341635584831238, 0.24019743502140045, -0.19425182044506073, 0.31789079308509827, -0.13393574953079224, -0.4168541431427002, -0.15844476222991943, 0.24339884519577026, 0.12340980768203735, 0.3315383791923523, -0.3740743100643158, -0.00298362597823143, -0.18511784076690674, -0.006279539316892624, 0.1100398600101471, 0.22834868729114532, 0.12299016118049622, -0.12291477620601654, 0.0011532902717590332, 0.09920216351747513, -0.2082642912864685, 0.0019111260771751404, -0.35215017199516296, 0.147660493850708, 0.2103515863418579, 0.2112835943698883, -0.2174931764602661, 0.15086796879768372, -0.05136346071958542, 0.30569183826446533, 0.3844231069087982, -0.039640434086322784, -0.3758775591850281, 0.12508441507816315, -0.11712649464607239, 0.06353840231895447, 0.3967380225658417, 0.18201269209384918, 0.3838990032672882, -0.1808832585811615, -0.16687384247779846, 0.34377139806747437, -0.09052213281393051, 0.022977327927947044, -0.5567657351493835, -0.5417351722717285, -0.2692136764526367, 0.0540844090282917, 0.2500285506248474, -0.027778036892414093, 0.11596687138080597, -0.02775409072637558, 0.15816259384155273, -0.11574433743953705, 0.28344008326530457, -0.06592823565006256, 0.2879231572151184, -0.32693833112716675, -0.2581422030925751, 0.12299143522977829, -0.21780478954315186, 0.00176229327917099, -0.22690372169017792, -0.415786474943161, 0.021394774317741394, -0.3032640218734741, 0.14130866527557373, -0.07493840903043747, -0.033028025180101395, 0.1762618124485016, 0.13113714754581451, 0.0012693926692008972, 0.000497668981552124, -0.38025030493736267, -0.5175287127494812, -0.1215188279747963, -0.0330011285841465, 0.09965813159942627, -0.2109699696302414, 0.27102792263031006, -0.010782888159155846, -0.11327352374792099, 0.09895814955234528, 0.08857171982526779, -0.24413380026817322, -0.21421881020069122, -0.0785040408372879, 0.175076425075531, -0.20762163400650024, 0.40733420848846436, 0.3072753846645355, 0.3474685549736023, 0.28595179319381714, -0.3495838940143585, 0.26102906465530396, 0.40261727571487427, 0.019704382866621017, 0.2463867962360382, -0.20080509781837463, 0.1402624249458313, -0.11205148696899414, 0.001402728259563446, -0.12134362757205963, 0.050783902406692505, -0.14586332440376282, -0.03699835389852524, -0.0701311007142067, -0.047900132834911346, -0.09763911366462708, 0.1465109884738922, -0.10345013439655304, 0.33788084983825684, 0.20019280910491943, 0.27422425150871277, 0.4219553470611572, 0.18702049553394318, -0.17773884534835815, 0.41552281379699707, -0.0429295152425766, -0.36511170864105225, 0.17179498076438904, 0.2880432605743408, 0.19487681984901428, 0.17301270365715027, 0.07117711007595062, -0.1803322434425354, 0.5252895355224609, -0.1838221698999405, 0.42564594745635986, 0.24667927622795105, 0.02253495715558529, 0.5080839395523071, -0.10238848626613617, 0.3116413652896881, -0.20796680450439453, 0.033746447414159775, 0.040022000670433044, -0.05170867592096329, 0.2694746255874634, -0.29517418146133423, -0.13191069662570953, -0.07154306769371033, 0.22510959208011627, -0.0056271785870194435, 0.08205509185791016, -0.020373191684484482, 0.5460212826728821, 0.21449382603168488, -0.6292130351066589, 0.20501944422721863, 0.02842727303504944, 0.6209685802459717, -0.27065467834472656, 0.10860451310873032, -0.4188215732574463, -0.06031443551182747, 0.12574024498462677, 0.16395699977874756, 0.3364754021167755, -0.025830311700701714, 0.32375282049179077, 0.0702519491314888, 0.21756136417388916, -0.3380712568759918, -0.11019701510667801, 0.10778993368148804, 0.15366017818450928, -0.2036517709493637, -0.09700436890125275, 0.22881624102592468, -0.08799009025096893, -0.48938247561454773, -0.24721552431583405, -0.41515496373176575, -0.029270045459270477, 0.1077466607093811, 0.15448014438152313, 0.06339700520038605, -0.3697405457496643, -0.13198402523994446, 0.008776701055467129, -0.7330995202064514, 0.43663519620895386, -0.20784641802310944, 0.16799548268318176, -0.08268261700868607, 0.23053263127803802, -0.0202278234064579, 0.15147665143013, -0.0668017566204071, 0.0914708748459816, -0.5894634127616882, 0.00718379020690918, -0.13407951593399048, -0.21079730987548828, 0.05369647219777107, -0.07346946746110916, 0.018451517447829247, 0.30704694986343384, -0.2912285029888153, -0.02232881635427475, -0.03891151398420334, 0.10446774959564209, -0.17240722477436066, -0.07545431703329086, 0.33455145359039307, 0.2662549316883087, -0.28067559003829956, 0.13345640897750854, 0.26823490858078003, 0.07442314922809601, 0.44241368770599365, 0.12115735560655594, 0.06081594154238701, -0.1510607898235321, 0.30172672867774963, 0.44000399112701416, -0.12422201037406921, 0.32537445425987244, 0.2688208520412445, 0.6192948818206787, 0.2862111032009125, -0.24666553735733032, 0.24886178970336914, 0.15975701808929443, -0.014230340719223022, 0.03011881187558174, 0.5266535878181458, 0.17513352632522583, -0.13301944732666016, 0.17736053466796875, -0.22862277925014496, 0.00676746666431427, -0.1373530626296997, 0.41985422372817993, -0.36823931336402893, 0.05383938550949097, -0.03682994097471237, -0.13321784138679504, 0.03381693735718727, 0.029793579131364822, 0.15659099817276, -0.0338706374168396, 0.6322970986366272, -0.0506577268242836, 0.03163062408566475, -0.0198246818035841, -0.40643471479415894, 0.2881212830543518, -0.021788571029901505, -0.32388874888420105, -0.028800835832953453, -0.34608587622642517, 0.1331811547279358, 0.16483092308044434, -0.11602403223514557, -0.0527958944439888, -0.24562408030033112, -0.2520999312400818, 0.10714380443096161, -0.18388840556144714, 0.05945668742060661, 0.07825885713100433, -0.1445222645998001, -0.10948209464550018, 0.34841471910476685, -0.1479446291923523, -0.35270220041275024, -0.192019522190094, 0.3462505340576172, 0.0017346478998661041, 0.23007968068122864, 0.2537963092327118, -0.2485164999961853, -0.4702058434486389, 0.17565098404884338, 0.046678557991981506, -0.08422493934631348, 0.047514475882053375, -0.31036219000816345, -0.09974157065153122, -0.08277535438537598, 0.05563560128211975, -0.0160808265209198, 0.5145267248153687, -0.24486684799194336, -0.028013436123728752, -0.055837199091911316, 0.3280681371688843, 0.41454604268074036, -0.08509398996829987, -0.028386663645505905, 0.031728073954582214, 0.2795153260231018, -0.3621196150779724, 0.1528601199388504, 0.4592931568622589, -0.092892587184906, 0.0700966864824295, -0.16184936463832855, 0.641070544719696, -0.2481256127357483, -0.10788768529891968, -0.03505437821149826, -0.23440147936344147, 0.16017073392868042, 0.07264944911003113, 0.08420377969741821, -0.07463904470205307, -0.1237030029296875, 0.5312125086784363, 0.09284228086471558, -0.11833252012729645, 0.4810255169868469, 0.26482510566711426, 1.1928396224975586, 0.09847915172576904, 0.2629876434803009, 0.023738177493214607, -0.25457459688186646, 0.11779893934726715, -0.5239396095275879, 0.20428544282913208, 0.1412038803100586, -0.14638260006904602, 0.021450834348797798, 0.15419477224349976, -0.049191638827323914, 0.1785127967596054, -0.3350701928138733, -0.11288943886756897, -0.2717008590698242, -0.09001809358596802, -0.19064094126224518, 0.23984476923942566, -0.2895219922065735, -0.3097996413707733, -0.1892153024673462, 0.09821785986423492, 0.020643357187509537, -0.007574792951345444, -0.15331977605819702, -0.19985714554786682, 0.04106364771723747, -0.12145469337701797, 0.08524109423160553, -0.05402896925806999, -0.025707710534334183, 0.16328218579292297, -0.26933735609054565, -0.24983811378479004, -0.04951272904872894, 0.0655822604894638, -0.2643709182739258, -0.11697067320346832, -0.13555271923542023, 0.09949885308742523, 0.12967252731323242, 0.08278929442167282, -0.1416047066450119, -0.07219992578029633, -0.011258592829108238, -0.3059493899345398, 0.17853358387947083, -0.005492754280567169, -0.20169632136821747, -0.24031531810760498, 0.12446328997612, 0.045047577470541, 0.11751772463321686, 0.20966753363609314, -0.056658875197172165, -0.11201058328151703, -0.5392423272132874, -0.1017620861530304, 0.21022561192512512, -0.08960987627506256, -0.3118332624435425, 0.21517980098724365, 0.09007547795772552, -0.1976979672908783, -0.0840923935174942, -0.36860617995262146, 0.26865893602371216, -0.0519966259598732, 0.28865694999694824, -0.447460800409317, -0.19294209778308868, -0.5038595795631409, 0.05403897166252136, -0.0020487031433731318, -0.2841663360595703, 0.33349642157554626, -0.07614567875862122, -0.40902286767959595, 0.0741344466805458, -0.039652977138757706, 0.22958596050739288, 0.013162408024072647, -0.298275887966156, 0.09574826061725616, -0.3086767792701721, 0.31067243218421936, -0.11097399890422821, 0.3808493912220001, -0.49663665890693665, -0.123967245221138, 0.10370977222919464, 0.215100958943367, -0.3594694137573242, 0.22487913072109222, 0.1255701780319214, 0.15387937426567078, -0.13852611184120178, 0.040591634809970856, 0.018712017685174942, -0.1323866844177246, -0.031656041741371155, 0.08307543396949768, -0.27856606245040894, -0.24164775013923645, -0.12155663967132568, 0.13323116302490234, -0.059028640389442444, -0.10286656022071838, 0.1873573362827301, 0.09868350625038147, -0.12603025138378143, -0.17601753771305084, 0.08353681862354279, -0.4018439054489136, -0.01565273106098175, -0.28179389238357544, 0.37419208884239197, 0.07185155898332596, -0.154115229845047, 0.1807677149772644, 0.20475167036056519, 0.39682304859161377, -0.2970113456249237, -0.059815116226673126, 0.004072398878633976, -0.34541642665863037, -0.042705487459897995, 0.21296542882919312, 0.13744497299194336, 0.10357614606618881, 0.2391911745071411, 0.16929075121879578, -0.06526316702365875, -0.04824264347553253, 0.207406148314476, 0.24500709772109985, 0.16236193478107452, -0.09448856115341187, 0.031006548553705215, 0.31443485617637634, -0.12269273400306702, -0.09873172640800476, -0.09212709963321686, -0.13101376593112946, -0.19813856482505798, 0.04740878939628601, 0.34052610397338867, -0.09682521969079971, -0.11836984753608704, 0.055695243179798126, -0.1452515870332718, -0.2564471364021301, 0.3973231613636017, 0.3020840287208557, -0.002248745411634445, -0.15398775041103363, -0.16578689217567444, -0.16696128249168396, 0.15318839251995087, -0.1523239016532898, -0.4397925138473511, 0.24781136214733124, 0.4387493133544922, 0.16495777666568756, -0.13909965753555298, -0.12997524440288544, -0.27338701486587524, 0.10770659148693085, -0.08926208317279816, 0.29029685258865356, 0.4061606824398041, 0.41568276286125183, 0.17323246598243713, -0.6045851111412048, -0.18433931469917297, 0.31016385555267334, 0.019921503961086273, 0.10798557102680206, -0.044680576771497726, -0.18474474549293518, -0.0763440653681755, 0.06463651359081268, 0.18222294747829437, 0.3154657483100891, 0.27624785900115967, 0.48858213424682617, 0.17372533679008484, 0.21024948358535767, 0.33084696531295776, 0.1891874372959137, 0.5358943343162537, -0.2661402225494385, -0.06814713031053543, 0.0712614357471466, -0.026933595538139343, -0.08442336320877075, 0.14018310606479645, 0.13183578848838806, -0.08379223942756653, -0.2902517020702362, 0.25066840648651123, 0.0318591482937336, 0.10536709427833557, -0.3437458574771881, 0.14990217983722687, 0.4966716170310974, 0.15131892263889313, -0.13133248686790466, 0.13575121760368347, -0.24601897597312927, -0.01924283429980278, -0.20768339931964874, 0.07258905470371246, -0.14249630272388458, -0.1264306902885437, 0.35548847913742065, -0.4864276349544525, -0.017353083938360214, -0.10775464028120041, -0.23014599084854126, 0.035214900970458984, 0.3305041790008545, -0.11484609544277191, 0.008505290374159813, -0.19381335377693176, 0.09569738805294037, -0.1864747405052185, 0.4524027109146118, 0.08075343072414398, -0.2967928349971771, -0.16217488050460815, -0.2621738314628601, -0.4147243797779083, 0.004277713596820831, 0.06798739731311798, 0.29357922077178955, 0.1867905557155609, 0.16442765295505524, -0.02217072993516922, 0.19539590179920197, 0.02345951646566391, -0.15502232313156128, -0.016104809939861298, 0.07117399573326111, -0.43285712599754333, 0.4441390037536621, 0.5078604817390442, 0.25159183144569397, 0.09456486254930496, -0.552987813949585, 0.11672882735729218, 0.034746114164590836, 0.04982602596282959, 0.2828075885772705, 0.09530805051326752, 0.12036611139774323, 0.267249196767807, 0.4411720931529999, -0.018025455996394157, -0.31047263741493225, -0.17526614665985107, -0.3175334632396698, -0.19379806518554688, -0.005058445502072573, -0.19777394831180573, -0.17522543668746948, 0.33067262172698975, 0.47910454869270325, -0.31039121747016907, 0.22055824100971222, -0.35960936546325684, -0.05267618969082832, -0.10674978792667389, -0.030927658081054688, -0.25340357422828674, -0.1696976125240326, -0.14702101051807404, 0.3872562646865845, 0.15682387351989746, 0.2938322126865387, -0.05719709396362305, -0.3464210033416748, -0.4373604655265808, -0.1265474110841751, 0.3629035949707031, 0.12415280193090439, -0.38025903701782227, 0.2163325399160385, 0.30516165494918823, 0.4904463589191437, 0.0896076187491417, -0.11518768966197968, -0.03362392634153366, 0.003773774951696396, -0.13261115550994873, 0.022794798016548157, 0.28358912467956543, -0.1408277451992035, -0.14517423510551453, -0.000788714736700058, 0.31461185216903687, 0.0007038433104753494, -0.16172802448272705, -0.17701758444309235, -0.40921181440353394 ]
https://github.com/huggingface/datasets/issues/2480
Set download/extracted paths configurable
For example to be able to send uncompressed and temp build files to another volume/partition, so that the user gets the minimal disk usage on their primary setup - and ends up with just the downloaded compressed data + arrow files, but outsourcing the huge files and building to another partition. e.g. on JZ there is a special partition for fast data, but it's also volatile, so only temp files should go there. Think of it as `TMPDIR` so we need the equivalent for `datasets`.
As discussed with @stas00 and @lhoestq, setting these paths configurable may allow to overcome disk space limitation on different partitions/drives. TODO: - [x] Set configurable extracted datasets path: #2487 - [x] Set configurable downloaded datasets path: #2488 - [ ] Set configurable "incomplete" datasets path?
85
Set download/extracted paths configurable As discussed with @stas00 and @lhoestq, setting these paths configurable may allow to overcome disk space limitation on different partitions/drives. TODO: - [x] Set configurable extracted datasets path: #2487 - [x] Set configurable downloaded datasets path: #2488 - [ ] Set configurable "incomplete" datasets path? For example to be able to send uncompressed and temp build files to another volume/partition, so that the user gets the minimal disk usage on their primary setup - and ends up with just the downloaded compressed data + arrow files, but outsourcing the huge files and building to another partition. e.g. on JZ there is a special partition for fast data, but it's also volatile, so only temp files should go there. Think of it as `TMPDIR` so we need the equivalent for `datasets`.
[ -0.2962552607059479, -0.10550085455179214, -0.1821805238723755, 0.18956461548805237, 0.11870540678501129, -0.08783280104398727, -0.042484674602746964, 0.2916620969772339, 0.04623410478234291, 0.3479495644569397, -0.18032479286193848, 0.19076332449913025, 0.01419537328183651, 0.3997287452220917, 0.021299799904227257, -0.08092837035655975, -0.21672090888023376, 0.2052154839038849, -0.2652953565120697, 0.18052399158477783, -0.2859377861022949, 0.021976610645651817, 0.04428809881210327, -0.06578199565410614, -0.026466064155101776, -0.1949848234653473, -0.02131124958395958, 0.0202082060277462, -0.1970951110124588, -0.2983089089393616, 0.18015693128108978, 0.22983913123607635, 0.05507728457450867, 0.35125723481178284, -0.00009830477210925892, -0.004257820546627045, 0.06313693523406982, -0.1732395589351654, -0.629463791847229, -0.25136029720306396, -0.019106680527329445, -0.5226923823356628, -0.03218325227499008, -0.2287237048149109, 0.022312026470899582, -0.24535112082958221, 0.16773349046707153, -0.35369083285331726, 0.11977958679199219, -0.09939363598823547, 0.36816293001174927, 0.2698151767253876, -0.04304717481136322, -0.18130367994308472, 0.23484468460083008, 0.2331930547952652, -0.32919222116470337, 0.05075740069150925, 0.34339529275894165, 0.2788318693637848, 0.013140268623828888, 0.006848878227174282, 0.029504111036658287, 0.3137277364730835, 0.29710081219673157, -0.030737463384866714, 0.11221981793642044, -0.47124776244163513, 0.09974794834852219, 0.2625063359737396, 0.5066244602203369, -0.32210487127304077, -0.32091936469078064, -0.4933091104030609, -0.025185279548168182, -0.11290688067674637, 0.2811667323112488, 0.16901180148124695, -0.3046695590019226, 0.12748904526233673, -0.32154184579849243, -0.13363134860992432, -0.22725211083889008, 0.24195340275764465, -0.008944906294345856, 0.023959338665008545, -0.13588128983974457, -0.04633389413356781, 0.2854823172092438, 0.17625561356544495, 0.213287353515625, -0.40441542863845825, 0.18549677729606628, -0.07453825324773788, 0.20018096268177032, -0.28471267223358154, -0.08080572634935379, -0.1120704635977745, 0.06433997303247452, 0.0092398039996624, 0.0790882259607315, -0.06844362616539001, 0.06422103941440582, 0.051812656223773956, 0.2564740478992462, 0.05170058831572533, -0.27149298787117004, -0.06142684072256088, 0.2406291961669922, -0.038108374923467636, 0.21741873025894165, 0.04836830496788025, -0.1444506049156189, -0.3023053705692291, -0.37247174978256226, -0.1259240210056305, -0.07520045340061188, 0.021189551800489426, -0.3299492597579956, -0.3805188536643982, 0.4152686595916748, 0.03541562333703041, 0.05590055510401726, -0.014403335750102997, 0.1345674991607666, -0.16918206214904785, -0.2371784895658493, 0.28186964988708496, -0.09388710558414459, 0.0925753265619278, -0.04585389047861099, -0.045700278133153915, -0.28546980023384094, 0.08699870109558105, 0.20560204982757568, 0.007832403294742107, 0.17757262289524078, -0.17007477581501007, -0.09774121642112732, 0.2256353795528412, 0.4130828082561493, -0.04407146945595741, 0.068979412317276, 0.3716668486595154, 0.18513725697994232, 0.1394667774438858, -0.24644608795642853, 0.36346155405044556, -0.35811394453048706, 0.2483169138431549, -0.29182466864585876, -0.4405577480792999, 0.09445887058973312, 0.28061074018478394, -0.16439005732536316, 0.0001412816345691681, -0.19231170415878296, 0.05232177674770355, -0.08977843075990677, -0.05492217093706131, -0.023164324462413788, 0.10357550531625748, -0.018947381526231766, -0.21565310657024384, 0.13241173326969147, 0.17382295429706573, -0.39451974630355835, -0.061673130840063095, -0.3099744915962219, -0.08327658474445343, 0.1494044065475464, 0.2036529928445816, -0.2687668800354004, 0.11253640055656433, -0.356792688369751, 0.1980067938566208, 0.38277778029441833, -0.06185184419155121, -0.3516400158405304, 0.19398058950901031, -0.11778762936592102, -0.07402391731739044, 0.23614057898521423, 0.1520565301179886, 0.4000896215438843, -0.03940747305750847, -0.09893561899662018, 0.5456368327140808, 0.08779417723417282, 0.05157199501991272, -0.21950912475585938, -0.6255844831466675, -0.09600651264190674, -0.015775863081216812, 0.0799063965678215, -0.16318875551223755, 0.2333316206932068, 0.04866437241435051, 0.09737855195999146, -0.0917535275220871, 0.23531991243362427, 0.08774104714393616, 0.17649972438812256, -0.08816961944103241, -0.2954937517642975, 0.07139517366886139, -0.3603198230266571, 0.2684764564037323, -0.1432172656059265, -0.21407872438430786, 0.08003945648670197, -0.07038605213165283, -0.0012990748509764671, -0.2523115873336792, 0.020349089056253433, -0.17238539457321167, 0.2511441111564636, 0.17632049322128296, 0.15824535489082336, -0.2860216796398163, -0.11243036389350891, -0.19140684604644775, 0.08238254487514496, 0.0651012659072876, 0.08332347869873047, 0.45873111486434937, -0.15918487310409546, -0.0013216584920883179, -0.05794792249798775, 0.13887494802474976, -0.23094111680984497, -0.3591417968273163, 0.07074767351150513, 0.22541049122810364, 0.0796138271689415, 0.22036439180374146, 0.28306588530540466, 0.24056923389434814, 0.2718520760536194, 0.09069998562335968, 0.2883925139904022, 0.13963253796100616, -0.20508553087711334, 0.19139555096626282, -0.3032185733318329, 0.32913094758987427, -0.11398477852344513, -0.04078661650419235, 0.16215099394321442, 0.019914789125323296, 0.16569186747074127, -0.057924095541238785, 0.10968410223722458, -0.3439183533191681, -0.0135343037545681, 0.03954651579260826, 0.2599918246269226, 0.27949121594429016, 0.21899130940437317, 0.20412437617778778, 0.31023508310317993, 0.21336829662322998, 0.05243482440710068, 0.19469603896141052, 0.010002583265304565, -0.2498701512813568, -0.04617266356945038, 0.5935584306716919, 0.4426036477088928, 0.48748454451560974, 0.377162367105484, -0.20008030533790588, 0.060237985104322433, -0.32136520743370056, 0.4303218126296997, -0.0018880143761634827, -0.026101965457201004, 0.16583606600761414, -0.20781566202640533, -0.0010182065889239311, -0.11548926681280136, -0.1544910967350006, 0.20194166898727417, -0.0175748523324728, 0.048308368772268295, -0.38999614119529724, -0.3329843282699585, -0.2143121063709259, -0.056515224277973175, 0.07247291505336761, 0.016713717952370644, -0.08897674083709717, 0.3481672406196594, 0.18825781345367432, -0.38356995582580566, 0.14273080229759216, -0.051634859293699265, 0.3345625698566437, -0.20551297068595886, -0.25726187229156494, -0.06803984940052032, -0.018959125503897667, -0.0014065690338611603, 0.24055978655815125, 0.2626760005950928, -0.029069574549794197, 0.31855979561805725, -0.011583864688873291, 0.014424538239836693, -0.5141133666038513, -0.18237634003162384, 0.1400059014558792, 0.13232651352882385, 0.11491921544075012, 0.061100106686353683, 0.2755706310272217, 0.2675014138221741, -0.18912598490715027, 0.026224447414278984, 0.10393276810646057, -0.09534109383821487, -0.08866583555936813, 0.08249251544475555, -0.09915052354335785, -0.30676406621932983, -0.2084650993347168, -0.29015597701072693, -0.6281811594963074, 0.28313058614730835, -0.1043652594089508, 0.25145578384399414, 0.18618611991405487, 0.45201587677001953, -0.015257226303219795, 0.052481841295957565, -0.049088023602962494, -0.03546849265694618, -0.49966347217559814, 0.2473185509443283, -0.4030630588531494, 0.07869934290647507, -0.10157575458288193, 0.13165819644927979, 0.1765713393688202, 0.43865394592285156, -0.5158385038375854, -0.0015855124220252037, -0.2677958607673645, 0.3502952754497528, 0.2252786010503769, 0.0487862154841423, 0.4365336000919342, 0.06457336992025375, -0.21612343192100525, -0.050675228238105774, -0.02513018064200878, 0.1632097214460373, 0.3058551847934723, 0.1377153992652893, 0.026339923962950706, -0.16909673810005188, 0.11413100361824036, 0.33852195739746094, -0.14507004618644714, 0.2844705283641815, 0.35583075881004333, 0.2150801420211792, 0.5061594247817993, -0.27267417311668396, 0.161134734749794, 0.2804846167564392, 0.05318525433540344, -0.1758488565683365, 0.35914868116378784, 0.07300588488578796, -0.029481852427124977, 0.1004181057214737, -0.22483853995800018, 0.0020400285720825195, -0.25781479477882385, 0.36025622487068176, -0.07354546338319778, 0.164478600025177, -0.023471752181649208, -0.051999032497406006, -0.22248801589012146, 0.0996798649430275, -0.10629522800445557, 0.09719511866569519, 0.25658631324768066, 0.2397240698337555, -0.1812206208705902, 0.10043058544397354, -0.10389385372400284, 0.11677214503288269, -0.07640388607978821, -0.3136497437953949, -0.1662270426750183, -0.09616149961948395, 0.0451202355325222, 0.20977146923542023, 0.1315774917602539, -0.21139760315418243, -0.132114440202713, -0.027415964752435684, -0.18075396120548248, -0.40940743684768677, -0.0728059783577919, 0.08741727471351624, -0.05805569142103195, 0.07890350371599197, 0.5266672372817993, -0.19687873125076294, -0.21539904177188873, -0.12180013954639435, 0.3659333288669586, -0.06546026468276978, 0.07853435724973679, 0.18126647174358368, -0.25836774706840515, -0.4736139178276062, -0.050649695098400116, 0.08218177407979965, -0.07661677896976471, -0.029502781108021736, -0.22107619047164917, -0.23951400816440582, -0.01846843771636486, -0.009157173335552216, 0.12608450651168823, 0.332158625125885, -0.26434770226478577, 0.18739065527915955, 0.13758137822151184, 0.19355079531669617, 0.5737664103507996, 0.2259553223848343, -0.40407079458236694, 0.14232681691646576, 0.38275840878486633, -0.28881797194480896, 0.007253408432006836, 0.3047209680080414, -0.02704652026295662, -0.06952100247144699, -0.2594327926635742, 0.24250707030296326, -0.3263024687767029, 0.045318108052015305, 0.1171567514538765, -0.0337289497256279, 0.11624948680400848, -0.27841469645500183, -0.0462169274687767, -0.1442336142063141, -0.049692340195178986, 0.38779568672180176, 0.12196940183639526, -0.4149864912033081, 0.062452539801597595, 0.24170830845832825, 0.8535850048065186, 0.05963578075170517, 0.2840288281440735, -0.027190234512090683, -0.28700798749923706, 0.1652587503194809, -0.3779340386390686, -0.006358601152896881, 0.10901609063148499, -0.12202303111553192, 0.06407319754362106, -0.06634429097175598, 0.048566319048404694, 0.30112209916114807, -0.2952788472175598, 0.0256754569709301, -0.033905889838933945, -0.06072121486067772, -0.3045543432235718, 0.05304066091775894, -0.17316870391368866, -0.340092271566391, -0.12646347284317017, 0.26016175746917725, 0.08352894335985184, 0.10924915969371796, -0.07294729351997375, -0.1383630335330963, 0.0851607471704483, 0.2667834162712097, -0.009386636316776276, -0.30335938930511475, -0.21196594834327698, 0.13527385890483856, -0.2492736577987671, -0.19831860065460205, 0.0684778243303299, 0.10153032094240189, 0.1253798007965088, 0.2845492362976074, -0.3281388282775879, 0.06096659600734711, -0.17405152320861816, 0.017848370596766472, -0.045757342129945755, -0.21241351962089539, 0.072929248213768, -0.1777651309967041, -0.0396781787276268, -0.17713090777397156, -0.0823262631893158, -0.12943591177463531, 0.08148884773254395, -0.17458726465702057, -0.013493247330188751, -0.038137730211019516, -0.07675962150096893, -0.18315979838371277, -0.08749687671661377, -0.2126350998878479, 0.23239140212535858, -0.1197543740272522, 0.028170766308903694, 0.25396570563316345, -0.16875703632831573, -0.25552934408187866, -0.31827807426452637, -0.04530077427625656, 0.0031736399978399277, -0.11126020550727844, 0.19568225741386414, -0.42255067825317383, -0.17197628319263458, -0.4166550934314728, 0.3600199818611145, -0.1063460186123848, -0.10559051483869553, 0.18778453767299652, -0.1937757283449173, -0.24370677769184113, -0.27563562989234924, 0.1186491847038269, 0.4634703993797302, 0.14603731036186218, -0.16597898304462433, -0.13320405781269073, -0.17634643614292145, 0.29847192764282227, -0.10301606357097626, 0.4938424229621887, -0.22985562682151794, -0.006388450041413307, 0.3236541450023651, 0.04696650058031082, -0.47057315707206726, 0.2156819999217987, 0.020961793139576912, 0.08016189932823181, 0.29783084988594055, 0.025925932452082634, -0.08451995998620987, -0.12992911040782928, 0.10001300275325775, -0.14601117372512817, -0.37172749638557434, -0.2606518864631653, -0.2561437487602234, 0.08189534395933151, -0.06671300530433655, -0.06353491544723511, 0.2903604209423065, -0.35041117668151855, -0.12600283324718475, -0.27861079573631287, 0.027600951492786407, 0.0203404538333416, -0.019335336983203888, -0.1616065353155136, 0.11066041886806488, -0.10239509493112564, -0.3127559423446655, 0.3415352702140808, 0.22846412658691406, 0.39632993936538696, -0.00500389002263546, 0.26411500573158264, -0.152799591422081, -0.17853617668151855, -0.19529107213020325, 0.23086056113243103, 0.2098824679851532, 0.2751525044441223, -0.12501245737075806, 0.2627410292625427, 0.1357966661453247, 0.08351899683475494, 0.21544897556304932, 0.2932989001274109, 0.16419270634651184, -0.12303368002176285, 0.3854133188724518, 0.3824099004268646, -0.07231572270393372, -0.008514264598488808, -0.03283145651221275, 0.01733660325407982, 0.1773388683795929, 0.27157890796661377, 0.30529776215553284, -0.018816694617271423, 0.09581620991230011, -0.029158176854252815, 0.15796665847301483, 0.08972612023353577, 0.1839335858821869, 0.5496276021003723, 0.04546356573700905, -0.05881810560822487, -0.050145573914051056, -0.08261528611183167, 0.3256778120994568, 0.31560075283050537, -0.41694170236587524, 0.3879029154777527, 0.29688718914985657, -0.09835365414619446, -0.0058438777923583984, -0.29806989431381226, 0.16330313682556152, -0.1229986846446991, 0.053810253739356995, 0.0835571363568306, -0.036146096885204315, 0.19238701462745667, -0.29336485266685486, -0.17805276811122894, -0.1463741511106491, 0.11739590764045715, -0.20180711150169373, -0.25562459230422974, -0.13280369341373444, -0.4109457731246948, 0.057825565338134766, 0.03129621967673302, -0.072786346077919, -0.13297244906425476, 0.44850367307662964, -0.06574958562850952, 0.14546968042850494, -0.09727983921766281, 0.5200169682502747, 0.14800028502941132, -0.08797790855169296, -0.15409265458583832, 0.26585328578948975, 0.0016308054327964783, -0.07827098667621613, 0.002976667135953903, 0.2568168044090271, 0.3327583372592926, 0.06811334192752838, -0.0441315658390522, -0.15603646636009216, 0.18607939779758453, -0.013351362198591232, -0.47366607189178467, -0.1506228744983673, 0.13442577421665192, 0.03756661340594292, 0.38747888803482056, 0.33743196725845337, -0.24088265001773834, 0.04641493409872055, 0.01270662248134613, -0.27897560596466064, -0.13714587688446045, 0.034293219447135925, 0.31960415840148926, -0.23846971988677979, 0.3096679151058197, -0.12755843997001648, -0.1416867971420288, -0.23466184735298157, 0.33175966143608093, -0.2541354298591614, 0.19272533059120178, 0.1957082450389862, 0.16630035638809204, 0.07391636073589325, 0.596760630607605, -0.1065535843372345, -0.28631988167762756, -0.2140316367149353, -0.08220241218805313, -0.44709262251853943, 0.0459093302488327, -0.18150728940963745, -0.1174195185303688, -0.20553821325302124, 0.2257554829120636, 0.0022519007325172424, 0.05611548572778702, 0.2056531310081482, 0.28574374318122864, 0.11631914228200912, 0.28886309266090393, -0.31561413407325745, -0.03523488715291023, 0.3370128870010376, 0.09677872061729431, 0.034923650324344635, -0.43808817863464355, 0.012121189385652542, 0.061136577278375626, 0.16330254077911377, 0.04015165567398071, 0.2764393389225006, 0.38122832775115967, 0.08078081905841827, 0.3357609212398529, -0.08356097340583801, 0.0662950724363327, -0.14774802327156067, -0.035416219383478165, -0.3296087980270386, -0.046378910541534424, -0.14315031468868256, -0.18115302920341492, 0.1976810097694397, 0.10995633900165558, -0.4670318067073822, -0.020527835935354233, -0.31341445446014404, 0.05104398727416992, 0.17039795219898224, 0.2583923041820526, 0.2977578639984131, 0.03047872520983219, -0.10534593462944031, 0.16488298773765564, 0.3832371234893799, 0.2409546971321106, -0.02439923584461212, -0.08195549994707108, -0.2712879180908203, -0.2433438003063202, 0.029106736183166504, 0.30659040808677673, -0.2554539740085602, -0.00984274037182331, 0.06778760999441147, 0.3064531981945038, 0.22225749492645264, -0.17101596295833588, 0.13312077522277832, 0.33388271927833557, -0.13641595840454102, -0.0711192637681961, 0.1565675586462021, -0.05359227582812309, -0.09895489364862442, 0.049013298004865646, 0.3637459874153137, 0.02365265041589737, -0.36378392577171326, -0.24383506178855896, -0.24431809782981873 ]
https://github.com/huggingface/datasets/issues/2474
cache_dir parameter for load_from_disk ?
Hi ! `load_from_disk` doesn't move the data. If you specify a local path to your mounted drive, then the dataset is going to be loaded directly from the arrow file in this directory. The cache files that result from `map` operations are also stored in the same directory by default. However note than writing data to your google drive actually fills the VM's disk (see https://github.com/huggingface/datasets/issues/643) Given that, I don't think that changing the cache directory changes anything. Let me know what you think
**Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function?
84
cache_dir parameter for load_from_disk ? **Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function? Hi ! `load_from_disk` doesn't move the data. If you specify a local path to your mounted drive, then the dataset is going to be loaded directly from the arrow file in this directory. The cache files that result from `map` operations are also stored in the same directory by default. However note than writing data to your google drive actually fills the VM's disk (see https://github.com/huggingface/datasets/issues/643) Given that, I don't think that changing the cache directory changes anything. Let me know what you think
[ -0.271724671125412, -0.12313621491193771, -0.07020489871501923, 0.12663348019123077, 0.2155742198228836, -0.021438267081975937, 0.28476399183273315, 0.08484726399183273, 0.4296785891056061, 0.3610471487045288, -0.17608176171779633, 0.24749360978603363, -0.23836614191532135, 0.24224083125591278, 0.27031582593917847, 0.009946979582309723, 0.0024953708052635193, -0.06446628272533417, -0.06863805651664734, -0.13334190845489502, -0.14860332012176514, 0.15852929651737213, 0.020862706005573273, -0.2857353687286377, -0.028274420648813248, -0.18979108333587646, -0.026502281427383423, 0.27576538920402527, 0.31056052446365356, -0.3239336311817169, 0.15480919182300568, 0.12409788370132446, 0.15721912682056427, 0.5559692978858948, -0.00010478283365955576, -0.023591995239257812, -0.022217951714992523, -0.25709912180900574, -0.3680805265903473, -0.1126929521560669, -0.06556311994791031, -0.1430470496416092, 0.07896043360233307, -0.05964880809187889, -0.4904264211654663, 0.08902165293693542, -0.015267862007021904, -0.25151169300079346, 0.189182311296463, 0.11555998772382736, 0.24837042391300201, -0.09008898586034775, -0.3790542185306549, 0.06607747077941895, 0.051431164145469666, 0.046163443475961685, -0.19042493402957916, 0.5480623245239258, 0.0846347063779831, 0.10860712826251984, -0.1455182135105133, 0.43315327167510986, -0.05823882296681404, 0.16260316967964172, 0.5302643179893494, 0.3962346315383911, -0.06343213468790054, -0.1762121021747589, 0.0431513674557209, -0.12028449028730392, 0.5056239366531372, -0.21098020672798157, -0.23229847848415375, -0.25130516290664673, 0.022834129631519318, -0.3922421932220459, 0.3844238221645355, 0.16230612993240356, -0.19850772619247437, 0.37778031826019287, -0.22688482701778412, -0.3963232934474945, -0.10392548888921738, 0.01358896866440773, -0.000005517154932022095, -0.16830164194107056, -0.2351844310760498, -0.07599852234125137, 0.17627929151058197, 0.14493609964847565, 0.20628243684768677, -0.0536264106631279, 0.05204988643527031, 0.30465853214263916, -0.09175980091094971, -0.1389116793870926, -0.04648594558238983, 0.33140867948532104, 0.00786648690700531, 0.014784110710024834, 0.47136083245277405, 0.07972794771194458, -0.2129872888326645, 0.18167132139205933, -0.0676676481962204, 0.3930065333843231, -0.20986464619636536, -0.02741626650094986, 0.4752402901649475, 0.16826952993869781, -0.21313858032226562, -0.097062848508358, 0.1519380360841751, -0.04396280273795128, 0.21838851273059845, 0.14001306891441345, 0.036462437361478806, -0.18575631082057953, 0.2886318266391754, -0.2089158147573471, 0.13197246193885803, 0.06946127861738205, 0.2824972867965698, 0.45583340525627136, -0.06665869057178497, -0.13133081793785095, 0.12084825336933136, -0.21229512989521027, -0.1652945876121521, 0.18839453160762787, -0.1093689352273941, 0.04551564157009125, -0.22903689742088318, 0.4892902076244354, 0.24638386070728302, 0.09028640389442444, 0.2731122672557831, -0.29933086037635803, 0.2071625292301178, 0.07549221813678741, 0.07553621381521225, -0.17809852957725525, 0.34908902645111084, 0.392179936170578, -0.006288487464189529, 0.036846235394477844, -0.051014114171266556, -0.09270939975976944, -0.3634403347969055, 0.21841353178024292, -0.4228340983390808, -0.4356277585029602, 0.41945573687553406, 0.1934923529624939, -0.18568629026412964, 0.07231639325618744, -0.535276472568512, 0.30245211720466614, -0.17952388525009155, -0.16896100342273712, -0.04515824466943741, 0.05956102907657623, -0.5309441685676575, -0.33913910388946533, 0.15639346837997437, 0.28452178835868835, -0.185594841837883, -0.1120540052652359, 0.15168720483779907, 0.15500272810459137, -0.13758909702301025, 0.3683570623397827, -0.24826079607009888, 0.02012992650270462, -0.24034442007541656, -0.15250304341316223, 0.20097103714942932, -0.3625814914703369, -0.6052295565605164, 0.1620091050863266, -0.12627291679382324, -0.031001662835478783, -0.03774531930685043, 0.18692608177661896, 0.13848568499088287, -0.19770289957523346, 0.35918039083480835, 0.6201856136322021, 0.05593530088663101, 0.30135831236839294, -0.3125098645687103, -0.28306844830513, -0.33250653743743896, 0.24173475801944733, -0.09094449877738953, 0.10309605300426483, 0.13061261177062988, -0.2827852666378021, 0.05085039138793945, -0.19405525922775269, 0.04884639382362366, 0.3934383988380432, 0.36019182205200195, -0.25575196743011475, -0.008235897868871689, 0.12700435519218445, -0.6520004868507385, 0.33128035068511963, -0.03418987989425659, -0.0623961016535759, -0.04432789981365204, -0.16311658918857574, 0.1890241503715515, -0.17281107604503632, -0.04324236139655113, -0.010751832276582718, 0.06556864082813263, 0.07577801495790482, 0.22532033920288086, -0.18497566878795624, -0.013154234737157822, 0.3288772404193878, 0.00819055549800396, -0.06732938438653946, 0.15776166319847107, 0.22647950053215027, 0.085637167096138, -0.11275795847177505, -0.12478698045015335, -0.08796309679746628, 0.0816984623670578, -0.16883140802383423, -0.21738120913505554, 0.388179749250412, 0.18219268321990967, 0.4562590718269348, -0.08318663388490677, 0.25586631894111633, 0.3007507920265198, -0.0425584502518177, 0.49232909083366394, 0.006305627524852753, 0.013065692968666553, 0.11248134821653366, -0.35704505443573, 0.3859909176826477, -0.19074814021587372, 0.17457564175128937, 0.23478271067142487, -0.11417146027088165, 0.19007007777690887, -0.1285557895898819, 0.1645829677581787, -0.14811021089553833, 0.13594330847263336, 0.321111798286438, 0.39578258991241455, 0.14600804448127747, -0.19961437582969666, 0.2674727737903595, 0.3323667347431183, 0.096880704164505, 0.10319291800260544, 0.24613457918167114, -0.36912819743156433, -0.22520238161087036, 0.13975292444229126, 0.1975065916776657, 0.5396437048912048, 0.34246841073036194, 0.31311067938804626, 0.15064841508865356, 0.12478324770927429, -0.09372895210981369, 0.21068644523620605, -0.11173228919506073, 0.1853046417236328, 0.07623615115880966, 0.19081786274909973, -0.14876388013362885, -0.21652063727378845, 0.07602071762084961, -0.000825776718556881, 0.05490289628505707, -0.19070766866207123, 0.143324077129364, 0.08543802052736282, 0.05194135010242462, -0.16581657528877258, -0.03393765911459923, -0.0765601396560669, 0.0708652064204216, 0.0929710865020752, 0.49136883020401, -0.12501263618469238, 0.07184594869613647, 0.2910558879375458, 0.3936702609062195, -0.12275676429271698, -0.36755168437957764, -0.048735324293375015, -0.03315330669283867, -0.07195933163166046, 0.045964259654283524, 0.14639371633529663, -0.0009618161711841822, 0.20919539034366608, 0.15477372705936432, -0.004436143673956394, -0.316582053899765, -0.17443639039993286, 0.18769124150276184, -0.026914626359939575, 0.5244342684745789, -0.05764994025230408, 0.013824142515659332, -0.031018055975437164, 0.041532065719366074, -0.013733087107539177, -0.45546501874923706, -0.1072470024228096, -0.39949819445610046, 0.10934871435165405, 0.26559993624687195, -0.31978732347488403, -0.01103965938091278, -0.35899612307548523, -0.5685355067253113, 0.16373412311077118, 0.28178220987319946, 0.23839302361011505, 0.26516488194465637, 0.089881032705307, -0.061873022466897964, 0.5726653337478638, -0.05466454476118088, -0.3195027709007263, -0.3880089819431305, 0.2858871817588806, -0.35858675837516785, -0.04619086906313896, 0.0663328617811203, -0.04863303154706955, 0.04153900220990181, 0.2487959861755371, -0.3152448534965515, -0.5569877624511719, -0.09413965791463852, 0.07631336152553558, -0.12392327189445496, -0.048397354781627655, 0.3200336992740631, -0.0705714002251625, -0.13556545972824097, -0.017518773674964905, -0.49113649129867554, 0.044096577912569046, 0.47895586490631104, 0.02626945823431015, 0.14131468534469604, 0.05108813941478729, -0.04110107198357582, 0.6494167447090149, -0.3143559694290161, 0.0779213234782219, 0.2143077254295349, 0.23963117599487305, 0.3123822808265686, -0.2663775384426117, -0.11682476103305817, 0.0004905876703560352, 0.00339449942111969, -0.5504599213600159, 0.3372146487236023, 0.19958874583244324, -0.33941179513931274, -0.11921821534633636, -0.38148829340934753, 0.052134424448013306, -0.2729559540748596, 0.3701465427875519, 0.22524526715278625, 0.20538824796676636, -0.010891661047935486, 0.01680348813533783, -0.3317084312438965, -0.11006427556276321, 0.12909287214279175, 0.2059306800365448, 0.1658010482788086, -0.03933936730027199, -0.10687614977359772, 0.02652086317539215, -0.6030487418174744, 0.3651069402694702, 0.07491692155599594, -0.43625062704086304, -0.1904771775007248, -0.09780439734458923, 0.10255590826272964, -0.02373145893216133, 0.4069841504096985, -0.3171284794807434, -0.040717966854572296, 0.012650296092033386, -0.2084205597639084, 0.09992272406816483, -0.019975803792476654, 0.09177865087985992, 0.13467633724212646, -0.19531168043613434, 0.2986094355583191, -0.02352380007505417, -0.3415672779083252, 0.08346915245056152, 0.18541304767131805, -0.3344804048538208, -0.013144932687282562, -0.16581791639328003, -0.3321719765663147, -0.24766889214515686, 0.047530245035886765, -0.02087823674082756, -0.1749141663312912, 0.1017632856965065, 0.05146319791674614, 0.04905075207352638, -0.09317530691623688, 0.032048262655735016, 0.05036399886012077, 0.43645307421684265, 0.3477058410644531, -0.0359019972383976, 0.3418844938278198, 0.18387170135974884, 0.1447157859802246, 0.35905027389526367, -0.31319326162338257, 0.1504935622215271, 0.0009909123182296753, -0.06262903660535812, 0.17169015109539032, 0.5609194040298462, -0.030536703765392303, 0.01660839468240738, -0.04691573232412338, 0.05139945447444916, -0.3236756920814514, 0.3021382689476013, -0.2750929594039917, 0.11463788896799088, -0.05544847249984741, -0.4245925545692444, 0.530899703502655, 0.02906598150730133, -0.29971861839294434, 0.1367153823375702, -0.00018505752086639404, -0.7025896310806274, 0.4885976314544678, 0.3361814618110657, 0.9242454171180725, -0.24021266400814056, 0.32184475660324097, 0.07886417210102081, 0.1488068550825119, 0.17622964084148407, -0.15504135191440582, 0.24322199821472168, -0.18241488933563232, -0.43606606125831604, -0.1167529970407486, -0.18828018009662628, -0.12249588221311569, 0.010843589901924133, -0.3719367980957031, 0.3366635739803314, 0.0038926899433135986, 0.009865202009677887, -0.14840595424175262, 0.3056337535381317, 0.05656047165393829, -0.5729461908340454, -0.4863716959953308, 0.1915958672761917, -0.158852219581604, 0.2162872850894928, -0.02085866779088974, -0.05222426727414131, 0.00782715156674385, -0.014213304966688156, -0.01033879816532135, -0.14474445581436157, -0.6259278059005737, 0.18246214091777802, -0.42531540989875793, -0.3998178243637085, -0.1184006929397583, 0.015510883182287216, 0.2847132682800293, 0.009000450372695923, -0.11559993028640747, 0.2833636403083801, -0.10567622631788254, 0.2330954670906067, -0.270142138004303, -0.24820777773857117, 0.3209015727043152, 0.0013765990734100342, 0.13638168573379517, -0.048031874001026154, -0.12377237528562546, -0.5901215076446533, 0.06032177805900574, -0.014385126531124115, 0.03996935114264488, -0.019612234085798264, -0.2681339383125305, 0.00793854147195816, -0.19739162921905518, -0.058413490653038025, 0.1618926078081131, 0.1366017758846283, 0.03945593535900116, 0.16733258962631226, 0.21088145673274994, -0.23716215789318085, -0.10119941830635071, 0.11550372838973999, 0.2318776249885559, -0.19327840209007263, 0.41544708609580994, -0.0743575245141983, -0.08430236577987671, -0.23340561985969543, -0.2085587978363037, 0.03074766881763935, 0.07382109016180038, 0.4039311707019806, 0.024986736476421356, -0.05526598542928696, -0.008192150853574276, 0.22612407803535461, 0.18028756976127625, 0.09724201261997223, -0.40145400166511536, -0.13730576634407043, -0.38505542278289795, 0.2895955741405487, -0.16659601032733917, 0.2592770457267761, 0.028567880392074585, -0.16881103813648224, 0.016490397974848747, 0.0509687215089798, -0.42560330033302307, 0.18300463259220123, -0.11006611585617065, -0.0803719162940979, 0.3154870867729187, -0.07692097872495651, 0.44190144538879395, -0.08663338422775269, 0.08021686971187592, -0.19898904860019684, -0.2595524489879608, -0.2575896382331848, -0.23026761412620544, 0.09082264453172684, -0.1220996305346489, 0.15831664204597473, -0.15191420912742615, -0.19136862456798553, 0.1481451392173767, -0.31608015298843384, 0.2773508131504059, -0.0007617957890033722, -0.025421462953090668, -0.2146071195602417, -0.21459324657917023, -0.002645358443260193, -0.041805483400821686, 0.1807190328836441, -0.09775419533252716, 0.17650166153907776, 0.06746768206357956, 0.0306340791285038, -0.21442246437072754, -0.08082541823387146, 0.18434175848960876, 0.07563414424657822, -0.05441446602344513, 0.03826498985290527, 0.17369821667671204, 0.1568240076303482, -0.07331889867782593, 0.13256806135177612, 0.03151983767747879, -0.21813002228736877, -0.0888693779706955, -0.02440505474805832, 0.0880274698138237, 0.22890259325504303, 0.05119684338569641, -0.14817674458026886, -0.000033309683203697205, -0.5024091005325317, 0.29113656282424927, 0.47735264897346497, 0.29487237334251404, 0.46681106090545654, 0.11888782680034637, 0.1677168905735016, 0.451706200838089, 0.021930433809757233, -0.11844372749328613, -0.13566350936889648, 0.15268880128860474, 0.2881660461425781, 0.29488155245780945, 0.24819333851337433, 0.33669185638427734, 0.2198076695203781, -0.28057217597961426, 0.03887280076742172, -0.09681078046560287, -0.016058679670095444, -0.0543689951300621, -0.4791135787963867, 0.1115245521068573, 0.1625474989414215, -0.08728183805942535, 0.3022705316543579, -0.04252627491950989, 0.029463395476341248, -0.45164793729782104, -0.2417033463716507, -0.12607704102993011, 0.12586800754070282, -0.21337047219276428, -0.10838858783245087, 0.12616606056690216, 0.0069001540541648865, -0.026263821870088577, 0.3184451460838318, 0.018055472522974014, -0.2803690433502197, 0.2218082696199417, 0.04092332720756531, 0.15816646814346313, 0.28068357706069946, -0.01101759448647499, 0.21832847595214844, 0.05333593860268593, -0.07505219429731369, 0.16895808279514313, -0.35551774501800537, -0.003746993839740753, -0.06610547006130219, -0.06491389125585556, 0.013875462114810944, 0.28725385665893555, -0.27539509534835815, -0.025390584021806717, 0.0737064778804779, -0.02021649107336998, -0.24668116867542267, -0.19954678416252136, 0.027463048696517944, 0.029245225712656975, 0.059801723808050156, 0.1995851844549179, -0.16345694661140442, 0.17892888188362122, -0.07697394490242004, 0.11547620594501495, -0.04844143986701965, -0.06614001840353012, 0.3410564363002777, -0.06932187080383301, -0.26861435174942017, -0.0373319610953331, -0.13310056924819946, 0.00848886463791132, 0.16983461380004883, -0.20746029913425446, 0.06928402930498123, 0.24103301763534546, 0.10471965372562408, 0.2239605337381363, 0.6690728068351746, 0.09156346321105957, 0.14589692652225494, -0.5181547999382019, 0.0084499791264534, -0.45688900351524353, -0.07257773727178574, 0.16381752490997314, 0.16610369086265564, -0.27377673983573914, 0.3370564579963684, 0.17873454093933105, 0.1622144877910614, -0.021641805768013, -0.008584560826420784, 0.0547085776925087, -0.18801526725292206, -0.25190696120262146, -0.00044441595673561096, -0.04247049242258072, 0.09059546887874603, 0.11606454849243164, -0.4988146126270294, -0.04027603939175606, 0.08755841106176376, 0.0460805743932724, -0.08439408242702484, 0.1787150800228119, -0.09846070408821106, 0.16279242932796478, 0.6224085688591003, -0.23400232195854187, 0.05672184005379677, -0.037138961255550385, -0.15724125504493713, -0.08799058198928833, -0.17845095694065094, -0.23184163868427277, -0.1272527575492859, 0.0841509997844696, 0.5111755132675171, -0.12564580142498016, -0.08740027248859406, -0.3893440067768097, 0.18747514486312866, 0.2763236165046692, -0.07125208526849747, 0.14126640558242798, 0.07366745173931122, -0.014260664582252502, 0.1381673663854599, 0.22490179538726807, 0.3117011487483978, -0.0824032872915268, -0.0772753655910492, -0.4371892213821411, 0.01759803481400013, 0.43979617953300476, -0.16326949000358582, -0.12242953479290009, 0.08895600587129593, 0.3794546127319336, 0.16676479578018188, -0.14135389029979706, -0.47297367453575134, 0.05862920731306076, 0.1840687096118927, -0.049703679978847504, -0.3430540859699249, 0.423471599817276, -0.02615327760577202, -0.026561740785837173, -0.21298444271087646, 0.17335352301597595, -0.02639557048678398, -0.3420032262802124, -0.5036292672157288, -0.22049781680107117 ]
https://github.com/huggingface/datasets/issues/2474
cache_dir parameter for load_from_disk ?
Thanks for your answer! I am a little surprised since I just want to read the dataset. After debugging a bit, I noticed that the VM’s disk fills up when the tables (generator) are converted to a list: https://github.com/huggingface/datasets/blob/5ba149773d23369617563d752aca922081277ec2/src/datasets/table.py#L850 If I try to iterate through the table’s generator e.g.: `length = sum(1 for x in tables)` the VM’s disk fills up as well. I’m running out of Ideas 😄
**Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function?
69
cache_dir parameter for load_from_disk ? **Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function? Thanks for your answer! I am a little surprised since I just want to read the dataset. After debugging a bit, I noticed that the VM’s disk fills up when the tables (generator) are converted to a list: https://github.com/huggingface/datasets/blob/5ba149773d23369617563d752aca922081277ec2/src/datasets/table.py#L850 If I try to iterate through the table’s generator e.g.: `length = sum(1 for x in tables)` the VM’s disk fills up as well. I’m running out of Ideas 😄
[ -0.32925233244895935, -0.13604748249053955, -0.07416895031929016, 0.3395156264305115, 0.30544745922088623, 0.024210914969444275, 0.11280043423175812, 0.11024834215641022, 0.3817078769207001, 0.47350192070007324, -0.11442688852548599, 0.3308243155479431, -0.3873734474182129, 0.26286810636520386, 0.3451519310474396, 0.13998304307460785, 0.019871488213539124, 0.047779057174921036, -0.09357355535030365, -0.1791061908006668, -0.2441442608833313, 0.18871764838695526, 0.036178700625896454, -0.39755791425704956, -0.018123924732208252, -0.17535170912742615, 0.020011523738503456, 0.21087616682052612, 0.17625747621059418, -0.25358787178993225, 0.07064960896968842, 0.12896408140659332, 0.20930583775043488, 0.5231040716171265, -0.00010966253466904163, -0.03471144661307335, -0.06302660703659058, -0.23851346969604492, -0.4836065173149109, -0.11482067406177521, 0.018379628658294678, -0.21472981572151184, 0.13083045184612274, -0.016622886061668396, -0.46953240036964417, -0.012113329954445362, -0.1294526755809784, -0.17200867831707, 0.23421776294708252, 0.08742403239011765, 0.21829864382743835, -0.1099979355931282, -0.33843472599983215, 0.054547350853681564, 0.21237704157829285, -0.036058634519577026, -0.2365247756242752, 0.5095522999763489, 0.28909242153167725, -0.017880704253911972, -0.18847396969795227, 0.49028438329696655, -0.1512293517589569, 0.13141359388828278, 0.6123005747795105, 0.36705905199050903, -0.022823818027973175, -0.2394094169139862, -0.0000890195369720459, -0.10506870597600937, 0.544955849647522, -0.19282054901123047, -0.18418431282043457, -0.29294171929359436, 0.08187855035066605, -0.48487287759780884, 0.29648977518081665, 0.23943234980106354, -0.36973410844802856, 0.406516969203949, -0.22465276718139648, -0.31071367859840393, -0.18703511357307434, -0.0529642328619957, 0.025795377790927887, -0.2531558871269226, -0.24386504292488098, -0.09821178764104843, 0.35376685857772827, 0.22490784525871277, 0.4196822941303253, -0.06052546948194504, 0.030505333095788956, 0.23567457497119904, -0.26789188385009766, -0.1673249453306198, 0.16173185408115387, 0.2779456079006195, 0.11602125316858292, 0.13762027025222778, 0.43200892210006714, 0.011315511539578438, -0.16686540842056274, 0.1139182299375534, 0.002766987308859825, 0.2854040563106537, -0.282576322555542, 0.09384690225124359, 0.333590567111969, 0.18778304755687714, -0.17802861332893372, -0.035675399005413055, -0.08092815428972244, 0.07280709594488144, 0.3274495303630829, 0.016002606600522995, -0.025243017822504044, -0.14080627262592316, 0.02226843871176243, -0.014022490940988064, 0.21420177817344666, 0.21515722572803497, 0.3565922975540161, 0.5565624833106995, -0.1116357147693634, -0.025188565254211426, 0.16290906071662903, -0.23238857090473175, -0.20444364845752716, -0.003989932592958212, -0.1049954742193222, 0.005065973848104477, -0.1695917248725891, 0.36987805366516113, 0.3263741135597229, 0.044829562306404114, 0.16831251978874207, -0.25337618589401245, 0.27489665150642395, -0.028976336121559143, 0.12012036144733429, -0.3316972255706787, 0.35355114936828613, 0.5145767331123352, 0.12408053874969482, -0.033650096505880356, 0.02731899917125702, -0.2320525199174881, -0.28653860092163086, 0.4115101099014282, -0.23648729920387268, -0.41549092531204224, 0.3976669907569885, 0.1789437234401703, -0.15400387346744537, 0.1263405680656433, -0.5711729526519775, 0.27537617087364197, -0.1312902569770813, -0.014327315613627434, -0.20390167832374573, -0.005608994513750076, -0.5529279112815857, -0.33390864729881287, 0.15360841155052185, 0.34649157524108887, -0.3733963072299957, 0.07740660011768341, 0.1239696517586708, 0.17178352177143097, 0.017154544591903687, 0.4231010675430298, -0.21581590175628662, 0.12415206432342529, -0.23110055923461914, -0.327752947807312, 0.05034837871789932, -0.08835776895284653, -0.7001382112503052, 0.23209379613399506, -0.024887140840291977, 0.10380954295396805, 0.16048339009284973, 0.3248532712459564, 0.2106383889913559, -0.24328389763832092, 0.5372132062911987, 0.5482691526412964, -0.045603737235069275, 0.21872150897979736, -0.2700900435447693, -0.24959558248519897, -0.22890393435955048, 0.22867189347743988, -0.10619907081127167, 0.1680549681186676, -0.011309638619422913, -0.22654792666435242, 0.18396195769309998, -0.23297905921936035, -0.007649855688214302, 0.36061108112335205, 0.31380537152290344, -0.2296571582555771, -0.006961921229958534, 0.14888069033622742, -0.5796347260475159, 0.25766751170158386, 0.05318571627140045, -0.054533615708351135, -0.17546801269054413, -0.2799568772315979, 0.08597898483276367, 0.11505091935396194, -0.10814967751502991, 0.11995257437229156, 0.045232273638248444, 0.031409792602062225, 0.1639121174812317, -0.36270907521247864, -0.057569392025470734, 0.19262243807315826, -0.22847746312618256, -0.10366426408290863, 0.05552392452955246, 0.29955247044563293, 0.17736612260341644, -0.10415196418762207, 0.028490804135799408, -0.05376297980546951, 0.08203597366809845, -0.09556471556425095, -0.08201204240322113, 0.24792543053627014, 0.35140588879585266, 0.3084281086921692, -0.1722162663936615, 0.3389822542667389, 0.22552749514579773, 0.0864558219909668, 0.37394818663597107, -0.03988828510046005, 0.13210947811603546, 0.0006416812539100647, -0.27036917209625244, 0.3023075759410858, -0.2428358942270279, 0.1529131978750229, 0.14048118889331818, -0.13560889661312103, 0.2908039689064026, -0.03659319877624512, 0.12800583243370056, -0.1456814408302307, 0.129246786236763, 0.469978004693985, 0.3004355728626251, 0.1481817364692688, -0.2916775345802307, 0.27259695529937744, 0.3274212181568146, -0.001785818487405777, 0.1043410524725914, 0.2034422755241394, -0.33798813819885254, -0.2950524687767029, 0.15444131195545197, 0.2103453129529953, 0.42956531047821045, 0.28747403621673584, 0.23922833800315857, 0.046379297971725464, -0.0203871913254261, -0.10919982194900513, 0.26709842681884766, -0.04474092274904251, 0.28521043062210083, 0.1625962257385254, 0.07050298899412155, -0.3323693573474884, -0.27473077178001404, 0.10287630558013916, 0.07222633063793182, 0.17282620072364807, -0.271955668926239, 0.16944895684719086, 0.08876102417707443, 0.07311289757490158, -0.09023544192314148, -0.022102247923612595, 0.01515234261751175, 0.02526463381946087, 0.09401433169841766, 0.623666524887085, -0.06869614124298096, -0.04967888444662094, 0.3816547095775604, 0.39920753240585327, -0.019156409427523613, -0.30554404854774475, -0.04065864533185959, -0.03101017326116562, -0.09644848853349686, 0.05325194075703621, 0.22597624361515045, -0.15034781396389008, 0.3060443103313446, 0.02211497165262699, 0.02375601977109909, -0.23177587985992432, -0.1140306144952774, 0.20625533163547516, -0.09481385350227356, 0.588312029838562, 0.0014551132917404175, 0.14540250599384308, -0.002616599202156067, 0.17888499796390533, -0.0646841749548912, -0.3798912465572357, -0.015070842579007149, -0.13841252028942108, 0.08299614489078522, 0.13412681221961975, -0.21456941962242126, -0.06445277482271194, -0.2786412239074707, -0.5284284353256226, 0.08228377997875214, 0.3449885845184326, 0.33616727590560913, 0.29421883821487427, 0.22453776001930237, -0.04067093878984451, 0.7315264940261841, -0.03062024526298046, -0.330921471118927, -0.29925528168678284, 0.34573546051979065, -0.22139672935009003, -0.06860163807868958, 0.23696169257164001, -0.09080575406551361, 0.08241930603981018, 0.2516966462135315, -0.5148746967315674, -0.49520495533943176, -0.06862861663103104, 0.029477667063474655, -0.20487171411514282, -0.03710690140724182, 0.13338571786880493, 0.005991041660308838, -0.06296329200267792, -0.059442292898893356, -0.3281787633895874, -0.09781808406114578, 0.23684906959533691, 0.09395070374011993, 0.13225427269935608, 0.2417263388633728, -0.04818952828645706, 0.5023216009140015, -0.3002929985523224, 0.15722207725048065, 0.14536581933498383, 0.22082659602165222, 0.35509926080703735, -0.2288271188735962, -0.128667414188385, -0.2484915554523468, -0.0635373592376709, -0.6394150853157043, 0.31655633449554443, 0.1906857192516327, -0.2048766314983368, -0.09530380368232727, -0.21657642722129822, 0.12271038442850113, -0.2248540073633194, 0.45228737592697144, 0.17985530197620392, 0.18708425760269165, 0.07488995790481567, 0.08899291604757309, -0.3011834919452667, -0.1907237470149994, -0.06368716061115265, 0.10966935008764267, 0.25059306621551514, -0.12723641097545624, -0.0322677381336689, -0.04879277944564819, -0.6629847288131714, 0.2970021367073059, 0.03290411829948425, -0.3559451103210449, -0.02260824292898178, -0.09225872159004211, 0.15669701993465424, -0.04370355233550072, 0.6123077273368835, -0.24946309626102448, -0.04684850573539734, 0.06140432879328728, -0.20948082208633423, 0.10585420578718185, 0.10696978867053986, -0.04141349345445633, 0.10889966785907745, -0.2605792284011841, 0.23247572779655457, -0.03537559136748314, -0.2694304287433624, 0.06811241060495377, 0.4016905725002289, -0.37473171949386597, 0.05558132007718086, -0.2616032361984253, -0.4519452452659607, -0.2791502773761749, 0.027767397463321686, 0.07633595168590546, -0.04796382784843445, -0.07664909213781357, -0.0470961295068264, 0.07479336112737656, -0.17552098631858826, 0.07082259654998779, 0.1097225546836853, 0.531467854976654, 0.34682467579841614, 0.10141594707965851, 0.17099438607692719, 0.07728881388902664, 0.1812952309846878, 0.5112217664718628, -0.31829574704170227, 0.08110132813453674, 0.1411784440279007, -0.14577196538448334, 0.07493814080953598, 0.5205641984939575, -0.14234334230422974, -0.013347096741199493, -0.23823565244674683, 0.09774835407733917, -0.367680162191391, 0.16823342442512512, -0.2828274369239807, 0.09865626692771912, -0.011187892407178879, -0.7148750424385071, 0.4752885103225708, -0.016815925016999245, -0.27118241786956787, 0.13651365041732788, -0.11338739097118378, -0.5768022537231445, 0.500702440738678, 0.3116953670978546, 1.001471996307373, -0.2632240056991577, 0.3655267655849457, 0.14762768149375916, 0.2187672108411789, 0.13615728914737701, -0.3522643446922302, 0.25283560156822205, -0.23990313708782196, -0.5551373958587646, -0.11111832410097122, -0.22907130420207977, -0.12296030670404434, 0.138482004404068, -0.3338925540447235, 0.3431204557418823, -0.06438055634498596, -0.04515102878212929, -0.07369808852672577, 0.2739700376987457, -0.05913691222667694, -0.46433010697364807, -0.634585976600647, 0.14901380240917206, -0.10266891121864319, -0.014817062765359879, -0.1019539088010788, 0.12414171546697617, 0.06667329370975494, -0.08832956105470657, -0.07091734558343887, -0.11440698802471161, -0.5100642442703247, 0.14249032735824585, -0.3498205840587616, -0.444253146648407, -0.12107780575752258, 0.002011999487876892, 0.06330868601799011, 0.1591791957616806, -0.10619986057281494, 0.1952679455280304, -0.12507537007331848, 0.24686770141124725, -0.3537706732749939, -0.1649003028869629, 0.2606590688228607, 0.005032390356063843, 0.09525509923696518, 0.11331456899642944, -0.11397518962621689, -0.5635498762130737, -0.0026649683713912964, 0.03398590907454491, 0.05278164520859718, -0.08830012381076813, -0.17899617552757263, -0.013393297791481018, -0.22882434725761414, -0.07481715083122253, 0.13043248653411865, 0.1742904782295227, -0.11997461318969727, 0.22257313132286072, 0.16051936149597168, -0.2823364734649658, -0.043802592903375626, 0.0644398108124733, 0.4907646179199219, -0.11091415584087372, 0.43647029995918274, 0.13459360599517822, -0.028011437505483627, -0.2728205919265747, -0.1875157654285431, -0.05718177929520607, -0.07911792397499084, 0.4986957609653473, -0.046904850751161575, -0.04717971384525299, 0.07177483290433884, 0.26879820227622986, 0.20989464223384857, 0.06232164427638054, -0.40799185633659363, -0.22598187625408173, -0.28952187299728394, 0.10091600567102432, -0.011605646461248398, 0.21317574381828308, 0.14438965916633606, -0.2463236004114151, -0.048241809010505676, 0.10086340457201004, -0.37983593344688416, 0.11776884645223618, -0.1841452717781067, -0.0030398964881896973, 0.08656515181064606, -0.03231576830148697, 0.40711089968681335, -0.1312694400548935, 0.03468533605337143, -0.10837939381599426, -0.21908822655677795, -0.2330467402935028, -0.21973122656345367, 0.13238179683685303, -0.17515015602111816, 0.2051772177219391, -0.2381192296743393, -0.2093169093132019, 0.0741351842880249, -0.3226125240325928, 0.35402342677116394, -0.14318934082984924, -0.03967081010341644, -0.31141096353530884, -0.0773422122001648, 0.07402795553207397, -0.01918334886431694, 0.11674830317497253, -0.16924801468849182, 0.2673138380050659, 0.058850545436143875, 0.01857396773993969, -0.011008494533598423, -0.11844766139984131, 0.016273636370897293, 0.15111668407917023, -0.08117440342903137, -0.1267664134502411, 0.365387499332428, 0.0866406112909317, -0.03085406869649887, 0.14553292095661163, 0.06391890347003937, -0.00261823832988739, -0.028429420664906502, -0.0874151736497879, 0.10323701053857803, 0.19493412971496582, -0.015340343117713928, -0.2444610744714737, -0.23221731185913086, -0.3353000581264496, 0.2043916881084442, 0.5522074103355408, 0.22311052680015564, 0.39623844623565674, 0.14897626638412476, 0.14303413033485413, 0.46164634823799133, 0.009733319282531738, -0.1177489161491394, 0.023049529641866684, 0.11638528108596802, 0.21663370728492737, 0.19248801469802856, 0.1981837898492813, 0.23703765869140625, 0.3087206482887268, -0.24652385711669922, -0.008016714826226234, -0.01913527026772499, -0.0263119675219059, -0.0773024782538414, -0.5415142178535461, 0.09163878113031387, 0.2027919590473175, -0.16404032707214355, 0.3398098945617676, -0.1043207198381424, -0.11565760523080826, -0.2313126176595688, -0.022675951942801476, -0.22103352844715118, 0.25194257497787476, -0.2052823305130005, -0.11384434998035431, -0.023765351623296738, -0.02544131502509117, -0.13805794715881348, 0.27714207768440247, 0.045591771602630615, -0.3564942479133606, 0.03977104648947716, 0.04471202194690704, 0.18551582098007202, 0.21198298037052155, 0.17060315608978271, 0.26301971077919006, 0.0052254050970077515, -0.21243028342723846, 0.11543162912130356, -0.15538044273853302, 0.16907595098018646, -0.019037745893001556, -0.22976543009281158, 0.11867037415504456, 0.3068607747554779, -0.26671212911605835, -0.0471951961517334, 0.10878096520900726, -0.03505122289061546, -0.42302143573760986, -0.07917441427707672, -0.026172257959842682, 0.2590157985687256, 0.1034063845872879, 0.11928288638591766, -0.08107392489910126, 0.16654475033283234, 0.013579156249761581, 0.08458754420280457, -0.15952730178833008, -0.004383742809295654, 0.3106907308101654, -0.11077165603637695, -0.2941136360168457, -0.04080822318792343, -0.24506473541259766, -0.03851712867617607, 0.3194066286087036, -0.22343459725379944, 0.10006973147392273, 0.20461498200893402, 0.10499870032072067, 0.06404048204421997, 0.711821973323822, 0.15899983048439026, 0.07628782093524933, -0.4750405251979828, -0.021360330283641815, -0.4419044256210327, -0.0020647868514060974, -0.031168360263109207, -0.03052854910492897, -0.16540656983852386, 0.3960042893886566, 0.24052059650421143, 0.2552637755870819, -0.25731557607650757, -0.006806425284594297, -0.11211322993040085, -0.03850302845239639, -0.25306668877601624, -0.18215233087539673, 0.008678458631038666, 0.1265832632780075, -0.03992408886551857, -0.5482527017593384, -0.014571573585271835, 0.1609393209218979, 0.049611061811447144, -0.19704823195934296, 0.18327400088310242, -0.027197694405913353, 0.3204391896724701, 0.5041555166244507, -0.10905605554580688, 0.18635861575603485, -0.03189278393983841, -0.09492620825767517, -0.05504729226231575, -0.17870046198368073, -0.16920588910579681, -0.07301003485918045, 0.20445744693279266, 0.4093390703201294, -0.03564126044511795, -0.06850925087928772, -0.2884383797645569, 0.11084692180156708, 0.2608981132507324, 0.10092708468437195, 0.018971001729369164, 0.0953323021531105, -0.04781375080347061, 0.1805860549211502, 0.09386221319437027, 0.2747209072113037, -0.06331922858953476, -0.04518481343984604, -0.34455442428588867, -0.031056512147188187, 0.2752749025821686, -0.19567127525806427, -0.2834833264350891, 0.1274476945400238, 0.3155272305011749, 0.01629241183400154, -0.1920621693134308, -0.3868097960948944, 0.013281501829624176, 0.17631947994232178, -0.12570497393608093, -0.35351240634918213, 0.4556241035461426, 0.11668719351291656, 0.05754565820097923, -0.22959397733211517, 0.17114770412445068, 0.04496845230460167, -0.38508903980255127, -0.512490451335907, -0.3491411805152893 ]
https://github.com/huggingface/datasets/issues/2474
cache_dir parameter for load_from_disk ?
Indeed reading the data shouldn't increase the VM's disk. Not sure what google colab does under the hood for that to happen
**Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function?
22
cache_dir parameter for load_from_disk ? **Is your feature request related to a problem? Please describe.** When using Google Colab big datasets can be an issue, as they won't fit on the VM's disk. Therefore mounting google drive could be a possible solution. Unfortunatly when loading my own dataset by using the _load_from_disk_ function, the data gets cached to the VM's disk: ` from datasets import load_from_disk myPreprocessedData = load_from_disk("/content/gdrive/MyDrive/ASR_data/myPreprocessedData") ` I know that chaching on google drive could slow down learning. But at least it would run. **Describe the solution you'd like** Add cache_Dir parameter to the load_from_disk function. **Describe alternatives you've considered** It looks like you could write a custom loading script for the load_dataset function. But this seems to be much too complex for my use case. Is there perhaps a template here that uses the load_from_disk function? Indeed reading the data shouldn't increase the VM's disk. Not sure what google colab does under the hood for that to happen
[ -0.2947954833507538, -0.20461341738700867, -0.12458886206150055, 0.24072882533073425, 0.19853784143924713, 0.0009985417127609253, 0.20941917598247528, 0.08362574875354767, 0.3559870719909668, 0.48150819540023804, -0.1554526388645172, 0.24850885570049286, -0.34520360827445984, 0.2828161120414734, 0.24440644681453705, 0.08408606797456741, -0.06382521241903305, -0.10212504863739014, -0.05279652774333954, -0.15004634857177734, -0.1746012270450592, 0.162082701921463, 0.0336112454533577, -0.4488099217414856, -0.07578504830598831, -0.1513325572013855, -0.04644189774990082, 0.2001655399799347, 0.24470336735248566, -0.28129518032073975, 0.06417114287614822, 0.031772058457136154, 0.2542559802532196, 0.4735644459724426, -0.00010552163439569995, -0.12947708368301392, -0.020028546452522278, -0.2458789050579071, -0.4441104233264923, -0.037291333079338074, -0.09575843811035156, -0.16867701709270477, 0.14951351284980774, -0.09323857724666595, -0.5178108215332031, 0.07902325689792633, -0.03946229815483093, -0.15955349802970886, 0.19082531332969666, 0.13642986118793488, 0.24885709583759308, -0.2450762689113617, -0.3598356544971466, 0.05467938259243965, 0.0662650614976883, 0.014716126024723053, -0.1717963069677353, 0.6884994506835938, 0.2043832242488861, 0.15452997386455536, -0.17958477139472961, 0.46656885743141174, -0.046855341643095016, 0.1521950364112854, 0.45816466212272644, 0.39104095101356506, 0.14757709205150604, -0.20536066591739655, 0.07687969505786896, -0.19114574790000916, 0.5348825454711914, -0.12558510899543762, -0.16754913330078125, -0.26095616817474365, 0.16568125784397125, -0.33736103773117065, 0.3232172131538391, 0.16414795815944672, -0.2515547275543213, 0.42676258087158203, -0.18876709043979645, -0.40466707944869995, -0.1755983829498291, -0.012893520295619965, -0.010581664741039276, -0.05636674165725708, -0.21413391828536987, -0.11402713507413864, 0.22210851311683655, 0.19444780051708221, 0.40962815284729004, 0.055364955216646194, 0.13495363295078278, 0.2564840614795685, -0.02725321426987648, -0.2071179747581482, -0.07895398885011673, 0.24293464422225952, -0.032558318227529526, -0.021467018872499466, 0.4337690472602844, 0.018238142132759094, -0.08490263670682907, 0.1709047257900238, -0.1430242657661438, 0.28154638409614563, -0.2321082353591919, -0.009444418363273144, 0.36390066146850586, 0.13736124336719513, -0.24179145693778992, -0.07570470124483109, -0.021449536085128784, 0.09204456955194473, 0.25844284892082214, 0.1874014139175415, -0.03705494850873947, -0.17618919909000397, 0.2375374436378479, -0.1626899391412735, 0.05574037879705429, 0.13273218274116516, 0.31963178515434265, 0.3923744559288025, -0.12882104516029358, -0.11004798859357834, 0.09977990388870239, -0.30745917558670044, -0.17055168747901917, 0.04704883322119713, -0.09056579321622849, 0.061192307621240616, -0.17420248687267303, 0.40170830488204956, 0.32913893461227417, 0.16549475491046906, 0.2862095534801483, -0.318404883146286, 0.20376162230968475, 0.03362637013196945, 0.1248873621225357, -0.2953381836414337, 0.3032187223434448, 0.3845987915992737, 0.08165046572685242, -0.13502302765846252, -0.11555489897727966, -0.11061952263116837, -0.3583948612213135, 0.3294313848018646, -0.4407779574394226, -0.4950113594532013, 0.37731778621673584, 0.22423969209194183, -0.20430974662303925, 0.05019233003258705, -0.4798678457736969, 0.3666491210460663, -0.22258228063583374, -0.10909834504127502, -0.11607379466295242, 0.05065053701400757, -0.552259624004364, -0.3293841779232025, 0.13320478796958923, 0.24898755550384521, -0.2620547115802765, -0.05542184039950371, 0.04371330887079239, 0.13547280430793762, -0.06060049682855606, 0.33211490511894226, -0.1957053691148758, -0.02206926792860031, -0.18362517654895782, -0.28042250871658325, 0.10543946921825409, -0.2935192584991455, -0.6031988263130188, 0.18675853312015533, -0.11497907340526581, 0.01870446838438511, 0.04137810319662094, 0.2783224582672119, 0.155404195189476, -0.1983814537525177, 0.4627942442893982, 0.6393689513206482, -0.000545041635632515, 0.18351075053215027, -0.32060664892196655, -0.24082207679748535, -0.3541872501373291, 0.28778186440467834, 0.02150861918926239, 0.11967262625694275, 0.06595905125141144, -0.20545965433120728, 0.10278256237506866, -0.13979844748973846, 0.060370393097400665, 0.28758370876312256, 0.41077351570129395, -0.28254055976867676, 0.015041755512356758, 0.1753418743610382, -0.5386228561401367, 0.26813003420829773, -0.017554529011249542, -0.10965614020824432, 0.05118383839726448, -0.22344641387462616, 0.12112618237733841, -0.07061115652322769, 0.13119997084140778, 0.07172384113073349, 0.08091207593679428, 0.05415401607751846, 0.13192029297351837, -0.2969987094402313, 0.056282889097929, 0.35591697692871094, -0.07875831425189972, -0.09903985261917114, 0.34323740005493164, 0.21007394790649414, 0.12462542951107025, -0.08568400889635086, -0.02382345125079155, -0.13150134682655334, 0.1183648556470871, -0.12363453954458237, -0.1380409598350525, 0.21862348914146423, 0.3182612955570221, 0.3651828169822693, -0.11207219213247299, 0.19647663831710815, 0.25447556376457214, 0.060650791972875595, 0.45673608779907227, 0.0402255654335022, 0.046640705317258835, 0.07905208319425583, -0.2858816385269165, 0.31039947271347046, -0.137211412191391, 0.10919561982154846, 0.20122428238391876, -0.10874435305595398, 0.1503809690475464, -0.17567354440689087, 0.15006303787231445, -0.18597638607025146, 0.12197381258010864, 0.31751325726509094, 0.3086780905723572, 0.16337518393993378, -0.20318131148815155, 0.2309553027153015, 0.22239340841770172, 0.08005034923553467, 0.046606749296188354, 0.2053450047969818, -0.36446264386177063, -0.2673252522945404, 0.1972735971212387, 0.2737581729888916, 0.44478845596313477, 0.3685201108455658, 0.34326428174972534, 0.14145801961421967, 0.1480700671672821, -0.09801487624645233, 0.2551252841949463, -0.06809936463832855, 0.28472089767456055, 0.11469967663288116, 0.20746345818042755, -0.18079067766666412, -0.08506526052951813, 0.04550718888640404, 0.11019715666770935, 0.06806281208992004, -0.22062291204929352, 0.08796446025371552, 0.1208755373954773, 0.028416141867637634, -0.16711939871311188, -0.03093956783413887, 0.020743027329444885, 0.05055400729179382, 0.12001926451921463, 0.5694583654403687, -0.11720043420791626, -0.08936940133571625, 0.2838529646396637, 0.46936824917793274, -0.13822190463542938, -0.37563419342041016, 0.025594763457775116, 0.032682377845048904, -0.08782946318387985, 0.11106613278388977, 0.06938457489013672, -0.029708877205848694, 0.26077964901924133, 0.13832883536815643, 0.030777864158153534, -0.17392858862876892, -0.20277860760688782, 0.1722751259803772, -0.05329476296901703, 0.5861188769340515, -0.12460179626941681, -0.10885894298553467, -0.07432695478200912, 0.10327763855457306, -0.14985142648220062, -0.3892003893852234, 0.0036849230527877808, -0.4489942193031311, 0.11958014219999313, 0.24158334732055664, -0.300529420375824, -0.03294923156499863, -0.39202749729156494, -0.4765082895755768, 0.037233866751194, 0.357282817363739, 0.32480937242507935, 0.20596866309642792, 0.12301643192768097, -0.04845300316810608, 0.7896344065666199, -0.06695590168237686, -0.3142927587032318, -0.291839063167572, 0.3334435522556305, -0.33002346754074097, 0.0642811581492424, 0.16813796758651733, -0.12272951006889343, 0.03670930489897728, 0.29732000827789307, -0.4173498749732971, -0.6012533903121948, 0.015989813953638077, 0.02031591162085533, -0.24751073122024536, -0.19192612171173096, 0.14350245893001556, -0.02710168994963169, -0.12193432450294495, -0.009682662785053253, -0.39612099528312683, -0.07040213793516159, 0.42412418127059937, 0.1346844583749771, 0.04280467331409454, 0.04134443402290344, -0.051712460815906525, 0.49439573287963867, -0.42502474784851074, 0.13868354260921478, 0.12637042999267578, 0.2134532779455185, 0.19036298990249634, -0.16626840829849243, -0.08754510432481766, -0.014270903542637825, 0.03787849098443985, -0.6092909574508667, 0.31057247519493103, 0.1993045210838318, -0.3015577793121338, -0.15358030796051025, -0.47817105054855347, 0.07810961455106735, -0.19985724985599518, 0.40409377217292786, 0.21912376582622528, 0.23486807942390442, -0.00795036181807518, 0.06211276352405548, -0.29676496982574463, -0.09217777103185654, 0.01476382464170456, 0.10501277446746826, 0.20144012570381165, -0.07294729351997375, 0.18760281801223755, 0.009909596294164658, -0.6256818771362305, 0.34844326972961426, 0.1110420823097229, -0.5176834464073181, -0.06398110091686249, -0.08866259455680847, 0.1346350461244583, -0.09238733351230621, 0.39779001474380493, -0.26521825790405273, -0.03282278776168823, 0.03411455452442169, -0.3106330633163452, 0.07378654181957245, 0.017013803124427795, -0.029132377356290817, 0.1078794077038765, -0.17550353705883026, 0.25982820987701416, 0.07810091227293015, -0.17236800491809845, 0.18529537320137024, 0.23880507051944733, -0.352334201335907, -0.004913590382784605, -0.16065672039985657, -0.33518141508102417, -0.165261909365654, 0.09792819619178772, -0.011050654575228691, -0.09175536781549454, 0.046596698462963104, 0.05046964809298515, 0.04641777649521828, -0.11907558143138885, 0.09263904392719269, 0.1465316116809845, 0.42811986804008484, 0.3504354953765869, 0.046889353543519974, 0.17362277209758759, 0.19275285303592682, 0.23718875646591187, 0.34151530265808105, -0.22830352187156677, 0.13042770326137543, 0.04431603476405144, -0.12722380459308624, 0.18420234322547913, 0.487855464220047, -0.053372323513031006, -0.023159533739089966, -0.19348539412021637, 0.05045349895954132, -0.26508021354675293, 0.3137115240097046, -0.3810219466686249, 0.06760243326425552, -0.07599996775388718, -0.44821783900260925, 0.5460744500160217, 0.0200345441699028, -0.27572309970855713, -0.021754294633865356, -0.032550811767578125, -0.6783699989318848, 0.43785613775253296, 0.4553413689136505, 0.9008398056030273, -0.11196306347846985, 0.21546952426433563, 0.08109132200479507, 0.14169491827487946, 0.11254208534955978, -0.21480999886989594, 0.2796595096588135, -0.15955354273319244, -0.40957289934158325, -0.08386107534170151, -0.14955604076385498, -0.19858959317207336, 0.010804776102304459, -0.43095022439956665, 0.25197604298591614, -0.07401980459690094, -0.1373813897371292, -0.1570630967617035, 0.33626309037208557, -0.07315213233232498, -0.44275110960006714, -0.39694416522979736, 0.18623395264148712, -0.16747352480888367, 0.10533423721790314, -0.0523010790348053, 0.05246678739786148, 0.025886621326208115, -0.05530752241611481, -0.030644703656435013, -0.18151992559432983, -0.5493505597114563, 0.16288305819034576, -0.5084127187728882, -0.4618138074874878, -0.06531742215156555, -0.10329607129096985, 0.2319498062133789, 0.11132253706455231, -0.15061497688293457, 0.27594542503356934, -0.13748666644096375, 0.1880226880311966, -0.3067370057106018, -0.24307090044021606, 0.27872204780578613, -0.047511808574199677, 0.06891538947820663, -0.029053859412670135, -0.04591966047883034, -0.5067521333694458, 0.038084983825683594, -0.006237484514713287, 0.011394944041967392, -0.042777031660079956, -0.17381338775157928, 0.01095154881477356, -0.24374867975711823, -0.03750484064221382, 0.1798003762960434, 0.07676692306995392, -0.035706810653209686, 0.17598849534988403, 0.3046209514141083, -0.3061668872833252, -0.11281701922416687, 0.06762431561946869, 0.4273444712162018, -0.11070501804351807, 0.3846515119075775, -0.10646504908800125, -0.055689748376607895, -0.26593223214149475, -0.2632015645503998, -0.1373113989830017, 0.15853634476661682, 0.45498529076576233, 0.03887911140918732, -0.04199060797691345, 0.043573714792728424, 0.15753601491451263, 0.22134631872177124, 0.2007954716682434, -0.40927577018737793, -0.09016689658164978, -0.41826722025871277, 0.22307883203029633, -0.14070802927017212, 0.21513837575912476, 0.02538640797138214, -0.08743877708911896, -0.01457951869815588, 0.08593512326478958, -0.4361754059791565, 0.1979999840259552, -0.08155839890241623, -0.02963951602578163, 0.19260594248771667, -0.07594210654497147, 0.38381800055503845, -0.019842766225337982, 0.09854938089847565, -0.15137764811515808, -0.1562868356704712, -0.24190574884414673, -0.25622498989105225, 0.09367043524980545, -0.14675593376159668, 0.24336011707782745, -0.22572088241577148, -0.19529107213020325, 0.06140047311782837, -0.26263341307640076, 0.29936400055885315, -0.019647154957056046, 0.024564262479543686, -0.1629641354084015, -0.1659303903579712, 0.10875716805458069, -0.06863435357809067, 0.24350480735301971, -0.04969826340675354, 0.2810964584350586, 0.04658409208059311, 0.08473851531744003, -0.08679094910621643, -0.03442840650677681, 0.17469452321529388, 0.0580047070980072, -0.0447077751159668, 0.003273066133260727, 0.189741849899292, 0.2614062428474426, 0.016455207020044327, 0.06456480175256729, -0.05562598630785942, -0.12130427360534668, 0.01169930212199688, -0.06099938601255417, 0.11384011805057526, 0.2637289762496948, 0.013418413698673248, -0.031248677521944046, -0.14257454872131348, -0.42442992329597473, 0.24724650382995605, 0.5229252576828003, 0.23706787824630737, 0.525407075881958, 0.11756286025047302, 0.14249533414840698, 0.47046416997909546, 0.16719722747802734, -0.19483321905136108, -0.13619036972522736, 0.0845346748828888, 0.21500611305236816, 0.1856609731912613, 0.17657288908958435, 0.3422063887119293, 0.15576037764549255, -0.34381303191185, 0.04089726507663727, -0.06352335214614868, -0.06903786957263947, -0.0696566179394722, -0.39904382824897766, 0.09883316606283188, 0.15971888601779938, -0.13714127242565155, 0.35983791947364807, -0.07410696148872375, -0.09133066982030869, -0.3188644051551819, -0.11974075436592102, -0.21864812076091766, 0.12069371342658997, -0.23106124997138977, -0.047608666121959686, 0.07913132011890411, 0.009971961379051208, -0.15833762288093567, 0.34164515137672424, 0.06536032259464264, -0.29945218563079834, 0.14203161001205444, 0.07930110394954681, 0.10108476877212524, 0.31245124340057373, 0.022645501419901848, 0.321198433637619, 0.03400634974241257, -0.17778822779655457, 0.04349469020962715, -0.3089444637298584, 0.08289404958486557, -0.0309937484562397, -0.1719607412815094, 0.0373988002538681, 0.23101851344108582, -0.28697311878204346, -0.1562148481607437, 0.08837056159973145, 0.008479824289679527, -0.32104936242103577, -0.20127810537815094, 0.13154253363609314, 0.17851214110851288, 0.11314882338047028, 0.1841854304075241, -0.14651121199131012, 0.2762310206890106, 0.005030505359172821, 0.02240968868136406, -0.13165198266506195, -0.1250811517238617, 0.41373106837272644, -0.1089567095041275, -0.30915945768356323, -0.09268467873334885, -0.12547814846038818, -0.07501029223203659, 0.14033812284469604, -0.2083003968000412, 0.030783306807279587, 0.3496784269809723, 0.11496192216873169, 0.04278780519962311, 0.6843212246894836, 0.03504867106676102, 0.05899331346154213, -0.4648113548755646, 0.027810528874397278, -0.33334481716156006, -0.0074049681425094604, 0.09709414839744568, -0.000005148351192474365, -0.3546728193759918, 0.33030909299850464, 0.14767423272132874, 0.16395658254623413, -0.19179745018482208, 0.006231332663446665, 0.04750896245241165, -0.1593497097492218, -0.2527306079864502, -0.1447194665670395, -0.013254068791866302, 0.02987533062696457, 0.1062246561050415, -0.4717816114425659, -0.06473898887634277, 0.07172788679599762, 0.07810921221971512, -0.12201175093650818, 0.035495318472385406, 0.013436518609523773, 0.23442912101745605, 0.6783958077430725, -0.20293878018856049, 0.15353326499462128, -0.07739438861608505, -0.04723971709609032, -0.10479173064231873, -0.20000816881656647, -0.17647501826286316, -0.1065998449921608, 0.23503601551055908, 0.4294150471687317, -0.07495026290416718, -0.002527255564928055, -0.2665862739086151, 0.24772696197032928, 0.23448596894741058, 0.02888888493180275, 0.1745549738407135, 0.008323505520820618, -0.05267728865146637, 0.110417440533638, 0.06871946156024933, 0.2957521378993988, -0.09550376236438751, -0.1706162542104721, -0.3986954092979431, 0.02797934226691723, 0.3589598536491394, -0.07618508487939835, -0.1175173819065094, -0.06443831324577332, 0.39504507184028625, 0.07125896215438843, -0.1321641355752945, -0.3863276541233063, 0.000905349850654602, 0.22154231369495392, -0.0425214022397995, -0.3301815986633301, 0.507420539855957, 0.09827569127082825, -0.004661981016397476, -0.23304735124111176, 0.13178059458732605, -0.09354911744594574, -0.2975117564201355, -0.5842610001564026, -0.2332976907491684 ]
https://github.com/huggingface/datasets/issues/2472
Fix automatic generation of Zenodo DOI
I have received a reply from Zenodo support: > We are currently investigating and fixing this issue related to GitHub releases. As soon as we have solved it we will reach back to you.
After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right
34
Fix automatic generation of Zenodo DOI After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right I have received a reply from Zenodo support: > We are currently investigating and fixing this issue related to GitHub releases. As soon as we have solved it we will reach back to you.
[ -0.0967249721288681, 0.37050047516822815, -0.03761068359017372, 0.08053334057331085, 0.1489456444978714, -0.10635115206241608, 0.38638579845428467, 0.4031185805797577, -0.06112312898039818, 0.2544849216938019, -0.03677375614643097, 0.14695456624031067, 0.2090730518102646, -0.08258233219385147, -0.10575611889362335, 0.006159953773021698, -0.05640251189470291, 0.3477696180343628, -0.058813080191612244, -0.3109581470489502, -0.20200671255588531, 0.061162203550338745, -0.039987366646528244, 0.10835534334182739, 0.14294174313545227, -0.01787164993584156, -0.08858863264322281, 0.04019599035382271, -0.6289499402046204, -0.2941247820854187, 0.23042015731334686, 0.3536778390407562, 0.02415730431675911, 0.09775817394256592, -0.00011493671627249569, -0.19378313422203064, 0.43480783700942993, -0.03764810040593147, 0.17915178835391998, -0.3938971757888794, -0.4930339455604553, -0.3317323923110962, -0.13789786398410797, -0.2664654552936554, 0.17618051171302795, -0.32230144739151, 0.1303073763847351, 0.1256045699119568, 0.058430783450603485, 0.39485982060432434, 0.19079436361789703, -0.08376839011907578, 0.47140389680862427, -0.24406947195529938, 0.15688906610012054, 0.08919088542461395, -0.06369283050298691, 0.06806470453739166, -0.10460042953491211, 0.2829139530658722, 0.030351854860782623, 0.2908121645450592, 0.04949192702770233, 0.17393216490745544, 0.08658798038959503, 0.11753199994564056, 0.29916438460350037, -0.24755924940109253, 0.1543983519077301, 0.08065915107727051, 0.7945268154144287, -0.12338658422231674, -0.16363069415092468, 0.0783255472779274, 0.2249077558517456, -0.22180786728858948, 0.0811198502779007, 0.11009298264980316, 0.1318533569574356, 0.13094748556613922, 0.12294697761535645, -0.26563194394111633, -0.2755657434463501, 0.06500910967588425, 0.12931135296821594, -0.10518035292625427, -0.09307016432285309, 0.027528803795576096, -0.0683571994304657, -0.11677674949169159, 0.2643764019012451, -0.05980583280324936, -0.25641342997550964, 0.23115423321723938, 0.24735063314437866, -0.08098945021629333, -0.050569161772727966, 0.034148164093494415, 0.3572537302970886, 0.09733044356107712, 0.21506071090698242, -0.02965206652879715, -0.0738929733633995, -0.10371964424848557, 0.11225259304046631, 0.0419798344373703, 0.3595067262649536, -0.05304151400923729, 0.19947022199630737, 0.08720874786376953, -0.09229382127523422, 0.07371271401643753, 0.019225280731916428, -0.09754374623298645, 0.5840198397636414, -0.16857963800430298, 0.37914156913757324, -0.46984949707984924, -0.03158692643046379, 0.12133491039276123, -0.0889853909611702, -0.13561241328716278, -0.4675288498401642, 0.01893182098865509, -0.03879815712571144, 0.2661344110965729, -0.11960618197917938, 0.06387665122747421, -0.21467648446559906, -0.11195620149374008, -0.10423385351896286, -0.4499019682407379, 0.08595559000968933, 0.20724071562290192, -0.02720048651099205, -0.3636472821235657, 0.2206505537033081, 0.2520158886909485, -0.20413093268871307, -0.5929429531097412, 0.05200652778148651, 0.2018795758485794, 0.19808416068553925, 0.239833265542984, 0.07291367650032043, 0.22776056826114655, -0.0713038444519043, -0.14306190609931946, -0.0034677088260650635, 0.3119444251060486, -0.19701120257377625, -0.415811687707901, -0.554515540599823, 0.1263846606016159, -0.015438100323081017, -0.030274666845798492, 0.33789265155792236, 0.17212381958961487, 0.21211813390254974, -0.1259368509054184, -0.12397300451993942, -0.09485584497451782, 0.24657323956489563, 0.10584863275289536, 0.12779781222343445, 0.27600401639938354, 0.18016791343688965, -0.05999382585287094, -0.45408332347869873, 0.07300430536270142, 0.3593139946460724, -0.028415411710739136, -0.005980951711535454, 0.3127599358558655, -0.09908773750066757, -0.39466172456741333, 0.2607995569705963, -0.5165682435035706, -0.3449455797672272, -0.06869495660066605, -0.0866527184844017, 0.010609442368149757, -0.07300116866827011, -0.17844490706920624, 0.31461936235427856, 0.264207661151886, -0.30671337246894836, -0.2928423285484314, -0.06820249557495117, -0.030484063550829887, -0.2615102231502533, -0.22767363488674164, -0.3169073462486267, -0.1217571496963501, 0.6132690906524658, 0.4346250295639038, 0.1965693235397339, 0.21216027438640594, 0.22739553451538086, 0.18601730465888977, -0.05582070350646973, 0.10578172653913498, 0.5157320499420166, -0.24295015633106232, 0.24261876940727234, -0.01864524558186531, -0.044500932097435, 0.10583711415529251, 0.3649103045463562, 0.12845364212989807, -0.14235012233257294, -0.034027572721242905, -0.3487672209739685, -0.12936709821224213, -0.19108279049396515, 0.023655224591493607, 0.10805080831050873, 0.10562512278556824, -0.08528565615415573, 0.15991435945034027, 0.0961175262928009, -0.06192970275878906, -0.16015830636024475, 0.17930945754051208, -0.06704899668693542, 0.1715124249458313, 0.037525955587625504, -0.07855837792158127, -0.006108071655035019, 0.06782909482717514, 0.08269062638282776, 0.186873197555542, -0.2120247185230255, 0.20704147219657898, 0.006233821157366037, 0.06657152622938156, 0.17531131207942963, 0.31925147771835327, 0.17917367815971375, -0.23571377992630005, -0.08516836911439896, 0.11617669463157654, -0.22216390073299408, 0.17856407165527344, 0.12051019817590714, 0.21131771802902222, -0.27666425704956055, -0.2890142798423767, -0.3767162561416626, 0.19570446014404297, 0.5364701151847839, 0.04585947468876839, -0.30701667070388794, -0.3863202631473541, -0.14156578481197357, -0.029330536723136902, 0.1237044483423233, 0.14864493906497955, -0.30023467540740967, 0.2740972340106964, 0.5304566025733948, -0.046327944844961166, 0.01840689405798912, -0.1360013484954834, 0.1112135648727417, -0.07694587111473083, 0.10970978438854218, 0.35044434666633606, 0.13929806649684906, 0.1322072595357895, -0.12049040198326111, 0.13112670183181763, -0.239872008562088, -0.1490614265203476, 0.14200274646282196, 0.01999387890100479, 0.5988180041313171, 0.25317999720573425, 0.03805682063102722, -0.16254213452339172, -0.4330267608165741, 0.2709621787071228, 0.013344183564186096, 0.4834901988506317, -0.14306117594242096, -0.5351660847663879, -0.023486925289034843, 0.20574688911437988, -0.3697093427181244, -0.35036054253578186, -0.4329444169998169, -0.12391465157270432, 0.06633612513542175, 0.20660507678985596, 0.12481321394443512, 0.17800602316856384, 0.05700844153761864, 0.06153897941112518, -0.004626771435141563, 0.23750907182693481, -0.11409308016300201, 0.07026977837085724, 0.06468743830919266, -0.02352939359843731, -0.17538189888000488, -0.10838252305984497, 0.27191606163978577, -0.5216569900512695, 0.11993111670017242, -0.5896306037902832, -0.07330413907766342, 0.19764044880867004, 0.18136075139045715, 0.1604098081588745, -0.22602888941764832, 0.11834579706192017, 0.11154460906982422, -0.04421824961900711, 0.03123164176940918, -0.27213171124458313, -0.15848350524902344, 0.07091276347637177, -0.4817189574241638, 0.22755788266658783, -0.035813745111227036, -0.4244445860385895, -0.06551435589790344, -0.05500458925962448, 0.029330581426620483, 0.12481310963630676, 0.3158110976219177, 0.3227919340133667, 0.08528421819210052, -0.16495533287525177, -0.1046719029545784, -0.2954024076461792, -0.10219455510377884, -0.6679028272628784, 0.24700050055980682, -0.3297750949859619, -0.3566853106021881, 0.14685237407684326, 0.11165720224380493, 0.38248303532600403, -0.05930931866168976, -0.22168458998203278, 0.27150484919548035, 0.07123126834630966, 0.5275430083274841, 0.11161001771688461, -0.22549952566623688, 0.5041927099227905, 0.11810677498579025, -0.013340705074369907, -0.26285839080810547, 0.2124115526676178, 0.342610627412796, 0.011557957157492638, 0.2765507400035858, -0.0946907326579094, 0.014031829312443733, -0.16519826650619507, 0.8457217812538147, 0.1296902596950531, -0.016075361520051956, -0.0834941416978836, 0.19618543982505798, 0.4897724688053131, 0.00047225505113601685, -0.15147684514522552, 0.035365030169487, -0.007104992866516113, 0.04408989101648331, 0.4767301678657532, 0.05009543523192406, -0.21616587042808533, -0.02826707251369953, 0.09311297535896301, -0.5703099370002747, -0.22827862203121185, -0.3788036108016968, -0.40627551078796387, 0.2478971779346466, 0.38444983959198, 0.24992606043815613, -0.2203361839056015, -0.20926693081855774, -0.021101344376802444, 0.04144636541604996, 0.28172528743743896, 0.07328753173351288, -0.10792499780654907, 0.3157136142253876, -0.4676319360733032, 0.07441079616546631, 0.10375186800956726, 0.2253788709640503, -0.019395116716623306, 0.3193947970867157, 0.11534421890974045, -0.028681810945272446, 0.07527069747447968, -0.2320328801870346, 0.20207412540912628, -0.1445944607257843, 0.15431736409664154, -0.17369480431079865, -0.10938580334186554, -0.09805307537317276, 0.12749457359313965, 0.2200852334499359, 0.46407821774482727, -0.05526147037744522, -0.055642981082201004, 0.2325369268655777, -0.203892320394516, -0.14245206117630005, -0.31974825263023376, -0.12695753574371338, -0.1669623851776123, 0.07472237199544907, 0.05268098786473274, -0.1765681356191635, 0.10465046763420105, -0.745045006275177, -0.4398397207260132, 0.2958351671695709, 0.3356739282608032, -0.19738970696926117, -0.04097656533122063, 0.14457190036773682, 0.010808972641825676, 0.3822500705718994, 0.6417278051376343, -0.12327122688293457, 0.5436769723892212, 0.04768067225813866, 0.027615800499916077, -0.5039840936660767, -0.1938745379447937, -0.3857547640800476, -0.3228614330291748, -0.04630178213119507, 0.19023971259593964, -0.08143769949674606, 0.03213871642947197, -0.2670421600341797, 0.04850863665342331, -0.22865808010101318, 0.4517759382724762, 0.09356638044118881, -0.3955596685409546, -0.24052096903324127, 0.078596331179142, 0.08046968281269073, -0.12594301998615265, 0.7364737391471863, 0.21694283187389374, -0.1594405174255371, -0.11230991035699844, 0.3402054011821747, 0.5876345038414001, -0.3444023132324219, -0.2561018168926239, -0.10410214215517044, -0.5278943777084351, 0.3125471770763397, 0.24654485285282135, -0.0010473988950252533, -0.6754639744758606, -0.4289257824420929, 0.01016228087246418, 0.07463803887367249, 0.4377729296684265, 0.09880828112363815, -0.34885939955711365, -0.1622665375471115, -0.09923828393220901, 0.28017979860305786, 0.29821932315826416, -0.08015446364879608, -0.2423158884048462, -0.1729034185409546, -0.0664299800992012, 0.05987643450498581, -0.3673053979873657, 0.005350135266780853, -0.20666614174842834, -0.01920522190630436, 0.061451975256204605, 0.037159211933612823, -0.2663782835006714, 0.1245192363858223, 0.1992771476507187, 0.05859203264117241, -0.08705469965934753, -0.060289233922958374, -0.6240656971931458, 0.4838108420372009, 0.30437082052230835, 0.07511430978775024, -0.3853134214878082, 0.3092936873435974, 0.15349918603897095, -0.06555566191673279, 0.024493183940649033, 0.12996149063110352, 0.1941203773021698, -0.042627934366464615, -0.440354585647583, -0.2009083330631256, -0.13214105367660522, -0.21048881113529205, -0.48929786682128906, -0.3531467914581299, -0.20412670075893402, 0.23660172522068024, 0.05719147250056267, 0.02568867802619934, 0.16117921471595764, -0.3184298574924469, 0.0937967449426651, 0.1432301253080368, -0.017217427492141724, 0.17368601262569427, -0.0976148396730423, -0.2676517367362976, 0.015088665299117565, 0.33937641978263855, 0.26909080147743225, 0.5175563097000122, -0.026234596967697144, -0.34360963106155396, -0.005999984219670296, -0.09780453890562057, 0.3593732416629791, -0.05482622608542442, -0.2926120460033417, -0.0020859213545918465, -0.39650022983551025, 0.22559009492397308, 0.0006400403217412531, 0.25469887256622314, 0.09839972853660583, -0.32409921288490295, -0.2721591591835022, -0.22265097498893738, -0.11509372293949127, 0.06330420076847076, -0.08220590651035309, 0.0008347220718860626, 0.24602624773979187, -0.0737505853176117, 0.05656566470861435, 0.016090191900730133, -0.2135612964630127, -0.06099987030029297, 0.040480419993400574, 0.02213210240006447, -0.026682883501052856, -0.048800528049468994, -0.04985639452934265, -0.25073230266571045, -0.04870884120464325, 0.06452514231204987, -0.16137482225894928, -0.09960545599460602, -0.18279080092906952, 0.16421136260032654, 0.20261847972869873, 0.19779878854751587, 0.24970164895057678, -0.21018758416175842, -0.40683141350746155, -0.07080969959497452, -0.10226629674434662, 0.4876910448074341, 0.014707222580909729, 0.16850951313972473, 0.13239768147468567, 0.3828541040420532, -0.13284340500831604, 0.002858433872461319, 0.028110966086387634, 0.23052246868610382, -0.11951937526464462, 0.38543713092803955, -0.0718185305595398, -0.07422319054603577, -0.24060004949569702, 0.027848869562149048, -0.12327149510383606, 0.29261288046836853, 0.4203764796257019, -0.4343610405921936, 0.2582091689109802, 0.24440042674541473, 0.48163285851478577, -0.18244695663452148, 0.047199148684740067, -0.20013660192489624, -0.007895903661847115, 0.20935343205928802, -0.28234532475471497, -0.14390349388122559, -0.006837582215666771, 0.08559466153383255, -0.1265210062265396, 0.17088446021080017, 0.15353867411613464, -0.5379570722579956, -0.09032082557678223, 0.10770098119974136, 0.31460079550743103, -0.22427670657634735, 0.1277175396680832, 0.5658207535743713, -0.06559210270643234, 0.07219979912042618, 0.3955351412296295, -0.08891154825687408, -0.08751208335161209, 0.20431607961654663, 0.2443239986896515, 0.2287299782037735, 0.5702480673789978, 0.3067263960838318, 0.10869359970092773, -0.05214976891875267, 0.02942758984863758, -0.14810067415237427, 0.040194861590862274, 0.0470425970852375, 0.301908016204834, 0.006473615765571594, 0.026269666850566864, -0.3086570203304291, -0.28236281871795654, -0.06823551654815674, -0.01626812294125557, 0.11080947518348694, -0.1570950746536255, -0.3861686885356903, 0.2526269257068634, 0.07339794933795929, 0.0037790611386299133, 0.18018822371959686, 0.16878139972686768, 0.008443735539913177, -0.37325048446655273, -0.8148136138916016, 0.029749637469649315, 0.03822660073637962, 0.1774604469537735, -0.22936736047267914, 0.24443307518959045, -0.3747791051864624, -0.16986624896526337, -0.017433810979127884, 0.6133745908737183, -0.0014460161328315735, 0.112896628677845, 0.41094887256622314, -0.0525888130068779, 0.19220706820487976, -0.12827475368976593, 0.14525410532951355, 0.2382657825946808, 0.36000514030456543, 0.1735491156578064, 0.02894929051399231, 0.11825284361839294, -0.054994963109493256, 0.07286162674427032, 0.6321060061454773, 0.29500943422317505, 0.1254061907529831, -0.10758700221776962, 0.08662672340869904, -0.17644739151000977, 0.09655016660690308, 0.16448625922203064, -0.15498770773410797, -0.09914716333150864, 0.10075420141220093, 0.08492282032966614, -0.05107854679226875, -0.2872259318828583, 0.05512081831693649, -0.0023819226771593094, -0.0983055830001831, 0.16302582621574402, 0.0832354724407196, 0.2478388398885727, -0.32131505012512207, -0.46894705295562744, 0.45137739181518555, 0.07497265189886093, 0.31878456473350525, 0.1753208190202713, 0.0775497779250145, -0.09070225805044174, -0.0964830219745636, 0.39483171701431274, -0.31542840600013733, 0.16776373982429504, 0.30293798446655273, -0.39185088872909546, 0.0016647987067699432, -0.1767328530550003, -0.1617289036512375, -0.2946324944496155, -0.33363017439842224, 0.3862130045890808, 0.0862189307808876, 0.05325256288051605, 0.09137660264968872, -0.056134507060050964, 0.11387819051742554, 0.08225556463003159, 0.324006050825119, 0.15812161564826965, -0.028134703636169434, -0.1749517023563385, -0.19143056869506836, -0.2141382098197937, -0.09544786065816879, -0.3301592469215393, 0.42649218440055847, 0.05263067036867142, 0.35115671157836914, -0.02397911064326763, -0.024643559008836746, -0.08557156473398209, 0.2809414863586426, 0.0544387549161911, 0.09923228621482849, -0.6209912896156311, -0.043906547129154205, 0.043320268392562866, -0.5385667681694031, -0.08349937200546265, 0.17613446712493896, 0.04248283803462982, 0.29470279812812805, -0.002792060375213623, 0.07493538409471512, 0.26065322756767273, -0.29718017578125, -0.1560090333223343, -0.14087261259555817, 0.2689493000507355, 0.3504337668418884, -0.4279552400112152, -0.2316555678844452, 0.0006444007158279419, 0.3700454831123352, -0.15681901574134827, -0.0027832631021738052, -0.12210802733898163, 0.04734916239976883, 0.22143234312534332, -0.032807763665914536, 0.19129115343093872, 0.05176824331283569, -0.14502140879631042, 0.18498879671096802, -0.04918927699327469 ]
https://github.com/huggingface/datasets/issues/2472
Fix automatic generation of Zenodo DOI
Other repo maintainers had the same problem with Zenodo. There is an open issue on their GitHub repo: zenodo/zenodo#2181
After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right
19
Fix automatic generation of Zenodo DOI After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right Other repo maintainers had the same problem with Zenodo. There is an open issue on their GitHub repo: zenodo/zenodo#2181
[ -0.09328226745128632, 0.3942430019378662, -0.03474103659391403, 0.09913051128387451, 0.14987266063690186, -0.10668754577636719, 0.3806303143501282, 0.3882218897342682, -0.07586714625358582, 0.25355494022369385, -0.06456393748521805, 0.20564252138137817, 0.20682477951049805, -0.09449059516191483, -0.12038624286651611, 0.01683039590716362, -0.0314423069357872, 0.3863617777824402, -0.057351768016815186, -0.324851393699646, -0.21338683366775513, 0.07664889842271805, -0.038345545530319214, 0.08022655546665192, 0.12360549718141556, 0.008741360157728195, -0.10016980767250061, 0.00405651330947876, -0.6152872443199158, -0.2550571858882904, 0.23303331434726715, 0.3883577585220337, 0.009762002155184746, 0.1403065025806427, -0.00011564423039089888, -0.22525028884410858, 0.4270014762878418, -0.01632954552769661, 0.17924681305885315, -0.37212079763412476, -0.5172882676124573, -0.33860501646995544, -0.11043914407491684, -0.2647014856338501, 0.2235628068447113, -0.3678028881549835, 0.11569482833147049, 0.11400921642780304, 0.02154887467622757, 0.3697963356971741, 0.18755441904067993, -0.1051701232790947, 0.48956799507141113, -0.21763159334659576, 0.13730759918689728, 0.10013578832149506, -0.08288105577230453, 0.05873587727546692, -0.11785736680030823, 0.3063143491744995, 0.01549094170331955, 0.28525233268737793, 0.023392902687191963, 0.1728070229291916, 0.09308387339115143, 0.1147533729672432, 0.3039468228816986, -0.1714942753314972, 0.12802353501319885, 0.12308584898710251, 0.8328611850738525, -0.1432764232158661, -0.21203254163265228, 0.088018499314785, 0.19830642640590668, -0.23663929104804993, 0.07406674325466156, 0.07899396121501923, 0.12801901996135712, 0.14638224244117737, 0.12792499363422394, -0.25791656970977783, -0.25355657935142517, 0.07788509130477905, 0.07889197766780853, -0.09962648153305054, -0.08478030562400818, 0.009449176490306854, -0.04608393833041191, -0.09164398908615112, 0.36700573563575745, -0.08728313446044922, -0.24546566605567932, 0.19763320684432983, 0.24154312908649445, -0.06734060496091843, -0.03526914864778519, 0.10078684240579605, 0.3323938250541687, 0.13222092390060425, 0.26739922165870667, -0.0176754891872406, -0.07961773127317429, -0.07322151213884354, 0.1397775113582611, -0.008630270138382912, 0.36007869243621826, -0.10420115292072296, 0.18550267815589905, 0.051874276250600815, -0.09834767132997513, 0.06741692870855331, 0.05446423962712288, -0.10709937661886215, 0.6239062547683716, -0.15881651639938354, 0.34527504444122314, -0.4820895195007324, -0.060106851160526276, 0.15097878873348236, -0.09230121970176697, -0.1525585651397705, -0.4643562138080597, -0.016989439725875854, -0.003042879281565547, 0.3226543366909027, -0.07218129187822342, 0.05459210276603699, -0.2229955792427063, -0.16848886013031006, -0.10574851930141449, -0.44631674885749817, 0.05224305018782616, 0.20658418536186218, -0.001170974224805832, -0.35217681527137756, 0.19779126346111298, 0.2260468453168869, -0.1673879772424698, -0.594703733921051, 0.048762716352939606, 0.164794921875, 0.16552859544754028, 0.2422039955854416, 0.03770625963807106, 0.23589591681957245, -0.05610876902937889, -0.05926104635000229, -0.025380030274391174, 0.2959367334842682, -0.15975156426429749, -0.38531914353370667, -0.5159878134727478, 0.12294919043779373, -0.01733674667775631, -0.07144936174154282, 0.3614369332790375, 0.19267454743385315, 0.22501613199710846, -0.1650744378566742, -0.15695929527282715, -0.09019652754068375, 0.2544916272163391, 0.12492898106575012, 0.11724569648504257, 0.3184428811073303, 0.0776747316122055, 0.006855584681034088, -0.49724316596984863, 0.07837723195552826, 0.32698944211006165, -0.06795597076416016, 0.004643596708774567, 0.28496605157852173, -0.06459642946720123, -0.3945789933204651, 0.23509497940540314, -0.4871267080307007, -0.3446815311908722, -0.037505898624658585, -0.06004883348941803, -0.008150046691298485, -0.07005663961172104, -0.17462386190891266, 0.24662978947162628, 0.23779243230819702, -0.3222360908985138, -0.2767675518989563, -0.100481778383255, -0.01930375024676323, -0.2484046071767807, -0.20579694211483002, -0.25969839096069336, -0.11546184122562408, 0.6102950572967529, 0.40470677614212036, 0.16961388289928436, 0.25422632694244385, 0.19980844855308533, 0.22005443274974823, -0.04339827597141266, 0.09640370309352875, 0.4835834205150604, -0.20718879997730255, 0.23671814799308777, -0.05058592930436134, -0.019699938595294952, 0.07894572615623474, 0.3896888494491577, 0.09552226215600967, -0.09524255990982056, -0.04325639083981514, -0.34745317697525024, -0.11095497757196426, -0.15899422764778137, 0.058735206723213196, 0.10617999732494354, 0.07871601730585098, -0.11466850340366364, 0.16320912539958954, 0.10622502863407135, -0.11583533138036728, -0.16014696657657623, 0.18732860684394836, -0.03615223988890648, 0.14228199422359467, 0.05587809905409813, -0.08352436870336533, 0.0014838017523288727, 0.07628659158945084, 0.08730769157409668, 0.19700480997562408, -0.2366698682308197, 0.2509307265281677, 0.018820440396666527, 0.11508320271968842, 0.10173699259757996, 0.3152856230735779, 0.1941678524017334, -0.22410792112350464, -0.10022103041410446, 0.12395136058330536, -0.21051427721977234, 0.16700205206871033, 0.06044276803731918, 0.18790759146213531, -0.29313763976097107, -0.27645838260650635, -0.3872970938682556, 0.20403248071670532, 0.5019198656082153, 0.03818130865693092, -0.3221302330493927, -0.4127155542373657, -0.11848287284374237, -0.06475146114826202, 0.11552515625953674, 0.19123674929141998, -0.2757064402103424, 0.2671710252761841, 0.4886537492275238, -0.03090514801442623, 0.003014199435710907, -0.19263479113578796, 0.0880843847990036, -0.08983205258846283, 0.12282266467809677, 0.3807588815689087, 0.16728278994560242, 0.1491745114326477, -0.10247336328029633, 0.09241078048944473, -0.28907158970832825, -0.1720472127199173, 0.11765077710151672, 0.04281945526599884, 0.6119814515113831, 0.29805558919906616, 0.021949701011180878, -0.18127228319644928, -0.47360923886299133, 0.279923677444458, 0.04399879276752472, 0.48170235753059387, -0.13015730679035187, -0.5318509936332703, -0.0488685742020607, 0.22936344146728516, -0.3871017396450043, -0.37760472297668457, -0.3723500072956085, -0.1700172871351242, 0.039269957691431046, 0.21295315027236938, 0.10650065541267395, 0.13377714157104492, -0.007893979549407959, 0.0321984589099884, -0.010893143713474274, 0.2390235960483551, -0.14236697554588318, 0.07843831926584244, 0.07350077480077744, -0.031824737787246704, -0.1976609230041504, -0.083522267639637, 0.27927228808403015, -0.5059187412261963, 0.1397279053926468, -0.5817270278930664, -0.06405194848775864, 0.1704762578010559, 0.2002038210630417, 0.1675926297903061, -0.20416215062141418, 0.10529588907957077, 0.11080515384674072, -0.0587833933532238, 0.05007857084274292, -0.26956602931022644, -0.134362131357193, 0.07605338096618652, -0.445557564496994, 0.23187412321567535, -0.04323023930191994, -0.46572282910346985, -0.03970935940742493, -0.06985825300216675, 0.008766423910856247, 0.08063113689422607, 0.2930554151535034, 0.2758254110813141, 0.12011644244194031, -0.18056470155715942, -0.09860583394765854, -0.23804935812950134, -0.1330816149711609, -0.6524450778961182, 0.24655474722385406, -0.31332847476005554, -0.354363352060318, 0.15009424090385437, 0.10371141135692596, 0.38144451379776, -0.006127708591520786, -0.2047821283340454, 0.2546294331550598, 0.07921554148197174, 0.48642075061798096, 0.14918896555900574, -0.20742742717266083, 0.513231635093689, 0.1229928582906723, -0.008554395288228989, -0.2754906415939331, 0.21377459168434143, 0.33332952857017517, -0.00360141322016716, 0.2906179130077362, -0.1034901812672615, 0.01913754642009735, -0.1552756428718567, 0.781606137752533, 0.07481290400028229, -0.01993798092007637, -0.05564313381910324, 0.23947477340698242, 0.502362072467804, 0.016448937356472015, -0.18362043797969818, 0.08513440191745758, -0.01560509204864502, 0.0503273606300354, 0.4427646994590759, 0.053564123809337616, -0.2275882512331009, -0.026136767119169235, 0.15067219734191895, -0.5740033984184265, -0.24430836737155914, -0.39040324091911316, -0.4486215114593506, 0.2665714621543884, 0.4034616947174072, 0.2810748815536499, -0.1891516000032425, -0.18905073404312134, -0.023412546142935753, -0.00314968079328537, 0.29877984523773193, 0.05473550781607628, -0.1094801276922226, 0.3351595401763916, -0.46464431285858154, 0.060186002403497696, 0.0745488777756691, 0.26162824034690857, -0.018729563802480698, 0.3189448416233063, 0.11339348554611206, -0.002555771265178919, 0.15044718980789185, -0.24765990674495697, 0.19632390141487122, -0.15262508392333984, 0.12429992854595184, -0.23000328242778778, -0.11025530099868774, -0.10791841894388199, 0.06190968304872513, 0.1958959698677063, 0.44690996408462524, -0.10384653508663177, -0.017788635566830635, 0.21526476740837097, -0.17386847734451294, -0.16641613841056824, -0.34622031450271606, -0.07937926799058914, -0.14328239858150482, 0.09175863862037659, 0.04844940826296806, -0.21767650544643402, 0.15449950098991394, -0.734743595123291, -0.42759841680526733, 0.25797978043556213, 0.3688354790210724, -0.13135679066181183, -0.056933142244815826, 0.12977179884910583, -0.029840372502803802, 0.3940137028694153, 0.694918155670166, -0.08868013322353363, 0.5424665212631226, 0.01687074825167656, -0.01395706832408905, -0.5385686755180359, -0.19009467959403992, -0.3807852864265442, -0.31760239601135254, -0.057036176323890686, 0.18174166977405548, -0.09068652242422104, 0.010910429991781712, -0.364843487739563, 0.04322756826877594, -0.191618412733078, 0.44328340888023376, 0.12115513533353806, -0.3691498339176178, -0.2751363217830658, 0.08683933317661285, 0.14850445091724396, -0.1373632252216339, 0.678492546081543, 0.21683435142040253, -0.15305492281913757, -0.09534366428852081, 0.3730173707008362, 0.5726521015167236, -0.3677918314933777, -0.23237353563308716, -0.08311919122934341, -0.4831365942955017, 0.3436765670776367, 0.1961052566766739, -0.009290138259530067, -0.6566015481948853, -0.4369603991508484, -0.0029359590262174606, 0.08464500308036804, 0.4113519489765167, 0.1586979627609253, -0.34031713008880615, -0.1738065630197525, -0.11967489123344421, 0.21889477968215942, 0.2896232604980469, -0.10118909925222397, -0.2579539716243744, -0.21309314668178558, -0.020710404962301254, 0.06356070190668106, -0.35723626613616943, -0.019467178732156754, -0.2139992117881775, -0.007706362754106522, 0.09368661046028137, 0.04767455905675888, -0.26618948578834534, 0.10541475564241409, 0.21575817465782166, 0.040706031024456024, -0.11219555139541626, -0.08099088817834854, -0.5836498141288757, 0.4978784918785095, 0.2646726965904236, 0.10088787972927094, -0.401015967130661, 0.287031888961792, 0.15765327215194702, -0.08226253092288971, 0.01315197255462408, 0.12586860358715057, 0.1904933899641037, 0.007366925477981567, -0.41336706280708313, -0.1846577525138855, -0.12445076555013657, -0.17994989454746246, -0.4760691523551941, -0.3439100384712219, -0.15131314098834991, 0.1970795840024948, 0.05510769411921501, 0.029218319803476334, 0.17100593447685242, -0.3160809576511383, 0.09268318116664886, 0.1718725562095642, -0.002368227345868945, 0.19619953632354736, -0.08726920187473297, -0.25332021713256836, 0.006774961948394775, 0.37933945655822754, 0.2609363794326782, 0.4856831729412079, -0.032435059547424316, -0.3512035310268402, -0.0024749599397182465, -0.10707484930753708, 0.3448711037635803, -0.09375931322574615, -0.2616341710090637, 0.004919084254652262, -0.37123873829841614, 0.19065077602863312, 0.039098870009183884, 0.1902032196521759, 0.14966613054275513, -0.3142688572406769, -0.2813904881477356, -0.2328205108642578, -0.08994307368993759, 0.048281919211149216, -0.07011304795742035, 0.028726015239953995, 0.25847357511520386, -0.058810677379369736, 0.021082183346152306, 0.04558160528540611, -0.20644444227218628, -0.04142492264509201, 0.06068719923496246, 0.009580042213201523, -0.01480419933795929, -0.044113628566265106, -0.09380652010440826, -0.2502231001853943, -0.05348518490791321, 0.0864143818616867, -0.15084688365459442, -0.093283511698246, -0.22620348632335663, 0.16240401566028595, 0.24455395340919495, 0.20565490424633026, 0.28818249702453613, -0.22600315511226654, -0.394439160823822, -0.11527600139379501, -0.16365766525268555, 0.5030627846717834, -0.010219648480415344, 0.15722666680812836, 0.11037137359380722, 0.42290544509887695, -0.13164874911308289, -0.01613427698612213, 0.06205952167510986, 0.18386626243591309, -0.1328742951154709, 0.3991324007511139, -0.056605346500873566, -0.07187017053365707, -0.21784572303295135, 0.026885244995355606, -0.12781281769275665, 0.23642346262931824, 0.435515433549881, -0.40558046102523804, 0.2881433963775635, 0.23776564002037048, 0.5250591039657593, -0.15163929760456085, 0.06895030289888382, -0.20501692593097687, 0.005617999006062746, 0.20841825008392334, -0.2678333520889282, -0.14868102967739105, 0.01036705169826746, 0.14431141316890717, -0.12896470725536346, 0.15407076478004456, 0.13360993564128876, -0.5700005888938904, -0.10027585923671722, 0.0998237207531929, 0.2820517420768738, -0.21404506266117096, 0.11051400005817413, 0.6199073195457458, -0.08038681745529175, 0.10388629138469696, 0.48571616411209106, -0.08115991950035095, -0.07764191180467606, 0.27270591259002686, 0.262407124042511, 0.22025656700134277, 0.49529027938842773, 0.2957497835159302, 0.04403252154588699, -0.06327622383832932, 0.024967337027192116, -0.1340903639793396, 0.0584227554500103, 0.08414307981729507, 0.2926395535469055, 0.04796386882662773, -0.04471535608172417, -0.2986903488636017, -0.3202166259288788, -0.0708661824464798, -0.025526873767375946, 0.08528588712215424, -0.10818041115999222, -0.3852223753929138, 0.30776190757751465, 0.0741834044456482, 0.006892792880535126, 0.15158797800540924, 0.20066942274570465, -0.022050850093364716, -0.33213919401168823, -0.893319308757782, 0.029001373797655106, 0.0012897104024887085, 0.17532336711883545, -0.22150012850761414, 0.1813262403011322, -0.4121186137199402, -0.16850651800632477, -0.0005254559218883514, 0.6146161556243896, -0.05067450925707817, 0.1478741466999054, 0.4311763048171997, -0.07538079470396042, 0.15232552587985992, -0.09515783190727234, 0.11300680041313171, 0.2606196999549866, 0.35949277877807617, 0.20334690809249878, 0.07828575372695923, 0.10928947478532791, -0.05469584837555885, 0.06388106197118759, 0.6495124697685242, 0.3192138969898224, 0.1096385270357132, -0.1245618537068367, 0.11334171891212463, -0.16353297233581543, 0.10637076199054718, 0.193661168217659, -0.1298440396785736, -0.11561111360788345, 0.10880205035209656, 0.09301963448524475, -0.05790910869836807, -0.27616605162620544, 0.05101250112056732, 0.034268591552972794, -0.12299782037734985, 0.1911996454000473, 0.09214336425065994, 0.2127644121646881, -0.30603134632110596, -0.4880691170692444, 0.44725024700164795, 0.07533904165029526, 0.3521847426891327, 0.13328641653060913, 0.08105482906103134, -0.06174074858427048, -0.07767345011234283, 0.3390161097049713, -0.2810385227203369, 0.1368286907672882, 0.3183821141719818, -0.38334131240844727, -0.0361446775496006, -0.1471690833568573, -0.16815055906772614, -0.28407642245292664, -0.3117673099040985, 0.37159913778305054, 0.10874256491661072, 0.05441383272409439, 0.051402755081653595, -0.06011315435171127, 0.10827012360095978, 0.179831862449646, 0.3098830282688141, 0.18124821782112122, 0.00789932906627655, -0.16391679644584656, -0.1630963683128357, -0.24107185006141663, -0.07289349287748337, -0.3530280590057373, 0.3977636396884918, 0.040778689086437225, 0.312142938375473, -0.04800621420145035, -0.00009959563612937927, -0.06420903652906418, 0.30952340364456177, 0.05882272124290466, 0.06981676816940308, -0.6621657013893127, -0.02345500886440277, 0.0115179643034935, -0.5694554448127747, -0.08729944378137589, 0.2147098183631897, 0.04528046026825905, 0.29470571875572205, 0.012343920767307281, 0.06845224648714066, 0.27648022770881653, -0.32211846113204956, -0.14345069229602814, -0.1486734300851822, 0.23949214816093445, 0.3593887388706207, -0.4365212917327881, -0.19588927924633026, -0.028259113430976868, 0.35076043009757996, -0.18796437978744507, -0.02483903430402279, -0.1295253336429596, 0.029036318883299828, 0.197496697306633, -0.05370278283953667, 0.22174492478370667, 0.06488674879074097, -0.1482268124818802, 0.1938769668340683, -0.04484787583351135 ]
https://github.com/huggingface/datasets/issues/2472
Fix automatic generation of Zenodo DOI
I have received the following request from Zenodo support: > Could you send us the link to the repository as well as the release tag? My reply: > Sure, here it is: > - Link to the repository: https://github.com/huggingface/datasets > - Link to the repository at the release tag: https://github.com/huggingface/datasets/releases/tag/1.8.0 > - Release tag: 1.8.0
After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right
55
Fix automatic generation of Zenodo DOI After the last release of Datasets (1.8.0), the automatic generation of the Zenodo DOI failed: it appears in yellow as "Received", instead of in green as "Published". I have contacted Zenodo support to fix this issue. TODO: - [x] Check with Zenodo to fix the issue - [x] Check BibTeX entry is right I have received the following request from Zenodo support: > Could you send us the link to the repository as well as the release tag? My reply: > Sure, here it is: > - Link to the repository: https://github.com/huggingface/datasets > - Link to the repository at the release tag: https://github.com/huggingface/datasets/releases/tag/1.8.0 > - Release tag: 1.8.0
[ 0.01883268728852272, 0.26431602239608765, -0.05375782400369644, 0.1654241383075714, 0.14440672099590302, -0.04861979931592941, 0.29565438628196716, 0.30089515447616577, 0.012551527470350266, 0.2421855330467224, -0.01259657833725214, 0.1527007669210434, 0.15315361320972443, -0.010560298338532448, -0.01505939569324255, -0.01138170063495636, -0.19024169445037842, 0.3833130896091461, 0.019225772470235825, -0.27282586693763733, -0.08025957643985748, 0.03522038832306862, 0.021399453282356262, 0.07574174553155899, 0.08150225132703781, -0.09376788139343262, -0.0888005942106247, 0.1431853026151657, -0.6058149337768555, -0.388080894947052, 0.30336785316467285, 0.3281606435775757, -0.08114714920520782, -0.02349259704351425, -0.00011815065226983279, -0.17282555997371674, 0.4213639497756958, -0.005829157307744026, 0.09317883849143982, -0.4274677038192749, -0.578333854675293, -0.29952770471572876, -0.25165876746177673, -0.24211958050727844, 0.13193106651306152, -0.28708797693252563, 0.12574313580989838, 0.06869451701641083, 0.21153801679611206, 0.36704280972480774, 0.13298390805721283, 0.008020231500267982, 0.5302390456199646, -0.24284201860427856, 0.09046180546283722, 0.1740516722202301, -0.034252773970365524, 0.1918558031320572, 0.02889920398592949, 0.34875521063804626, -0.009732745587825775, 0.40101999044418335, 0.02568337880074978, -0.011581625789403915, 0.14839808642864227, 0.08371149003505707, 0.19365578889846802, -0.316848486661911, 0.2095566987991333, 0.058076806366443634, 0.797021746635437, -0.21155622601509094, -0.3363272547721863, -0.04875287413597107, 0.233800008893013, -0.2339421808719635, 0.05841205269098282, -0.05324795842170715, 0.10602964460849762, 0.23671552538871765, 0.04881567135453224, -0.4525831639766693, -0.27514559030532837, -0.01644928753376007, 0.07105310261249542, -0.05251975357532501, -0.15265849232673645, -0.026969924569129944, 0.01952885091304779, -0.07952415943145752, -0.04629305750131607, 0.04424533247947693, -0.17694124579429626, 0.22727595269680023, 0.21097588539123535, -0.1259252429008484, -0.056082405149936676, 0.008323326706886292, 0.5040102601051331, 0.1538025438785553, 0.25338950753211975, -0.12972640991210938, -0.14057542383670807, -0.15241006016731262, 0.14769704639911652, 0.12187820672988892, 0.31416869163513184, -0.1610121726989746, 0.1694396734237671, 0.2534519135951996, 0.08241048455238342, 0.03213333711028099, -0.02340668812394142, -0.040303394198417664, 0.3857744038105011, -0.1556469202041626, 0.4334896206855774, -0.43755683302879333, -0.1630742996931076, 0.19291287660598755, -0.1813875138759613, -0.1911931335926056, -0.3931797444820404, -0.01565469801425934, -0.13644391298294067, 0.3304480314254761, -0.19808565080165863, -0.014288492500782013, -0.09215488284826279, -0.1597929298877716, -0.08908111602067947, -0.33713462948799133, 0.014123287051916122, 0.3546687960624695, -0.05591631680727005, -0.5388823747634888, 0.26960816979408264, 0.36088380217552185, -0.10162755846977234, -0.52103191614151, -0.10062602162361145, 0.1846015900373459, 0.14809304475784302, 0.24463698267936707, 0.09730921685695648, 0.29669156670570374, -0.1031363308429718, -0.07504268735647202, -0.09081562608480453, 0.26683157682418823, -0.2066272795200348, -0.4705870449542999, -0.47823667526245117, 0.07410601526498795, -0.053396113216876984, -0.06763675808906555, 0.28853148221969604, 0.16527719795703888, 0.09281118214130402, -0.12252189218997955, -0.06655808538198471, 0.16156458854675293, 0.16983336210250854, 0.024898404255509377, 0.2625797390937805, 0.3304283618927002, 0.10813279449939728, -0.14686241745948792, -0.31378263235092163, 0.09737025201320648, 0.2828286290168762, 0.0033242497593164444, -0.04485040158033371, 0.3146299123764038, -0.1357920616865158, -0.3073580265045166, 0.2696187496185303, -0.5879850387573242, -0.3641512393951416, -0.057276055216789246, -0.2582698464393616, 0.059335678815841675, -0.00805867463350296, -0.1976897120475769, 0.36864611506462097, 0.25935980677604675, -0.3146283030509949, -0.31574898958206177, -0.12564893066883087, -0.04442739859223366, -0.1898537129163742, -0.2747279405593872, -0.36286866664886475, -0.06566241383552551, 0.45248469710350037, 0.3284436762332916, 0.16307303309440613, 0.2639472484588623, 0.186941459774971, 0.14931918680667877, 0.004099768586456776, 0.04521549493074417, 0.466561496257782, -0.1666944921016693, 0.18847039341926575, -0.046065133064985275, -0.1447484791278839, 0.17522794008255005, 0.4449847638607025, 0.1707225888967514, -0.1821966916322708, -0.10482847690582275, -0.4984596371650696, -0.15126387774944305, -0.12356473505496979, 0.002910122275352478, 0.020984195172786713, 0.12464365363121033, 0.05621126666665077, 0.1935507208108902, -0.0028663724660873413, 0.01725323684513569, -0.10430068522691727, 0.31859371066093445, -0.21010075509548187, 0.1065797358751297, -0.028460761532187462, -0.045615434646606445, -0.022737368941307068, 0.14328229427337646, 0.06847669929265976, 0.1075025200843811, -0.04910445585846901, 0.1979275643825531, -0.029882097616791725, 0.2410431057214737, 0.15102370083332062, 0.3712351322174072, 0.3792066276073456, -0.23446239531040192, -0.044761255383491516, 0.05595120042562485, -0.2126636803150177, 0.10493814200162888, 0.11360915005207062, 0.20807774364948273, -0.2715883255004883, -0.2774093747138977, -0.3513953685760498, 0.15628403425216675, 0.4229259788990021, 0.032306645065546036, -0.34061354398727417, -0.3359729051589966, -0.19703051447868347, -0.20266294479370117, 0.2110144942998886, 0.1531805843114853, -0.3375045359134674, 0.280775785446167, 0.5243435502052307, -0.08646965026855469, -0.012669160962104797, -0.1467861831188202, 0.07315778732299805, -0.14055702090263367, 0.07984506338834763, 0.346985399723053, 0.1621221899986267, 0.10231509804725647, -0.06705562770366669, 0.10238044708967209, -0.17161628603935242, -0.09976325184106827, 0.18452006578445435, -0.02718506008386612, 0.5872584581375122, 0.3576718866825104, -0.04272545874118805, -0.05840505287051201, -0.28861016035079956, 0.1547626107931137, 0.023679597303271294, 0.3564009964466095, -0.17512646317481995, -0.6635758280754089, 0.006443643942475319, 0.06762776523828506, -0.39932602643966675, -0.4240981638431549, -0.5256230235099792, -0.08240693062543869, 0.05852968618273735, 0.12916254997253418, 0.16244331002235413, 0.17353180050849915, -0.07671062648296356, 0.22311045229434967, -0.09684842079877853, 0.22691893577575684, -0.17529557645320892, 0.116827592253685, 0.06299794465303421, -0.04432889446616173, -0.25993552803993225, -0.13683532178401947, 0.2961810827255249, -0.5483995676040649, 0.1319541484117508, -0.537855327129364, -0.06213423237204552, 0.20432952046394348, 0.16480010747909546, 0.029927436262369156, -0.00764736533164978, 0.1783822476863861, 0.18789511919021606, -0.03866055607795715, 0.014307424426078796, -0.2300727367401123, -0.22027303278446198, -0.17642581462860107, -0.3641083240509033, 0.3547816872596741, -0.029561078175902367, -0.4267737567424774, -0.03691587597131729, -0.057326532900333405, 0.14318892359733582, 0.0223088301718235, 0.3342304229736328, 0.4058888256549835, 0.04381032660603523, -0.10330324620008469, -0.14450041949748993, -0.14503620564937592, -0.09604619443416595, -0.7143990993499756, 0.2518986463546753, -0.27749714255332947, -0.26204797625541687, 0.18472658097743988, 0.10000140219926834, 0.5091559886932373, -0.034384917467832565, -0.21103160083293915, 0.06299403309822083, 0.024548647925257683, 0.48673391342163086, -0.04855380952358246, -0.08292725682258606, 0.5620526075363159, 0.15077924728393555, -0.010694818571209908, -0.2247822880744934, 0.07547040283679962, 0.29465335607528687, -0.06282614916563034, 0.24385568499565125, 0.0527605339884758, 0.09856757521629333, -0.11683668196201324, 1.0462340116500854, 0.21999169886112213, -0.024665366858243942, -0.017103664577007294, 0.14740422368049622, 0.5294175148010254, 0.15809586644172668, -0.3583484888076782, 0.01585461013019085, -0.01387980580329895, -0.010370705276727676, 0.35526931285858154, 0.09333651512861252, 0.06165126711130142, -0.06825431436300278, 0.005089361220598221, -0.5711325407028198, -0.24302111566066742, -0.3952089250087738, -0.2392043173313141, 0.3242172598838806, 0.3030344843864441, 0.35463130474090576, -0.13798820972442627, -0.04964398592710495, 0.1588335633277893, 0.16061562299728394, 0.4409460723400116, 0.05261287838220596, -0.06966280937194824, 0.30643582344055176, -0.5714340209960938, 0.020043931901454926, 0.22490817308425903, 0.13378331065177917, -0.11484800279140472, 0.3379479646682739, 0.060743995010852814, -0.01457192562520504, 0.31462252140045166, -0.18512320518493652, 0.24939803779125214, -0.21882234513759613, 0.13716310262680054, 0.05636744201183319, 0.05686386302113533, 0.018909912556409836, 0.1150909960269928, 0.3641647696495056, 0.525696873664856, -0.17919859290122986, -0.07940822839736938, 0.24530120193958282, -0.19166505336761475, -0.1595645546913147, -0.21092988550662994, -0.015497274696826935, -0.19733035564422607, 0.05375363677740097, 0.044340282678604126, -0.06069757789373398, 0.21910598874092102, -0.5079628825187683, -0.32699424028396606, 0.3720758855342865, 0.28914782404899597, -0.17369844019412994, -0.06556441634893417, 0.11744748055934906, 0.11015035957098007, 0.3324814736843109, 0.7585229873657227, -0.060421302914619446, 0.6344247460365295, 0.1879078894853592, -0.031848978251218796, -0.5295664072036743, -0.32888028025627136, -0.22416247427463531, -0.14511916041374207, 0.08287568390369415, 0.16134999692440033, -0.1453898549079895, 0.09078888595104218, -0.3072914481163025, -0.08278476446866989, -0.1839214563369751, 0.4555123746395111, 0.1427205353975296, -0.42342522740364075, -0.2619726359844208, 0.0013800859451293945, 0.19437667727470398, -0.1145448088645935, 0.6239342093467712, 0.5016469955444336, -0.2544489800930023, -0.26506030559539795, 0.33414268493652344, 0.7262826561927795, -0.2781602740287781, -0.12649297714233398, -0.14782783389091492, -0.5781809687614441, 0.5295577049255371, 0.3364054560661316, -0.03496949374675751, -0.5804934501647949, -0.4340508282184601, -0.051087647676467896, 0.012436483055353165, 0.40211957693099976, 0.08464203774929047, -0.38184884190559387, -0.041202861815690994, 0.06654730439186096, 0.2690659761428833, 0.253539115190506, 0.04305581748485565, -0.3380264341831207, -0.23763695359230042, -0.15064331889152527, -0.027221469208598137, -0.3198184370994568, 0.16854742169380188, -0.1905207335948944, -0.17229421436786652, 0.0657757818698883, -0.005404066294431686, -0.40231120586395264, 0.07754254341125488, -0.057715605944395065, -0.12844492495059967, -0.0067514292895793915, -0.05466196686029434, -0.41989532113075256, 0.4081677198410034, 0.24199652671813965, 0.06241481751203537, -0.31372466683387756, 0.21117208898067474, -0.008523240685462952, -0.07329390943050385, 0.011094348505139351, 0.08913815021514893, 0.24991768598556519, -0.002772632986307144, -0.3028779923915863, -0.15819495916366577, -0.20926626026630402, -0.15477681159973145, -0.48807471990585327, -0.3939772844314575, -0.24730385839939117, 0.1327335387468338, 0.03707067668437958, 0.045720621943473816, 0.226202130317688, -0.2979459762573242, 0.03540920466184616, 0.1603592485189438, 0.027002913877367973, 0.030237305909395218, -0.13587471842765808, -0.16971665620803833, 0.04471217095851898, 0.3609544634819031, 0.07975145429372787, 0.31921011209487915, -0.059245891869068146, -0.39301633834838867, -0.024869324639439583, -0.04143623262643814, 0.2886120676994324, -0.04452993720769882, -0.41304489970207214, -0.06497683376073837, -0.39061129093170166, 0.17081774771213531, -0.1037164106965065, 0.23796765506267548, 0.2758374810218811, -0.20198136568069458, -0.17302337288856506, -0.3063979148864746, -0.15779681503772736, 0.15726575255393982, -0.10633403062820435, 0.040074460208415985, 0.21921798586845398, -0.05184860900044441, 0.12250728905200958, -0.07506411522626877, -0.18686193227767944, -0.10199112445116043, 0.08064325898885727, -0.10053004324436188, 0.07926422357559204, -0.04518738389015198, 0.05038798600435257, -0.24185018241405487, -0.09962054342031479, 0.013565102592110634, -0.16127340495586395, -0.019190775230526924, -0.15873797237873077, 0.20552057027816772, 0.10042080283164978, 0.21838650107383728, 0.27268898487091064, -0.22619377076625824, -0.32073381543159485, 0.021437926217913628, -0.041258424520492554, 0.519578218460083, 0.17472204566001892, 0.05715186521410942, 0.20048731565475464, 0.5155264735221863, -0.28964751958847046, 0.024112306535243988, 0.09112036228179932, 0.30992835760116577, -0.12008555233478546, 0.3679485321044922, -0.19968794286251068, -0.10860032588243484, -0.25248754024505615, 0.05498678982257843, 0.06587222963571548, 0.09250782430171967, 0.34909722208976746, -0.3229043483734131, 0.04944433644413948, 0.4477122724056244, 0.6423043012619019, -0.21557119488716125, 0.05043753236532211, -0.05518036335706711, 0.0253974050283432, 0.14950110018253326, -0.25738775730133057, -0.1280939131975174, -0.05007133260369301, 0.055065106600522995, -0.14048855006694794, 0.21674636006355286, 0.1621718853712082, -0.39486128091812134, -0.04271956533193588, 0.05679360777139664, 0.31845903396606445, -0.12512347102165222, 0.08267475664615631, 0.5675775408744812, -0.037619974464178085, 0.0553092360496521, 0.431794673204422, 0.026059452444314957, 0.014137566089630127, -0.030946694314479828, 0.054848380386829376, 0.27326294779777527, 0.6133198142051697, 0.4035380482673645, 0.20875225961208344, -0.029862796887755394, -0.07042975723743439, -0.1106901466846466, 0.056830327957868576, 0.05023566260933876, 0.3190506100654602, 0.169284850358963, 0.013879381120204926, -0.35733217000961304, -0.19016872346401215, 0.11331665515899658, -0.010857511311769485, 0.04756854102015495, -0.006064441055059433, -0.35625356435775757, 0.08545748889446259, 0.06014344468712807, 0.025630012154579163, 0.028081882745027542, 0.2432376742362976, -0.16580507159233093, -0.3811871409416199, -0.8119905591011047, -0.1659938097000122, 0.06581097841262817, 0.1767837405204773, -0.19287428259849548, 0.24685008823871613, -0.3664059042930603, -0.2223130166530609, -0.05094115808606148, 0.8055131435394287, 0.07574416697025299, 0.04201629385352135, 0.48832663893699646, 0.003925877623260021, 0.15368926525115967, -0.05323231965303421, 0.11957284808158875, 0.20716306567192078, 0.3157709538936615, -0.05681949481368065, -0.003786129876971245, 0.07884484529495239, -0.04483802989125252, 0.03025304712355137, 0.5185050368309021, 0.30999964475631714, 0.02901967242360115, 0.06253978610038757, -0.06578030437231064, -0.14866162836551666, 0.033853933215141296, 0.3108850121498108, -0.24824151396751404, -0.015899721533060074, 0.04177837818861008, 0.09911078214645386, -0.09125114232301712, -0.28225213289260864, 0.04146454483270645, 0.03477085754275322, -0.16201676428318024, 0.3209404945373535, 0.08015995472669601, 0.22114837169647217, -0.2779098153114319, -0.5337411165237427, 0.37856224179267883, 0.24002104997634888, 0.16460049152374268, 0.14643990993499756, 0.023342395201325417, -0.06531650573015213, -0.06794960051774979, 0.3363095819950104, -0.25858548283576965, 0.29473593831062317, 0.24832110106945038, -0.30859068036079407, 0.011194007471203804, -0.14913874864578247, -0.221848726272583, -0.2559013366699219, -0.15649250149726868, 0.3803360164165497, 0.13336844742298126, -0.01029510423541069, -0.0034807734191417694, 0.029419712722301483, -0.011286426335573196, 0.1360279768705368, 0.2952547073364258, 0.11938019841909409, -0.08723689615726471, -0.215234637260437, -0.20249448716640472, -0.24224615097045898, 0.021556857973337173, -0.4104662537574768, 0.4260905981063843, 0.02852974832057953, 0.21735987067222595, -0.05210650712251663, -0.13980348408222198, -0.17883335053920746, 0.2281908392906189, 0.1469046026468277, 0.06191106140613556, -0.5954902172088623, 0.051512837409973145, 0.014975465834140778, -0.6247380971908569, 0.024728238582611084, 0.26061612367630005, -0.01956046372652054, 0.25454941391944885, 0.031833723187446594, -0.03791899234056473, 0.3640725910663605, -0.410093754529953, -0.042283616960048676, -0.04959011822938919, 0.3094409108161926, 0.40537941455841064, -0.5434490442276001, -0.4110456705093384, -0.00008899718523025513, 0.3572199046611786, -0.08698892593383789, -0.02310134470462799, -0.09676846861839294, 0.03225843608379364, 0.17696991562843323, -0.07808130979537964, 0.14605721831321716, 0.1366172879934311, -0.22845381498336792, 0.18690012395381927, -0.05179666355252266 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Hi ! It looks like the issue comes from pyarrow. What version of pyarrow are you using ? How did you install it ?
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
24
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Hi ! It looks like the issue comes from pyarrow. What version of pyarrow are you using ? How did you install it ?
[ -0.4569721519947052, -0.21739071607589722, 0.02287772297859192, 0.4219464063644409, 0.3113080859184265, -0.22648242115974426, 0.23613497614860535, 0.1525057703256607, 0.04312627390027046, 0.3643296957015991, 0.5303289294242859, 0.29797887802124023, -0.33465102314949036, -0.04657025635242462, 0.04772935435175896, -0.026568226516246796, 0.36591342091560364, -0.21823543310165405, 0.25115013122558594, 0.3584372401237488, -0.2708789110183716, 0.16277006268501282, -0.4191712737083435, 0.29371267557144165, -0.26529568433761597, 0.08224396407604218, -0.10502300411462784, 0.28656280040740967, -0.09741594642400742, -0.5258923172950745, -0.03057578206062317, -0.2955249845981598, 0.19126220047473907, 0.45836788415908813, -0.00011823354725493118, -0.09135564416646957, 0.21397219598293304, 0.012012546882033348, 0.09307025372982025, -0.44300878047943115, -0.2259862720966339, -0.2528822124004364, -0.1637299507856369, -0.04087261110544205, 0.31339263916015625, 0.004678359720855951, -0.06639478355646133, -0.15027812123298645, 0.07593069970607758, 0.7205309867858887, 0.15910951793193817, 0.21483276784420013, 0.2288714498281479, -0.11200140416622162, 0.01633945107460022, 0.13414724171161652, -0.030597057193517685, 0.06143795698881149, 0.4003655016422272, -0.20039476454257965, 0.02491454780101776, -0.16739480197429657, 0.09280787408351898, -0.26698073744773865, 0.3059387505054474, -0.12271050363779068, 0.1998043954372406, -0.6616147756576538, 0.2974797487258911, -0.17242774367332458, -0.16359654068946838, -0.28783419728279114, -0.05091964453458786, -0.16323140263557434, -0.14308398962020874, -0.22301499545574188, 0.1774134337902069, -0.16718846559524536, -0.15712358057498932, 0.08328606188297272, -0.2861917018890381, 0.1699507087469101, 0.03356192260980606, 0.30864423513412476, -0.3192942440509796, 0.4002261459827423, -0.002978375181555748, 0.38961872458457947, 0.12629513442516327, -0.2813792824745178, -0.34202849864959717, 0.1340494304895401, -0.04152896627783775, 0.26742252707481384, -0.2257159799337387, -0.16636747121810913, 0.1507890671491623, -0.17385870218276978, 0.2904582917690277, -0.24060450494289398, -0.165643110871315, 0.2874029576778412, 0.048613205552101135, 0.21331027150154114, 0.2980204224586487, -0.020956870168447495, 0.30214184522628784, 0.3840675950050354, 0.04991067945957184, -0.05606452748179436, -0.1028033196926117, -0.040040522813797, 0.22646616399288177, -0.11676239967346191, 0.08925189077854156, 0.1257731020450592, 0.07402390241622925, -0.15347833931446075, -0.11980146914720535, 0.42945876717567444, -0.2137422263622284, 0.27730464935302734, 0.31860989332199097, 0.29638317227363586, 0.3739156723022461, 0.22702822089195251, -0.2862904667854309, 0.03387364372611046, -0.2570648193359375, -0.08717714250087738, -0.04427818953990936, -0.20067721605300903, -0.37084487080574036, 0.09926425665616989, -0.0057360343635082245, 0.23963423073291779, 0.15276452898979187, 0.04504792392253876, 0.22123219072818756, -0.539868950843811, 0.11252237856388092, -0.2573072910308838, 0.13399150967597961, 0.03508372604846954, -0.29419973492622375, 0.14081695675849915, 0.11566770076751709, -0.12368302792310715, -0.16609922051429749, 0.16718050837516785, -0.2124159038066864, -0.24575825035572052, -0.14749804139137268, 0.15607726573944092, -0.004165010526776314, 0.43751877546310425, -0.061790190637111664, 0.32287028431892395, 0.3464184105396271, -0.32850363850593567, -0.025873325765132904, -0.3166901469230652, -0.4711766839027405, -0.26923736929893494, -0.04782264679670334, 0.2325533926486969, -0.11913460493087769, 0.029882609844207764, 0.200078547000885, 0.0202774740755558, 0.09413165599107742, 0.16296707093715668, -0.19793540239334106, -0.017758533358573914, -0.19113673269748688, 0.524368405342102, 0.2797341048717499, -0.06436370313167572, -0.49060383439064026, 0.11027717590332031, -0.2673048973083496, -0.19815197587013245, -0.4909544587135315, -0.15601299703121185, 0.40234342217445374, -0.20736774802207947, 0.42602911591529846, -0.016893047839403152, -0.14121435582637787, 0.11838548630475998, -0.3067173957824707, 0.09499749541282654, 0.1623566448688507, -0.14624184370040894, 0.08063695579767227, -0.16650211811065674, 0.18311762809753418, -0.07083413749933243, 0.020328227430582047, 0.00462881475687027, -0.042651236057281494, 0.2887401580810547, 0.21363481879234314, -0.07819351553916931, 0.035179369151592255, -0.30482015013694763, -0.06837979704141617, 0.22688183188438416, 0.03475944697856903, -0.08886170387268066, -0.028239309787750244, 0.010514654219150543, -0.04116593301296234, 0.3073398172855377, 0.1391109675168991, -0.10586318373680115, 0.021638356149196625, -0.12469810247421265, 0.0030890926718711853, -0.06615336239337921, -0.03760569170117378, -0.019784485921263695, -0.18851040303707123, 0.024668186902999878, -0.06323587894439697, -0.12725991010665894, -0.201030433177948, -0.16466283798217773, -0.38877031207084656, 0.1416737586259842, 0.4239655137062073, -0.006467022001743317, -0.23094239830970764, 0.5506322383880615, 0.3362872898578644, -0.24848894774913788, -0.6358664035797119, -0.08476550877094269, 0.3994867503643036, -0.1538936346769333, 0.16345219314098358, 0.08694528043270111, -0.012666955590248108, -0.13238057494163513, 0.19112184643745422, 0.22163790464401245, 0.28241515159606934, 0.15726391971111298, -0.09599728137254715, 0.04253821074962616, 0.16591575741767883, 0.12296855449676514, 0.03259478509426117, -0.19979235529899597, -0.0025341250002384186, 0.1199667751789093, 0.05610499903559685, -0.0478549599647522, -0.04797380790114403, 0.23610076308250427, 0.2793259918689728, -0.07611249387264252, 0.12380902469158173, 0.05804479867219925, -0.16852086782455444, -0.056746985763311386, 0.2826823592185974, -0.013606894761323929, 0.6230340003967285, 0.0613570362329483, -0.028773237019777298, 0.004042875021696091, -0.38019251823425293, -0.033628009259700775, 0.13357266783714294, 0.07825495302677155, -0.12283698469400406, 0.05036197975277901, 0.2556922733783722, 0.15972283482551575, -0.19245433807373047, -0.379513680934906, 0.019982455298304558, 0.3146325945854187, -0.461221843957901, 0.20407892763614655, -0.11882218718528748, 0.21363726258277893, -0.0778883546590805, -0.17068760097026825, -0.175323486328125, -0.3915610611438751, -0.03860628604888916, 0.12130311131477356, 0.005078412592411041, 0.15825411677360535, 0.0887686014175415, -0.14176298677921295, 0.04338977485895157, 0.31263360381126404, 0.26207196712493896, -0.004213816951960325, -0.4652629494667053, -0.1256636530160904, 0.3646598160266876, -0.14263124763965607, 0.180757537484169, 0.15967296063899994, -0.42311424016952515, -0.13777008652687073, -0.554107666015625, 0.03621675819158554, 0.04581303521990776, 0.2179298996925354, 0.06505322456359863, 0.00027339160442352295, -0.14179036021232605, -0.06400586664676666, 0.16275113821029663, -0.07101507484912872, -0.05115281045436859, 0.11676183342933655, 0.17636333405971527, -0.3484145700931549, -0.4004398286342621, 0.08108198642730713, -0.24044539034366608, -0.22788895666599274, 0.039897650480270386, 0.05621704086661339, 0.2899165153503418, 0.03360116854310036, 0.3173657953739166, 0.2378726750612259, 0.064022958278656, -0.26992011070251465, -0.2033461332321167, 0.21200913190841675, -0.05095637962222099, -0.14758113026618958, -0.2852531969547272, -0.07525750994682312, 0.1772032082080841, -0.02296767756342888, 0.26503264904022217, -0.2499951273202896, -0.05352465435862541, -0.06592041254043579, 0.3023354411125183, -0.10448992252349854, -0.2844485938549042, 0.3918755352497101, 0.10788242518901825, 0.04797174781560898, -0.00432128831744194, -0.38120725750923157, -0.06521051377058029, -0.22015973925590515, 0.18795230984687805, -0.004087049514055252, 0.520758330821991, 0.15794217586517334, 0.506637692451477, 0.33181411027908325, -0.5369666814804077, 0.1717594563961029, -0.2706901431083679, 0.1213344931602478, -0.15669187903404236, -0.12802262604236603, 0.30131107568740845, 0.040945202112197876, -0.062436576932668686, 0.1361878663301468, -0.06296424567699432, -0.4967781603336334, 0.051886171102523804, 0.08034946024417877, -0.016802122816443443, -0.28508850932121277, 0.15080535411834717, -0.060296863317489624, 0.26370275020599365, -0.1313890665769577, 0.3329266607761383, -0.24990157783031464, -0.0794401690363884, -0.16358113288879395, -0.09733469784259796, -0.1765633523464203, -0.04664992541074753, -0.5345151424407959, -0.10867254436016083, -0.6624093651771545, 0.32212018966674805, 0.19392666220664978, 0.783557116985321, 0.021418165415525436, -0.08244404941797256, -0.2468024045228958, -0.16819913685321808, 0.6353745460510254, -0.3002033531665802, 0.07239054888486862, -0.004512925632297993, 0.09881830215454102, -0.6122601628303528, -0.12567299604415894, -0.014384865760803223, 0.6673839688301086, 0.2643592953681946, 0.9284404516220093, 0.046359769999980927, 0.04595968872308731, 0.04348129779100418, 0.01782706007361412, 0.1433940976858139, -0.06521036475896835, -0.010504201054573059, -0.05995357036590576, -0.17638355493545532, 0.19569706916809082, 0.23711253702640533, 0.20747676491737366, -0.015740498900413513, -0.4159710109233856, 0.0754312202334404, -0.3766656816005707, 0.20110023021697998, 0.1319936066865921, 0.20846626162528992, -0.2982681095600128, 0.11402678489685059, -0.07841572910547256, -0.15737910568714142, 0.28037357330322266, -0.18816395103931427, 0.026479505002498627, -0.3439127206802368, 0.2833440899848938, 0.15300238132476807, 0.1995316594839096, 0.4269762933254242, -0.041670363396406174, 0.10616391897201538, -0.34215065836906433, 0.31230592727661133, -0.20471040904521942, 0.2691141963005066, 0.25358134508132935, 0.21678248047828674, -0.569343090057373, 0.07999088615179062, 0.1540469229221344, 0.09059037268161774, -0.07607687264680862, 0.3940849006175995, -0.3681705594062805, -0.46196448802948, 0.34346210956573486, 0.1300136297941208, 0.8483024835586548, 0.036421358585357666, -0.08160313963890076, -0.19214385747909546, 0.16613908112049103, 0.16867026686668396, -0.18581677973270416, -0.050730228424072266, -0.3904625475406647, -0.15572315454483032, -0.06776744872331619, -0.142049640417099, 0.09833000600337982, 0.07276610285043716, -0.3925172984600067, 0.11290992051362991, 0.10997560620307922, 0.44247564673423767, -0.0006537958979606628, 0.09435218572616577, -0.14287462830543518, -0.127334326505661, -0.06860169023275375, 0.15705344080924988, 0.12384022772312164, -0.23216214776039124, -0.14562323689460754, 0.34690433740615845, 0.14317171275615692, -0.461387574672699, -0.6201134324073792, -0.0647352933883667, -0.5778714418411255, 0.1768624484539032, 0.18120403587818146, 0.23003824055194855, 0.16449721157550812, 0.30127421021461487, 0.07099738717079163, 0.5061187148094177, -0.2116406261920929, -0.02450709417462349, 0.039230458438396454, 0.051251426339149475, 0.14692233502864838, -0.1345069259405136, -0.017681920900940895, 0.09106313437223434, -0.03277989476919174, 0.06409239768981934, 0.0010583838447928429, 0.11643306910991669, -0.5018935203552246, 0.26541709899902344, 0.40295863151550293, -0.1964792162179947, -0.20898637175559998, -0.27721044421195984, -0.18969443440437317, -0.22308145463466644, 0.07184633612632751, 0.08424412459135056, -0.14883200824260712, 0.13945576548576355, -0.15316511690616608, -0.23921577632427216, 0.030135678127408028, 0.45752280950546265, -0.22565194964408875, 0.0981040894985199, -0.015493005514144897, 0.07850302755832672, -0.06773082911968231, -0.1901303231716156, 0.2326970398426056, -0.12375564128160477, -0.03255204111337662, -0.22311913967132568, -0.20077767968177795, -0.09842392802238464, 0.1080038771033287, 0.06069353222846985, 0.11290714144706726, 0.026253119111061096, -0.01600884273648262, -0.5448375940322876, -0.49196571111679077, -0.007314562797546387, -0.04543985798954964, 0.31451693177223206, -0.01650216430425644, 0.0936863124370575, -0.21283142268657684, 0.13641567528247833, -0.21793998777866364, 0.16660720109939575, -0.06328946352005005, 0.20862044394016266, -0.02762090042233467, 0.09834463894367218, -0.16325533390045166, -0.1979132443666458, 0.06050387769937515, 0.7531206011772156, -0.23598337173461914, -0.09428669512271881, -0.05259176343679428, 0.13793405890464783, 0.2398592233657837, -0.1094309538602829, -0.10331594198942184, -0.02726145088672638, 0.1039244532585144, -0.2421071082353592, 0.10288393497467041, 0.22689580917358398, -0.20341350138187408, -0.1315961629152298, 0.6177958250045776, 0.38157960772514343, 0.193136066198349, 0.3575398325920105, 0.019176490604877472, 0.2638328969478607, 0.14654229581356049, 0.36212146282196045, 0.10019677877426147, -0.0010372549295425415, -0.08830587565898895, 0.28169742226600647, 0.06608988344669342, 0.15879210829734802, 0.20862624049186707, -0.09504519402980804, 0.1765190064907074, 0.09129530191421509, -0.03936607763171196, 0.3638715147972107, -0.4002840518951416, -0.06394601613283157, 0.19166028499603271, 0.1843821257352829, 0.03246765583753586, -0.23941132426261902, 0.30492764711380005, 0.18777748942375183, 0.006403908133506775, 0.26586422324180603, 0.036289092153310776, -0.37854453921318054, 0.0793161690235138, 0.2469055950641632, 0.35297706723213196, -0.03889194875955582, -0.03706003725528717, 0.25870028138160706, -0.21215464174747467, 0.10432234406471252, 0.20334392786026, -0.19469182193279266, 0.3131904900074005, 0.6266696453094482, -0.07402137666940689, 0.42741909623146057, 0.12573450803756714, 0.06308965384960175, -0.005494318902492523, -0.24834802746772766, 0.08081858605146408, 0.4405093193054199, -0.18372780084609985, 0.15008580684661865, 0.06208648532629013, 0.2579610347747803, -0.32508718967437744, -0.1628500521183014, 0.08238128572702408, 0.07849811017513275, -0.323533296585083, -0.0777551680803299, -0.06416641920804977, -0.15242654085159302, -0.18515533208847046, 0.02980632707476616, -0.14911098778247833, -0.13427358865737915, 0.30586400628089905, 0.10573376715183258, -0.38693368434906006, -0.2465467005968094, -0.08429697901010513, 0.04624613747000694, -0.025434039533138275, -0.2964482605457306, 0.5547581315040588, -0.16527022421360016, 0.20516417920589447, 0.15157663822174072, -0.1810007393360138, 0.5931910276412964, 0.645906388759613, -0.22873947024345398, 0.1645231693983078, 0.1871112585067749, 0.03692842274904251, -0.023607319220900536, 0.1389954388141632, 0.006493106484413147, 0.20903339982032776, 0.2872695326805115, 0.03199800103902817, -0.14424967765808105, -0.14727303385734558, 0.33585652709007263, 0.2155427783727646, -0.05121766775846481, 0.1997407227754593, -0.2628280222415924, -0.18704845011234283, 0.001991763710975647, -0.030752435326576233, -0.16916561126708984, -0.055350154638290405, 0.38151150941848755, -0.005679415538907051, 0.40611574053764343, -0.14109477400779724, 0.05566829442977905, 0.11248667538166046, 0.16584083437919617, 0.21607190370559692, -0.1539393663406372, -0.40257686376571655, -0.3473493456840515, -0.39319345355033875, 0.3725886046886444, -0.23258888721466064, 0.16857479512691498, 0.06813699752092361, -0.23746472597122192, -0.0817606970667839, 0.003409218043088913, 0.17848555743694305, 0.2687874734401703, -0.0693599283695221, 0.5016834139823914, -0.3206636905670166, -0.04342157021164894, -0.07294075191020966, -0.1339513510465622, 0.2401040494441986, -0.4375869035720825, 0.4043384790420532, -0.3041532337665558, -0.014326315373182297, -0.19157156348228455, 0.005374923348426819, -0.22793161869049072, -0.03722674399614334, 0.6843006610870361, 0.21503624320030212, 0.40693098306655884, -0.032938797026872635, 0.11056310683488846, -0.20533141493797302, 0.10991376638412476, -0.20951811969280243, 0.2924148142337799, 0.03207109495997429, 0.13261999189853668, -0.1456785500049591, -0.12368722259998322, -0.07256785780191422, -0.11026689410209656, 0.2603495121002197, -0.05587319657206535, -0.2727077901363373, 0.11994125694036484, -0.20020076632499695, -0.030799148604273796, -0.1286308914422989, 0.328045517206192, 0.15331414341926575, 0.2899933457374573, 0.032342299818992615, -0.22777004539966583, 0.3998813033103943, -0.3358047306537628, -0.33625999093055725, -0.18469901382923126, 0.18101884424686432, -0.2116558849811554, -0.3600911498069763, -0.516312301158905, -0.35795679688453674, 0.3601655662059784, 0.026732822880148888, -0.5006998777389526, -0.08825458586215973, -0.2791072726249695, -0.09967903792858124, -0.25185298919677734, 0.47531211376190186, 0.15299928188323975, -0.13949202001094818, 0.6449894309043884, -0.325878381729126 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Thank you for the quick reply! I have `pyarrow==4.0.0`, and I am installing with `pip`. It's not one of my explicit dependencies, so I assume it came along with something else.
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
31
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Thank you for the quick reply! I have `pyarrow==4.0.0`, and I am installing with `pip`. It's not one of my explicit dependencies, so I assume it came along with something else.
[ -0.4569721519947052, -0.21739071607589722, 0.02287772297859192, 0.4219464063644409, 0.3113080859184265, -0.22648242115974426, 0.23613497614860535, 0.1525057703256607, 0.04312627390027046, 0.3643296957015991, 0.5303289294242859, 0.29797887802124023, -0.33465102314949036, -0.04657025635242462, 0.04772935435175896, -0.026568226516246796, 0.36591342091560364, -0.21823543310165405, 0.25115013122558594, 0.3584372401237488, -0.2708789110183716, 0.16277006268501282, -0.4191712737083435, 0.29371267557144165, -0.26529568433761597, 0.08224396407604218, -0.10502300411462784, 0.28656280040740967, -0.09741594642400742, -0.5258923172950745, -0.03057578206062317, -0.2955249845981598, 0.19126220047473907, 0.45836788415908813, -0.00011823354725493118, -0.09135564416646957, 0.21397219598293304, 0.012012546882033348, 0.09307025372982025, -0.44300878047943115, -0.2259862720966339, -0.2528822124004364, -0.1637299507856369, -0.04087261110544205, 0.31339263916015625, 0.004678359720855951, -0.06639478355646133, -0.15027812123298645, 0.07593069970607758, 0.7205309867858887, 0.15910951793193817, 0.21483276784420013, 0.2288714498281479, -0.11200140416622162, 0.01633945107460022, 0.13414724171161652, -0.030597057193517685, 0.06143795698881149, 0.4003655016422272, -0.20039476454257965, 0.02491454780101776, -0.16739480197429657, 0.09280787408351898, -0.26698073744773865, 0.3059387505054474, -0.12271050363779068, 0.1998043954372406, -0.6616147756576538, 0.2974797487258911, -0.17242774367332458, -0.16359654068946838, -0.28783419728279114, -0.05091964453458786, -0.16323140263557434, -0.14308398962020874, -0.22301499545574188, 0.1774134337902069, -0.16718846559524536, -0.15712358057498932, 0.08328606188297272, -0.2861917018890381, 0.1699507087469101, 0.03356192260980606, 0.30864423513412476, -0.3192942440509796, 0.4002261459827423, -0.002978375181555748, 0.38961872458457947, 0.12629513442516327, -0.2813792824745178, -0.34202849864959717, 0.1340494304895401, -0.04152896627783775, 0.26742252707481384, -0.2257159799337387, -0.16636747121810913, 0.1507890671491623, -0.17385870218276978, 0.2904582917690277, -0.24060450494289398, -0.165643110871315, 0.2874029576778412, 0.048613205552101135, 0.21331027150154114, 0.2980204224586487, -0.020956870168447495, 0.30214184522628784, 0.3840675950050354, 0.04991067945957184, -0.05606452748179436, -0.1028033196926117, -0.040040522813797, 0.22646616399288177, -0.11676239967346191, 0.08925189077854156, 0.1257731020450592, 0.07402390241622925, -0.15347833931446075, -0.11980146914720535, 0.42945876717567444, -0.2137422263622284, 0.27730464935302734, 0.31860989332199097, 0.29638317227363586, 0.3739156723022461, 0.22702822089195251, -0.2862904667854309, 0.03387364372611046, -0.2570648193359375, -0.08717714250087738, -0.04427818953990936, -0.20067721605300903, -0.37084487080574036, 0.09926425665616989, -0.0057360343635082245, 0.23963423073291779, 0.15276452898979187, 0.04504792392253876, 0.22123219072818756, -0.539868950843811, 0.11252237856388092, -0.2573072910308838, 0.13399150967597961, 0.03508372604846954, -0.29419973492622375, 0.14081695675849915, 0.11566770076751709, -0.12368302792310715, -0.16609922051429749, 0.16718050837516785, -0.2124159038066864, -0.24575825035572052, -0.14749804139137268, 0.15607726573944092, -0.004165010526776314, 0.43751877546310425, -0.061790190637111664, 0.32287028431892395, 0.3464184105396271, -0.32850363850593567, -0.025873325765132904, -0.3166901469230652, -0.4711766839027405, -0.26923736929893494, -0.04782264679670334, 0.2325533926486969, -0.11913460493087769, 0.029882609844207764, 0.200078547000885, 0.0202774740755558, 0.09413165599107742, 0.16296707093715668, -0.19793540239334106, -0.017758533358573914, -0.19113673269748688, 0.524368405342102, 0.2797341048717499, -0.06436370313167572, -0.49060383439064026, 0.11027717590332031, -0.2673048973083496, -0.19815197587013245, -0.4909544587135315, -0.15601299703121185, 0.40234342217445374, -0.20736774802207947, 0.42602911591529846, -0.016893047839403152, -0.14121435582637787, 0.11838548630475998, -0.3067173957824707, 0.09499749541282654, 0.1623566448688507, -0.14624184370040894, 0.08063695579767227, -0.16650211811065674, 0.18311762809753418, -0.07083413749933243, 0.020328227430582047, 0.00462881475687027, -0.042651236057281494, 0.2887401580810547, 0.21363481879234314, -0.07819351553916931, 0.035179369151592255, -0.30482015013694763, -0.06837979704141617, 0.22688183188438416, 0.03475944697856903, -0.08886170387268066, -0.028239309787750244, 0.010514654219150543, -0.04116593301296234, 0.3073398172855377, 0.1391109675168991, -0.10586318373680115, 0.021638356149196625, -0.12469810247421265, 0.0030890926718711853, -0.06615336239337921, -0.03760569170117378, -0.019784485921263695, -0.18851040303707123, 0.024668186902999878, -0.06323587894439697, -0.12725991010665894, -0.201030433177948, -0.16466283798217773, -0.38877031207084656, 0.1416737586259842, 0.4239655137062073, -0.006467022001743317, -0.23094239830970764, 0.5506322383880615, 0.3362872898578644, -0.24848894774913788, -0.6358664035797119, -0.08476550877094269, 0.3994867503643036, -0.1538936346769333, 0.16345219314098358, 0.08694528043270111, -0.012666955590248108, -0.13238057494163513, 0.19112184643745422, 0.22163790464401245, 0.28241515159606934, 0.15726391971111298, -0.09599728137254715, 0.04253821074962616, 0.16591575741767883, 0.12296855449676514, 0.03259478509426117, -0.19979235529899597, -0.0025341250002384186, 0.1199667751789093, 0.05610499903559685, -0.0478549599647522, -0.04797380790114403, 0.23610076308250427, 0.2793259918689728, -0.07611249387264252, 0.12380902469158173, 0.05804479867219925, -0.16852086782455444, -0.056746985763311386, 0.2826823592185974, -0.013606894761323929, 0.6230340003967285, 0.0613570362329483, -0.028773237019777298, 0.004042875021696091, -0.38019251823425293, -0.033628009259700775, 0.13357266783714294, 0.07825495302677155, -0.12283698469400406, 0.05036197975277901, 0.2556922733783722, 0.15972283482551575, -0.19245433807373047, -0.379513680934906, 0.019982455298304558, 0.3146325945854187, -0.461221843957901, 0.20407892763614655, -0.11882218718528748, 0.21363726258277893, -0.0778883546590805, -0.17068760097026825, -0.175323486328125, -0.3915610611438751, -0.03860628604888916, 0.12130311131477356, 0.005078412592411041, 0.15825411677360535, 0.0887686014175415, -0.14176298677921295, 0.04338977485895157, 0.31263360381126404, 0.26207196712493896, -0.004213816951960325, -0.4652629494667053, -0.1256636530160904, 0.3646598160266876, -0.14263124763965607, 0.180757537484169, 0.15967296063899994, -0.42311424016952515, -0.13777008652687073, -0.554107666015625, 0.03621675819158554, 0.04581303521990776, 0.2179298996925354, 0.06505322456359863, 0.00027339160442352295, -0.14179036021232605, -0.06400586664676666, 0.16275113821029663, -0.07101507484912872, -0.05115281045436859, 0.11676183342933655, 0.17636333405971527, -0.3484145700931549, -0.4004398286342621, 0.08108198642730713, -0.24044539034366608, -0.22788895666599274, 0.039897650480270386, 0.05621704086661339, 0.2899165153503418, 0.03360116854310036, 0.3173657953739166, 0.2378726750612259, 0.064022958278656, -0.26992011070251465, -0.2033461332321167, 0.21200913190841675, -0.05095637962222099, -0.14758113026618958, -0.2852531969547272, -0.07525750994682312, 0.1772032082080841, -0.02296767756342888, 0.26503264904022217, -0.2499951273202896, -0.05352465435862541, -0.06592041254043579, 0.3023354411125183, -0.10448992252349854, -0.2844485938549042, 0.3918755352497101, 0.10788242518901825, 0.04797174781560898, -0.00432128831744194, -0.38120725750923157, -0.06521051377058029, -0.22015973925590515, 0.18795230984687805, -0.004087049514055252, 0.520758330821991, 0.15794217586517334, 0.506637692451477, 0.33181411027908325, -0.5369666814804077, 0.1717594563961029, -0.2706901431083679, 0.1213344931602478, -0.15669187903404236, -0.12802262604236603, 0.30131107568740845, 0.040945202112197876, -0.062436576932668686, 0.1361878663301468, -0.06296424567699432, -0.4967781603336334, 0.051886171102523804, 0.08034946024417877, -0.016802122816443443, -0.28508850932121277, 0.15080535411834717, -0.060296863317489624, 0.26370275020599365, -0.1313890665769577, 0.3329266607761383, -0.24990157783031464, -0.0794401690363884, -0.16358113288879395, -0.09733469784259796, -0.1765633523464203, -0.04664992541074753, -0.5345151424407959, -0.10867254436016083, -0.6624093651771545, 0.32212018966674805, 0.19392666220664978, 0.783557116985321, 0.021418165415525436, -0.08244404941797256, -0.2468024045228958, -0.16819913685321808, 0.6353745460510254, -0.3002033531665802, 0.07239054888486862, -0.004512925632297993, 0.09881830215454102, -0.6122601628303528, -0.12567299604415894, -0.014384865760803223, 0.6673839688301086, 0.2643592953681946, 0.9284404516220093, 0.046359769999980927, 0.04595968872308731, 0.04348129779100418, 0.01782706007361412, 0.1433940976858139, -0.06521036475896835, -0.010504201054573059, -0.05995357036590576, -0.17638355493545532, 0.19569706916809082, 0.23711253702640533, 0.20747676491737366, -0.015740498900413513, -0.4159710109233856, 0.0754312202334404, -0.3766656816005707, 0.20110023021697998, 0.1319936066865921, 0.20846626162528992, -0.2982681095600128, 0.11402678489685059, -0.07841572910547256, -0.15737910568714142, 0.28037357330322266, -0.18816395103931427, 0.026479505002498627, -0.3439127206802368, 0.2833440899848938, 0.15300238132476807, 0.1995316594839096, 0.4269762933254242, -0.041670363396406174, 0.10616391897201538, -0.34215065836906433, 0.31230592727661133, -0.20471040904521942, 0.2691141963005066, 0.25358134508132935, 0.21678248047828674, -0.569343090057373, 0.07999088615179062, 0.1540469229221344, 0.09059037268161774, -0.07607687264680862, 0.3940849006175995, -0.3681705594062805, -0.46196448802948, 0.34346210956573486, 0.1300136297941208, 0.8483024835586548, 0.036421358585357666, -0.08160313963890076, -0.19214385747909546, 0.16613908112049103, 0.16867026686668396, -0.18581677973270416, -0.050730228424072266, -0.3904625475406647, -0.15572315454483032, -0.06776744872331619, -0.142049640417099, 0.09833000600337982, 0.07276610285043716, -0.3925172984600067, 0.11290992051362991, 0.10997560620307922, 0.44247564673423767, -0.0006537958979606628, 0.09435218572616577, -0.14287462830543518, -0.127334326505661, -0.06860169023275375, 0.15705344080924988, 0.12384022772312164, -0.23216214776039124, -0.14562323689460754, 0.34690433740615845, 0.14317171275615692, -0.461387574672699, -0.6201134324073792, -0.0647352933883667, -0.5778714418411255, 0.1768624484539032, 0.18120403587818146, 0.23003824055194855, 0.16449721157550812, 0.30127421021461487, 0.07099738717079163, 0.5061187148094177, -0.2116406261920929, -0.02450709417462349, 0.039230458438396454, 0.051251426339149475, 0.14692233502864838, -0.1345069259405136, -0.017681920900940895, 0.09106313437223434, -0.03277989476919174, 0.06409239768981934, 0.0010583838447928429, 0.11643306910991669, -0.5018935203552246, 0.26541709899902344, 0.40295863151550293, -0.1964792162179947, -0.20898637175559998, -0.27721044421195984, -0.18969443440437317, -0.22308145463466644, 0.07184633612632751, 0.08424412459135056, -0.14883200824260712, 0.13945576548576355, -0.15316511690616608, -0.23921577632427216, 0.030135678127408028, 0.45752280950546265, -0.22565194964408875, 0.0981040894985199, -0.015493005514144897, 0.07850302755832672, -0.06773082911968231, -0.1901303231716156, 0.2326970398426056, -0.12375564128160477, -0.03255204111337662, -0.22311913967132568, -0.20077767968177795, -0.09842392802238464, 0.1080038771033287, 0.06069353222846985, 0.11290714144706726, 0.026253119111061096, -0.01600884273648262, -0.5448375940322876, -0.49196571111679077, -0.007314562797546387, -0.04543985798954964, 0.31451693177223206, -0.01650216430425644, 0.0936863124370575, -0.21283142268657684, 0.13641567528247833, -0.21793998777866364, 0.16660720109939575, -0.06328946352005005, 0.20862044394016266, -0.02762090042233467, 0.09834463894367218, -0.16325533390045166, -0.1979132443666458, 0.06050387769937515, 0.7531206011772156, -0.23598337173461914, -0.09428669512271881, -0.05259176343679428, 0.13793405890464783, 0.2398592233657837, -0.1094309538602829, -0.10331594198942184, -0.02726145088672638, 0.1039244532585144, -0.2421071082353592, 0.10288393497467041, 0.22689580917358398, -0.20341350138187408, -0.1315961629152298, 0.6177958250045776, 0.38157960772514343, 0.193136066198349, 0.3575398325920105, 0.019176490604877472, 0.2638328969478607, 0.14654229581356049, 0.36212146282196045, 0.10019677877426147, -0.0010372549295425415, -0.08830587565898895, 0.28169742226600647, 0.06608988344669342, 0.15879210829734802, 0.20862624049186707, -0.09504519402980804, 0.1765190064907074, 0.09129530191421509, -0.03936607763171196, 0.3638715147972107, -0.4002840518951416, -0.06394601613283157, 0.19166028499603271, 0.1843821257352829, 0.03246765583753586, -0.23941132426261902, 0.30492764711380005, 0.18777748942375183, 0.006403908133506775, 0.26586422324180603, 0.036289092153310776, -0.37854453921318054, 0.0793161690235138, 0.2469055950641632, 0.35297706723213196, -0.03889194875955582, -0.03706003725528717, 0.25870028138160706, -0.21215464174747467, 0.10432234406471252, 0.20334392786026, -0.19469182193279266, 0.3131904900074005, 0.6266696453094482, -0.07402137666940689, 0.42741909623146057, 0.12573450803756714, 0.06308965384960175, -0.005494318902492523, -0.24834802746772766, 0.08081858605146408, 0.4405093193054199, -0.18372780084609985, 0.15008580684661865, 0.06208648532629013, 0.2579610347747803, -0.32508718967437744, -0.1628500521183014, 0.08238128572702408, 0.07849811017513275, -0.323533296585083, -0.0777551680803299, -0.06416641920804977, -0.15242654085159302, -0.18515533208847046, 0.02980632707476616, -0.14911098778247833, -0.13427358865737915, 0.30586400628089905, 0.10573376715183258, -0.38693368434906006, -0.2465467005968094, -0.08429697901010513, 0.04624613747000694, -0.025434039533138275, -0.2964482605457306, 0.5547581315040588, -0.16527022421360016, 0.20516417920589447, 0.15157663822174072, -0.1810007393360138, 0.5931910276412964, 0.645906388759613, -0.22873947024345398, 0.1645231693983078, 0.1871112585067749, 0.03692842274904251, -0.023607319220900536, 0.1389954388141632, 0.006493106484413147, 0.20903339982032776, 0.2872695326805115, 0.03199800103902817, -0.14424967765808105, -0.14727303385734558, 0.33585652709007263, 0.2155427783727646, -0.05121766775846481, 0.1997407227754593, -0.2628280222415924, -0.18704845011234283, 0.001991763710975647, -0.030752435326576233, -0.16916561126708984, -0.055350154638290405, 0.38151150941848755, -0.005679415538907051, 0.40611574053764343, -0.14109477400779724, 0.05566829442977905, 0.11248667538166046, 0.16584083437919617, 0.21607190370559692, -0.1539393663406372, -0.40257686376571655, -0.3473493456840515, -0.39319345355033875, 0.3725886046886444, -0.23258888721466064, 0.16857479512691498, 0.06813699752092361, -0.23746472597122192, -0.0817606970667839, 0.003409218043088913, 0.17848555743694305, 0.2687874734401703, -0.0693599283695221, 0.5016834139823914, -0.3206636905670166, -0.04342157021164894, -0.07294075191020966, -0.1339513510465622, 0.2401040494441986, -0.4375869035720825, 0.4043384790420532, -0.3041532337665558, -0.014326315373182297, -0.19157156348228455, 0.005374923348426819, -0.22793161869049072, -0.03722674399614334, 0.6843006610870361, 0.21503624320030212, 0.40693098306655884, -0.032938797026872635, 0.11056310683488846, -0.20533141493797302, 0.10991376638412476, -0.20951811969280243, 0.2924148142337799, 0.03207109495997429, 0.13261999189853668, -0.1456785500049591, -0.12368722259998322, -0.07256785780191422, -0.11026689410209656, 0.2603495121002197, -0.05587319657206535, -0.2727077901363373, 0.11994125694036484, -0.20020076632499695, -0.030799148604273796, -0.1286308914422989, 0.328045517206192, 0.15331414341926575, 0.2899933457374573, 0.032342299818992615, -0.22777004539966583, 0.3998813033103943, -0.3358047306537628, -0.33625999093055725, -0.18469901382923126, 0.18101884424686432, -0.2116558849811554, -0.3600911498069763, -0.516312301158905, -0.35795679688453674, 0.3601655662059784, 0.026732822880148888, -0.5006998777389526, -0.08825458586215973, -0.2791072726249695, -0.09967903792858124, -0.25185298919677734, 0.47531211376190186, 0.15299928188323975, -0.13949202001094818, 0.6449894309043884, -0.325878381729126 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Could you trying reinstalling pyarrow with pip ? I'm not sure why it would check in your multicurtural-sc directory for source files.
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
22
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Could you trying reinstalling pyarrow with pip ? I'm not sure why it would check in your multicurtural-sc directory for source files.
[ -0.4569721519947052, -0.21739071607589722, 0.02287772297859192, 0.4219464063644409, 0.3113080859184265, -0.22648242115974426, 0.23613497614860535, 0.1525057703256607, 0.04312627390027046, 0.3643296957015991, 0.5303289294242859, 0.29797887802124023, -0.33465102314949036, -0.04657025635242462, 0.04772935435175896, -0.026568226516246796, 0.36591342091560364, -0.21823543310165405, 0.25115013122558594, 0.3584372401237488, -0.2708789110183716, 0.16277006268501282, -0.4191712737083435, 0.29371267557144165, -0.26529568433761597, 0.08224396407604218, -0.10502300411462784, 0.28656280040740967, -0.09741594642400742, -0.5258923172950745, -0.03057578206062317, -0.2955249845981598, 0.19126220047473907, 0.45836788415908813, -0.00011823354725493118, -0.09135564416646957, 0.21397219598293304, 0.012012546882033348, 0.09307025372982025, -0.44300878047943115, -0.2259862720966339, -0.2528822124004364, -0.1637299507856369, -0.04087261110544205, 0.31339263916015625, 0.004678359720855951, -0.06639478355646133, -0.15027812123298645, 0.07593069970607758, 0.7205309867858887, 0.15910951793193817, 0.21483276784420013, 0.2288714498281479, -0.11200140416622162, 0.01633945107460022, 0.13414724171161652, -0.030597057193517685, 0.06143795698881149, 0.4003655016422272, -0.20039476454257965, 0.02491454780101776, -0.16739480197429657, 0.09280787408351898, -0.26698073744773865, 0.3059387505054474, -0.12271050363779068, 0.1998043954372406, -0.6616147756576538, 0.2974797487258911, -0.17242774367332458, -0.16359654068946838, -0.28783419728279114, -0.05091964453458786, -0.16323140263557434, -0.14308398962020874, -0.22301499545574188, 0.1774134337902069, -0.16718846559524536, -0.15712358057498932, 0.08328606188297272, -0.2861917018890381, 0.1699507087469101, 0.03356192260980606, 0.30864423513412476, -0.3192942440509796, 0.4002261459827423, -0.002978375181555748, 0.38961872458457947, 0.12629513442516327, -0.2813792824745178, -0.34202849864959717, 0.1340494304895401, -0.04152896627783775, 0.26742252707481384, -0.2257159799337387, -0.16636747121810913, 0.1507890671491623, -0.17385870218276978, 0.2904582917690277, -0.24060450494289398, -0.165643110871315, 0.2874029576778412, 0.048613205552101135, 0.21331027150154114, 0.2980204224586487, -0.020956870168447495, 0.30214184522628784, 0.3840675950050354, 0.04991067945957184, -0.05606452748179436, -0.1028033196926117, -0.040040522813797, 0.22646616399288177, -0.11676239967346191, 0.08925189077854156, 0.1257731020450592, 0.07402390241622925, -0.15347833931446075, -0.11980146914720535, 0.42945876717567444, -0.2137422263622284, 0.27730464935302734, 0.31860989332199097, 0.29638317227363586, 0.3739156723022461, 0.22702822089195251, -0.2862904667854309, 0.03387364372611046, -0.2570648193359375, -0.08717714250087738, -0.04427818953990936, -0.20067721605300903, -0.37084487080574036, 0.09926425665616989, -0.0057360343635082245, 0.23963423073291779, 0.15276452898979187, 0.04504792392253876, 0.22123219072818756, -0.539868950843811, 0.11252237856388092, -0.2573072910308838, 0.13399150967597961, 0.03508372604846954, -0.29419973492622375, 0.14081695675849915, 0.11566770076751709, -0.12368302792310715, -0.16609922051429749, 0.16718050837516785, -0.2124159038066864, -0.24575825035572052, -0.14749804139137268, 0.15607726573944092, -0.004165010526776314, 0.43751877546310425, -0.061790190637111664, 0.32287028431892395, 0.3464184105396271, -0.32850363850593567, -0.025873325765132904, -0.3166901469230652, -0.4711766839027405, -0.26923736929893494, -0.04782264679670334, 0.2325533926486969, -0.11913460493087769, 0.029882609844207764, 0.200078547000885, 0.0202774740755558, 0.09413165599107742, 0.16296707093715668, -0.19793540239334106, -0.017758533358573914, -0.19113673269748688, 0.524368405342102, 0.2797341048717499, -0.06436370313167572, -0.49060383439064026, 0.11027717590332031, -0.2673048973083496, -0.19815197587013245, -0.4909544587135315, -0.15601299703121185, 0.40234342217445374, -0.20736774802207947, 0.42602911591529846, -0.016893047839403152, -0.14121435582637787, 0.11838548630475998, -0.3067173957824707, 0.09499749541282654, 0.1623566448688507, -0.14624184370040894, 0.08063695579767227, -0.16650211811065674, 0.18311762809753418, -0.07083413749933243, 0.020328227430582047, 0.00462881475687027, -0.042651236057281494, 0.2887401580810547, 0.21363481879234314, -0.07819351553916931, 0.035179369151592255, -0.30482015013694763, -0.06837979704141617, 0.22688183188438416, 0.03475944697856903, -0.08886170387268066, -0.028239309787750244, 0.010514654219150543, -0.04116593301296234, 0.3073398172855377, 0.1391109675168991, -0.10586318373680115, 0.021638356149196625, -0.12469810247421265, 0.0030890926718711853, -0.06615336239337921, -0.03760569170117378, -0.019784485921263695, -0.18851040303707123, 0.024668186902999878, -0.06323587894439697, -0.12725991010665894, -0.201030433177948, -0.16466283798217773, -0.38877031207084656, 0.1416737586259842, 0.4239655137062073, -0.006467022001743317, -0.23094239830970764, 0.5506322383880615, 0.3362872898578644, -0.24848894774913788, -0.6358664035797119, -0.08476550877094269, 0.3994867503643036, -0.1538936346769333, 0.16345219314098358, 0.08694528043270111, -0.012666955590248108, -0.13238057494163513, 0.19112184643745422, 0.22163790464401245, 0.28241515159606934, 0.15726391971111298, -0.09599728137254715, 0.04253821074962616, 0.16591575741767883, 0.12296855449676514, 0.03259478509426117, -0.19979235529899597, -0.0025341250002384186, 0.1199667751789093, 0.05610499903559685, -0.0478549599647522, -0.04797380790114403, 0.23610076308250427, 0.2793259918689728, -0.07611249387264252, 0.12380902469158173, 0.05804479867219925, -0.16852086782455444, -0.056746985763311386, 0.2826823592185974, -0.013606894761323929, 0.6230340003967285, 0.0613570362329483, -0.028773237019777298, 0.004042875021696091, -0.38019251823425293, -0.033628009259700775, 0.13357266783714294, 0.07825495302677155, -0.12283698469400406, 0.05036197975277901, 0.2556922733783722, 0.15972283482551575, -0.19245433807373047, -0.379513680934906, 0.019982455298304558, 0.3146325945854187, -0.461221843957901, 0.20407892763614655, -0.11882218718528748, 0.21363726258277893, -0.0778883546590805, -0.17068760097026825, -0.175323486328125, -0.3915610611438751, -0.03860628604888916, 0.12130311131477356, 0.005078412592411041, 0.15825411677360535, 0.0887686014175415, -0.14176298677921295, 0.04338977485895157, 0.31263360381126404, 0.26207196712493896, -0.004213816951960325, -0.4652629494667053, -0.1256636530160904, 0.3646598160266876, -0.14263124763965607, 0.180757537484169, 0.15967296063899994, -0.42311424016952515, -0.13777008652687073, -0.554107666015625, 0.03621675819158554, 0.04581303521990776, 0.2179298996925354, 0.06505322456359863, 0.00027339160442352295, -0.14179036021232605, -0.06400586664676666, 0.16275113821029663, -0.07101507484912872, -0.05115281045436859, 0.11676183342933655, 0.17636333405971527, -0.3484145700931549, -0.4004398286342621, 0.08108198642730713, -0.24044539034366608, -0.22788895666599274, 0.039897650480270386, 0.05621704086661339, 0.2899165153503418, 0.03360116854310036, 0.3173657953739166, 0.2378726750612259, 0.064022958278656, -0.26992011070251465, -0.2033461332321167, 0.21200913190841675, -0.05095637962222099, -0.14758113026618958, -0.2852531969547272, -0.07525750994682312, 0.1772032082080841, -0.02296767756342888, 0.26503264904022217, -0.2499951273202896, -0.05352465435862541, -0.06592041254043579, 0.3023354411125183, -0.10448992252349854, -0.2844485938549042, 0.3918755352497101, 0.10788242518901825, 0.04797174781560898, -0.00432128831744194, -0.38120725750923157, -0.06521051377058029, -0.22015973925590515, 0.18795230984687805, -0.004087049514055252, 0.520758330821991, 0.15794217586517334, 0.506637692451477, 0.33181411027908325, -0.5369666814804077, 0.1717594563961029, -0.2706901431083679, 0.1213344931602478, -0.15669187903404236, -0.12802262604236603, 0.30131107568740845, 0.040945202112197876, -0.062436576932668686, 0.1361878663301468, -0.06296424567699432, -0.4967781603336334, 0.051886171102523804, 0.08034946024417877, -0.016802122816443443, -0.28508850932121277, 0.15080535411834717, -0.060296863317489624, 0.26370275020599365, -0.1313890665769577, 0.3329266607761383, -0.24990157783031464, -0.0794401690363884, -0.16358113288879395, -0.09733469784259796, -0.1765633523464203, -0.04664992541074753, -0.5345151424407959, -0.10867254436016083, -0.6624093651771545, 0.32212018966674805, 0.19392666220664978, 0.783557116985321, 0.021418165415525436, -0.08244404941797256, -0.2468024045228958, -0.16819913685321808, 0.6353745460510254, -0.3002033531665802, 0.07239054888486862, -0.004512925632297993, 0.09881830215454102, -0.6122601628303528, -0.12567299604415894, -0.014384865760803223, 0.6673839688301086, 0.2643592953681946, 0.9284404516220093, 0.046359769999980927, 0.04595968872308731, 0.04348129779100418, 0.01782706007361412, 0.1433940976858139, -0.06521036475896835, -0.010504201054573059, -0.05995357036590576, -0.17638355493545532, 0.19569706916809082, 0.23711253702640533, 0.20747676491737366, -0.015740498900413513, -0.4159710109233856, 0.0754312202334404, -0.3766656816005707, 0.20110023021697998, 0.1319936066865921, 0.20846626162528992, -0.2982681095600128, 0.11402678489685059, -0.07841572910547256, -0.15737910568714142, 0.28037357330322266, -0.18816395103931427, 0.026479505002498627, -0.3439127206802368, 0.2833440899848938, 0.15300238132476807, 0.1995316594839096, 0.4269762933254242, -0.041670363396406174, 0.10616391897201538, -0.34215065836906433, 0.31230592727661133, -0.20471040904521942, 0.2691141963005066, 0.25358134508132935, 0.21678248047828674, -0.569343090057373, 0.07999088615179062, 0.1540469229221344, 0.09059037268161774, -0.07607687264680862, 0.3940849006175995, -0.3681705594062805, -0.46196448802948, 0.34346210956573486, 0.1300136297941208, 0.8483024835586548, 0.036421358585357666, -0.08160313963890076, -0.19214385747909546, 0.16613908112049103, 0.16867026686668396, -0.18581677973270416, -0.050730228424072266, -0.3904625475406647, -0.15572315454483032, -0.06776744872331619, -0.142049640417099, 0.09833000600337982, 0.07276610285043716, -0.3925172984600067, 0.11290992051362991, 0.10997560620307922, 0.44247564673423767, -0.0006537958979606628, 0.09435218572616577, -0.14287462830543518, -0.127334326505661, -0.06860169023275375, 0.15705344080924988, 0.12384022772312164, -0.23216214776039124, -0.14562323689460754, 0.34690433740615845, 0.14317171275615692, -0.461387574672699, -0.6201134324073792, -0.0647352933883667, -0.5778714418411255, 0.1768624484539032, 0.18120403587818146, 0.23003824055194855, 0.16449721157550812, 0.30127421021461487, 0.07099738717079163, 0.5061187148094177, -0.2116406261920929, -0.02450709417462349, 0.039230458438396454, 0.051251426339149475, 0.14692233502864838, -0.1345069259405136, -0.017681920900940895, 0.09106313437223434, -0.03277989476919174, 0.06409239768981934, 0.0010583838447928429, 0.11643306910991669, -0.5018935203552246, 0.26541709899902344, 0.40295863151550293, -0.1964792162179947, -0.20898637175559998, -0.27721044421195984, -0.18969443440437317, -0.22308145463466644, 0.07184633612632751, 0.08424412459135056, -0.14883200824260712, 0.13945576548576355, -0.15316511690616608, -0.23921577632427216, 0.030135678127408028, 0.45752280950546265, -0.22565194964408875, 0.0981040894985199, -0.015493005514144897, 0.07850302755832672, -0.06773082911968231, -0.1901303231716156, 0.2326970398426056, -0.12375564128160477, -0.03255204111337662, -0.22311913967132568, -0.20077767968177795, -0.09842392802238464, 0.1080038771033287, 0.06069353222846985, 0.11290714144706726, 0.026253119111061096, -0.01600884273648262, -0.5448375940322876, -0.49196571111679077, -0.007314562797546387, -0.04543985798954964, 0.31451693177223206, -0.01650216430425644, 0.0936863124370575, -0.21283142268657684, 0.13641567528247833, -0.21793998777866364, 0.16660720109939575, -0.06328946352005005, 0.20862044394016266, -0.02762090042233467, 0.09834463894367218, -0.16325533390045166, -0.1979132443666458, 0.06050387769937515, 0.7531206011772156, -0.23598337173461914, -0.09428669512271881, -0.05259176343679428, 0.13793405890464783, 0.2398592233657837, -0.1094309538602829, -0.10331594198942184, -0.02726145088672638, 0.1039244532585144, -0.2421071082353592, 0.10288393497467041, 0.22689580917358398, -0.20341350138187408, -0.1315961629152298, 0.6177958250045776, 0.38157960772514343, 0.193136066198349, 0.3575398325920105, 0.019176490604877472, 0.2638328969478607, 0.14654229581356049, 0.36212146282196045, 0.10019677877426147, -0.0010372549295425415, -0.08830587565898895, 0.28169742226600647, 0.06608988344669342, 0.15879210829734802, 0.20862624049186707, -0.09504519402980804, 0.1765190064907074, 0.09129530191421509, -0.03936607763171196, 0.3638715147972107, -0.4002840518951416, -0.06394601613283157, 0.19166028499603271, 0.1843821257352829, 0.03246765583753586, -0.23941132426261902, 0.30492764711380005, 0.18777748942375183, 0.006403908133506775, 0.26586422324180603, 0.036289092153310776, -0.37854453921318054, 0.0793161690235138, 0.2469055950641632, 0.35297706723213196, -0.03889194875955582, -0.03706003725528717, 0.25870028138160706, -0.21215464174747467, 0.10432234406471252, 0.20334392786026, -0.19469182193279266, 0.3131904900074005, 0.6266696453094482, -0.07402137666940689, 0.42741909623146057, 0.12573450803756714, 0.06308965384960175, -0.005494318902492523, -0.24834802746772766, 0.08081858605146408, 0.4405093193054199, -0.18372780084609985, 0.15008580684661865, 0.06208648532629013, 0.2579610347747803, -0.32508718967437744, -0.1628500521183014, 0.08238128572702408, 0.07849811017513275, -0.323533296585083, -0.0777551680803299, -0.06416641920804977, -0.15242654085159302, -0.18515533208847046, 0.02980632707476616, -0.14911098778247833, -0.13427358865737915, 0.30586400628089905, 0.10573376715183258, -0.38693368434906006, -0.2465467005968094, -0.08429697901010513, 0.04624613747000694, -0.025434039533138275, -0.2964482605457306, 0.5547581315040588, -0.16527022421360016, 0.20516417920589447, 0.15157663822174072, -0.1810007393360138, 0.5931910276412964, 0.645906388759613, -0.22873947024345398, 0.1645231693983078, 0.1871112585067749, 0.03692842274904251, -0.023607319220900536, 0.1389954388141632, 0.006493106484413147, 0.20903339982032776, 0.2872695326805115, 0.03199800103902817, -0.14424967765808105, -0.14727303385734558, 0.33585652709007263, 0.2155427783727646, -0.05121766775846481, 0.1997407227754593, -0.2628280222415924, -0.18704845011234283, 0.001991763710975647, -0.030752435326576233, -0.16916561126708984, -0.055350154638290405, 0.38151150941848755, -0.005679415538907051, 0.40611574053764343, -0.14109477400779724, 0.05566829442977905, 0.11248667538166046, 0.16584083437919617, 0.21607190370559692, -0.1539393663406372, -0.40257686376571655, -0.3473493456840515, -0.39319345355033875, 0.3725886046886444, -0.23258888721466064, 0.16857479512691498, 0.06813699752092361, -0.23746472597122192, -0.0817606970667839, 0.003409218043088913, 0.17848555743694305, 0.2687874734401703, -0.0693599283695221, 0.5016834139823914, -0.3206636905670166, -0.04342157021164894, -0.07294075191020966, -0.1339513510465622, 0.2401040494441986, -0.4375869035720825, 0.4043384790420532, -0.3041532337665558, -0.014326315373182297, -0.19157156348228455, 0.005374923348426819, -0.22793161869049072, -0.03722674399614334, 0.6843006610870361, 0.21503624320030212, 0.40693098306655884, -0.032938797026872635, 0.11056310683488846, -0.20533141493797302, 0.10991376638412476, -0.20951811969280243, 0.2924148142337799, 0.03207109495997429, 0.13261999189853668, -0.1456785500049591, -0.12368722259998322, -0.07256785780191422, -0.11026689410209656, 0.2603495121002197, -0.05587319657206535, -0.2727077901363373, 0.11994125694036484, -0.20020076632499695, -0.030799148604273796, -0.1286308914422989, 0.328045517206192, 0.15331414341926575, 0.2899933457374573, 0.032342299818992615, -0.22777004539966583, 0.3998813033103943, -0.3358047306537628, -0.33625999093055725, -0.18469901382923126, 0.18101884424686432, -0.2116558849811554, -0.3600911498069763, -0.516312301158905, -0.35795679688453674, 0.3601655662059784, 0.026732822880148888, -0.5006998777389526, -0.08825458586215973, -0.2791072726249695, -0.09967903792858124, -0.25185298919677734, 0.47531211376190186, 0.15299928188323975, -0.13949202001094818, 0.6449894309043884, -0.325878381729126 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Sure! I tried reinstalling to get latest. pip was mad because it looks like Datasets currently wants <4.0.0 (which is interesting, because apparently I ended up with 4.0.0 already?), but I gave it a shot anyway: ```bash $ pip install --upgrade --force-reinstall pyarrow Collecting pyarrow Downloading pyarrow-4.0.1-cp39-cp39-manylinux2014_x86_64.whl (21.9 MB) |████████████████████████████████| 21.9 MB 23.8 MB/s Collecting numpy>=1.16.6 Using cached numpy-1.20.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB) Installing collected packages: numpy, pyarrow Attempting uninstall: numpy Found existing installation: numpy 1.20.3 Uninstalling numpy-1.20.3: Successfully uninstalled numpy-1.20.3 Attempting uninstall: pyarrow Found existing installation: pyarrow 3.0.0 Uninstalling pyarrow-3.0.0: Successfully uninstalled pyarrow-3.0.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 1.8.0 requires pyarrow<4.0.0,>=1.0.0, but you have pyarrow 4.0.1 which is incompatible. Successfully installed numpy-1.20.3 pyarrow-4.0.1 ``` Trying it, the same issue: ![image](https://user-images.githubusercontent.com/1170062/121730226-3f470b80-caa4-11eb-85a5-684c44c816da.png) I tried installing `"pyarrow<4.0.0"`, which gave me 3.0.0. Running, still, same issue. I agree it's weird that pyarrow is checking the source code directory for its files. (There is no `pyarrow/` directory there.) To me, that makes it seem like an issue with how pyarrow is called. Out of curiosity, I tried running this with fewer workers to see when the error arises: - 1: ✅ - 2: ✅ - 4: ✅ - 8: ✅ - 10: ✅ - 11: ❌ 🤔 - 12: ❌ - 16: ❌ - 32: ❌ checking my datasets: ```python >>> datasets DatasetDict({ train: Dataset({ features: ['text'], num_rows: 389290 }) validation.sc: Dataset({ features: ['text'], num_rows: 10 # 🤔 }) validation.wvs: Dataset({ features: ['text'], num_rows: 93928 }) }) ``` New hypothesis: crash if `num_proc` > length of a dataset? 😅 If so, this might be totally my fault, as the caller. Could be a docs fix, or maybe this library could do a check to limit `num_proc` for this case?
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
305
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Sure! I tried reinstalling to get latest. pip was mad because it looks like Datasets currently wants <4.0.0 (which is interesting, because apparently I ended up with 4.0.0 already?), but I gave it a shot anyway: ```bash $ pip install --upgrade --force-reinstall pyarrow Collecting pyarrow Downloading pyarrow-4.0.1-cp39-cp39-manylinux2014_x86_64.whl (21.9 MB) |████████████████████████████████| 21.9 MB 23.8 MB/s Collecting numpy>=1.16.6 Using cached numpy-1.20.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB) Installing collected packages: numpy, pyarrow Attempting uninstall: numpy Found existing installation: numpy 1.20.3 Uninstalling numpy-1.20.3: Successfully uninstalled numpy-1.20.3 Attempting uninstall: pyarrow Found existing installation: pyarrow 3.0.0 Uninstalling pyarrow-3.0.0: Successfully uninstalled pyarrow-3.0.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. datasets 1.8.0 requires pyarrow<4.0.0,>=1.0.0, but you have pyarrow 4.0.1 which is incompatible. Successfully installed numpy-1.20.3 pyarrow-4.0.1 ``` Trying it, the same issue: ![image](https://user-images.githubusercontent.com/1170062/121730226-3f470b80-caa4-11eb-85a5-684c44c816da.png) I tried installing `"pyarrow<4.0.0"`, which gave me 3.0.0. Running, still, same issue. I agree it's weird that pyarrow is checking the source code directory for its files. (There is no `pyarrow/` directory there.) To me, that makes it seem like an issue with how pyarrow is called. Out of curiosity, I tried running this with fewer workers to see when the error arises: - 1: ✅ - 2: ✅ - 4: ✅ - 8: ✅ - 10: ✅ - 11: ❌ 🤔 - 12: ❌ - 16: ❌ - 32: ❌ checking my datasets: ```python >>> datasets DatasetDict({ train: Dataset({ features: ['text'], num_rows: 389290 }) validation.sc: Dataset({ features: ['text'], num_rows: 10 # 🤔 }) validation.wvs: Dataset({ features: ['text'], num_rows: 93928 }) }) ``` New hypothesis: crash if `num_proc` > length of a dataset? 😅 If so, this might be totally my fault, as the caller. Could be a docs fix, or maybe this library could do a check to limit `num_proc` for this case?
[ -0.4569721519947052, -0.21739071607589722, 0.02287772297859192, 0.4219464063644409, 0.3113080859184265, -0.22648242115974426, 0.23613497614860535, 0.1525057703256607, 0.04312627390027046, 0.3643296957015991, 0.5303289294242859, 0.29797887802124023, -0.33465102314949036, -0.04657025635242462, 0.04772935435175896, -0.026568226516246796, 0.36591342091560364, -0.21823543310165405, 0.25115013122558594, 0.3584372401237488, -0.2708789110183716, 0.16277006268501282, -0.4191712737083435, 0.29371267557144165, -0.26529568433761597, 0.08224396407604218, -0.10502300411462784, 0.28656280040740967, -0.09741594642400742, -0.5258923172950745, -0.03057578206062317, -0.2955249845981598, 0.19126220047473907, 0.45836788415908813, -0.00011823354725493118, -0.09135564416646957, 0.21397219598293304, 0.012012546882033348, 0.09307025372982025, -0.44300878047943115, -0.2259862720966339, -0.2528822124004364, -0.1637299507856369, -0.04087261110544205, 0.31339263916015625, 0.004678359720855951, -0.06639478355646133, -0.15027812123298645, 0.07593069970607758, 0.7205309867858887, 0.15910951793193817, 0.21483276784420013, 0.2288714498281479, -0.11200140416622162, 0.01633945107460022, 0.13414724171161652, -0.030597057193517685, 0.06143795698881149, 0.4003655016422272, -0.20039476454257965, 0.02491454780101776, -0.16739480197429657, 0.09280787408351898, -0.26698073744773865, 0.3059387505054474, -0.12271050363779068, 0.1998043954372406, -0.6616147756576538, 0.2974797487258911, -0.17242774367332458, -0.16359654068946838, -0.28783419728279114, -0.05091964453458786, -0.16323140263557434, -0.14308398962020874, -0.22301499545574188, 0.1774134337902069, -0.16718846559524536, -0.15712358057498932, 0.08328606188297272, -0.2861917018890381, 0.1699507087469101, 0.03356192260980606, 0.30864423513412476, -0.3192942440509796, 0.4002261459827423, -0.002978375181555748, 0.38961872458457947, 0.12629513442516327, -0.2813792824745178, -0.34202849864959717, 0.1340494304895401, -0.04152896627783775, 0.26742252707481384, -0.2257159799337387, -0.16636747121810913, 0.1507890671491623, -0.17385870218276978, 0.2904582917690277, -0.24060450494289398, -0.165643110871315, 0.2874029576778412, 0.048613205552101135, 0.21331027150154114, 0.2980204224586487, -0.020956870168447495, 0.30214184522628784, 0.3840675950050354, 0.04991067945957184, -0.05606452748179436, -0.1028033196926117, -0.040040522813797, 0.22646616399288177, -0.11676239967346191, 0.08925189077854156, 0.1257731020450592, 0.07402390241622925, -0.15347833931446075, -0.11980146914720535, 0.42945876717567444, -0.2137422263622284, 0.27730464935302734, 0.31860989332199097, 0.29638317227363586, 0.3739156723022461, 0.22702822089195251, -0.2862904667854309, 0.03387364372611046, -0.2570648193359375, -0.08717714250087738, -0.04427818953990936, -0.20067721605300903, -0.37084487080574036, 0.09926425665616989, -0.0057360343635082245, 0.23963423073291779, 0.15276452898979187, 0.04504792392253876, 0.22123219072818756, -0.539868950843811, 0.11252237856388092, -0.2573072910308838, 0.13399150967597961, 0.03508372604846954, -0.29419973492622375, 0.14081695675849915, 0.11566770076751709, -0.12368302792310715, -0.16609922051429749, 0.16718050837516785, -0.2124159038066864, -0.24575825035572052, -0.14749804139137268, 0.15607726573944092, -0.004165010526776314, 0.43751877546310425, -0.061790190637111664, 0.32287028431892395, 0.3464184105396271, -0.32850363850593567, -0.025873325765132904, -0.3166901469230652, -0.4711766839027405, -0.26923736929893494, -0.04782264679670334, 0.2325533926486969, -0.11913460493087769, 0.029882609844207764, 0.200078547000885, 0.0202774740755558, 0.09413165599107742, 0.16296707093715668, -0.19793540239334106, -0.017758533358573914, -0.19113673269748688, 0.524368405342102, 0.2797341048717499, -0.06436370313167572, -0.49060383439064026, 0.11027717590332031, -0.2673048973083496, -0.19815197587013245, -0.4909544587135315, -0.15601299703121185, 0.40234342217445374, -0.20736774802207947, 0.42602911591529846, -0.016893047839403152, -0.14121435582637787, 0.11838548630475998, -0.3067173957824707, 0.09499749541282654, 0.1623566448688507, -0.14624184370040894, 0.08063695579767227, -0.16650211811065674, 0.18311762809753418, -0.07083413749933243, 0.020328227430582047, 0.00462881475687027, -0.042651236057281494, 0.2887401580810547, 0.21363481879234314, -0.07819351553916931, 0.035179369151592255, -0.30482015013694763, -0.06837979704141617, 0.22688183188438416, 0.03475944697856903, -0.08886170387268066, -0.028239309787750244, 0.010514654219150543, -0.04116593301296234, 0.3073398172855377, 0.1391109675168991, -0.10586318373680115, 0.021638356149196625, -0.12469810247421265, 0.0030890926718711853, -0.06615336239337921, -0.03760569170117378, -0.019784485921263695, -0.18851040303707123, 0.024668186902999878, -0.06323587894439697, -0.12725991010665894, -0.201030433177948, -0.16466283798217773, -0.38877031207084656, 0.1416737586259842, 0.4239655137062073, -0.006467022001743317, -0.23094239830970764, 0.5506322383880615, 0.3362872898578644, -0.24848894774913788, -0.6358664035797119, -0.08476550877094269, 0.3994867503643036, -0.1538936346769333, 0.16345219314098358, 0.08694528043270111, -0.012666955590248108, -0.13238057494163513, 0.19112184643745422, 0.22163790464401245, 0.28241515159606934, 0.15726391971111298, -0.09599728137254715, 0.04253821074962616, 0.16591575741767883, 0.12296855449676514, 0.03259478509426117, -0.19979235529899597, -0.0025341250002384186, 0.1199667751789093, 0.05610499903559685, -0.0478549599647522, -0.04797380790114403, 0.23610076308250427, 0.2793259918689728, -0.07611249387264252, 0.12380902469158173, 0.05804479867219925, -0.16852086782455444, -0.056746985763311386, 0.2826823592185974, -0.013606894761323929, 0.6230340003967285, 0.0613570362329483, -0.028773237019777298, 0.004042875021696091, -0.38019251823425293, -0.033628009259700775, 0.13357266783714294, 0.07825495302677155, -0.12283698469400406, 0.05036197975277901, 0.2556922733783722, 0.15972283482551575, -0.19245433807373047, -0.379513680934906, 0.019982455298304558, 0.3146325945854187, -0.461221843957901, 0.20407892763614655, -0.11882218718528748, 0.21363726258277893, -0.0778883546590805, -0.17068760097026825, -0.175323486328125, -0.3915610611438751, -0.03860628604888916, 0.12130311131477356, 0.005078412592411041, 0.15825411677360535, 0.0887686014175415, -0.14176298677921295, 0.04338977485895157, 0.31263360381126404, 0.26207196712493896, -0.004213816951960325, -0.4652629494667053, -0.1256636530160904, 0.3646598160266876, -0.14263124763965607, 0.180757537484169, 0.15967296063899994, -0.42311424016952515, -0.13777008652687073, -0.554107666015625, 0.03621675819158554, 0.04581303521990776, 0.2179298996925354, 0.06505322456359863, 0.00027339160442352295, -0.14179036021232605, -0.06400586664676666, 0.16275113821029663, -0.07101507484912872, -0.05115281045436859, 0.11676183342933655, 0.17636333405971527, -0.3484145700931549, -0.4004398286342621, 0.08108198642730713, -0.24044539034366608, -0.22788895666599274, 0.039897650480270386, 0.05621704086661339, 0.2899165153503418, 0.03360116854310036, 0.3173657953739166, 0.2378726750612259, 0.064022958278656, -0.26992011070251465, -0.2033461332321167, 0.21200913190841675, -0.05095637962222099, -0.14758113026618958, -0.2852531969547272, -0.07525750994682312, 0.1772032082080841, -0.02296767756342888, 0.26503264904022217, -0.2499951273202896, -0.05352465435862541, -0.06592041254043579, 0.3023354411125183, -0.10448992252349854, -0.2844485938549042, 0.3918755352497101, 0.10788242518901825, 0.04797174781560898, -0.00432128831744194, -0.38120725750923157, -0.06521051377058029, -0.22015973925590515, 0.18795230984687805, -0.004087049514055252, 0.520758330821991, 0.15794217586517334, 0.506637692451477, 0.33181411027908325, -0.5369666814804077, 0.1717594563961029, -0.2706901431083679, 0.1213344931602478, -0.15669187903404236, -0.12802262604236603, 0.30131107568740845, 0.040945202112197876, -0.062436576932668686, 0.1361878663301468, -0.06296424567699432, -0.4967781603336334, 0.051886171102523804, 0.08034946024417877, -0.016802122816443443, -0.28508850932121277, 0.15080535411834717, -0.060296863317489624, 0.26370275020599365, -0.1313890665769577, 0.3329266607761383, -0.24990157783031464, -0.0794401690363884, -0.16358113288879395, -0.09733469784259796, -0.1765633523464203, -0.04664992541074753, -0.5345151424407959, -0.10867254436016083, -0.6624093651771545, 0.32212018966674805, 0.19392666220664978, 0.783557116985321, 0.021418165415525436, -0.08244404941797256, -0.2468024045228958, -0.16819913685321808, 0.6353745460510254, -0.3002033531665802, 0.07239054888486862, -0.004512925632297993, 0.09881830215454102, -0.6122601628303528, -0.12567299604415894, -0.014384865760803223, 0.6673839688301086, 0.2643592953681946, 0.9284404516220093, 0.046359769999980927, 0.04595968872308731, 0.04348129779100418, 0.01782706007361412, 0.1433940976858139, -0.06521036475896835, -0.010504201054573059, -0.05995357036590576, -0.17638355493545532, 0.19569706916809082, 0.23711253702640533, 0.20747676491737366, -0.015740498900413513, -0.4159710109233856, 0.0754312202334404, -0.3766656816005707, 0.20110023021697998, 0.1319936066865921, 0.20846626162528992, -0.2982681095600128, 0.11402678489685059, -0.07841572910547256, -0.15737910568714142, 0.28037357330322266, -0.18816395103931427, 0.026479505002498627, -0.3439127206802368, 0.2833440899848938, 0.15300238132476807, 0.1995316594839096, 0.4269762933254242, -0.041670363396406174, 0.10616391897201538, -0.34215065836906433, 0.31230592727661133, -0.20471040904521942, 0.2691141963005066, 0.25358134508132935, 0.21678248047828674, -0.569343090057373, 0.07999088615179062, 0.1540469229221344, 0.09059037268161774, -0.07607687264680862, 0.3940849006175995, -0.3681705594062805, -0.46196448802948, 0.34346210956573486, 0.1300136297941208, 0.8483024835586548, 0.036421358585357666, -0.08160313963890076, -0.19214385747909546, 0.16613908112049103, 0.16867026686668396, -0.18581677973270416, -0.050730228424072266, -0.3904625475406647, -0.15572315454483032, -0.06776744872331619, -0.142049640417099, 0.09833000600337982, 0.07276610285043716, -0.3925172984600067, 0.11290992051362991, 0.10997560620307922, 0.44247564673423767, -0.0006537958979606628, 0.09435218572616577, -0.14287462830543518, -0.127334326505661, -0.06860169023275375, 0.15705344080924988, 0.12384022772312164, -0.23216214776039124, -0.14562323689460754, 0.34690433740615845, 0.14317171275615692, -0.461387574672699, -0.6201134324073792, -0.0647352933883667, -0.5778714418411255, 0.1768624484539032, 0.18120403587818146, 0.23003824055194855, 0.16449721157550812, 0.30127421021461487, 0.07099738717079163, 0.5061187148094177, -0.2116406261920929, -0.02450709417462349, 0.039230458438396454, 0.051251426339149475, 0.14692233502864838, -0.1345069259405136, -0.017681920900940895, 0.09106313437223434, -0.03277989476919174, 0.06409239768981934, 0.0010583838447928429, 0.11643306910991669, -0.5018935203552246, 0.26541709899902344, 0.40295863151550293, -0.1964792162179947, -0.20898637175559998, -0.27721044421195984, -0.18969443440437317, -0.22308145463466644, 0.07184633612632751, 0.08424412459135056, -0.14883200824260712, 0.13945576548576355, -0.15316511690616608, -0.23921577632427216, 0.030135678127408028, 0.45752280950546265, -0.22565194964408875, 0.0981040894985199, -0.015493005514144897, 0.07850302755832672, -0.06773082911968231, -0.1901303231716156, 0.2326970398426056, -0.12375564128160477, -0.03255204111337662, -0.22311913967132568, -0.20077767968177795, -0.09842392802238464, 0.1080038771033287, 0.06069353222846985, 0.11290714144706726, 0.026253119111061096, -0.01600884273648262, -0.5448375940322876, -0.49196571111679077, -0.007314562797546387, -0.04543985798954964, 0.31451693177223206, -0.01650216430425644, 0.0936863124370575, -0.21283142268657684, 0.13641567528247833, -0.21793998777866364, 0.16660720109939575, -0.06328946352005005, 0.20862044394016266, -0.02762090042233467, 0.09834463894367218, -0.16325533390045166, -0.1979132443666458, 0.06050387769937515, 0.7531206011772156, -0.23598337173461914, -0.09428669512271881, -0.05259176343679428, 0.13793405890464783, 0.2398592233657837, -0.1094309538602829, -0.10331594198942184, -0.02726145088672638, 0.1039244532585144, -0.2421071082353592, 0.10288393497467041, 0.22689580917358398, -0.20341350138187408, -0.1315961629152298, 0.6177958250045776, 0.38157960772514343, 0.193136066198349, 0.3575398325920105, 0.019176490604877472, 0.2638328969478607, 0.14654229581356049, 0.36212146282196045, 0.10019677877426147, -0.0010372549295425415, -0.08830587565898895, 0.28169742226600647, 0.06608988344669342, 0.15879210829734802, 0.20862624049186707, -0.09504519402980804, 0.1765190064907074, 0.09129530191421509, -0.03936607763171196, 0.3638715147972107, -0.4002840518951416, -0.06394601613283157, 0.19166028499603271, 0.1843821257352829, 0.03246765583753586, -0.23941132426261902, 0.30492764711380005, 0.18777748942375183, 0.006403908133506775, 0.26586422324180603, 0.036289092153310776, -0.37854453921318054, 0.0793161690235138, 0.2469055950641632, 0.35297706723213196, -0.03889194875955582, -0.03706003725528717, 0.25870028138160706, -0.21215464174747467, 0.10432234406471252, 0.20334392786026, -0.19469182193279266, 0.3131904900074005, 0.6266696453094482, -0.07402137666940689, 0.42741909623146057, 0.12573450803756714, 0.06308965384960175, -0.005494318902492523, -0.24834802746772766, 0.08081858605146408, 0.4405093193054199, -0.18372780084609985, 0.15008580684661865, 0.06208648532629013, 0.2579610347747803, -0.32508718967437744, -0.1628500521183014, 0.08238128572702408, 0.07849811017513275, -0.323533296585083, -0.0777551680803299, -0.06416641920804977, -0.15242654085159302, -0.18515533208847046, 0.02980632707476616, -0.14911098778247833, -0.13427358865737915, 0.30586400628089905, 0.10573376715183258, -0.38693368434906006, -0.2465467005968094, -0.08429697901010513, 0.04624613747000694, -0.025434039533138275, -0.2964482605457306, 0.5547581315040588, -0.16527022421360016, 0.20516417920589447, 0.15157663822174072, -0.1810007393360138, 0.5931910276412964, 0.645906388759613, -0.22873947024345398, 0.1645231693983078, 0.1871112585067749, 0.03692842274904251, -0.023607319220900536, 0.1389954388141632, 0.006493106484413147, 0.20903339982032776, 0.2872695326805115, 0.03199800103902817, -0.14424967765808105, -0.14727303385734558, 0.33585652709007263, 0.2155427783727646, -0.05121766775846481, 0.1997407227754593, -0.2628280222415924, -0.18704845011234283, 0.001991763710975647, -0.030752435326576233, -0.16916561126708984, -0.055350154638290405, 0.38151150941848755, -0.005679415538907051, 0.40611574053764343, -0.14109477400779724, 0.05566829442977905, 0.11248667538166046, 0.16584083437919617, 0.21607190370559692, -0.1539393663406372, -0.40257686376571655, -0.3473493456840515, -0.39319345355033875, 0.3725886046886444, -0.23258888721466064, 0.16857479512691498, 0.06813699752092361, -0.23746472597122192, -0.0817606970667839, 0.003409218043088913, 0.17848555743694305, 0.2687874734401703, -0.0693599283695221, 0.5016834139823914, -0.3206636905670166, -0.04342157021164894, -0.07294075191020966, -0.1339513510465622, 0.2401040494441986, -0.4375869035720825, 0.4043384790420532, -0.3041532337665558, -0.014326315373182297, -0.19157156348228455, 0.005374923348426819, -0.22793161869049072, -0.03722674399614334, 0.6843006610870361, 0.21503624320030212, 0.40693098306655884, -0.032938797026872635, 0.11056310683488846, -0.20533141493797302, 0.10991376638412476, -0.20951811969280243, 0.2924148142337799, 0.03207109495997429, 0.13261999189853668, -0.1456785500049591, -0.12368722259998322, -0.07256785780191422, -0.11026689410209656, 0.2603495121002197, -0.05587319657206535, -0.2727077901363373, 0.11994125694036484, -0.20020076632499695, -0.030799148604273796, -0.1286308914422989, 0.328045517206192, 0.15331414341926575, 0.2899933457374573, 0.032342299818992615, -0.22777004539966583, 0.3998813033103943, -0.3358047306537628, -0.33625999093055725, -0.18469901382923126, 0.18101884424686432, -0.2116558849811554, -0.3600911498069763, -0.516312301158905, -0.35795679688453674, 0.3601655662059784, 0.026732822880148888, -0.5006998777389526, -0.08825458586215973, -0.2791072726249695, -0.09967903792858124, -0.25185298919677734, 0.47531211376190186, 0.15299928188323975, -0.13949202001094818, 0.6449894309043884, -0.325878381729126 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
Good catch ! Not sure why it could raise such a weird issue from pyarrow though We should definitely reduce num_proc to the length of the dataset if needed and log a warning.
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
33
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue Good catch ! Not sure why it could raise such a weird issue from pyarrow though We should definitely reduce num_proc to the length of the dataset if needed and log a warning.
[ -0.4569721519947052, -0.21739071607589722, 0.02287772297859192, 0.4219464063644409, 0.3113080859184265, -0.22648242115974426, 0.23613497614860535, 0.1525057703256607, 0.04312627390027046, 0.3643296957015991, 0.5303289294242859, 0.29797887802124023, -0.33465102314949036, -0.04657025635242462, 0.04772935435175896, -0.026568226516246796, 0.36591342091560364, -0.21823543310165405, 0.25115013122558594, 0.3584372401237488, -0.2708789110183716, 0.16277006268501282, -0.4191712737083435, 0.29371267557144165, -0.26529568433761597, 0.08224396407604218, -0.10502300411462784, 0.28656280040740967, -0.09741594642400742, -0.5258923172950745, -0.03057578206062317, -0.2955249845981598, 0.19126220047473907, 0.45836788415908813, -0.00011823354725493118, -0.09135564416646957, 0.21397219598293304, 0.012012546882033348, 0.09307025372982025, -0.44300878047943115, -0.2259862720966339, -0.2528822124004364, -0.1637299507856369, -0.04087261110544205, 0.31339263916015625, 0.004678359720855951, -0.06639478355646133, -0.15027812123298645, 0.07593069970607758, 0.7205309867858887, 0.15910951793193817, 0.21483276784420013, 0.2288714498281479, -0.11200140416622162, 0.01633945107460022, 0.13414724171161652, -0.030597057193517685, 0.06143795698881149, 0.4003655016422272, -0.20039476454257965, 0.02491454780101776, -0.16739480197429657, 0.09280787408351898, -0.26698073744773865, 0.3059387505054474, -0.12271050363779068, 0.1998043954372406, -0.6616147756576538, 0.2974797487258911, -0.17242774367332458, -0.16359654068946838, -0.28783419728279114, -0.05091964453458786, -0.16323140263557434, -0.14308398962020874, -0.22301499545574188, 0.1774134337902069, -0.16718846559524536, -0.15712358057498932, 0.08328606188297272, -0.2861917018890381, 0.1699507087469101, 0.03356192260980606, 0.30864423513412476, -0.3192942440509796, 0.4002261459827423, -0.002978375181555748, 0.38961872458457947, 0.12629513442516327, -0.2813792824745178, -0.34202849864959717, 0.1340494304895401, -0.04152896627783775, 0.26742252707481384, -0.2257159799337387, -0.16636747121810913, 0.1507890671491623, -0.17385870218276978, 0.2904582917690277, -0.24060450494289398, -0.165643110871315, 0.2874029576778412, 0.048613205552101135, 0.21331027150154114, 0.2980204224586487, -0.020956870168447495, 0.30214184522628784, 0.3840675950050354, 0.04991067945957184, -0.05606452748179436, -0.1028033196926117, -0.040040522813797, 0.22646616399288177, -0.11676239967346191, 0.08925189077854156, 0.1257731020450592, 0.07402390241622925, -0.15347833931446075, -0.11980146914720535, 0.42945876717567444, -0.2137422263622284, 0.27730464935302734, 0.31860989332199097, 0.29638317227363586, 0.3739156723022461, 0.22702822089195251, -0.2862904667854309, 0.03387364372611046, -0.2570648193359375, -0.08717714250087738, -0.04427818953990936, -0.20067721605300903, -0.37084487080574036, 0.09926425665616989, -0.0057360343635082245, 0.23963423073291779, 0.15276452898979187, 0.04504792392253876, 0.22123219072818756, -0.539868950843811, 0.11252237856388092, -0.2573072910308838, 0.13399150967597961, 0.03508372604846954, -0.29419973492622375, 0.14081695675849915, 0.11566770076751709, -0.12368302792310715, -0.16609922051429749, 0.16718050837516785, -0.2124159038066864, -0.24575825035572052, -0.14749804139137268, 0.15607726573944092, -0.004165010526776314, 0.43751877546310425, -0.061790190637111664, 0.32287028431892395, 0.3464184105396271, -0.32850363850593567, -0.025873325765132904, -0.3166901469230652, -0.4711766839027405, -0.26923736929893494, -0.04782264679670334, 0.2325533926486969, -0.11913460493087769, 0.029882609844207764, 0.200078547000885, 0.0202774740755558, 0.09413165599107742, 0.16296707093715668, -0.19793540239334106, -0.017758533358573914, -0.19113673269748688, 0.524368405342102, 0.2797341048717499, -0.06436370313167572, -0.49060383439064026, 0.11027717590332031, -0.2673048973083496, -0.19815197587013245, -0.4909544587135315, -0.15601299703121185, 0.40234342217445374, -0.20736774802207947, 0.42602911591529846, -0.016893047839403152, -0.14121435582637787, 0.11838548630475998, -0.3067173957824707, 0.09499749541282654, 0.1623566448688507, -0.14624184370040894, 0.08063695579767227, -0.16650211811065674, 0.18311762809753418, -0.07083413749933243, 0.020328227430582047, 0.00462881475687027, -0.042651236057281494, 0.2887401580810547, 0.21363481879234314, -0.07819351553916931, 0.035179369151592255, -0.30482015013694763, -0.06837979704141617, 0.22688183188438416, 0.03475944697856903, -0.08886170387268066, -0.028239309787750244, 0.010514654219150543, -0.04116593301296234, 0.3073398172855377, 0.1391109675168991, -0.10586318373680115, 0.021638356149196625, -0.12469810247421265, 0.0030890926718711853, -0.06615336239337921, -0.03760569170117378, -0.019784485921263695, -0.18851040303707123, 0.024668186902999878, -0.06323587894439697, -0.12725991010665894, -0.201030433177948, -0.16466283798217773, -0.38877031207084656, 0.1416737586259842, 0.4239655137062073, -0.006467022001743317, -0.23094239830970764, 0.5506322383880615, 0.3362872898578644, -0.24848894774913788, -0.6358664035797119, -0.08476550877094269, 0.3994867503643036, -0.1538936346769333, 0.16345219314098358, 0.08694528043270111, -0.012666955590248108, -0.13238057494163513, 0.19112184643745422, 0.22163790464401245, 0.28241515159606934, 0.15726391971111298, -0.09599728137254715, 0.04253821074962616, 0.16591575741767883, 0.12296855449676514, 0.03259478509426117, -0.19979235529899597, -0.0025341250002384186, 0.1199667751789093, 0.05610499903559685, -0.0478549599647522, -0.04797380790114403, 0.23610076308250427, 0.2793259918689728, -0.07611249387264252, 0.12380902469158173, 0.05804479867219925, -0.16852086782455444, -0.056746985763311386, 0.2826823592185974, -0.013606894761323929, 0.6230340003967285, 0.0613570362329483, -0.028773237019777298, 0.004042875021696091, -0.38019251823425293, -0.033628009259700775, 0.13357266783714294, 0.07825495302677155, -0.12283698469400406, 0.05036197975277901, 0.2556922733783722, 0.15972283482551575, -0.19245433807373047, -0.379513680934906, 0.019982455298304558, 0.3146325945854187, -0.461221843957901, 0.20407892763614655, -0.11882218718528748, 0.21363726258277893, -0.0778883546590805, -0.17068760097026825, -0.175323486328125, -0.3915610611438751, -0.03860628604888916, 0.12130311131477356, 0.005078412592411041, 0.15825411677360535, 0.0887686014175415, -0.14176298677921295, 0.04338977485895157, 0.31263360381126404, 0.26207196712493896, -0.004213816951960325, -0.4652629494667053, -0.1256636530160904, 0.3646598160266876, -0.14263124763965607, 0.180757537484169, 0.15967296063899994, -0.42311424016952515, -0.13777008652687073, -0.554107666015625, 0.03621675819158554, 0.04581303521990776, 0.2179298996925354, 0.06505322456359863, 0.00027339160442352295, -0.14179036021232605, -0.06400586664676666, 0.16275113821029663, -0.07101507484912872, -0.05115281045436859, 0.11676183342933655, 0.17636333405971527, -0.3484145700931549, -0.4004398286342621, 0.08108198642730713, -0.24044539034366608, -0.22788895666599274, 0.039897650480270386, 0.05621704086661339, 0.2899165153503418, 0.03360116854310036, 0.3173657953739166, 0.2378726750612259, 0.064022958278656, -0.26992011070251465, -0.2033461332321167, 0.21200913190841675, -0.05095637962222099, -0.14758113026618958, -0.2852531969547272, -0.07525750994682312, 0.1772032082080841, -0.02296767756342888, 0.26503264904022217, -0.2499951273202896, -0.05352465435862541, -0.06592041254043579, 0.3023354411125183, -0.10448992252349854, -0.2844485938549042, 0.3918755352497101, 0.10788242518901825, 0.04797174781560898, -0.00432128831744194, -0.38120725750923157, -0.06521051377058029, -0.22015973925590515, 0.18795230984687805, -0.004087049514055252, 0.520758330821991, 0.15794217586517334, 0.506637692451477, 0.33181411027908325, -0.5369666814804077, 0.1717594563961029, -0.2706901431083679, 0.1213344931602478, -0.15669187903404236, -0.12802262604236603, 0.30131107568740845, 0.040945202112197876, -0.062436576932668686, 0.1361878663301468, -0.06296424567699432, -0.4967781603336334, 0.051886171102523804, 0.08034946024417877, -0.016802122816443443, -0.28508850932121277, 0.15080535411834717, -0.060296863317489624, 0.26370275020599365, -0.1313890665769577, 0.3329266607761383, -0.24990157783031464, -0.0794401690363884, -0.16358113288879395, -0.09733469784259796, -0.1765633523464203, -0.04664992541074753, -0.5345151424407959, -0.10867254436016083, -0.6624093651771545, 0.32212018966674805, 0.19392666220664978, 0.783557116985321, 0.021418165415525436, -0.08244404941797256, -0.2468024045228958, -0.16819913685321808, 0.6353745460510254, -0.3002033531665802, 0.07239054888486862, -0.004512925632297993, 0.09881830215454102, -0.6122601628303528, -0.12567299604415894, -0.014384865760803223, 0.6673839688301086, 0.2643592953681946, 0.9284404516220093, 0.046359769999980927, 0.04595968872308731, 0.04348129779100418, 0.01782706007361412, 0.1433940976858139, -0.06521036475896835, -0.010504201054573059, -0.05995357036590576, -0.17638355493545532, 0.19569706916809082, 0.23711253702640533, 0.20747676491737366, -0.015740498900413513, -0.4159710109233856, 0.0754312202334404, -0.3766656816005707, 0.20110023021697998, 0.1319936066865921, 0.20846626162528992, -0.2982681095600128, 0.11402678489685059, -0.07841572910547256, -0.15737910568714142, 0.28037357330322266, -0.18816395103931427, 0.026479505002498627, -0.3439127206802368, 0.2833440899848938, 0.15300238132476807, 0.1995316594839096, 0.4269762933254242, -0.041670363396406174, 0.10616391897201538, -0.34215065836906433, 0.31230592727661133, -0.20471040904521942, 0.2691141963005066, 0.25358134508132935, 0.21678248047828674, -0.569343090057373, 0.07999088615179062, 0.1540469229221344, 0.09059037268161774, -0.07607687264680862, 0.3940849006175995, -0.3681705594062805, -0.46196448802948, 0.34346210956573486, 0.1300136297941208, 0.8483024835586548, 0.036421358585357666, -0.08160313963890076, -0.19214385747909546, 0.16613908112049103, 0.16867026686668396, -0.18581677973270416, -0.050730228424072266, -0.3904625475406647, -0.15572315454483032, -0.06776744872331619, -0.142049640417099, 0.09833000600337982, 0.07276610285043716, -0.3925172984600067, 0.11290992051362991, 0.10997560620307922, 0.44247564673423767, -0.0006537958979606628, 0.09435218572616577, -0.14287462830543518, -0.127334326505661, -0.06860169023275375, 0.15705344080924988, 0.12384022772312164, -0.23216214776039124, -0.14562323689460754, 0.34690433740615845, 0.14317171275615692, -0.461387574672699, -0.6201134324073792, -0.0647352933883667, -0.5778714418411255, 0.1768624484539032, 0.18120403587818146, 0.23003824055194855, 0.16449721157550812, 0.30127421021461487, 0.07099738717079163, 0.5061187148094177, -0.2116406261920929, -0.02450709417462349, 0.039230458438396454, 0.051251426339149475, 0.14692233502864838, -0.1345069259405136, -0.017681920900940895, 0.09106313437223434, -0.03277989476919174, 0.06409239768981934, 0.0010583838447928429, 0.11643306910991669, -0.5018935203552246, 0.26541709899902344, 0.40295863151550293, -0.1964792162179947, -0.20898637175559998, -0.27721044421195984, -0.18969443440437317, -0.22308145463466644, 0.07184633612632751, 0.08424412459135056, -0.14883200824260712, 0.13945576548576355, -0.15316511690616608, -0.23921577632427216, 0.030135678127408028, 0.45752280950546265, -0.22565194964408875, 0.0981040894985199, -0.015493005514144897, 0.07850302755832672, -0.06773082911968231, -0.1901303231716156, 0.2326970398426056, -0.12375564128160477, -0.03255204111337662, -0.22311913967132568, -0.20077767968177795, -0.09842392802238464, 0.1080038771033287, 0.06069353222846985, 0.11290714144706726, 0.026253119111061096, -0.01600884273648262, -0.5448375940322876, -0.49196571111679077, -0.007314562797546387, -0.04543985798954964, 0.31451693177223206, -0.01650216430425644, 0.0936863124370575, -0.21283142268657684, 0.13641567528247833, -0.21793998777866364, 0.16660720109939575, -0.06328946352005005, 0.20862044394016266, -0.02762090042233467, 0.09834463894367218, -0.16325533390045166, -0.1979132443666458, 0.06050387769937515, 0.7531206011772156, -0.23598337173461914, -0.09428669512271881, -0.05259176343679428, 0.13793405890464783, 0.2398592233657837, -0.1094309538602829, -0.10331594198942184, -0.02726145088672638, 0.1039244532585144, -0.2421071082353592, 0.10288393497467041, 0.22689580917358398, -0.20341350138187408, -0.1315961629152298, 0.6177958250045776, 0.38157960772514343, 0.193136066198349, 0.3575398325920105, 0.019176490604877472, 0.2638328969478607, 0.14654229581356049, 0.36212146282196045, 0.10019677877426147, -0.0010372549295425415, -0.08830587565898895, 0.28169742226600647, 0.06608988344669342, 0.15879210829734802, 0.20862624049186707, -0.09504519402980804, 0.1765190064907074, 0.09129530191421509, -0.03936607763171196, 0.3638715147972107, -0.4002840518951416, -0.06394601613283157, 0.19166028499603271, 0.1843821257352829, 0.03246765583753586, -0.23941132426261902, 0.30492764711380005, 0.18777748942375183, 0.006403908133506775, 0.26586422324180603, 0.036289092153310776, -0.37854453921318054, 0.0793161690235138, 0.2469055950641632, 0.35297706723213196, -0.03889194875955582, -0.03706003725528717, 0.25870028138160706, -0.21215464174747467, 0.10432234406471252, 0.20334392786026, -0.19469182193279266, 0.3131904900074005, 0.6266696453094482, -0.07402137666940689, 0.42741909623146057, 0.12573450803756714, 0.06308965384960175, -0.005494318902492523, -0.24834802746772766, 0.08081858605146408, 0.4405093193054199, -0.18372780084609985, 0.15008580684661865, 0.06208648532629013, 0.2579610347747803, -0.32508718967437744, -0.1628500521183014, 0.08238128572702408, 0.07849811017513275, -0.323533296585083, -0.0777551680803299, -0.06416641920804977, -0.15242654085159302, -0.18515533208847046, 0.02980632707476616, -0.14911098778247833, -0.13427358865737915, 0.30586400628089905, 0.10573376715183258, -0.38693368434906006, -0.2465467005968094, -0.08429697901010513, 0.04624613747000694, -0.025434039533138275, -0.2964482605457306, 0.5547581315040588, -0.16527022421360016, 0.20516417920589447, 0.15157663822174072, -0.1810007393360138, 0.5931910276412964, 0.645906388759613, -0.22873947024345398, 0.1645231693983078, 0.1871112585067749, 0.03692842274904251, -0.023607319220900536, 0.1389954388141632, 0.006493106484413147, 0.20903339982032776, 0.2872695326805115, 0.03199800103902817, -0.14424967765808105, -0.14727303385734558, 0.33585652709007263, 0.2155427783727646, -0.05121766775846481, 0.1997407227754593, -0.2628280222415924, -0.18704845011234283, 0.001991763710975647, -0.030752435326576233, -0.16916561126708984, -0.055350154638290405, 0.38151150941848755, -0.005679415538907051, 0.40611574053764343, -0.14109477400779724, 0.05566829442977905, 0.11248667538166046, 0.16584083437919617, 0.21607190370559692, -0.1539393663406372, -0.40257686376571655, -0.3473493456840515, -0.39319345355033875, 0.3725886046886444, -0.23258888721466064, 0.16857479512691498, 0.06813699752092361, -0.23746472597122192, -0.0817606970667839, 0.003409218043088913, 0.17848555743694305, 0.2687874734401703, -0.0693599283695221, 0.5016834139823914, -0.3206636905670166, -0.04342157021164894, -0.07294075191020966, -0.1339513510465622, 0.2401040494441986, -0.4375869035720825, 0.4043384790420532, -0.3041532337665558, -0.014326315373182297, -0.19157156348228455, 0.005374923348426819, -0.22793161869049072, -0.03722674399614334, 0.6843006610870361, 0.21503624320030212, 0.40693098306655884, -0.032938797026872635, 0.11056310683488846, -0.20533141493797302, 0.10991376638412476, -0.20951811969280243, 0.2924148142337799, 0.03207109495997429, 0.13261999189853668, -0.1456785500049591, -0.12368722259998322, -0.07256785780191422, -0.11026689410209656, 0.2603495121002197, -0.05587319657206535, -0.2727077901363373, 0.11994125694036484, -0.20020076632499695, -0.030799148604273796, -0.1286308914422989, 0.328045517206192, 0.15331414341926575, 0.2899933457374573, 0.032342299818992615, -0.22777004539966583, 0.3998813033103943, -0.3358047306537628, -0.33625999093055725, -0.18469901382923126, 0.18101884424686432, -0.2116558849811554, -0.3600911498069763, -0.516312301158905, -0.35795679688453674, 0.3601655662059784, 0.026732822880148888, -0.5006998777389526, -0.08825458586215973, -0.2791072726249695, -0.09967903792858124, -0.25185298919677734, 0.47531211376190186, 0.15299928188323975, -0.13949202001094818, 0.6449894309043884, -0.325878381729126 ]
https://github.com/huggingface/datasets/issues/2470
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`.
This has been fixed in #2566, thanks @connor-mccarthy ! We'll make a new release soon that includes the fix ;)
## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue
20
Crash when `num_proc` > dataset length for `map()` on a `datasets.Dataset`. ## Describe the bug Crash if when using `num_proc` > 1 (I used 16) for `map()` on a `datasets.Dataset`. I believe I've had cases where `num_proc` > 1 works before, but now it seems either inconsistent, or depends on my data. I'm not sure whether the issue is on my end, because it's difficult for me to debug! Any tips greatly appreciated, I'm happy to provide more info if it would helps us diagnose. ## Steps to reproduce the bug ```python # this function will be applied with map() def tokenize_function(examples): return tokenizer( examples["text"], padding=PaddingStrategy.DO_NOT_PAD, truncation=True, ) # data_files is a Dict[str, str] mapping name -> path datasets = load_dataset("text", data_files={...}) # this is where the error happens if num_proc = 16, # but is fine if num_proc = 1 tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=num_workers, ) ``` ## Expected results The `map()` function succeeds with `num_proc` > 1. ## Actual results ![image](https://user-images.githubusercontent.com/1170062/121404271-a6cc5200-c910-11eb-8e27-5c893bd04042.png) ![image](https://user-images.githubusercontent.com/1170062/121404362-be0b3f80-c910-11eb-9117-658943029aef.png) ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-glibc2.31 - Python version: 3.9.5 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes, but I think N/A for this issue - Using distributed or parallel set-up in script?: Multi-GPU on one machine, but I think also N/A for this issue This has been fixed in #2566, thanks @connor-mccarthy ! We'll make a new release soon that includes the fix ;)
[ -0.4569721519947052, -0.21739071607589722, 0.02287772297859192, 0.4219464063644409, 0.3113080859184265, -0.22648242115974426, 0.23613497614860535, 0.1525057703256607, 0.04312627390027046, 0.3643296957015991, 0.5303289294242859, 0.29797887802124023, -0.33465102314949036, -0.04657025635242462, 0.04772935435175896, -0.026568226516246796, 0.36591342091560364, -0.21823543310165405, 0.25115013122558594, 0.3584372401237488, -0.2708789110183716, 0.16277006268501282, -0.4191712737083435, 0.29371267557144165, -0.26529568433761597, 0.08224396407604218, -0.10502300411462784, 0.28656280040740967, -0.09741594642400742, -0.5258923172950745, -0.03057578206062317, -0.2955249845981598, 0.19126220047473907, 0.45836788415908813, -0.00011823354725493118, -0.09135564416646957, 0.21397219598293304, 0.012012546882033348, 0.09307025372982025, -0.44300878047943115, -0.2259862720966339, -0.2528822124004364, -0.1637299507856369, -0.04087261110544205, 0.31339263916015625, 0.004678359720855951, -0.06639478355646133, -0.15027812123298645, 0.07593069970607758, 0.7205309867858887, 0.15910951793193817, 0.21483276784420013, 0.2288714498281479, -0.11200140416622162, 0.01633945107460022, 0.13414724171161652, -0.030597057193517685, 0.06143795698881149, 0.4003655016422272, -0.20039476454257965, 0.02491454780101776, -0.16739480197429657, 0.09280787408351898, -0.26698073744773865, 0.3059387505054474, -0.12271050363779068, 0.1998043954372406, -0.6616147756576538, 0.2974797487258911, -0.17242774367332458, -0.16359654068946838, -0.28783419728279114, -0.05091964453458786, -0.16323140263557434, -0.14308398962020874, -0.22301499545574188, 0.1774134337902069, -0.16718846559524536, -0.15712358057498932, 0.08328606188297272, -0.2861917018890381, 0.1699507087469101, 0.03356192260980606, 0.30864423513412476, -0.3192942440509796, 0.4002261459827423, -0.002978375181555748, 0.38961872458457947, 0.12629513442516327, -0.2813792824745178, -0.34202849864959717, 0.1340494304895401, -0.04152896627783775, 0.26742252707481384, -0.2257159799337387, -0.16636747121810913, 0.1507890671491623, -0.17385870218276978, 0.2904582917690277, -0.24060450494289398, -0.165643110871315, 0.2874029576778412, 0.048613205552101135, 0.21331027150154114, 0.2980204224586487, -0.020956870168447495, 0.30214184522628784, 0.3840675950050354, 0.04991067945957184, -0.05606452748179436, -0.1028033196926117, -0.040040522813797, 0.22646616399288177, -0.11676239967346191, 0.08925189077854156, 0.1257731020450592, 0.07402390241622925, -0.15347833931446075, -0.11980146914720535, 0.42945876717567444, -0.2137422263622284, 0.27730464935302734, 0.31860989332199097, 0.29638317227363586, 0.3739156723022461, 0.22702822089195251, -0.2862904667854309, 0.03387364372611046, -0.2570648193359375, -0.08717714250087738, -0.04427818953990936, -0.20067721605300903, -0.37084487080574036, 0.09926425665616989, -0.0057360343635082245, 0.23963423073291779, 0.15276452898979187, 0.04504792392253876, 0.22123219072818756, -0.539868950843811, 0.11252237856388092, -0.2573072910308838, 0.13399150967597961, 0.03508372604846954, -0.29419973492622375, 0.14081695675849915, 0.11566770076751709, -0.12368302792310715, -0.16609922051429749, 0.16718050837516785, -0.2124159038066864, -0.24575825035572052, -0.14749804139137268, 0.15607726573944092, -0.004165010526776314, 0.43751877546310425, -0.061790190637111664, 0.32287028431892395, 0.3464184105396271, -0.32850363850593567, -0.025873325765132904, -0.3166901469230652, -0.4711766839027405, -0.26923736929893494, -0.04782264679670334, 0.2325533926486969, -0.11913460493087769, 0.029882609844207764, 0.200078547000885, 0.0202774740755558, 0.09413165599107742, 0.16296707093715668, -0.19793540239334106, -0.017758533358573914, -0.19113673269748688, 0.524368405342102, 0.2797341048717499, -0.06436370313167572, -0.49060383439064026, 0.11027717590332031, -0.2673048973083496, -0.19815197587013245, -0.4909544587135315, -0.15601299703121185, 0.40234342217445374, -0.20736774802207947, 0.42602911591529846, -0.016893047839403152, -0.14121435582637787, 0.11838548630475998, -0.3067173957824707, 0.09499749541282654, 0.1623566448688507, -0.14624184370040894, 0.08063695579767227, -0.16650211811065674, 0.18311762809753418, -0.07083413749933243, 0.020328227430582047, 0.00462881475687027, -0.042651236057281494, 0.2887401580810547, 0.21363481879234314, -0.07819351553916931, 0.035179369151592255, -0.30482015013694763, -0.06837979704141617, 0.22688183188438416, 0.03475944697856903, -0.08886170387268066, -0.028239309787750244, 0.010514654219150543, -0.04116593301296234, 0.3073398172855377, 0.1391109675168991, -0.10586318373680115, 0.021638356149196625, -0.12469810247421265, 0.0030890926718711853, -0.06615336239337921, -0.03760569170117378, -0.019784485921263695, -0.18851040303707123, 0.024668186902999878, -0.06323587894439697, -0.12725991010665894, -0.201030433177948, -0.16466283798217773, -0.38877031207084656, 0.1416737586259842, 0.4239655137062073, -0.006467022001743317, -0.23094239830970764, 0.5506322383880615, 0.3362872898578644, -0.24848894774913788, -0.6358664035797119, -0.08476550877094269, 0.3994867503643036, -0.1538936346769333, 0.16345219314098358, 0.08694528043270111, -0.012666955590248108, -0.13238057494163513, 0.19112184643745422, 0.22163790464401245, 0.28241515159606934, 0.15726391971111298, -0.09599728137254715, 0.04253821074962616, 0.16591575741767883, 0.12296855449676514, 0.03259478509426117, -0.19979235529899597, -0.0025341250002384186, 0.1199667751789093, 0.05610499903559685, -0.0478549599647522, -0.04797380790114403, 0.23610076308250427, 0.2793259918689728, -0.07611249387264252, 0.12380902469158173, 0.05804479867219925, -0.16852086782455444, -0.056746985763311386, 0.2826823592185974, -0.013606894761323929, 0.6230340003967285, 0.0613570362329483, -0.028773237019777298, 0.004042875021696091, -0.38019251823425293, -0.033628009259700775, 0.13357266783714294, 0.07825495302677155, -0.12283698469400406, 0.05036197975277901, 0.2556922733783722, 0.15972283482551575, -0.19245433807373047, -0.379513680934906, 0.019982455298304558, 0.3146325945854187, -0.461221843957901, 0.20407892763614655, -0.11882218718528748, 0.21363726258277893, -0.0778883546590805, -0.17068760097026825, -0.175323486328125, -0.3915610611438751, -0.03860628604888916, 0.12130311131477356, 0.005078412592411041, 0.15825411677360535, 0.0887686014175415, -0.14176298677921295, 0.04338977485895157, 0.31263360381126404, 0.26207196712493896, -0.004213816951960325, -0.4652629494667053, -0.1256636530160904, 0.3646598160266876, -0.14263124763965607, 0.180757537484169, 0.15967296063899994, -0.42311424016952515, -0.13777008652687073, -0.554107666015625, 0.03621675819158554, 0.04581303521990776, 0.2179298996925354, 0.06505322456359863, 0.00027339160442352295, -0.14179036021232605, -0.06400586664676666, 0.16275113821029663, -0.07101507484912872, -0.05115281045436859, 0.11676183342933655, 0.17636333405971527, -0.3484145700931549, -0.4004398286342621, 0.08108198642730713, -0.24044539034366608, -0.22788895666599274, 0.039897650480270386, 0.05621704086661339, 0.2899165153503418, 0.03360116854310036, 0.3173657953739166, 0.2378726750612259, 0.064022958278656, -0.26992011070251465, -0.2033461332321167, 0.21200913190841675, -0.05095637962222099, -0.14758113026618958, -0.2852531969547272, -0.07525750994682312, 0.1772032082080841, -0.02296767756342888, 0.26503264904022217, -0.2499951273202896, -0.05352465435862541, -0.06592041254043579, 0.3023354411125183, -0.10448992252349854, -0.2844485938549042, 0.3918755352497101, 0.10788242518901825, 0.04797174781560898, -0.00432128831744194, -0.38120725750923157, -0.06521051377058029, -0.22015973925590515, 0.18795230984687805, -0.004087049514055252, 0.520758330821991, 0.15794217586517334, 0.506637692451477, 0.33181411027908325, -0.5369666814804077, 0.1717594563961029, -0.2706901431083679, 0.1213344931602478, -0.15669187903404236, -0.12802262604236603, 0.30131107568740845, 0.040945202112197876, -0.062436576932668686, 0.1361878663301468, -0.06296424567699432, -0.4967781603336334, 0.051886171102523804, 0.08034946024417877, -0.016802122816443443, -0.28508850932121277, 0.15080535411834717, -0.060296863317489624, 0.26370275020599365, -0.1313890665769577, 0.3329266607761383, -0.24990157783031464, -0.0794401690363884, -0.16358113288879395, -0.09733469784259796, -0.1765633523464203, -0.04664992541074753, -0.5345151424407959, -0.10867254436016083, -0.6624093651771545, 0.32212018966674805, 0.19392666220664978, 0.783557116985321, 0.021418165415525436, -0.08244404941797256, -0.2468024045228958, -0.16819913685321808, 0.6353745460510254, -0.3002033531665802, 0.07239054888486862, -0.004512925632297993, 0.09881830215454102, -0.6122601628303528, -0.12567299604415894, -0.014384865760803223, 0.6673839688301086, 0.2643592953681946, 0.9284404516220093, 0.046359769999980927, 0.04595968872308731, 0.04348129779100418, 0.01782706007361412, 0.1433940976858139, -0.06521036475896835, -0.010504201054573059, -0.05995357036590576, -0.17638355493545532, 0.19569706916809082, 0.23711253702640533, 0.20747676491737366, -0.015740498900413513, -0.4159710109233856, 0.0754312202334404, -0.3766656816005707, 0.20110023021697998, 0.1319936066865921, 0.20846626162528992, -0.2982681095600128, 0.11402678489685059, -0.07841572910547256, -0.15737910568714142, 0.28037357330322266, -0.18816395103931427, 0.026479505002498627, -0.3439127206802368, 0.2833440899848938, 0.15300238132476807, 0.1995316594839096, 0.4269762933254242, -0.041670363396406174, 0.10616391897201538, -0.34215065836906433, 0.31230592727661133, -0.20471040904521942, 0.2691141963005066, 0.25358134508132935, 0.21678248047828674, -0.569343090057373, 0.07999088615179062, 0.1540469229221344, 0.09059037268161774, -0.07607687264680862, 0.3940849006175995, -0.3681705594062805, -0.46196448802948, 0.34346210956573486, 0.1300136297941208, 0.8483024835586548, 0.036421358585357666, -0.08160313963890076, -0.19214385747909546, 0.16613908112049103, 0.16867026686668396, -0.18581677973270416, -0.050730228424072266, -0.3904625475406647, -0.15572315454483032, -0.06776744872331619, -0.142049640417099, 0.09833000600337982, 0.07276610285043716, -0.3925172984600067, 0.11290992051362991, 0.10997560620307922, 0.44247564673423767, -0.0006537958979606628, 0.09435218572616577, -0.14287462830543518, -0.127334326505661, -0.06860169023275375, 0.15705344080924988, 0.12384022772312164, -0.23216214776039124, -0.14562323689460754, 0.34690433740615845, 0.14317171275615692, -0.461387574672699, -0.6201134324073792, -0.0647352933883667, -0.5778714418411255, 0.1768624484539032, 0.18120403587818146, 0.23003824055194855, 0.16449721157550812, 0.30127421021461487, 0.07099738717079163, 0.5061187148094177, -0.2116406261920929, -0.02450709417462349, 0.039230458438396454, 0.051251426339149475, 0.14692233502864838, -0.1345069259405136, -0.017681920900940895, 0.09106313437223434, -0.03277989476919174, 0.06409239768981934, 0.0010583838447928429, 0.11643306910991669, -0.5018935203552246, 0.26541709899902344, 0.40295863151550293, -0.1964792162179947, -0.20898637175559998, -0.27721044421195984, -0.18969443440437317, -0.22308145463466644, 0.07184633612632751, 0.08424412459135056, -0.14883200824260712, 0.13945576548576355, -0.15316511690616608, -0.23921577632427216, 0.030135678127408028, 0.45752280950546265, -0.22565194964408875, 0.0981040894985199, -0.015493005514144897, 0.07850302755832672, -0.06773082911968231, -0.1901303231716156, 0.2326970398426056, -0.12375564128160477, -0.03255204111337662, -0.22311913967132568, -0.20077767968177795, -0.09842392802238464, 0.1080038771033287, 0.06069353222846985, 0.11290714144706726, 0.026253119111061096, -0.01600884273648262, -0.5448375940322876, -0.49196571111679077, -0.007314562797546387, -0.04543985798954964, 0.31451693177223206, -0.01650216430425644, 0.0936863124370575, -0.21283142268657684, 0.13641567528247833, -0.21793998777866364, 0.16660720109939575, -0.06328946352005005, 0.20862044394016266, -0.02762090042233467, 0.09834463894367218, -0.16325533390045166, -0.1979132443666458, 0.06050387769937515, 0.7531206011772156, -0.23598337173461914, -0.09428669512271881, -0.05259176343679428, 0.13793405890464783, 0.2398592233657837, -0.1094309538602829, -0.10331594198942184, -0.02726145088672638, 0.1039244532585144, -0.2421071082353592, 0.10288393497467041, 0.22689580917358398, -0.20341350138187408, -0.1315961629152298, 0.6177958250045776, 0.38157960772514343, 0.193136066198349, 0.3575398325920105, 0.019176490604877472, 0.2638328969478607, 0.14654229581356049, 0.36212146282196045, 0.10019677877426147, -0.0010372549295425415, -0.08830587565898895, 0.28169742226600647, 0.06608988344669342, 0.15879210829734802, 0.20862624049186707, -0.09504519402980804, 0.1765190064907074, 0.09129530191421509, -0.03936607763171196, 0.3638715147972107, -0.4002840518951416, -0.06394601613283157, 0.19166028499603271, 0.1843821257352829, 0.03246765583753586, -0.23941132426261902, 0.30492764711380005, 0.18777748942375183, 0.006403908133506775, 0.26586422324180603, 0.036289092153310776, -0.37854453921318054, 0.0793161690235138, 0.2469055950641632, 0.35297706723213196, -0.03889194875955582, -0.03706003725528717, 0.25870028138160706, -0.21215464174747467, 0.10432234406471252, 0.20334392786026, -0.19469182193279266, 0.3131904900074005, 0.6266696453094482, -0.07402137666940689, 0.42741909623146057, 0.12573450803756714, 0.06308965384960175, -0.005494318902492523, -0.24834802746772766, 0.08081858605146408, 0.4405093193054199, -0.18372780084609985, 0.15008580684661865, 0.06208648532629013, 0.2579610347747803, -0.32508718967437744, -0.1628500521183014, 0.08238128572702408, 0.07849811017513275, -0.323533296585083, -0.0777551680803299, -0.06416641920804977, -0.15242654085159302, -0.18515533208847046, 0.02980632707476616, -0.14911098778247833, -0.13427358865737915, 0.30586400628089905, 0.10573376715183258, -0.38693368434906006, -0.2465467005968094, -0.08429697901010513, 0.04624613747000694, -0.025434039533138275, -0.2964482605457306, 0.5547581315040588, -0.16527022421360016, 0.20516417920589447, 0.15157663822174072, -0.1810007393360138, 0.5931910276412964, 0.645906388759613, -0.22873947024345398, 0.1645231693983078, 0.1871112585067749, 0.03692842274904251, -0.023607319220900536, 0.1389954388141632, 0.006493106484413147, 0.20903339982032776, 0.2872695326805115, 0.03199800103902817, -0.14424967765808105, -0.14727303385734558, 0.33585652709007263, 0.2155427783727646, -0.05121766775846481, 0.1997407227754593, -0.2628280222415924, -0.18704845011234283, 0.001991763710975647, -0.030752435326576233, -0.16916561126708984, -0.055350154638290405, 0.38151150941848755, -0.005679415538907051, 0.40611574053764343, -0.14109477400779724, 0.05566829442977905, 0.11248667538166046, 0.16584083437919617, 0.21607190370559692, -0.1539393663406372, -0.40257686376571655, -0.3473493456840515, -0.39319345355033875, 0.3725886046886444, -0.23258888721466064, 0.16857479512691498, 0.06813699752092361, -0.23746472597122192, -0.0817606970667839, 0.003409218043088913, 0.17848555743694305, 0.2687874734401703, -0.0693599283695221, 0.5016834139823914, -0.3206636905670166, -0.04342157021164894, -0.07294075191020966, -0.1339513510465622, 0.2401040494441986, -0.4375869035720825, 0.4043384790420532, -0.3041532337665558, -0.014326315373182297, -0.19157156348228455, 0.005374923348426819, -0.22793161869049072, -0.03722674399614334, 0.6843006610870361, 0.21503624320030212, 0.40693098306655884, -0.032938797026872635, 0.11056310683488846, -0.20533141493797302, 0.10991376638412476, -0.20951811969280243, 0.2924148142337799, 0.03207109495997429, 0.13261999189853668, -0.1456785500049591, -0.12368722259998322, -0.07256785780191422, -0.11026689410209656, 0.2603495121002197, -0.05587319657206535, -0.2727077901363373, 0.11994125694036484, -0.20020076632499695, -0.030799148604273796, -0.1286308914422989, 0.328045517206192, 0.15331414341926575, 0.2899933457374573, 0.032342299818992615, -0.22777004539966583, 0.3998813033103943, -0.3358047306537628, -0.33625999093055725, -0.18469901382923126, 0.18101884424686432, -0.2116558849811554, -0.3600911498069763, -0.516312301158905, -0.35795679688453674, 0.3601655662059784, 0.026732822880148888, -0.5006998777389526, -0.08825458586215973, -0.2791072726249695, -0.09967903792858124, -0.25185298919677734, 0.47531211376190186, 0.15299928188323975, -0.13949202001094818, 0.6449894309043884, -0.325878381729126 ]
https://github.com/huggingface/datasets/issues/2450
BLUE file not found
Hi ! The `blue` metric doesn't exist, but the `bleu` metric does. You can get the full list of metrics [here](https://github.com/huggingface/datasets/tree/master/metrics) or by running ```python from datasets import list_metrics print(list_metrics()) ```
Hi, I'm having the following issue when I try to load the `blue` metric. ```shell import datasets metric = datasets.load_metric('blue') Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 320, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 621, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/1.7.0/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 332, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 621, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<input>", line 1, in <module> File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 605, in load_metric dataset=False, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 343, in prepare_module combined_path, github_file_path FileNotFoundError: Couldn't find file locally at blue/blue.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.7.0/metrics/blue/blue.py. The file is also not present on the master branch on github. ``` Here is dataset installed version info ```shell pip freeze | grep datasets datasets==1.7.0 ```
31
BLUE file not found Hi, I'm having the following issue when I try to load the `blue` metric. ```shell import datasets metric = datasets.load_metric('blue') Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 320, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 621, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/1.7.0/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 332, in prepare_module local_path = cached_path(file_path, download_config=download_config) File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 291, in cached_path use_auth_token=download_config.use_auth_token, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/utils/file_utils.py", line 621, in get_from_cache raise FileNotFoundError("Couldn't find file at {}".format(url)) FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/metrics/blue/blue.py During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<input>", line 1, in <module> File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 605, in load_metric dataset=False, File "/home/irfan/environments/Perplexity_Transformers/lib/python3.6/site-packages/datasets/load.py", line 343, in prepare_module combined_path, github_file_path FileNotFoundError: Couldn't find file locally at blue/blue.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.7.0/metrics/blue/blue.py. The file is also not present on the master branch on github. ``` Here is dataset installed version info ```shell pip freeze | grep datasets datasets==1.7.0 ``` Hi ! The `blue` metric doesn't exist, but the `bleu` metric does. You can get the full list of metrics [here](https://github.com/huggingface/datasets/tree/master/metrics) or by running ```python from datasets import list_metrics print(list_metrics()) ```
[ -0.20386239886283875, -0.2862855792045593, -0.06850111484527588, 0.4027135968208313, 0.30372679233551025, 0.0655108317732811, 0.21024349331855774, 0.3386642634868622, 0.08859759569168091, 0.1891390085220337, -0.22809097170829773, -0.15020719170570374, 0.08000059425830841, -0.3868110477924347, 0.20862647891044617, -0.08383549749851227, -0.09768583625555038, 0.29335084557533264, 0.14049270749092102, -0.011933665722608566, -0.29060128331184387, 0.27942511439323425, -0.07932853698730469, 0.14019310474395752, -0.24834835529327393, 0.20074914395809174, 0.05582032352685928, 0.4576247036457062, -0.06615813076496124, -0.47568807005882263, 0.2628205418586731, 0.06130801886320114, 0.08449459075927734, 0.6237052083015442, -0.00011814787285402417, 0.13531844317913055, 0.4002450108528137, -0.026030918583273888, -0.17550358176231384, -0.7946466207504272, -0.2668881416320801, -0.3052854835987091, -0.12067955732345581, -0.13633914291858673, -0.033071935176849365, -0.0962107852101326, 0.06317264586687088, -0.16887034475803375, 0.08809681981801987, 0.2695314884185791, 0.16279390454292297, 0.39158299565315247, 0.006884098052978516, -0.08062651008367538, 0.1766519397497177, -0.11437736451625824, 0.11083219200372696, 0.5380026698112488, 0.13249322772026062, 0.03391104191541672, 0.19657674431800842, 0.27506858110427856, 0.07978792488574982, 0.09859918057918549, 0.32105931639671326, -0.013312551192939281, 0.5190862417221069, 0.09361392259597778, -0.015691522508859634, 0.26796433329582214, 0.2782541811466217, -0.006516315042972565, -0.5074586272239685, 0.05874533951282501, -0.23881670832633972, -0.43786126375198364, 0.3182869851589203, -0.0005303472280502319, 0.09247572720050812, 0.04046425223350525, -0.30453741550445557, -0.3758831024169922, -0.22667475044727325, 0.008756373077630997, -0.31656867265701294, 0.27123093605041504, -0.12965801358222961, -0.03933783620595932, 0.1311541199684143, 0.0357789471745491, -0.1490481197834015, -0.02411976084113121, -0.2086912989616394, 0.18418684601783752, -0.23708675801753998, 0.15903183817863464, -0.056603528559207916, -0.12406723946332932, 0.16915574669837952, 0.13269659876823425, 0.28363236784935, -0.06715281307697296, -0.11540507525205612, 0.2826257050037384, 0.17405009269714355, 0.2684210240840912, 0.016282986849546432, 0.1422426998615265, 0.36239391565322876, 0.40904343128204346, -0.20268955826759338, -0.2172909677028656, -0.04691871255636215, -0.5095564723014832, 0.2717936933040619, 0.1654086410999298, 0.2333499640226364, -0.36690089106559753, -0.546892523765564, -0.1752149760723114, 0.2014845311641693, -0.13843975961208344, 0.24282322824001312, 0.38909241557121277, -0.15423043072223663, 0.13559462130069733, -0.02411908656358719, 0.2843504548072815, -0.3726007640361786, -0.04797287657856941, -0.24617867171764374, 0.2700367867946625, -0.27911683917045593, 0.1853002905845642, 0.13473831117153168, -0.14743317663669586, 0.4780188202857971, -0.24406899511814117, 0.12740439176559448, -0.28237849473953247, 0.13585689663887024, -0.13075536489486694, -0.06326942890882492, 0.38664475083351135, -0.0663406103849411, 0.023597290739417076, 0.07565136253833771, -0.15336623787879944, -0.11509378999471664, 0.19220569729804993, -0.37569087743759155, -0.36892175674438477, 0.0063156671822071075, 0.17950625717639923, -0.6024382710456848, -0.013512764126062393, -0.17065057158470154, 0.004512060433626175, 0.08976108580827713, -0.5304584503173828, -0.12095167487859726, -0.05367158353328705, -0.3520646393299103, -0.1883593499660492, 0.28999775648117065, 0.5583944320678711, -0.29630768299102783, -0.3161921501159668, -0.22415000200271606, -0.07183639705181122, 0.011852040886878967, 0.11627335846424103, -0.19576159119606018, 0.24859365820884705, -0.5058679580688477, -0.2216968983411789, 0.6039171814918518, -0.929304301738739, -0.3994363844394684, 0.03545908257365227, -0.3145410418510437, 0.10011302679777145, 0.15496724843978882, -0.04678281396627426, 0.11582726240158081, -0.23216398060321808, 0.3024923801422119, 0.052520059049129486, 0.07493007183074951, -0.15731389820575714, -0.21482734382152557, -0.1992255598306656, 0.14089186489582062, 0.18598848581314087, 0.3698253631591797, -0.06913327425718307, 0.2987957298755646, -0.1159086674451828, -0.025505393743515015, 0.024281397461891174, -0.09792264550924301, 0.3807162642478943, 0.056826088577508926, 0.004856593906879425, 0.08503427356481552, -0.4343169629573822, 0.09629739820957184, 0.25717654824256897, -0.19618695974349976, -0.23993533849716187, -0.018685445189476013, 0.11084818840026855, -0.47680166363716125, -0.30331698060035706, -0.31820347905158997, -0.09447219967842102, 0.030813217163085938, 0.06201278418302536, 0.014847084879875183, 0.07499748468399048, -0.17083309590816498, 0.3170699179172516, -0.007421547546982765, 0.07927484810352325, -0.06200817599892616, 0.20121651887893677, 0.01216672919690609, -0.026517949998378754, -0.03337842971086502, 0.26695749163627625, 0.36507707834243774, -0.16622841358184814, -0.1953883171081543, 0.4600676894187927, 0.0996977835893631, 0.32135677337646484, 0.2970392107963562, 0.09970488399267197, 0.334165096282959, -0.21529190242290497, 0.07844092696905136, -0.02976870909333229, 0.11452200263738632, -0.037481896579265594, 0.09939596056938171, 0.3468853831291199, 0.08314654976129532, 0.13898664712905884, 0.18914803862571716, -0.2690503001213074, 0.2665736675262451, -0.11166378110647202, 0.04689830541610718, -0.12023411691188812, 0.40826287865638733, -0.09457747638225555, 0.08442656695842743, -0.035347409546375275, 0.04255686700344086, -0.11088814586400986, 0.25586268305778503, -0.10557743906974792, 0.015632446855306625, 0.07471776753664017, -0.19704470038414001, -0.09896601736545563, -0.28343313932418823, 0.2893645763397217, 0.7424988746643066, 0.2036161720752716, 0.0498851016163826, -0.003058984875679016, 0.060002926737070084, -0.1352040022611618, 0.18277329206466675, 0.13641376793384552, 0.055815644562244415, 0.4532759487628937, 0.1284673511981964, -0.11208554357290268, -0.16044610738754272, -0.2615603804588318, 0.038072288036346436, -0.07983724027872086, -0.3087826669216156, 0.22652173042297363, -0.18209929764270782, 0.1814107894897461, -0.09773217886686325, -0.09753622114658356, -0.08472287654876709, -0.27161842584609985, 0.013991773128509521, 0.1867247372865677, 0.30181875824928284, 0.026787517592310905, -0.10490056872367859, 0.11724585294723511, -0.009286448359489441, -0.26149389147758484, -0.0797165110707283, -0.22664520144462585, -0.13809001445770264, -0.06516652554273605, -0.01658683456480503, -0.018593110144138336, 0.3383127450942993, -0.43423712253570557, 0.2017263025045395, -0.2717147767543793, -0.3112032115459442, -0.03277958184480667, 0.2021772563457489, 0.551915168762207, 0.07795315235853195, 0.054989006370306015, 0.08392089605331421, 0.20930854976177216, 0.4240540564060211, -0.24788039922714233, -0.11664560437202454, 0.12706761062145233, -0.11344407498836517, 0.09350309520959854, -0.039887696504592896, -0.42757436633110046, -0.32910826802253723, -0.40539997816085815, -0.12228290736675262, -0.10582979023456573, 0.030581340193748474, 0.5178654789924622, 0.06770014762878418, 0.19809727370738983, 0.15952681005001068, 0.15133774280548096, -0.17194141447544098, -0.5531233549118042, 0.4830416440963745, -0.344462513923645, -0.21059513092041016, 0.34751376509666443, 0.109351247549057, 0.40567532181739807, 0.04703005775809288, -0.3599722981452942, -0.34144264459609985, 0.10256892442703247, 0.022994715720415115, -0.12403459846973419, 0.10322057455778122, 0.06841137260198593, -0.13852614164352417, -0.07988368719816208, -0.16866637766361237, -0.19954493641853333, 0.06327453255653381, 0.0649983286857605, 0.6346907615661621, -0.1762988567352295, 0.13233202695846558, -0.17192456126213074, 0.6171428561210632, 0.07031431794166565, 0.02021661028265953, 0.3262610137462616, 0.19427913427352905, 0.49520421028137207, -0.012561127543449402, -0.21302677690982819, 0.04332675412297249, 0.24607080221176147, -0.017659207805991173, 0.08087440580129623, 0.3187301754951477, 0.06356195360422134, -0.2410152703523636, -0.3034938871860504, -0.2976820468902588, -0.0430661179125309, -0.20336492359638214, -0.1710386574268341, 0.2434128224849701, 0.14585791528224945, -0.08208198845386505, -0.3605436682701111, -0.0717068463563919, 0.1613425314426422, 0.8195840120315552, 0.1423368901014328, 0.11081725358963013, 0.029032882302999496, -0.22959157824516296, -0.015448547899723053, 0.263946533203125, 0.3717529773712158, 0.2841869592666626, -0.23738957941532135, 0.2865355908870697, 0.05645664781332016, -0.07767253369092941, 0.5926781296730042, -0.2880082428455353, 0.17303647100925446, 0.18347617983818054, -0.09341862797737122, -0.08870179951190948, -0.11450958251953125, 0.21750342845916748, 0.2971900701522827, 0.1177559345960617, 0.5743363499641418, -0.16085848212242126, -0.19623401761054993, 0.054324373602867126, 0.34009841084480286, -0.345461905002594, -0.28403669595718384, -0.487705796957016, -0.5236844420433044, -0.004222037270665169, -0.37217676639556885, -0.0787036195397377, 0.2904582917690277, 0.0152570940554142, -0.11968757212162018, -0.07638709247112274, 0.014491230249404907, 0.1442974954843521, 0.01098768599331379, 0.4414975345134735, -0.3486982583999634, 0.09011019766330719, 0.6808409690856934, -0.3170383870601654, 0.20501601696014404, 0.31263166666030884, 0.08659688383340836, -0.48040056228637695, 0.10928788036108017, 0.10433924198150635, 0.12079370021820068, 0.31427067518234253, -0.0896872952580452, -0.22369533777236938, 0.0016914866864681244, -0.016464456915855408, 0.0017658080905675888, 0.11623771488666534, 0.16740556061267853, 0.32770833373069763, -0.3291718065738678, -0.5208194255828857, 0.09036677330732346, 0.22082921862602234, 0.03322446346282959, 0.4332653284072876, 0.014651045203208923, -0.2760312259197235, 0.03045189008116722, -0.1376802921295166, 0.9293688535690308, -0.18821756541728973, 0.019714394584298134, 0.17260414361953735, -0.3839905858039856, 0.058400098234415054, -0.2677527070045471, 0.26635029911994934, -0.1903846710920334, -0.3532455861568451, -0.034004636108875275, -0.3336506187915802, 0.24305611848831177, -0.06068219989538193, 0.011191826313734055, 0.5956481099128723, -0.08135425299406052, 0.09393377602100372, 0.051942065358161926, 0.09046269953250885, -0.14236997067928314, 0.05772404372692108, 0.03296435624361038, 0.10518933832645416, -0.22725455462932587, 0.2990393340587616, -0.19362112879753113, -0.23088838160037994, -0.1308111846446991, -0.06555645912885666, -0.08909868448972702, -0.07234741747379303, -0.07467834651470184, 0.3519783020019531, -0.009471844881772995, -0.28569352626800537, 0.032262012362480164, 0.27865925431251526, 0.21322722733020782, -0.14110492169857025, -0.21790914237499237, 0.4878765344619751, -0.3885915279388428, -0.0016294317319989204, -0.023486461490392685, 0.0653727799654007, 0.07436063885688782, -0.011401740834116936, -0.4216519296169281, 0.19944876432418823, -0.1593196541070938, -0.18825778365135193, 0.0412401407957077, 0.07506351172924042, -0.11037559807300568, 0.09093016386032104, 0.014743421226739883, -0.19740846753120422, -0.022083206102252007, -0.16858254373073578, 0.10556747019290924, 0.19607959687709808, -0.27218881249427795, -0.12594786286354065, 0.10737059265375137, -0.39573484659194946, 0.0294658150523901, 0.4185601472854614, -0.07178813964128494, -0.2697699964046478, 0.2888677716255188, -0.25265464186668396, -0.1864112913608551, -0.1533377468585968, 0.06394185870885849, -0.41451358795166016, -0.15542340278625488, 0.2565372884273529, -0.006288284435868263, 0.22786377370357513, 0.12130853533744812, 0.22092029452323914, 0.2727251648902893, -0.4424699544906616, -0.0002789124846458435, -0.6986165642738342, -0.15930981934070587, 0.16524924337863922, -0.31366223096847534, 0.06748683005571365, -0.057469986379146576, -0.11493228375911713, -0.12418987601995468, -0.0054312460124492645, -0.273365318775177, 0.1323697417974472, -0.25436142086982727, -0.03310608118772507, -0.04856427013874054, -0.1197383925318718, 0.31253132224082947, -0.07951492071151733, 0.041227228939533234, -0.11261826753616333, -0.2804718315601349, -0.16524645686149597, -0.14272552728652954, 0.1883925497531891, -0.191929429769516, -0.01620042696595192, 0.008709488436579704, -0.0256244707852602, 0.2526685893535614, 0.02758977934718132, 0.010217130184173584, 0.1508694887161255, 0.05499747395515442, -0.09086145460605621, -0.25866734981536865, 0.09715642035007477, 0.08898758888244629, 0.26019087433815, 0.11086082458496094, 0.5788531303405762, 0.06358368694782257, -0.0576898455619812, -0.09157644212245941, 0.032540492713451385, -0.07203897088766098, -0.13964658975601196, 0.10449165850877762, 0.030491333454847336, 0.3099403977394104, -0.35266244411468506, 0.11166392266750336, 0.13820825517177582, 0.21256543695926666, 0.17434844374656677, -0.20873194932937622, 0.2819305956363678, -0.03556717187166214, 0.16110046207904816, -0.07845404744148254, -0.13478222489356995, 0.20819848775863647, -0.00870621670037508, 0.030010055750608444, 0.2454160451889038, 0.2398882508277893, -0.06868438422679901, 0.13562288880348206, 0.1805453896522522, 0.716169536113739, -0.16568447649478912, 0.164682075381279, 0.021139245480298996, 0.09979942440986633, 0.09091904759407043, 0.5014156699180603, 0.34044456481933594, 0.15662185847759247, 0.47476184368133545, -0.09747729450464249, 0.21649235486984253, -0.02982831746339798, 0.3604232370853424, -0.45851245522499084, -0.4043608605861664, -0.19773493707180023, -0.0809241235256195, -0.0976937860250473, -0.10505937784910202, -0.1571652889251709, 0.4915158748626709, -0.41130346059799194, 0.14842087030410767, 0.010811811313033104, -0.009136129170656204, -0.09679273515939713, 0.058555904775857925, 0.11243659257888794, -0.2258545160293579, -0.1174158975481987, -0.06319215893745422, 0.3037949204444885, 0.07005690783262253, -0.03208233416080475, 0.06841634958982468, -0.030199654400348663, -0.21106688678264618, 0.1346752643585205, 0.37735578417778015, 0.09899706393480301, -0.2305660992860794, 0.26420775055885315, 0.3478003740310669, 0.11718539893627167, 0.32135966420173645, 0.27671656012535095, 0.37909412384033203, 0.3753467798233032, -0.1545853167772293, 0.00010622106492519379, -0.018358591943979263, -0.18060331046581268, 0.04106941446661949, 0.2578655481338501, 0.008380427956581116, -0.13608311116695404, 0.04830019548535347, 0.2008865922689438, -0.11682933568954468, 0.5617825984954834, 0.0570288747549057, -0.007007235661149025, -0.27161216735839844, 0.4583105146884918, -0.33330604434013367, 0.0492197647690773, -0.3129712641239166, -0.2718103229999542, -0.552604615688324, -0.026704419404268265, 0.2775915265083313, 0.11550334841012955, 0.12282200902700424, 0.08373962342739105, 0.04878146946430206, -0.007033184170722961, -0.08190818130970001, 0.45083141326904297, 0.09062600135803223, -0.5584525465965271, 0.02528136968612671, -0.6570867896080017, 0.1153041273355484, 0.10052009671926498, 0.11482755839824677, 0.049900464713573456, 0.08326877653598785, -0.4690309464931488, -0.07760515064001083, 0.5111388564109802, 0.23435966670513153, 0.509246826171875, 0.0947926789522171, -0.37920355796813965, -0.2515347898006439, 0.13538241386413574, -0.011165516451001167, -0.12060394138097763, -0.3279919922351837, -0.10267053544521332, -0.18781571090221405, 0.02133718878030777, -0.16140690445899963, -0.044040389358997345, 0.0943932980298996, 0.1164201945066452, 0.38285142183303833, -0.12364000082015991, 0.6549376249313354, -0.011012287810444832, 0.035023435950279236, -0.16222572326660156, -0.22878524661064148, 0.08515568822622299, -0.1250782608985901, -0.03430280461907387, 0.26235339045524597, -0.2591586709022522, -0.07011355459690094, -0.28725704550743103, 0.43545275926589966, -0.06141478568315506, -0.49574828147888184, -0.18766063451766968, -0.050744958221912384, -0.22575533390045166, -0.008248730562627316, 0.12453734874725342, 0.2674945890903473, -0.08363628387451172, 0.14694425463676453, -0.1605599820613861, -0.0961768701672554, 0.6528546810150146, -0.18476535379886627, -0.2792512774467468, 0.17268909513950348, 0.3615817427635193, 0.3517991304397583, 0.07116427272558212, -0.36070626974105835, 0.13693895936012268, 0.3650057315826416, 0.2070903480052948, -0.2016160488128662, 0.22849316895008087, 0.012900850735604763, -0.009760092943906784, 0.1081143170595169, -0.31453049182891846, 0.0765545591711998, 0.015069996938109398, -0.007907699793577194, -0.012949485331773758 ]
https://github.com/huggingface/datasets/issues/2447
dataset adversarial_qa has no answers in the "test" set
Hi ! I'm pretty sure that the answers are not made available for the test set on purpose because it is part of the DynaBench benchmark, for which you can submit your predictions on the website. In any case we should mention this in the dataset card of this dataset.
## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0
50
dataset adversarial_qa has no answers in the "test" set ## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0 Hi ! I'm pretty sure that the answers are not made available for the test set on purpose because it is part of the DynaBench benchmark, for which you can submit your predictions on the website. In any case we should mention this in the dataset card of this dataset.
[ -0.10978102684020996, 0.17811346054077148, -0.13903824985027313, 0.31031355261802673, 0.16347648203372955, -0.08224871754646301, 0.3094843626022339, 0.44992583990097046, -0.05196262151002884, 0.11818775534629822, 0.16112324595451355, 0.3690257668495178, -0.18472345173358917, -0.2479671686887741, 0.08575707674026489, 0.10906046628952026, -0.1185329481959343, 0.08756940811872482, -0.07204549014568329, -0.3029208183288574, -0.16614699363708496, 0.06975489109754562, -0.17387917637825012, -0.13992099463939667, -0.2601904273033142, 0.1874667853116989, -0.14256680011749268, 0.0713285431265831, 0.037939973175525665, -0.5859725475311279, 0.28416332602500916, -0.1142052412033081, 0.01993333175778389, 0.33337080478668213, -0.00011121213901787996, -0.01968061551451683, 0.2017182856798172, -0.062374308705329895, -0.406157910823822, -0.1288900524377823, -0.513701856136322, -0.2587311267852783, 0.1562212109565735, -0.24372237920761108, -0.23430904746055603, -0.21860621869564056, -0.12170025706291199, -0.25484752655029297, 0.2813832759857178, 0.5967982411384583, 0.2503395080566406, 0.16455775499343872, -0.21277599036693573, -0.18128174543380737, 0.03256352245807648, -0.194772407412529, -0.13608063757419586, 0.3340591490268707, 0.06695793569087982, -0.21013937890529633, 0.234442800283432, 0.16329751908779144, 0.08183959871530533, -0.0216815248131752, -0.054768845438957214, -0.05772467702627182, 0.2928406596183777, -0.2534746527671814, 0.07991544902324677, 0.26779499650001526, 0.371364951133728, -0.1823159158229828, -0.25029003620147705, -0.36105141043663025, 0.20175307989120483, -0.09945876151323318, 0.20945268869400024, 0.20931202173233032, -0.2533089220523834, 0.06227970868349075, -0.027208678424358368, 0.22658699750900269, -0.06233573704957962, -0.030975572764873505, -0.25260478258132935, 0.420987069606781, 0.07187338173389435, -0.10543815046548843, -0.05728813633322716, 0.15569812059402466, 0.08894700556993484, -0.3112669885158539, -0.09311109781265259, 0.14012867212295532, -0.4370829463005066, -0.08142915368080139, -0.07743086665868759, -0.09116067737340927, 0.28946244716644287, 0.19920691847801208, 0.35636162757873535, -0.15858793258666992, 0.1394711434841156, -0.15875312685966492, 0.14829504489898682, 0.4554488956928253, 0.20182523131370544, 0.23262879252433777, 0.032428961247205734, 0.11870691180229187, -0.04050585255026817, 0.11368397623300552, -0.21189849078655243, -0.22871904075145721, 0.1301916390657425, 0.20998895168304443, 0.3855895400047302, -0.23297981917858124, -0.32873883843421936, 0.3438716530799866, -0.35410216450691223, -0.11510978639125824, -0.06458535045385361, 0.33888179063796997, -0.30864351987838745, 0.16804733872413635, -0.1507396101951599, 0.2771686315536499, -0.24115091562271118, -0.2918148636817932, -0.253030389547348, -0.1557365506887436, -0.34361010789871216, -0.18967802822589874, 0.33857208490371704, 0.24747741222381592, 0.20085911452770233, 0.08077308535575867, 0.1476813554763794, -0.024535896256566048, 0.21170595288276672, -0.3234574496746063, 0.13556519150733948, 0.35943603515625, -0.10315550863742828, 0.14196202158927917, 0.15584717690944672, -0.48543089628219604, 0.07887629419565201, 0.5665243864059448, 0.1898902952671051, -0.13121864199638367, 0.07122017443180084, 0.25135520100593567, -0.30318278074264526, 0.00742204487323761, 0.012110605835914612, 0.3110595643520355, 0.0177016481757164, -0.03676196187734604, 0.3407377302646637, -0.3106963634490967, 0.03751727566123009, -0.27488628029823303, 0.6375957131385803, 0.44500553607940674, -0.3981795310974121, 0.177847221493721, 0.005382779520004988, -0.05730970576405525, -0.16764691472053528, -0.20920442044734955, 0.011410929262638092, 0.10535089671611786, -0.18463285267353058, -0.021906882524490356, 0.21123404800891876, -0.3385694622993469, -0.4776213467121124, -0.12738415598869324, 0.1589173972606659, 0.29475656151771545, 0.0232289656996727, -0.09017252922058105, 0.1367342323064804, 0.25097236037254333, 0.08365640789270401, 0.18503740429878235, -0.019512759521603584, -0.20156550407409668, -0.451637327671051, 0.022745894268155098, 0.37786197662353516, 0.3694097399711609, 0.26429715752601624, -0.02608749270439148, -0.11608878523111343, -0.3355945646762848, 0.2588832378387451, 0.2518937885761261, -0.09111906588077545, 0.16753636300563812, 0.1315603256225586, -0.13001763820648193, 0.03361323103308678, -0.08910296857357025, -0.4266720414161682, 0.3443761467933655, 0.025457900017499924, 0.13816922903060913, 0.1315917819738388, 0.02827715128660202, -0.48812100291252136, 0.009475084021687508, -0.3255448639392853, -0.5843749642372131, 0.19271913170814514, 0.27208212018013, -0.012916583567857742, 0.3838598132133484, -0.19998548924922943, 0.2762494385242462, -0.023982767015695572, -0.0731470137834549, -0.18080192804336548, 0.2311258167028427, -0.016862964257597923, -0.16074033081531525, -0.07487745583057404, 0.3288762867450714, -0.08152913302183151, 0.08156812191009521, -0.12945669889450073, 0.12159503251314163, 0.06945580244064331, -0.305977463722229, 0.12493656575679779, 0.4802091121673584, 0.09088076651096344, -0.32991117238998413, -0.1332971304655075, 0.29756850004196167, 0.2645036578178406, -0.04716163128614426, -0.1427660584449768, 0.36390170454978943, -0.08440060913562775, 0.2512456476688385, -0.10649128258228302, 0.14909717440605164, 0.26628294587135315, -0.22307856380939484, -0.1498374193906784, 0.0792870819568634, 0.10121805220842361, 0.03884231299161911, 0.33629947900772095, 0.163205087184906, -0.30365556478500366, 0.0747901052236557, 0.3500988185405731, -0.09239830076694489, 0.10340145230293274, 0.027015330269932747, -0.15504354238510132, 0.040755532681941986, 0.2616889774799347, 0.3052290678024292, 0.6639764308929443, 0.24401496350765228, 0.08897378295660019, 0.05747086554765701, 0.007366573438048363, -0.20857751369476318, 0.13791599869728088, -0.23420800268650055, 0.0052963620983064175, 0.40908682346343994, 0.2028963565826416, 0.052746787667274475, -0.08904848992824554, 0.12901359796524048, -0.04212985932826996, 0.1984056979417801, -0.2945137321949005, -0.002309221774339676, -0.1750658005475998, 0.17356961965560913, 0.1295405477285385, -0.20930248498916626, -0.24061983823776245, -0.16494186222553253, 0.29555386304855347, -0.3521292209625244, 0.003003094345331192, 0.3188256621360779, -0.20504379272460938, 0.2272205948829651, -0.18271952867507935, 0.08392250537872314, -0.21401391923427582, -0.1988137811422348, -0.4165835976600647, 0.17310543358325958, -0.07498756051063538, -0.05694088712334633, 0.2524856626987457, -0.246176078915596, -0.18822406232357025, 0.06284675747156143, -0.09349735826253891, 0.09652955085039139, -0.0814574807882309, 0.6559181809425354, -0.021519698202610016, 0.0723109096288681, -0.37626713514328003, -0.041569262742996216, 0.35222601890563965, -0.04489002376794815, -0.010142186656594276, 0.15238197147846222, 0.24039505422115326, 0.017452744767069817, -0.014870839193463326, -0.7003239393234253, -0.31806036829948425, -0.20939300954341888, 0.016871336847543716, -0.037310920655727386, 0.1344534456729889, 0.1834017038345337, 0.2676597833633423, 0.11864131689071655, -0.24194654822349548, -0.00920107401907444, -0.15999339520931244, -0.05064220353960991, 0.3487630784511566, -0.14894971251487732, -0.5024715065956116, -0.14942386746406555, -0.24361185729503632, 0.261756956577301, -0.13328340649604797, -0.5106117725372314, -0.07823042571544647, -0.26239094138145447, 0.3865683972835541, -0.18901269137859344, -0.055949024856090546, 0.3177074193954468, -0.19468645751476288, -0.07754545658826828, -0.2881655693054199, -0.053805433213710785, 0.38967788219451904, -0.049695998430252075, 0.16220031678676605, -0.2436942756175995, 0.21004191040992737, 0.060175444930791855, 0.5309696197509766, 0.1187322586774826, 0.14145691692829132, 0.22025857865810394, -0.20970606803894043, 0.32595399022102356, -0.21766382455825806, -0.39614197611808777, 0.028869381174445152, 0.24462297558784485, 0.12613129615783691, 0.292825847864151, 0.021324176341295242, 0.09017646312713623, -0.14618273079395294, 0.004550088196992874, -0.4204447865486145, -0.22030316293239594, 0.13751021027565002, -0.6682149171829224, -0.004271015524864197, 0.027372464537620544, 0.1203070804476738, -0.0047590406611561775, -0.07089927792549133, -0.1687234491109848, 0.0749276727437973, -0.011258773505687714, -0.07110174745321274, -0.3702082931995392, -0.09722841531038284, -0.07663080841302872, 0.1608385145664215, -0.12264510989189148, 0.4465254247188568, -0.08604150265455246, -0.1159287691116333, 0.19337224960327148, 0.11772134155035019, 0.7862278819084167, -0.043729156255722046, -0.1693388670682907, 0.3484088182449341, -0.05744694918394089, -0.43232718110084534, -0.2542478144168854, -0.2168697863817215, -0.028823673725128174, -0.10573358833789825, -0.1255832016468048, -0.322147935628891, -0.08182830363512039, -0.021937910467386246, 0.12844577431678772, -0.309987872838974, -0.10105566680431366, -0.33570289611816406, -0.19736438989639282, -0.1284763365983963, 0.28691381216049194, 0.06324318051338196, 0.21370431780815125, -0.2322823703289032, -0.21417461335659027, -0.132242813706398, -0.15977135300636292, 0.26116693019866943, 0.2644219696521759, 0.2692781090736389, -0.046670857816934586, 0.24108657240867615, 0.01928885281085968, -0.1497378647327423, 0.024390462785959244, 0.3924174904823303, -0.08863751590251923, 0.005886673927307129, 0.1942734718322754, -0.30769261717796326, 0.5265527963638306, 0.23582583665847778, -0.22485947608947754, -0.23870128393173218, -0.4207185208797455, 0.10476270318031311, -0.15072543919086456, -0.03187878802418709, 0.36426326632499695, 0.004928570240736008, 0.0762219950556755, -0.4885343909263611, 0.08439689874649048, -0.23330765962600708, -0.2787137031555176, 0.18718968331813812, 0.17807848751544952, -0.11865340173244476, 0.2873227000236511, 0.004713177680969238, 0.9321403503417969, -0.010909408330917358, 0.1728474348783493, 0.411693811416626, -0.02541273832321167, 0.17834845185279846, -0.20655135810375214, 0.12834742665290833, -0.2668023109436035, -0.5641285181045532, 0.20464618504047394, -0.13053666055202484, 0.08502484112977982, 0.2565441131591797, -0.06349720060825348, 0.25254932045936584, -0.26898908615112305, 0.020152026787400246, 0.2733150124549866, -0.001187250018119812, -0.11384070664644241, 0.3495709300041199, -0.5553542375564575, 0.18295226991176605, 0.12218362092971802, 0.044679705053567886, -0.11005096137523651, -0.06545543670654297, -0.21238747239112854, -0.18990112841129303, -0.3045636713504791, 0.18471190333366394, -0.4208047389984131, -0.10040793567895889, 0.41224634647369385, -0.16615578532218933, -0.08993856608867645, 0.6880059242248535, 0.3051171600818634, 0.28045162558555603, -0.017732011154294014, 0.27637431025505066, 0.059761859476566315, 0.27241748571395874, 0.2788790762424469, 0.06515159457921982, 0.17537909746170044, -0.2156321108341217, -0.5686725378036499, 0.2594640552997589, -0.04790329560637474, -0.1648966521024704, -0.14864303171634674, 0.16581499576568604, 0.15820851922035217, -0.09793747961521149, -0.15284882485866547, -0.04641598463058472, 0.22321176528930664, -0.0733543187379837, 0.23473866283893585, -0.05659189820289612, -0.10363714396953583, 0.334006667137146, 0.2225230485200882, -0.37763625383377075, -0.03841709718108177, 0.29359424114227295, 0.007357429713010788, 0.385439395904541, 0.6925075054168701, 0.07378546893596649, 0.003434509038925171, -0.3535638451576233, -0.13148528337478638, 0.45647937059402466, -0.5438268184661865, 0.14699745178222656, -0.09941920638084412, -0.08609133958816528, -0.15986360609531403, 0.06760448962450027, 0.2713712751865387, -0.2666691243648529, 0.09457726776599884, -0.47230109572410583, 0.003577612340450287, 0.2808351218700409, 0.03975262865424156, 0.07877717912197113, 0.0395658016204834, -0.14465248584747314, -0.0091663533821702, 0.22145989537239075, -0.4289359450340271, -0.026876233518123627, -0.4231915771961212, 0.07263493537902832, -0.5557460784912109, -0.10464910417795181, 0.23438414931297302, -0.07860517501831055, 0.20538970828056335, -0.2429317682981491, -0.10319361090660095, -0.3527088165283203, -0.10482876002788544, 0.13701772689819336, -0.025813903659582138, -0.017461439594626427, -0.23414041101932526, -0.2490488588809967, -0.134770929813385, -0.0791957676410675, 0.11725933849811554, 0.04862121492624283, -0.03048010915517807, 0.26381033658981323, 0.20258815586566925, 0.2872469425201416, -0.16848988831043243, 0.11143514513969421, -0.30029207468032837, -0.2510054111480713, 0.10556787252426147, 0.031624071300029755, 0.11233445256948471, -0.04973151907324791, -0.012791182845830917, 0.07256744056940079, -0.23006977140903473, 0.01761730946600437, 0.25108131766319275, -0.11457137763500214, 0.2062976360321045, 0.043051689863204956, 0.03131246194243431, 0.11563728004693985, -0.30330967903137207, 0.13461816310882568, 0.014556650072336197, 0.29698866605758667, -0.47037172317504883, 0.08459334820508957, 0.023677373304963112, 0.23887787759304047, 0.10698418319225311, 0.13748285174369812, 0.260782927274704, -0.32112789154052734, 0.1386261284351349, 0.23268955945968628, -0.013532129116356373, -0.023845922201871872, 0.1704481989145279, 0.5367963314056396, -0.20396649837493896, 0.008984584361314774, -0.11391905695199966, -0.12241284549236298, -0.17463180422782898, -0.010903887450695038, -0.18863359093666077, 0.3858881890773773, 0.05869843810796738, -0.2206851840019226, -0.018534034490585327, -0.09379461407661438, 0.16258209943771362, 0.059613704681396484, -0.06334146857261658, -0.08210764080286026, -0.0366847887635231, 0.27879729866981506, -0.009725929237902164, 0.1430378556251526, -0.22064638137817383, -0.18215905129909515, 0.01563110761344433, -0.006455364637076855, -0.12740282714366913, -0.19690236449241638, -0.32757794857025146, -0.33535510301589966, -0.04325828328728676, -0.18407094478607178, 0.10115869343280792, -0.0019407197833061218, -0.2903953194618225, -0.12640079855918884, 0.31090694665908813, 0.3682558834552765, 0.1263701468706131, -0.010489355772733688, 0.2845536768436432, 0.27546143531799316, 0.15946832299232483, 0.13387975096702576, 0.575547456741333, 0.07081551849842072, 0.2835344672203064, -0.37512603402137756, 0.008956645615398884, 0.11790506541728973, -0.07020867615938187, -0.22080600261688232, 0.5092958807945251, 0.11034006625413895, 0.17712154984474182, 0.07240568101406097, 0.23228932917118073, -0.2277543544769287, 0.21047820150852203, 0.08829832077026367, 0.05429355055093765, -0.1977098286151886, 0.19495169818401337, 0.019338004291057587, 0.05321601778268814, 0.009532097727060318, 0.13720501959323883, -0.4294005334377289, 0.06197347119450569, 0.18224261701107025, -0.10396970063447952, 0.07612289488315582, -0.3123713433742523, 0.11642010509967804, -0.24624639749526978, 0.2577490508556366, 0.1471647322177887, 0.3499378263950348, -0.24695244431495667, -0.035595450550317764, -0.5702100396156311, 0.17264044284820557, 0.11825315654277802, 0.14767642319202423, 0.2577417492866516, -0.023924700915813446, 0.013376660645008087, -0.06701226532459259, 0.08896833658218384, 0.25685396790504456, -0.29572349786758423, 0.18417444825172424, -0.5471510887145996, -0.33955225348472595, -0.25426018238067627, 0.2178046703338623, -0.0658867210149765, -0.14002038538455963, 0.031874991953372955, -0.05730944871902466, 0.07126635313034058, 0.22362111508846283, -0.08836248517036438, 0.26971083879470825, 0.29857534170150757, 0.17394165694713593, 0.1848462074995041, 0.4591236412525177, 0.11619936674833298, -0.016821540892124176, -0.1099824607372284, 0.05062592402100563, 0.03506164252758026, 0.22039106488227844, 0.08671382069587708, 0.14765729010105133, 0.023555302992463112, -0.11279697716236115, 0.14142495393753052, 0.1362464278936386, 0.2004884034395218, -0.016014428809285164, -0.2218053638935089, 0.010288162156939507, 0.19755709171295166, 0.20810751616954803, -0.0014718212187290192, 0.19640189409255981, -0.13111791014671326, 0.2788814902305603, -0.21680212020874023, -0.24094070494174957, 0.3765815198421478, -0.28645530343055725, -0.02807101421058178, -0.14680826663970947, 0.17726677656173706, 0.17716699838638306, -0.08746221661567688, -0.4139845669269562, -0.24788689613342285, 0.48100927472114563, -0.04419828951358795, -0.05258968472480774, 0.24178972840309143, -0.008454998955130577, 0.14735397696495056, 0.020029038190841675, 0.3900099992752075, 0.0255171786993742, 0.030064458027482033, -0.06109033524990082, -0.27809077501296997 ]
https://github.com/huggingface/datasets/issues/2447
dataset adversarial_qa has no answers in the "test" set
Makes sense, but not intuitive for someone searching through the datasets. Thanks for adding the note to clarify.
## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0
18
dataset adversarial_qa has no answers in the "test" set ## Describe the bug When loading the adversarial_qa dataset the 'test' portion has no answers. Only the 'train' and 'validation' portions do. This occurs with all four of the configs ('adversarialQA', 'dbidaf', 'dbert', 'droberta') ## Steps to reproduce the bug ``` from datasets import load_dataset examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['test'] print('Loaded {:,} examples'.format(len(examples))) has_answers = 0 for e in examples: if e['answers']['text']: has_answers += 1 print('{:,} have answers'.format(has_answers)) >>> Loaded 3,000 examples >>> 0 have answers examples = load_dataset('adversarial_qa', 'adversarialQA', script_version="master")['validation'] <...code above...> >>> Loaded 3,000 examples >>> 3,000 have answers ``` ## Expected results If 'test' is a valid dataset, it should have answers. Also note that all of the 'train' and 'validation' sets have answers, there are no "no answer" questions with this set (not sure if this is correct or not). ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.8.0-53-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyArrow version: 1.0.0 Makes sense, but not intuitive for someone searching through the datasets. Thanks for adding the note to clarify.
[ -0.03801922872662544, 0.17751619219779968, -0.10937915742397308, 0.3759942054748535, 0.19822056591510773, -0.006238758563995361, 0.3613934814929962, 0.36952823400497437, -0.06413234770298004, 0.0352284237742424, 0.10371176153421402, 0.3792204260826111, -0.1990862339735031, -0.19723406434059143, 0.04321125149726868, 0.11148791015148163, -0.015553422272205353, 0.10720409452915192, -0.06027902662754059, -0.3192009925842285, -0.23112110793590546, 0.09493177384138107, -0.23309384286403656, -0.09491242468357086, -0.2921161651611328, 0.1194496899843216, -0.20432116091251373, 0.15615171194076538, 0.00975858885794878, -0.5535641312599182, 0.28130775690078735, -0.14924472570419312, -0.01675303652882576, 0.4255775511264801, -0.00011180149158462882, -0.04905489459633827, 0.22568686306476593, -0.035171251744031906, -0.3814615309238434, -0.2443184107542038, -0.4445730149745941, -0.2766767740249634, 0.17988274991512299, -0.22161364555358887, -0.1694057583808899, -0.2560259699821472, -0.11212287843227386, -0.11372718214988708, 0.2730475068092346, 0.5292606949806213, 0.24091099202632904, 0.09419756382703781, -0.18431642651557922, -0.13336801528930664, 0.10047486424446106, -0.0949072539806366, -0.12460292130708694, 0.3207925260066986, 0.12391180545091629, -0.2727339267730713, 0.24505838751792908, 0.16121526062488556, 0.018522148951888084, -0.1245780736207962, 0.003062840551137924, 0.002247006632387638, 0.22872811555862427, -0.2950294315814972, 0.09054478257894516, 0.27190715074539185, 0.5253134965896606, -0.15793436765670776, -0.22853858768939972, -0.33739104866981506, 0.19660650193691254, -0.08126187324523926, 0.21876081824302673, 0.2738308906555176, -0.1987093985080719, 0.07514524459838867, -0.03449264541268349, 0.2293824851512909, -0.09455369412899017, 0.05149964243173599, -0.332843542098999, 0.3991551399230957, 0.048328742384910583, -0.0972457006573677, -0.12214787304401398, 0.1052149087190628, -0.036952778697013855, -0.2576107978820801, -0.03454479202628136, 0.22565963864326477, -0.5387459993362427, -0.02726912312209606, 0.01907603070139885, 0.005516737699508667, 0.2636827826499939, 0.31984567642211914, 0.2951919734477997, -0.21960264444351196, -0.02404601499438286, -0.10021118074655533, 0.2141580581665039, 0.39079520106315613, 0.19319476187229156, 0.29822495579719543, 0.03790096193552017, 0.05198156461119652, -0.09909434616565704, 0.10562978684902191, -0.2550404369831085, -0.2089613378047943, 0.23880909383296967, 0.1443416178226471, 0.4825347661972046, -0.204568013548851, -0.2926560640335083, 0.33776211738586426, -0.41905152797698975, -0.14759844541549683, -0.04809786006808281, 0.40005141496658325, -0.2404104471206665, 0.0922669917345047, -0.13257455825805664, 0.25418320298194885, -0.25324052572250366, -0.2583604156970978, -0.24440690875053406, -0.15555013716220856, -0.3043287396430969, -0.23283164203166962, 0.2940025329589844, 0.08912551403045654, 0.20440673828125, 0.1051173061132431, 0.07444687187671661, 0.00010255351662635803, 0.17030823230743408, -0.34432879090309143, 0.11157061159610748, 0.3897329270839691, -0.1513683795928955, 0.2131364494562149, 0.21465614438056946, -0.3839132785797119, 0.02497877925634384, 0.5199183821678162, 0.07579128444194794, -0.081105075776577, 0.018466515466570854, 0.23107028007507324, -0.21549539268016815, -0.044846534729003906, 0.08544252067804337, 0.31620338559150696, 0.07862689346075058, -0.12877197563648224, 0.29786673188209534, -0.3184589147567749, 0.02186330035328865, -0.32757094502449036, 0.5358557105064392, 0.5741312503814697, -0.40689003467559814, 0.16163666546344757, -0.03751415014266968, -0.054951269179582596, -0.1443328559398651, -0.14782506227493286, 0.03479032218456268, 0.18095123767852783, -0.2410237342119217, 0.07046446204185486, 0.12287290394306183, -0.32333695888519287, -0.38953059911727905, -0.08868123590946198, 0.1894906610250473, 0.32474881410598755, 0.035447411239147186, -0.11824002861976624, -0.0009169606491923332, 0.16042624413967133, 0.13699549436569214, 0.19700856506824493, -0.03569009155035019, -0.1906367987394333, -0.38291841745376587, 0.03646227717399597, 0.4099152684211731, 0.31236040592193604, 0.251690149307251, -0.02370939403772354, -0.07209586352109909, -0.4327608048915863, 0.2436811625957489, 0.20881901681423187, -0.13705433905124664, 0.1104605495929718, 0.22258628904819489, -0.05620130896568298, 0.10332009941339493, -0.12282902747392654, -0.49053460359573364, 0.3253695070743561, 0.10021325945854187, 0.2054315209388733, 0.05290685221552849, -0.00969385914504528, -0.4930994510650635, -0.023045793175697327, -0.3354257643222809, -0.517192006111145, 0.18251632153987885, 0.25141599774360657, -0.05143711715936661, 0.3741515874862671, -0.2586682438850403, 0.2646813988685608, 0.025838201865553856, 0.028164148330688477, -0.17185260355472565, 0.26963868737220764, -0.017912304028868675, -0.06891581416130066, -0.10501468181610107, 0.25243666768074036, 0.01642550155520439, 0.0803573951125145, -0.0995144471526146, 0.18329942226409912, 0.09955883771181107, -0.25322186946868896, -0.012566685676574707, 0.41387197375297546, 0.10780161619186401, -0.2240750640630722, -0.10170967131853104, 0.2977460026741028, 0.30715876817703247, -0.1076306402683258, -0.14292508363723755, 0.25571516156196594, -0.08010773360729218, 0.35407575964927673, -0.057454727590084076, 0.13494756817817688, 0.25344395637512207, -0.2289261817932129, -0.1601986289024353, 0.050391994416713715, 0.17797808349132538, 0.050959616899490356, 0.41088879108428955, 0.2816081643104553, -0.31638938188552856, 0.12265448272228241, 0.2962833046913147, -0.18556028604507446, 0.08770491182804108, 0.06651175022125244, -0.10739671438932419, 0.1110723540186882, 0.20658111572265625, 0.32907408475875854, 0.65427565574646, 0.24634362757205963, 0.01476433128118515, 0.054776132106781006, -0.08123613148927689, -0.2099497765302658, 0.16974270343780518, -0.1730262190103531, 0.09665369987487793, 0.4493790864944458, 0.1986967921257019, 0.12201474606990814, -0.14783552289009094, 0.013278745114803314, -0.07287538796663284, 0.2129717618227005, -0.4133991599082947, 0.09009462594985962, -0.20101100206375122, 0.11179039627313614, 0.06247704476118088, -0.2461857944726944, -0.2787477970123291, -0.21887776255607605, 0.21883989870548248, -0.44047409296035767, -0.03393896669149399, 0.25485649704933167, -0.276402086019516, 0.2695622146129608, -0.1428871899843216, 0.07611995935440063, -0.2370149940252304, -0.16464272141456604, -0.4196375012397766, 0.13508325815200806, 0.018621288239955902, -0.10707079619169235, 0.2462533563375473, -0.28131312131881714, -0.2374911606311798, 0.1074712872505188, -0.18966613709926605, 0.11975763738155365, -0.17432557046413422, 0.6320796608924866, 0.05495363101363182, 0.09482192993164062, -0.29637664556503296, -0.05842461809515953, 0.3697800636291504, -0.006681123748421669, -0.08747211843729019, 0.17274996638298035, 0.22859737277030945, 0.018604442477226257, -0.042103156447410583, -0.7604628205299377, -0.3359156548976898, -0.2818160653114319, -0.019321970641613007, 0.025629747658967972, 0.19124159216880798, 0.3360471725463867, 0.24737846851348877, 0.13082200288772583, -0.2239895462989807, 0.05514778196811676, -0.17093896865844727, -0.012500673532485962, 0.39710915088653564, -0.14245708286762238, -0.4635109007358551, -0.0660356879234314, -0.2137099653482437, 0.21118323504924774, -0.04787169396877289, -0.49196088314056396, -0.06670571118593216, -0.2664313018321991, 0.27498045563697815, -0.1996055394411087, 0.09075722843408585, 0.23403802514076233, -0.16498419642448425, -0.05455871671438217, -0.27232450246810913, -0.14402148127555847, 0.3495977818965912, -0.09067241847515106, 0.12115001678466797, -0.1907501220703125, 0.25331756472587585, -0.0005463361740112305, 0.4581645727157593, 0.0876600593328476, 0.18730956315994263, 0.2734178900718689, -0.17522716522216797, 0.4184906780719757, -0.23205018043518066, -0.42648985981941223, 0.0626348927617073, 0.30192703008651733, -0.007107490673661232, 0.32044699788093567, 0.09070747345685959, 0.0949324518442154, -0.16753226518630981, -0.05327603220939636, -0.5038223266601562, -0.20431731641292572, 0.13666391372680664, -0.5980348587036133, -0.01145981252193451, -0.019063567742705345, 0.10016881674528122, 0.027233708649873734, -0.04678088054060936, -0.22395464777946472, 0.13145211338996887, 0.031217291951179504, -0.07206889241933823, -0.4294917583465576, -0.06588425487279892, -0.09282968193292618, 0.1315649449825287, -0.15443475544452667, 0.42823901772499084, -0.08382932096719742, -0.17619141936302185, 0.19342130422592163, 0.13685379922389984, 0.901411235332489, -0.07689163833856583, -0.19094011187553406, 0.34549471735954285, -0.057454779744148254, -0.4061219394207001, -0.2854197025299072, -0.2000976800918579, 0.01804020255804062, -0.09650471806526184, -0.04594758152961731, -0.38908806443214417, -0.07289218157529831, 0.07279086858034134, 0.11115294694900513, -0.2667549252510071, -0.13791756331920624, -0.37411147356033325, -0.23094713687896729, -0.13024075329303741, 0.21485039591789246, 0.05626071244478226, 0.1579623520374298, -0.21491742134094238, -0.1812155544757843, -0.09744352102279663, -0.14678992331027985, 0.3230844736099243, 0.24874041974544525, 0.29227927327156067, -0.028935909271240234, 0.19831673800945282, -0.018965862691402435, -0.13425011932849884, 0.06719457358121872, 0.5639811754226685, -0.14793075621128082, -0.11240485310554504, 0.17483150959014893, -0.27978000044822693, 0.5428377389907837, 0.24140535295009613, -0.18708528578281403, -0.2742551267147064, -0.395137757062912, 0.022608287632465363, -0.1351647675037384, -0.1171405166387558, 0.36117085814476013, -0.03593674302101135, -0.05209186673164368, -0.5506637096405029, 0.13865458965301514, -0.19210177659988403, -0.23797959089279175, 0.1963507980108261, 0.22045883536338806, -0.1451258510351181, 0.4353659749031067, -0.04967228323221207, 0.9236738681793213, -0.057225681841373444, 0.19388015568256378, 0.45616966485977173, 0.006199013441801071, 0.31328874826431274, -0.1844433695077896, 0.07074492424726486, -0.28152236342430115, -0.504356861114502, 0.16491231322288513, -0.12413075566291809, 0.07165642082691193, 0.30663031339645386, -0.11438724398612976, 0.2874804735183716, -0.38415956497192383, 0.1655440628528595, 0.30296844244003296, -0.11740884184837341, -0.16478294134140015, 0.3358228802680969, -0.633698582649231, 0.167783722281456, 0.14473006129264832, -0.0005196183919906616, -0.14079317450523376, 0.02402016893029213, -0.23329292237758636, -0.28579801321029663, -0.3050091564655304, 0.16505667567253113, -0.3812284767627716, -0.15649855136871338, 0.4907229244709015, -0.12659582495689392, -0.03964512422680855, 0.6422731876373291, 0.15312498807907104, 0.24092194437980652, -0.045036979019641876, 0.2599814236164093, 0.06544315069913864, 0.2937276363372803, 0.22771672904491425, -0.04050464183092117, 0.3724680542945862, -0.09048271179199219, -0.500872790813446, 0.24005085229873657, -0.08746892213821411, -0.13171568512916565, -0.19450733065605164, 0.25378891825675964, 0.12011626362800598, -0.12074792385101318, -0.1940658688545227, -0.05993391573429108, 0.295526921749115, -0.06975452601909637, 0.2095024436712265, 0.0012129172682762146, -0.005002974532544613, 0.30274397134780884, 0.2215651422739029, -0.36331239342689514, -0.05514044687151909, 0.23107898235321045, 0.029779966920614243, 0.31977608799934387, 0.7269604206085205, 0.10232377052307129, -0.0020685940980911255, -0.3283357620239258, -0.11119498312473297, 0.4242290258407593, -0.480444997549057, 0.16729722917079926, -0.023080550134181976, -0.025554805994033813, -0.08293123543262482, 0.029903575778007507, 0.1886942982673645, -0.2846027612686157, 0.04248613491654396, -0.5493787527084351, 0.07572495937347412, 0.2848809063434601, 0.04535883665084839, 0.12376652657985687, 0.11413083225488663, -0.1974116712808609, 0.048015862703323364, 0.22118251025676727, -0.4114348292350769, -0.015875082463026047, -0.4132535457611084, 0.0946042388677597, -0.5187215805053711, 0.008077450096607208, 0.18616414070129395, -0.12223805487155914, 0.2089361995458603, -0.25730812549591064, -0.06633913516998291, -0.3209451138973236, -0.11832569539546967, 0.16479261219501495, 0.040622513741254807, -0.008450837805867195, -0.20127888023853302, -0.24713338911533356, -0.10166613757610321, -0.1423341929912567, 0.0885666012763977, 0.13076052069664001, -0.07143962383270264, 0.2590896487236023, 0.15419518947601318, 0.24488404393196106, -0.15637560188770294, 0.1397516131401062, -0.3300168514251709, -0.3168638348579407, 0.24319179356098175, 0.016353599727153778, 0.04417805373668671, -0.00576348602771759, 0.01321500726044178, 0.14203301072120667, -0.23904691636562347, 0.00040528178215026855, 0.30309388041496277, -0.10987716913223267, 0.2360556721687317, -0.03526325151324272, 0.03414172679185867, 0.21044939756393433, -0.3356779217720032, 0.1342540830373764, 0.12549346685409546, 0.2870281934738159, -0.4436325430870056, 0.11008737236261368, 0.04215855151414871, 0.20801493525505066, 0.07100796699523926, 0.15334391593933105, 0.1693103015422821, -0.3946670591831207, 0.0037215575575828552, 0.207219660282135, 0.16317807137966156, 0.09518084675073624, 0.23610922694206238, 0.5443528294563293, -0.22979088127613068, 0.05863787606358528, -0.05520503222942352, -0.1819317489862442, -0.1783490777015686, 0.011928290128707886, -0.15069901943206787, 0.2770521938800812, -0.08041088283061981, -0.16463322937488556, -0.06886938959360123, -0.19951678812503815, 0.24492575228214264, 0.16486938297748566, -0.07886147499084473, -0.09502305835485458, -0.04789556562900543, 0.267170786857605, -0.00971816573292017, 0.10536637902259827, -0.2423916608095169, -0.12334160506725311, 0.0048698000609874725, 0.04077443480491638, -0.24988596141338348, -0.2379463016986847, -0.2651350796222687, -0.3146313428878784, -0.10967971384525299, -0.2998897433280945, 0.11822517216205597, 0.020603008568286896, -0.2783415913581848, -0.2631773054599762, 0.35607707500457764, 0.2780516445636749, 0.12487590312957764, -0.06302188336849213, 0.27433890104293823, 0.24780793488025665, 0.10567659884691238, 0.2066352218389511, 0.521608829498291, 0.2522515058517456, 0.4706484079360962, -0.22167804837226868, -0.03176426142454147, 0.030226612463593483, -0.0459732860326767, -0.23728345334529877, 0.5032384991645813, 0.02846710756421089, 0.23904913663864136, 0.0533829964697361, 0.20612116158008575, -0.19135211408138275, 0.2023078203201294, 0.1169331893324852, 0.035727359354496, -0.29325565695762634, 0.1734127551317215, -0.0888204574584961, 0.05403447151184082, 0.0014774128794670105, 0.14221008121967316, -0.5204798579216003, 0.01883571594953537, 0.204666867852211, -0.02795608900487423, 0.14614015817642212, -0.27219077944755554, 0.1103949099779129, -0.1316329389810562, 0.23560670018196106, 0.29261162877082825, 0.3262926936149597, -0.2702355682849884, 0.005739755928516388, -0.638788640499115, 0.1406664252281189, 0.08549198508262634, 0.10151401162147522, 0.20699240267276764, -0.052673839032649994, 0.05177919939160347, -0.0708198994398117, 0.06293457001447678, 0.2157253921031952, -0.264503538608551, 0.19467602670192719, -0.5525678992271423, -0.3293531835079193, -0.2111411839723587, 0.2391728162765503, -0.10251699388027191, -0.1405191421508789, 0.023869026452302933, -0.1510101854801178, 0.06937164813280106, 0.17843076586723328, -0.07180387526750565, 0.2928228974342346, 0.260678768157959, 0.1866382658481598, 0.2264152616262436, 0.4868246018886566, 0.12388818711042404, -0.006214693188667297, -0.22205853462219238, 0.04044168069958687, -0.046836934983730316, 0.27191439270973206, 0.03864682465791702, 0.14076587557792664, 0.014792019501328468, -0.1896047294139862, 0.16789624094963074, 0.12221848219633102, 0.14336857199668884, -0.038016319274902344, -0.21380546689033508, 0.06548486649990082, 0.14605650305747986, 0.13981036841869354, -0.047583840787410736, 0.1428244411945343, -0.11313018202781677, 0.2552957236766815, -0.23375572264194489, -0.33977010846138, 0.3369905948638916, -0.3220009505748749, -0.01843303255736828, -0.20393642783164978, 0.18055343627929688, 0.1736852526664734, 0.0004843287169933319, -0.4455556869506836, -0.20575620234012604, 0.5004957318305969, -0.0006246138364076614, -0.09271236509084702, 0.2928691506385803, -0.0615583099424839, 0.08786259591579437, -0.03501380980014801, 0.34990474581718445, 0.043659232556819916, 0.0033150222152471542, -0.0028548873960971832, -0.2417057454586029 ]
https://github.com/huggingface/datasets/issues/2446
`yelp_polarity` is broken
``` File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 233, in <module> configs = get_confs(option) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 604, in wrapped_func return get_or_create_cached_value() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 588, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 148, in get_confs builder_cls = nlp.load.import_main_class(module_path[0], dataset=True) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/datasets/load.py", line 85, in import_main_class module = importlib.import_module(module_path) File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/sasha/.cache/huggingface/modules/datasets_modules/datasets/yelp_polarity/a770787b2526bdcbfc29ac2d9beb8e820fbc15a03afd3ebc4fb9d8529de57544/yelp_polarity.py", line 36, in <module> from datasets.tasks import TextClassification ```
![image](https://user-images.githubusercontent.com/22514219/120828150-c4a35b00-c58e-11eb-8083-a537cee4dbb3.png)
118
`yelp_polarity` is broken ![image](https://user-images.githubusercontent.com/22514219/120828150-c4a35b00-c58e-11eb-8083-a537cee4dbb3.png) ``` File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.__dict__) File "/home/sasha/nlp-viewer/run.py", line 233, in <module> configs = get_confs(option) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 604, in wrapped_func return get_or_create_cached_value() File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/streamlit/caching.py", line 588, in get_or_create_cached_value return_value = func(*args, **kwargs) File "/home/sasha/nlp-viewer/run.py", line 148, in get_confs builder_cls = nlp.load.import_main_class(module_path[0], dataset=True) File "/home/sasha/.local/share/virtualenvs/lib-ogGKnCK_/lib/python3.7/site-packages/datasets/load.py", line 85, in import_main_class module = importlib.import_module(module_path) File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 677, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 728, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/sasha/.cache/huggingface/modules/datasets_modules/datasets/yelp_polarity/a770787b2526bdcbfc29ac2d9beb8e820fbc15a03afd3ebc4fb9d8529de57544/yelp_polarity.py", line 36, in <module> from datasets.tasks import TextClassification ```
[ -0.1024589091539383, -0.4164358973503113, -0.159715935587883, 0.11063848435878754, 0.2700796127319336, -0.13424353301525116, 0.0620419904589653, 0.32489681243896484, 0.11502425372600555, 0.02086099237203598, -0.07330335676670074, 0.09813632071018219, -0.07752815634012222, 0.0881604477763176, -0.027291297912597656, -0.054701440036296844, -0.06708911806344986, 0.5007217526435852, -0.2798653542995453, -0.10240118205547333, -0.18737398087978363, 0.30479446053504944, 0.04699262976646423, 0.15298399329185486, -0.02151588536798954, -0.09981871396303177, 0.07568252086639404, 0.2807609438896179, -0.21981413662433624, -0.32855236530303955, 0.04543524235486984, 0.09239351749420166, -0.21742935478687286, 0.11223742365837097, -0.00011019752128049731, -0.06834673881530762, 0.3514302372932434, -0.04945509880781174, 0.026747293770313263, -0.3109244704246521, 0.055676527321338654, -0.11625432968139648, 0.07161271572113037, -0.17534413933753967, -0.13028576970100403, -0.2852270007133484, 0.006950663402676582, -0.05220343917608261, 0.512547492980957, 0.2175065577030182, 0.29516786336898804, 0.0969504788517952, 0.07746036350727081, 0.11193293333053589, 0.06857578456401825, 0.23084986209869385, -0.051935501396656036, 0.07554148137569427, -0.12826979160308838, -0.4185500741004944, -0.08518930524587631, 0.37967902421951294, 0.041724517941474915, 0.009353374131023884, 0.18165643513202667, -0.23981602489948273, 0.6431134343147278, 0.09646572172641754, 0.056175388395786285, 0.0915922224521637, -0.26068368554115295, 0.023008007556200027, 0.11747714132070541, 0.24565741419792175, -0.16484497487545013, -0.418864369392395, 0.09753160178661346, 0.3891126215457916, -0.24442148208618164, -0.1872091144323349, -0.05272156745195389, -0.09613184630870819, -0.23036932945251465, 0.2770906984806061, -0.00003577396273612976, 0.7835240364074707, -0.0015449272468686104, 0.18229836225509644, 0.18114949762821198, 0.036946363747119904, 0.19546714425086975, 0.39759328961372375, -0.12704691290855408, 0.06703829765319824, -0.055720921605825424, 0.03596927225589752, 0.22672900557518005, 0.15069743990898132, 0.057046160101890564, 0.2722669243812561, 0.36390700936317444, 0.09718993306159973, 0.21671734750270844, 0.13880008459091187, 0.00014257431030273438, 0.19536466896533966, 0.06827440112829208, 0.4745211601257324, 0.27137863636016846, 0.5279777646064758, 0.16390202939510345, 0.14324456453323364, 0.16575519740581512, -0.42166051268577576, -0.030152326449751854, 0.11452772468328476, 0.06033046543598175, 0.13035887479782104, -0.22503690421581268, 0.009647813625633717, -0.08318616449832916, 0.26374685764312744, 0.2026589810848236, 0.23872753977775574, 0.05683738738298416, 0.2667752504348755, 0.2185368686914444, 0.076939657330513, -0.0639016255736351, 0.033066876232624054, -0.19906297326087952, 0.3460366725921631, -0.3091922402381897, -0.0692950114607811, 0.07889363169670105, 0.3844727575778961, 0.5319617390632629, -0.1714348942041397, -0.22564829885959625, -0.0870872288942337, -0.027148105204105377, -0.06837579607963562, 0.1519235074520111, 0.25063154101371765, -0.07913956791162491, -0.05421505868434906, 0.23636066913604736, 0.0717267096042633, -0.06635190546512604, -0.13007548451423645, -0.03147263079881668, 0.09405438601970673, -0.19856910407543182, 0.30280715227127075, 0.03911871463060379, 0.03013411909341812, 0.08507242798805237, 0.0400199368596077, 0.26297691464424133, -0.2812221050262451, 0.19044512510299683, -0.2715657353401184, -0.2210513949394226, -0.11432141810655594, 0.07434120029211044, 0.3664708435535431, -0.04160364344716072, -0.40933507680892944, -0.2936209440231323, -0.14198395609855652, 0.22344185411930084, 0.18269526958465576, 0.07993324846029282, -0.03529536724090576, -0.21925662457942963, 0.01911730319261551, 0.3005342185497284, -0.3774948716163635, -0.18658706545829773, -0.1834842413663864, -0.16300781071186066, -0.07560635358095169, -0.048392705619335175, 0.18196353316307068, -0.0024487702175974846, 0.13283947110176086, 0.15584123134613037, 0.6501129865646362, 0.12104349583387375, 0.11920928210020065, -0.42295902967453003, -0.01557356771081686, 0.21175529062747955, -0.05279349163174629, 0.2383706271648407, -0.035569928586483, 0.06329400837421417, -0.18812234699726105, 0.11847873032093048, -0.015410143882036209, 0.21858057379722595, 0.24961602687835693, 0.5116139054298401, 0.0674150288105011, 0.0867023840546608, 0.08057994395494461, 0.03773067519068718, -0.07986309379339218, -0.9023956060409546, 0.13079726696014404, -0.3075229525566101, 0.1495978683233261, -0.24953994154930115, -0.1359957605600357, -0.4057093560695648, -0.47628822922706604, 0.25745370984077454, 0.16518542170524597, 0.10101582109928131, 0.08207036554813385, 0.1044292002916336, 0.30604276061058044, -0.3019447326660156, 0.08234064280986786, 0.018169328570365906, 0.25725409388542175, -0.2900834381580353, -0.05227670446038246, 0.04599623382091522, 0.2013457715511322, 0.3136650025844574, -0.16863790154457092, -0.17929401993751526, 0.3776598572731018, -0.5558841228485107, 0.4288751482963562, -0.1506468951702118, -0.3552914261817932, 0.2208000272512436, -0.5869689583778381, -0.028009457513689995, 0.13809925317764282, -0.03647509589791298, -0.03195231407880783, 0.1685718446969986, 0.26607242226600647, -0.1766497790813446, 0.16433516144752502, 0.14216698706150055, 0.2842079997062683, 0.16251768171787262, -0.023087799549102783, -0.17315880954265594, -0.304288774728775, 0.44372981786727905, -0.0175066776573658, 0.10518442094326019, -0.3311530351638794, 0.017174027860164642, 0.019118309020996094, 0.4013846218585968, 0.3117007613182068, 0.19252312183380127, -0.07159202545881271, 0.04867476969957352, -0.1927371621131897, 0.15320497751235962, 0.22706197202205658, 0.3311016261577606, 0.13040702044963837, -0.2781845033168793, 0.0966535285115242, -0.1665704846382141, -0.13783657550811768, 0.2107178419828415, 0.046498849987983704, 0.3183384835720062, 0.34070292115211487, 0.3252832889556885, -0.08944173902273178, -0.3340722620487213, -0.1943027228116989, -0.20500598847866058, 0.22857289016246796, 0.022880878299474716, 0.05169814079999924, -0.2642991840839386, -0.056127507239580154, 0.006092777010053396, 0.1965389996767044, -0.020937703549861908, -0.25159594416618347, 0.1971220225095749, -0.09670606255531311, -0.23913513123989105, 0.4282856583595276, 0.19947649538516998, 0.12546654045581818, 0.2627291679382324, -0.17054608464241028, -0.3780846893787384, -0.2816610634326935, -0.033192992210388184, 0.0982736200094223, -0.07437264174222946, -0.04805013909935951, 0.4588591158390045, -0.12411577999591827, -0.020808611065149307, -0.27332523465156555, -0.4662453234195709, 0.06045600771903992, -0.1246376782655716, -0.032354988157749176, 0.13863739371299744, 0.2650434374809265, 0.029109247028827667, 0.06448865681886673, 0.4058017134666443, -0.5469167828559875, -0.12999790906906128, 0.07798447459936142, -0.0843910276889801, 0.014115533791482449, -0.3546925187110901, 0.016258418560028076, -0.15196961164474487, -0.4868760108947754, 0.1228959858417511, 0.4273000657558441, 0.11076272279024124, 0.1560138612985611, 0.11296965926885605, -0.11829530447721481, -0.11058252304792404, 0.2593550980091095, -0.10416683554649353, 0.3105342984199524, 0.2750076949596405, -0.3885122537612915, -0.2793479859828949, -0.28133314847946167, -0.04148232564330101, 0.5379201173782349, 0.07298386842012405, -0.25792253017425537, -0.08238481730222702, 0.053089842200279236, -0.14295901358127594, -0.22452577948570251, -0.1798427850008011, 0.2956194281578064, 0.056741390377283096, -0.1748361736536026, 0.01333308219909668, 0.13660328090190887, -0.07881423085927963, 0.051061928272247314, 0.255881130695343, -0.025281500071287155, 0.04379641264677048, 0.018015123903751373, 0.3831222653388977, -0.03964821621775627, -0.059312302619218826, 0.2597801685333252, 0.08446105569601059, 0.37187424302101135, 0.049006249755620956, -0.3023103177547455, -0.09092233330011368, 0.2394498884677887, 0.2573046088218689, 0.054187316447496414, -0.023147419095039368, -0.13953088223934174, -0.2728269100189209, 0.1770862638950348, -0.25958266854286194, -0.019269468262791634, -0.26451796293258667, 0.05445249378681183, 0.24266570806503296, 0.09511411190032959, -0.08360594511032104, 0.007883083075284958, -0.1807268261909485, 0.06187860295176506, 0.22656553983688354, -0.37164396047592163, 0.1437595933675766, -0.07564441114664078, -0.5033361315727234, -0.051812998950481415, 0.24540942907333374, -0.04100959002971649, 0.04894186556339264, -0.18863071501255035, 0.003124810755252838, 0.11597254872322083, -0.22207075357437134, 0.376778244972229, 0.23768159747123718, 0.0985262542963028, 0.05037962272763252, 0.21140938997268677, -0.3266756236553192, -0.2567704916000366, -0.12790603935718536, 0.13980363309383392, 0.0037040673196315765, 0.3034195899963379, -0.24488312005996704, -0.0859333947300911, 0.4820076823234558, -0.13853588700294495, -0.10426196455955505, 0.07101523131132126, -0.38135895133018494, -0.3186562955379486, -0.030412647873163223, -0.06837823241949081, 0.07832158356904984, 0.18015624582767487, 0.003921995405107737, 0.06006113067269325, 0.3741309344768524, -0.09267640858888626, -0.29010820388793945, 0.07837323844432831, 0.2200596034526825, -0.31253424286842346, -0.3215504288673401, 0.007063951343297958, -0.1349455863237381, -0.2527894377708435, 0.2349003255367279, 0.15675416588783264, 0.049361247569322586, 0.09440456330776215, 0.06774356961250305, -0.20005100965499878, 0.289939820766449, -0.06454894691705704, -0.04213785380125046, -0.05649261921644211, 0.3262820839881897, 0.25568506121635437, 0.015684878453612328, 0.24307353794574738, -0.025415878742933273, -0.033896930515766144, -0.11778508871793747, 0.2917449176311493, 0.02282114326953888, 0.18350590765476227, 0.2056344449520111, 0.2709779143333435, -0.2117454558610916, 0.0800262987613678, 0.2155645191669464, 0.8698323965072632, 0.12039834260940552, 0.24944545328617096, 0.4566155970096588, -0.14431683719158173, 0.39796996116638184, -0.3091321587562561, 0.17338356375694275, -0.2170277088880539, 0.7918381094932556, 0.045868195593357086, -0.060184378176927567, 0.2042425274848938, -0.35513341426849365, -0.15392069518566132, 0.2807692885398865, 0.05597986280918121, -0.13741940259933472, -0.0944264680147171, -0.040757521986961365, -0.20886091887950897, -0.05004836246371269, 0.11013609170913696, 0.21602222323417664, -0.3534601330757141, 0.3168392777442932, -0.27805253863334656, -0.010556969791650772, 0.004440266638994217, -0.2202255129814148, -0.31494057178497314, 0.11789540201425552, -0.3058871328830719, 0.33308595418930054, 0.15861570835113525, -0.3753376007080078, -0.20431335270404816, 0.12018167972564697, 0.00239582359790802, 0.1498405486345291, -0.10040786862373352, 0.3681907653808594, 0.07056620717048645, -0.13956351578235626, -0.20487552881240845, 0.3914448618888855, 0.11227665841579437, -0.17728081345558167, -0.14578352868556976, 0.10831212997436523, -0.12311995774507523, -0.17053458094596863, -0.41958826780319214, 0.12318228930234909, 0.2489803582429886, 0.2318025529384613, 0.03141093999147415, -0.12997569143772125, -0.21632887423038483, -0.3416889011859894, 0.20313450694084167, -0.10837651789188385, -0.0590425506234169, -0.19644606113433838, 0.3437511920928955, -0.1848871111869812, -0.015850063413381577, 0.14886890351772308, -0.08979509025812149, -0.0017372816801071167, 0.2791023254394531, 0.08971260488033295, -0.28568020462989807, -0.3556288182735443, -0.2173347771167755, -0.15369634330272675, -0.32029613852500916, 0.18191947042942047, -0.06845160573720932, -0.36013907194137573, -0.1211632788181305, 0.0910358726978302, -0.03566789627075195, 0.29082199931144714, 0.16321831941604614, -0.3125690221786499, -0.19385910034179688, 0.1337798535823822, -0.270555317401886, 0.030573559924960136, 0.11450881510972977, 0.1781092882156372, -0.15792658925056458, -0.055304624140262604, -0.3672720193862915, 0.0183308944106102, -0.2803930640220642, -0.019764378666877747, -0.0945989266037941, -0.30927637219429016, 0.0475362092256546, 0.21228943765163422, 0.29526516795158386, 0.33879148960113525, -0.19746962189674377, -0.2868540585041046, -0.11512450873851776, 0.08329039067029953, 0.07682041823863983, -0.2846938669681549, 0.016292963176965714, -0.11602441221475601, -0.020936518907546997, 0.09532861411571503, -0.08492067456245422, 0.08787653595209122, 0.10535863041877747, 0.17310762405395508, -0.48613420128822327, -0.03370245546102524, 0.3043295741081238, -0.03179876506328583, -0.2654173672199249, 0.0546753965318203, -0.1887231171131134, 0.056060437113046646, 0.07699033617973328, -0.0855598896741867, -0.35809019207954407, 0.057841233909130096, 0.013008646667003632, 0.17600426077842712, 0.24880430102348328, -0.15459449589252472, 0.014413662254810333, -0.41383200883865356, 0.44701558351516724, 0.15859360992908478, -0.30024027824401855, -0.0020473767071962357, 0.08836297690868378, 0.22024549543857574, -0.3378840684890747, 0.3136425316333771, -0.2345173954963684, -0.03534000739455223, 0.28003939986228943, 0.05519111454486847, -0.2639216482639313, -0.31708768010139465, 0.1199294924736023, 0.30929118394851685, 0.41656965017318726, -0.5629335045814514, 0.03284357488155365, -0.2319970726966858, -0.10966720432043076, 0.1346087008714676, 0.3232018053531647, 0.1284896582365036, 0.17520180344581604, 0.12408913671970367, -0.25711387395858765, -0.0405963733792305, -0.3657481074333191, 0.019104965031147003, -0.016092002391815186, -0.036642637103796005, -0.09101147949695587, 0.13787731528282166, -0.2509671449661255, 0.3228328824043274, 0.08182310312986374, 0.7464488744735718, -0.28744208812713623, -0.03397541493177414, -0.14605827629566193, 0.14543767273426056, -0.1406715214252472, 0.10588210821151733, -0.45470646023750305, -0.180869922041893, -0.3080902695655823, 0.09740091860294342, 0.22007323801517487, 0.1771291196346283, -0.23838546872138977, 0.22497953474521637, -0.3436037302017212, -0.28066983819007874, 0.34940820932388306, 0.030345261096954346, 0.21189343929290771, -0.1712244302034378, 0.08027073740959167, 0.3841168284416199, 0.06248509883880615, -0.27228179574012756, 0.17105692625045776, 0.2106827199459076, 0.23444119095802307, -0.09084774553775787, -0.1804368793964386, -0.1201743334531784, -0.3061043620109558, -0.015119324438273907, 0.12984377145767212, 0.551469087600708, -0.20901592075824738, -0.15168359875679016, 0.25907692313194275, -0.36034902930259705, 0.4619837999343872, 0.3421061336994171, 0.3487669825553894, 0.2704690992832184, 0.17141777276992798, -0.35773801803588867, -0.09141872078180313, -0.12377119064331055, -0.11093439906835556, -0.583260715007782, -0.2473842352628708, -0.2743435502052307, 0.10028518736362457, 0.11591175943613052, -0.3735368549823761, 0.10607397556304932, 0.029910709708929062, 0.16523249447345734, 0.3347083032131195, -0.3359479010105133, -0.11549506336450577, -0.07285917550325394, -0.2500903010368347, 0.202532559633255, -0.04339274391531944, -0.04946104437112808, -0.34097087383270264, 0.23016688227653503, -0.29878705739974976, 0.04753345623612404, 0.3991134762763977, 0.2826298475265503, 0.044350773096084595, -0.35542160272598267, -0.22995468974113464, 0.19819016754627228, 0.11172342300415039, -0.06013917922973633, 0.24959316849708557, -0.3151146471500397, -0.04920187219977379, -0.263342946767807, 0.23301628232002258, -0.015277236700057983, -0.18712404370307922, 0.0017419643700122833, 0.10918635874986649, 0.03687641769647598, 0.14577344059944153, 0.07549723237752914, -0.17857792973518372, -0.21450793743133545, -0.26478540897369385, -0.3179628252983093, -0.118497833609581, -0.07433203607797623, -0.08638866245746613, 0.47938743233680725, 0.05893166363239288, -0.5347610116004944, -0.30824723839759827, 0.3783537447452545, -0.1460171937942505, -0.28362715244293213, -0.161649689078331, 0.312176376581192, 0.12907534837722778, 0.0019296989776194096, -0.19125163555145264, 0.00030663609504699707, 0.06160710006952286, -0.13692744076251984, -0.5791831612586975, -0.42991575598716736, 0.4820762872695923, -0.13735689222812653, -0.2608010768890381, 0.3844517469406128, 0.2948334813117981, 0.26732465624809265, 0.1125459298491478, -0.16521796584129333, 0.1308755874633789, -0.04906504228711128, 0.17089807987213135, -0.15241125226020813, 0.33388572931289673, -0.31316062808036804, -0.07698987424373627, 0.04954630509018898, -0.21982213854789734, 0.3098987936973572, 0.0017404630780220032, 0.13819672167301178, -0.07704520225524902 ]
https://github.com/huggingface/datasets/issues/2444
Sentence Boundaries missing in Dataset: xtreme / udpos
Hi, This is a known issue. More info on this issue can be found in #2061. If you are looking for an open-source contribution, there are step-by-step instructions in the linked issue that you can follow to fix it.
I was browsing through annotation guidelines, as suggested by the datasets introduction. The guidlines saids "There must be exactly one blank line after every sentence, including the last sentence in the file. Empty sentences are not allowed." in the [Sentence Boundaries and Comments section](https://universaldependencies.org/format.html#sentence-boundaries-and-comments) But the sentence boundaries seems not to be represented by huggingface datasets features well. I found out that multiple sentence are concatenated together as a 1D array, without any delimiter. PAN-x, which is another token classification subset from xtreme do represent the sentence boundary using a 2D array. You may compare in PAN-x.en and udpos.English in the explorer: https://huggingface.co/datasets/viewer/?dataset=xtreme
39
Sentence Boundaries missing in Dataset: xtreme / udpos I was browsing through annotation guidelines, as suggested by the datasets introduction. The guidlines saids "There must be exactly one blank line after every sentence, including the last sentence in the file. Empty sentences are not allowed." in the [Sentence Boundaries and Comments section](https://universaldependencies.org/format.html#sentence-boundaries-and-comments) But the sentence boundaries seems not to be represented by huggingface datasets features well. I found out that multiple sentence are concatenated together as a 1D array, without any delimiter. PAN-x, which is another token classification subset from xtreme do represent the sentence boundary using a 2D array. You may compare in PAN-x.en and udpos.English in the explorer: https://huggingface.co/datasets/viewer/?dataset=xtreme Hi, This is a known issue. More info on this issue can be found in #2061. If you are looking for an open-source contribution, there are step-by-step instructions in the linked issue that you can follow to fix it.
[ 0.2943783104419708, -0.3165695071220398, -0.0003397911787033081, -0.042925767600536346, 0.20856846868991852, -0.21818315982818604, 0.28615957498550415, -0.20596402883529663, -0.08608455210924149, 0.03881806880235672, -0.1333661675453186, -0.03214303404092789, 0.09912867099046707, 0.012327538803219795, -0.03142792731523514, -0.37335923314094543, 0.0662139430642128, -0.02486748993396759, -0.0890798568725586, -0.20080922544002533, 0.01728137582540512, 0.19551299512386322, -0.24963653087615967, -0.1431768238544464, -0.9076259136199951, 0.08293461799621582, -0.441616952419281, -0.10276877135038376, -0.24908281862735748, -0.2852185070514679, 0.40683963894844055, 0.2977806627750397, 0.014663778245449066, 0.19804039597511292, -0.00011928495223401114, -0.24387191236019135, 0.008275516331195831, -0.2250848263502121, 0.14758801460266113, -0.11691524088382721, -0.004342999309301376, -0.3055849075317383, 0.19426211714744568, -0.09919586032629013, -0.16779237985610962, 0.30739402770996094, -0.03755718469619751, -0.27296704053878784, 0.3280767798423767, 0.25582581758499146, 0.04779540002346039, 0.04369373992085457, 0.18915912508964539, -0.17261752486228943, 0.26657038927078247, 0.10963879525661469, 0.0460626557469368, -0.1800411492586136, 0.3944064676761627, -0.09639718383550644, -0.18868795037269592, 0.05284188687801361, -0.07477190345525742, -0.052955206483602524, 0.03260975331068039, -0.01394126657396555, 0.05537785589694977, -0.3024043142795563, -0.08135338127613068, 0.35179030895233154, 0.5863415002822876, -0.16347110271453857, -0.4324623644351959, -0.2785455584526062, 0.15345434844493866, -0.042279720306396484, 0.02326180413365364, 0.14874038100242615, 0.01914849877357483, 0.1376582831144333, -0.2143913060426712, -0.007038651965558529, -0.20357368886470795, 0.19724693894386292, -0.40437600016593933, 0.5016341209411621, -0.12001736462116241, -0.25576305389404297, -0.17046314477920532, 0.07023712992668152, 0.3050931394100189, 0.15179897844791412, -0.059709612280130386, -0.04280716925859451, -0.19323767721652985, 0.05603661388158798, -0.05937281996011734, -0.23944199085235596, 0.27005016803741455, 0.11304537951946259, -0.02153749391436577, -0.09206870198249817, -0.0285167396068573, 0.150285542011261, 0.3564150929450989, 0.045996252447366714, 0.4407731890678406, -0.1441405713558197, 0.10736063122749329, 0.18526999652385712, 0.0624559111893177, -0.11622767895460129, -0.20451556146144867, 0.037961822003126144, 0.17112115025520325, 0.027793029323220253, 0.07683999836444855, -0.22266338765621185, -0.11090453714132309, 0.0910215899348259, -0.17157191038131714, 0.23573854565620422, -0.08434800058603287, 0.11623360961675644, 0.1526811271905899, 0.36137962341308594, -0.12467026710510254, 0.1369120329618454, -0.05933859199285507, -0.5313045382499695, -0.1652621030807495, -0.06799198687076569, -0.1691620945930481, 0.12952587008476257, 0.09169092774391174, 0.2039804309606552, 0.4520846903324127, -0.06675660610198975, 0.20605021715164185, -0.3830922544002533, -0.21010465919971466, -0.19920967519283295, 0.2979210615158081, 0.29833438992500305, 0.09095598757266998, -0.09354052692651749, 0.00576995313167572, 0.0271284282207489, 0.18002301454544067, 0.11530346423387527, -0.037776678800582886, 0.14523273706436157, -0.21782590448856354, 0.028097335249185562, -0.47521156072616577, -0.10522893071174622, 0.02044125646352768, 0.15911416709423065, 0.19589632749557495, 0.2108127772808075, 0.37264570593833923, 0.033467333763837814, -0.16732341051101685, 0.05398240685462952, 0.23220452666282654, 0.5055278539657593, -0.42186740040779114, -0.2860971689224243, 0.006702916231006384, 0.1054772287607193, 0.19105125963687897, 0.16018959879875183, 0.2430482804775238, 0.17639115452766418, -0.20688380300998688, 0.47485923767089844, -0.12794405221939087, -0.1247965544462204, -0.18770615756511688, 0.08195982128381729, 0.19853432476520538, 0.10637965053319931, 0.014289312064647675, -0.318945974111557, 0.7664395570755005, 0.20035617053508759, 0.1362503468990326, -0.20443443953990936, 0.3295779526233673, -0.04685641825199127, -0.030329523608088493, 0.05516006797552109, -0.22021399438381195, -0.07891690731048584, -0.08593758940696716, -0.1518075168132782, 0.15316590666770935, 0.2992604076862335, 0.25010624527931213, 0.04240098223090172, 0.2810050845146179, 0.451996386051178, 0.22740799188613892, 0.30545109510421753, -0.05237092822790146, -0.3569982945919037, -0.3652437925338745, -0.14565753936767578, 0.38762614130973816, 0.20254120230674744, 0.2256765365600586, 0.03260306268930435, -0.07165741920471191, -0.07348386198282242, -0.15091456472873688, -0.45946022868156433, 0.05375298857688904, 0.13069641590118408, -0.1917298585176468, 0.0219791941344738, -0.24976731836795807, 0.1522013396024704, -0.04495580866932869, 0.3213041126728058, 0.02485577017068863, 0.3513798713684082, 0.27062520384788513, -0.4771033525466919, 0.1784394532442093, 0.587245523929596, -0.07956304401159286, 0.12707921862602234, -0.03344662860035896, 0.47896280884742737, 0.498896986246109, -0.15898968279361725, -0.13167795538902283, -0.1062270849943161, 0.300246000289917, -0.5324892401695251, -0.03620641678571701, -0.15944740176200867, -0.127291738986969, -0.06553003191947937, -0.30213385820388794, 0.2023836374282837, 0.3503057658672333, -0.07401617616415024, -0.07714185118675232, 0.2796514630317688, 0.028656361624598503, -0.08428885042667389, -0.47749799489974976, -0.5662648677825928, 0.24871231615543365, -0.13957512378692627, 0.18320147693157196, 0.2994832992553711, -0.20722335577011108, -0.09933703392744064, 0.211113840341568, -0.050090596079826355, 0.19151100516319275, 0.1477711796760559, -0.15857282280921936, 0.04912997782230377, 0.28670060634613037, -0.017147373408079147, 0.19388945400714874, 0.4177367389202118, 0.12223578244447708, -0.09839849919080734, -0.12284473329782486, -0.1482386738061905, -0.046071283519268036, 0.2629241347312927, -0.17835259437561035, 0.04416807368397713, 0.1996259242296219, 0.1528281271457672, -0.3149126172065735, 0.05744333937764168, -0.1866765320301056, -0.02350444532930851, -0.3852812945842743, -0.43103036284446716, -0.2788584530353546, -0.6325997114181519, 0.25391310453414917, 0.03481616452336311, -0.4936915636062622, -0.28423890471458435, -0.03216079622507095, -0.37422850728034973, 0.034447867423295975, 0.017096711322665215, 0.048423510044813156, 0.2826176881790161, 0.1043347716331482, 0.4837546944618225, -0.018059197813272476, -0.2675779461860657, -0.004258651286363602, -0.057688720524311066, -0.14632830023765564, 0.37955883145332336, -0.0502777099609375, 0.03385576605796814, 0.13381634652614594, -0.28770479559898376, -0.20339933037757874, 0.195487380027771, 0.07096333801746368, 0.32350119948387146, 0.4326767325401306, -0.06266692280769348, -0.42419302463531494, 0.30331146717071533, 0.154711052775383, 0.12552858889102936, -0.24961961805820465, -0.09302017092704773, 0.03214461728930473, -0.08657557517290115, -0.14649304747581482, 0.05363939329981804, 0.09804835170507431, -0.20619313418865204, 0.16784873604774475, -0.18358300626277924, -0.05535277724266052, -0.17548662424087524, -0.18896813690662384, 0.25636789202690125, -0.4381486773490906, -0.01935945451259613, 0.01086186058819294, -0.8254084587097168, 0.38667231798171997, -0.19913531839847565, -0.30302876234054565, -0.015432104468345642, 0.09770035743713379, 0.26043152809143066, -0.18154501914978027, -0.2502303123474121, -0.24177215993404388, -0.32364025712013245, 0.21691283583641052, 0.05446610972285271, -0.10119126737117767, 0.10958413779735565, -0.05158557742834091, 0.0892271101474762, -0.25533416867256165, -0.1623617559671402, 0.48732268810272217, 0.1539412885904312, 0.16896533966064453, -0.2814286947250366, 0.1701749861240387, 0.2800271511077881, -0.33054763078689575, 0.46902090311050415, 0.22525887191295624, 0.42933207750320435, 0.10592492669820786, 0.39809566736221313, -0.11273662000894547, -0.0663270652294159, 0.12674947082996368, -0.1707402467727661, 0.25992703437805176, 0.33508771657943726, 0.2443298101425171, 0.3813287317752838, 0.06839624047279358, -0.12983053922653198, -0.27316176891326904, -0.2126511186361313, -0.18595115840435028, -0.5198621153831482, 0.1279311180114746, -0.22898446023464203, -0.13230827450752258, 0.04805900529026985, -0.046577002853155136, -0.18598370254039764, 0.2232401818037033, 0.5266067385673523, 0.1856376975774765, -0.34167689085006714, 0.631009042263031, -0.11775847524404526, -0.07512980699539185, 0.25157642364501953, 0.14229711890220642, -0.17502038180828094, 0.0762995034456253, -0.010200537741184235, 0.4444427192211151, 0.45848798751831055, -0.15069203078746796, -0.3880321979522705, 0.015588652342557907, -0.07175297290086746, -0.04916180297732353, -0.022277267649769783, -0.12487095594406128, -0.4263606667518616, 0.6463223695755005, 0.24605323374271393, -0.1870410442352295, -0.09239985048770905, -0.02110765501856804, 0.03531285375356674, 0.04413316026329994, -0.2755172550678253, -0.09641433507204056, 0.132676362991333, -0.19474075734615326, -0.0805143341422081, 0.3271884024143219, -0.047721877694129944, 0.16825012862682343, -0.4310186207294464, 0.19798877835273743, -0.46870869398117065, 0.06316003203392029, -0.028628433123230934, 0.2862270772457123, -0.5002985596656799, -0.02748943120241165, 0.35338181257247925, 0.030871465802192688, 0.46325579285621643, 0.03921971470117569, -0.3126147389411926, -0.37941038608551025, 0.36038678884506226, -0.6718892455101013, 0.9012409448623657, 0.03274352848529816, 0.3511556088924408, 0.12373599410057068, -0.12612146139144897, 0.0960145890712738, 0.1673165261745453, 0.1320750117301941, 0.1645963340997696, 0.22198674082756042, -0.004733120556920767, -0.1285548061132431, -0.22845110297203064, 0.009748637676239014, 0.229044571518898, -0.14198432862758636, 0.3926761746406555, -0.20999208092689514, 0.12564009428024292, -0.005379058420658112, 0.8337064981460571, -0.11035707592964172, 0.2992188632488251, -0.21633225679397583, 0.06267207115888596, 0.5165963172912598, 0.26868778467178345, -0.03921658545732498, 0.274915874004364, 0.022469358518719673, -0.20807038247585297, -0.049342669546604156, 0.2744287848472595, 0.16046036779880524, -0.30197155475616455, 0.3058304488658905, -0.023795921355485916, -0.07821165025234222, 0.18900536000728607, -0.32204994559288025, 0.12287686765193939, -0.28210100531578064, -0.14514409005641937, -0.0302126444876194, -0.07429742813110352, 0.13399219512939453, 0.010851047933101654, -0.046206966042518616, 0.013952430337667465, 0.09547156095504761, -0.46409761905670166, -0.07051464915275574, -0.3318462669849396, -0.12658008933067322, 0.36965227127075195, -0.008671998977661133, -0.07653247565031052, 0.4826599359512329, 0.29451197385787964, 0.20091955363750458, -0.06210269778966904, 0.20801472663879395, 0.5379254817962646, -0.16142725944519043, -0.023122649639844894, 0.19852614402770996, 0.2764618396759033, -0.28773534297943115, -0.291454553604126, 0.03166224807500839, -0.10448658466339111, -0.1233702078461647, -0.10039903223514557, -0.1945703774690628, 0.057410527020692825, -0.02720215730369091, 0.05050124228000641, -0.16976091265678406, 0.2405717670917511, -0.36150112748146057, 0.0475933700799942, 0.20423153042793274, -0.028542185202240944, -0.3973735272884369, 0.07637050747871399, -0.14533288776874542, -0.25368446111679077, 0.2905172109603882, -0.3669508695602417, -0.05240460857748985, 0.2908211648464203, 0.4180589020252228, -0.023269418627023697, -0.22492903470993042, 0.23979675769805908, 0.21505318582057953, -0.4241412878036499, -0.006976264528930187, -0.2416137456893921, -0.011103063821792603, 0.0034764602314680815, 0.3566514253616333, 0.33603036403656006, -0.04111853986978531, -0.09219872206449509, -0.2644583284854889, -0.22111162543296814, -0.07457242906093597, -0.20752550661563873, 0.013085570186376572, -0.06446993350982666, 0.5586349368095398, 0.32011568546295166, -0.03662522882223129, -0.14393658936023712, 0.06255649775266647, -0.23798377811908722, -0.173487588763237, 0.15566930174827576, -0.22634351253509521, -0.2235223948955536, -0.13768324255943298, -0.006852922961115837, 0.39708948135375977, 0.4999193549156189, -0.0784100741147995, -0.19223639369010925, 0.11742512881755829, 0.0035970695316791534, -0.03624780476093292, 0.1459852010011673, 0.538234293460846, -0.27015435695648193, -0.12304100394248962, 0.13783717155456543, 0.2036232352256775, 0.07560941576957703, 0.17611685395240784, 0.1619102954864502, 0.07411523908376694, -0.24480487406253815, -0.1210702508687973, 0.24367637932300568, -0.19733558595180511, -0.006169339641928673, -0.022731900215148926, 0.06376248598098755, 0.10731218755245209, 0.1678413599729538, -0.10872075706720352, 0.03378045931458473, -0.045387737452983856, -0.07742046564817429, 0.07306317985057831, -0.10501797497272491, 0.03881926089525223, 0.1684241145849228, -0.08846141397953033, -0.0385129451751709, -0.13983666896820068, 0.21012502908706665, 0.11708732694387436, -0.21891647577285767, 0.10353486239910126, 0.06412682682275772, 0.3692779541015625, 0.016674917191267014, 0.09677556902170181, 0.16671399772167206, -0.016999073326587677, -0.14914792776107788, 0.019667256623506546, -0.019596010446548462, 0.0630778819322586, 0.2611025869846344, 0.40988314151763916, 0.21302007138729095, 0.06449220329523087, 0.08117303997278214, 0.0015833377838134766, 0.20167779922485352, 0.23480603098869324, 0.3369477689266205, 0.47514608502388, 0.1061125174164772, 0.3609161972999573, 0.20392578840255737, -0.25652334094047546, -0.11376580595970154, 0.019085094332695007, -0.11515136063098907, -0.05281823128461838, -0.4103645384311676, 0.558928906917572, 0.12779982388019562, -0.188059464097023, -0.22633008658885956, 0.3180325925350189, -0.19193372130393982, -0.08376534283161163, -0.10911992937326431, 0.011322267353534698, -0.07967967540025711, -0.07156021147966385, 0.0832066684961319, 0.09455927461385727, -0.0004824623465538025, -0.24781455099582672, 0.028583958745002747, -0.4175792336463928, -0.26834794878959656, -0.2072499692440033, 0.20114052295684814, -0.1742810755968094, 0.4245043992996216, 0.3192596137523651, -0.406399130821228, 0.008133232593536377, 0.44277268648147583, 0.3021465837955475, 0.09026637673377991, 0.4132661521434784, -0.09823194146156311, 0.04759439453482628, -0.16082563996315002, 0.13777107000350952, 0.24729101359844208, 0.27867576479911804, 0.1676146686077118, 0.2435360699892044, 0.05865597724914551, -0.01417018473148346, 0.21707434952259064, -0.12831903994083405, 0.08818905055522919, -0.3246130645275116, 0.10932403802871704, -0.02988594025373459, -0.14388826489448547, 0.03326833248138428, -0.08110258728265762, -0.41428422927856445, -0.0020251935347914696, 0.12216460704803467, -0.17797744274139404, -0.2098809778690338, -0.11734305322170258, -0.017373140901327133, -0.04545464739203453, 0.1623687744140625, 0.5658299922943115, -0.005157433450222015, 0.22367917001247406, -0.4870317578315735, -0.41291743516921997, -0.09917709976434708, 0.01933516189455986, -0.055467572063207626, 0.20445753633975983, -0.11640341579914093, -0.014188490808010101, -0.0705079436302185, -0.24366651475429535, 0.20375338196754456, -0.3597393333911896, -0.19586408138275146, -0.6218903064727783, -0.0008835010230541229, 0.39712589979171753, 0.0003159716725349426, -0.04626733809709549, 0.45769476890563965, -0.06481708586215973, 0.2482023537158966, -0.11889761686325073, 0.30258768796920776, 0.2950900197029114, -0.011314287781715393, 0.4382401704788208, -0.44883137941360474, 0.08046091347932816, 0.3396885395050049, 0.02214115485548973, 0.08576458692550659, -0.2124479115009308, -0.07405268400907516, 0.04674120992422104, 0.34107136726379395, 0.15196901559829712, 0.3718179166316986, -0.15512661635875702, -0.07524833083152771, 0.10887604206800461, 0.165043905377388, 0.20373931527137756, -0.21296326816082, -0.22504517436027527, 0.08267193287611008, -0.06124249845743179, -0.2613789439201355, 0.16541314125061035, -0.28651538491249084, -0.1310979574918747, -0.12789884209632874, 0.053639188408851624, -0.2311439961194992, -0.015951022505760193, -0.13129521906375885, 0.04440206661820412, -0.46569493412971497, -0.049969449639320374, 0.6577647924423218, -0.1784217655658722, -0.8981140851974487, -0.19780302047729492, 0.44905003905296326, 0.1846185326576233, -0.49686023592948914, 0.3874939978122711, -0.052277740091085434, -0.0359409898519516, -0.042872343212366104, 0.6013665199279785, 0.1980888545513153, -0.19777226448059082, 0.12583886086940765, -0.09928261488676071 ]
https://github.com/huggingface/datasets/issues/2443
Some tests hang on Windows
Hi ! That would be nice indeed to at least have a warning, since we don't handle the max path length limit. Also if we could have an error instead of an infinite loop I'm sure windows users will appreciate that
Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled.
41
Some tests hang on Windows Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled. Hi ! That would be nice indeed to at least have a warning, since we don't handle the max path length limit. Also if we could have an error instead of an infinite loop I'm sure windows users will appreciate that
[ -0.23916488885879517, -0.021761372685432434, -0.11798708140850067, 0.0013244971632957458, 0.3143845796585083, -0.05024324357509613, 0.18320332467556, 0.15665371716022491, 0.1643403172492981, 0.3078766167163849, 0.7059500217437744, -0.09653937816619873, -0.4796684682369232, 0.042514167726039886, -0.1620292365550995, -0.11059896647930145, 0.12478159368038177, -0.12218630313873291, -0.08347813785076141, 0.2735830545425415, -0.5415412187576294, 0.4021034836769104, -0.10298226028680801, 0.24430252611637115, -0.4127783477306366, -0.02452217973768711, -0.17706455290317535, 0.37332475185394287, 0.03867245465517044, -0.660370945930481, 0.015210343524813652, 0.047857142984867096, 0.14129890501499176, 0.2531121075153351, -0.00011648085637716576, -0.18990355730056763, 0.5350028872489929, 0.229047954082489, 0.012908708304166794, 0.15234582126140594, 0.0528203547000885, -0.17466934025287628, 0.24792540073394775, -0.10534171015024185, 0.2352505326271057, 0.35943225026130676, -0.16073188185691833, -0.030496934428811073, 0.09327822923660278, 0.3737005889415741, 0.10503467917442322, 0.3648022711277008, -0.04949088394641876, -0.08832744508981705, 0.4482416808605194, 0.01890524849295616, -0.28788304328918457, 0.24825970828533173, 0.4959423243999481, -0.4592771530151367, -0.11719954758882523, -0.08808563649654388, 0.09086605161428452, 0.15073609352111816, 0.022929515689611435, -0.05895638465881348, 0.5751327276229858, -0.4512700140476227, -0.20032724738121033, 0.42095696926116943, -0.23493200540542603, -0.015688233077526093, -0.2226235717535019, -0.285024493932724, 0.1935051828622818, -0.4098213315010071, 0.5957505106925964, 0.035616904497146606, -0.18134714663028717, 0.04689605161547661, -0.022189946845173836, -0.14398089051246643, -0.11329720169305801, 0.046056538820266724, -0.2228386402130127, 0.0445663258433342, 0.23099958896636963, 0.052093055099248886, 0.37482717633247375, -0.012060273438692093, 0.15585270524024963, 0.4347124993801117, -0.14413738250732422, -0.24627123773097992, 0.03650522232055664, -0.10122351348400116, 0.14835163950920105, 0.34998276829719543, 0.2254699170589447, 0.10868486762046814, -0.3143658936023712, -0.09780559688806534, 0.5534833073616028, 0.005372684448957443, -0.37630531191825867, -0.14289024472236633, 0.08918409794569016, -0.06769230216741562, 0.4931465983390808, 0.24246039986610413, -0.0430944561958313, 0.21922987699508667, -0.05670339614152908, -0.8042609691619873, 0.0714346319437027, 0.517031192779541, 0.35847008228302, -0.3616822063922882, -0.03293811157345772, 0.16623039543628693, -0.1827295422554016, 0.09820070117712021, 0.26884910464286804, 0.2686883509159088, 0.22099313139915466, 0.09426644444465637, 0.05553916096687317, 0.1434251070022583, -0.20216543972492218, 0.3693981468677521, 0.13900047540664673, 0.036663711071014404, -0.37737056612968445, 0.10781531780958176, 0.2827773690223694, 0.005058156326413155, 0.21361316740512848, -0.12098302692174911, 0.39654475450515747, -0.042351964861154556, 0.10819485783576965, -0.06751516461372375, 0.09293009340763092, 0.2159455567598343, -0.299159437417984, -0.07274718582630157, -0.012956399470567703, 0.16517582535743713, -0.26254740357398987, 0.2976726293563843, 0.02353820577263832, -0.45526546239852905, 0.17282618582248688, 0.1255335509777069, -0.26735103130340576, 0.17175298929214478, 0.4315384030342102, -0.11969257891178131, -0.1981641948223114, 0.07985076308250427, 0.32904699444770813, -0.3684564232826233, -0.07524634897708893, -0.11856318265199661, 0.15377581119537354, 0.4675213098526001, -0.012182068079710007, -0.010896679013967514, 0.24098268151283264, -0.1799972802400589, -0.07432306557893753, 0.3938121795654297, -0.12960074841976166, 0.06819980591535568, -0.45225071907043457, -0.02167901024222374, -0.05681448429822922, -0.029500819742679596, -0.009467538446187973, 0.03812680393457413, -0.28094565868377686, -0.16345873475074768, 0.2682085931301117, -0.14461316168308258, 0.048055920749902725, -0.2025568187236786, 0.04402362182736397, 0.2531568109989166, 0.02913176268339157, 0.16083841025829315, -0.4407100975513458, -0.48725607991218567, 0.4007725715637207, 0.1522914618253708, 0.2565481960773468, -0.36782675981521606, 0.003131590783596039, 0.2906618118286133, 0.26728156208992004, -0.05434658005833626, -0.3945317566394806, 0.23663774132728577, 0.15273964405059814, 0.16997317969799042, -0.14352764189243317, 0.23486196994781494, 0.04750341176986694, 0.09435722976922989, -0.3476724624633789, -0.07047972828149796, 0.012865304946899414, -0.26802802085876465, 0.051845453679561615, 0.16030868887901306, 0.17900852859020233, 0.0569026917219162, 0.03983418643474579, -0.09995897114276886, 0.33784008026123047, 0.16123197972774506, 0.04897288605570793, -0.17570841312408447, -0.6226361393928528, 0.0756276398897171, 0.1384880244731903, 0.07731956988573074, -0.1261330246925354, -0.12712153792381287, -0.08438347280025482, 0.19504006206989288, 0.10328413546085358, -0.10990653187036514, 0.07673631608486176, 0.24105527997016907, 0.14543266594409943, -0.04042162001132965, -0.08460284024477005, 0.43488818407058716, 0.13162121176719666, 0.011070247739553452, 0.012336404994130135, 0.42173823714256287, -0.40753647685050964, 0.07369305938482285, 0.05551563948392868, 0.23902538418769836, -0.32014116644859314, 0.41931769251823425, 0.037449344992637634, -0.2509613633155823, -0.09632909297943115, -0.3603069484233856, -0.43189123272895813, 0.16087621450424194, 0.43259331583976746, 0.25771307945251465, -0.1193564236164093, -0.06448347866535187, -0.05554091930389404, -0.36848992109298706, 0.41657477617263794, -0.008065065369009972, 0.007570281624794006, 0.4114583432674408, 0.23046740889549255, 0.1487060785293579, -0.09042277932167053, -0.07247865200042725, 0.26490408182144165, 0.15985411405563354, -0.03222418949007988, 0.16858331859111786, -0.3454689383506775, -0.2781623303890228, 0.34531086683273315, 0.2235967516899109, -0.14533641934394836, 0.2507611811161041, 0.02267259918153286, -0.12345115095376968, -0.1451883316040039, -0.4776333272457123, -0.03124377876520157, 0.044936101883649826, -0.48791709542274475, -0.15378032624721527, 0.2533179521560669, -0.3396519124507904, -0.16398265957832336, -0.33659669756889343, -0.13787491619586945, -0.2301124781370163, 0.2494179606437683, 0.17711977660655975, -0.32315582036972046, 0.1255195140838623, -0.01892440766096115, 0.3794432282447815, 0.10639911890029907, 0.004054972901940346, -0.12838080525398254, 0.13673539459705353, -0.08053936064243317, -0.005955914035439491, 0.32974088191986084, -0.16536308825016022, 0.27610641717910767, -0.043718498200178146, -0.1772613376379013, -0.24352359771728516, -0.43693286180496216, -0.026284843683242798, 0.1350615918636322, 0.38497596979141235, 0.2874763011932373, 0.20029902458190918, 0.44967925548553467, -0.3664644956588745, 0.1500202864408493, -0.18944044411182404, 0.3117998242378235, -0.14050669968128204, 0.18571312725543976, 0.07399564981460571, -0.32001540064811707, -0.053177691996097565, 0.004349098540842533, -0.4196607172489166, 0.3991318941116333, -0.07944689691066742, 0.036679740995168686, 0.07475186139345169, 0.12061834335327148, 0.2620084881782532, -0.18304118514060974, -0.017846086993813515, 0.3086884021759033, -0.20265600085258484, 0.13833841681480408, 0.06187363341450691, -0.19489668309688568, 0.07059180736541748, -0.2418641299009323, -0.43510961532592773, -0.05510873347520828, -0.5333498120307922, -0.3359256684780121, -0.3845430016517639, 0.5380303263664246, -0.062015317380428314, -0.27958178520202637, 0.3068854808807373, 0.06037665903568268, -0.1483672708272934, 0.24103853106498718, 0.03545117750763893, 0.0023783519864082336, -0.07457157969474792, 0.34878283739089966, -0.023834556341171265, 0.2383543848991394, -0.15075555443763733, 0.12191714346408844, 0.053496185690164566, 0.2662050127983093, -0.043316200375556946, -0.10016878694295883, 0.218107208609581, -0.15633249282836914, 0.15216374397277832, -0.002152404747903347, -0.15367785096168518, -0.5739144086837769, 0.14407797157764435, 0.22711309790611267, 0.1518523395061493, 0.3060593903064728, 0.08291728794574738, 0.20847684144973755, -0.3937464654445648, 0.2117389440536499, -0.2044582962989807, 0.07112102210521698, -0.4346154034137726, 0.06749700754880905, 0.2741530239582062, 0.0690523311495781, 0.30964958667755127, 0.44313061237335205, 0.11576256155967712, -0.022689031437039375, 0.21223889291286469, -0.24949805438518524, -0.3500972390174866, -0.17367695271968842, 0.1631733924150467, 0.32194778323173523, -0.36203479766845703, -0.3022381365299225, -0.01635013520717621, -0.3897598683834076, 0.7135551571846008, 0.05954262614250183, -0.011442989110946655, 0.3372001349925995, 0.09890194237232208, 0.053937628865242004, -0.4292011857032776, -0.30511629581451416, -0.023991694673895836, 0.19108247756958008, 0.27573853731155396, 0.14170530438423157, 0.06580101698637009, 0.06888928264379501, 0.32728421688079834, -0.056477777659893036, -0.021237576380372047, -0.2575512230396271, -0.2793653905391693, -0.36621394753456116, 0.5595247745513916, 0.06504753232002258, -0.1544138342142105, -0.46757379174232483, -0.08808919787406921, 0.0760631188750267, -0.33241456747055054, -0.12711018323898315, 0.2750612199306488, 0.14987099170684814, -0.2761974334716797, 0.07943345606327057, -0.09512221813201904, -0.06188199669122696, -0.14731143414974213, -0.018159575760364532, -0.09437529742717743, 0.32193154096603394, 0.10560814291238785, -0.29416945576667786, 0.13361480832099915, 0.616263747215271, -0.24203284084796906, 0.3068234622478485, -0.39428988099098206, 0.6207206845283508, -0.3629666864871979, 0.28473320603370667, 0.5263585448265076, 0.09138057380914688, -0.03751728683710098, 0.22337183356285095, 0.12468968331813812, 0.1991853266954422, -0.1372983157634735, 0.49331337213516235, 0.15119096636772156, -0.36764445900917053, 0.16107378900051117, -0.04753664880990982, 0.8037678003311157, -0.13013239204883575, 0.2636246979236603, 0.27686160802841187, -0.21346327662467957, 0.03163275867700577, 0.2631065845489502, 0.0049583809450268745, -0.021257050335407257, -0.05278942734003067, 0.13326296210289001, -0.12130869925022125, 0.4038456976413727, -0.289359450340271, -0.4949137270450592, -0.009737348183989525, 0.11730541288852692, -0.3682607114315033, -0.3090280294418335, 0.3184366822242737, -0.4009121060371399, -0.0595819316804409, -0.26726722717285156, 0.07545920461416245, 0.2497919499874115, 0.1378837525844574, -0.27190062403678894, 0.22370852530002594, 0.376626580953598, -0.33997809886932373, -0.26142653822898865, -0.1627696454524994, -0.3189670741558075, -0.03994450345635414, -0.1736752837896347, -0.021200500428676605, -0.02681880258023739, -0.23314610123634338, 0.08635382354259491, 0.48697423934936523, -0.17375488579273224, 0.07504889369010925, 0.1375371813774109, -0.21992862224578857, 0.14547942578792572, -0.13008157908916473, 0.04078568145632744, -0.08736323565244675, -0.08859604597091675, -0.16295412182807922, -0.34598487615585327, -0.06650544703006744, -0.3142240047454834, -0.14248396456241608, 0.20731276273727417, -0.17192941904067993, 0.07638993859291077, -0.14347626268863678, -0.25417208671569824, -0.02384284883737564, 0.1397249400615692, -0.07699528336524963, -0.12072966992855072, 0.21941471099853516, -0.15067574381828308, -0.28202247619628906, -0.11345666646957397, -0.18498459458351135, -0.45141956210136414, 0.10199888050556183, 0.35601797699928284, 0.3655846118927002, 0.0873410701751709, -0.22921547293663025, 0.33935296535491943, -0.19496996700763702, -0.22061049938201904, 0.22833992540836334, 0.44956621527671814, -0.09370049834251404, 0.03681182116270065, 0.2841460704803467, 0.36067062616348267, -0.0033699125051498413, 0.0020994991064071655, -0.2205452173948288, -0.44997215270996094, 0.08226735144853592, -0.052476610988378525, 0.5089625120162964, -0.14967605471611023, 0.03847332298755646, -0.06356575340032578, -0.5542201399803162, -0.26888027787208557, 0.07628197968006134, -0.31746694445610046, -0.05673474818468094, -0.10123360902070999, -0.1626289188861847, 0.2217429280281067, 0.11460989713668823, 0.006160937249660492, 0.06486698985099792, 0.04912681505084038, -0.18220090866088867, -0.15305735170841217, 0.08394000679254532, -0.07841404527425766, 0.053829677402973175, 0.34505584836006165, -0.28975725173950195, 0.46711212396621704, 0.0912742018699646, 0.04935045167803764, 0.15383994579315186, 0.03295106813311577, 0.09414205700159073, 0.23653104901313782, 0.08542361110448837, -0.04930035397410393, 0.21306291222572327, -0.1033446341753006, 0.09689471870660782, -0.10439328104257584, 0.2595859467983246, -0.16012048721313477, 0.15743489563465118, -0.0625763013958931, 0.2868466377258301, -0.13717688620090485, -0.039467424154281616, -0.06276023387908936, 0.18786056339740753, -0.19106034934520721, 0.09767866879701614, 0.12493567168712616, 0.28455275297164917, -0.34369003772735596, 0.061168067157268524, 0.298324316740036, 0.24780546128749847, -0.10533997416496277, 0.09376795589923859, -0.43254297971725464, -0.271639347076416, 0.07531990110874176, 0.2076968252658844, -0.016125161200761795, -0.32634055614471436, 0.27612847089767456, 0.21769818663597107, 0.1730789989233017, -0.05939677357673645, -0.20277686417102814, 0.5297374725341797, -0.09086634963750839, -0.08219608664512634, 0.05268951877951622, 0.051114678382873535, 0.14834696054458618, -0.11697772145271301, 0.15640492737293243, 0.4308781027793884, -0.020656120032072067, 0.11751748621463776, -0.0875062569975853, -0.09258243441581726, 0.0252845399081707, -0.2110586166381836, 0.18730363249778748, -0.27252721786499023, -0.0403423011302948, 0.4988434612751007, -0.27704426646232605, -0.1210121214389801, -0.27962324023246765, -0.08486738801002502, -0.07676734775304794, -0.30708470940589905, 0.12417362630367279, 0.1249077096581459, 0.017194323241710663, 0.11480216681957245, 0.10188126564025879, 0.04151948541402817, 0.1317455768585205, 0.2958168387413025, 0.04675513133406639, -0.12898890674114227, 0.14417150616645813, -0.04616488516330719, 0.128207266330719, -0.41475027799606323, -0.019163014367222786, 0.23719526827335358, 0.06287813186645508, 0.1751333773136139, 0.1436929702758789, 0.7410430908203125, 0.18844087421894073, -0.29572775959968567, -0.1581428050994873, -0.18317143619060516, 0.198100283741951, 0.03842978551983833, 0.3525540232658386, 0.14902442693710327, 0.468491792678833, 0.11606188118457794, 0.12163594365119934, -0.2220146358013153, 0.491202175617218, -0.2774026393890381, -0.2572140395641327, -0.0872851312160492, 0.17114925384521484, 0.45288246870040894, -0.0994068831205368, -0.3272869884967804, 0.022356130182743073, -0.3697112202644348, -0.12427546083927155, 0.24121323227882385, -0.12169575691223145, 0.09193152189254761, 0.1452408879995346, 0.0416572280228138, 0.14415955543518066, 0.4421738386154175, 0.44109150767326355, 0.4239451289176941, -0.2546844780445099, 0.024941958487033844, -0.4240611493587494, -0.11572455614805222, -0.26822471618652344, -0.052969932556152344, 0.1830558478832245, -0.24522268772125244, -0.37025320529937744, 0.02850191853940487, -0.15085066854953766, 0.08535938709974289, -0.15346349775791168, -0.0207216814160347, -0.35017314553260803, 0.10937100648880005, 0.37465107440948486, -0.07723814249038696, -0.09137241542339325, -0.21153691411018372, 0.2984955608844757, -0.02621600404381752, -0.055438581854104996, 0.06731455028057098, -0.030380241572856903, 0.06938864290714264, 0.43628349900245667, 0.0004088655114173889, 0.0930490717291832, 0.11030862480401993, -0.04639861732721329, -0.10837855935096741, -0.5494903326034546, -0.38353705406188965, 0.1194445937871933, -0.18587607145309448, 0.05142919719219208, 0.04230446368455887, -0.18859310448169708, -0.2767031192779541, -0.2730678915977478, -0.004215072840452194, -0.08065719902515411, 0.0321931466460228, 0.0828685387969017, 0.044915929436683655, 0.17372512817382812, 0.18009504675865173, -0.01671232469379902, 0.402449369430542, 0.19287005066871643, -0.011630503460764885, 0.01118960976600647, -0.27281367778778076, 0.4084320664405823, -0.273646742105484, -0.2728581130504608, -0.0494358204305172, 0.34328997135162354, -0.20392724871635437, 0.019995784386992455, -0.4867304265499115, -0.17141106724739075, -0.018433470278978348, 0.14843565225601196, -0.39637500047683716, 0.2862759232521057, 0.0007691578939557076, -0.039503276348114014, -0.02595672570168972, 0.06963981688022614, -0.16611966490745544, -0.0036581624299287796, -0.12133949995040894, -0.25002360343933105 ]
https://github.com/huggingface/datasets/issues/2443
Some tests hang on Windows
Unfortunately, I know this problem very well... 😅 I remember having proposed to throw an error instead of hanging in an infinite loop #2220: 60c7d1b6b71469599a27147a08100f594e7a3f84, 8c8ab60018b00463edf1eca500e434ff061546fc but @lhoestq told me: > Note that the filelock module comes from this project that hasn't changed in years - while still being used by ten of thousands of projects: https://github.com/benediktschmitt/py-filelock > > Unless we have proper tests for this, I wouldn't recommend to change it I opened an Issue requesting a warning/error at startup for that case: #2224
Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled.
85
Some tests hang on Windows Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled. Unfortunately, I know this problem very well... 😅 I remember having proposed to throw an error instead of hanging in an infinite loop #2220: 60c7d1b6b71469599a27147a08100f594e7a3f84, 8c8ab60018b00463edf1eca500e434ff061546fc but @lhoestq told me: > Note that the filelock module comes from this project that hasn't changed in years - while still being used by ten of thousands of projects: https://github.com/benediktschmitt/py-filelock > > Unless we have proper tests for this, I wouldn't recommend to change it I opened an Issue requesting a warning/error at startup for that case: #2224
[ -0.13163615763187408, -0.014070354402065277, -0.11839580535888672, 0.009343516081571579, 0.21633276343345642, 0.009574607014656067, 0.25838249921798706, 0.13995510339736938, 0.2193908840417862, 0.19323085248470306, 0.6185323596000671, -0.2044839709997177, -0.4562074840068817, -0.07276451587677002, -0.1960127204656601, -0.004518907517194748, 0.15050068497657776, -0.1235169917345047, -0.09439969062805176, 0.23592181503772736, -0.5354189872741699, 0.3176809847354889, -0.1172531396150589, 0.19790181517601013, -0.5318857431411743, 0.0011332537978887558, -0.23065583407878876, 0.3467153310775757, 0.12025846540927887, -0.5881576538085938, -0.013181881979107857, 0.15941844880580902, 0.09175033867359161, 0.2956964075565338, -0.00012114085984649137, -0.19672760367393494, 0.4859238862991333, 0.2037380486726761, 0.0005870573222637177, 0.11548537015914917, 0.05092009902000427, -0.13301658630371094, 0.130141481757164, -0.07213298976421356, 0.3160826861858368, 0.19637160003185272, -0.12023578584194183, -0.09642815589904785, 0.14155630767345428, 0.3219185769557953, 0.06398488581180573, 0.24135836958885193, -0.06925476342439651, -0.04514259472489357, 0.5415894389152527, 0.0615069717168808, -0.18697232007980347, 0.3898578882217407, 0.6111067533493042, -0.5240533351898193, -0.20111989974975586, -0.09538987278938293, 0.1021517813205719, 0.04783463850617409, 0.052417196333408356, -0.10592231154441833, 0.6723543405532837, -0.3971513509750366, -0.20647278428077698, 0.35750967264175415, -0.27661794424057007, -0.06874527782201767, -0.2651709020137787, -0.3719157874584198, 0.2571760416030884, -0.4026557207107544, 0.5238243937492371, 0.0008933376520872116, -0.1837702840566635, 0.11814627051353455, 0.04118186980485916, -0.1604117900133133, -0.07620646059513092, 0.05165884271264076, -0.20299799740314484, -0.008594326674938202, 0.27466386556625366, 0.08976756781339645, 0.3246680200099945, -0.002118948847055435, 0.20559273660182953, 0.318670392036438, -0.06625503301620483, -0.22839510440826416, 0.0005706846714019775, -0.07414332032203674, 0.1557631492614746, 0.42396873235702515, 0.1852647066116333, 0.06620390713214874, -0.3897070288658142, -0.06681797653436661, 0.6030473113059998, -0.018441446125507355, -0.36859214305877686, -0.17892791330814362, 0.12450219690799713, 0.008042258210480213, 0.45003336668014526, 0.23277831077575684, -0.11831337213516235, 0.24386242032051086, -0.02604084089398384, -0.854486882686615, 0.031574029475450516, 0.5021635890007019, 0.341261625289917, -0.3400120139122009, -0.04781634360551834, 0.23210324347019196, -0.29831045866012573, 0.07598526030778885, 0.408369779586792, 0.21984899044036865, 0.25741031765937805, 0.16451311111450195, 0.14857631921768188, 0.14456059038639069, -0.21952015161514282, 0.41309577226638794, 0.1404796540737152, 0.09663508832454681, -0.3439183235168457, 0.21569059789180756, 0.26378586888313293, 0.062028031796216965, 0.12620975077152252, -0.10994210094213486, 0.40011608600616455, -0.07695227116346359, 0.12512686848640442, -0.18276560306549072, 0.14652183651924133, 0.17614424228668213, -0.31641602516174316, -0.09670751541852951, -0.0023516304790973663, 0.14278225600719452, -0.12577763199806213, 0.30697134137153625, 0.010534770786762238, -0.3850648105144501, 0.28433361649513245, 0.07927915453910828, -0.3350973129272461, 0.28206461668014526, 0.42762890458106995, -0.16843445599079132, -0.17303475737571716, -0.034023068845272064, 0.36129456758499146, -0.44243937730789185, -0.02979651279747486, -0.06275501102209091, 0.03828231245279312, 0.45275402069091797, 0.007492188364267349, 0.02207634598016739, 0.3214857578277588, -0.14285720884799957, -0.17224690318107605, 0.35379841923713684, -0.09914764761924744, 0.16002127528190613, -0.4256172180175781, 0.01604972779750824, -0.03260176628828049, -0.0676998645067215, -0.15794368088245392, -0.012552732601761818, -0.2833656072616577, -0.1163143515586853, 0.26134973764419556, -0.14428918063640594, 0.07339861243963242, -0.28983113169670105, 0.1417180746793747, 0.1491001695394516, 0.06690783053636551, 0.06895127147436142, -0.37610945105552673, -0.4131198823451996, 0.34174466133117676, 0.16010378301143646, 0.20798897743225098, -0.40942826867103577, 0.01723022758960724, 0.4056779146194458, 0.3045523464679718, -0.054791782051324844, -0.3384220004081726, 0.25645458698272705, 0.28189805150032043, 0.19884037971496582, -0.11414327472448349, 0.2293931245803833, -0.03926865756511688, 0.11774202436208725, -0.5058183073997498, -0.18716312944889069, -0.046994537115097046, -0.2523779273033142, 0.07609418034553528, 0.13351279497146606, 0.1980002075433731, 0.14140239357948303, 0.0146610327064991, -0.08600151538848877, 0.2619709372520447, 0.11723834276199341, 0.12116411328315735, -0.1346007138490677, -0.6055211424827576, 0.09558520466089249, 0.10019576549530029, 0.16853433847427368, -0.045049309730529785, -0.2398451864719391, -0.13227155804634094, 0.1978304386138916, 0.17311090230941772, -0.16377460956573486, 0.09019753336906433, 0.1834789216518402, 0.19193905591964722, 0.002077557146549225, -0.12332417815923691, 0.43884217739105225, 0.16875872015953064, 0.03750963881611824, -0.01679684780538082, 0.3242325186729431, -0.3502958416938782, 0.03916174918413162, -0.013054676353931427, 0.22286930680274963, -0.3726813793182373, 0.38324642181396484, 0.006908930838108063, -0.3006246089935303, -0.11374440044164658, -0.38197147846221924, -0.41862788796424866, 0.10812827944755554, 0.4916052520275116, 0.37340518832206726, -0.028140321373939514, -0.07068922370672226, 0.09034693241119385, -0.41160547733306885, 0.37134799361228943, -0.09943675994873047, 0.005200780928134918, 0.3837338984012604, 0.28571459650993347, 0.11699145287275314, -0.07962969690561295, -0.10889744013547897, 0.3620379567146301, 0.11650805175304413, -0.01481768861413002, 0.15976549685001373, -0.19521401822566986, -0.29536470770835876, 0.29776474833488464, 0.21040593087673187, -0.16786779463291168, 0.3470379412174225, 0.061843205243349075, -0.11532310396432877, -0.040580667555332184, -0.5296556353569031, 0.0951714962720871, 0.04955560714006424, -0.4471701383590698, -0.11989660561084747, 0.19556888937950134, -0.26185446977615356, -0.15427322685718536, -0.32075533270835876, -0.10698068141937256, -0.25023773312568665, 0.20799030363559723, 0.22451934218406677, -0.3119964599609375, 0.06643248349428177, -0.05084780603647232, 0.38775819540023804, 0.16606013476848602, 0.016803745180368423, -0.09425269067287445, 0.1470434069633484, 0.02329970896244049, -0.05211969465017319, 0.37057554721832275, -0.16869036853313446, 0.24373817443847656, -0.029029015451669693, -0.24184022843837738, -0.2861434817314148, -0.4756321310997009, 0.05319574847817421, 0.1204555332660675, 0.3724144697189331, 0.3183588981628418, 0.21388593316078186, 0.46266496181488037, -0.35094067454338074, 0.12006369233131409, -0.20732572674751282, 0.35299429297447205, -0.1723318099975586, 0.14323364198207855, 0.16925673186779022, -0.3495151698589325, 0.051957640796899796, 0.00008561462163925171, -0.3818434476852417, 0.43765872716903687, -0.08736709505319595, 0.015394218266010284, 0.07348362356424332, 0.027739383280277252, 0.35188135504722595, -0.14885485172271729, 0.014037982560694218, 0.33816275000572205, -0.20365476608276367, 0.07368317246437073, 0.1348719596862793, -0.17146167159080505, -0.031096292659640312, -0.25770509243011475, -0.5798017382621765, -0.020601816475391388, -0.5306004285812378, -0.4399004876613617, -0.31375738978385925, 0.558833658695221, -0.046023234724998474, -0.2840922772884369, 0.2859577238559723, -0.04912804067134857, -0.09651877731084824, 0.19695794582366943, 0.08932727575302124, 0.03272693604230881, -0.032302722334861755, 0.3258376121520996, 0.07193800806999207, 0.2525542974472046, -0.12293779850006104, 0.05670526623725891, 0.09077833592891693, 0.2744390666484833, -0.049808286130428314, -0.026811672374606133, 0.21132956445217133, -0.1781025528907776, 0.1561129242181778, -0.03556019812822342, -0.16751301288604736, -0.5556100606918335, 0.17318247258663177, 0.19222742319107056, 0.1923230141401291, 0.28591448068618774, -0.02933056838810444, 0.17884764075279236, -0.47848132252693176, 0.23217087984085083, -0.20712098479270935, 0.008689850568771362, -0.41478344798088074, 0.03751961886882782, 0.15236178040504456, 0.004892210476100445, 0.26276955008506775, 0.42399805784225464, 0.20382313430309296, -0.08225187659263611, 0.3217102587223053, -0.19807754456996918, -0.32157090306282043, -0.11902810633182526, 0.18920005857944489, 0.37037578225135803, -0.3403114974498749, -0.31520742177963257, -0.035605043172836304, -0.4756581783294678, 0.7116430997848511, 0.24101552367210388, 0.026908596977591515, 0.30877208709716797, 0.1259392946958542, 0.11960049718618393, -0.4440324902534485, -0.354428768157959, 0.0016205362044274807, 0.27211135625839233, 0.38868293166160583, 0.066278837621212, 0.005571216344833374, -0.03737569600343704, 0.3753032684326172, -0.07528062164783478, -0.0729098990559578, -0.12450133264064789, -0.18416091799736023, -0.3895646929740906, 0.4691222608089447, 0.10085003823041916, -0.11856333166360855, -0.4459838569164276, -0.018314717337489128, 0.16415782272815704, -0.37950876355171204, -0.11107176542282104, 0.2170255035161972, 0.08827047049999237, -0.27299442887306213, 0.027794193476438522, -0.08325166255235672, -0.030650660395622253, -0.08704481273889542, -0.052489615976810455, -0.059724386781454086, 0.3577670454978943, 0.2049942910671234, -0.3324190676212311, 0.06608960032463074, 0.7001733779907227, -0.2707616686820984, 0.3558594584465027, -0.3035084903240204, 0.5460355281829834, -0.34871217608451843, 0.2272804230451584, 0.517463743686676, 0.09434681385755539, -0.03744878992438316, 0.306905061006546, 0.0911039486527443, 0.2328851968050003, -0.17386391758918762, 0.5167899131774902, 0.15298151969909668, -0.39602991938591003, 0.12113676965236664, -0.016636788845062256, 0.8352259993553162, -0.02600632607936859, 0.22385983169078827, 0.2544749975204468, -0.18883328139781952, 0.035426460206508636, 0.2474343627691269, -0.05582437664270401, -0.03093983605504036, -0.19680345058441162, 0.14357611536979675, -0.1611328125, 0.4754766821861267, -0.25151771306991577, -0.34280166029930115, -0.00009013130329549313, 0.15694451332092285, -0.46657857298851013, -0.27828019857406616, 0.31151843070983887, -0.4264757037162781, -0.01865890994668007, -0.3455869257450104, 0.01747780665755272, 0.2856181859970093, 0.09439867734909058, -0.3185615837574005, 0.2241394966840744, 0.3486361801624298, -0.32456642389297485, -0.20686283707618713, -0.257818341255188, -0.2988283932209015, -0.019419915974140167, -0.17552247643470764, -0.00567317008972168, -0.04707763344049454, -0.23954400420188904, 0.05313340947031975, 0.4995253384113312, -0.12787514925003052, 0.011927427724003792, 0.1241283044219017, -0.14704711735248566, 0.1620720773935318, -0.14860449731349945, 0.07110870629549026, -0.07372602820396423, -0.06578133255243301, -0.15102773904800415, -0.30490025877952576, -0.1187235563993454, -0.2922251224517822, -0.16708223521709442, 0.28220975399017334, -0.17819930613040924, 0.0037353895604610443, -0.20815971493721008, -0.3232523500919342, -0.0005248747766017914, 0.09707912802696228, 0.021199166774749756, -0.17664331197738647, 0.21800076961517334, -0.2662186920642853, -0.296259343624115, -0.10306710004806519, -0.1590949296951294, -0.5041972994804382, 0.008437156677246094, 0.44000890851020813, 0.4161369502544403, 0.07011323422193527, -0.18449249863624573, 0.4453378915786743, -0.18645907938480377, -0.27948346734046936, 0.17281554639339447, 0.45623257756233215, -0.08318124711513519, 0.03852451592683792, 0.2403491735458374, 0.4058399200439453, 0.09949588775634766, 0.00025706738233566284, -0.29463624954223633, -0.4661715626716614, 0.07581561803817749, -0.0643080621957779, 0.47234511375427246, -0.09569290280342102, 0.060075096786022186, -0.08092229068279266, -0.5390068292617798, -0.23477743566036224, 0.13581794500350952, -0.3285696506500244, -0.01680990308523178, -0.13878759741783142, -0.21691644191741943, 0.1695278137922287, 0.10153114795684814, -0.008470501750707626, 0.1124916598200798, 0.06236666068434715, -0.14549292623996735, -0.1496889591217041, 0.10695643723011017, -0.022243142127990723, 0.04897280037403107, 0.3172347843647003, -0.32006675004959106, 0.5094140768051147, 0.10523475706577301, 0.039011452347040176, 0.1349601149559021, 0.09718456864356995, 0.03592138737440109, 0.24253490567207336, 0.1091909259557724, -0.05565394461154938, 0.21726195514202118, -0.07481035590171814, -0.03273563086986542, -0.13110430538654327, 0.2655617594718933, -0.2061493992805481, 0.18689510226249695, -0.22021538019180298, 0.28224316239356995, -0.11558789014816284, -0.041829876601696014, 0.03456608206033707, 0.20167545974254608, -0.12921929359436035, 0.20819459855556488, 0.10832108557224274, 0.2710418403148651, -0.34828272461891174, 0.03153759986162186, 0.3321911692619324, 0.18882884085178375, -0.0979037657380104, 0.10993103682994843, -0.3305423855781555, -0.2849104106426239, 0.048243504017591476, 0.21590249240398407, -0.12431684136390686, -0.347673624753952, 0.19304348528385162, 0.24053966999053955, 0.14503519237041473, -0.021982021629810333, -0.2696688771247864, 0.6022283434867859, -0.018744654953479767, -0.05263570323586464, 0.0863812267780304, 0.06959901750087738, 0.15059764683246613, -0.14658570289611816, 0.01848509907722473, 0.3359058201313019, -0.10844986885786057, 0.1143248975276947, -0.024317637085914612, -0.12112322449684143, 0.04913037642836571, -0.10189452767372131, 0.17751918733119965, -0.2616167962551117, -0.11024987697601318, 0.45561355352401733, -0.26076775789260864, -0.023503011092543602, -0.17514953017234802, 0.011555397883057594, -0.08454806357622147, -0.323919415473938, 0.18080271780490875, 0.15680643916130066, -0.00004045665264129639, 0.027942266315221786, 0.03594224154949188, 0.04307536780834198, 0.012382462620735168, 0.37130677700042725, 0.04844733700156212, -0.03249983489513397, 0.07198630273342133, -0.07674536108970642, 0.13685832917690277, -0.378159761428833, 0.00382363423705101, 0.2791764736175537, 0.1289518177509308, 0.25663188099861145, 0.04387673735618591, 0.6962898969650269, 0.14859163761138916, -0.3574942946434021, -0.1588427722454071, -0.17334815859794617, 0.19427108764648438, 0.034455422312021255, 0.40905818343162537, 0.18120667338371277, 0.36080202460289, 0.05171441659331322, 0.10254902392625809, -0.2340465486049652, 0.488355427980423, -0.1853112280368805, -0.24480482935905457, -0.12385532259941101, 0.18040341138839722, 0.47971224784851074, -0.06935904920101166, -0.2663091719150543, 0.06154555082321167, -0.3329780399799347, -0.13973146677017212, 0.15759055316448212, -0.13441884517669678, 0.12066908925771713, 0.26235800981521606, 0.025027021765708923, 0.04356023669242859, 0.308172345161438, 0.38100919127464294, 0.3903266191482544, -0.2383049726486206, 0.12004421651363373, -0.38234373927116394, -0.09435293823480606, -0.15249575674533844, -0.08723219484090805, 0.1905204802751541, -0.31651681661605835, -0.2818041145801544, -0.0003027021884918213, -0.14786742627620697, 0.04908816143870354, -0.13480131328105927, -0.02569584548473358, -0.34809496998786926, 0.15252988040447235, 0.42133891582489014, 0.03959362953901291, -0.12259003520011902, -0.1860153079032898, 0.2646532952785492, -0.009741555899381638, -0.07863909006118774, 0.07319039851427078, -0.11518043279647827, 0.04667341336607933, 0.4070208966732025, -0.10930240154266357, 0.10199672728776932, 0.12234024703502655, -0.060630906373262405, -0.1871459037065506, -0.5519601106643677, -0.36459946632385254, 0.14716486632823944, -0.19694164395332336, -0.004149682819843292, 0.07915377616882324, -0.2016829401254654, -0.3115652799606323, -0.18545065820217133, 0.0419495590031147, -0.07351736724376678, -0.05772557109594345, 0.0442337766289711, 0.09265270829200745, 0.13340389728546143, 0.17365524172782898, 0.022098377346992493, 0.4676493704319, 0.18012019991874695, -0.03462401032447815, -0.011053651571273804, -0.2337915152311325, 0.48120829463005066, -0.3890368342399597, -0.24018844962120056, -0.07041571289300919, 0.3887583315372467, -0.2648913562297821, -0.025229668244719505, -0.4379308819770813, -0.11412204056978226, -0.002823134884238243, 0.11017768830060959, -0.4098556637763977, 0.19300366938114166, 0.04655054211616516, -0.021768424659967422, -0.05511453002691269, 0.02291867509484291, -0.14594462513923645, 0.05148374289274216, -0.15666313469409943, -0.21331928670406342 ]
https://github.com/huggingface/datasets/issues/2443
Some tests hang on Windows
@albertvillanova Thanks for additional info on this issue. Yes, I think the best option is to throw an error instead of suppressing it in a loop. I've considered 2 more options, but I don't really like them: 1. create a temporary file with a filename longer than 255 characters on import; if this fails, long paths are not enabled and raise a warning. I'm not sure about this approach because I don't like the idea of creating a temporary file on import for this purpose. 2. check if long paths are enabled with [this code](https://stackoverflow.com/a/46546731/14095927). As mentioned in the comment, this code relies on an undocumented function and Win10-specific.
Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled.
109
Some tests hang on Windows Currently, several tests hang on Windows if the max path limit of 260 characters is not disabled. This happens due to the changes introduced by #2223 that cause an infinite loop in `WindowsFileLock` described in #2220. This can be very tricky to debug, so I think now is a good time to address these issues/PRs. IMO throwing an error is too harsh, but maybe we can emit a warning in the top-level `__init__.py ` on startup if long paths are not enabled. @albertvillanova Thanks for additional info on this issue. Yes, I think the best option is to throw an error instead of suppressing it in a loop. I've considered 2 more options, but I don't really like them: 1. create a temporary file with a filename longer than 255 characters on import; if this fails, long paths are not enabled and raise a warning. I'm not sure about this approach because I don't like the idea of creating a temporary file on import for this purpose. 2. check if long paths are enabled with [this code](https://stackoverflow.com/a/46546731/14095927). As mentioned in the comment, this code relies on an undocumented function and Win10-specific.
[ -0.21726956963539124, 0.011509522795677185, -0.1549202799797058, 0.09689994156360626, 0.27776801586151123, -0.11498277634382248, 0.2952311933040619, 0.15919239819049835, 0.2075243443250656, 0.33040642738342285, 0.5141470432281494, -0.14155617356300354, -0.3705517649650574, 0.001273350790143013, -0.1112249493598938, 0.012763284146785736, 0.157583087682724, -0.009090512990951538, -0.11113320291042328, 0.2419538050889969, -0.581757664680481, 0.29735156893730164, -0.12089280039072037, 0.06978856027126312, -0.46572354435920715, 0.021145695820450783, -0.1338060200214386, 0.22170493006706238, 0.022624453529715538, -0.5973180532455444, -0.04955749958753586, 0.08737331628799438, 0.1996970921754837, 0.32997891306877136, -0.000115835020551458, -0.17324189841747284, 0.4302375912666321, 0.1597508192062378, -0.009191622957587242, 0.1272982358932495, 0.023097746074199677, -0.2545150816440582, 0.12710879743099213, -0.0732768252491951, 0.2885792553424835, 0.3217957615852356, -0.18925276398658752, -0.09027257561683655, 0.03565578907728195, 0.3643988072872162, 0.09824523329734802, 0.29902347922325134, -0.0031333528459072113, -0.029843740165233612, 0.5178440809249878, -0.07103918492794037, -0.26789942383766174, 0.27706775069236755, 0.6322723627090454, -0.45858463644981384, -0.08643729239702225, -0.09310959279537201, 0.13843987882137299, 0.06693771481513977, 0.04774945229291916, -0.08621671795845032, 0.5759897232055664, -0.47317394614219666, -0.03585207462310791, 0.43366435170173645, -0.24552971124649048, 0.11366499215364456, -0.26451048254966736, -0.35384097695350647, 0.19018782675266266, -0.4038681387901306, 0.6520923972129822, -0.0036577964201569557, -0.11528673768043518, -0.008834067732095718, -0.05140966922044754, -0.11130824685096741, -0.11508913338184357, 0.0267864428460598, -0.38076451420783997, -0.016755394637584686, 0.2789616882801056, 0.022445745766162872, 0.2998564839363098, -0.14390800893306732, 0.11761868000030518, 0.23027151823043823, -0.028880063444375992, -0.14420568943023682, -0.02525094524025917, -0.06080775707960129, 0.1530761420726776, 0.398049920797348, 0.14618700742721558, 0.09525404870510101, -0.24704469740390778, -0.05204427242279053, 0.5046228766441345, -0.011013075709342957, -0.4035016596317291, 0.001145828515291214, 0.028873983770608902, -0.0997336357831955, 0.48379093408584595, 0.23886600136756897, -0.15272246301174164, 0.21033021807670593, -0.1078677773475647, -0.8629804849624634, 0.04759963974356651, 0.4625179171562195, 0.24719224870204926, -0.3369777798652649, -0.0723705068230629, 0.22641073167324066, -0.1641438901424408, 0.1272982507944107, 0.33009544014930725, 0.3593270480632782, 0.20210640132427216, 0.09274841845035553, 0.03936454653739929, 0.09883607178926468, -0.2775811553001404, 0.4377494156360626, 0.18016283214092255, 0.05550343170762062, -0.28026384115219116, -0.04112362116575241, 0.33978739380836487, -0.09152929484844208, 0.1394985318183899, -0.13177847862243652, 0.28477710485458374, -0.11435119062662125, 0.04319734126329422, -0.18675440549850464, 0.31030359864234924, 0.19961075484752655, -0.1265118420124054, -0.10073304176330566, -0.05543091520667076, -0.033347781747579575, -0.17008467018604279, 0.24801915884017944, 0.003554500639438629, -0.3172849118709564, 0.24030886590480804, 0.10770996659994125, -0.32476806640625, 0.212934210896492, 0.4897373616695404, -0.19114457070827484, -0.21190837025642395, 0.025681693106889725, 0.28495776653289795, -0.44526273012161255, -0.06739193201065063, -0.07757851481437683, 0.1355937123298645, 0.4370960593223572, -0.16468489170074463, 0.10384847223758698, 0.2707800567150116, -0.12795555591583252, -0.08305440098047256, 0.331915944814682, -0.11236745119094849, 0.061461642384529114, -0.4950163662433624, 0.1328357309103012, -0.02661076933145523, -0.01449083723127842, 0.0068825422786176205, -0.018374193459749222, -0.33784425258636475, -0.0011200420558452606, 0.2841240167617798, -0.20059217512607574, 0.1528511494398117, -0.2663382589817047, 0.1396324783563614, 0.3033236861228943, 0.10102184861898422, 0.0706552118062973, -0.29934653639793396, -0.3317326009273529, 0.3780609965324402, 0.1408141553401947, 0.18320204317569733, -0.48350709676742554, 0.06318864226341248, 0.35219132900238037, 0.20533379912376404, -0.10146327316761017, -0.3410061001777649, 0.3710106611251831, 0.2650716304779053, 0.17966845631599426, -0.1401555836200714, 0.289265900850296, -0.0001360177993774414, 0.18135002255439758, -0.43529748916625977, -0.11655540764331818, 0.08088167011737823, -0.23880751430988312, 0.09498200565576553, 0.19379855692386627, 0.17621232569217682, 0.11128728091716766, 0.06192975491285324, -0.07147279381752014, 0.37731173634529114, 0.1645887941122055, 0.11333481967449188, -0.10226858407258987, -0.5447928309440613, 0.08723381161689758, 0.023313350975513458, 0.11402823030948639, -0.14721426367759705, -0.19059421122074127, -0.035382065922021866, 0.15016138553619385, 0.23231080174446106, -0.14480027556419373, 0.11127500981092453, 0.1464540809392929, 0.1687176674604416, 0.03128373622894287, -0.22119885683059692, 0.4166804850101471, 0.19177328050136566, 0.14760738611221313, -0.01573350839316845, 0.36534056067466736, -0.28273555636405945, 0.029160819947719574, 0.045564234256744385, 0.2608526945114136, -0.35340267419815063, 0.47274249792099, 0.15866342186927795, -0.2761833369731903, 0.058776549994945526, -0.3594389855861664, -0.41509655117988586, 0.054921768605709076, 0.6074181795120239, 0.23535847663879395, -0.00037059932947158813, -0.0002104341983795166, 0.12121923267841339, -0.28087496757507324, 0.5422954559326172, 0.05685463175177574, -0.03940833359956741, 0.30323633551597595, 0.14592666923999786, 0.19167381525039673, -0.07512922585010529, 0.006737198680639267, 0.2901607155799866, 0.18299852311611176, 0.09019100666046143, 0.09149159491062164, -0.31583908200263977, -0.27743029594421387, 0.4461655914783478, 0.23204390704631805, -0.15079614520072937, 0.3037211000919342, 0.09465929865837097, -0.15971848368644714, -0.06750640273094177, -0.5304827690124512, 0.10287458449602127, -0.029828188940882683, -0.4843878746032715, -0.12317371368408203, 0.11484697461128235, -0.30946871638298035, -0.31279483437538147, -0.3310084342956543, -0.1815251111984253, -0.21089570224285126, 0.2179013192653656, 0.2613312602043152, -0.3223770260810852, 0.1804911196231842, 0.03761901333928108, 0.33142441511154175, 0.0883593037724495, -0.14287006855010986, -0.052773356437683105, 0.22261984646320343, -0.06079351156949997, -0.015780605375766754, 0.4539107382297516, -0.274061918258667, 0.18148823082447052, 0.009213889017701149, -0.16292256116867065, -0.245558500289917, -0.4740956425666809, -0.006396085023880005, 0.029871108010411263, 0.2510581314563751, 0.2609376311302185, 0.20941922068595886, 0.4769945740699768, -0.27217698097229004, 0.0930313989520073, -0.17601396143436432, 0.3480140268802643, 0.010030360892415047, 0.17392870783805847, 0.05806056782603264, -0.34551024436950684, -0.03995337337255478, 0.03829735517501831, -0.3544500470161438, 0.34139418601989746, -0.010360196232795715, 0.04043278098106384, 0.1787361055612564, 0.16176646947860718, 0.33008846640586853, -0.08685293793678284, -0.07670339941978455, 0.29470208287239075, -0.14126525819301605, 0.25551459193229675, 0.0037734005600214005, -0.23888693749904633, 0.15783950686454773, -0.18393397331237793, -0.48130881786346436, 0.01664077863097191, -0.45796310901641846, -0.25328394770622253, -0.4618515968322754, 0.5632854700088501, -0.02074182778596878, -0.18932752311229706, 0.40164145827293396, -0.0025791767984628677, -0.17765699326992035, 0.16463837027549744, 0.12194621562957764, 0.02537890523672104, -0.0352751687169075, 0.3957592248916626, -0.046522557735443115, 0.15638920664787292, -0.15814410150051117, -0.051426202058792114, 0.09106166660785675, 0.2764055132865906, 0.04241406172513962, -0.07384838163852692, 0.2500145137310028, -0.17534464597702026, 0.13558940589427948, -0.07051519304513931, -0.2777819037437439, -0.5607447028160095, 0.24707074463367462, 0.16762351989746094, 0.12364394962787628, 0.1883510947227478, -0.07882923632860184, 0.3090284466743469, -0.4608136713504791, 0.35424554347991943, -0.14597496390342712, 0.033363670110702515, -0.3284384608268738, 0.012749411165714264, 0.09571410715579987, -0.020341720432043076, 0.1347704827785492, 0.258207768201828, 0.10352529585361481, -0.08790337294340134, 0.1836247593164444, -0.2839958965778351, -0.42929399013519287, -0.16219870746135712, 0.20140761137008667, 0.4037260413169861, -0.31105321645736694, -0.26016658544540405, -0.0667257010936737, -0.4968474507331848, 0.707783043384552, 0.07043222337961197, 0.13346967101097107, 0.33197978138923645, 0.008818808943033218, 0.01723955012857914, -0.3556056022644043, -0.37512338161468506, -0.19425153732299805, 0.2851836085319519, 0.3584679067134857, 0.08869626373052597, 0.08286416530609131, -0.01944488286972046, 0.37844473123550415, -0.07002733647823334, 0.08620814234018326, -0.31218352913856506, -0.2375127375125885, -0.34583547711372375, 0.4420396387577057, 0.18341587483882904, -0.03788156062364578, -0.4988885819911957, -0.09892541170120239, 0.0018964987248182297, -0.42474138736724854, -0.029992058873176575, 0.27902495861053467, 0.02391071431338787, -0.1926022619009018, 0.11856505274772644, -0.1690094769001007, -0.05507490038871765, -0.07819148153066635, 0.13086943328380585, -0.1462375819683075, 0.1646687537431717, 0.07140817493200302, -0.39790427684783936, 0.2017241269350052, 0.6667283773422241, -0.22578147053718567, 0.2673373222351074, -0.3896169662475586, 0.499373197555542, -0.41186368465423584, 0.254193514585495, 0.36537906527519226, 0.20168855786323547, -0.026140479370951653, 0.37412387132644653, 0.11263881623744965, 0.21960000693798065, -0.06787426769733429, 0.4350929856300354, 0.16553400456905365, -0.4541856646537781, 0.11072489619255066, -0.03577867150306702, 0.7684594988822937, -0.10259531438350677, 0.2361125499010086, 0.193613201379776, -0.27265793085098267, 0.06358910351991653, 0.18079490959644318, -0.015271976590156555, 0.012165050953626633, -0.1770026981830597, 0.1316201090812683, -0.17375250160694122, 0.48408663272857666, -0.2300785630941391, -0.39168334007263184, -0.017194265499711037, 0.14507028460502625, -0.20433779060840607, -0.2742084562778473, 0.36567258834838867, -0.41385313868522644, -0.18320965766906738, -0.3267267048358917, 0.0717027559876442, 0.26684772968292236, 0.10394980013370514, -0.2877575755119324, 0.25325262546539307, 0.2862633764743805, -0.34190934896469116, -0.1302778273820877, -0.16965755820274353, -0.37298330664634705, -0.019267302006483078, -0.303673654794693, -0.19887302815914154, -0.050790850073099136, -0.12141945958137512, 0.04585880786180496, 0.49320757389068604, -0.14127053320407867, 0.09208659082651138, 0.15288934111595154, -0.19997867941856384, 0.17360205948352814, -0.17523977160453796, 0.07305651158094406, -0.13102540373802185, -0.0874771922826767, -0.11943105608224869, -0.2350844293832779, 0.031762368977069855, -0.16121333837509155, -0.07621429860591888, 0.17340412735939026, -0.10930520296096802, 0.04568841680884361, -0.19327598810195923, -0.21744273602962494, -0.09177477657794952, 0.1349649727344513, -0.21880994737148285, -0.1472107172012329, 0.24378708004951477, -0.15764622390270233, -0.29203885793685913, -0.15903110802173615, -0.01597752422094345, -0.5558781623840332, 0.09377914667129517, 0.4450949430465698, 0.4163705110549927, -0.027555260807275772, -0.21981346607208252, 0.4310463070869446, -0.2096083015203476, -0.22382289171218872, 0.1515854001045227, 0.4535619616508484, -0.11387299001216888, -0.05631819739937782, 0.35454997420310974, 0.2941823899745941, -0.046444132924079895, -0.03607581555843353, -0.31938228011131287, -0.36246028542518616, -0.01403006911277771, 0.06570863723754883, 0.453029602766037, -0.157047837972641, 0.14199434220790863, -0.05501594394445419, -0.47607460618019104, -0.27754688262939453, 0.09291166067123413, -0.46318477392196655, -0.02487124130129814, -0.23166069388389587, -0.18157491087913513, 0.08358028531074524, 0.09254096448421478, 0.01190628670156002, 0.17233391106128693, 0.07276841998100281, -0.20900946855545044, -0.1925775408744812, 0.07408783584833145, -0.05894806981086731, 0.04689978063106537, 0.3545168340206146, -0.3356935977935791, 0.385295569896698, 0.028209149837493896, 0.04326503351330757, 0.10460548847913742, 0.009073499590158463, 0.037202298641204834, 0.21151085197925568, 0.08098912239074707, -0.053394149988889694, 0.21458303928375244, -0.126854807138443, 0.1809292733669281, -0.02256113663315773, 0.23216308653354645, -0.23183973133563995, 0.2177373468875885, -0.1435007005929947, 0.24150431156158447, -0.12327796220779419, -0.00515664741396904, -0.006648436188697815, 0.14733025431632996, -0.145492821931839, 0.08731052279472351, 0.05973806977272034, 0.34790486097335815, -0.3795168101787567, 0.06728241592645645, 0.4205954968929291, 0.21583326160907745, -0.15613329410552979, 0.09573782980442047, -0.3546188175678253, -0.360759437084198, 0.14121051132678986, 0.28105130791664124, -0.018943220376968384, -0.3506752848625183, 0.29328176379203796, 0.1566915214061737, 0.30390995740890503, 0.08905838429927826, -0.27647095918655396, 0.566819965839386, 0.0337318517267704, -0.02838176116347313, 0.046175092458724976, 0.1355445235967636, 0.1352977305650711, -0.022571511566638947, 0.0025077760219573975, 0.37253230810165405, -0.1431930661201477, 0.2135625183582306, -0.09027109295129776, -0.16066111624240875, 0.019422214478254318, -0.14446893334388733, 0.12915626168251038, -0.17790308594703674, -0.027713298797607422, 0.38270294666290283, -0.3580882251262665, -0.06963218748569489, -0.2955850660800934, 0.053803447633981705, -0.08248116075992584, -0.23889103531837463, 0.07953241467475891, 0.19373998045921326, 0.07496601343154907, 0.1684904247522354, 0.14267291128635406, 0.047322291880846024, 0.06776842474937439, 0.42211639881134033, 0.14137199521064758, -0.059581905603408813, 0.1098179817199707, -0.19419017434120178, 0.14770059287548065, -0.4636533856391907, -0.026809750124812126, 0.2835351824760437, 0.17424830794334412, 0.17007653415203094, 0.04918548837304115, 0.6987290978431702, 0.0957903191447258, -0.24712970852851868, -0.17629656195640564, -0.2665339708328247, 0.2089698761701584, -0.08357005566358566, 0.3567849397659302, 0.09496846050024033, 0.3964248597621918, 0.19784528017044067, 0.10727113485336304, -0.2538064122200012, 0.2967764437198639, -0.1387278288602829, -0.3420833945274353, -0.11909793317317963, 0.09367862343788147, 0.49891677498817444, -0.03527567535638809, -0.35492753982543945, -0.06533972173929214, -0.2709403932094574, 0.037245821207761765, 0.21633847057819366, -0.14120425283908844, 0.11568940430879593, 0.22880443930625916, 0.048181191086769104, 0.019870715215802193, 0.3926137089729309, 0.2761419117450714, 0.41549819707870483, -0.2311159074306488, -0.0514352023601532, -0.4386862814426422, -0.15029382705688477, -0.31615662574768066, -0.15451271831989288, 0.14502935111522675, -0.26631960272789, -0.3011597692966461, 0.020701957866549492, -0.09488645195960999, 0.058888260275125504, -0.09728745371103287, 0.010023199021816254, -0.36979514360427856, -0.025580544024705887, 0.34940266609191895, -0.05728454142808914, -0.17437148094177246, -0.19829609990119934, 0.30897462368011475, -0.11502116918563843, -0.04428427293896675, 0.08252382278442383, -0.062296267598867416, 0.04447733238339424, 0.37454918026924133, 0.07112590223550797, 0.04291004687547684, 0.1308484673500061, -0.01886066608130932, -0.06396525353193283, -0.5000753998756409, -0.1529317945241928, 0.16542668640613556, -0.19786307215690613, 0.14623874425888062, -0.019431160762906075, -0.2850455939769745, -0.24245037138462067, -0.17187821865081787, 0.041315700858831406, -0.002493627369403839, 0.11531586945056915, 0.06675883382558823, 0.03968874365091324, 0.2512603998184204, 0.23326756060123444, 0.03521348163485527, 0.4985247850418091, 0.06930553913116455, -0.05667281150817871, -0.06592093408107758, -0.3039146065711975, 0.34964025020599365, -0.2846894860267639, -0.3333357572555542, -0.013378714211285114, 0.420559823513031, -0.25002387166023254, -0.011279081925749779, -0.39745673537254333, -0.09664823859930038, -0.07822145521640778, 0.13238359987735748, -0.4807891547679901, 0.24506254494190216, -0.005156815052032471, 0.0007851198315620422, -0.10020215064287186, -0.011486142873764038, -0.09529126435518265, 0.1334644854068756, -0.19641771912574768, -0.11091367155313492 ]
https://github.com/huggingface/datasets/issues/2441
DuplicatedKeysError on personal dataset
Hi ! In your dataset script you must be yielding examples like ```python for line in file: ... yield key, {...} ``` Since `datasets` 1.7.0 we enforce the keys to be unique. However it looks like your examples generator creates duplicate keys: at least two examples have key 0. You can fix that by making sure that your keys are unique. For example if you use a counter to define the key of each example, make sure that your counter is not reset to 0 in during examples generation (between two open files for examples). Let me know if you have other questions :)
## Describe the bug Ever since today, I have been getting a DuplicatedKeysError while trying to load my dataset from my own script. Error returned when running this line: `dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py')` Note that my script was working fine with earlier versions of the Datasets library. Cannot say with 100% certainty if I have been doing something wrong with my dataset script this whole time or if this is simply a bug with the new version of datasets. ## Steps to reproduce the bug I cannot provide code to reproduce the error as I am working with my own dataset. I can however provide my script if requested. ## Expected results For my data to be loaded. ## Actual results **DuplicatedKeysError** exception is raised ``` Downloading and preparing dataset good_reads_practice_dataset/main_domain (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/good_reads_practice_dataset/main_domain/1.1.0/64ff7c3fee2693afdddea75002eb6887d4fedc3d812ae3622128c8504ab21655... --------------------------------------------------------------------------- DuplicatedKeysError Traceback (most recent call last) <ipython-input-6-c342ea0dae9d> in <module>() ----> 1 dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py') 5 frames /usr/local/lib/python3.7/dist-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, **config_kwargs) 749 try_from_hf_gcs=try_from_hf_gcs, 750 base_path=base_path, --> 751 use_auth_token=use_auth_token, 752 ) 753 /usr/local/lib/python3.7/dist-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 573 if not downloaded_from_gcs: 574 self._download_and_prepare( --> 575 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 576 ) 577 # Sync info /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 650 try: 651 # Prepare split will record examples associated to the split --> 652 self._prepare_split(split_generator, **prepare_split_kwargs) 653 except OSError as e: 654 raise OSError( /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _prepare_split(self, split_generator) 990 writer.write(example, key) 991 finally: --> 992 num_examples, num_bytes = writer.finalize() 993 994 split_generator.split_info.num_examples = num_examples /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in finalize(self, close_stream) 407 # In case current_examples < writer_batch_size, but user uses finalize() 408 if self._check_duplicates: --> 409 self.check_duplicate_keys() 410 # Re-intializing to empty list for next batch 411 self.hkey_record = [] /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) 347 for hash, key in self.hkey_record: 348 if hash in tmp_record: --> 349 raise DuplicatedKeysError(key) 350 else: 351 tmp_record.add(hash) DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 0 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: Windows-10-10.0.19041-SP0 - Python version: 3.7.9 - PyArrow version: 3.0.0
104
DuplicatedKeysError on personal dataset ## Describe the bug Ever since today, I have been getting a DuplicatedKeysError while trying to load my dataset from my own script. Error returned when running this line: `dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py')` Note that my script was working fine with earlier versions of the Datasets library. Cannot say with 100% certainty if I have been doing something wrong with my dataset script this whole time or if this is simply a bug with the new version of datasets. ## Steps to reproduce the bug I cannot provide code to reproduce the error as I am working with my own dataset. I can however provide my script if requested. ## Expected results For my data to be loaded. ## Actual results **DuplicatedKeysError** exception is raised ``` Downloading and preparing dataset good_reads_practice_dataset/main_domain (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /root/.cache/huggingface/datasets/good_reads_practice_dataset/main_domain/1.1.0/64ff7c3fee2693afdddea75002eb6887d4fedc3d812ae3622128c8504ab21655... --------------------------------------------------------------------------- DuplicatedKeysError Traceback (most recent call last) <ipython-input-6-c342ea0dae9d> in <module>() ----> 1 dataset = load_dataset('/content/drive/MyDrive/Thesis/Datasets/book_preprocessing/goodreads_maharjan_trimmed_and_nered/goodreadsnered.py') 5 frames /usr/local/lib/python3.7/dist-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, task, **config_kwargs) 749 try_from_hf_gcs=try_from_hf_gcs, 750 base_path=base_path, --> 751 use_auth_token=use_auth_token, 752 ) 753 /usr/local/lib/python3.7/dist-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs) 573 if not downloaded_from_gcs: 574 self._download_and_prepare( --> 575 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs 576 ) 577 # Sync info /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs) 650 try: 651 # Prepare split will record examples associated to the split --> 652 self._prepare_split(split_generator, **prepare_split_kwargs) 653 except OSError as e: 654 raise OSError( /usr/local/lib/python3.7/dist-packages/datasets/builder.py in _prepare_split(self, split_generator) 990 writer.write(example, key) 991 finally: --> 992 num_examples, num_bytes = writer.finalize() 993 994 split_generator.split_info.num_examples = num_examples /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in finalize(self, close_stream) 407 # In case current_examples < writer_batch_size, but user uses finalize() 408 if self._check_duplicates: --> 409 self.check_duplicate_keys() 410 # Re-intializing to empty list for next batch 411 self.hkey_record = [] /usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) 347 for hash, key in self.hkey_record: 348 if hash in tmp_record: --> 349 raise DuplicatedKeysError(key) 350 else: 351 tmp_record.add(hash) DuplicatedKeysError: FAILURE TO GENERATE DATASET ! Found duplicate Key: 0 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: Windows-10-10.0.19041-SP0 - Python version: 3.7.9 - PyArrow version: 3.0.0 Hi ! In your dataset script you must be yielding examples like ```python for line in file: ... yield key, {...} ``` Since `datasets` 1.7.0 we enforce the keys to be unique. However it looks like your examples generator creates duplicate keys: at least two examples have key 0. You can fix that by making sure that your keys are unique. For example if you use a counter to define the key of each example, make sure that your counter is not reset to 0 in during examples generation (between two open files for examples). Let me know if you have other questions :)
[ -0.1864345669746399, -0.0565238893032074, 0.07348422706127167, 0.21938633918762207, 0.14254745841026306, 0.029285795986652374, 0.5267680287361145, 0.22071008384227753, 0.05882276967167854, 0.08725550770759583, -0.17907597124576569, 0.2924933135509491, -0.1353885382413864, -0.12589094042778015, 0.32251688838005066, 0.16445840895175934, 0.02922441065311432, -0.0048963576555252075, -0.13788677752017975, 0.05620909482240677, -0.16695120930671692, 0.27246299386024475, -0.015424393117427826, 0.40065932273864746, -0.11224115639925003, 0.018016688525676727, -0.15497060120105743, 0.3373050093650818, 0.15741851925849915, -0.5524032115936279, 0.3723452389240265, 0.11519303917884827, -0.058530282229185104, 0.638874351978302, -0.00011437700595706701, 0.08932660520076752, 0.3678566813468933, 0.0726802796125412, -0.33680322766304016, -0.26827603578567505, 0.034932784736156464, -0.025170395150780678, 0.18875135481357574, -0.33042800426483154, 0.04025236517190933, -0.22909516096115112, -0.001172007992863655, -0.310566782951355, 0.3904745578765869, 0.2292790561914444, 0.2183040827512741, 0.036706097424030304, -0.07552143186330795, -0.1794559359550476, 0.1490662395954132, 0.3316635489463806, 0.12215226143598557, 0.25249120593070984, 0.20905795693397522, -0.1218598335981369, 0.09356148540973663, 0.09225675463676453, -0.23267684876918793, 0.2715851068496704, 0.46581971645355225, 0.13819681107997894, -0.22776678204536438, -0.038920022547245026, 0.2810680866241455, 0.4387471377849579, 0.45617783069610596, -0.5366324782371521, -0.2995781898498535, -0.4711136221885681, 0.1770801991224289, -0.24117040634155273, 0.1227196455001831, -0.02238660864531994, -0.1665579378604889, 0.21514208614826202, -0.16492339968681335, -0.07533112168312073, -0.10694952309131622, 0.03159763664007187, 0.0011818110942840576, -0.12231619656085968, -0.04936205595731735, 0.27119746804237366, 0.12061373889446259, -0.1859206110239029, -0.042060572654008865, -0.08070072531700134, -0.06263048946857452, 0.04790971055626869, -0.12170928716659546, -0.012127161026000977, 0.07193109393119812, -0.035617418587207794, 0.4212898015975952, 0.1260746717453003, 0.1623891144990921, 0.05112658813595772, 0.07215078175067902, 0.01583566516637802, 0.47988298535346985, 0.025782518088817596, 0.08383844792842865, 0.25383856892585754, 0.28584229946136475, 0.1228552907705307, -0.17083419859409332, -0.005733132362365723, -0.037886347621679306, 0.06166073679924011, 0.5174379348754883, -0.04363247752189636, 0.7000396251678467, -0.27156105637550354, -0.201008141040802, 0.09891346842050552, 0.007663372904062271, -0.1383437216281891, -0.07814963161945343, 0.16663265228271484, 0.09219913929700851, 0.015202371403574944, -0.18036939203739166, 0.04835928604006767, -0.2964206337928772, -0.12433293461799622, -0.10585533082485199, 0.09028163552284241, 0.07107548415660858, -0.030138621106743813, 0.32089754939079285, -0.48468250036239624, 0.13547492027282715, 0.09962794184684753, 0.02248380333185196, -0.34619230031967163, 0.14965739846229553, 0.01793423667550087, -0.15500208735466003, 0.09561967849731445, 0.13652996718883514, 0.37244364619255066, 0.055154949426651, -0.2492416948080063, -0.12500357627868652, 0.158028706908226, -0.36862465739250183, -0.4084022641181946, -0.10849273204803467, 0.22309350967407227, -0.2670639157295227, -0.10356971621513367, -0.16207918524742126, 0.0551874153316021, 0.333281934261322, -0.18187536299228668, -0.06626666337251663, -0.25441455841064453, -0.4359379708766937, -0.2930593192577362, -0.048822496086359024, 0.6278373003005981, -0.3001231551170349, -0.08284027129411697, -0.5352845788002014, -0.17062704265117645, -0.2267036736011505, 0.2687506675720215, -0.3589935600757599, 0.5027728080749512, -0.348479688167572, 0.20101256668567657, 0.06684219837188721, -0.3456723988056183, -0.6580877304077148, 0.5311319231987, -0.27463120222091675, 0.3273470401763916, 0.04161176458001137, 0.12769243121147156, 0.46517089009284973, -0.12330690026283264, 0.11208908259868622, -0.17753440141677856, 0.08621133863925934, -0.12434771656990051, -0.05742551386356354, -0.16779695451259613, 0.05089712142944336, 0.028859511017799377, 0.09286583214998245, -0.21942374110221863, 0.2983492612838745, 0.08725416660308838, 0.2812464237213135, -0.23831138014793396, -0.034976378083229065, 0.1662205457687378, 0.1789267510175705, 0.0728694498538971, 0.028323933482170105, -0.1941448152065277, -0.43419498205184937, 0.3175950050354004, 0.004056844860315323, -0.3278975784778595, -0.20907728374004364, -0.18176597356796265, -0.44853755831718445, 0.0098385289311409, -0.5775949358940125, 0.0009188055992126465, 0.07143275439739227, 0.20518822968006134, -0.08127827942371368, 0.025861401110887527, -0.1853126734495163, 0.40734508633613586, 0.18221062421798706, 0.08088942617177963, -0.23526431620121002, 0.0039497967809438705, -0.02267427183687687, 0.004117865115404129, 0.07362096011638641, 0.07473139464855194, 0.3385293483734131, -0.08153149485588074, -0.1256210207939148, 0.40604302287101746, 0.06418387591838837, 0.15427082777023315, -0.18740031123161316, -0.11529527604579926, 0.1179359033703804, -0.15461504459381104, 0.31598955392837524, 0.19826266169548035, 0.26798710227012634, -0.16547757387161255, -0.39249008893966675, 0.3851965069770813, 0.009107481688261032, -0.12249546498060226, -0.16563034057617188, -0.07947150617837906, 0.0632040798664093, -0.20099954307079315, -0.026860419660806656, -0.20526213943958282, 0.29088929295539856, -0.20185166597366333, 0.07992780208587646, 0.14023275673389435, -0.18871890008449554, 0.13982714712619781, 0.16790957748889923, -0.1818186640739441, 0.27904269099235535, 0.1638425588607788, -0.044188931584358215, 0.020984146744012833, -0.03868565708398819, 0.29990968108177185, 0.510356605052948, 0.15373240411281586, -0.0037190429866313934, 0.26416411995887756, -0.12284108251333237, -0.06468015909194946, 0.06965705752372742, -0.041799046099185944, 0.022683143615722656, 0.21883642673492432, 0.0694568082690239, 0.06869128346443176, -0.2538975775241852, 0.04554468020796776, 0.008370038121938705, 0.3561426103115082, -0.44749125838279724, 0.14447906613349915, -0.5289642810821533, -0.041022952646017075, -0.2909214198589325, 0.1154116690158844, 0.06872021406888962, -0.11833050101995468, -0.005904417484998703, 0.3284449577331543, 0.07636697590351105, -0.061455488204956055, -0.21957674622535706, 0.07376879453659058, -0.15099546313285828, -0.08385930955410004, 0.03749704360961914, -0.10663069784641266, -0.4570366144180298, 0.03936493769288063, 0.43543487787246704, -0.07556695491075516, 0.46889570355415344, 0.10139035433530807, -0.08677157759666443, -0.5481948256492615, -0.1828356683254242, -0.12212097644805908, -0.013587340712547302, 0.1786356270313263, 0.2338028848171234, 0.034776054322719574, 0.113602414727211, -0.06591015309095383, 0.034404221922159195, -0.14308924973011017, -0.24605116248130798, 0.17481179535388947, -0.10321594774723053, -0.017034757882356644, -0.06060047075152397, -0.40048450231552124, -0.21465498208999634, 0.05893095210194588, 0.2180154174566269, -0.02788110449910164, -0.0025191083550453186, 0.1291806995868683, -0.07947839051485062, -0.034478846937417984, 0.07464445382356644, -0.13460566103458405, -0.33633604645729065, -0.17202286422252655, 0.2224804013967514, -0.14923207461833954, -0.34510794281959534, -0.056471481919288635, -0.05090127885341644, 0.031832531094551086, -0.1824127435684204, -0.719586968421936, -0.019283469766378403, -0.11496143043041229, 0.24365633726119995, -0.2316606044769287, -0.12312574684619904, 0.11639957129955292, 0.04508615657687187, 0.021975988522171974, -0.17027659714221954, -0.4202028512954712, -0.1165175661444664, -0.14168435335159302, 0.053526900708675385, 0.17161688208580017, 0.5161123275756836, 0.021545954048633575, 0.3910149335861206, 0.478676438331604, -0.051872942596673965, 0.11981786787509918, -0.09671992808580399, 0.39125856757164, -0.1630539894104004, -0.5665519833564758, -0.08866347372531891, -0.15951672196388245, -0.09591653943061829, 0.10904517769813538, -0.14120450615882874, -0.05647130310535431, 0.044978685677051544, -0.1053595244884491, -0.4014688730239868, -0.2534808814525604, -0.1894116997718811, -0.0761733278632164, -0.157455712556839, 0.19375371932983398, 0.2676411271095276, -0.11560402810573578, -0.07873757183551788, 0.13128452003002167, 0.09390386939048767, 0.019574329257011414, 0.020016739144921303, -0.3347146213054657, -0.03183922916650772, -0.5773197412490845, 0.2624216079711914, 0.050772517919540405, 0.2812112867832184, -0.18057504296302795, 0.27672889828681946, 0.15898212790489197, -0.1883496344089508, 0.31866154074668884, -0.1713167279958725, 0.16661927103996277, 0.20841257274150848, -0.32174795866012573, -0.333486407995224, -0.1418100893497467, 0.05533098056912422, 0.33219343423843384, -0.1960066556930542, 0.33909639716148376, -0.3019610345363617, 0.2847577929496765, 0.4102039635181427, 0.22611334919929504, -0.30091896653175354, -0.4573727250099182, 0.009146168828010559, -0.6291181445121765, -0.48789095878601074, -0.037821926176548004, -0.05534011125564575, 0.15636120736598969, -0.04426264017820358, 0.06467880308628082, 0.01154013630002737, 0.018831957131624222, 0.26033830642700195, 0.11473140120506287, 0.23037755489349365, 0.06586054712533951, 0.5187872648239136, 0.1961689442396164, -0.027771592140197754, 0.27986815571784973, 0.7565233707427979, 0.0018247663974761963, -0.2737170159816742, -0.15945720672607422, -0.23902545869350433, -0.07135901600122452, 0.2079097181558609, -0.10344385355710983, 0.09777344763278961, 0.22498755156993866, -0.2202133685350418, -0.023498408496379852, -0.08520172536373138, 0.19449619948863983, 0.026329129934310913, -0.40110471844673157, -0.3828478455543518, 0.4315967857837677, 0.12998519837856293, -0.1661483347415924, 0.3216852843761444, -0.150918647646904, -0.06492401659488678, 0.0862528458237648, -0.30260157585144043, 0.5584698915481567, -0.20486809313297272, 0.11036179959774017, 0.11950141191482544, -0.4390956163406372, 0.2995181977748871, -0.02393769845366478, -0.16615626215934753, -0.521862804889679, -0.10001944750547409, 0.032634347677230835, 0.06577464938163757, 0.09646648168563843, 0.039310649037361145, -0.05142347142100334, 0.30235180258750916, 0.09515532851219177, 0.02538277767598629, 0.0172294769436121, 0.5617960691452026, 0.042826902121305466, -0.09912332892417908, -0.0670158639550209, 0.156698077917099, -0.18015655875205994, 0.2203926146030426, -0.053313832730054855, 0.01970168948173523, -0.03242321312427521, -0.3704380393028259, -0.5147486925125122, 0.0243520587682724, -0.05542298033833504, 0.4853653907775879, -0.08287875354290009, -0.6532331705093384, 0.171950101852417, 0.12295481562614441, 0.23829467594623566, 0.06260243058204651, -0.20262575149536133, 0.11076267063617706, -0.08133097738027573, 0.2891857922077179, -0.20484988391399384, -0.24473242461681366, 0.10651318728923798, -0.03386829420924187, -0.411109060049057, -0.031441062688827515, 0.17271189391613007, -0.14595575630664825, -0.14418978989124298, 0.11455244570970535, 0.29201728105545044, -0.2978403568267822, -0.17868444323539734, -0.15612353384494781, 0.03872353211045265, -0.2815295457839966, 0.05303196609020233, 0.19025880098342896, 0.055360689759254456, 0.1686563640832901, -0.14815382659435272, -0.3456926643848419, -0.0585031621158123, 0.5251163840293884, 0.1614076793193817, -0.21644404530525208, 0.5713973045349121, 0.07848402857780457, -0.011060304939746857, -0.1443631798028946, 0.3910472095012665, 0.21974773705005646, -0.26005735993385315, 0.07514123618602753, -0.17006614804267883, 0.4170733094215393, 0.12112321704626083, -0.10603119432926178, 0.09095500409603119, -0.03738714009523392, 0.013448696583509445, -0.13377094268798828, -0.29237422347068787, -0.039855919778347015, 0.06455617398023605, 0.2733725607395172, 0.34975436329841614, 0.07004866003990173, 0.021048719063401222, 0.008410368114709854, -0.24612192809581757, 0.28401657938957214, 0.38117220997810364, -0.12479399144649506, 0.3689228594303131, 0.08782900124788284, -0.12139392644166946, 0.08272095024585724, 0.12071876227855682, 0.3267301917076111, -0.018248656764626503, -0.19737911224365234, -0.15363846719264984, 0.1597956120967865, -0.07642364501953125, 0.010183209553360939, -0.1052648276090622, -0.1975090354681015, 0.0420864075422287, -0.08299040049314499, 0.26199495792388916, 0.41932570934295654, 0.1065916121006012, 0.21378068625926971, 0.22052758932113647, -0.09964092820882797, -0.18365150690078735, 0.28504446148872375, -0.29021573066711426, 0.13086360692977905, 0.17317910492420197, 0.24830453097820282, 0.12618955969810486, 0.03328566998243332, -0.31449466943740845, 0.07197050750255585, 0.14811931550502777, -0.08814940601587296, 0.19950005412101746, -0.48020780086517334, 0.0026388652622699738, 0.2147418111562729, 0.19911321997642517, 0.31380921602249146, -0.35217511653900146, -0.26608192920684814, 0.019956650212407112, 0.10407225042581558, -0.33798885345458984, -0.33758604526519775, 0.3838562071323395, 0.13042138516902924, -0.16273832321166992, 0.36746132373809814, 0.011858228594064713, -0.2065400779247284, -0.19256483018398285, 0.000024905428290367126, 0.5280094146728516, -0.15800458192825317, 0.16355054080486298, 0.35573717951774597, -0.13773129880428314, -0.24493719637393951, 0.1990896612405777, 0.04574078693985939, 0.23266032338142395, 0.7291664481163025, -0.31926459074020386, 0.06955194473266602, 0.03886709362268448, 0.29950159788131714, 0.11969681084156036, -0.5269599556922913, 0.2326115369796753, 0.019915491342544556, -0.1420411467552185, 0.0734834372997284, 0.34832245111465454, 0.2425374686717987, -0.09504014998674393, 0.076601542532444, -0.31920501589775085, -0.051755208522081375, -0.1597229540348053, -0.1258331686258316, 0.014250297099351883, -0.1257433444261551, 0.02615097165107727, 0.09506382048130035, -0.22269001603126526, -0.10253579914569855, 0.2904980778694153, 0.01645570620894432, -0.48829585313796997, -0.40082424879074097, 0.14081119000911713, 0.07005488872528076, 0.07780724763870239, -0.21780885756015778, 0.13491275906562805, 0.43350642919540405, 0.06136639416217804, 0.2583360970020294, 0.26389944553375244, 0.6102487444877625, 0.13899686932563782, -0.02200164645910263, 0.1325811743736267, -0.15537753701210022, 0.019685043022036552, 0.14983893930912018, 0.1509150117635727, -0.12792135775089264, 0.36271336674690247, 0.3473045527935028, 0.12913841009140015, 0.06030251830816269, 0.2542682886123657, 0.3459600806236267, -0.021778494119644165, -0.43544089794158936, 0.16674527525901794, -0.24337223172187805, -0.1651652604341507, -0.1628527194261551, 0.38114723563194275, -0.2777804732322693, -0.23510321974754333, 0.5976244211196899, 0.37268903851509094, 0.0739830881357193, -0.20825670659542084, 0.060105063021183014, -0.12046559154987335, 0.16702330112457275, 0.29270076751708984, -0.19818755984306335, -0.23541805148124695, 0.1743614822626114, -0.9540209770202637, 0.3124179244041443, -0.552351713180542, -0.02024201489984989, 0.06632666289806366, 0.20647726953029633, -0.139655202627182, 0.07771410793066025, 0.33706310391426086, -0.07651222497224808, -0.14253127574920654, 0.2806805968284607, -0.18411222100257874, -0.2737284302711487, 0.2567863464355469, -0.03197869658470154, 0.041811294853687286, -0.20014959573745728, 0.22164517641067505, -0.23711933195590973, 0.0011964216828346252, -0.17377455532550812, -0.11263549327850342, 0.1364227682352066, -0.16212953627109528, 0.43712303042411804, 0.16869612038135529, 0.5093709230422974, 0.1869763731956482, -0.10738396644592285, -0.3273392617702484, 0.005386170465499163, -0.18921464681625366, 0.5253090858459473, 0.16640937328338623, 0.4103940725326538, 0.018934471532702446, -0.16805517673492432, -0.11647981405258179, 0.17939671874046326, -0.01611819490790367, 0.05825512111186981, -0.09249884635210037, 0.15486039221286774, -0.06966421753168106, 0.06826933473348618, -0.05760039761662483, 0.23116064071655273, -0.0504845529794693, 0.4076502323150635, -0.18239793181419373, -0.5174463391304016, 0.5359561443328857, -0.3246196508407593, -0.11272434890270233, -0.22428826987743378, 0.31912389397621155, -0.27300891280174255, -0.09221675992012024, -0.4396291971206665, 0.14774423837661743, 0.5595073103904724, -0.09030453860759735, 0.06170150265097618, 0.14477717876434326, -0.2487696409225464, 0.13223738968372345, 0.0044942013919353485, 0.2902171015739441, -0.008430913090705872, -0.18497978150844574, 0.49087175726890564, -0.17930597066879272 ]
https://github.com/huggingface/datasets/issues/2440
Remove `extended` field from dataset tagger
The tagger also doesn't insert the value for the `size_categories` field automatically, so this should be fixed too
## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite
18
Remove `extended` field from dataset tagger ## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite The tagger also doesn't insert the value for the `size_categories` field automatically, so this should be fixed too
[ -0.04705850034952164, -0.027882374823093414, -0.006330898031592369, 0.22309105098247528, 0.39806777238845825, 0.3846159279346466, 0.3813197910785675, 0.2038034051656723, 0.13319234549999237, 0.30706673860549927, 0.34983834624290466, 0.346498042345047, -0.337616503238678, 0.010123500600457191, -0.12409664690494537, 0.061664730310440063, 0.18703687191009521, -0.08481988310813904, 0.28284844756126404, 0.17965185642242432, -0.20780745148658752, -0.1280435472726822, -0.015804298222064972, -0.23960767686367035, -0.29038408398628235, 0.0013583432883024216, -0.13285398483276367, -0.020657725632190704, -0.253572016954422, -0.6862007975578308, 0.41326403617858887, 0.03452027589082718, -0.05563126504421234, 0.13613200187683105, -0.00011895377247128636, -0.08520501852035522, 0.19411006569862366, -0.005104832351207733, -0.16109801828861237, -0.2943260669708252, 0.011630751192569733, -0.01325373724102974, 0.07713758945465088, -0.14069302380084991, 0.2041277289390564, -0.27001672983169556, -0.297279417514801, -0.21018239855766296, -0.006412126123905182, 0.302944540977478, 0.11342257261276245, -0.17249484360218048, -0.2265179455280304, -0.22237356007099152, 0.31006336212158203, 0.1275658905506134, -0.10883009433746338, 0.1322648972272873, 0.497114360332489, 0.31244757771492004, -0.03721008449792862, 0.4784122705459595, -0.019173258915543556, -0.03231298178434372, 0.3561674654483795, -0.1500071883201599, 0.37282517552375793, -0.3121432363986969, 0.238199383020401, -0.10958781093358994, 0.30608370900154114, -0.43630823493003845, -0.13980646431446075, -0.6247718930244446, -0.03181091323494911, -0.48372510075569153, 0.36424392461776733, -0.19883455336093903, -0.0016444381326436996, -0.1294548660516739, -0.2243824601173401, -0.2147235870361328, -0.05424662306904793, 0.04480140656232834, -0.36547109484672546, 0.4700646996498108, 0.1729986071586609, 0.062189433723688126, 0.1544351726770401, -0.0747496485710144, -0.04897317662835121, 0.0852459967136383, -0.23986157774925232, 0.08579199761152267, -0.008203420788049698, -0.09289607405662537, -0.03114020824432373, -0.08143679052591324, 0.13229385018348694, 0.3225845694541931, -0.20786644518375397, -0.0327615886926651, 0.24052584171295166, 0.13163307309150696, 0.3100026249885559, 0.030764803290367126, 0.04369121417403221, 0.3443269729614258, 0.016435060650110245, 0.1438980996608734, -0.016916491091251373, -0.11152488738298416, 0.08086654543876648, -0.07413773983716965, 0.47037720680236816, 0.16699540615081787, 0.2705395817756653, -0.2235884964466095, -0.23138946294784546, 0.15068796277046204, -0.3144264221191406, 0.10374464094638824, 0.10486223548650742, 0.10043707489967346, 0.007736636325716972, -0.033685795962810516, -0.324662983417511, 0.3663530945777893, 0.1444290280342102, 0.05218788608908653, -0.04361233115196228, 0.14094513654708862, -0.09003371745347977, -0.12793415784835815, 0.35078391432762146, -0.0277276411652565, 0.239626944065094, 0.18803852796554565, 0.14742667973041534, 0.009964443743228912, -0.14402644336223602, -0.12269096076488495, 0.2804151773452759, 0.3793874979019165, -0.032302647829055786, 0.1165255531668663, 0.2214987874031067, -0.2776069641113281, -0.18014180660247803, 0.14135131239891052, -0.2764796018600464, -0.5645543336868286, -0.1676938682794571, 0.20176853239536285, -0.039037153124809265, -0.01943565160036087, -0.24032062292099, -0.053874317556619644, 0.35687172412872314, -0.04610501974821091, 0.1374576985836029, -0.3215436339378357, -0.06835512816905975, -0.04300062730908394, 0.09622438997030258, 0.30049026012420654, -0.09309327602386475, -0.10850456357002258, -0.5604637265205383, 0.29987403750419617, -0.06642206758260727, -0.2599172294139862, -0.31183692812919617, 0.15938973426818848, -0.36361825466156006, 0.27717989683151245, 0.36235982179641724, -0.5001001954078674, -0.2899014949798584, -0.07872264832258224, -0.1293277144432068, 0.41503915190696716, 0.0940621942281723, -0.18391963839530945, 0.2706872820854187, -0.26144903898239136, -0.11398985981941223, -0.24251477420330048, -0.4982536733150482, -0.10735591500997543, -0.19786429405212402, -0.0011878050863742828, 0.38336998224258423, 0.06498661637306213, 0.3685120940208435, -0.26401156187057495, 0.19883021712303162, 0.25396811962127686, 0.04292846471071243, -0.11364653706550598, 0.049541354179382324, 0.18985234200954437, 0.22559773921966553, -0.058689236640930176, 0.12372812628746033, -0.21385115385055542, -0.43375343084335327, 0.17002856731414795, -0.18621626496315002, 0.05504150316119194, -0.4036819338798523, -0.4727563261985779, -0.337983638048172, 0.07084432244300842, -0.2964734733104706, -0.27753594517707825, 0.03628620505332947, -0.03339266777038574, -0.052979279309511185, -0.08500060439109802, 0.0008829645812511444, -0.12417233735322952, -0.3564131557941437, 0.3598921597003937, 0.058092981576919556, -0.1835436075925827, -0.18322668969631195, -0.06995668262243271, -0.2722541093826294, 0.15837514400482178, 0.28307417035102844, -0.1735776960849762, -0.21332043409347534, 0.22775331139564514, 0.33329156041145325, -0.0209890678524971, -0.27493709325790405, 0.5395735502243042, 0.3640340566635132, 0.01742672547698021, -0.16981180012226105, 0.11856400966644287, -0.14067886769771576, -0.138003408908844, -0.23068004846572876, 0.06821325421333313, -0.20764973759651184, 0.33075833320617676, -0.010280769318342209, -0.11521262675523758, 0.15144158899784088, 0.05752546712756157, -0.16732953488826752, -0.39525580406188965, -0.1256980448961258, -0.27475228905677795, -0.028336208313703537, 0.062176480889320374, 0.17009741067886353, 0.30819955468177795, 0.4491209387779236, 0.45632630586624146, -0.10459322482347488, 0.12779413163661957, -0.19298571348190308, -0.09355353564023972, 0.1554524302482605, 0.37813228368759155, 0.2799789309501648, 0.14112244546413422, 0.01643948256969452, 0.33846598863601685, 0.1400480717420578, -0.10879244655370712, 0.4774751663208008, 0.31825387477874756, 0.1658419668674469, 0.47582826018333435, 0.318049818277359, 0.17663301527500153, -0.11526283621788025, -0.04904737323522568, 0.1006958857178688, 0.2709629535675049, -0.29490354657173157, 0.2232639193534851, -0.4055171608924866, -0.37224823236465454, -0.06783735752105713, -0.4162576496601105, -0.3396754860877991, -0.5190796852111816, 0.30213463306427, 0.11778990924358368, -0.3278951644897461, 0.18067868053913116, -0.2476697415113449, -0.09608869254589081, 0.03395023196935654, -0.1522383987903595, -0.12188977003097534, 0.0645902082324028, -0.25813716650009155, -0.008534183725714684, 0.1556774228811264, -0.41642653942108154, 0.4039626121520996, -0.11760374158620834, 0.1496206820011139, -0.31496307253837585, -0.7408568263053894, 0.24843929708003998, -0.07701932638883591, 0.18346430361270905, 0.4292970299720764, -0.3148035407066345, 0.021578729152679443, -0.2592766284942627, 0.22699984908103943, 0.09086596220731735, 0.1376238763332367, 0.03167426958680153, 0.08502605557441711, 0.1913520246744156, -0.3398468494415283, -0.539755642414093, -0.20052586495876312, -0.16032551229000092, -0.15004272758960724, 0.16500262916088104, 0.0840098112821579, 0.49945345520973206, -0.06462100148200989, -0.260985404253006, -0.23691542446613312, 0.009204537607729435, -0.09386853128671646, -0.07433192431926727, 0.19629092514514923, -0.03983039781451225, -0.07464028894901276, 0.35037413239479065, -0.13912451267242432, 0.5066412091255188, 0.12604102492332458, -0.24088715016841888, -0.15682491660118103, 0.34110721945762634, 0.354021281003952, -0.05662626028060913, -0.3169095516204834, 0.36612775921821594, 0.20366908609867096, 0.03648629039525986, -0.06016787886619568, 0.14167636632919312, 0.18641844391822815, -0.1816583275794983, 0.21060636639595032, -0.36677810549736023, 0.09760071337223053, 0.30183252692222595, 0.30592796206474304, -0.16782985627651215, -0.0497625358402729, 0.252091646194458, -0.20067951083183289, 0.02138964831829071, -0.134863942861557, -0.6103518009185791, -0.07212424278259277, -0.1914786696434021, -0.27377092838287354, 0.1863119900226593, -0.12729737162590027, -0.03076404519379139, 0.19527190923690796, 0.16894656419754028, -0.011831093579530716, -0.33450332283973694, 0.16189807653427124, -0.24118047952651978, 0.20181486010551453, 0.1747642308473587, 0.2280915379524231, -0.2410239577293396, -0.18327674269676208, 0.110542893409729, 0.10329052805900574, 0.3081318438053131, 0.026536550372838974, 0.2159491330385208, -0.3218410909175873, -0.048848412930965424, 0.29123055934906006, 0.3632245659828186, 0.03782692924141884, -0.08779488503932953, 0.06392065435647964, -0.029953189194202423, -0.07495148479938507, 0.43962836265563965, -0.23278944194316864, -0.014469381421804428, 0.39208629727363586, -0.14075827598571777, 0.04037958383560181, -0.20639005303382874, -0.11542527377605438, 0.181002676486969, 0.16225138306617737, 0.46888455748558044, -0.31421592831611633, -0.03196248039603233, 0.3033492863178253, 0.21845723688602448, -0.10877805203199387, 0.1308349072933197, -0.10258661210536957, -0.19235599040985107, -0.2805992066860199, 0.19680051505565643, 0.08575518429279327, 0.32694777846336365, -0.01960667036473751, -0.016772398725152016, 0.03177674487233162, -0.010498929768800735, 0.16387146711349487, 0.2648707330226898, 0.3135114014148712, -0.2611887454986572, 0.2118152529001236, -0.26839348673820496, 0.4072537422180176, 0.726627767086029, 0.4322214722633362, 0.06519680470228195, -0.18432238698005676, -0.018970336765050888, -0.350271075963974, 0.38985109329223633, 0.11543722450733185, -0.127616286277771, 0.2575131058692932, -0.27960824966430664, 0.05425263196229935, -0.1976768672466278, 0.14810308814048767, 0.37953871488571167, -0.17382550239562988, -0.2594433128833771, -0.367885947227478, 0.0777113288640976, 0.26397570967674255, -0.006636515259742737, 0.3888714015483856, 0.03903522714972496, -0.52342689037323, 0.11863882839679718, 0.1450539529323578, 0.8001858592033386, 0.4121471643447876, -0.1915755271911621, 0.19476071000099182, 0.22447670996189117, 0.09110500663518906, -0.46019506454467773, 0.15816743671894073, -0.2717059552669525, -0.15344390273094177, 0.027752162888646126, 0.055697184056043625, 0.4720821976661682, 0.11086633801460266, -0.2156379371881485, 0.07961344718933105, -0.24813348054885864, 0.46915343403816223, -0.15931428968906403, 0.18527700006961823, -0.5069151520729065, -0.26851287484169006, -0.11978016793727875, 0.04911579191684723, -0.07283268868923187, -0.14675895869731903, -0.1670565903186798, -0.02628839761018753, 0.04601838067173958, -0.45855796337127686, -0.18641242384910583, -0.2002388834953308, -0.18898077309131622, -0.15395650267601013, -0.07879795134067535, 0.06194204092025757, 0.3307192027568817, -0.21980783343315125, 0.2294691503047943, 0.29723647236824036, -0.11910784244537354, 0.22144348919391632, -0.04563450813293457, 0.08294705301523209, 0.22139090299606323, -0.17595678567886353, 0.24804861843585968, -0.062278054654598236, 0.12543508410453796, -0.08107028156518936, -0.12463312596082687, -0.16298606991767883, -0.18541663885116577, -0.18453820049762726, 0.6051144599914551, -0.47120338678359985, 0.014668326824903488, -0.22695735096931458, 0.08263374865055084, -0.4440418481826782, 0.0536612942814827, -0.16145269572734833, -0.11651898920536041, 0.16193418204784393, -0.24145667254924774, -0.20387062430381775, -0.16000643372535706, 0.055460456758737564, 0.047820039093494415, -0.09632053971290588, 0.397977739572525, -0.09893697500228882, -0.1335570514202118, -0.22923117876052856, -0.028991609811782837, 0.18882864713668823, -0.5756086707115173, 0.10933773964643478, 0.06648574024438858, -0.04550924897193909, -0.023573528975248337, 0.40116631984710693, 0.08634771406650543, 0.11726176738739014, -0.08206610381603241, -0.32885608077049255, -0.248051717877388, 0.09233009070158005, 0.04303582385182381, 0.09857521951198578, -0.10089603811502457, 0.07362000644207001, -0.14335227012634277, 0.1773628145456314, -0.24307619035243988, -0.06377075612545013, -0.03915155678987503, 0.197244331240654, -0.19921500980854034, 0.11105066537857056, -0.023224275559186935, -0.19654449820518494, -0.0029945634305477142, 0.18980911374092102, 0.005776918493211269, -0.07914239913225174, -0.15694314241409302, 0.2112520933151245, 0.020480185747146606, 0.1821603626012802, 0.2190771996974945, 0.1740819215774536, -0.05877203866839409, -0.12206044793128967, 0.24855175614356995, -0.09442181885242462, 0.12580928206443787, -0.03438238427042961, 0.23733992874622345, 0.22726652026176453, -0.1735205352306366, -0.06324421614408493, -0.0681631863117218, 0.3235388398170471, -0.06650614738464355, 0.24776028096675873, -0.16000214219093323, -0.08534848690032959, -0.030544735491275787, 0.1990433782339096, -0.05618120729923248, -0.11655431240797043, 0.3627637028694153, -0.2627105712890625, 0.11603830754756927, 0.36004436016082764, 0.2566097378730774, 0.16750016808509827, -0.24311842024326324, -0.014463833533227444, -0.025223635137081146, 0.186610147356987, -0.2930409610271454, -0.14722806215286255, 0.1264132261276245, -0.12743645906448364, 0.08232167363166809, 0.5224337577819824, 0.6653685569763184, -0.07328632473945618, 0.17590917646884918, 0.06789576262235641, 0.8685907125473022, -0.14643172919750214, 0.33436137437820435, 0.7550758719444275, -0.2798931896686554, 0.1776982992887497, 0.2474987506866455, 0.052910998463630676, 0.13755963742733002, 0.3602348566055298, -0.20742973685264587, 0.6691176295280457, 0.5490685701370239, -0.3221607804298401, 0.11353416740894318, -0.31972047686576843, 0.2606498599052429, 0.17391538619995117, 0.2225126326084137, 0.08612115681171417, 0.18147012591362, 0.1143549382686615, 0.08865415304899216, -0.469240665435791, -0.10428041219711304, 0.19619953632354736, -0.2581463158130646, 0.15726009011268616, 0.013672132045030594, -0.31539222598075867, -0.5290755033493042, 0.08691070973873138, -0.07076817750930786, -0.1452479213476181, 0.13954854011535645, -0.15138967335224152, -0.36555540561676025, -0.12866197526454926, -0.06324373930692673, 0.008228547871112823, 0.25471043586730957, -0.3895726203918457, 0.27087268233299255, 0.37426453828811646, -0.21278297901153564, 0.17644131183624268, 0.11819594353437424, 0.48058634996414185, 0.13405662775039673, 0.17199034988880157, -0.19565995037555695, -0.25079578161239624, -0.08364466577768326, 0.043011341243982315, 0.27257558703422546, -0.16126686334609985, 0.19400903582572937, 0.1253460794687271, 0.06110221892595291, -0.14538991451263428, -0.02157270535826683, 0.15185554325580597, 0.129502072930336, -0.0758584588766098, 0.2887372076511383, 0.28260350227355957, 0.07102864235639572, -0.12000438570976257, 0.1136229932308197, -0.2319616973400116, -0.28845757246017456, 0.5546862483024597, 0.32445043325424194, 0.19622802734375, -0.3049542307853699, 0.06906139850616455, 0.1938880831003189, 0.15922598540782928, 0.2849513590335846, -0.3145405650138855, -0.26213589310646057, -0.042496345937252045, -0.6376393437385559, 0.1383615881204605, -0.06098984554409981, -0.14544767141342163, 0.4037162959575653, -0.07230954617261887, 0.13648001849651337, 0.0812714546918869, 0.30853527784347534, 0.20470136404037476, 0.4365633428096771, 0.10807935893535614, -0.024281099438667297, 0.016465740278363228, 0.15391822159290314, -0.18984591960906982, -0.029233653098344803, -0.21141180396080017, 0.2117852121591568, -0.4118195176124573, 0.01927950233221054, -0.10064401477575302, -0.2203870713710785, 0.3989226520061493, 0.09031575918197632, 0.49343979358673096, 0.04684099182486534, 0.25208616256713867, -0.09620510786771774, -0.12337259948253632, -0.3604346811771393, -0.06038493290543556, -0.2937452793121338, 0.3651174008846283, -0.03574522212147713, 0.35134628415107727, -0.05543048679828644, -0.24722503125667572, -0.3697521388530731, 0.04008429870009422, 0.03636480122804642, -0.11577500402927399, -0.2941085398197174, 0.29275426268577576, -0.18157711625099182, 0.28770628571510315, 0.0763632208108902, 0.039481908082962036, 0.15255926549434662, 0.21007920801639557, -0.18767008185386658, -0.592058002948761, 0.5737797021865845, -0.1900591403245926, -0.35464316606521606, -0.417717307806015, 0.3276606798171997, 0.13192787766456604, -0.18862172961235046, -0.6175738573074341, -0.2775546908378601, 0.4226588308811188, 0.024939749389886856, -0.04034589231014252, 0.1850893646478653, 0.0946732759475708, -0.08416712284088135, -0.08733682334423065, 0.016686681658029556, 0.021702712401747704, 0.12898676097393036, 0.09182776510715485, -0.19657959043979645 ]
https://github.com/huggingface/datasets/issues/2440
Remove `extended` field from dataset tagger
Thanks for reporting. Indeed the `extended` tag doesn't exist. Not sure why we had that in the tagger. The repo of the tagger is here if someone wants to give this a try: https://github.com/huggingface/datasets-tagging Otherwise I can probably fix it next week
## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite
42
Remove `extended` field from dataset tagger ## Describe the bug While working on #2435 I used the [dataset tagger](https://huggingface.co/datasets/tagging/) to generate the missing tags for the YAML metadata of each README.md file. However, it seems that our CI raises an error when the `extended` field is included: ``` dataset_name = 'arcd' @pytest.mark.parametrize("dataset_name", get_changed_datasets(repo_path)) def test_changed_dataset_card(dataset_name): card_path = repo_path / "datasets" / dataset_name / "README.md" assert card_path.exists() error_messages = [] try: ReadMe.from_readme(card_path) except Exception as readme_error: error_messages.append(f"The following issues have been found in the dataset cards:\nREADME:\n{readme_error}") try: DatasetMetadata.from_readme(card_path) except Exception as metadata_error: error_messages.append( f"The following issues have been found in the dataset cards:\nYAML tags:\n{metadata_error}" ) if error_messages: > raise ValueError("\n".join(error_messages)) E ValueError: The following issues have been found in the dataset cards: E YAML tags: E __init__() got an unexpected keyword argument 'extended' tests/test_dataset_cards.py:70: ValueError ``` Consider either removing this tag from the tagger or including it as part of the validation step in the CI. cc @yjernite Thanks for reporting. Indeed the `extended` tag doesn't exist. Not sure why we had that in the tagger. The repo of the tagger is here if someone wants to give this a try: https://github.com/huggingface/datasets-tagging Otherwise I can probably fix it next week
[ 0.00031315162777900696, -0.09879451245069504, -0.003311268985271454, 0.19121289253234863, 0.42418813705444336, 0.40578022599220276, 0.3773062825202942, 0.23212505877017975, 0.11827541887760162, 0.28089913725852966, 0.3130052983760834, 0.42946338653564453, -0.29180100560188293, 0.0003110840916633606, -0.09628177434206009, 0.05192755535244942, 0.219272643327713, -0.06988199055194855, 0.29055240750312805, 0.14988954365253448, -0.18671908974647522, -0.10429547727108002, -0.021701831370592117, -0.22404752671718597, -0.26873454451560974, -0.004139391705393791, -0.15221503376960754, -0.00043285638093948364, -0.19240804016590118, -0.6609169840812683, 0.3868146240711212, 0.07121152430772781, -0.03973039984703064, 0.1408301591873169, -0.00011846779671031982, -0.1125505119562149, 0.243877574801445, -0.0025304295122623444, -0.1776149570941925, -0.2817545533180237, -0.007693123072385788, 0.03831735998392105, 0.12093552201986313, -0.1555962711572647, 0.1453632414340973, -0.19537664949893951, -0.3327723741531372, -0.2186891734600067, 0.11786321550607681, 0.34513381123542786, 0.12463268637657166, -0.09149729460477829, -0.20983831584453583, -0.18903405964374542, 0.33942222595214844, 0.09093187749385834, -0.09668828547000885, 0.09024868905544281, 0.5893577337265015, 0.3097764253616333, 0.0236051008105278, 0.4658856987953186, -0.04669584333896637, -0.05354831740260124, 0.31910228729248047, -0.18110375106334686, 0.3747122883796692, -0.24245604872703552, 0.20497313141822815, -0.09112394601106644, 0.3223923146724701, -0.40566813945770264, -0.1556638926267624, -0.5504030585289001, -0.0075732143595814705, -0.5235105752944946, 0.3982800543308258, -0.23340529203414917, -0.024390436708927155, -0.09129364788532257, -0.2531796395778656, -0.2212178260087967, -0.04759799316525459, 0.05591244623064995, -0.3510916531085968, 0.40752753615379333, 0.17351478338241577, 0.06536828726530075, 0.14310190081596375, -0.0861210897564888, 0.0207507461309433, 0.08461499959230423, -0.1744772046804428, 0.033796314150094986, 0.0334298200905323, -0.13153667747974396, -0.10242757946252823, -0.1374257504940033, 0.12565350532531738, 0.37399834394454956, -0.2233780175447464, -0.009490888565778732, 0.20222793519496918, 0.1453486680984497, 0.3432418406009674, -0.03944108635187149, 0.06467551738023758, 0.3392271101474762, 0.041091494262218475, 0.19742529094219208, -0.046831708401441574, -0.11008966714143753, 0.06272298097610474, -0.04497949033975601, 0.4439445436000824, 0.19497418403625488, 0.29842454195022583, -0.29265648126602173, -0.19702951610088348, 0.09699162095785141, -0.3704858422279358, 0.14517037570476532, 0.13440212607383728, 0.126731738448143, 0.05404336377978325, -0.10255669802427292, -0.31160032749176025, 0.31160110235214233, 0.1424890011548996, -0.011359699070453644, -0.034074682742357254, 0.15318892896175385, -0.1016092300415039, -0.10600581020116806, 0.4092150032520294, -0.08655017614364624, 0.2645276188850403, 0.17235928773880005, 0.13977324962615967, -0.026934659108519554, -0.08553311228752136, -0.0696398913860321, 0.3191281259059906, 0.3765217363834381, -0.037468139082193375, 0.1472158133983612, 0.21454939246177673, -0.2550095319747925, -0.15508726239204407, 0.1358286738395691, -0.30369558930397034, -0.5740446448326111, -0.15603546798229218, 0.1886996328830719, -0.0966339036822319, -0.006122615188360214, -0.19458791613578796, -0.13672511279582977, 0.3593396544456482, -0.05590613931417465, 0.13247250020503998, -0.3022390604019165, -0.11359913647174835, 0.007778249680995941, 0.1532999873161316, 0.31948140263557434, -0.029807914048433304, -0.06567288935184479, -0.5532746315002441, 0.26356208324432373, -0.11939872056245804, -0.261985719203949, -0.3319774270057678, 0.11003687232732773, -0.3611993193626404, 0.23335619270801544, 0.2785123884677887, -0.5548012256622314, -0.23038998246192932, -0.037774574011564255, -0.1724073588848114, 0.4368150532245636, 0.039808548986911774, -0.23580971360206604, 0.2606683671474457, -0.3076127767562866, -0.10314834117889404, -0.22704149782657623, -0.4727638065814972, -0.1627989560365677, -0.27328822016716003, 0.04892660677433014, 0.3657881021499634, 0.05669694021344185, 0.24949467182159424, -0.26550668478012085, 0.15011967718601227, 0.21885795891284943, 0.07007071375846863, -0.11653253436088562, 0.06633252650499344, 0.2436310052871704, 0.2496342658996582, -0.002194151282310486, 0.10359425097703934, -0.1965009868144989, -0.40231752395629883, 0.13058426976203918, -0.17836260795593262, 0.023057349026203156, -0.48124098777770996, -0.45917201042175293, -0.3062458634376526, 0.0376051664352417, -0.3534758985042572, -0.33540260791778564, 0.034467197954654694, -0.06308245658874512, -0.07258348166942596, -0.08206498622894287, 0.023466389626264572, -0.14264197647571564, -0.38725924491882324, 0.3070744276046753, 0.008498754352331161, -0.13341346383094788, -0.17110568284988403, -0.04227385297417641, -0.23890173435211182, 0.1958133429288864, 0.3363584280014038, -0.18972095847129822, -0.21880435943603516, 0.25989365577697754, 0.3583892583847046, -0.08791212737560272, -0.19849035143852234, 0.5692499279975891, 0.34283125400543213, -0.10012048482894897, -0.13229334354400635, 0.13853147625923157, -0.15581245720386505, -0.12787535786628723, -0.28621748089790344, 0.08955145627260208, -0.23828868567943573, 0.3804143965244293, -0.013192776590585709, -0.028768830001354218, 0.2370092272758484, 0.05626841261982918, -0.2296646535396576, -0.4293047785758972, -0.12309430539608002, -0.23355363309383392, -0.056445710361003876, 0.001982366666197777, 0.13896363973617554, 0.34405404329299927, 0.39594873785972595, 0.4019797146320343, -0.16737741231918335, 0.10143871605396271, -0.19102120399475098, -0.10446550697088242, 0.16079390048980713, 0.3864333927631378, 0.24569851160049438, 0.12848570942878723, -0.022931601852178574, 0.33208271861076355, 0.14048346877098083, -0.110407255589962, 0.4423739016056061, 0.2740824818611145, 0.16903236508369446, 0.44386935234069824, 0.2920730710029602, 0.16198217868804932, -0.057094912976026535, -0.09974771738052368, 0.12826739251613617, 0.2701999843120575, -0.3040612041950226, 0.22501727938652039, -0.43460628390312195, -0.38083091378211975, -0.10633834451436996, -0.4021804928779602, -0.3194594383239746, -0.5558400750160217, 0.2902687191963196, 0.0936848521232605, -0.30650046467781067, 0.28066277503967285, -0.18720795214176178, -0.11698697507381439, 0.006309753283858299, -0.1769813895225525, -0.14441907405853271, 0.014543622732162476, -0.20735594630241394, -0.01718919910490513, 0.19013488292694092, -0.3280119001865387, 0.3918941915035248, -0.08014188706874847, 0.15112058818340302, -0.4546271562576294, -0.6928059458732605, 0.24211107194423676, -0.12028783559799194, 0.2134217917919159, 0.43480929732322693, -0.3150671720504761, 0.05092741549015045, -0.26413825154304504, 0.2383200079202652, -0.008995470590889454, 0.15185803174972534, 0.03070162981748581, 0.08897501230239868, 0.15766465663909912, -0.2906532287597656, -0.543626070022583, -0.16081911325454712, -0.11358131468296051, -0.120760977268219, 0.12973257899284363, 0.055820681154727936, 0.48895901441574097, -0.05848357081413269, -0.20235736668109894, -0.30876728892326355, -0.007836427539587021, -0.10233982652425766, -0.14423421025276184, 0.13790298998355865, -0.09202727675437927, -0.10642696917057037, 0.41923755407333374, -0.09545716643333435, 0.5402064919471741, 0.10764056444168091, -0.21991030871868134, -0.15655462443828583, 0.3927103877067566, 0.42411133646965027, -0.05690997838973999, -0.3841506242752075, 0.3486681580543518, 0.21057261526584625, 0.044372960925102234, -0.06488978862762451, 0.1158829778432846, 0.20749811828136444, -0.20825976133346558, 0.23259329795837402, -0.3750932514667511, 0.08650167286396027, 0.2408459484577179, 0.35121625661849976, -0.14255592226982117, -0.014541547745466232, 0.18669475615024567, -0.21682457625865936, -0.00016151368618011475, -0.1665424108505249, -0.5890367031097412, -0.13975463807582855, -0.17330598831176758, -0.24272245168685913, 0.17312464118003845, -0.14619019627571106, -0.037596262991428375, 0.17742426693439484, 0.17350821197032928, -0.002955719828605652, -0.34570130705833435, 0.13092000782489777, -0.25589364767074585, 0.2480556070804596, 0.19157636165618896, 0.2138005495071411, -0.22688233852386475, -0.1946485936641693, 0.12268534302711487, 0.10724597424268723, 0.3399101495742798, 0.002674416173249483, 0.1989869624376297, -0.3184274137020111, -0.03410487622022629, 0.3035736083984375, 0.3770939111709595, 0.11479483544826508, -0.08632495999336243, 0.08642035722732544, -0.007130160927772522, -0.09621468931436539, 0.4647536873817444, -0.26938846707344055, 0.04216984286904335, 0.439136266708374, -0.19763433933258057, 0.01124831847846508, -0.21056324243545532, -0.13832315802574158, 0.17648300528526306, 0.08706559240818024, 0.5664540529251099, -0.22836416959762573, -0.1016433984041214, 0.3886186480522156, 0.22485123574733734, -0.09957502782344818, 0.09205301851034164, -0.09264138340950012, -0.24249577522277832, -0.27010461688041687, 0.16230666637420654, 0.08105677366256714, 0.29584643244743347, -0.07566804438829422, -0.043492674827575684, 0.07183726876974106, 0.042428262531757355, 0.10506381839513779, 0.23452551662921906, 0.31288084387779236, -0.2771996259689331, 0.25015008449554443, -0.21370884776115417, 0.40787002444267273, 0.6896815299987793, 0.41124844551086426, -0.0722137987613678, -0.16401514410972595, -0.06567692756652832, -0.4268176257610321, 0.35828378796577454, 0.12913037836551666, -0.13795167207717896, 0.31082889437675476, -0.2520996332168579, 0.005910538136959076, -0.15667735040187836, 0.09536915272474289, 0.3929435908794403, -0.09930629283189774, -0.26285162568092346, -0.4332616627216339, 0.05459665507078171, 0.273593544960022, 0.008202828466892242, 0.38601869344711304, -0.006482087075710297, -0.43961507081985474, 0.12772178649902344, 0.1599193513393402, 0.8890962600708008, 0.3560687303543091, -0.17397360503673553, 0.1735224723815918, 0.22801832854747772, 0.10160479694604874, -0.5014357566833496, 0.1365296095609665, -0.266791433095932, -0.2394106239080429, 0.032122448086738586, 0.05065483972430229, 0.4719643294811249, 0.050056036561727524, -0.21754835546016693, 0.0857047289609909, -0.2600219249725342, 0.47880518436431885, -0.12539339065551758, 0.2223036289215088, -0.4344598054885864, -0.23903074860572815, -0.1349332481622696, 0.05853073298931122, -0.07945477962493896, -0.16763770580291748, -0.16149699687957764, -0.03756468743085861, 0.052819181233644485, -0.46399784088134766, -0.16720996797084808, -0.12681853771209717, -0.13545049726963043, -0.09527711570262909, -0.09860843420028687, 0.06751544773578644, 0.36943677067756653, -0.2576720118522644, 0.2425062507390976, 0.28257060050964355, -0.166312575340271, 0.2520096004009247, 0.02066155895590782, 0.008070639334619045, 0.15927474200725555, -0.1857248842716217, 0.2694399952888489, -0.10887512564659119, 0.08106053620576859, -0.055309563875198364, -0.1282544732093811, -0.15889811515808105, -0.1465979665517807, -0.19830836355686188, 0.6032131314277649, -0.441547155380249, 0.016625486314296722, -0.1621675193309784, 0.05220651254057884, -0.47354957461357117, 0.07477478682994843, -0.17013143002986908, -0.1794591248035431, 0.11204494535923004, -0.24981291592121124, -0.20684215426445007, -0.11449170112609863, 0.09620153158903122, 0.024283314123749733, -0.13138243556022644, 0.46999484300613403, -0.037703000009059906, -0.10129312425851822, -0.2787187397480011, -0.02800874039530754, 0.1924140900373459, -0.616658091545105, 0.16062217950820923, 0.1137126162648201, 0.05176442861557007, -0.0011959432158619165, 0.45177382230758667, 0.03324475884437561, 0.10490721464157104, -0.09145323187112808, -0.33057379722595215, -0.24692678451538086, 0.051120102405548096, 0.012712247669696808, 0.08420952409505844, -0.09043590724468231, 0.17688889801502228, -0.12973551452159882, 0.13521680235862732, -0.2654191255569458, -0.005698780529201031, -0.08737923949956894, 0.20006096363067627, -0.12785270810127258, 0.06129845231771469, -0.0018436191603541374, -0.1975073665380478, 0.018511949107050896, 0.18835404515266418, -0.004669874906539917, -0.09467794001102448, -0.1496199667453766, 0.20908533036708832, 0.0016975663602352142, 0.18340462446212769, 0.2538033127784729, 0.18210887908935547, -0.07982274889945984, -0.10731814056634903, 0.20555366575717926, -0.04537825658917427, 0.15517421066761017, 0.012437489815056324, 0.26309674978256226, 0.23165041208267212, -0.24438394606113434, -0.07066070288419724, -0.08227796852588654, 0.2896992266178131, -0.06469689309597015, 0.20605337619781494, -0.2416510134935379, -0.09960775077342987, -0.006517474073916674, 0.20777729153633118, -0.11569803953170776, -0.06703522056341171, 0.39261260628700256, -0.2521970868110657, 0.1110122799873352, 0.3472045958042145, 0.2288525402545929, 0.20763488113880157, -0.30326756834983826, -0.026495451107621193, -0.0016689393669366837, 0.18507811427116394, -0.27085182070732117, -0.10503359138965607, 0.17755231261253357, -0.12480368465185165, 0.058412883430719376, 0.4639504849910736, 0.6760464906692505, -0.11835295706987381, 0.1980181336402893, 0.07461287081241608, 0.8444789052009583, -0.2484196275472641, 0.3639238476753235, 0.7368879914283752, -0.20643065869808197, 0.15315380692481995, 0.16912080347537994, 0.08381976932287216, 0.09748797863721848, 0.3269811272621155, -0.24334421753883362, 0.6369723677635193, 0.5483298301696777, -0.28067389130592346, 0.1314944177865982, -0.3452029228210449, 0.32146379351615906, 0.1574702113866806, 0.20070508122444153, 0.12414159625768661, 0.1072479635477066, 0.21551036834716797, 0.07064121216535568, -0.43820786476135254, -0.11553213000297546, 0.24469327926635742, -0.2183021903038025, 0.1294458657503128, 0.02938908338546753, -0.2767000198364258, -0.5507521629333496, 0.10267585515975952, -0.06009150668978691, -0.11930021643638611, 0.10656163841485977, -0.12506604194641113, -0.36609816551208496, -0.16285353899002075, -0.02419571578502655, 0.0017179474234580994, 0.25604772567749023, -0.34037309885025024, 0.25004246830940247, 0.3928295373916626, -0.18838903307914734, 0.16986621916294098, 0.03636666014790535, 0.44134920835494995, 0.09432859718799591, 0.20494931936264038, -0.1747896671295166, -0.266033798456192, -0.057944439351558685, 0.14275473356246948, 0.30778688192367554, -0.10791710019111633, 0.2048000544309616, 0.15202593803405762, 0.06307865679264069, -0.1380065530538559, -0.051498886197805405, 0.19394929707050323, 0.2117462158203125, -0.03839567303657532, 0.22151899337768555, 0.33441877365112305, 0.027960017323493958, -0.18960125744342804, 0.13485199213027954, -0.2584945261478424, -0.2611374258995056, 0.5472010970115662, 0.361783504486084, 0.16231924295425415, -0.2242136001586914, 0.07378203421831131, 0.1545419991016388, 0.1596468985080719, 0.28707611560821533, -0.2660984396934509, -0.3241264820098877, -0.08684899657964706, -0.5948206186294556, 0.1610310673713684, -0.06577639281749725, -0.1399638056755066, 0.368926078081131, -0.07424481213092804, 0.09757568687200546, 0.04777185618877411, 0.28933048248291016, 0.18383827805519104, 0.39296284317970276, 0.08172261714935303, -0.0025132782757282257, 0.016483940184116364, 0.20305806398391724, -0.16962403059005737, -0.008499817922711372, -0.16751116514205933, 0.14125342667102814, -0.3266458809375763, 0.012720026075839996, -0.0809667780995369, -0.28278815746307373, 0.39165425300598145, 0.07674997299909592, 0.4173835515975952, 0.047437168657779694, 0.2677132487297058, -0.06136700138449669, -0.14507035911083221, -0.3603585660457611, -0.08936968445777893, -0.2728501856327057, 0.37689530849456787, 0.02066616900265217, 0.25329604744911194, -0.04036020487546921, -0.19498541951179504, -0.4056090712547302, 0.0496126227080822, 0.014927003532648087, -0.12891675531864166, -0.350237101316452, 0.265926718711853, -0.14789119362831116, 0.30555427074432373, 0.06788184493780136, 0.06937839835882187, 0.15843357145786285, 0.19786331057548523, -0.2647053599357605, -0.5059026479721069, 0.6478751301765442, -0.18157626688480377, -0.32305407524108887, -0.36159321665763855, 0.353163480758667, 0.08317069709300995, -0.19007077813148499, -0.6228546500205994, -0.32559046149253845, 0.423550546169281, 0.01985006593167782, -0.09010966122150421, 0.20492109656333923, 0.0926019698381424, -0.022499805316329002, -0.07973349839448929, 0.00003238767385482788, 0.07590585947036743, 0.183848574757576, 0.08895599842071533, -0.1694914698600769 ]
https://github.com/huggingface/datasets/issues/2434
Extend QuestionAnsweringExtractive template to handle nested columns
this is also the case for the following datasets and configurations: * `mlqa` with config `mlqa-translate-train.ar`
Currently the `QuestionAnsweringExtractive` task template and `preprare_for_task` only support "flat" features. We should extend the functionality to cover QA datasets like: * `iapp_wiki_qa_squad` * `parsinlu_reading_comprehension` where the nested features differ with those from `squad` and trigger an `ArrowNotImplementedError`: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) <ipython-input-12-50e5b8f69c20> in <module> ----> 1 ds.prepare_for_task("question-answering-extractive")[0] ~/git/datasets/src/datasets/arrow_dataset.py in prepare_for_task(self, task) 1436 # We found a template so now flush `DatasetInfo` to skip the template update in `DatasetInfo.__post_init__` 1437 dataset.info.task_templates = None -> 1438 dataset = dataset.cast(features=template.features) 1439 return dataset 1440 ~/git/datasets/src/datasets/arrow_dataset.py in cast(self, features, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, num_proc) 977 format = self.format 978 dataset = self.with_format("arrow") --> 979 dataset = dataset.map( 980 lambda t: t.cast(schema), 981 batched=True, ~/git/datasets/src/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) 1600 1601 if num_proc is None or num_proc == 1: -> 1602 return self._map_single( 1603 function=function, 1604 with_indices=with_indices, ~/git/datasets/src/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 176 } 177 # apply actual function --> 178 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 179 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 180 # re-apply format to the output ~/git/datasets/src/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 ~/git/datasets/src/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) 1940 ) # Something simpler? 1941 try: -> 1942 batch = apply_function_on_filtered_inputs( 1943 batch, 1944 indices, ~/git/datasets/src/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1836 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1837 processed_inputs = ( -> 1838 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1839 ) 1840 if update_data is None: ~/git/datasets/src/datasets/arrow_dataset.py in <lambda>(t) 978 dataset = self.with_format("arrow") 979 dataset = dataset.map( --> 980 lambda t: t.cast(schema), 981 batched=True, 982 batch_size=batch_size, ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/compute.py in cast(arr, target_type, safe) 241 else: 242 options = CastOptions.unsafe(target_type) --> 243 return call_function("cast", [arr], options) 244 245 ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from struct<answer_end: list<item: int32>, answer_start: list<item: int32>, text: list<item: string>> to struct using function cast_struct ```
16
Extend QuestionAnsweringExtractive template to handle nested columns Currently the `QuestionAnsweringExtractive` task template and `preprare_for_task` only support "flat" features. We should extend the functionality to cover QA datasets like: * `iapp_wiki_qa_squad` * `parsinlu_reading_comprehension` where the nested features differ with those from `squad` and trigger an `ArrowNotImplementedError`: ``` --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) <ipython-input-12-50e5b8f69c20> in <module> ----> 1 ds.prepare_for_task("question-answering-extractive")[0] ~/git/datasets/src/datasets/arrow_dataset.py in prepare_for_task(self, task) 1436 # We found a template so now flush `DatasetInfo` to skip the template update in `DatasetInfo.__post_init__` 1437 dataset.info.task_templates = None -> 1438 dataset = dataset.cast(features=template.features) 1439 return dataset 1440 ~/git/datasets/src/datasets/arrow_dataset.py in cast(self, features, batch_size, keep_in_memory, load_from_cache_file, cache_file_name, writer_batch_size, num_proc) 977 format = self.format 978 dataset = self.with_format("arrow") --> 979 dataset = dataset.map( 980 lambda t: t.cast(schema), 981 batched=True, ~/git/datasets/src/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) 1600 1601 if num_proc is None or num_proc == 1: -> 1602 return self._map_single( 1603 function=function, 1604 with_indices=with_indices, ~/git/datasets/src/datasets/arrow_dataset.py in wrapper(*args, **kwargs) 176 } 177 # apply actual function --> 178 out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs) 179 datasets: List["Dataset"] = list(out.values()) if isinstance(out, dict) else [out] 180 # re-apply format to the output ~/git/datasets/src/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 ~/git/datasets/src/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) 1940 ) # Something simpler? 1941 try: -> 1942 batch = apply_function_on_filtered_inputs( 1943 batch, 1944 indices, ~/git/datasets/src/datasets/arrow_dataset.py in apply_function_on_filtered_inputs(inputs, indices, check_same_num_examples, offset) 1836 effective_indices = [i + offset for i in indices] if isinstance(indices, list) else indices + offset 1837 processed_inputs = ( -> 1838 function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs) 1839 ) 1840 if update_data is None: ~/git/datasets/src/datasets/arrow_dataset.py in <lambda>(t) 978 dataset = self.with_format("arrow") 979 dataset = dataset.map( --> 980 lambda t: t.cast(schema), 981 batched=True, 982 batch_size=batch_size, ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.Table.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/table.pxi in pyarrow.lib.ChunkedArray.cast() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/compute.py in cast(arr, target_type, safe) 241 else: 242 options = CastOptions.unsafe(target_type) --> 243 return call_function("cast", [arr], options) 244 245 ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.call_function() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/_compute.pyx in pyarrow._compute.Function.call() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status() ~/miniconda3/envs/datasets/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status() ArrowNotImplementedError: Unsupported cast from struct<answer_end: list<item: int32>, answer_start: list<item: int32>, text: list<item: string>> to struct using function cast_struct ``` this is also the case for the following datasets and configurations: * `mlqa` with config `mlqa-translate-train.ar`
[ -0.400498628616333, -0.337433397769928, -0.07841569185256958, 0.21249406039714813, 0.0623004212975502, -0.060539890080690384, 0.3427183926105499, 0.6537573933601379, 0.278790146112442, 0.1644308716058731, -0.3850087523460388, 0.8013220429420471, 0.0938057079911232, 0.11165239661931992, -0.22403061389923096, -0.14656390249729156, 0.028561629354953766, 0.19052714109420776, -0.06909406185150146, 0.10114876925945282, -0.3178846836090088, 0.1934884637594223, -0.20121817290782928, 0.10280663520097733, 0.2194109410047531, -0.22825294733047485, -0.035339027643203735, 0.0884830504655838, 0.21855966746807098, -0.10916340351104736, 0.3539470136165619, 0.271041601896286, 0.06407833844423294, -0.01684127002954483, -0.00011182507296325639, -0.023893047124147415, -0.07580618560314178, -0.053145915269851685, -0.21266555786132812, 0.13476745784282684, -0.22129970788955688, -0.25789135694503784, 0.037570156157016754, -0.31218212842941284, -0.19006577134132385, -0.20977246761322021, -0.07425516098737717, -0.029489649459719658, 0.4723314046859741, -0.013534193858504295, 0.17077594995498657, 0.35339978337287903, 0.22694669663906097, -0.12447977811098099, 0.12674345076084137, -0.09338176250457764, -0.4431978166103363, -0.07823009788990021, 0.5466848611831665, 0.030041491612792015, 0.01693926751613617, 0.3652408719062805, -0.03437136858701706, 0.10791493952274323, 0.023896362632513046, -0.052859723567962646, 0.32863450050354004, -0.12300020456314087, 0.011109543964266777, 0.4290258586406708, -0.02170807123184204, -0.18743959069252014, -0.20824034512043, -0.3809452950954437, 0.012356026098132133, -0.2188030481338501, -0.00934554636478424, -0.23224879801273346, -0.33288994431495667, 0.18136219680309296, 0.36154288053512573, -0.46552300453186035, -0.34316664934158325, -0.09211581945419312, 0.06443274021148682, 0.31150561571121216, 0.0014116098172962666, -0.07993712276220322, -0.14018815755844116, -0.15109942853450775, 0.1287170797586441, -0.009626712650060654, -0.029648717492818832, 0.15763434767723083, -0.5099648237228394, -0.4060969948768616, 0.10717055201530457, -0.5747673511505127, 0.11264801770448685, 0.3861798644065857, 0.49892279505729675, 0.17354688048362732, 0.027956943958997726, 0.20694607496261597, 0.15082885324954987, 0.19819894433021545, 0.08593281358480453, 0.19236677885055542, -0.05986543744802475, 0.5967299342155457, -0.10924600064754486, -0.19339680671691895, -0.11672544479370117, -0.08518293499946594, 0.14923998713493347, 0.08388885855674744, 0.5520026683807373, -0.0021329261362552643, -0.3467593491077423, 0.0427200049161911, 0.0344921350479126, -0.07304689288139343, -0.232200488448143, 0.12890364229679108, 0.026929087936878204, 0.2737084627151489, -0.41610217094421387, 0.33546197414398193, -0.10774382203817368, 0.03157427906990051, -0.018787931650877, -0.17108741402626038, 0.25399085879325867, 0.31461822986602783, 0.11201858520507812, 0.13116800785064697, 0.052548713982105255, -0.043061934411525726, 0.4304717779159546, -0.047894954681396484, 0.20824898779392242, 0.039906807243824005, 0.19745320081710815, 0.110801100730896, -0.25319141149520874, -0.2853098213672638, 0.22291696071624756, -0.012601517140865326, -0.10322459042072296, 0.3345329463481903, -0.18716967105865479, -0.27165499329566956, -0.2834218442440033, 0.13542677462100983, -0.14754483103752136, -0.018650852143764496, -0.015272438526153564, 0.35220617055892944, 0.1309853345155716, -0.11894857883453369, 0.2892559766769409, -0.1386580467224121, -0.12655147910118103, -0.21780052781105042, 0.2230333387851715, -0.09894348680973053, -0.24817265570163727, 0.03408196568489075, -0.2819127142429352, 0.007751617580652237, -0.1541355848312378, 0.13808973133563995, 0.11559920758008957, 0.19120705127716064, -0.09048681706190109, 0.2903525233268738, 0.13033634424209595, -0.41943302750587463, -0.17167246341705322, 0.14220333099365234, -0.17271798849105835, 0.4925246238708496, 0.09013339877128601, -0.2179708033800125, 0.37182143330574036, -0.1345764845609665, -0.09325690567493439, 0.10102003812789917, -0.07551296055316925, -0.2620014250278473, -0.22813460230827332, -0.276845246553421, 0.05529840290546417, 0.22450567781925201, -0.04048190638422966, -0.02396475523710251, -0.28057861328125, -0.2403593361377716, 0.24653387069702148, -0.21618905663490295, 0.07403752952814102, -0.27270394563674927, 0.6029767990112305, -0.24775241315364838, 0.11034272611141205, -0.5407909750938416, -0.7725882530212402, 0.07967108488082886, -0.34215113520622253, 0.12534895539283752, -0.22140319645404816, -0.1351487785577774, -0.27532610297203064, 0.10952220112085342, -0.38610079884529114, -0.3508320748806, 0.11976465582847595, -0.177839994430542, -0.11925956606864929, -0.3336215913295746, -0.11270065605640411, -0.18881261348724365, 0.13443130254745483, 0.1812630295753479, -0.16930338740348816, 0.08540230989456177, 0.19004392623901367, 0.00971253588795662, -0.02496117353439331, 0.4596464931964874, -0.056981682777404785, 0.029183287173509598, 0.04988940432667732, 0.0980614498257637, 0.042817749083042145, -0.052670642733573914, 0.018058456480503082, -0.12376724183559418, -0.17015677690505981, -0.22581925988197327, 0.04424527287483215, 0.17316260933876038, 0.04198663681745529, -0.06070183217525482, -0.13481375575065613, 0.6354979276657104, 0.22117282450199127, 0.6569625735282898, -0.15596124529838562, -0.12902292609214783, 0.09434953331947327, -0.04983683302998543, -0.06294228881597519, -0.24285829067230225, -0.2287391871213913, 0.2319357991218567, -0.08827497065067291, -0.4189491868019104, -0.3073645234107971, 0.5817816257476807, 0.08106711506843567, 0.13742311298847198, 0.001110278069972992, -0.11100675910711288, -0.06737015396356583, -0.04047288000583649, 0.2542906105518341, -0.23991245031356812, 0.31413784623146057, 0.3139421343803406, -0.06544969975948334, 0.03905446454882622, -0.0922975242137909, -0.09444557875394821, 0.20097675919532776, -0.0393715426325798, -0.10341490805149078, 0.42314237356185913, 0.45797035098075867, -0.26179394125938416, -0.18432661890983582, -0.03962703049182892, -0.15883302688598633, -0.05721740424633026, -0.10928638279438019, 0.01838568039238453, -0.08353815227746964, 0.12030231207609177, -0.011767665855586529, 0.10219290852546692, 0.15707771480083466, -0.27790793776512146, 0.4337155222892761, 0.21681202948093414, -0.27027982473373413, 0.39336445927619934, -0.018181070685386658, 0.4547259211540222, 0.091421939432621, -0.28808268904685974, -0.30843308568000793, -0.3010666072368622, 0.18931162357330322, 0.22799307107925415, -0.10818472504615784, -0.18136896193027496, 0.12647408246994019, 0.13059456646442413, 0.202128067612648, -0.3754139840602875, -0.3695496916770935, 0.08022980391979218, -0.17468439042568207, 0.43589675426483154, -0.0005785301327705383, 0.23245292901992798, -0.03498954698443413, -0.4227186441421509, 0.3027738034725189, 0.35964512825012207, -0.1245284378528595, 0.007156411185860634, -0.05507975071668625, 0.15737612545490265, -0.059869326651096344, -0.5525580644607544, 0.12794652581214905, -0.45976683497428894, 0.3000286817550659, -0.025980349630117416, 0.2484275847673416, 0.02559085562825203, 0.15293802320957184, -0.1002793163061142, -0.3239282965660095, -0.15222850441932678, -0.13227075338363647, 0.1444740891456604, 0.4026343524456024, -0.30672118067741394, 0.08582983911037445, -0.3118068277835846, -0.2724565863609314, 0.4823214113712311, 0.12479553371667862, -0.09172756224870682, -0.17882248759269714, 0.056031227111816406, 0.5228126049041748, 0.11358411610126495, -0.19828248023986816, 0.2239520400762558, 0.1521138995885849, -0.06106109172105789, 0.054688096046447754, 0.2073444426059723, 0.36032330989837646, 0.06016312539577484, -0.06241744011640549, -0.027056872844696045, 0.2810743451118469, -0.13446031510829926, 0.6102379560470581, 0.10613857209682465, 0.6012276411056519, 0.3398064970970154, -0.05280157923698425, 0.11664493381977081, -0.12365991622209549, -0.22036993503570557, 0.1173630803823471, -0.01703476905822754, 0.011972222477197647, 0.23934289813041687, 0.18654313683509827, -0.23661337792873383, 0.10212408006191254, -0.09936773777008057, 0.10556406527757645, -0.47796452045440674, 0.21012045443058014, -0.07254117727279663, 0.3333578407764435, 0.05252543464303017, 0.06940599530935287, -0.3075440227985382, -0.10932884365320206, 0.09986795485019684, -0.01911463588476181, 0.18726611137390137, -0.397030234336853, -0.0782976895570755, -0.266700804233551, -0.1847986876964569, 0.39766407012939453, 0.2287740260362625, 0.16342522203922272, 0.07577274739742279, -0.4814973473548889, 0.04942503944039345, -0.01651017740368843, 0.2341274619102478, -0.09810995310544968, -0.1952940821647644, 0.31372278928756714, -0.0929490178823471, -0.3437933027744293, -0.25014156103134155, -0.2566254734992981, -0.10553665459156036, -0.2314022034406662, 0.748518705368042, -0.5161658525466919, -0.078952856361866, 0.18449431657791138, 0.007181597873568535, -0.3118535876274109, -0.15994733572006226, 0.09131145477294922, -0.20916011929512024, -0.245004802942276, 0.2980211079120636, 0.13312925398349762, 0.3195594251155853, 0.05493924766778946, -0.17451289296150208, -0.2765748202800751, -0.04050470516085625, 0.07796664535999298, 0.4612742066383362, 0.03084510564804077, -0.32430458068847656, 0.17892014980316162, -0.05412294715642929, -0.23054206371307373, -0.04118113964796066, 0.24163858592510223, -0.3083815276622772, -0.32283827662467957, -0.22239047288894653, -0.24646636843681335, 0.3405138850212097, 0.23588548600673676, -0.22080722451210022, 0.4975655972957611, -0.2715386748313904, 0.11510252952575684, -0.005811027251183987, -0.14234717190265656, 0.16117238998413086, 0.21257668733596802, 0.06848511099815369, -0.26080259680747986, 0.15505549311637878, 0.11960265040397644, -0.3288460671901703, 0.024495357647538185, -0.061709582805633545, -0.10905444622039795, 0.1171465665102005, 0.07024349272251129, 0.6974755525588989, 0.30315765738487244, 0.0221202801913023, 0.6793616414070129, -0.1626066267490387, 0.1202453002333641, -0.14934465289115906, 0.05324944481253624, -0.20230421423912048, -0.20831641554832458, 0.09382016956806183, 0.059418078511953354, 0.15321069955825806, 0.22207890450954437, -0.1507146656513214, 0.2946808338165283, -0.007793232798576355, 0.1605760157108307, 0.11853912472724915, -0.07010172307491302, -0.11481577903032303, -0.12142796814441681, -0.268571138381958, 0.019022170454263687, -0.10669000446796417, -0.3126920759677887, 0.15208405256271362, -0.17843526601791382, 0.14983271062374115, -0.14424079656600952, -0.23094996809959412, 0.09501081705093384, -0.20480051636695862, -0.13690149784088135, 0.28752705454826355, -0.5032073855400085, 0.4567983150482178, -0.275756299495697, -0.10875219106674194, -0.11358138918876648, -0.13411560654640198, -0.018542643636465073, 0.22594407200813293, 0.09067267179489136, -0.12441865354776382, -0.22190886735916138, 0.3769586384296417, -0.09286122769117355, -0.07820634543895721, 0.0012886375188827515, 0.07857400923967361, 0.04065706580877304, -0.26154401898384094, 0.25788378715515137, 0.19815684854984283, -0.2064756453037262, -0.2651968002319336, -0.19593504071235657, 0.14224262535572052, -0.47212550044059753, 0.11419139802455902, -0.21257083117961884, -0.06381206959486008, 0.22514167428016663, 0.23770520091056824, -0.12819817662239075, 0.14557185769081116, -0.029327072203159332, 0.3228380084037781, 0.024380967020988464, 0.5570518970489502, 0.1077822893857956, -0.08799910545349121, -0.3893531262874603, -0.09606731683015823, 0.36529991030693054, -0.39255568385124207, 0.4129042327404022, 0.13177114725112915, -0.15983109176158905, -0.14780136942863464, 0.2787013053894043, 0.07472030818462372, -0.13256025314331055, -0.219281405210495, -0.22875182330608368, -0.08149660378694534, 0.38537895679473877, -0.1765209436416626, 0.18502680957317352, 0.08246594667434692, -0.071463942527771, -0.3542011082172394, 0.44596973061561584, -0.3408142924308777, -0.009748464450240135, 0.07251209020614624, -0.03752833604812622, -0.06216442584991455, 0.03811466321349144, 0.2486613541841507, 0.26227670907974243, 0.09626474231481552, 0.049906373023986816, -0.13498622179031372, -0.2726432979106903, -0.1821587234735489, 0.13336718082427979, -0.057010553777217865, 0.07498358190059662, -0.0720609501004219, 0.14337489008903503, 0.016869133338332176, -0.134573295712471, 0.14968563616275787, -0.4678489863872528, -0.012026399374008179, 0.24407042562961578, 0.11795122921466827, 0.023642588406801224, -0.3257216811180115, 0.3457031548023224, 0.0626995712518692, 0.0807148665189743, -0.02211388200521469, -0.001944124698638916, -0.2662562429904938, -0.045721832662820816, 0.21391285955905914, 0.35729506611824036, 0.37490320205688477, 0.19532769918441772, 0.22808024287223816, 0.2977210283279419, -0.3576922118663788, -0.4151347279548645, -0.1824422925710678, 0.2406379133462906, 0.18086424469947815, -0.12920059263706207, -0.12010060995817184, 0.2277163416147232, -0.3833836019039154, 0.09655515849590302, 0.3412318527698517, -0.25444525480270386, 0.36186566948890686, 0.33072301745414734, -0.0065310075879096985, -0.18824830651283264, 0.1555596888065338, 0.19997090101242065, -0.009877498261630535, -0.11162635684013367, -0.051980942487716675, 0.5616605281829834, 0.23583488166332245, -0.05438423529267311, 0.5195075869560242, -0.12141135334968567, 0.24741876125335693, 0.050348930060863495, -0.06185369938611984, 0.145121231675148, 0.4857708215713501, -0.019189495593309402, 0.4051699936389923, 0.0345226489007473, -0.19920843839645386, -0.05641128122806549, 0.3465830087661743, 0.0792788490653038, 0.2575397789478302, 0.4537784457206726, 0.30870723724365234, 0.1058315634727478, -0.04258209466934204, 0.19206635653972626, -0.16519492864608765, -0.34349143505096436, -0.19437050819396973, -0.28010720014572144, -0.20884031057357788, -0.3808354139328003, -0.18244324624538422, -0.19297058880329132, 0.4127456247806549, -0.19612066447734833, 0.18423789739608765, 0.0878349170088768, 0.3296377956867218, 0.23666203022003174, 0.17158082127571106, -0.014072638005018234, 0.342666357755661, 0.4159708023071289, 0.023464061319828033, 0.12760630249977112, 0.4066372513771057, 0.20093855261802673, -0.05996476858854294, -0.3517583906650543, -0.18422958254814148, -0.35211506485939026, -0.18232844769954681, 0.006769716739654541, 0.2215086668729782, -0.1202448159456253, 0.14177802205085754, 0.38048288226127625, 0.12908169627189636, -0.1590757817029953, 0.12624382972717285, 0.1178935244679451, 0.006152386777102947, -0.34111419320106506, 0.3959718346595764, 0.008283939212560654, -0.29341551661491394, 0.1177172064781189, -0.268454372882843, -0.15869051218032837, -0.01551805716007948, 0.12464438378810883, -0.14171454310417175, -0.03748698905110359, -0.010893273167312145, 0.06751440465450287, -0.14794324338436127, 0.280003160238266, 0.1133933961391449, -0.1268409788608551, -0.1358679234981537, 0.08246441185474396, -0.405144065618515, 0.3420466184616089, 0.06837478280067444, -0.17108263075351715, 0.22797103226184845, 0.09641935676336288, 0.14935483038425446, 0.43038028478622437, -0.003787606954574585, -0.047173067927360535, -0.13609959185123444, 0.38100919127464294, -0.8327503800392151, 0.030747517943382263, 0.5487800240516663, 0.053566187620162964, 0.1971007138490677, -0.24808597564697266, 0.020213354378938675, 0.48556822538375854, -0.0476229190826416, 0.12412241846323013, -0.0867307111620903, 0.22546350955963135, -0.36913925409317017, 0.18610171973705292, 0.17313043773174286, 0.12378071248531342, -0.050639744848012924, -0.1343671679496765, -0.02937604859471321, -0.03336568549275398, -0.2019144743680954, 0.1373998373746872, 0.17589975893497467, 0.3460516929626465, 0.03477510064840317, -0.20254787802696228, 0.14359532296657562, 0.23186689615249634, -0.08116589486598969, -0.27451997995376587, -0.18307749927043915, 0.35528671741485596, 0.11647326499223709, -0.1305212825536728, -0.23727542161941528, 0.15302447974681854, 0.14249388873577118, 0.04705935716629028, -0.15310746431350708, -0.5564717650413513, 0.4793989658355713, 0.01705346629023552, -0.601374089717865, 0.100931815803051, 0.15217670798301697, 0.024997007101774216, -0.18624350428581238, -0.4637984335422516, -0.03915860876441002, 0.31386998295783997, -0.01247062161564827, 0.175957590341568, 0.33203911781311035, 0.018872249871492386, -0.012106399983167648, -0.3110933303833008, 0.37362805008888245, 0.18670111894607544, 0.019164973869919777, -0.5798611044883728, -0.2618538439273834 ]
https://github.com/huggingface/datasets/issues/2431
DuplicatedKeysError when trying to load adversarial_qa
Thanks for reporting ! #2433 fixed the issue, thanks @mariosasko :) We'll do a patch release soon of the library. In the meantime, you can use the fixed version of adversarial_qa by adding `script_version="master"` in `load_dataset`
## Describe the bug A clear and concise description of what the bug is. ## Steps to reproduce the bug ```python dataset = load_dataset('adversarial_qa', 'adversarialQA') ``` ## Expected results The dataset should be loaded into memory ## Actual results >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature > > >During handling of the above exception, another exception occurred: > >DuplicatedKeysError Traceback (most recent call last) > >/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) > 347 for hash, key in self.hkey_record: > 348 if hash in tmp_record: >--> 349 raise DuplicatedKeysError(key) > 350 else: > 351 tmp_record.add(hash) > >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.109+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0
36
DuplicatedKeysError when trying to load adversarial_qa ## Describe the bug A clear and concise description of what the bug is. ## Steps to reproduce the bug ```python dataset = load_dataset('adversarial_qa', 'adversarialQA') ``` ## Expected results The dataset should be loaded into memory ## Actual results >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature > > >During handling of the above exception, another exception occurred: > >DuplicatedKeysError Traceback (most recent call last) > >/usr/local/lib/python3.7/dist-packages/datasets/arrow_writer.py in check_duplicate_keys(self) > 347 for hash, key in self.hkey_record: > 348 if hash in tmp_record: >--> 349 raise DuplicatedKeysError(key) > 350 else: > 351 tmp_record.add(hash) > >DuplicatedKeysError: FAILURE TO GENERATE DATASET ! >Found duplicate Key: 4d3cb5677211ee32895ca9c66dad04d7152254d4 >Keys should be unique and deterministic in nature ## Environment info - `datasets` version: 1.7.0 - Platform: Linux-5.4.109+-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyArrow version: 3.0.0 Thanks for reporting ! #2433 fixed the issue, thanks @mariosasko :) We'll do a patch release soon of the library. In the meantime, you can use the fixed version of adversarial_qa by adding `script_version="master"` in `load_dataset`
[ -0.1690555065870285, 0.02453857660293579, 0.017312299460172653, 0.2362535297870636, 0.2499975711107254, -0.2299043834209442, 0.36077383160591125, 0.22385703027248383, 0.05966515466570854, 0.10771903395652771, 0.13624843955039978, 0.5518655776977539, -0.10715997219085693, -0.16836993396282196, 0.16261744499206543, 0.05171917378902435, -0.03796542435884476, 0.1883038580417633, 0.039281751960515976, 0.028760842978954315, -0.3011762797832489, 0.37794503569602966, -0.10124845057725906, 0.3241075277328491, 0.03593511879444122, -0.06791083514690399, -0.10332135856151581, 0.15143047273159027, 0.21377429366111755, -0.4177425801753998, 0.07006839662790298, -0.018709897994995117, -0.11666560918092728, 0.4811597764492035, -0.00010524407844059169, 0.14410284161567688, 0.2889031171798706, 0.10355915129184723, -0.09133696556091309, -0.16006119549274445, 0.01850888878107071, -0.10719812661409378, 0.19125455617904663, -0.19243888556957245, 0.1262390911579132, -0.4752858579158783, 0.01315980777144432, -0.3006715774536133, 0.5054062604904175, 0.12015513330698013, 0.31794676184654236, 0.09031921625137329, 0.26293373107910156, -0.17106489837169647, 0.11951787769794464, -0.18688441812992096, -0.174241840839386, 0.11961899697780609, -0.030359044671058655, 0.037204183638095856, 0.2526727020740509, 0.2869947552680969, -0.010384496301412582, 0.018380181863904, 0.4412294924259186, -0.01517475489526987, 0.2555173337459564, 0.1374567151069641, 0.32109636068344116, 0.34236204624176025, 0.29009759426116943, -0.4888223707675934, -0.2142711579799652, -0.06866850703954697, 0.34862908720970154, -0.237440288066864, 0.23601773381233215, 0.027808837592601776, -0.27091270685195923, -0.05387159809470177, 0.39760759472846985, -0.14725328981876373, -0.043432243168354034, -0.10630510747432709, 0.16026052832603455, 0.12487666308879852, -0.021795835345983505, 0.16934654116630554, 0.32646510004997253, -0.10231976211071014, 0.0459522046148777, 0.031512778252363205, -0.21171602606773376, -0.03381350263953209, -0.4873890280723572, 0.11386454105377197, -0.0784602239727974, -0.0931202843785286, 0.2700698673725128, 0.048495933413505554, 0.5127905011177063, -0.011501915752887726, 0.08257618546485901, 0.12352298200130463, 0.12811361253261566, 0.24941416084766388, 0.1686249077320099, 0.24896512925624847, 0.21128131449222565, 0.09334525465965271, -0.23499347269535065, 0.024732640013098717, -0.08346973359584808, -0.3851998746395111, 0.6409924030303955, 0.05596046894788742, 0.3691558241844177, -0.06365081667900085, -0.24888597428798676, 0.10710438340902328, -0.36690670251846313, -0.059211526066064835, -0.2935503125190735, 0.33916062116622925, 0.1958407461643219, 0.01748897135257721, -0.13584080338478088, 0.2525438070297241, -0.20603257417678833, 0.2294735312461853, -0.21197941899299622, -0.11002789437770844, -0.061904918402433395, -0.11726251989603043, 0.03999992087483406, -0.11785359680652618, 0.2964862585067749, -0.0017152149230241776, -0.0026419833302497864, -0.27034851908683777, 0.3662495017051697, 0.021024717018008232, -0.24169716238975525, 0.25537848472595215, 0.19755949079990387, 0.12918680906295776, 0.04584377631545067, -0.37928932905197144, -0.10681077837944031, 0.09932295978069305, -0.005241192877292633, -0.0512382909655571, -0.012753883376717567, 0.29537010192871094, 0.149700328707695, 0.08622805774211884, -0.012327462434768677, -0.03670154884457588, 0.1766478717327118, -0.07522113621234894, 0.058583639562129974, -0.012180782854557037, -0.16472336649894714, -0.4422149062156677, 0.09684251248836517, 0.47554582357406616, -0.32566407322883606, -0.1278250813484192, -0.32804739475250244, -0.08491013944149017, -0.27837932109832764, 0.23025958240032196, -0.2746445834636688, 0.041355546563863754, -0.20596201717853546, 0.07045900821685791, 0.25425565242767334, -0.4608028829097748, -0.47685176134109497, 0.31876426935195923, -0.30311280488967896, 0.1834324598312378, 0.13639718294143677, 0.15537025034427643, 0.14484934508800507, 0.05808628723025322, -0.01699391007423401, 0.0008211452513933182, 0.16612811386585236, -0.12492449581623077, -0.26741549372673035, -0.38021066784858704, 0.11707483232021332, -0.1609799712896347, 0.041929442435503006, -0.20554864406585693, 0.17786791920661926, -0.4174797236919403, 0.3148239254951477, -0.09830281138420105, 0.022932877764105797, 0.07286509871482849, 0.24749137461185455, -0.061742737889289856, 0.2550157308578491, 0.024097342044115067, -0.30382663011550903, 0.2516423463821411, -0.23276737332344055, -0.16943666338920593, -0.2557510733604431, -0.22665466368198395, -0.2787443697452545, 0.19756300747394562, -0.5176198482513428, -0.1666509211063385, 0.2598503530025482, 0.20489957928657532, -0.11569207906723022, 0.22341997921466827, -0.07291488349437714, 0.07278676331043243, 0.18372602760791779, 0.03108137659728527, -0.21572759747505188, -0.12802590429782867, -0.20334716141223907, -0.0025436673313379288, 0.15910038352012634, 0.16411980986595154, 0.1051015704870224, -0.02113022282719612, -0.03158492594957352, 0.37451258301734924, -0.24198584258556366, 0.18232393264770508, -0.007117073982954025, -0.013489797711372375, 0.07615616172552109, -0.32866430282592773, 0.2699778974056244, 0.14864538609981537, 0.2955453395843506, -0.10448569059371948, 0.29279929399490356, 0.297118604183197, -0.01349727064371109, 0.2014828473329544, -0.036639805883169174, 0.0408821702003479, 0.2538091540336609, -0.165662944316864, 0.06260666251182556, -0.05361936241388321, 0.11300444602966309, 0.010047171264886856, 0.034861113876104355, -0.002144511789083481, -0.03308124840259552, 0.21479028463363647, 0.23010830581188202, -0.022138545289635658, 0.3043055832386017, 0.03189660608768463, -0.22521153092384338, 0.0949225202202797, -0.11883126199245453, 0.5473511815071106, 0.41368722915649414, 0.14605849981307983, -0.3134823739528656, -0.0018695201724767685, -0.11622118204832077, -0.2087377905845642, 0.39433833956718445, -0.17124417424201965, 0.271068811416626, 0.2361290454864502, 0.08730724453926086, 0.0219230018556118, -0.38118550181388855, 0.03869180753827095, 0.08174888044595718, 0.22716078162193298, -0.14836107194423676, 0.09673324972391129, -0.2366161346435547, 0.23623225092887878, -0.12680579721927643, 0.01083587110042572, -0.023906942456960678, -0.21162058413028717, 0.09580528736114502, -0.11824275553226471, -0.049165911972522736, 0.2551226019859314, -0.09014672040939331, 0.1280742585659027, -0.11185547709465027, 0.13023558259010315, 0.06858675181865692, -0.21824787557125092, -0.3099154233932495, 0.13672709465026855, 0.26105797290802, -0.07852063328027725, 0.4030056595802307, 0.08045212179422379, -0.03423028066754341, -0.1852937638759613, -0.1912514567375183, -0.039954960346221924, -0.04970887303352356, 0.28364187479019165, 0.1351197361946106, -0.07471431791782379, -0.19416265189647675, -0.4077012240886688, 0.25358009338378906, -0.25528913736343384, -0.1763339340686798, 0.3357873558998108, -0.015126846730709076, 0.004934403579682112, -0.17343024909496307, -0.4460121691226959, -0.19231581687927246, -0.14840105175971985, 0.29470857977867126, 0.06457395851612091, 0.12930533289909363, 0.02270463854074478, 0.22466027736663818, 0.042824629694223404, -0.10314823687076569, 0.1216510683298111, -0.2890097498893738, 0.1607944518327713, 0.11384093761444092, -0.17031291127204895, -0.32396093010902405, 0.05296650901436806, -0.10171255469322205, 0.36044439673423767, -0.1304561048746109, -0.6014333963394165, -0.21043835580348969, -0.2563965320587158, 0.12943215668201447, -0.05154131352901459, 0.09780096262693405, 0.221389502286911, 0.21809037029743195, -0.20453153550624847, 0.022892899811267853, -0.11761470139026642, 0.4647151231765747, -0.5940790176391602, -0.01298472285270691, 0.015022066421806812, 0.5313704013824463, -0.06932543963193893, 0.5452758073806763, 0.21734365820884705, 0.053412213921546936, 0.14594048261642456, -0.09115035086870193, 0.34519997239112854, -0.12229619175195694, -0.29794254899024963, -0.29571759700775146, -0.04432137310504913, 0.22697566449642181, 0.07034918665885925, -0.0713023841381073, -0.13288451731204987, 0.0996662825345993, 0.06372302770614624, -0.5250401496887207, -0.41055241227149963, -0.05046582221984863, -0.3686186671257019, -0.04996398836374283, 0.12516406178474426, 0.1396438181400299, -0.11962664127349854, -0.042544152587652206, 0.21486470103263855, 0.11390864849090576, -0.04984342306852341, -0.2372034788131714, -0.11859449744224548, -0.12305913120508194, -0.449226438999176, 0.2901732325553894, -0.19701847434043884, 0.3927428126335144, -0.028311466798186302, -0.039598964154720306, 0.2069396674633026, -0.33119332790374756, 0.5487357378005981, -0.10063894838094711, -0.04378353804349899, 0.14232338964939117, 0.0044831037521362305, -0.31037893891334534, -0.06755158305168152, -0.005320325493812561, 0.08213449269533157, -0.3869883120059967, 0.14759063720703125, -0.4015748202800751, 0.3250812888145447, -0.027114178985357285, 0.07168790698051453, -0.4544393718242645, -0.2566443085670471, -0.3444780707359314, -0.37236547470092773, -0.5866626501083374, -0.011852115392684937, -0.24617639183998108, 0.2684410810470581, -0.048609308898448944, -0.07428675889968872, -0.1318242996931076, -0.224079430103302, 0.1418428122997284, 0.18569353222846985, 0.3297497630119324, -0.07833126187324524, 0.4084165394306183, 0.1614050269126892, -0.2644539773464203, 0.06689043343067169, 0.48300832509994507, -0.04351728782057762, -0.20608064532279968, -0.2193889319896698, -0.3509441912174225, 0.036179594695568085, 0.2154797613620758, -0.21757090091705322, 0.3857230544090271, -0.28008925914764404, -0.12888771295547485, 0.06254051625728607, -0.38952726125717163, 0.3317030966281891, -0.01284470222890377, 0.18932369351387024, -0.20719102025032043, 0.1652025580406189, -0.012696456164121628, -0.314130961894989, 0.24521103501319885, 0.169578418135643, -0.09038365632295609, 0.5747084021568298, -0.14885908365249634, 0.8625906705856323, -0.1967761367559433, 0.1831263303756714, 0.2162342071533203, -0.4381448030471802, 0.282999724149704, 0.025396451354026794, -0.06769686192274094, -0.536250650882721, -0.2563015818595886, 0.21761636435985565, 0.024692419916391373, -0.04977565258741379, -0.023970186710357666, -0.23050400614738464, 0.06046668067574501, -0.21469572186470032, -0.08999752998352051, 0.03695672005414963, 0.19026219844818115, -0.27488231658935547, 0.028242316097021103, -0.19787737727165222, 0.19518788158893585, 0.07259182631969452, -0.0656852126121521, 0.046174533665180206, -0.07357215136289597, 0.21399632096290588, -0.4212459921836853, -0.30489906668663025, 0.17530018091201782, -0.2528877556324005, 0.2598194181919098, 0.08019722253084183, -0.3079211115837097, 0.160475492477417, 0.24783191084861755, 0.28727757930755615, 0.17199964821338654, 0.03518639877438545, 0.24889345467090607, 0.20837032794952393, 0.1343950629234314, -0.19625753164291382, -0.1868824064731598, -0.01869458146393299, -0.15549342334270477, -0.3402118384838104, 0.33037567138671875, 0.114840567111969, -0.37701356410980225, -0.07816087454557419, 0.1308065503835678, 0.061194077134132385, 0.20265845954418182, 0.06812816858291626, -0.03134392201900482, -0.08674433827400208, -0.25709182024002075, 0.21011540293693542, 0.1591986119747162, -0.09143441170454025, 0.1320970356464386, -0.05966123566031456, -0.2535029649734497, 0.11932912468910217, 0.22771292924880981, 0.2914990484714508, 0.15223543345928192, 0.7089359760284424, 0.04035095497965813, 0.06340624392032623, -0.3153804540634155, -0.1432938277721405, 0.24555227160453796, -0.6300362348556519, 0.24360492825508118, 0.02235116995871067, 0.029890969395637512, 0.05138127878308296, 0.13112719357013702, 0.0982886552810669, 0.08462894707918167, 0.022115420550107956, -0.34442904591560364, -0.1053885966539383, 0.09573744237422943, -0.005435094237327576, 0.10408053547143936, 0.03388698399066925, -0.11157670617103577, -0.21469122171401978, 0.4263213276863098, -0.395603746175766, 0.21803312003612518, 0.0734994113445282, -0.09794670343399048, -0.4599568247795105, -0.11429957300424576, 0.15518952906131744, 0.24822138249874115, 0.20720693469047546, 0.3262908458709717, -0.11630240082740784, -0.3046409785747528, -0.16200116276741028, 0.11911474913358688, -0.1236593946814537, 0.013460206799209118, -0.07716456055641174, -0.32396358251571655, 0.13203060626983643, 0.0880463719367981, 0.2979097366333008, -0.009337743744254112, -0.10276418924331665, -0.04215157404541969, 0.2517244219779968, 0.19040608406066895, -0.16968445479869843, 0.18363696336746216, -0.509712815284729, 0.13675843179225922, 0.1345279961824417, 0.13113243877887726, -0.1236753985285759, -0.09081148356199265, -0.08265736699104309, 0.11353065073490143, -0.039626345038414, 0.14629864692687988, 0.23339778184890747, -0.23410890996456146, -0.2200937271118164, 0.018201980739831924, 0.22215652465820312, 0.17980614304542542, -0.2681421935558319, -0.16400912404060364, -0.030689623206853867, 0.3019751012325287, -0.39294102787971497, -0.2168431431055069, -0.18735113739967346, -0.06358574330806732, -0.017659787088632584, 0.1850595474243164, 0.18851077556610107, -0.48813676834106445, -0.07437577843666077, 0.21501398086547852, 0.1349075734615326, -0.353640079498291, 0.0407506488263607, 0.24817952513694763, -0.1442984789609909, -0.13786430656909943, 0.2240302711725235, -0.120311439037323, 0.215791255235672, 0.34176725149154663, -0.4048345983028412, 0.11805540323257446, -0.0068648457527160645, 0.04245360940694809, 0.11012815684080124, -0.32498884201049805, 0.3864809274673462, 0.15368570387363434, -0.13355445861816406, 0.03758999705314636, 0.3025674521923065, 0.6008816957473755, 0.031988829374313354, 0.13809935748577118, -0.39529556035995483, 0.03357647359371185, -0.2369765341281891, -0.21000689268112183, -0.1946101039648056, -0.18958088755607605, -0.3405827283859253, -0.03221439942717552, -0.09242850542068481, 0.0909314975142479, 0.23152747750282288, -0.026940368115901947, -0.3150290846824646, -0.2569422423839569, 0.24794602394104004, 0.1572842001914978, 0.22488051652908325, -0.24772194027900696, 0.09303712844848633, 0.45075613260269165, -0.0367649644613266, -0.018896549940109253, 0.33615145087242126, 0.3789547085762024, 0.13914765417575836, -0.23165135085582733, 0.23613837361335754, 0.022649699822068214, 0.08116491883993149, 0.001385364681482315, 0.25053566694259644, 0.13451024889945984, 0.2800760567188263, 0.18203270435333252, 0.1920764297246933, -0.20056425034999847, 0.09315839409828186, 0.38531044125556946, 0.23453330993652344, -0.004891209304332733, 0.10363424569368362, -0.34799933433532715, -0.027267664670944214, -0.16130170226097107, 0.47760942578315735, -0.29018309712409973, -0.02445797622203827, 0.29812130331993103, 0.021583588793873787, -0.0813903734087944, -0.7242835164070129, 0.15110665559768677, -0.11521990597248077, 0.3489241302013397, 0.2944979667663574, -0.02922753244638443, -0.32345664501190186, 0.08517225086688995, -0.7443155646324158, 0.5754792094230652, -0.3601243197917938, 0.23567315936088562, -0.035726312547922134, 0.20459483563899994, -0.028652362525463104, -0.07412714511156082, 0.20151838660240173, 0.44172826409339905, -0.33144864439964294, 0.2870699167251587, -0.35995718836784363, -0.13028542697429657, 0.27691659331321716, -0.20323890447616577, 0.10330413281917572, -0.4686329960823059, 0.032418593764305115, -0.5130492448806763, 0.15357720851898193, -0.030012190341949463, -0.26599419116973877, 0.24870815873146057, -0.041246674954891205, 0.45485150814056396, 0.16630125045776367, 0.14766046404838562, -0.03290002793073654, -0.37382063269615173, -0.19411921501159668, -0.06351177394390106, -0.20922966301441193, 0.14700239896774292, 0.4681982398033142, 0.15025146305561066, 0.0012093288823962212, 0.056317999958992004, -0.09632386267185211, 0.3003614842891693, -0.06929315626621246, 0.032011743634939194, -0.2587624788284302, 0.2795175611972809, -0.004311054944992065, -0.024622038006782532, 0.05379058048129082, 0.18902182579040527, 0.012758206576108932, 0.23427660763263702, -0.23208598792552948, -0.44102993607521057, 0.3400585651397705, -0.21760238707065582, -0.006342414766550064, 0.018296334892511368, 0.3659904897212982, -0.07192347198724747, -0.07383710145950317, -0.45089301466941833, 0.1418466866016388, 0.33473631739616394, 0.052779026329517365, -0.04554178565740585, 0.0564560703933239, -0.06700864434242249, 0.00915704295039177, -0.03209146484732628, 0.2730202078819275, 0.0710987001657486, -0.0779990628361702, 0.3131791353225708, -0.2689359486103058 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
It should probably work out of the box to save structured data. If you want to show an example we can help you.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
23
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. It should probably work out of the box to save structured data. If you want to show an example we can help you.
[ -0.2739250361919403, 0.038915157318115234, -0.03910260647535324, 0.24922962486743927, 0.17654576897621155, -0.11061865836381912, -0.0422590933740139, 0.05888711288571358, 0.038547154515981674, 0.15754805505275726, -0.18960022926330566, 0.41915085911750793, -0.4267215430736542, 0.6438034176826477, -0.14794489741325378, -0.2593744397163391, 0.2712559998035431, 0.03879132866859436, 0.2738678455352783, 0.02480114996433258, -0.11559657007455826, 0.054164379835128784, 0.03341294825077057, -0.06291835010051727, -0.24148643016815186, -0.48333510756492615, -0.15598946809768677, 0.052534427493810654, -0.33216047286987305, -0.4602072834968567, 0.19387415051460266, -0.10488829016685486, 0.3438136875629425, 0.2096620798110962, -0.0001199865946546197, -0.05531184375286102, 0.15164560079574585, -0.1994686871767044, -0.056630201637744904, -0.24510206282138824, -0.05661235749721527, -0.2753429114818573, 0.20172268152236938, -0.4001513421535492, -0.03350415825843811, -0.46548962593078613, 0.052239906042814255, -0.25734058022499084, 0.3798198699951172, 0.12493441253900528, 0.11008772253990173, -0.09838928282260895, 0.35700127482414246, 0.18815763294696808, 0.12998110055923462, 0.5715730786323547, -0.12080982327461243, 0.36072838306427, 0.013202421367168427, 0.18534862995147705, 0.4580910801887512, -0.005127245560288429, -0.14308781921863556, -0.15770810842514038, 0.2900467813014984, -0.024902593344449997, -0.030863486230373383, -0.4098473787307739, -0.11168936640024185, 0.13818621635437012, 0.7237481474876404, -0.43651121854782104, -0.2331003099679947, -0.14121899008750916, -0.19591155648231506, -0.1156853437423706, -0.01755616068840027, 0.15292973816394806, -0.20703499019145966, 0.25621360540390015, 0.21396414935588837, -0.3798538148403168, -0.3587097227573395, 0.47342419624328613, -0.055934082716703415, 0.2613537609577179, -0.09143126755952835, 0.1273650825023651, -0.1421513855457306, -0.11187241971492767, 0.05492183193564415, -0.12483681738376617, 0.1320745050907135, 0.08863743394613266, -0.02037961408495903, -0.07587388157844543, -0.48017197847366333, 0.22870755195617676, 0.028725773096084595, 0.30363863706588745, 0.06971585750579834, 0.016897233203053474, 0.34903430938720703, 0.23950067162513733, 0.4757232964038849, -0.1442134976387024, 0.0471445769071579, 0.38320988416671753, 0.49666857719421387, -0.3662724494934082, 0.040666598826646805, -0.1784886121749878, -0.29334086179733276, 0.12139739841222763, 0.443518728017807, -0.3187876343727112, 0.5578758716583252, 0.007951345294713974, -0.1359262615442276, 0.04462285712361336, -0.19696933031082153, 0.09672801196575165, -0.021695144474506378, 0.36099255084991455, -0.27753543853759766, 0.07324878126382828, -0.1412936896085739, 0.5445886850357056, 0.04547756910324097, 0.26620349287986755, 0.13820911943912506, 0.014985834248363972, 0.021871227771043777, 0.000920712947845459, 0.10897676646709442, -0.19865141808986664, 0.08251705765724182, 0.08255654573440552, -0.13880504667758942, -0.2052014321088791, 0.0733296349644661, -0.33627763390541077, 0.28866326808929443, 0.1905326396226883, -0.018004609271883965, 0.1952153891324997, -0.10863758623600006, -0.25779038667678833, -0.08382848650217056, 0.2124568223953247, -0.2254016399383545, -0.5140504240989685, -0.5806319713592529, 0.05287427455186844, -0.2283150553703308, -0.22357383370399475, -0.32378506660461426, 0.13717573881149292, 0.4459182620048523, -0.02901589497923851, -0.03319873660802841, -0.16836555302143097, -0.14646713435649872, -0.5850504636764526, 0.056737057864665985, -0.23508186638355255, -0.4784713685512543, 0.09912648797035217, -0.32516804337501526, -0.07442522048950195, 0.12914113700389862, 0.4273466169834137, -0.059601519256830215, 0.3404156565666199, 0.03572981804609299, 0.41385161876678467, 0.6987702250480652, -0.27771371603012085, -0.414816677570343, -0.08190057426691055, 0.4841578006744385, 0.004097430035471916, -0.12890538573265076, 0.35739317536354065, 0.5263535976409912, -0.10225924849510193, -0.30434003472328186, 0.09968004375696182, -0.00324382446706295, -0.0020731110125780106, -0.14998586475849152, 0.015972694382071495, 0.3745211958885193, 0.04420343413949013, -0.1373295783996582, -0.2539258599281311, 0.25619974732398987, -0.2004578709602356, 0.13854482769966125, 0.019222784787416458, 0.09507972002029419, 0.10070887207984924, 0.538398802280426, 0.5469765663146973, 0.09075931459665298, -0.33367833495140076, -0.31269997358322144, 0.07217060029506683, -0.22953514754772186, -0.30848002433776855, -0.5126115083694458, -0.30485016107559204, -0.2286325991153717, 0.22664614021778107, -0.1705741584300995, 0.027937080711126328, -0.0004070885479450226, -0.13981832563877106, -0.0901455208659172, 0.206434965133667, -0.3856299817562103, 0.050876714289188385, -0.018888717517256737, 0.00897020660340786, 0.10108494758605957, 0.270142138004303, -0.19491972029209137, -0.5788187384605408, 0.0939565896987915, 0.29979369044303894, -0.010896474123001099, 0.04670149087905884, -0.017543107271194458, 0.37092170119285583, 0.1792912632226944, -0.14323054254055023, -0.37491118907928467, 0.1712651550769806, 0.027915898710489273, -0.3871055841445923, 0.09736868739128113, 0.13929544389247894, 0.22262366116046906, 0.03373619168996811, -0.132940411567688, 0.26016169786453247, 0.32199302315711975, -0.12017426639795303, -0.15625543892383575, 0.13467344641685486, 0.16265305876731873, 0.11944955587387085, -0.07083890587091446, -0.01427464559674263, -0.16856729984283447, -0.07780618965625763, 0.054307688027620316, 0.12003128975629807, -0.7086875438690186, 0.07113295048475266, 0.4323026239871979, -0.0024218447506427765, 0.5254665613174438, -0.059574589133262634, -0.040111467242240906, -0.15022407472133636, 0.28233397006988525, -0.031111931428313255, 0.21000529825687408, 0.0562598779797554, -0.1707645058631897, -0.080171599984169, -0.04893876984715462, -0.07599693536758423, 0.064926877617836, 0.1203802227973938, 0.38466677069664, 0.1639331579208374, 0.15073956549167633, -0.03417788818478584, -0.08597376942634583, 0.2178901731967926, -0.18139593303203583, 0.0015842393040657043, -0.34971293807029724, 0.18408368527889252, -0.15459847450256348, -0.45079901814460754, 0.09123867750167847, -0.20799152553081512, -0.1476704478263855, -0.23144453763961792, -0.02281130477786064, 0.0237649567425251, 0.012192271649837494, 0.16200658679008484, 0.4222958981990814, 0.2165818065404892, -0.1318419724702835, -0.32342731952667236, -0.22395506501197815, -0.35854148864746094, -0.15640830993652344, -0.011779706925153732, 0.05982387810945511, 0.1675325185060501, 0.4270932078361511, -0.03992452472448349, 0.2172190099954605, -0.34741246700286865, -0.25648173689842224, -0.024717062711715698, -0.06372210383415222, 0.008833535015583038, 0.0550149530172348, 0.3775041103363037, -0.10457155108451843, -0.18799524009227753, -0.08851361274719238, -0.15725404024124146, -0.11575455963611603, 0.06103464215993881, -0.10819971561431885, -0.06421061605215073, 0.10987627506256104, -0.13945487141609192, -0.8664668202400208, -0.16142849624156952, 0.3969891667366028, 0.32823359966278076, 0.061321403831243515, -0.08352629840373993, -0.0021314239129424095, -0.11998789012432098, -0.1332854926586151, 0.007743231952190399, -0.0312921442091465, -0.39103880524635315, 0.6375265121459961, -0.3082256615161896, -0.4324343204498291, 0.2933848798274994, -0.07179730385541916, 0.12577562034130096, -0.08821018040180206, 0.11328624188899994, 0.32675662636756897, -0.05153335630893707, 0.44758716225624084, 0.0574890673160553, -0.025993825867772102, 0.2197532057762146, 0.04803651198744774, 0.18455801904201508, -0.10095542669296265, 0.18905887007713318, 0.2827370762825012, 0.12727701663970947, 0.32186493277549744, -0.07990637421607971, 0.13033834099769592, 0.011507537215948105, 0.2465839982032776, 0.04488592967391014, -0.09336379170417786, 0.4398345351219177, -0.13368353247642517, 0.318366140127182, 0.010838396847248077, 0.006936561316251755, -0.00405970448628068, -0.16317513585090637, 0.009019274264574051, 0.09222489595413208, 0.0889139249920845, -0.29525530338287354, -0.06449396908283234, -0.21971212327480316, 0.01091112568974495, -0.15305708348751068, 0.13311053812503815, -0.5054301023483276, 0.2884155511856079, -0.1327308565378189, -0.14923633635044098, 0.06922870874404907, -0.18359911441802979, 0.018534794449806213, 0.22471696138381958, 0.08471033722162247, 0.21526245772838593, 0.024093355983495712, 0.045317359268665314, -0.461692750453949, 0.1995842009782791, 0.2359953671693802, -0.0015278086066246033, -0.1771089732646942, -0.013153484091162682, 0.2584999203681946, 0.1362028568983078, 0.004395619034767151, -0.04461788386106491, -0.31113487482070923, -0.1692454218864441, 0.05058533698320389, -0.40300631523132324, 0.13202017545700073, -0.06765333563089371, 0.05162064731121063, 0.06471052765846252, 0.31906527280807495, -0.37501204013824463, -0.033099349588155746, -0.14128367602825165, 0.26243844628334045, -0.32227230072021484, -0.1376180499792099, -0.15842285752296448, -0.23957055807113647, -0.45913082361221313, -0.26362720131874084, 0.39541003108024597, -0.12996982038021088, 0.1575474739074707, -0.14459741115570068, -0.37928447127342224, 0.04116906225681305, -0.17119930684566498, -0.056999631226062775, 0.4456484317779541, -0.451357901096344, -0.20318515598773956, 0.27643245458602905, 0.2749674916267395, 0.2852405309677124, 0.39524561166763306, 0.05855690687894821, -0.34043875336647034, -0.15050584077835083, 0.06882729381322861, 0.3938482105731964, -0.2941754162311554, -0.2827279567718506, -0.033174142241477966, -0.11877869069576263, -0.08801324665546417, -0.26904401183128357, -0.12785780429840088, 0.25243324041366577, 0.03304755315184593, -0.7303051948547363, -0.5065045952796936, 0.37014657258987427, 0.19775058329105377, -0.0441388338804245, -0.08192728459835052, 0.22674666345119476, -0.10441779345273972, 0.5230236053466797, 0.336946040391922, 0.9222265481948853, -0.12366437911987305, 0.3628584146499634, 0.3219554126262665, -0.4654831886291504, 0.34359049797058105, -0.04975714534521103, -0.24878419935703278, -0.3438926339149475, 0.33215421438217163, -0.1702144891023636, 0.07359598577022552, 0.279154509305954, 0.1188879981637001, -0.3840128481388092, 0.04358671233057976, -0.2547365725040436, -0.26464009284973145, -0.055368706583976746, 0.4155332148075104, -0.07750972360372543, 0.08239088952541351, -0.3506848216056824, 0.06964914500713348, 0.04578987509012222, 0.08938440680503845, -0.12003117054700851, -0.031553689390420914, -0.20521964132785797, 0.0014495477080345154, -0.16730345785617828, -0.19215348362922668, -0.00013798708096146584, 0.38171523809432983, 0.11539866030216217, -0.37772929668426514, 0.20356373488903046, 0.5662436485290527, 0.24308796226978302, -0.040269892662763596, -0.22802966833114624, 0.027331344783306122, 0.0948203057050705, -0.09055468440055847, 0.1944991648197174, -0.07957252860069275, 0.4053021967411041, -0.14972428977489471, -0.19207677245140076, 0.029830459505319595, -0.06058714538812637, -0.23654472827911377, -0.31731459498405457, -0.03889899700880051, -0.0682000070810318, -0.20139847695827484, 0.030889876186847687, -0.4597536325454712, -0.06011348217725754, 0.041443947702646255, 0.0602424256503582, 0.37515467405319214, 0.16380658745765686, 0.48450541496276855, -0.10385312139987946, 0.05268879234790802, -0.07225656509399414, 0.09058181941509247, 0.004654869437217712, 0.29552361369132996, 0.3351478576660156, -0.05357114598155022, -0.2657908797264099, -0.12444907426834106, 0.4560091495513916, 0.03664984554052353, -0.10684842616319656, 0.1845734715461731, 0.10272978246212006, 0.13210482895374298, -0.2873018980026245, 0.5487669110298157, 0.15770940482616425, -0.420242041349411, -0.14821229875087738, -0.30576854944229126, -0.415120929479599, 0.1710178554058075, 0.19287146627902985, 0.28477150201797485, 0.03465648740530014, 0.10726477205753326, 0.12120424211025238, 0.0023189764469861984, -0.1816731095314026, -0.058464355766773224, -0.11077089607715607, 0.1396634429693222, 0.18996797502040863, 0.09819405525922775, -0.030961258336901665, -0.20465782284736633, -0.043375127017498016, -0.12288995087146759, 0.14592741429805756, -0.07174082100391388, -0.17594468593597412, 0.19621828198432922, 0.07622271776199341, -0.13570700585842133, 0.08268862962722778, -0.3776555061340332, -0.08990852534770966, 0.21897341310977936, -0.17230412364006042, 0.37050098180770874, -0.05606985092163086, 0.13459725677967072, 0.09783463180065155, 0.0006525218486785889, 0.03822765499353409, 0.1371970921754837, -0.19009754061698914, 0.10959432274103165, -0.2090776562690735, 0.1986452043056488, -0.012024536728858948, -0.19801267981529236, 0.23650816082954407, 0.11155034601688385, 0.27435392141342163, -0.18839415907859802, 0.3860310912132263, -0.22599612176418304, 0.054920684546232224, -0.2953667640686035, 0.3457428216934204, 0.21537089347839355, -0.06795880943536758, 0.1284867823123932, 0.3097664713859558, 0.026979492977261543, -0.23914140462875366, 0.005560305900871754, 0.019340384751558304, -0.1614251583814621, -0.14011934399604797, 0.12012067437171936, 0.21924442052841187, 0.4591216444969177, -0.7182413339614868, -0.07129387557506561, 0.15161922574043274, 0.05924432724714279, 0.12265096604824066, 0.057736482471227646, -0.14258980751037598, 0.01600296050310135, 0.18986037373542786, 0.3188076913356781, 0.17592179775238037, 0.4872874617576599, -0.09771855920553207, 0.17297808825969696, 0.4726825952529907, -0.10428120195865631, 0.5654817819595337, -0.0388977974653244, -0.11389279365539551, -0.41724395751953125, 0.020183399319648743, -0.1344974935054779, 0.3396231234073639, 0.4090043604373932, 0.16179311275482178, -0.2944791913032532, 0.11167173832654953, 0.5377635359764099, 0.010622063651680946, -0.09983347356319427, -0.15287885069847107, -0.049504250288009644, 0.027122437953948975, -0.3353947103023529, -0.32852715253829956, -0.44933098554611206, 0.11673525720834732, 0.3489617705345154, 0.19128458201885223, -0.3651033043861389, 0.4992550313472748, -0.037866003811359406, 0.22480341792106628, -0.020978914573788643, 0.23312656581401825, -0.2217000275850296, -0.08111980557441711, -0.14143060147762299, 0.12628191709518433, 0.5008133053779602, 0.2805137038230896, -0.13801473379135132, 0.3987891972064972, -0.17355337738990784, -0.253189355134964, 0.030462700873613358, 0.008387522771954536, 0.15206998586654663, 0.1889510601758957, 0.418802946805954, -0.006960591301321983, 0.0702831968665123, 0.14991214871406555, 0.1195799857378006, 0.26914486289024353, -0.021923933178186417, 0.4289727210998535, -0.2066786289215088, -0.28543785214424133, -0.026028640568256378, -0.06371136754751205, -0.19709250330924988, -0.2187032252550125, 0.3100639581680298, 0.08672492206096649, 0.22496992349624634, -0.28305795788764954, 0.012339282780885696, 0.06351566314697266, 0.5647820234298706, 0.15339304506778717, 0.637680172920227, 0.0431213453412056, -0.08379282057285309, -0.45236438512802124, -0.11759545654058456, -0.058513883501291275, -0.16680754721164703, 0.06359674036502838, 0.06684324890375137, -0.024545736610889435, 0.4297698736190796, 0.1752505600452423, 0.4556044042110443, -0.021262526512145996, 0.14916613698005676, -0.13505445420742035, -0.03802433982491493, -0.11256898939609528, 0.16050985455513, 0.011380679905414581, -0.039984334260225296, 0.3054421842098236, -0.09129898250102997, 0.035563305020332336, -0.1888398379087448, -0.06399219483137131, -0.025122378021478653, -0.3501345217227936, 0.3043214678764343, -0.03993971645832062, 0.22144535183906555, 0.042727164924144745, 0.14904114603996277, 0.35922566056251526, -0.021291688084602356, -0.23754648864269257, 0.3152904808521271, 0.05871548503637314, 0.24846738576889038, -0.3070233464241028, 0.26424866914749146, -0.049671053886413574, -0.15718494355678558, -0.18610495328903198, -0.038819167762994766, -0.1620766520500183, 0.0006378600373864174, 0.11513257771730423, 0.0066866399720311165, -0.06553474813699722, 0.07165685296058655, -0.2507295310497284, 0.03828372806310654, -0.3548088073730469, -0.136532723903656, 0.5200726985931396, -0.0038202041760087013, -0.16971559822559357, 0.06506224721670151, -0.010188430547714233, 0.38915741443634033, 0.13849382102489471, -0.40025800466537476, 0.02994341403245926, 0.3884979486465454, -0.13153591752052307, 0.0317554734647274, 0.08540348708629608, 0.1975560188293457, -0.019527435302734375, -0.08317318558692932, 0.5987548828125, -0.08187108486890793, 0.2010205090045929, 0.014474626630544662, -0.37076663970947266 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
An example of a toy dataset is like: ```json [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] ``` We can use the friendship relation to build a directional graph, and a user node can be represented using the articles written by himself. And the relationship between articles can be built when the article has read by the same user. This dataset can be used to model the heterogeneous relationship between users and articles, and this graph can be used to build recommendation systems to recommend articles to the user, or potential friends to the user.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
131
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. An example of a toy dataset is like: ```json [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] ``` We can use the friendship relation to build a directional graph, and a user node can be represented using the articles written by himself. And the relationship between articles can be built when the article has read by the same user. This dataset can be used to model the heterogeneous relationship between users and articles, and this graph can be used to build recommendation systems to recommend articles to the user, or potential friends to the user.
[ -0.2233353555202484, 0.10357466340065002, -0.05503086745738983, 0.25530022382736206, 0.166474387049675, -0.08834940195083618, -0.04204189404845238, 0.0489242784678936, 0.1316886693239212, 0.017299599945545197, -0.18173827230930328, 0.34137171506881714, -0.42271509766578674, 0.5882748365402222, -0.20041613280773163, -0.25589117407798767, 0.22011345624923706, -0.042716965079307556, 0.3299931585788727, 0.07720257341861725, -0.09721341729164124, -0.004564892500638962, 0.16383960843086243, -0.05923944711685181, -0.24591326713562012, -0.5715221762657166, -0.15946444869041443, 0.04773705452680588, -0.35423800349235535, -0.48082613945007324, 0.261537104845047, -0.0621040053665638, 0.2797880172729492, 0.16290640830993652, -0.00011948901374125853, 0.05578252673149109, 0.1224135309457779, -0.15448139607906342, -0.08683313429355621, -0.3309628963470459, 0.005676571279764175, -0.2981204688549042, 0.21524855494499207, -0.36028993129730225, 0.014138113707304, -0.5223188400268555, 0.04537779837846756, -0.4032323360443115, 0.4603862166404724, 0.08648116141557693, 0.11607180535793304, -0.11062473058700562, 0.332114040851593, 0.20476560294628143, 0.14179784059524536, 0.6720962524414062, -0.14980825781822205, 0.36920446157455444, 0.015367656946182251, 0.17619402706623077, 0.4121544361114502, -0.05364485830068588, -0.1396133154630661, -0.16961482167243958, 0.3264267146587372, 0.009213469922542572, -0.02521488070487976, -0.3577064275741577, -0.11327008157968521, 0.14208081364631653, 0.5881966948509216, -0.39218804240226746, -0.2603582739830017, -0.2230035960674286, -0.2509317696094513, -0.06812091171741486, -0.015137173235416412, 0.11420651525259018, -0.21543240547180176, 0.23175133764743805, 0.16756528615951538, -0.3765949606895447, -0.24055413901805878, 0.5173790454864502, 0.0040862709283828735, 0.22438298165798187, -0.08175003528594971, 0.14351540803909302, -0.15065482258796692, -0.20288969576358795, 0.05542241781949997, -0.23901498317718506, 0.1657641977071762, 0.019779935479164124, 0.012614835053682327, -0.09692072868347168, -0.4118797779083252, 0.14229297637939453, 0.09046974033117294, 0.25319036841392517, 0.11316435039043427, 0.0034755151718854904, 0.2498454749584198, 0.2128661870956421, 0.5089196562767029, -0.1791364699602127, 0.05638016760349274, 0.38061830401420593, 0.37176793813705444, -0.3154612183570862, 0.04852903261780739, -0.1778392493724823, -0.2879609763622284, 0.17981043457984924, 0.4373391270637512, -0.32254165410995483, 0.5189977884292603, 0.07926663756370544, -0.1570596545934677, 0.04596312344074249, -0.16569192707538605, 0.1057717576622963, 0.026004193350672722, 0.3263949751853943, -0.23645924031734467, 0.11459911614656448, -0.1272905170917511, 0.5873832702636719, 0.08556167036294937, 0.32198211550712585, 0.11197053641080856, -0.007230786606669426, 0.019674982875585556, 0.017033318057656288, 0.11549864709377289, -0.08980993926525116, 0.09133784472942352, 0.044500090181827545, -0.23103700578212738, -0.2699984312057495, 0.08204669505357742, -0.35419991612434387, 0.29714545607566833, 0.16388647258281708, -0.056077830493450165, 0.19629967212677002, -0.05132954195141792, -0.3526572585105896, -0.07809282839298248, 0.12397416681051254, -0.2141689956188202, -0.4256942868232727, -0.5040134191513062, 0.058117616921663284, -0.3150150179862976, -0.21322327852249146, -0.3674657642841339, 0.1815352737903595, 0.4864899814128876, -0.021723339334130287, -0.13169866800308228, -0.15535631775856018, -0.21244582533836365, -0.5415154695510864, 0.003844011574983597, -0.18139280378818512, -0.41193291544914246, 0.04497049003839493, -0.40882498025894165, 0.024322859942913055, 0.06720703095197678, 0.44114989042282104, -0.08257104456424713, 0.3443978726863861, 0.0977901890873909, 0.40676605701446533, 0.6312240362167358, -0.21619899570941925, -0.41476210951805115, -0.05242259427905083, 0.38306087255477905, 0.11831753700971603, -0.14051416516304016, 0.3945302367210388, 0.5097452402114868, -0.10033197700977325, -0.2299247682094574, 0.10216404497623444, -0.032127656042575836, 0.012686004862189293, -0.12814374268054962, -0.07802069187164307, 0.3725043535232544, 0.06125698611140251, -0.12280966341495514, -0.2798149287700653, 0.2493329644203186, -0.1987600326538086, 0.07869654893875122, 0.06876740604639053, 0.15067343413829803, 0.15838617086410522, 0.5065509080886841, 0.4946048855781555, -0.01409120112657547, -0.35676124691963196, -0.4202118515968323, 0.07018185406923294, -0.12026827037334442, -0.35147640109062195, -0.5534550547599792, -0.32465505599975586, -0.22329378128051758, 0.21713368594646454, -0.18798217177391052, 0.10658608376979828, 0.03593841940164566, -0.09162239730358124, -0.14379875361919403, 0.1442365050315857, -0.29928678274154663, 0.026218120008707047, 0.054174281656742096, 0.028867069631814957, 0.04947087541222572, 0.3267576992511749, -0.1388351023197174, -0.536104142665863, 0.14190828800201416, 0.29385560750961304, 0.01604710891842842, 0.06543493270874023, 0.020451782271265984, 0.34422555565834045, 0.20591869950294495, -0.15875343978405, -0.2881802022457123, 0.26731523871421814, 0.020743902772665024, -0.33774256706237793, 0.09949321299791336, 0.09640058875083923, 0.24549484252929688, 0.014928467571735382, -0.16730046272277832, 0.3099406659603119, 0.32286861538887024, -0.009983748197555542, -0.15815860033035278, 0.14046089351177216, 0.11891086399555206, 0.14252373576164246, -0.06792367994785309, -0.06236995756626129, -0.2031422108411789, -0.0518229715526104, 0.054968710988759995, 0.15534397959709167, -0.6136971116065979, 0.12488342076539993, 0.4467569589614868, 0.1083701103925705, 0.5621827244758606, 0.03288158401846886, 0.0033152028918266296, -0.17033126950263977, 0.21845178306102753, 0.037965450435876846, 0.21618136763572693, 0.05169329792261124, -0.185585618019104, -0.11053194850683212, -0.011699111200869083, -0.034900080412626266, 0.02825193852186203, 0.15449169278144836, 0.4188006818294525, 0.151119202375412, 0.23665016889572144, 0.01172750722616911, -0.0266445092856884, 0.15441979467868805, -0.18493951857089996, -0.004222763702273369, -0.3672716021537781, 0.23064793646335602, -0.1960737407207489, -0.2586522400379181, 0.07194273918867111, -0.21187196671962738, -0.17059443891048431, -0.26891568303108215, -0.038375094532966614, 0.038353148847818375, -0.08270801603794098, 0.10733163356781006, 0.4270687699317932, 0.16160662472248077, -0.19021093845367432, -0.3846336901187897, -0.13115650415420532, -0.4501529037952423, -0.10937004536390305, -0.013879326172173023, 0.13026505708694458, 0.1611526608467102, 0.43587350845336914, -0.020949166268110275, 0.20715932548046112, -0.29878488183021545, -0.28610900044441223, -0.11194632947444916, -0.0864015594124794, -0.0002219807356595993, 0.033360980451107025, 0.3284338116645813, -0.16270661354064941, -0.22329585254192352, -0.03541624918580055, -0.09061584621667862, -0.10394726693630219, 0.05547889322042465, -0.049163755029439926, -0.08255339413881302, 0.16102007031440735, -0.13381105661392212, -0.8484689593315125, -0.1657431274652481, 0.4261317849159241, 0.2923760414123535, 0.040799956768751144, -0.08938929438591003, 0.04106929898262024, -0.16935518383979797, -0.14456890523433685, -0.0015491629019379616, -0.005745461210608482, -0.39108192920684814, 0.5569652318954468, -0.29710832238197327, -0.35767388343811035, 0.21223664283752441, -0.14627119898796082, 0.028863416984677315, -0.02057625725865364, 0.0949493944644928, 0.4115856885910034, -0.059488631784915924, 0.424130916595459, 0.10432987660169601, -0.16441679000854492, 0.2474936693906784, 0.13279743492603302, 0.18010957539081573, -0.0642383024096489, 0.138654887676239, 0.3372527062892914, 0.09334571659564972, 0.24919083714485168, -0.10278526693582535, 0.08819684386253357, 0.029903288930654526, 0.2436649650335312, 0.055164892226457596, -0.22774027287960052, 0.4077165126800537, -0.07598366588354111, 0.2586158812046051, -0.00777154415845871, -0.02843315713107586, -0.06586392223834991, -0.1733730435371399, 0.05183131992816925, 0.056866973638534546, 0.08842170983552933, -0.28057727217674255, -0.01614268682897091, -0.16585709154605865, -0.00780867412686348, -0.19660569727420807, 0.1610698103904724, -0.5294164419174194, 0.30781495571136475, -0.08158235251903534, -0.1512300670146942, 0.0007509663701057434, -0.18900570273399353, -0.07806694507598877, 0.21921156346797943, 0.03454417735338211, 0.22829410433769226, -0.013135604560375214, 0.029068833217024803, -0.43620026111602783, 0.18979626893997192, 0.26856300234794617, 0.04825591668486595, -0.17760325968265533, 0.030015379190444946, 0.17555662989616394, 0.13540510833263397, -0.03946302831172943, -0.08138619363307953, -0.27294665575027466, -0.17633526027202606, 0.03112787753343582, -0.4062748849391937, 0.19256491959095, -0.039880380034446716, 0.065727099776268, 0.031127439811825752, 0.4377601444721222, -0.45194241404533386, -0.02721058577299118, -0.18015599250793457, 0.2542623281478882, -0.3058667480945587, -0.18967773020267487, -0.11227603256702423, -0.22210264205932617, -0.4085017740726471, -0.25539344549179077, 0.4043833315372467, -0.08421141654253006, 0.10506518185138702, -0.14197267591953278, -0.39925336837768555, 0.11595598608255386, -0.12268365919589996, -0.11817428469657898, 0.4155302047729492, -0.43268340826034546, -0.13478122651576996, 0.265237033367157, 0.2991998493671417, 0.3488849401473999, 0.3828350007534027, 0.1606922298669815, -0.29724445939064026, -0.17486336827278137, 0.05394211784005165, 0.3107566833496094, -0.29418835043907166, -0.1882867068052292, -0.05406532436609268, -0.04188966006040573, -0.09921520948410034, -0.2898096740245819, -0.08343902230262756, 0.26868054270744324, -0.01048718485981226, -0.6994717717170715, -0.4712928235530853, 0.3735632598400116, 0.15488030016422272, -0.04398767277598381, -0.1446906179189682, 0.17000305652618408, -0.14917640388011932, 0.544937789440155, 0.3925800323486328, 0.8639630079269409, -0.1372968703508377, 0.36364543437957764, 0.2922450006008148, -0.48932939767837524, 0.408358097076416, -0.07653190940618515, -0.3226100206375122, -0.34659773111343384, 0.37028831243515015, -0.16709348559379578, 0.07978366315364838, 0.28390854597091675, 0.18587934970855713, -0.3257018029689789, 0.03426894173026085, -0.26808056235313416, -0.23596835136413574, -0.030756311491131783, 0.43184947967529297, -0.022159239277243614, 0.060744818300008774, -0.2921311855316162, 0.08059144020080566, -0.06784605979919434, -0.00007707253098487854, -0.10685858130455017, -0.042447470128536224, -0.31131330132484436, 0.017347194254398346, -0.2258688062429428, -0.24823012948036194, 0.009114785119891167, 0.3994221091270447, 0.12479701638221741, -0.3601284623146057, 0.2805294096469879, 0.4910924434661865, 0.26688235998153687, 0.010550498962402344, -0.2003244161605835, 0.01088503748178482, 0.02446698024868965, -0.11121803522109985, 0.2410515993833542, -0.17848220467567444, 0.33447957038879395, -0.10554193705320358, -0.2018785923719406, -0.06017089635133743, -0.031182896345853806, -0.11873035877943039, -0.2716253697872162, -0.05263875424861908, -0.12258616089820862, -0.2589842677116394, -0.010639658197760582, -0.42204082012176514, -0.08800012618303299, -0.0030056536197662354, 0.05853068828582764, 0.34592652320861816, 0.19456002116203308, 0.3843902051448822, -0.12215679883956909, 0.07462024688720703, -0.04835159704089165, 0.13504669070243835, -0.013857662677764893, 0.33255869150161743, 0.3632875084877014, -0.054969001561403275, -0.2740268409252167, -0.15619558095932007, 0.4622802138328552, 0.09589024633169174, -0.07433587312698364, 0.1519620418548584, 0.08078557252883911, 0.05214643478393555, -0.3380197286605835, 0.42686691880226135, 0.10664278268814087, -0.3751486837863922, -0.0491335391998291, -0.3442888855934143, -0.3983798027038574, 0.21671457588672638, 0.15975706279277802, 0.26317644119262695, -0.00890277698636055, 0.1021139919757843, 0.046464353799819946, 0.0376734659075737, -0.1907523274421692, -0.028624361380934715, -0.11031746864318848, 0.13037636876106262, 0.1121985986828804, 0.03860058635473251, -0.04107841104269028, -0.25204193592071533, -0.02017400786280632, -0.13459512591362, 0.11237098276615143, -0.08530652523040771, -0.15132580697536469, 0.16846464574337006, 0.11945750564336777, -0.12560062110424042, 0.07267576456069946, -0.3188905119895935, -0.10452419519424438, 0.1903572827577591, -0.2234049141407013, 0.38061583042144775, -0.034595757722854614, 0.10502709448337555, 0.00830056145787239, 0.02541520446538925, 0.06912191957235336, 0.14725464582443237, -0.20520251989364624, 0.0994517132639885, -0.2112666815519333, 0.18870535492897034, 0.021416202187538147, -0.22673185169696808, 0.23094616830348969, 0.1460651010274887, 0.2607271075248718, -0.12140821665525436, 0.4373711049556732, -0.2486294060945511, 0.008722927421331406, -0.1971493512392044, 0.30642497539520264, 0.23605161905288696, -0.03934900462627411, 0.15934735536575317, 0.19765010476112366, 0.0569283664226532, -0.15679368376731873, 0.02676497772336006, 0.10819955170154572, -0.11269087344408035, -0.09679621458053589, 0.17122450470924377, 0.139967679977417, 0.5176054239273071, -0.7192394733428955, -0.09994546324014664, 0.17775940895080566, 0.09558787196874619, 0.1979864239692688, -0.0007547140121459961, -0.04496150463819504, -0.032367412000894547, 0.19522246718406677, 0.32570046186447144, 0.23751428723335266, 0.4222397804260254, -0.06294708698987961, 0.1541101038455963, 0.4920129179954529, -0.04203151538968086, 0.5321178436279297, -0.06035110726952553, -0.08985906839370728, -0.3307674527168274, 0.09039061516523361, -0.11685279756784439, 0.3019028306007385, 0.37686973810195923, 0.19336870312690735, -0.3365647494792938, 0.10378024727106094, 0.5163170695304871, 0.02212562784552574, -0.15338817238807678, -0.20204594731330872, -0.03883564472198486, -0.1057579517364502, -0.35593169927597046, -0.37096527218818665, -0.55354905128479, 0.04855179041624069, 0.2532101571559906, 0.2285638302564621, -0.4509904682636261, 0.5552628636360168, 0.0018852725625038147, 0.2011062502861023, -0.024946577847003937, 0.2227441370487213, -0.125372976064682, -0.12108385562896729, -0.08365845680236816, 0.0906805470585823, 0.4870866537094116, 0.22880753874778748, -0.21576467156410217, 0.42973577976226807, -0.1882043182849884, -0.30562567710876465, -0.022948523983359337, 0.0028566215187311172, 0.08766508847475052, 0.21052925288677216, 0.41933509707450867, 0.0305864829570055, 0.044811371713876724, 0.14240793883800507, 0.11010709404945374, 0.3276679217815399, -0.04876153916120529, 0.4861747920513153, -0.23937779664993286, -0.2932773232460022, 0.07638522237539291, -0.08130811899900436, -0.136904776096344, -0.2732713222503662, 0.3981993496417999, 0.08158841729164124, 0.2730683386325836, -0.30556052923202515, 0.02561061456799507, 0.009254757314920425, 0.6038175225257874, 0.0910220593214035, 0.5298608541488647, -0.021741535514593124, -0.04806318134069443, -0.378765344619751, -0.17938143014907837, -0.11868946254253387, -0.1883227676153183, 0.10576681047677994, 0.09313564002513885, -0.04063410311937332, 0.4481937885284424, 0.02979271113872528, 0.5166370868682861, -0.09007309377193451, 0.13248121738433838, -0.1779605597257614, -0.04115532711148262, -0.112247034907341, 0.12766583263874054, 0.10435885190963745, -0.07690097391605377, 0.24959103763103485, -0.028903335332870483, 0.03447834402322769, -0.19680100679397583, -0.04196601361036301, -0.059818897396326065, -0.4242299795150757, 0.2686566710472107, 0.013955853879451752, 0.22151535749435425, 0.10190299898386002, 0.10357572883367538, 0.27014052867889404, -0.010721366852521896, -0.25774085521698, 0.43269020318984985, 0.017346784472465515, 0.4144569933414459, -0.379377156496048, 0.35947105288505554, -0.01739075407385826, -0.21369116008281708, -0.16426850855350494, -0.05648069456219673, -0.14178702235221863, 0.008839130401611328, 0.13837569952011108, 0.05674341693520546, -0.03043411299586296, 0.12387146800756454, -0.22121018171310425, 0.12015725672245026, -0.2631852626800537, -0.13378281891345978, 0.4790448248386383, 0.1374799609184265, -0.15666764974594116, 0.18652012944221497, -0.010089337825775146, 0.4652595818042755, 0.07858186215162277, -0.36647143959999084, 0.05681151896715164, 0.40665581822395325, -0.11289883404970169, 0.036175694316625595, 0.004963204264640808, 0.15605297684669495, -0.06109340488910675, -0.07280587404966354, 0.585073709487915, -0.12292463332414627, 0.21367189288139343, 0.062166135758161545, -0.33911460638046265 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
Hi, you can do the following to load this data into a `Dataset`: ```python from datasets import Dataset examples = [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] keys = examples[0].keys() values = [ex.values() for ex in examples] dataset = Dataset.from_dict({k: list(v) for k, v in zip(keys, zip(*values))}) ``` Let us know if this works for you.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
93
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. Hi, you can do the following to load this data into a `Dataset`: ```python from datasets import Dataset examples = [ { "name": "mike", "friends": [ "tom", "lily" ], "articles": [ { "title": "aaaaa", "reader": [ "tom", "lucy" ] } ] }, { "name": "tom", "friends": [ "mike", "bbb" ], "articles": [ { "title": "xxxxx", "reader": [ "tom", "qqqq" ] } ] } ] keys = examples[0].keys() values = [ex.values() for ex in examples] dataset = Dataset.from_dict({k: list(v) for k, v in zip(keys, zip(*values))}) ``` Let us know if this works for you.
[ -0.2856697142124176, 0.04891194403171539, -0.03692390397191048, 0.2954740524291992, 0.17613010108470917, -0.092518150806427, 0.007642656564712524, 0.09410903602838516, 0.17522722482681274, 0.03599965572357178, -0.2266494780778885, 0.41464802622795105, -0.43150731921195984, 0.632694661617279, -0.16800431907176971, -0.18359503149986267, 0.25402525067329407, -0.005701057612895966, 0.28156107664108276, 0.06755565106868744, -0.11435229331254959, 0.021000711247324944, 0.09421133995056152, -0.10120651125907898, -0.2402513176202774, -0.4843246042728424, -0.13839592039585114, 0.10614308714866638, -0.27593979239463806, -0.5049468874931335, 0.2628544270992279, -0.07578474283218384, 0.35897544026374817, 0.2296425849199295, -0.00012121966574341059, 0.029350340366363525, 0.1541253626346588, -0.1582918018102646, -0.16816942393779755, -0.27608221769332886, -0.033887218683958054, -0.3862591087818146, 0.2224016785621643, -0.35207799077033997, 0.02650376409292221, -0.5047533512115479, -0.06311497837305069, -0.438708633184433, 0.4396781325340271, 0.10202169418334961, 0.10481046140193939, -0.095322385430336, 0.29542475938796997, 0.18992184102535248, 0.05898558348417282, 0.6107460260391235, -0.1372825652360916, 0.38340964913368225, 0.0041532739996910095, 0.1410955786705017, 0.4431878924369812, -0.010214859619736671, -0.20976251363754272, -0.1612376719713211, 0.32010555267333984, 0.017132055014371872, -0.02917233109474182, -0.3698999583721161, -0.13520821928977966, 0.16602231562137604, 0.5845975279808044, -0.365229070186615, -0.2983252704143524, -0.3096165657043457, -0.22813646495342255, -0.1148657575249672, 0.003970324993133545, 0.11020030826330185, -0.19817401468753815, 0.2807423174381256, 0.22018250823020935, -0.33085960149765015, -0.18074533343315125, 0.4849873185157776, -0.061099596321582794, 0.14617551863193512, -0.11929631233215332, 0.1419629454612732, -0.1227736622095108, -0.18038389086723328, 0.09963919222354889, -0.2622882127761841, 0.2115785777568817, 0.05403650924563408, -0.029606830328702927, -0.04147277772426605, -0.3642193675041199, 0.12439502775669098, 0.06350475549697876, 0.26240891218185425, 0.10647909343242645, -0.013124212622642517, 0.24165096879005432, 0.20264407992362976, 0.445749431848526, -0.20233014225959778, 0.07073912024497986, 0.40321075916290283, 0.28887656331062317, -0.26164668798446655, 0.043967943638563156, -0.16405746340751648, -0.3500641882419586, 0.08127196878194809, 0.4830954074859619, -0.3407319188117981, 0.5467663407325745, 0.031804006546735764, -0.19896352291107178, 0.056757375597953796, -0.2073790431022644, 0.09300469607114792, -0.005970011465251446, 0.33410272002220154, -0.2197188138961792, 0.17381614446640015, -0.1130865216255188, 0.6057111024856567, 0.09689667075872421, 0.2678098976612091, 0.0694802775979042, -0.05942361429333687, 0.03339553251862526, 0.032949529588222504, 0.14192432165145874, -0.19070874154567719, 0.04524051398038864, 0.06793585419654846, -0.19667686522006989, -0.30199623107910156, 0.009789427742362022, -0.3076050579547882, 0.3215046525001526, 0.17868517339229584, -0.0007933713495731354, 0.24413509666919708, 0.05546950548887253, -0.33343303203582764, -0.08569197356700897, 0.1601165533065796, -0.24566760659217834, -0.4013803005218506, -0.47040116786956787, 0.046439483761787415, -0.27031058073043823, -0.20092634856700897, -0.42333492636680603, 0.1407177597284317, 0.4591405391693115, -0.02703065425157547, -0.16290730237960815, -0.18514299392700195, -0.22726808488368988, -0.5391335487365723, 0.06163670867681503, -0.13013200461864471, -0.4910518229007721, 0.023860670626163483, -0.41318225860595703, 0.03346828371286392, 0.0880383625626564, 0.4129675626754761, -0.06443964689970016, 0.3483411967754364, 0.03598276525735855, 0.3879741430282593, 0.6230754852294922, -0.24502001702785492, -0.445557564496994, -0.012327849864959717, 0.4037216305732727, 0.14891061186790466, -0.17651551961898804, 0.3048388957977295, 0.5396370887756348, -0.08554057031869888, -0.21409296989440918, 0.10270652174949646, 0.0024452656507492065, 0.011791428551077843, -0.1402403563261032, -0.045989878475666046, 0.41482657194137573, 0.07514099776744843, -0.17318080365657806, -0.2115936279296875, 0.19601257145404816, -0.28319382667541504, 0.1302320957183838, 0.09190055727958679, 0.1341876983642578, 0.1718767136335373, 0.4094122648239136, 0.5433162450790405, 0.004291831981390715, -0.3294646739959717, -0.38446685671806335, 0.11485361307859421, -0.12755028903484344, -0.32569441199302673, -0.5862296223640442, -0.2956007719039917, -0.2968486249446869, 0.26549232006073, -0.22534801065921783, 0.10461737215518951, 0.02338642254471779, -0.14603257179260254, -0.1592217981815338, 0.1599627435207367, -0.31972160935401917, 0.03398656100034714, 0.006549285724759102, 0.03290622681379318, 0.08613316714763641, 0.3561079800128937, -0.09284424781799316, -0.5181421041488647, 0.12407352030277252, 0.28051888942718506, 0.0706995278596878, 0.10268926620483398, -0.041844360530376434, 0.274091899394989, 0.23307205736637115, -0.2299736589193344, -0.3369729518890381, 0.2312609851360321, -0.0221672635525465, -0.3557399809360504, 0.12608279287815094, 0.12929245829582214, 0.24923831224441528, -0.025109946727752686, -0.10843228548765182, 0.33439356088638306, 0.27631619572639465, 0.017638318240642548, -0.24071252346038818, 0.19015759229660034, 0.12519758939743042, 0.14638382196426392, -0.08318756520748138, -0.09664203226566315, -0.23154248297214508, -0.029972553253173828, 0.039729852229356766, 0.1298667937517166, -0.5606171488761902, 0.07129140943288803, 0.36285677552223206, 0.05523156002163887, 0.49661535024642944, 0.006490275263786316, -0.028109073638916016, -0.1260259747505188, 0.23445387184619904, 0.03431413695216179, 0.24399042129516602, 0.044807903468608856, -0.1889478862285614, -0.1232002004981041, 0.03251533582806587, -0.03258794546127319, 0.03981573134660721, 0.17069458961486816, 0.47879356145858765, 0.1793331801891327, 0.1353461891412735, 0.07057883590459824, -0.007746368646621704, 0.15291032195091248, -0.1868608146905899, 0.0215739943087101, -0.3932459354400635, 0.2597409188747406, -0.18917779624462128, -0.34116506576538086, 0.07172457128763199, -0.17984387278556824, -0.11243297159671783, -0.2484552264213562, -0.1268179714679718, 0.051993366330862045, -0.012092562392354012, 0.18028125166893005, 0.41025853157043457, 0.15161541104316711, -0.1177888959646225, -0.46254149079322815, -0.14616549015045166, -0.4068710505962372, -0.1081370934844017, -0.029053805395960808, 0.11828334629535675, 0.12930463254451752, 0.3737325370311737, -0.03751581907272339, 0.2248941957950592, -0.29880598187446594, -0.19500643014907837, -0.1388472020626068, -0.07497411221265793, -0.05451488494873047, -0.0024956241250038147, 0.3713655471801758, -0.1401948779821396, -0.14462049305438995, -0.016638390719890594, -0.10917209088802338, -0.06999985873699188, 0.0943959504365921, -0.04156823828816414, -0.040339767932891846, 0.20531828701496124, -0.059352807700634, -0.8583188056945801, -0.15646877884864807, 0.332851767539978, 0.3435879647731781, 0.033775635063648224, -0.07367449998855591, 0.10390464216470718, -0.15375155210494995, -0.11722023785114288, -0.03549607843160629, -0.015532175078988075, -0.2680869400501251, 0.6005047559738159, -0.24759750068187714, -0.37122872471809387, 0.21665358543395996, -0.14382117986679077, 0.060072071850299835, -0.01422564871609211, 0.08750754594802856, 0.472667932510376, -0.046441227197647095, 0.42934128642082214, 0.02830083854496479, -0.12365621328353882, 0.2986907362937927, 0.13699519634246826, 0.18805325031280518, -0.015102151781320572, 0.17690865695476532, 0.25796347856521606, 0.03810473904013634, 0.1637580394744873, -0.05981871485710144, 0.15147265791893005, 0.018788795918226242, 0.2478969544172287, 0.1197221577167511, -0.15464091300964355, 0.4252411127090454, -0.11024805158376694, 0.27817004919052124, -0.02613844722509384, -0.1024717316031456, -0.12881353497505188, -0.15068891644477844, 0.04488047957420349, 0.04613593593239784, 0.08398827165365219, -0.21246640384197235, -0.028829416260123253, -0.15922798216342926, -0.03193702548742294, -0.1974443644285202, 0.14203239977359772, -0.5685598850250244, 0.3177013099193573, -0.07780901342630386, -0.120572030544281, -0.013799449428915977, -0.1891201138496399, -0.077355295419693, 0.19082117080688477, 0.09615816175937653, 0.20222358405590057, -0.008853994309902191, 0.15805229544639587, -0.3908391296863556, 0.2159329652786255, 0.24221187829971313, 0.05267206206917763, -0.16139686107635498, -0.009829822927713394, 0.18053996562957764, 0.20016473531723022, -0.03327299654483795, -0.05044535547494888, -0.2560589909553528, -0.13357879221439362, 0.03294114023447037, -0.5067489147186279, 0.11843521893024445, -0.010011419653892517, 0.025486137717962265, 0.030040673911571503, 0.36737096309661865, -0.4127819538116455, -0.016199756413698196, -0.16948248445987701, 0.3126714527606964, -0.31798839569091797, -0.20134246349334717, -0.1354963630437851, -0.1927785873413086, -0.5086801648139954, -0.272951602935791, 0.46073970198631287, -0.0016770348884165287, 0.04283800721168518, -0.1104809045791626, -0.42871230840682983, 0.10295096784830093, -0.11345292627811432, -0.14343960583209991, 0.47994548082351685, -0.43776777386665344, -0.12773466110229492, 0.2868555188179016, 0.20022200047969818, 0.3274325430393219, 0.44426873326301575, 0.09144711494445801, -0.4018632173538208, -0.18655598163604736, 0.06298304349184036, 0.290264368057251, -0.30984747409820557, -0.23683325946331024, -0.059516094624996185, -0.043276265263557434, -0.13709582388401031, -0.36141639947891235, -0.10339122265577316, 0.26247304677963257, -0.003797846380621195, -0.7144715189933777, -0.5395748019218445, 0.4125770628452301, 0.19707246124744415, -0.02771921455860138, -0.02660052478313446, 0.15303918719291687, -0.13412484526634216, 0.5577993392944336, 0.2633276581764221, 0.8369051218032837, -0.170822411775589, 0.38600796461105347, 0.3709445595741272, -0.36626583337783813, 0.31032049655914307, 0.03484860062599182, -0.36619776487350464, -0.37330394983291626, 0.32561570405960083, -0.15081793069839478, 0.04356733337044716, 0.22628480195999146, 0.2361871302127838, -0.29263779520988464, 0.04478053003549576, -0.3811257481575012, -0.23709452152252197, 0.016040388494729996, 0.35971909761428833, -0.009549511596560478, 0.032543331384658813, -0.33725276589393616, 0.07827941328287125, -0.030954323709011078, 0.0969293937087059, -0.09891917556524277, 0.0048986575566232204, -0.3105241656303406, 0.018431365489959717, -0.2310582548379898, -0.1915614902973175, 0.02783343940973282, 0.39828401803970337, 0.10251010954380035, -0.39142531156539917, 0.25622400641441345, 0.5818541646003723, 0.17344260215759277, -0.004854593425989151, -0.1794055700302124, 0.02457757294178009, 0.05397195369005203, -0.10810066759586334, 0.2703409790992737, -0.15113618969917297, 0.3229624927043915, -0.0809687077999115, -0.18215470016002655, 0.022351425141096115, -0.011442074552178383, -0.1420903503894806, -0.17291408777236938, -0.007950879633426666, -0.049727074801921844, -0.3564705550670624, -0.06621681153774261, -0.44188886880874634, -0.026638228446245193, 0.012128032743930817, 0.04389331489801407, 0.35392439365386963, 0.1604396104812622, 0.37384462356567383, -0.11172252893447876, 0.08171449601650238, -0.004521504044532776, 0.15243661403656006, -0.05437669903039932, 0.27966371178627014, 0.37781012058258057, -0.03957246616482735, -0.2724965810775757, -0.1358538419008255, 0.5030571222305298, 0.03167414665222168, -0.09700644016265869, 0.2096053957939148, 0.11030265688896179, 0.12787435948848724, -0.313258558511734, 0.4684438407421112, 0.11654683202505112, -0.3360743224620819, -0.029169389978051186, -0.3738367259502411, -0.38289156556129456, 0.19739124178886414, 0.13450968265533447, 0.25691550970077515, 0.03276943415403366, 0.058600250631570816, 0.013056544587016106, -0.04108986258506775, -0.17508143186569214, 0.007868708111345768, -0.050474848598241806, 0.05527661740779877, 0.17550601065158844, 0.04952872917056084, -0.022334391251206398, -0.2421894073486328, -0.006071200594305992, -0.15272027254104614, 0.1510726660490036, -0.0859103575348854, -0.1604234278202057, 0.18657100200653076, 0.0894692912697792, -0.16862346231937408, 0.08244699984788895, -0.3796803951263428, -0.16313536465168, 0.13916046917438507, -0.22176365554332733, 0.41102197766304016, -0.030910320580005646, 0.10009347647428513, 0.11530160158872604, 0.024863142520189285, -0.037997934967279434, 0.2241344004869461, -0.3059077858924866, 0.10761534422636032, -0.23262245953083038, 0.1671912968158722, 0.06195227801799774, -0.16686035692691803, 0.1264878809452057, 0.18148833513259888, 0.29130789637565613, -0.17051231861114502, 0.46577194333076477, -0.3192030191421509, 0.08737848699092865, -0.19960056245326996, 0.3123023211956024, 0.24666471779346466, -0.12090396136045456, 0.10898330807685852, 0.2264735996723175, 0.04900467395782471, -0.1823289394378662, 0.047978725284338, 0.0929594486951828, -0.09542372077703476, -0.1176794022321701, 0.20029714703559875, 0.12029074132442474, 0.4316866397857666, -0.7079561352729797, -0.07727521657943726, 0.13306882977485657, 0.06259384006261826, 0.19398942589759827, 0.048573173582553864, 0.031231548637151718, -0.013181235641241074, 0.20869022607803345, 0.30579817295074463, 0.18724188208580017, 0.43616586923599243, -0.06575541943311691, 0.11674086004495621, 0.4263697564601898, -0.08230350911617279, 0.4778568744659424, -0.1740691214799881, -0.07761675119400024, -0.3145115077495575, -0.023184701800346375, -0.11254908889532089, 0.3007280230522156, 0.3824794590473175, 0.12449155747890472, -0.3221501111984253, 0.12140687555074692, 0.4845290184020996, -0.004322703927755356, -0.08352555334568024, -0.13074363768100739, -0.024563096463680267, -0.053715161979198456, -0.37687236070632935, -0.36020201444625854, -0.545433521270752, 0.0062990859150886536, 0.29376155138015747, 0.22274598479270935, -0.47009408473968506, 0.49528422951698303, 0.05650307983160019, 0.20268148183822632, -0.008015252649784088, 0.16364997625350952, -0.15670086443424225, -0.03960330784320831, -0.018450036644935608, 0.07242170721292496, 0.5308026075363159, 0.20710058510303497, -0.17744781076908112, 0.4039842486381531, -0.14850151538848877, -0.26137155294418335, 0.0007312372326850891, -0.05353420972824097, 0.06012480705976486, 0.2574838697910309, 0.43662941455841064, 0.03719227761030197, 0.04390181601047516, 0.023756910115480423, 0.089964359998703, 0.2652658522129059, -0.06440722942352295, 0.516032874584198, -0.24753540754318237, -0.28203490376472473, -0.011183787137269974, -0.020445168018341064, -0.06237494572997093, -0.24699537456035614, 0.4320985674858093, 0.14458723366260529, 0.256958544254303, -0.2672494053840637, 0.020396150648593903, 0.028981313109397888, 0.5063239932060242, 0.11822043359279633, 0.6070606112480164, -0.037514567375183105, -0.03133920952677727, -0.46561959385871887, -0.1290891468524933, -0.13421645760536194, -0.22494050860404968, 0.12774938344955444, 0.07060489803552628, -0.03668571263551712, 0.501250147819519, 0.04559774696826935, 0.4711269438266754, -0.02991596981883049, 0.16298112273216248, -0.12187734246253967, -0.12084200978279114, -0.11373376846313477, 0.13522329926490784, 0.06013181060552597, -0.10078059881925583, 0.2258528172969818, -0.09116145223379135, 0.051986873149871826, -0.20249217748641968, -0.08396878838539124, -0.06879016757011414, -0.37748387455940247, 0.2490074336528778, -0.03974291682243347, 0.29313987493515015, 0.11435957998037338, 0.1087021753191948, 0.27038484811782837, -0.023246824741363525, -0.272414892911911, 0.45811206102371216, -0.026850249618291855, 0.311520516872406, -0.38281047344207764, 0.3603464365005493, -0.03828761726617813, -0.21425144374370575, -0.13535428047180176, -0.08595936000347137, -0.1741980016231537, 0.030894560739398003, 0.15187445282936096, 0.12918627262115479, -0.030015408992767334, 0.08150672912597656, -0.21362975239753723, 0.16777580976486206, -0.25868725776672363, -0.1427023559808731, 0.5019128918647766, 0.10706297308206558, -0.1688990443944931, 0.2149924635887146, 0.010292910039424896, 0.4040277302265167, 0.130759596824646, -0.31115904450416565, 0.03070961683988571, 0.43749141693115234, -0.11015220731496811, 0.06013612821698189, 0.05763818323612213, 0.13473005592823029, -0.03298049420118332, -0.11605730652809143, 0.5957218408584595, -0.13415518403053284, 0.2520400583744049, 0.026884522289037704, -0.3416142463684082 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
Thank you so much, and that works! I also have a question that if the dataset is very large, that cannot be loaded into the memory. How to create the Dataset?
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
31
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. Thank you so much, and that works! I also have a question that if the dataset is very large, that cannot be loaded into the memory. How to create the Dataset?
[ -0.27232393622398376, 0.00775560736656189, -0.03358485922217369, 0.33133596181869507, 0.1474168598651886, -0.07705648243427277, -0.06608271598815918, 0.012047449126839638, 0.0752720981836319, 0.12298750877380371, -0.17316313087940216, 0.31338098645210266, -0.43195468187332153, 0.5779838562011719, -0.06956813484430313, -0.23895767331123352, 0.27621451020240784, 0.0760909914970398, 0.21646474301815033, -0.006268348544836044, -0.11674197018146515, -0.014483718201518059, 0.062419354915618896, -0.14137929677963257, -0.28448206186294556, -0.4980390965938568, -0.1976483315229416, 0.17112919688224792, -0.4135589003562927, -0.49899113178253174, 0.2010754495859146, -0.06813368201255798, 0.3138076961040497, 0.28755325078964233, -0.00012027153570670635, -0.09889194369316101, 0.15174803137779236, -0.21393822133541107, -0.08759407699108124, -0.21765737235546112, -0.06265362352132797, -0.3494538366794586, 0.18562650680541992, -0.3744637668132782, 0.048812754452228546, -0.46177926659584045, 0.08959793299436569, -0.24552415311336517, 0.3802913427352905, 0.21230293810367584, 0.10834582149982452, -0.10206717252731323, 0.33372762799263, 0.1387738138437271, 0.2244870364665985, 0.5536155700683594, -0.16023385524749756, 0.34496450424194336, 0.02033451944589615, 0.1849881410598755, 0.38432276248931885, -0.10570396482944489, -0.13187184929847717, -0.1821802705526352, 0.3973282277584076, -0.041519101709127426, -0.08876880258321762, -0.4944145381450653, -0.08419794589281082, 0.19480368494987488, 0.7593100070953369, -0.44772276282310486, -0.22669370472431183, -0.1608160436153412, -0.22144097089767456, -0.09483204782009125, 0.01089680939912796, 0.24653545022010803, -0.24182745814323425, 0.21716099977493286, 0.1256927102804184, -0.4189334511756897, -0.35561704635620117, 0.4478439688682556, -0.06397081166505814, 0.2398035228252411, -0.07032990455627441, 0.13059794902801514, -0.11457143723964691, -0.08669141680002213, 0.07029207050800323, -0.1638026237487793, 0.1005726158618927, 0.15693622827529907, -0.007792558521032333, -0.09937014430761337, -0.43928027153015137, 0.24446696043014526, 0.13117146492004395, 0.29883551597595215, 0.09620711952447891, -0.04428032040596008, 0.3254300653934479, 0.20300215482711792, 0.4563649296760559, -0.12953564524650574, -0.03433056175708771, 0.3509792685508728, 0.47083091735839844, -0.41119107604026794, 0.07932044565677643, -0.14613467454910278, -0.3257579803466797, 0.12134592980146408, 0.45966148376464844, -0.385761022567749, 0.4507371187210083, 0.018676582723855972, -0.06748861074447632, 0.07626662403345108, -0.1422472596168518, 0.08387896418571472, -0.02007889375090599, 0.3746221959590912, -0.2849637269973755, 0.03564354032278061, -0.18206514418125153, 0.5128688216209412, -0.001684773713350296, 0.29073384404182434, 0.10760444402694702, 0.03586491942405701, -0.03959725424647331, 0.07305693626403809, 0.17750996351242065, -0.15936000645160675, 0.1261923909187317, 0.10048475116491318, -0.16804805397987366, -0.174510657787323, 0.11696426570415497, -0.38052526116371155, 0.2957403361797333, 0.25883376598358154, 0.016045402735471725, 0.18121199309825897, -0.15021191537380219, -0.20762543380260468, -0.09219659119844437, 0.2719935178756714, -0.15460342168807983, -0.5398169755935669, -0.533070981502533, 0.054601360112428665, -0.27300527691841125, -0.18329796195030212, -0.31854504346847534, 0.15311090648174286, 0.4208408296108246, -0.03682134300470352, -0.012401454150676727, -0.16303464770317078, -0.12786735594272614, -0.6147215366363525, 0.0856519341468811, -0.12552113831043243, -0.4851507544517517, 0.12290062010288239, -0.3247624635696411, -0.09877152740955353, 0.10905724763870239, 0.4521111845970154, -0.07078660279512405, 0.3401068449020386, 0.05631124973297119, 0.35878705978393555, 0.7113140225410461, -0.21807819604873657, -0.4243234694004059, -0.0702987015247345, 0.4794398546218872, -0.0058624353259801865, -0.05797991901636124, 0.39669451117515564, 0.5118688344955444, -0.048029329627752304, -0.3228687047958374, 0.13007371127605438, -0.05152837187051773, -0.040415920317173004, -0.15373435616493225, -0.007846688851714134, 0.39939069747924805, 0.05817895010113716, -0.06244157627224922, -0.24508488178253174, 0.27893152832984924, -0.15952642261981964, 0.07474565505981445, -0.0010709874331951141, 0.10936685651540756, 0.10449717193841934, 0.4632633924484253, 0.5171380639076233, 0.09174385666847229, -0.2976777255535126, -0.36712875962257385, 0.08607477694749832, -0.24138373136520386, -0.23849418759346008, -0.4375576972961426, -0.2809779644012451, -0.23250025510787964, 0.18450655043125153, -0.15356172621250153, 0.0133440550416708, -0.0315263457596302, -0.13567519187927246, 0.023483622819185257, 0.15949749946594238, -0.4104890823364258, 0.09245779365301132, -0.03930759057402611, 0.01627575047314167, 0.05468166247010231, 0.2408662885427475, -0.1573646068572998, -0.5781390070915222, 0.10610714554786682, 0.30171990394592285, -0.06896253675222397, 0.04168034717440605, 0.011187739670276642, 0.3606553375720978, 0.2074422836303711, -0.17658723890781403, -0.38777104020118713, 0.21464848518371582, 0.06409864872694016, -0.367677241563797, 0.1983046978712082, 0.07482264935970306, 0.2533243000507355, -0.021549608558416367, -0.12564167380332947, 0.20049414038658142, 0.2751394808292389, -0.10846828669309616, -0.07671652734279633, 0.04661545157432556, 0.15862220525741577, 0.11102624237537384, -0.04139847308397293, 0.003036297857761383, -0.1252223253250122, -0.030182871967554092, 0.1659463793039322, 0.17866070568561554, -0.6875718235969543, 0.02520674467086792, 0.43188443779945374, -0.0037635695189237595, 0.48256975412368774, -0.03636343032121658, -0.10582198947668076, -0.18324345350265503, 0.25555551052093506, -0.05492333695292473, 0.2452315390110016, 0.06513860821723938, -0.1634279042482376, -0.06541033089160919, -0.05741889029741287, -0.1317063868045807, 0.03826534003019333, 0.11370500922203064, 0.4122776389122009, 0.18309104442596436, 0.1618247926235199, -0.04660535231232643, -0.16627205908298492, 0.1843382567167282, -0.15084059536457062, 0.00238814577460289, -0.3080715537071228, 0.14320369064807892, -0.0645182877779007, -0.41577252745628357, 0.06532050669193268, -0.1595943123102188, -0.2017178237438202, -0.12905253469944, 0.006043123081326485, 0.052683912217617035, 0.052001919597387314, 0.10465129464864731, 0.41181451082229614, 0.298861026763916, -0.12283742427825928, -0.2645310163497925, -0.2101127654314041, -0.3297555446624756, -0.12630409002304077, -0.011247258633375168, 0.06759914010763168, 0.14805395901203156, 0.47149235010147095, -0.04068410396575928, 0.23070651292800903, -0.3062478303909302, -0.19263240694999695, -0.04087809473276138, -0.10029368102550507, 0.02424546331167221, 0.0078026652336120605, 0.39749205112457275, -0.06430263817310333, -0.18733173608779907, -0.06524955481290817, -0.204680398106575, -0.14425064623355865, 0.030260059982538223, -0.11697342246770859, -0.08286243677139282, 0.12137393653392792, -0.1776873767375946, -0.854157030582428, -0.19058732688426971, 0.42020684480667114, 0.3776106834411621, 0.08835580945014954, -0.0926022082567215, 0.044257692992687225, -0.06917465478181839, -0.11015883833169937, 0.04762740433216095, -0.04838191717863083, -0.4029608964920044, 0.6650777459144592, -0.36385026574134827, -0.46889528632164, 0.2904838025569916, -0.10852917283773422, 0.1245305985212326, -0.013536827638745308, -0.03700566664338112, 0.4082782566547394, -0.12978129088878632, 0.4020398259162903, 0.05989541485905647, 0.0274000633507967, 0.2436961978673935, 0.009072747081518173, 0.17972885072231293, -0.09241572767496109, 0.11975517868995667, 0.21417416632175446, 0.1347229927778244, 0.34568747878074646, -0.05616111308336258, 0.15803596377372742, -0.03286689519882202, 0.3319842219352722, 0.061019014567136765, -0.03425642475485802, 0.41592904925346375, -0.12190061062574387, 0.36142587661743164, -0.04652007669210434, 0.006681011989712715, 0.055216867476701736, -0.14596134424209595, -0.011130076833069324, 0.1058519259095192, 0.11183406412601471, -0.3828294277191162, -0.04980209842324257, -0.18836620450019836, 0.015854772180318832, -0.07814174890518188, 0.1724586933851242, -0.47918784618377686, 0.2654164135456085, -0.15131595730781555, -0.1574133187532425, 0.022455479949712753, -0.19816988706588745, -0.06305335462093353, 0.15864934027194977, 0.09357136487960815, 0.21893346309661865, -0.052205972373485565, -0.005062765441834927, -0.49386632442474365, 0.13054892420768738, 0.23287785053253174, 0.022281251847743988, -0.14477047324180603, -0.02693544328212738, 0.28090494871139526, 0.13498850166797638, 0.10314315557479858, -0.04454080015420914, -0.33156174421310425, -0.10954342782497406, 0.05177944153547287, -0.43851155042648315, 0.165896937251091, -0.06298758089542389, 0.06762699037790298, 0.045161642134189606, 0.2955596446990967, -0.3560396134853363, -0.01402063574641943, -0.12161065638065338, 0.34849557280540466, -0.36107921600341797, -0.17941094934940338, -0.15703155100345612, -0.26365792751312256, -0.4634804129600525, -0.22464311122894287, 0.3272731900215149, -0.08514833450317383, 0.20094840228557587, -0.16073310375213623, -0.32521042227745056, 0.0007555410265922546, -0.1558561474084854, -0.022104986011981964, 0.4108928442001343, -0.40577879548072815, -0.13932771980762482, 0.30099743604660034, 0.25400155782699585, 0.3001537621021271, 0.47778406739234924, 0.011661719530820847, -0.2712303698062897, -0.0929110050201416, 0.08717676997184753, 0.4172765910625458, -0.2592758238315582, -0.2191578894853592, -0.05180985480546951, -0.11362077295780182, -0.08230246603488922, -0.34445303678512573, -0.06574548035860062, 0.20505808293819427, -0.04593624919652939, -0.7719858288764954, -0.5602836012840271, 0.3869163393974304, 0.2202918380498886, 0.02035307139158249, -0.043258294463157654, 0.21194064617156982, -0.12325415015220642, 0.5424810647964478, 0.3151695430278778, 0.9842780232429504, -0.20493482053279877, 0.4104807376861572, 0.31246650218963623, -0.3715565800666809, 0.36924728751182556, -0.12943291664123535, -0.2402050942182541, -0.3524492084980011, 0.3045666217803955, -0.1524687558412552, -0.0004672929644584656, 0.2512146234512329, 0.12520021200180054, -0.33260637521743774, 0.036688487976789474, -0.23550130426883698, -0.21961882710456848, -0.0706411600112915, 0.5262097716331482, -0.09471087902784348, 0.03246413916349411, -0.31723541021347046, 0.06774906814098358, 0.07419552654027939, 0.006095878779888153, -0.11727574467658997, 0.013400128111243248, -0.1907132863998413, 0.02635713666677475, -0.21654924750328064, -0.2170373499393463, -0.05631515756249428, 0.32950329780578613, 0.07047474384307861, -0.4314473867416382, 0.1900765299797058, 0.5449612736701965, 0.22347262501716614, 0.030779674649238586, -0.212630495429039, 0.042006030678749084, 0.06306812912225723, -0.16717295348644257, 0.18413078784942627, -0.04654192924499512, 0.42240244150161743, -0.17942523956298828, -0.19335338473320007, 0.054154329001903534, -0.10878469049930573, -0.23363028466701508, -0.3441562056541443, -0.06601324677467346, -0.013721585273742676, -0.1989690363407135, 0.026765216141939163, -0.44724583625793457, -0.041777629405260086, 0.03147253766655922, 0.056756485253572464, 0.3994975686073303, 0.16304586827754974, 0.46897080540657043, -0.11310315132141113, 0.020066335797309875, -0.1455465853214264, 0.06734684854745865, 0.08987055718898773, 0.2726691663265228, 0.2975701689720154, 0.018256250768899918, -0.25829175114631653, -0.12583069503307343, 0.4669545888900757, 0.1385326236486435, -0.1383715569972992, 0.19229179620742798, 0.11180662363767624, 0.09847736358642578, -0.3236132264137268, 0.5095869302749634, 0.20697571337223053, -0.39881670475006104, -0.15800510346889496, -0.2553686201572418, -0.4718836843967438, 0.2013961374759674, 0.18363018333911896, 0.3284222185611725, 0.058296121656894684, 0.040969040244817734, 0.13042376935482025, 0.10565908253192902, -0.1835724115371704, -0.04391247779130936, -0.09522148221731186, 0.15195640921592712, 0.17143452167510986, 0.08048595488071442, -0.06007293611764908, -0.2175813764333725, -0.05718212574720383, -0.122017040848732, 0.093260258436203, -0.07883164286613464, -0.1427467316389084, 0.212827667593956, 0.1266993135213852, -0.18823844194412231, 0.056532081216573715, -0.4384981393814087, -0.0879150778055191, 0.15475760400295258, -0.0857401043176651, 0.349483847618103, -0.08727215230464935, 0.04257519543170929, 0.12634535133838654, -0.015262268483638763, -0.03181939572095871, 0.20162279903888702, -0.17149770259857178, 0.13125935196876526, -0.1559436023235321, 0.1554669737815857, 0.03381327539682388, -0.23134854435920715, 0.2518278658390045, 0.11075667291879654, 0.28070926666259766, -0.218287855386734, 0.3831953704357147, -0.2193218618631363, 0.05984051898121834, -0.27062565088272095, 0.3563498854637146, 0.3107168674468994, -0.059489935636520386, 0.1692950278520584, 0.3296414911746979, 0.016805220395326614, -0.19652897119522095, -0.023486878722906113, -0.0028802156448364258, -0.14995062351226807, -0.11493892967700958, 0.18190217018127441, 0.20693236589431763, 0.39825087785720825, -0.7131311893463135, -0.04775324463844299, 0.16025464236736298, 0.06738177686929703, 0.08533540368080139, 0.046679966151714325, -0.15532618761062622, -0.014355335384607315, 0.20132555067539215, 0.3755820393562317, 0.15600350499153137, 0.5233563780784607, -0.04842130094766617, 0.21996580064296722, 0.4709005355834961, -0.0866340845823288, 0.5086178183555603, -0.06063385307788849, -0.1287526935338974, -0.3366003632545471, 0.03026214987039566, -0.16792529821395874, 0.25740310549736023, 0.39140185713768005, 0.1623523235321045, -0.29517683386802673, 0.08790946751832962, 0.4683949053287506, -0.0019765011966228485, -0.09396828711032867, -0.12164787203073502, -0.11849337816238403, 0.042772747576236725, -0.22745898365974426, -0.34523147344589233, -0.5257737040519714, 0.1253984570503235, 0.28452396392822266, 0.1502963900566101, -0.3566373288631439, 0.574862003326416, -0.015288490802049637, 0.13356322050094604, -0.023406729102134705, 0.27509966492652893, -0.16286639869213104, -0.105165496468544, -0.1668432652950287, 0.14931362867355347, 0.4687006175518036, 0.3185719847679138, -0.18780484795570374, 0.4099746644496918, -0.1455456167459488, -0.262172132730484, -0.008776352740824223, 0.08081486076116562, 0.1458849459886551, 0.19134686887264252, 0.38246986269950867, -0.011753830127418041, 0.050433963537216187, 0.12335622310638428, 0.13790377974510193, 0.17803405225276947, -0.0310953501611948, 0.4093843996524811, -0.22343993186950684, -0.28806447982788086, 0.013332130387425423, -0.0031942948698997498, -0.2659607231616974, -0.19531258940696716, 0.37894847989082336, 0.032626379281282425, 0.20024284720420837, -0.32585030794143677, 0.009410103783011436, -0.00006162934005260468, 0.6366890668869019, 0.18907305598258972, 0.6842775940895081, 0.0008038245141506195, -0.11005523800849915, -0.4394080340862274, -0.07878632098436356, -0.14879825711250305, -0.140313982963562, 0.04419470578432083, 0.1181304007768631, -0.07634282857179642, 0.4245954155921936, 0.14327609539031982, 0.4282590448856354, -0.04800714924931526, 0.13887521624565125, -0.08443187177181244, -0.0526336170732975, -0.11939166486263275, 0.19636262953281403, -0.026859814301133156, -0.06029387563467026, 0.354554146528244, -0.1976446658372879, 0.0021770335733890533, -0.1862408071756363, -0.0330311581492424, 0.02604302391409874, -0.3248860239982605, 0.35007238388061523, -0.03692891448736191, 0.26338690519332886, 0.06435013562440872, 0.11546166986227036, 0.31983768939971924, -0.02967986650764942, -0.20343878865242004, 0.30493664741516113, 0.10731640458106995, 0.241683691740036, -0.38683703541755676, 0.25445830821990967, -0.025441857054829597, -0.12010063976049423, -0.23268228769302368, 0.0141725093126297, -0.12134875357151031, -0.023603420704603195, 0.08227125555276871, -0.007475750055164099, 0.0068535590544342995, 0.09090612828731537, -0.2743730843067169, -0.0275849848985672, -0.29206418991088867, -0.10416944324970245, 0.48389196395874023, 0.02229716256260872, -0.16797785460948944, 0.018059615045785904, -0.04050542414188385, 0.4224330484867096, 0.12095773220062256, -0.42293334007263184, 0.09669982641935349, 0.3826315701007843, -0.1275714933872223, -0.044939614832401276, 0.1041649878025055, 0.15811531245708466, -0.03966765105724335, -0.09489250183105469, 0.6039978265762329, -0.1448591947555542, 0.12852144241333008, 0.03278437629342079, -0.4027279019355774 ]
https://github.com/huggingface/datasets/issues/2426
Saving Graph/Structured Data in Datasets
If your dataset doesn't fit in memory, store it in a local file and load it from there. Check out [this chapter](https://huggingface.co/docs/datasets/master/loading_datasets.html#from-local-files) in the docs for more info.
Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help.
28
Saving Graph/Structured Data in Datasets Thanks for this amazing library! And my question is I have structured data that is organized with a graph. For example, a dataset with users' friendship relations and user's articles. When I try to save a python dict in the dataset, an error occurred ``did not recognize Python value type when inferring an Arrow data type''. Although I also know that storing a python dict in pyarrow datasets is not the best practice, but I have no idea about how to save structured data in the Datasets. Thank you very much for your help. If your dataset doesn't fit in memory, store it in a local file and load it from there. Check out [this chapter](https://huggingface.co/docs/datasets/master/loading_datasets.html#from-local-files) in the docs for more info.
[ -0.23781074583530426, -0.16622920334339142, 0.03302117437124252, 0.3780064582824707, 0.21346639096736908, -0.09449594467878342, -0.08194220066070557, 0.005801115185022354, 0.23068073391914368, 0.11157462745904922, -0.32866233587265015, 0.27271541953086853, -0.4143137037754059, 0.754198431968689, 0.03441222012042999, -0.21241706609725952, 0.24682405591011047, -0.009473800659179688, 0.21309633553028107, 0.0727863758802414, -0.14705953001976013, 0.07666013389825821, 0.12248416244983673, -0.06557425856590271, -0.34240853786468506, -0.46351107954978943, -0.14451658725738525, 0.22163543105125427, -0.2589557468891144, -0.4306832551956177, 0.23779241740703583, -0.023245375603437424, 0.3134657144546509, 0.27550774812698364, -0.0001271783112315461, 0.019232824444770813, 0.143993079662323, -0.19806942343711853, -0.15017002820968628, -0.22639994323253632, -0.010566014796495438, -0.2625780701637268, 0.2062535285949707, -0.2558066248893738, -0.024974599480628967, -0.4207346439361572, 0.0195485707372427, -0.21410593390464783, 0.4344235062599182, 0.06299159675836563, 0.05103238299489021, 0.08885817974805832, 0.29634422063827515, 0.1291373372077942, 0.0012460574507713318, 0.7133292555809021, -0.0915168970823288, 0.43532609939575195, -0.0811256617307663, 0.1337205320596695, 0.4062708616256714, 0.03240251913666725, -0.11931362003087997, -0.1696987748146057, 0.4198615849018097, 0.032790493220090866, -0.10764438658952713, -0.29307183623313904, -0.07996897399425507, 0.19583699107170105, 0.5325227975845337, -0.3814706802368164, -0.2554699182510376, -0.4010111689567566, -0.18333971500396729, -0.1577877700328827, 0.10922940075397491, 0.10167762637138367, -0.218246728181839, 0.2751453220844269, 0.0796678438782692, -0.4316374361515045, -0.22439642250537872, 0.4626234173774719, -0.030558619648218155, 0.13907219469547272, -0.2182299941778183, 0.13484248518943787, -0.009731929749250412, -0.1697135865688324, -0.15911923348903656, -0.21669280529022217, 0.15306346118450165, 0.10461051017045975, 0.02199896052479744, -0.049446865916252136, -0.3984915316104889, 0.30545124411582947, 0.17609041929244995, 0.26989203691482544, 0.03971574828028679, 0.04871956631541252, 0.14195682108402252, 0.17736580967903137, 0.4741598963737488, -0.13920147716999054, 0.028949148952960968, 0.2929438054561615, 0.427074670791626, -0.1479548215866089, 0.08256101608276367, -0.17161208391189575, -0.24513809382915497, 0.1686771959066391, 0.290740042924881, -0.4451836943626404, 0.573255717754364, -0.009440109133720398, -0.14988234639167786, 0.0264444537460804, -0.04969709366559982, 0.0983383059501648, 0.03928127512335777, 0.41195330023765564, -0.24856556951999664, 0.07632291316986084, -0.08225557208061218, 0.5677536725997925, 0.0806300938129425, 0.18162889778614044, 0.06758232414722443, -0.1055869609117508, 0.05866735056042671, 0.18839524686336517, 0.11954021453857422, -0.3043014407157898, 0.14314834773540497, 0.049328580498695374, -0.11750850081443787, -0.22988083958625793, -0.10517328977584839, -0.29838576912879944, 0.2503581941127777, 0.18748286366462708, -0.03473616763949394, 0.2177906334400177, 0.026480741798877716, -0.2510601878166199, -0.06145312264561653, 0.07111873477697372, -0.18175774812698364, -0.5472614765167236, -0.4872515797615051, -0.017264660447835922, -0.2963452935218811, -0.18256187438964844, -0.49474021792411804, 0.21539531648159027, 0.40368229150772095, -0.030451152473688126, -0.07725273817777634, -0.03817399591207504, -0.3611599802970886, -0.48732155561447144, 0.19175651669502258, -0.013066992163658142, -0.3687551021575928, -0.07046733051538467, -0.2764272391796112, -0.06379260122776031, 0.036563970148563385, 0.5089988708496094, -0.06152142211794853, 0.38085344433784485, -0.02185792662203312, 0.3172658681869507, 0.6162874698638916, -0.29006290435791016, -0.3519999086856842, -0.043831273913383484, 0.3447294235229492, 0.16396580636501312, -0.1431291103363037, 0.25565487146377563, 0.4974552094936371, -0.05887957662343979, -0.20753133296966553, 0.09132900089025497, -0.015441032126545906, -0.010644806548953056, -0.1777818650007248, -0.08886051177978516, 0.35968267917633057, 0.050407614558935165, -0.15550261735916138, -0.1489335000514984, 0.20176228880882263, -0.2562267780303955, 0.1623857617378235, 0.05183381214737892, 0.1262311041355133, 0.15395843982696533, 0.411893367767334, 0.6746772527694702, -0.0025750123895704746, -0.38067179918289185, -0.47668957710266113, 0.14353296160697937, -0.08690176904201508, -0.29426267743110657, -0.4281318187713623, -0.33495330810546875, -0.2720734179019928, 0.20779982209205627, -0.1555914431810379, 0.04908604919910431, -0.0890742838382721, -0.122606560587883, -0.030336866155266762, 0.24661608040332794, -0.44481635093688965, 0.16913048923015594, -0.06413360685110092, 0.1097603440284729, -0.055586110800504684, 0.302822470664978, -0.0643489807844162, -0.5284361839294434, 0.11002936959266663, 0.3356056809425354, -0.02368175983428955, 0.053889691829681396, -0.007476452738046646, 0.395004004240036, 0.10245856642723083, -0.11472603678703308, -0.2665484845638275, 0.22494082152843475, 0.07731152325868607, -0.3018081486225128, 0.08082817494869232, 0.018889248371124268, 0.2364879995584488, 0.06766029447317123, -0.15509626269340515, 0.26553404331207275, 0.2925461232662201, -0.034726984798908234, -0.1800358146429062, 0.08375492691993713, 0.05685275048017502, 0.17951899766921997, -0.053577832877635956, -0.10411053150892258, -0.08370225131511688, -0.1460360437631607, 0.11541405320167542, 0.20129579305648804, -0.7476038932800293, 0.08178892731666565, 0.4663316011428833, -0.018278947100043297, 0.47628548741340637, 0.05984807759523392, -0.0826508179306984, -0.1684437394142151, 0.24195188283920288, -0.1110011488199234, 0.25051623582839966, 0.020500853657722473, -0.1729886531829834, -0.03283344954252243, -0.023279737681150436, -0.03796440735459328, -0.042299963533878326, 0.14551645517349243, 0.37611448764801025, 0.1378006488084793, 0.12532897293567657, 0.008727198466658592, -0.13856366276741028, 0.2837544083595276, -0.22590406239032745, 0.016491951420903206, -0.4621775150299072, 0.1632550209760666, -0.19305117428302765, -0.4235273599624634, -0.0060294391587376595, -0.10840748250484467, -0.3135072886943817, -0.1574711799621582, -0.10684412717819214, 0.1374976485967636, 0.004007108509540558, 0.12235170602798462, 0.3831169307231903, 0.30421319603919983, -0.143742173910141, -0.2974487841129303, -0.23998254537582397, -0.28234243392944336, -0.09407105296850204, -0.10375998914241791, 0.11341498047113419, 0.18713080883026123, 0.43310996890068054, -0.15672984719276428, 0.16982237994670868, -0.30875033140182495, -0.16281001269817352, -0.022444836795330048, -0.16058923304080963, 0.05542600154876709, 0.06623601913452148, 0.3839932680130005, -0.17759715020656586, -0.13324850797653198, 0.08932694047689438, -0.19247134029865265, -0.12307874113321304, 0.03823728859424591, -0.03540356457233429, -0.007213890086859465, 0.15219226479530334, 0.025362655520439148, -0.7563428282737732, -0.18864260613918304, 0.5028287768363953, 0.25221237540245056, 0.023897860199213028, -0.029634792357683182, -0.019230198115110397, -0.04031458869576454, -0.33162617683410645, 0.01943424716591835, -0.0847092941403389, -0.4716021716594696, 0.5566015839576721, -0.29128819704055786, -0.43453890085220337, 0.2250981628894806, -0.029417313635349274, -0.0016176775097846985, -0.10363005101680756, 0.03563806414604187, 0.22697441279888153, -0.09871671348810196, 0.36929354071617126, 0.03682548180222511, -0.014281628653407097, 0.2845594882965088, -0.0002788398414850235, 0.24003823101520538, -0.023768115788698196, 0.050903115421533585, 0.29910585284233093, 0.1358182728290558, 0.2495034635066986, -0.03811614215373993, 0.18256941437721252, -0.02988671138882637, 0.3044140934944153, 0.11946742236614227, -0.0898287296295166, 0.395366907119751, -0.1584450602531433, 0.4451107382774353, -0.031149856746196747, -0.0932236760854721, 0.04652136564254761, -0.13611748814582825, 0.14882443845272064, 0.130095973610878, 0.15217533707618713, 0.03014819510281086, -0.02273770421743393, -0.18339070677757263, 0.005299258977174759, -0.21691304445266724, 0.14093150198459625, -0.3431178033351898, 0.29716160893440247, -0.06254378706216812, -0.13784530758857727, 0.02453617751598358, -0.21616435050964355, -0.024380601942539215, 0.3769991993904114, 0.14439108967781067, 0.26309287548065186, -0.09813715517520905, 0.0922480970621109, -0.4891062378883362, 0.20302993059158325, 0.24820515513420105, -0.037997324019670486, -0.25324758887290955, -0.025131164118647575, 0.25648462772369385, 0.22465619444847107, 0.12203040719032288, 0.043585069477558136, -0.299081027507782, -0.2979094386100769, -0.11017042398452759, -0.5257936716079712, 0.1900988221168518, 0.0069581493735313416, 0.0007106396369636059, 0.007541509345173836, 0.4951506555080414, -0.459943026304245, -0.17852550745010376, -0.11285629868507385, 0.3327118158340454, -0.3560934066772461, -0.18170788884162903, -0.251567006111145, -0.22212931513786316, -0.5160812735557556, -0.21602743864059448, 0.42485782504081726, -0.05171710252761841, 0.139397993683815, -0.1036185771226883, -0.34148073196411133, 0.07143989950418472, -0.13537932932376862, -0.09086751937866211, 0.4022269546985626, -0.3095940053462982, -0.15470045804977417, 0.4568517208099365, 0.2821016311645508, 0.23656801879405975, 0.4839627146720886, 0.02339031547307968, -0.44145500659942627, -0.20410653948783875, 0.11506588757038116, 0.3530120253562927, -0.16869086027145386, -0.19340001046657562, -0.016523517668247223, 0.05355709046125412, -0.0436285063624382, -0.4761080741882324, -0.006321521941572428, 0.22099436819553375, 0.11451989412307739, -0.7278286218643188, -0.4517303705215454, 0.4075702428817749, 0.19894352555274963, 0.023294061422348022, -0.08695241808891296, 0.3862111568450928, -0.10884074866771698, 0.45110905170440674, 0.17137137055397034, 0.9206200838088989, -0.30425703525543213, 0.4588983356952667, 0.3918343186378479, -0.37486743927001953, 0.42366746068000793, -0.01618237793445587, -0.2834761142730713, -0.2926486134529114, 0.2958173453807831, -0.20138736069202423, 0.12447401881217957, 0.27467402815818787, 0.02974778227508068, -0.23785285651683807, 0.1377849578857422, -0.1944224238395691, -0.15482112765312195, -0.0723191499710083, 0.383333295583725, -0.08240363746881485, -0.049959395080804825, -0.4727930426597595, -0.008290110155940056, -0.044418975710868835, 0.19274355471134186, -0.08332402259111404, 0.0354120247066021, -0.17818108201026917, -0.03542061150074005, -0.2267342209815979, -0.3245779275894165, -0.09478311240673065, 0.21853843331336975, 0.23556366562843323, -0.4162781238555908, 0.19682039320468903, 0.5587387681007385, 0.2532036602497101, -0.024274270981550217, -0.2452733814716339, -0.061534907668828964, -0.06942636519670486, -0.13008415699005127, 0.10392232984304428, -0.12818917632102966, 0.3510264754295349, -0.09883072227239609, -0.15662693977355957, -0.049110107123851776, -0.0027279099449515343, -0.1514798253774643, -0.24723270535469055, -0.06947706639766693, -0.19157783687114716, -0.3497975170612335, -0.04842499643564224, -0.4830571413040161, 0.07853199541568756, -0.020978758111596107, -0.004174314439296722, 0.3805873990058899, 0.15687304735183716, 0.24812185764312744, -0.055226366966962814, 0.05447104573249817, -0.06891892850399017, 0.2019890397787094, -0.20975029468536377, 0.2892904579639435, 0.33492588996887207, -0.024945208802819252, -0.2534465789794922, -0.06437893211841583, 0.4565860629081726, 0.19601301848888397, -0.2084731161594391, 0.1738598644733429, 0.18874554336071014, 0.0873209685087204, -0.37125810980796814, 0.5464473962783813, 0.1676827073097229, -0.48923295736312866, 0.006877042353153229, -0.26617538928985596, -0.4534221887588501, 0.2466021329164505, 0.17061901092529297, 0.2125748246908188, 0.14329150319099426, 0.15799853205680847, 0.0639643743634224, 0.04031237214803696, -0.12877251207828522, -0.018794406205415726, -0.10398650914430618, 0.051050178706645966, 0.3722288906574249, 0.04204149544239044, 0.10126587748527527, -0.26881203055381775, -0.08405566215515137, -0.12873464822769165, 0.12107156217098236, -0.013312751427292824, -0.18687628209590912, 0.23144075274467468, 0.07176010310649872, -0.1721498668193817, 0.06605546921491623, -0.3535124659538269, -0.050274331122636795, 0.07265742868185043, -0.07817500829696655, 0.4331771433353424, 0.020084403455257416, 0.05936324968934059, 0.009809687733650208, 0.029323793947696686, 0.0489453449845314, 0.2316129356622696, -0.15966792404651642, 0.11000458896160126, -0.22220078110694885, 0.05647678300738335, -0.0708731859922409, -0.18992231786251068, 0.21870723366737366, 0.1853518784046173, 0.3831464648246765, -0.18106886744499207, 0.3984711468219757, -0.27203309535980225, -0.0031761005520820618, -0.20610088109970093, 0.38054224848747253, 0.23121550679206848, -0.06320231407880783, 0.17230649292469025, 0.3253188133239746, -0.059883736073970795, -0.17091958224773407, 0.0686492770910263, 0.14017732441425323, -0.13942794501781464, -0.1276976764202118, 0.22668428719043732, 0.1291900873184204, 0.46673107147216797, -0.7082314491271973, -0.05972895398736, 0.11125848442316055, 0.10407262295484543, 0.1130264401435852, -0.022321667522192, -0.01937241479754448, -0.000589463859796524, 0.29225847125053406, 0.4302023947238922, 0.2038753628730774, 0.40659797191619873, -0.05845662206411362, 0.12993194162845612, 0.2378515899181366, 0.0518537200987339, 0.5463643074035645, -0.20189692080020905, -0.1400667130947113, -0.296539306640625, 0.013311870396137238, -0.12726616859436035, 0.1368793249130249, 0.5901454091072083, 0.009080272167921066, -0.3994750380516052, 0.07551874965429306, 0.5644213557243347, 0.0026344433426856995, -0.1513643115758896, -0.036243606358766556, -0.039427027106285095, 0.0034658685326576233, -0.2722339332103729, -0.2876981794834137, -0.558011531829834, 0.12712226808071136, 0.2422330379486084, 0.22799086570739746, -0.44843125343322754, 0.32826676964759827, 0.06885097920894623, 0.25190505385398865, 0.040461186319589615, 0.24939340353012085, -0.19196443259716034, -0.07186305522918701, -0.01721791923046112, 0.2116290181875229, 0.4467223882675171, 0.15131506323814392, -0.09923121333122253, 0.4285171926021576, -0.1903175264596939, -0.17839904129505157, 0.0021040383726358414, 0.005738349631428719, 0.1007184237241745, 0.18639251589775085, 0.41475507616996765, -0.03482535481452942, 0.09071866422891617, 0.026691587641835213, -0.01934271678328514, 0.2751922309398651, -0.16506561636924744, 0.5213028788566589, -0.2983396351337433, -0.20284563302993774, -0.06677435338497162, -0.06712166219949722, -0.213131844997406, -0.04359319061040878, 0.3483562171459198, 0.06392262876033783, 0.253743439912796, -0.2583734691143036, -0.023773685097694397, 0.10268448293209076, 0.5535258054733276, 0.21628662943840027, 0.5189980268478394, 0.06877153366804123, -0.05770104378461838, -0.4912763833999634, -0.12564659118652344, -0.05721155181527138, -0.18385019898414612, 0.03080655448138714, 0.0029728617519140244, -0.07278291136026382, 0.3946725130081177, 0.0961565375328064, 0.42370039224624634, -0.01053583063185215, 0.030910110101103783, -0.03586754947900772, -0.10615529119968414, -0.2830888628959656, 0.1056765764951706, 0.06463263928890228, -0.05371895805001259, 0.30756300687789917, -0.04298007860779762, -0.08011619746685028, -0.12112979590892792, 0.08816424012184143, -0.20889359712600708, -0.41230443120002747, 0.22236700356006622, 0.009239429607987404, 0.2638678550720215, 0.10345005244016647, 0.04527977854013443, 0.2686213552951813, -0.04658988118171692, -0.2727014124393463, 0.38223209977149963, -0.06945136189460754, 0.2768940031528473, -0.46740370988845825, 0.22283461689949036, -0.14843599498271942, -0.07752881199121475, -0.04803581163287163, -0.04369772970676422, -0.13754981756210327, 0.03489399701356888, 0.029730021953582764, -0.02442512847483158, 0.175474151968956, 0.19265586137771606, -0.24060964584350586, 0.03320740908384323, -0.2524898052215576, -0.06865575909614563, 0.592934250831604, 0.022446278482675552, -0.11514522135257721, 0.11168092489242554, 0.04394066333770752, 0.5603381395339966, -0.04738898575305939, -0.5693663358688354, 0.007265627384185791, 0.34085315465927124, -0.06362533569335938, 0.04886782541871071, 0.07117929309606552, 0.08670683205127716, -0.09005852043628693, -0.12791596353054047, 0.6649678945541382, -0.0832025408744812, 0.2170121818780899, 0.16790872812271118, -0.28302931785583496 ]
https://github.com/huggingface/datasets/issues/2424
load_from_disk and save_to_disk are not compatible with each other
Hi, `load_dataset` returns an instance of `DatasetDict` if `split` is not specified, so instead of `Dataset.load_from_disk`, use `DatasetDict.load_from_disk` to load the dataset from disk.
## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
24
load_from_disk and save_to_disk are not compatible with each other ## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in> Hi, `load_dataset` returns an instance of `DatasetDict` if `split` is not specified, so instead of `Dataset.load_from_disk`, use `DatasetDict.load_from_disk` to load the dataset from disk.
[ -0.17922338843345642, -0.2252519577741623, -0.10319451987743378, 0.4437662959098816, 0.17004503309726715, -0.005664996802806854, 0.2880718410015106, 0.3563304841518402, 0.34075117111206055, 0.0764620304107666, 0.07303033769130707, 0.3753906786441803, 0.08483622223138809, 0.15540386736392975, -0.13507360219955444, -0.039158791303634644, 0.27476048469543457, 0.04800647124648094, 0.24219860136508942, -0.11502504348754883, -0.20986267924308777, 0.40055036544799805, -0.20328229665756226, -0.07339988648891449, -0.14468389749526978, -0.006205419078469276, -0.23340345919132233, 0.3358607292175293, 0.33300405740737915, 0.08279422670602798, 0.29477807879447937, -0.21537873148918152, 0.08169957995414734, 0.5532503128051758, -0.00012121232430217788, 0.011239409446716309, 0.16089774668216705, -0.22918745875358582, -0.26928460597991943, -0.6934789419174194, -0.14589858055114746, -0.25484803318977356, 0.06686393916606903, -0.3095529079437256, 0.14611303806304932, -0.06183670833706856, -0.04370025545358658, -0.2818153500556946, 0.5196688175201416, 0.13740777969360352, 0.11334575712680817, 0.13895080983638763, 0.17794814705848694, -0.27033188939094543, -0.07862649112939835, 0.49760544300079346, 0.002521594986319542, 0.3422204852104187, 0.14311149716377258, -0.1392749547958374, 0.1311550736427307, -0.05015086010098457, -0.3340206444263458, -0.1618633270263672, 0.29245176911354065, 0.2686191201210022, 0.2871643006801605, -0.3989810645580292, -0.013145949691534042, 0.10117564350366592, 0.406353622674942, -0.1671680212020874, -0.3311861455440521, -0.31695231795310974, -0.3207160234451294, 0.07089225947856903, 0.4782578647136688, 0.05735266953706741, -0.36608004570007324, 0.1695604771375656, -0.12492258101701736, -0.32151687145233154, 0.008282296359539032, 0.37368518114089966, -0.04334517568349838, -0.002920769155025482, -0.07874875515699387, 0.06958207488059998, 0.2542453706264496, 0.07421679049730301, 0.318252831697464, -0.434198796749115, 0.20934246480464935, 0.07514996081590652, -0.19675369560718536, -0.0305967815220356, -0.16925129294395447, -0.4386783540248871, -0.19107958674430847, 0.389523446559906, 0.24390771985054016, -0.1618511974811554, -0.4091939926147461, 0.3818180561065674, 0.4627959132194519, 0.25502732396125793, 0.1295369565486908, 0.25425758957862854, 0.2904805541038513, 0.06705302745103836, -0.0025627389550209045, 0.08276042342185974, 0.24433869123458862, -0.3209077715873718, 0.3263382017612457, -0.16819250583648682, 0.3287461996078491, -0.13333527743816376, -0.382657915353775, -0.04834701120853424, -0.20595094561576843, -0.09661825001239777, -0.028815116733312607, 0.1742836982011795, 0.17538531124591827, 0.323516309261322, 0.2330275923013687, 0.38274937868118286, -0.17264552414417267, 0.42031747102737427, -0.14077311754226685, -0.005314569920301437, 0.15340635180473328, 0.19776351749897003, 0.13751810789108276, -0.1364085078239441, 0.16925331950187683, 0.11274225264787674, -0.02495884895324707, -0.1497899889945984, -0.0999908298254013, -0.372102826833725, 0.14909687638282776, 0.18335644900798798, 0.33557480573654175, 0.14565475285053253, 0.10027649998664856, -0.36183589696884155, -0.23763200640678406, 0.279768705368042, -0.4703747630119324, -0.16798317432403564, 0.08496811985969543, 0.1425003558397293, -0.2271604686975479, 0.05327592045068741, -0.6181433796882629, -0.005443025380373001, 0.23292431235313416, -0.3323367238044739, 0.034812964498996735, -0.13266243040561676, -0.16556477546691895, -0.4953816831111908, 0.3575299382209778, 0.2533130347728729, -0.31166329979896545, -0.06616565585136414, -0.12825442850589752, -0.10012313723564148, 0.04017885401844978, 0.38604170083999634, -0.05866695195436478, 0.3588564693927765, -0.39233526587486267, 0.130244642496109, 0.5517644286155701, -0.5543698668479919, -0.3297237157821655, 0.4475790560245514, -0.1710851937532425, -0.07194062322378159, 0.009697318077087402, 0.14792759716510773, 0.20117849111557007, -0.1595350056886673, 0.29841476678848267, 0.4097070097923279, 0.029024455696344376, -0.03778570145368576, -0.3559073805809021, -0.17302431166172028, 0.11899591982364655, 0.14873279631137848, -0.03164107725024223, 0.12943024933338165, 0.174907386302948, 0.07356151193380356, 0.29862457513809204, 0.01195221021771431, 0.11106046289205551, 0.3724387288093567, 0.39320170879364014, -0.04310286045074463, -0.11161371320486069, -0.1394798755645752, -0.7380236387252808, 0.2157120704650879, 0.21149218082427979, -0.31541815400123596, -0.007851801812648773, 0.141795352101326, -0.06051809340715408, -0.16064223647117615, -0.16239382326602936, 0.11121317744255066, -0.019043002277612686, -0.02952887862920761, 0.14802400767803192, 0.0633508563041687, -0.23966862261295319, 0.2358974814414978, 0.24640779197216034, 0.0769229531288147, -0.24993719160556793, 0.6901513338088989, -0.09678123146295547, -0.37314605712890625, -0.09136644750833511, -0.04245760291814804, 0.37842458486557007, -0.046323519200086594, -0.12587589025497437, 0.4283834993839264, 0.06841778010129929, 0.3490027189254761, -0.36994174122810364, -0.22952131927013397, 0.1426040232181549, 0.11245965957641602, 0.014156579971313477, 0.33628255128860474, 0.1857880800962448, -0.2280341386795044, -0.3808365762233734, 0.18779641389846802, -0.22508691251277924, 0.3004724979400635, 0.19145210087299347, 0.06349504739046097, 0.10035760700702667, -0.11190571635961533, 0.1852497011423111, -0.23595528304576874, 0.18716272711753845, -0.19026978313922882, 0.20680250227451324, -0.20888742804527283, -0.18508048355579376, 0.09223610907793045, 0.3652831017971039, -0.053681012243032455, 0.23420315980911255, -0.017596103250980377, 0.025188174098730087, -0.07469142228364944, -0.059096112847328186, 0.4634988605976105, 0.7871446013450623, 0.0422295443713665, 0.0795523077249527, -0.005472378805279732, 0.0074964119121432304, -0.22540633380413055, 0.18154621124267578, 0.09080039709806442, 0.37214773893356323, 0.41313862800598145, 0.050058647990226746, 0.07829832285642624, 0.01643543690443039, -0.17714904248714447, -0.13689503073692322, 0.004048672504723072, -0.3926253914833069, 0.06149505823850632, -0.17276176810264587, 0.1391107439994812, -0.41207465529441833, -0.09629300236701965, -0.1234474927186966, -0.40503010153770447, -0.2254338413476944, 0.6340551972389221, -0.06694365292787552, -0.17253407835960388, 0.17667341232299805, 0.025284066796302795, -0.19962023198604584, -0.2302350252866745, -0.24829016625881195, 0.11435950547456741, -0.20804867148399353, -0.09117782115936279, 0.2168104499578476, 0.06594572961330414, 0.22704818844795227, -0.18471649289131165, -0.20073431730270386, -0.2244730293750763, 0.008644543588161469, 0.056340135633945465, -0.048199139535427094, 0.17430995404720306, 0.005166731774806976, 0.1690930873155594, 0.11446170508861542, -0.37554895877838135, 0.1989777535200119, -0.15846163034439087, -0.26486045122146606, 0.16046519577503204, 0.2826424837112427, -0.13553568720817566, -0.22026634216308594, -0.3173789083957672, -0.4011371433734894, -0.4135327935218811, 0.19169248640537262, -0.01580600067973137, 0.11275288462638855, -0.35471364855766296, 0.18644382059574127, 0.05538845434784889, 0.27796754240989685, -0.04147191345691681, -0.12462665885686874, -0.12930962443351746, 0.493421733379364, -0.16117317974567413, -0.2432635873556137, 0.09106697142124176, 0.14997632801532745, 0.0022737085819244385, 0.04168389365077019, -0.3326742649078369, -0.0748605877161026, -0.08553686738014221, 0.11376677453517914, -0.2176436483860016, 0.06364698708057404, 0.29875898361206055, -0.017281753942370415, 0.05346980690956116, -0.08401614427566528, -0.31367191672325134, 0.1490667164325714, 0.21666419506072998, 0.17629718780517578, -0.07576139271259308, 0.39401116967201233, 0.07018062472343445, 0.3671790361404419, 0.28214454650878906, 0.06827975809574127, 0.2314012348651886, 0.19762887060642242, 0.20396223664283752, -0.21187523007392883, -0.36516737937927246, -0.21725618839263916, -0.12560653686523438, -0.33466583490371704, -0.1396235078573227, -0.019188251346349716, -0.07283990830183029, -0.26613539457321167, -0.2252121865749359, -0.48997825384140015, -0.30139002203941345, -0.10969908535480499, 0.07583935558795929, 0.06447188556194305, -0.14558275043964386, 0.24309158325195312, -0.06477601081132889, 0.08843371272087097, 0.06691765785217285, 0.4528955817222595, 0.23298567533493042, 0.01327008567750454, -0.38720712065696716, -0.28019896149635315, 0.03541082888841629, 0.3589218258857727, -0.023155299946665764, 0.09432046115398407, -0.2866732180118561, -0.12085112184286118, -0.12313894927501678, -0.18817134201526642, 0.8430705666542053, -0.04358106851577759, 0.15728473663330078, 0.24606359004974365, -0.13430222868919373, -0.3283996880054474, 0.03818583860993385, 0.18853524327278137, 0.07699484378099442, 0.18445658683776855, 0.8155311942100525, -0.027224168181419373, -0.10243402421474457, -0.10370951890945435, 0.2324933111667633, -0.27884694933891296, -0.4167496860027313, -0.05613802745938301, -0.16793929040431976, -0.4362315237522125, -0.28662219643592834, -0.00663694366812706, 0.09942211955785751, -0.19103525578975677, -0.20380011200904846, 0.03561128303408623, -0.1970084011554718, 0.1286059468984604, -0.19809642434120178, 0.48451751470565796, -0.4603367745876312, 0.15815098583698273, 0.12505298852920532, -0.11782456934452057, 0.5534564852714539, 0.4204612672328949, -0.07178184390068054, -0.2405163049697876, 0.11739499121904373, -0.2397984117269516, 0.1263386458158493, 0.2820705473423004, -0.019095301628112793, -0.24049267172813416, 0.030033443123102188, 0.029203109443187714, -0.27401870489120483, -0.32620835304260254, 0.12339802831411362, -0.2438347339630127, -0.20247238874435425, -0.4568459689617157, 0.3333618938922882, 0.20426836609840393, -0.05878068506717682, -0.02771599590778351, -0.05992014706134796, -0.2325798124074936, 0.550539493560791, -0.21994054317474365, 0.9964271783828735, 0.1399218738079071, 0.133568674325943, 0.2671445310115814, -0.2895311713218689, 0.23964612185955048, -0.12394480407238007, 0.024992644786834717, -0.30025312304496765, 0.0763198584318161, -0.1777345985174179, -0.34038245677948, 0.01621752604842186, 0.3958281874656677, -0.28031429648399353, 0.35866180062294006, -0.20208635926246643, -0.024778667837381363, -0.2330075353384018, 0.09099312126636505, -0.1795617640018463, -0.1530539095401764, -0.43315088748931885, 0.08243304491043091, 0.13172265887260437, 0.3334028124809265, 0.09914873540401459, -0.20721745491027832, -0.4210857152938843, -0.018665391951799393, -0.16021597385406494, 0.2978702485561371, 0.0030846581794321537, 0.4448398947715759, -0.11950603127479553, -0.4097127318382263, -0.07250635325908661, 0.5926670432090759, 0.3466898798942566, -0.1597682386636734, -0.172764390707016, -0.17319557070732117, 0.03618815541267395, 0.30856990814208984, -0.1741185039281845, -0.31459131836891174, 0.5150311589241028, -0.044454462826251984, -0.09751522541046143, -0.08070891350507736, -0.09468874335289001, -0.2956656217575073, -0.29161977767944336, 0.11406686902046204, -0.17076922953128815, -0.15103976428508759, -0.3946344256401062, 0.056846149265766144, 0.10677802562713623, -0.3121575713157654, 0.06238284707069397, 0.1775379180908203, 0.14908993244171143, 0.04560798406600952, -0.3520311117172241, -0.06006133556365967, 0.025652296841144562, 0.6200677752494812, -0.03984715789556503, 0.029486551880836487, 0.24156123399734497, -0.07912825047969818, -0.0901847630739212, -0.22991231083869934, 0.29134300351142883, 0.05666158348321915, -0.3113960027694702, 0.4832246005535126, -0.4003124237060547, 0.08232130110263824, -0.1740473061800003, 0.16111142933368683, 0.22156523168087006, -0.11699261516332626, 0.008323375135660172, -0.46076294779777527, -0.26777252554893494, 0.2494446486234665, 0.3027375042438507, 0.09543997794389725, 0.1861715316772461, -0.1288052499294281, -0.0506037101149559, -0.08341948688030243, -0.1854325234889984, 0.13112743198871613, -0.011757267639040947, -0.08335001021623611, -0.014141678810119629, -0.012417852878570557, 0.07493727654218674, -0.3090157210826874, 0.01613914780318737, -0.15022708475589752, -0.003072044812142849, -0.09836458414793015, -0.06459157913923264, 0.16234105825424194, 0.12861409783363342, 0.06384947150945663, -0.2278720736503601, -0.3625860810279846, 0.23527976870536804, -0.20459811389446259, 0.20905472338199615, 0.2792462110519409, 0.041733816266059875, 0.1091284230351448, 0.08754533529281616, 0.36757031083106995, -0.20569376647472382, 0.17472049593925476, -0.12768936157226562, 0.23383618891239166, -0.01798180490732193, 0.07524380087852478, -0.017666716128587723, -0.013982191681861877, -0.6035295724868774, -0.08250557631254196, 0.11569859832525253, 0.35413286089897156, 0.21027010679244995, -0.27704155445098877, -0.045690152794122696, -0.09753254801034927, 0.39810097217559814, 0.3070773482322693, -0.28932899236679077, 0.27810776233673096, -0.017938487231731415, 0.13505344092845917, 0.14294549822807312, -0.15800701081752777, 0.08372379839420319, -0.09053630381822586, -0.1928892582654953, 0.06219680979847908, -0.1712007224559784, 0.0006851404905319214, -0.4752076268196106, 0.11934918910264969, 0.5830207467079163, -0.28062528371810913, 0.14968277513980865, 0.45464184880256653, 0.07548139989376068, 0.5349252223968506, -0.1644008755683899, -0.13423892855644226, 0.19472569227218628, 0.30738556385040283, 0.09799444675445557, 0.2507738173007965, 0.24162590503692627, 0.11354584246873856, 0.25608399510383606, -0.29812711477279663, -0.09536813199520111, -0.1129901111125946, -0.16573700308799744, 0.02487378939986229, 0.1350255310535431, 0.09023962914943695, -0.5479128956794739, -0.056801121681928635, -0.10206791758537292, -0.022380542010068893, -0.11223962157964706, 0.015486208721995354, 0.026508502662181854, -0.22038525342941284, 0.10936397314071655, -0.04535737633705139, -0.02455461397767067, -0.15339846909046173, 0.10828161239624023, 0.23400987684726715, -0.08375813066959381, 0.23010195791721344, 0.04367750883102417, 0.1465768665075302, -0.04333985596895218, -0.156960129737854, -0.007298478856682777, 0.115650475025177, -0.23022812604904175, -0.14000217616558075, 0.1382828652858734, 0.5224789381027222, 0.4858753979206085, -0.12187395989894867, -0.09378673136234283, 0.16718365252017975, -0.23024889826774597, -0.024268828332424164, 0.09593900293111801, -0.209870845079422, 0.29968172311782837, 0.28235140442848206, 0.22547107934951782, -0.010632583871483803, 0.21512652933597565, 0.24888518452644348, 0.43781185150146484, -0.22191718220710754, 0.7030806541442871, -0.2753860056400299, -0.25164568424224854, 0.0655338317155838, -0.193869948387146, -0.22212913632392883, -0.23101381957530975, 0.05517391860485077, 0.09686528146266937, 0.296174019575119, 0.18330654501914978, 0.05216085910797119, 0.2360127866268158, 0.028591962531208992, 0.10931102931499481, -0.23650839924812317, -0.21591895818710327, 0.18892093002796173, -0.4864012897014618, 0.0884942039847374, 0.15617121756076813, 0.08703684061765671, -0.260016530752182, 0.1971457153558731, 0.06866452842950821, 0.033004287630319595, 0.11197533458471298, 0.023980895057320595, 0.14655433595180511, 0.3653166592121124, -0.12893006205558777, -0.2046668976545334, 0.11959461122751236, -0.03336208313703537, 0.17535117268562317, -0.4723132848739624, 0.31021443009376526, 0.06574881076812744, -0.015060387551784515, -0.022407494485378265, 0.08428861200809479, 0.07710674405097961, 0.3313007652759552, 0.39991992712020874, 0.14387983083724976, 0.2604227662086487, -0.11965121328830719, -0.22544331848621368, -0.061722833663225174, 0.09086735546588898, -0.09039082378149033, 0.32851067185401917, -0.2051670104265213, 0.6097776889801025, -0.4582568407058716, 0.12161712348461151, -0.37518078088760376, 0.01974501460790634, -0.22295498847961426, -0.13048480451107025, -0.2956725060939789, 0.1677442193031311, 0.009138792753219604, 0.12321428209543228, 0.5432215929031372, 0.16873282194137573, -0.12204696238040924, 0.2851131558418274, -0.3222297430038452, -0.07908410578966141, 0.3124598562717438, -0.04199598357081413, -0.14286945760250092, -0.027420371770858765, 0.22873197495937347, 0.2062346637248993, 0.26954662799835205, -0.4439639449119568, -0.39008569717407227, 0.367389053106308, -0.14512458443641663, -0.13679735362529755, 0.1274525225162506, -0.10712207853794098, -0.09765853732824326, 0.04417463764548302, 0.28254562616348267, 0.2658182680606842, -0.40703636407852173, 0.27631109952926636, -0.2208060324192047 ]
https://github.com/huggingface/datasets/issues/2424
load_from_disk and save_to_disk are not compatible with each other
Though I see a stream of issues open by people lost between datasets and datasets dicts so maybe there is here something that could be better in terms of UX. Could be better error handling or something else smarter to even avoid said errors but maybe we should think about this. Reopening to use this issue as a discussion place but feel free to open a new open if you prefer @lhoestq @albertvillanova
## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
73
load_from_disk and save_to_disk are not compatible with each other ## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in> Though I see a stream of issues open by people lost between datasets and datasets dicts so maybe there is here something that could be better in terms of UX. Could be better error handling or something else smarter to even avoid said errors but maybe we should think about this. Reopening to use this issue as a discussion place but feel free to open a new open if you prefer @lhoestq @albertvillanova
[ -0.17932908236980438, -0.14159896969795227, -0.10552343726158142, 0.5006914138793945, 0.23257799446582794, -0.03824702277779579, 0.25782305002212524, 0.2903449237346649, 0.33867648243904114, 0.09910684823989868, 0.10473854839801788, 0.3404810130596161, 0.07601682841777802, 0.18512365221977234, -0.21642468869686127, -0.04675129055976868, 0.3020485043525696, -0.018379583954811096, 0.15672644972801208, -0.044947780668735504, -0.152791827917099, 0.2874241769313812, -0.16353029012680054, -0.05758430063724518, -0.17195379734039307, -0.04794351011514664, -0.19671377539634705, 0.3407815098762512, 0.3019954264163971, 0.04616831988096237, 0.2732264995574951, -0.23214751482009888, 0.15894979238510132, 0.5605935454368591, -0.00011912411719094962, -0.027794867753982544, 0.19333891570568085, -0.16344250738620758, -0.34070855379104614, -0.6506850123405457, -0.19440847635269165, -0.2385561615228653, 0.06499522924423218, -0.2768601179122925, 0.18218716979026794, -0.013858330436050892, -0.053821831941604614, -0.3102637231349945, 0.5078187584877014, 0.09638369828462601, 0.14653819799423218, 0.10024724900722504, 0.19202525913715363, -0.21282319724559784, -0.037670888006687164, 0.5029976963996887, -0.0007009450346231461, 0.3070383369922638, 0.25607532262802124, -0.20465804636478424, 0.12969592213630676, -0.0047980803065001965, -0.33222851157188416, -0.1897912621498108, 0.26661187410354614, 0.26112836599349976, 0.32665830850601196, -0.42108216881752014, -0.03278736770153046, 0.13462015986442566, 0.43119561672210693, -0.1612837016582489, -0.3976992666721344, -0.37013983726501465, -0.2544534206390381, 0.14558935165405273, 0.4366273880004883, 0.005639511626213789, -0.3736254572868347, 0.21221423149108887, -0.13392004370689392, -0.3855871260166168, -0.030291970819234848, 0.3730506896972656, 0.00580693781375885, 0.028722122311592102, -0.052510861307382584, 0.03667207434773445, 0.22157151997089386, 0.058259136974811554, 0.35830679535865784, -0.4107937514781952, 0.18271030485630035, 0.03937797620892525, -0.24945302307605743, -0.0691118836402893, -0.15333479642868042, -0.4124203622341156, -0.15397383272647858, 0.37905675172805786, 0.2561156451702118, -0.16367501020431519, -0.3973759710788727, 0.3728158175945282, 0.5320211052894592, 0.23135243356227875, 0.11680868268013, 0.2314743548631668, 0.30843162536621094, 0.10477029532194138, -0.021020913496613503, 0.052979595959186554, 0.23073022067546844, -0.33755239844322205, 0.3026459217071533, -0.10471483319997787, 0.337352454662323, -0.19664382934570312, -0.4062134027481079, -0.009761777706444263, -0.1994801163673401, -0.08949052542448044, -0.043799806386232376, 0.15083590149879456, 0.11629617214202881, 0.39334636926651, 0.20991051197052002, 0.3266165852546692, -0.12267420440912247, 0.3789065480232239, -0.10727996379137039, -0.01829485222697258, 0.10818195343017578, 0.24280311167240143, 0.014236807823181152, -0.06315557658672333, 0.10863234847784042, 0.1245499774813652, -0.009879432618618011, -0.13322949409484863, -0.09546423703432083, -0.34376829862594604, 0.12772652506828308, 0.14094051718711853, 0.27136000990867615, 0.14690740406513214, 0.038245562463998795, -0.4243341088294983, -0.1878844052553177, 0.24194714426994324, -0.489873468875885, -0.1394302248954773, -0.01742844469845295, 0.1673589050769806, -0.15371204912662506, 0.05665752291679382, -0.6717955470085144, -0.023200634866952896, 0.15843750536441803, -0.3381959795951843, 0.05640558525919914, -0.03691834211349487, -0.09731943160295486, -0.500874936580658, 0.2721496522426605, 0.27716851234436035, -0.3709769546985626, -0.0047248005867004395, -0.12147386372089386, -0.04336540028452873, 0.025375202298164368, 0.4278505742549896, -0.07592436671257019, 0.3326677083969116, -0.429797887802124, 0.08540299534797668, 0.5042358040809631, -0.6016659140586853, -0.32127857208251953, 0.5045099854469299, -0.13118895888328552, -0.043403610587120056, 0.0758247822523117, 0.1683434396982193, 0.21899767220020294, -0.2220073938369751, 0.29065266251564026, 0.4203118681907654, -0.04692848026752472, -0.048142045736312866, -0.403425395488739, -0.22355759143829346, 0.13171622157096863, 0.14836253225803375, -0.0357847698032856, 0.11207279562950134, 0.15244147181510925, -0.0020965514704585075, 0.3085457980632782, -0.001043848693370819, 0.05776418745517731, 0.32986021041870117, 0.467129111289978, -0.08283796906471252, -0.18645383417606354, -0.1380210816860199, -0.7963287234306335, 0.20841026306152344, 0.23265281319618225, -0.2737753093242645, 0.020037397742271423, 0.09049567580223083, 0.006242331117391586, -0.1295403093099594, -0.13728824257850647, 0.08100353181362152, 0.006400931626558304, -0.08787572383880615, 0.12609608471393585, 0.03375757858157158, -0.22008337080478668, 0.23248735070228577, 0.1551642119884491, 0.0982595682144165, -0.23156386613845825, 0.6826297044754028, -0.11950068920850754, -0.32527750730514526, -0.09095367789268494, -0.052127905189991, 0.2896009087562561, -0.03095208667218685, -0.11500294506549835, 0.3808514475822449, 0.024857953190803528, 0.40107542276382446, -0.28164950013160706, -0.10128481686115265, 0.17687098681926727, 0.12650974094867706, -0.013036975637078285, 0.336019903421402, 0.19405552744865417, -0.16945591568946838, -0.35832566022872925, 0.15332280099391937, -0.23509036004543304, 0.35699424147605896, 0.17101851105690002, 0.08870653063058853, 0.04454781860113144, -0.1522607058286667, 0.15972810983657837, -0.21378010511398315, 0.18874049186706543, -0.1867073029279709, 0.26054647564888, -0.14056722819805145, -0.1402650773525238, 0.1336369812488556, 0.3339008390903473, -0.030388614162802696, 0.24597540497779846, 0.010736629366874695, 0.047986581921577454, -0.03852562606334686, -0.00958017073571682, 0.4764651358127594, 0.7985144853591919, 0.08333304524421692, 0.047081053256988525, 0.020040694624185562, 0.008748434484004974, -0.22814923524856567, 0.18115922808647156, 0.15275898575782776, 0.4110872745513916, 0.4088659882545471, 0.0798020288348198, 0.11503823846578598, 0.10261864215135574, -0.2453014850616455, -0.24656474590301514, 0.019692717120051384, -0.4122721552848816, 0.06203845143318176, -0.19486120343208313, 0.05635209381580353, -0.3862089216709137, -0.04607510566711426, -0.16313649713993073, -0.45212194323539734, -0.17306821048259735, 0.5514713525772095, -0.1993454247713089, -0.1709195226430893, 0.12643730640411377, 0.06675523519515991, -0.28482747077941895, -0.14171569049358368, -0.27068454027175903, 0.04501431807875633, -0.22852951288223267, -0.07032948732376099, 0.3768828809261322, 0.013543188571929932, 0.24894395470619202, -0.1580120474100113, -0.15886403620243073, -0.26986417174339294, -0.0948808342218399, 0.03727263584733009, 0.046616606414318085, 0.28696519136428833, -0.029170379042625427, 0.1743355393409729, 0.1645384132862091, -0.39161375164985657, 0.18120348453521729, -0.1359606683254242, -0.2781125009059906, 0.09608631581068039, 0.2482706755399704, -0.10107076168060303, -0.12354479730129242, -0.3715149164199829, -0.4118359684944153, -0.4568202793598175, 0.10004062950611115, -0.046525806188583374, 0.08834019303321838, -0.3574308454990387, 0.23746658861637115, -0.039750467985868454, 0.25380054116249084, 0.011485403403639793, -0.11091578751802444, -0.20152738690376282, 0.3960466980934143, -0.09282197058200836, -0.227395698428154, 0.04145403578877449, 0.15615637600421906, 0.05111052095890045, 0.023217134177684784, -0.3708798289299011, -0.15396550297737122, -0.062358297407627106, 0.06705896556377411, -0.17091065645217896, 0.07927513867616653, 0.30465686321258545, 0.03845706582069397, 0.02129017747938633, -0.023946311324834824, -0.28834736347198486, 0.06512115895748138, 0.2094319760799408, 0.22476035356521606, -0.03813786059617996, 0.3764010965824127, 0.08368794620037079, 0.33087432384490967, 0.27067044377326965, 0.07176147401332855, 0.26841670274734497, 0.1924271285533905, 0.23647402226924896, -0.18339291214942932, -0.3487495183944702, -0.17263269424438477, -0.1326688826084137, -0.3924681544303894, -0.14216306805610657, -0.011924965307116508, -0.02976279892027378, -0.3161025643348694, -0.24751022458076477, -0.5281931757926941, -0.3219800591468811, -0.03210115432739258, 0.003749363124370575, -0.035590581595897675, -0.11235998570919037, 0.23735463619232178, 0.010193288326263428, 0.11772004514932632, 0.15739819407463074, 0.4070916771888733, 0.24956750869750977, 0.014929305762052536, -0.3812524378299713, -0.3094486594200134, 0.07060497254133224, 0.37084251642227173, 0.002047089161351323, 0.1234326884150505, -0.29864102602005005, -0.17732784152030945, -0.1252610981464386, -0.11860279738903046, 0.7820263504981995, -0.18330352008342743, 0.025450635701417923, 0.1466878354549408, -0.1405288130044937, -0.25763705372810364, 0.03752483054995537, 0.19463610649108887, 0.016662921756505966, 0.1348644644021988, 0.8020765781402588, -0.04429040104150772, -0.13531062006950378, -0.09122156351804733, 0.2376178354024887, -0.28587281703948975, -0.3951304852962494, -0.02723713219165802, -0.09481647610664368, -0.45247843861579895, -0.30638110637664795, -0.020147129893302917, 0.011006331071257591, -0.18267619609832764, -0.18825207650661469, -0.06938394159078598, -0.14065618813037872, 0.1199614405632019, -0.18226811289787292, 0.4162622392177582, -0.5548486709594727, 0.15753929316997528, 0.14343750476837158, -0.03213026374578476, 0.6181359887123108, 0.42641767859458923, -0.12062300741672516, -0.2985323965549469, 0.06960070878267288, -0.19324944913387299, 0.16751618683338165, 0.3233305811882019, -0.003551909001544118, -0.31491661071777344, -0.021011341363191605, 0.05553700774908066, -0.33146902918815613, -0.39603471755981445, 0.08456531912088394, -0.11231075972318649, -0.2535322606563568, -0.3851900100708008, 0.3009380102157593, 0.2938147485256195, -0.11849068105220795, -0.05050208419561386, -0.027962788939476013, -0.2261323481798172, 0.6079076528549194, -0.12745699286460876, 1.1012139320373535, 0.17300090193748474, 0.2065189927816391, 0.20375925302505493, -0.3399917483329773, 0.310874342918396, -0.13488918542861938, -0.044805292040109634, -0.3215382695198059, 0.10350782424211502, -0.18030618131160736, -0.3237330913543701, 0.021998349577188492, 0.3883422017097473, -0.20201975107192993, 0.4719240069389343, -0.24641741812229156, 0.026269448921084404, -0.21038126945495605, 0.1127815842628479, -0.2025837004184723, -0.11933977901935577, -0.48215365409851074, 0.08729907125234604, 0.1393260508775711, 0.25342077016830444, 0.016853947192430496, -0.1910107433795929, -0.4468165636062622, 0.03472236543893814, -0.15733468532562256, 0.28457093238830566, 0.02943267673254013, 0.4148937463760376, -0.07067465782165527, -0.41612112522125244, -0.0417976900935173, 0.6158403754234314, 0.36835289001464844, -0.10171739757061005, -0.17017865180969238, -0.1532871574163437, -0.033351607620716095, 0.346611887216568, -0.11875702440738678, -0.3605042099952698, 0.6040201187133789, -0.010861421003937721, -0.09632086753845215, -0.04741968214511871, -0.09034275263547897, -0.24794480204582214, -0.4036904573440552, 0.08124203979969025, -0.1405259370803833, -0.1467217206954956, -0.36419910192489624, -0.018826790153980255, 0.1204577386379242, -0.313534140586853, 0.08661076426506042, 0.18021568655967712, 0.20718544721603394, 0.10892711579799652, -0.22207774221897125, -0.046102333813905716, 0.03435545414686203, 0.5484600067138672, -0.08152292668819427, 0.01129310205578804, 0.14192987978458405, -0.09240054339170456, -0.13859179615974426, -0.2498786449432373, 0.3250659108161926, 0.10751692205667496, -0.31336086988449097, 0.4331633448600769, -0.3652234375476837, 0.03897906839847565, -0.20603156089782715, 0.07274030894041061, 0.263028621673584, -0.1315050721168518, -0.0264273788779974, -0.46071770787239075, -0.2394622415304184, 0.32854121923446655, 0.3012673556804657, 0.13964709639549255, 0.059736572206020355, -0.24156378209590912, -0.11029735952615738, -0.10800328850746155, -0.22418776154518127, 0.09028449654579163, -0.06595899164676666, -0.12176132202148438, 0.013753816485404968, -0.013250235468149185, 0.021770590916275978, -0.3241356611251831, 0.036423757672309875, -0.16027909517288208, 0.029897693544626236, -0.10782184451818466, -0.011219318024814129, 0.14919430017471313, 0.15445610880851746, 0.10181412845849991, -0.16343092918395996, -0.3246360421180725, 0.27826157212257385, -0.21767856180667877, 0.17026157677173615, 0.29396989941596985, 0.06960264593362808, 0.07685574889183044, 0.06917951256036758, 0.3163079023361206, -0.20978043973445892, 0.3629970848560333, -0.0915651023387909, 0.3446451425552368, -0.053719036281108856, 0.06380610167980194, 0.027290916070342064, -0.01744883507490158, -0.4779082238674164, -0.01716962456703186, 0.18121570348739624, 0.4025028944015503, 0.21777132153511047, -0.2360190600156784, -0.016679702326655388, 0.03499595820903778, 0.3909652531147003, 0.33302009105682373, -0.2517447769641876, 0.2638549506664276, 0.05105942487716675, 0.1676001250743866, 0.13984455168247223, -0.15395988523960114, 0.09191478788852692, -0.15046554803848267, -0.21483270823955536, 0.06737525761127472, -0.18216407299041748, -0.0023581236600875854, -0.41558563709259033, 0.0969722643494606, 0.542846143245697, -0.29987359046936035, 0.053036510944366455, 0.3338710367679596, 0.05357390269637108, 0.4518006145954132, -0.13163234293460846, -0.18569818139076233, 0.20756059885025024, 0.26082754135131836, 0.03707878291606903, 0.23472246527671814, 0.22816944122314453, 0.11645102500915527, 0.28937435150146484, -0.2608202397823334, -0.02473614737391472, -0.07421810925006866, -0.20269054174423218, -0.07642587274312973, 0.14368751645088196, 0.03326241299510002, -0.37275680899620056, -0.07606367021799088, 0.03622855991125107, -0.015692729502916336, -0.11215067654848099, 0.04829089343547821, 0.026549696922302246, -0.21503400802612305, 0.0969185084104538, -0.04289349913597107, -0.07207009196281433, -0.21116821467876434, 0.146095871925354, 0.23832282423973083, -0.0736750066280365, 0.16335038840770721, 0.08155833184719086, 0.15951088070869446, -0.0003994181752204895, -0.14809872210025787, -0.03801053762435913, 0.12112198770046234, -0.19412732124328613, -0.17133232951164246, 0.19595468044281006, 0.6128460764884949, 0.46584439277648926, -0.19907931983470917, -0.08437788486480713, 0.18034419417381287, -0.1835073083639145, -0.06405432522296906, 0.11935064196586609, -0.25071221590042114, 0.2812378406524658, 0.291974812746048, 0.25417351722717285, -0.03425297886133194, 0.20774418115615845, 0.12411323189735413, 0.37204796075820923, -0.26564323902130127, 0.6275001764297485, -0.26443666219711304, -0.22411110997200012, 0.03269048407673836, -0.1488497257232666, -0.23403599858283997, -0.3127298951148987, 0.09638974070549011, 0.032401151955127716, 0.27869361639022827, 0.14120128750801086, 0.07486608624458313, 0.2165137678384781, 0.03329844027757645, 0.22455856204032898, -0.15202653408050537, -0.24592018127441406, 0.2690979838371277, -0.544385552406311, 0.09252698719501495, 0.18712583184242249, 0.09942939877510071, -0.2845573127269745, 0.1964012235403061, 0.09754671901464462, 0.1387915015220642, 0.1320199966430664, 0.07298632711172104, 0.1194150373339653, 0.35439884662628174, -0.23893940448760986, -0.21825329959392548, 0.17160797119140625, -0.1318477988243103, 0.15205009281635284, -0.47487321496009827, 0.2885649800300598, 0.08727120608091354, -0.01130521297454834, -0.049297966063022614, 0.17281673848628998, 0.09743539988994598, 0.29439646005630493, 0.4146992266178131, 0.17153804004192352, 0.27078917622566223, -0.11504516005516052, -0.24799107015132904, 0.012086644768714905, 0.016609475016593933, -0.11235123127698898, 0.35409533977508545, -0.19549043476581573, 0.5083068609237671, -0.45847222208976746, 0.05787314847111702, -0.394374817609787, -0.018864184617996216, -0.24881678819656372, -0.06724794954061508, -0.3928889036178589, 0.19233275949954987, 0.06259139627218246, 0.16290903091430664, 0.4411380887031555, 0.10496258735656738, -0.10429207980632782, 0.2898520827293396, -0.27363499999046326, -0.12441018968820572, 0.29871928691864014, 0.08689182251691818, -0.0897098183631897, -0.04023296758532524, 0.214456707239151, 0.22277358174324036, 0.22268906235694885, -0.39810219407081604, -0.412273645401001, 0.3479642868041992, -0.16556307673454285, -0.09558454155921936, 0.1723351627588272, -0.05685104802250862, -0.03646566718816757, 0.03126318380236626, 0.21845145523548126, 0.18301793932914734, -0.30391258001327515, 0.3530832529067993, -0.19258487224578857 ]
https://github.com/huggingface/datasets/issues/2424
load_from_disk and save_to_disk are not compatible with each other
We should probably improve the error message indeed. Also note that there exists a function `load_from_disk` that can load a Dataset or a DatasetDict. Under the hood it calls either `Dataset.load_from_disk` or `DatasetDict.load_from_disk`: ```python from datasets import load_from_disk dataset_dict = load_from_disk("path/to/dataset/dict") single_dataset = load_from_disk("path/to/single/dataset") ```
## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in>
45
load_from_disk and save_to_disk are not compatible with each other ## Describe the bug load_from_disk and save_to_disk are not compatible. When I use save_to_disk to save a dataset to disk it works perfectly but given the same directory load_from_disk throws an error that it can't find state.json. looks like the load_from_disk only works on one split ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("art") dataset.save_to_disk("mydir") d = Dataset.load_from_disk("mydir") ``` ## Expected results It is expected that these two functions be the reverse of each other without more manipulation ## Actual results FileNotFoundError: [Errno 2] No such file or directory: 'mydir/art/state.json' ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-5.4.0-73-generic-x86_64-with-Ubuntu-18.04-bionic - Python version: 3.7.10 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: <fill in> - Using distributed or parallel set-up in script?: <fill in> We should probably improve the error message indeed. Also note that there exists a function `load_from_disk` that can load a Dataset or a DatasetDict. Under the hood it calls either `Dataset.load_from_disk` or `DatasetDict.load_from_disk`: ```python from datasets import load_from_disk dataset_dict = load_from_disk("path/to/dataset/dict") single_dataset = load_from_disk("path/to/single/dataset") ```
[ -0.21142864227294922, -0.19184526801109314, -0.1080046147108078, 0.4175558090209961, 0.17884021997451782, 0.009406253695487976, 0.25178825855255127, 0.35985806584358215, 0.3484732508659363, 0.12817075848579407, 0.09062913805246353, 0.35007745027542114, 0.06756211817264557, 0.12341495603322983, -0.1204768568277359, -0.03711313009262085, 0.23966914415359497, 0.04314741864800453, 0.24993327260017395, -0.10753493010997772, -0.19558683037757874, 0.3563716411590576, -0.13997098803520203, -0.03684365749359131, -0.14062567055225372, -0.04932982474565506, -0.1832461655139923, 0.35291433334350586, 0.32915762066841125, 0.03210956230759621, 0.3073035180568695, -0.15630096197128296, 0.06933051347732544, 0.556149423122406, -0.00012118934682803228, 0.050667330622673035, 0.17384037375450134, -0.20018355548381805, -0.30150821805000305, -0.6945703029632568, -0.11871307343244553, -0.2993364930152893, 0.11530722677707672, -0.31854379177093506, 0.14609363675117493, -0.0933304876089096, -0.04108987748622894, -0.29196417331695557, 0.5449642539024353, 0.1292131543159485, 0.10880674421787262, 0.136033296585083, 0.21616767346858978, -0.22477883100509644, -0.07335314899682999, 0.5043619275093079, 0.014488114044070244, 0.3683720529079437, 0.16026835143566132, -0.12265848368406296, 0.14360126852989197, -0.00775573868304491, -0.34987884759902954, -0.15794557332992554, 0.29688501358032227, 0.2928353250026703, 0.33330824971199036, -0.44494304060935974, -0.07701945304870605, 0.12681862711906433, 0.37590301036834717, -0.18773850798606873, -0.3891630172729492, -0.3483676612377167, -0.23385664820671082, 0.055252157151699066, 0.43901658058166504, 0.04214644432067871, -0.37496066093444824, 0.15070149302482605, -0.08702992647886276, -0.39126884937286377, -0.031807780265808105, 0.3521459102630615, -0.013759579509496689, -0.005133762955665588, -0.014784547500312328, 0.08228015154600143, 0.2828969657421112, 0.07747724652290344, 0.33040016889572144, -0.42700639367103577, 0.21169178187847137, 0.07447322458028793, -0.24193905293941498, -0.02402202971279621, -0.18621262907981873, -0.4937499463558197, -0.18859988451004028, 0.3319093585014343, 0.2741450369358063, -0.12719589471817017, -0.44498583674430847, 0.36014828085899353, 0.43426942825317383, 0.2644765079021454, 0.12946344912052155, 0.2789519727230072, 0.2962295711040497, 0.07289347797632217, 0.023536745458841324, 0.09318646788597107, 0.22097070515155792, -0.3597981035709381, 0.27012360095977783, -0.09948942810297012, 0.32926756143569946, -0.12434421479701996, -0.4007606506347656, -0.037281181663274765, -0.18683716654777527, -0.1043994277715683, -0.012822276912629604, 0.1663799285888672, 0.1677868366241455, 0.37578561902046204, 0.24940206110477448, 0.3480870723724365, -0.14793606102466583, 0.4127970039844513, -0.10951844602823257, 0.016552846878767014, 0.2048804759979248, 0.2110489308834076, 0.10369589924812317, -0.14204038679599762, 0.17546811699867249, 0.060924232006073, -0.0050598010420799255, -0.1145145446062088, -0.08567428588867188, -0.39816075563430786, 0.13778679072856903, 0.18611204624176025, 0.33353641629219055, 0.16616396605968475, 0.09759712219238281, -0.343172550201416, -0.24302569031715393, 0.2610032260417938, -0.45176398754119873, -0.19670157134532928, 0.031048059463500977, 0.1310894638299942, -0.18514148890972137, 0.05827761068940163, -0.6198495626449585, -0.016969334334135056, 0.1802484393119812, -0.3511137366294861, -0.015894174575805664, -0.1464458853006363, -0.18922244012355804, -0.48250094056129456, 0.3719320297241211, 0.2832884192466736, -0.3165062963962555, -0.034856949001550674, -0.09436019510030746, -0.12886638939380646, 0.053969234228134155, 0.455986887216568, -0.07920794188976288, 0.43095454573631287, -0.3708840608596802, 0.07495829463005066, 0.5811289548873901, -0.6331636309623718, -0.34468358755111694, 0.48484256863594055, -0.1842656284570694, -0.011326631531119347, 0.016518913209438324, 0.1537158042192459, 0.2192758321762085, -0.15672184526920319, 0.35259923338890076, 0.40515315532684326, 0.041357092559337616, -0.02817787043750286, -0.3694809675216675, -0.19135017693042755, 0.12924732267856598, 0.16857396066188812, -0.07303217053413391, 0.09816630929708481, 0.12955105304718018, 0.046754155308008194, 0.3483137786388397, 0.0012232623994350433, 0.09494401514530182, 0.3625744581222534, 0.4391663372516632, -0.0557367205619812, -0.1810927838087082, -0.08538269251585007, -0.7521957755088806, 0.22911682724952698, 0.16439463198184967, -0.2637033462524414, -0.06648273766040802, 0.11668287217617035, -0.0023819776251912117, -0.1435471475124359, -0.14891070127487183, 0.11930286884307861, -0.024761240929365158, -0.031529463827610016, 0.14203326404094696, 0.04650091007351875, -0.23702874779701233, 0.2715091407299042, 0.15009653568267822, 0.07164260745048523, -0.19335012137889862, 0.6443470120429993, -0.09329929947853088, -0.3494720458984375, -0.054323796182870865, -0.05314325541257858, 0.34405285120010376, -0.07083690166473389, -0.14617601037025452, 0.416916161775589, 0.03704903647303581, 0.35516607761383057, -0.349038302898407, -0.21833999454975128, 0.1753208041191101, 0.16946636140346527, -0.004193069413304329, 0.3294341266155243, 0.18124999105930328, -0.2228415608406067, -0.40599438548088074, 0.1439862698316574, -0.20434913039207458, 0.307721883058548, 0.1737811118364334, 0.06246672570705414, 0.11205430328845978, -0.056676264852285385, 0.174301415681839, -0.2174953669309616, 0.14518006145954132, -0.16659294068813324, 0.23635868728160858, -0.1829383671283722, -0.1936650276184082, 0.055702514946460724, 0.3306398093700409, -0.06223946064710617, 0.2126483917236328, 0.0016047768294811249, 0.08500190824270248, -0.08407056331634521, -0.07447671890258789, 0.47445300221443176, 0.7585263252258301, 0.06461840122938156, 0.033149637281894684, -0.007239626720547676, -0.03444742038846016, -0.20428919792175293, 0.1993314027786255, 0.07641152292490005, 0.4182402789592743, 0.40307462215423584, 0.013354345224797726, 0.11448761820793152, 0.04064059257507324, -0.2641816735267639, -0.1368003636598587, 0.047582320868968964, -0.4155175983905792, 0.010882431641221046, -0.1339760273694992, 0.11058471351861954, -0.43695923686027527, -0.06781888008117676, -0.09709294140338898, -0.43119803071022034, -0.20406095683574677, 0.6053658723831177, -0.12867549061775208, -0.1061849370598793, 0.21254803240299225, 0.02033647894859314, -0.21960808336734772, -0.27153825759887695, -0.20550315082073212, 0.09937075525522232, -0.19676083326339722, -0.10581082105636597, 0.2419968992471695, 0.09369127452373505, 0.19494864344596863, -0.18395845592021942, -0.21001110970973969, -0.27313968539237976, -0.008273236453533173, 0.05958637595176697, -0.04741571843624115, 0.18411539494991302, 0.016511358320713043, 0.22556766867637634, 0.1444554626941681, -0.4229518473148346, 0.20885683596134186, -0.19014886021614075, -0.23855115473270416, 0.09260639548301697, 0.21826258301734924, -0.15169286727905273, -0.20540232956409454, -0.33216676115989685, -0.4588550329208374, -0.43981966376304626, 0.1718241572380066, -0.054360199719667435, 0.15660721063613892, -0.3143673241138458, 0.24420693516731262, 0.03516894951462746, 0.23240040242671967, 0.013631956651806831, -0.07563779503107071, -0.19409489631652832, 0.4806300103664398, -0.14208902418613434, -0.2508004903793335, 0.051271382719278336, 0.19741326570510864, 0.040130604058504105, 0.04720982536673546, -0.365792453289032, -0.12092367559671402, -0.08640377223491669, 0.09409688413143158, -0.21447837352752686, 0.06916225701570511, 0.26594749093055725, 0.028500564396381378, 0.0436965674161911, -0.026831546798348427, -0.3267613649368286, 0.1331758052110672, 0.21651366353034973, 0.15866750478744507, -0.039801448583602905, 0.4221000075340271, 0.03515865281224251, 0.35677462816238403, 0.26949357986450195, 0.03913792222738266, 0.18815270066261292, 0.17920562624931335, 0.2134333997964859, -0.18842387199401855, -0.3604234457015991, -0.20735974609851837, -0.12194594740867615, -0.3263208866119385, -0.16095195710659027, -0.04991796612739563, -0.03790219873189926, -0.2592143714427948, -0.22965316474437714, -0.5250450968742371, -0.3166353702545166, -0.050738997757434845, 0.03218428045511246, 0.05948558449745178, -0.14493434131145477, 0.22346001863479614, -0.0556594543159008, 0.15300297737121582, 0.1052333414554596, 0.4250113368034363, 0.2477359175682068, -0.011132393032312393, -0.3744657039642334, -0.2794964015483856, 0.003385797142982483, 0.3654208183288574, -0.012447361834347248, 0.10253310948610306, -0.2650871276855469, -0.08471871167421341, -0.1380912959575653, -0.16892565786838531, 0.8337206840515137, -0.04800832271575928, 0.11632049083709717, 0.20542334020137787, -0.14295001327991486, -0.3742005527019501, 0.0357748307287693, 0.19665630161762238, 0.08135926723480225, 0.17717255651950836, 0.8088908195495605, -0.06563811004161835, -0.14278000593185425, -0.09961742162704468, 0.26298272609710693, -0.30953681468963623, -0.3826819956302643, -0.04862057417631149, -0.1773073971271515, -0.48401567339897156, -0.2591527998447418, -0.04248622804880142, 0.10256920754909515, -0.1666189581155777, -0.2044740468263626, 0.03050956502556801, -0.18138089776039124, 0.12074507027864456, -0.1673354059457779, 0.5097062587738037, -0.438762366771698, 0.15637612342834473, 0.16262942552566528, -0.10625109076499939, 0.5962854623794556, 0.4233914911746979, -0.11890855431556702, -0.26463454961776733, 0.09149536490440369, -0.21107333898544312, 0.14221055805683136, 0.32187944650650024, 0.008146891370415688, -0.23622214794158936, 0.05421869084239006, 0.06704182177782059, -0.24574068188667297, -0.30203840136528015, 0.11881504952907562, -0.19248992204666138, -0.21910175681114197, -0.5185202956199646, 0.3012198507785797, 0.2540455162525177, -0.082950159907341, -0.05017445981502533, -0.037528470158576965, -0.21991682052612305, 0.5497977137565613, -0.17132803797721863, 1.020887851715088, 0.10003171861171722, 0.14883331954479218, 0.26422950625419617, -0.31854647397994995, 0.30592408776283264, -0.14946500957012177, 0.012865117751061916, -0.25134435296058655, 0.09814449399709702, -0.138097882270813, -0.30051982402801514, -0.0005248263478279114, 0.4005223512649536, -0.26485440135002136, 0.3912699222564697, -0.16328845918178558, -0.04965312406420708, -0.23588760197162628, 0.215972900390625, -0.12437073141336441, -0.19384868443012238, -0.4818893074989319, 0.060629382729530334, 0.12608063220977783, 0.3104175329208374, 0.09203246980905533, -0.20862500369548798, -0.38216835260391235, -0.025888513773679733, -0.16225716471672058, 0.2711660861968994, -0.046501968055963516, 0.48240184783935547, -0.154237300157547, -0.4039052128791809, -0.04761204868555069, 0.5758289098739624, 0.29756617546081543, -0.12533029913902283, -0.17785684764385223, -0.18355901539325714, 0.020568113774061203, 0.30252334475517273, -0.2065064013004303, -0.33148860931396484, 0.5029805898666382, -0.06432759761810303, -0.15009768307209015, -0.04604071378707886, -0.13781628012657166, -0.3255537152290344, -0.2770240306854248, 0.08021235466003418, -0.19196374714374542, -0.10684078931808472, -0.3981931209564209, 0.06143505126237869, 0.0949859768152237, -0.3091374337673187, 0.04965604096651077, 0.21822811663150787, 0.11669694632291794, 0.054291922599077225, -0.28795748949050903, -0.09379725903272629, 0.05471697077155113, 0.5448534488677979, -0.01717779040336609, -0.0035180561244487762, 0.28033560514450073, -0.09818324446678162, -0.06586303561925888, -0.2270573377609253, 0.22697147727012634, 0.06643521785736084, -0.2888087034225464, 0.45071181654930115, -0.3576381504535675, 0.0879853218793869, -0.2016422301530838, 0.16615787148475647, 0.27374178171157837, -0.061112381517887115, -0.00554141029715538, -0.427625447511673, -0.2893224358558655, 0.28257888555526733, 0.2939664423465729, 0.1758795827627182, 0.1567591428756714, -0.15299415588378906, -0.06036753207445145, -0.062394559383392334, -0.18991726636886597, 0.08350133895874023, -0.00539277121424675, -0.12602956593036652, 0.01722533255815506, 0.011472571641206741, 0.07907406985759735, -0.30990609526634216, 0.026355208829045296, -0.1711450070142746, 0.025553017854690552, -0.07796406745910645, -0.025391006842255592, 0.16462752223014832, 0.08813565224409103, 0.08965062350034714, -0.21347564458847046, -0.36688196659088135, 0.26194486021995544, -0.20761257410049438, 0.22295935451984406, 0.2996295392513275, 0.048313748091459274, 0.09062829613685608, 0.0874328762292862, 0.37613004446029663, -0.22902296483516693, 0.2095329761505127, -0.12920606136322021, 0.22332583367824554, 0.027826424688100815, 0.08357266336679459, -0.000878235325217247, -0.03249448910355568, -0.5418761968612671, -0.08311741799116135, 0.1482141762971878, 0.3846341073513031, 0.15144458413124084, -0.22087033092975616, -0.06763622909784317, -0.045310646295547485, 0.38685664534568787, 0.3088814318180084, -0.27213725447654724, 0.24738125503063202, -0.029265057295560837, 0.13239453732967377, 0.11707097291946411, -0.17980645596981049, 0.026299498975276947, -0.10833004117012024, -0.18153615295886993, 0.06455676257610321, -0.1594802290201187, 0.027242712676525116, -0.45538330078125, 0.12638476490974426, 0.5783293843269348, -0.2782408595085144, 0.13463176786899567, 0.34110090136528015, 0.059229474514722824, 0.47412434220314026, -0.20064939558506012, -0.1741560399532318, 0.21489951014518738, 0.30663949251174927, 0.022749140858650208, 0.2576090097427368, 0.2274412214756012, 0.12066619098186493, 0.26223358511924744, -0.2492770403623581, -0.06303040683269501, -0.08450967073440552, -0.24485495686531067, -0.019286081194877625, 0.14950381219387054, 0.027884718030691147, -0.5283806324005127, -0.08368709683418274, -0.060507483780384064, -0.00440288707613945, -0.1037561222910881, -0.0038005467504262924, -0.012849481776356697, -0.21402981877326965, 0.12866003811359406, -0.06054621562361717, 0.004769947379827499, -0.17626798152923584, 0.10501619428396225, 0.23811408877372742, -0.09786415100097656, 0.24654479324817657, 0.06453289836645126, 0.1737651228904724, -0.0015652850270271301, -0.1358412653207779, -0.008242381736636162, 0.16376973688602448, -0.27310341596603394, -0.1656358391046524, 0.19542811810970306, 0.5575494766235352, 0.5093077421188354, -0.07901693880558014, -0.06526100635528564, 0.15760166943073273, -0.19759294390678406, -0.04503489285707474, 0.04958793893456459, -0.2058161199092865, 0.274347722530365, 0.30956634879112244, 0.23498132824897766, -0.016288692131638527, 0.2123924344778061, 0.22837816178798676, 0.45286065340042114, -0.21240825951099396, 0.700260579586029, -0.2316216230392456, -0.252334862947464, 0.043246883898973465, -0.13759750127792358, -0.2326691448688507, -0.27157533168792725, 0.07294361293315887, 0.10441635549068451, 0.26381391286849976, 0.1911269575357437, 0.05248120427131653, 0.2173941433429718, 0.09016168117523193, 0.15938805043697357, -0.18636277318000793, -0.2668274939060211, 0.2266167551279068, -0.5496718883514404, 0.06571461260318756, 0.135438472032547, 0.07488075643777847, -0.24961966276168823, 0.21570608019828796, 0.06731128692626953, 0.07218708097934723, 0.15373080968856812, 0.022684091702103615, 0.09637046605348587, 0.3004967272281647, -0.18315190076828003, -0.15404720604419708, 0.1283838152885437, -0.028337853029370308, 0.18518228828907013, -0.46447375416755676, 0.26577746868133545, 0.06028066948056221, -0.017666518688201904, -0.046148285269737244, 0.11655470728874207, 0.09301027655601501, 0.31533753871917725, 0.4169463515281677, 0.14848382771015167, 0.2761137783527374, -0.15645572543144226, -0.263832151889801, -0.06819236278533936, 0.06500253826379776, -0.08874034136533737, 0.3637217581272125, -0.15435278415679932, 0.6169588565826416, -0.4431060254573822, 0.08003976941108704, -0.41589924693107605, 0.017206165939569473, -0.23748290538787842, -0.16237950325012207, -0.28313371539115906, 0.17995761334896088, 0.05469156801700592, 0.1158028393983841, 0.5101565718650818, 0.1192530170083046, -0.08787968754768372, 0.26651665568351746, -0.3581807017326355, -0.0754757896065712, 0.3443347215652466, -0.01059692446142435, -0.08008067309856415, -0.0681011974811554, 0.23782049119472504, 0.16395880281925201, 0.35119619965553284, -0.4744575023651123, -0.3576360046863556, 0.36632585525512695, -0.11556271463632584, -0.17435672879219055, 0.1275443583726883, -0.09256455302238464, -0.10262101143598557, 0.03776833787560463, 0.27360329031944275, 0.18865233659744263, -0.4187127351760864, 0.19851356744766235, -0.24180868268013 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
It actually seems to happen all the time in above configuration: * the function `filter_by_duration` correctly loads cached processed dataset * the function `prepare_dataset` is always reexecuted I end up solving the issue by saving to disk my dataset at the end but I'm still wondering if it's a bug or limitation here.
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
53
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No It actually seems to happen all the time in above configuration: * the function `filter_by_duration` correctly loads cached processed dataset * the function `prepare_dataset` is always reexecuted I end up solving the issue by saving to disk my dataset at the end but I'm still wondering if it's a bug or limitation here.
[ -0.2978547513484955, -0.04235486686229706, -0.07583016157150269, 0.423616886138916, -0.07194650918245316, -0.027689583599567413, 0.23264187574386597, 0.3540043532848358, 0.20896056294441223, -0.06976702809333801, 0.04105135798454285, 0.18866665661334991, -0.28496962785720825, -0.2252899706363678, 0.11287043243646622, 0.29755300283432007, 0.05280393362045288, 0.11804214864969254, -0.10905776917934418, -0.15407884120941162, -0.015063676983118057, 0.2576182782649994, -0.04692401736974716, -0.09365189075469971, -0.2029946893453598, 0.10558225214481354, 0.02628207765519619, 0.13408109545707703, 0.09218060970306396, -0.274039626121521, 0.5368281602859497, 0.0920562744140625, 0.1350371241569519, 0.5165358185768127, -0.00012106735084671527, 0.14664380252361298, 0.28590595722198486, -0.21573901176452637, -0.21815170347690582, -0.12804438173770905, -0.2788817286491394, -0.08327910304069519, -0.12381835281848907, -0.2300586700439453, -0.012047754600644112, 0.01221462618559599, -0.04811251908540726, -0.853602945804596, 0.4599449038505554, 0.06610377877950668, 0.1565442532300949, -0.1820601522922516, -0.3796679377555847, 0.12594075500965118, 0.03826800733804703, -0.07413820922374725, 0.020573211833834648, 0.14913775026798248, 0.13223198056221008, -0.09457974880933762, -0.04124801605939865, 0.5044329166412354, -0.08291450142860413, -0.058124419301748276, 0.00167856365442276, 0.053882673382759094, 0.23300686478614807, -0.1952105164527893, 0.1459399312734604, 0.10849654674530029, 0.19637858867645264, -0.21240150928497314, -0.35019463300704956, -0.27278050780296326, -0.3075907528400421, -0.213521346449852, 0.3252163529396057, -0.15558229386806488, 0.14686742424964905, 0.16517920792102814, -0.6091318130493164, -0.012385443784296513, 0.19131377339363098, -0.026544608175754547, -0.019740641117095947, -0.11296987533569336, -0.16819298267364502, 0.15201663970947266, 0.10837599635124207, -0.03200288861989975, 0.2745791971683502, -0.1657440960407257, -0.005322776734828949, 0.45618051290512085, -0.06966108083724976, 0.20847806334495544, 0.30966317653656006, 0.06381788849830627, -0.039825405925512314, 0.26310640573501587, 0.17517167329788208, 0.10681132227182388, -0.03458521142601967, -0.06441150605678558, 0.13061805069446564, 0.21332646906375885, 0.24048861861228943, 0.2522968351840973, -0.04967363923788071, -0.11468970030546188, -0.5343182682991028, 0.05868688225746155, -0.12548092007637024, -0.28305113315582275, 0.7806982398033142, 0.17872220277786255, -0.06201208382844925, -0.4015016555786133, 0.06464094668626785, 0.04148344323039055, -0.425152987241745, -0.35265010595321655, 0.14821095764636993, 0.4227847456932068, -0.22410371899604797, 0.23589614033699036, -0.03786810487508774, -0.13864558935165405, -0.2654690742492676, 0.1546199768781662, -0.16684146225452423, -0.20380939543247223, -0.3884482979774475, 0.1796002835035324, 0.3731364905834198, -0.40052035450935364, 0.27015718817710876, 0.08726479113101959, 0.06049452722072601, -0.2748984098434448, 0.165198415517807, -0.13406620919704437, 0.5168506503105164, 0.06579621881246567, 0.005364593118429184, 0.21829861402511597, 0.15906503796577454, 0.037864118814468384, -0.22425594925880432, 0.10186854004859924, -0.5072762966156006, -0.1304602175951004, 0.3186747431755066, 0.07642430812120438, -0.23963332176208496, 0.3016888499259949, -0.20983755588531494, 0.26442253589630127, 0.37796056270599365, -0.3355061709880829, -0.11665134876966476, -0.20697596669197083, -0.2666154205799103, -0.47855237126350403, 0.41955429315567017, 0.6090711951255798, -0.2946229875087738, -0.31020987033843994, -0.1382855772972107, -0.028104986995458603, -0.059906668961048126, 0.06828831136226654, -0.2763515114784241, 0.09926750510931015, -0.3678860068321228, 0.02616431564092636, 0.4927735924720764, -0.35721346735954285, -0.48763135075569153, 0.04744809865951538, 0.25086021423339844, 0.5972848534584045, -0.08021198958158493, -0.14638137817382812, 0.19304698705673218, -0.22662809491157532, 0.28265076875686646, 0.11323253065347672, 0.021368365734815598, -0.14294376969337463, -0.16659760475158691, -0.10392932593822479, 0.1472650170326233, -0.12597325444221497, 0.3338225185871124, 0.1621624231338501, 0.18656781315803528, -0.12450075894594193, 0.13041040301322937, -0.04702485725283623, -0.01865607500076294, 0.3194217085838318, -0.08833995461463928, -0.046556033194065094, 0.12333863973617554, -0.25343114137649536, -0.30302372574806213, 0.4161659777164459, -0.2770422697067261, -0.5969231724739075, 0.028956390917301178, 0.048469118773937225, -0.2076307237148285, -0.06451965123414993, -0.17082034051418304, -0.24341800808906555, 0.031651392579078674, 0.22972263395786285, 0.22840264439582825, -0.02110007219016552, -0.05451783537864685, 0.5442662239074707, 0.01027677021920681, -0.27405059337615967, -0.2433665245771408, 0.16923251748085022, 0.2576337158679962, -0.17161384224891663, -0.30555200576782227, 0.0876920223236084, 0.3064354360103607, -0.14919047057628632, -0.1570725440979004, 0.16958904266357422, 0.05949483439326286, 0.20136858522891998, -0.22495907545089722, 0.29292845726013184, -0.16005446016788483, -0.12229613959789276, 0.15848317742347717, 0.02842600829899311, -0.04161309450864792, -0.16369566321372986, -0.02392330765724182, 0.3278396427631378, 0.16893069446086884, 0.002059727907180786, 0.05164981633424759, -0.186027392745018, 0.18950966000556946, -0.10541211068630219, -0.1175350621342659, -0.2751559615135193, 0.15478515625, -0.18861190974712372, 0.4881472587585449, 0.23946312069892883, 0.08603635430335999, 0.17198516428470612, 0.48863735795021057, 0.2141721397638321, 0.13402104377746582, -0.05347936600446701, -0.3166263699531555, -0.1791444718837738, -0.18317162990570068, 0.005126159638166428, 0.16205887496471405, -0.0005778448539786041, -0.021061662584543228, -0.023351242765784264, 0.017993779852986336, 0.2533574402332306, 0.07798969745635986, -0.23412786424160004, 0.3470127582550049, 0.14445804059505463, 0.11984928697347641, 0.03592071309685707, -0.1744268834590912, 0.045837607234716415, 0.12112095206975937, -0.041086480021476746, -0.46686843037605286, 0.136464923620224, -0.3292940855026245, 0.2719797194004059, -0.24520376324653625, -0.06383030861616135, 0.028658796101808548, -0.22461681067943573, -0.191974937915802, 0.31946930289268494, 0.2880188226699829, 0.2144111543893814, -0.3410928249359131, 0.11466162651777267, -0.18947312235832214, -0.16039445996284485, -0.010080412030220032, -0.11313451081514359, -0.3489118218421936, -0.008692862465977669, 0.14383473992347717, -0.20550137758255005, 0.20750118792057037, -0.02559836395084858, -0.14011278748512268, -0.26771101355552673, -0.359572172164917, 0.09351198375225067, 0.2070472538471222, 0.3455575108528137, -0.24129122495651245, -0.09006720781326294, -0.20699459314346313, -0.06373947113752365, 0.17087292671203613, -0.23139157891273499, -0.14288456737995148, -0.06841816008090973, -0.005727372132241726, 0.0865047425031662, 0.09386338293552399, -0.40327775478363037, -0.30044975876808167, 0.06979760527610779, -0.10724934935569763, -0.08476375043392181, 0.03768729418516159, 0.07338972389698029, -0.144119992852211, -0.21604399383068085, -0.03278737887740135, -0.049536801874637604, -0.4220377206802368, -0.4178793132305145, 0.2509203851222992, -0.23217056691646576, 0.03694386035203934, -0.12748606503009796, -0.12137065082788467, -0.0014035329222679138, 0.580202043056488, -0.3909652829170227, 0.1654575616121292, -0.009616168215870857, 0.05026392266154289, 0.0005155988037586212, -0.1375778168439865, 0.44441717863082886, 0.19671225547790527, 0.1541723757982254, -0.24199286103248596, -0.41169995069503784, 0.03495802730321884, -0.0705294981598854, 0.28733572363853455, 0.12383393198251724, 0.17018947005271912, -0.020132174715399742, 1.096538782119751, 0.31841057538986206, -0.21035067737102509, 0.06612399220466614, -0.0407358855009079, 0.2642989754676819, -0.01091679185628891, -0.3952404260635376, -0.16543933749198914, -0.15206694602966309, -0.19277913868427277, 0.057801295071840286, 0.06328615546226501, -0.3083129823207855, -0.04003724083304405, 0.21403086185455322, -0.717714250087738, -0.2080446034669876, 0.2859524190425873, -0.6640015244483948, 0.27851253747940063, 0.15919798612594604, 0.17277541756629944, -0.5495753884315491, 0.06869187951087952, 0.08213482797145844, -0.14909571409225464, 0.5069199204444885, 0.0073019652627408504, -0.16759531199932098, 0.1631198674440384, 0.03673245757818222, 0.1653807908296585, 0.2624441981315613, 0.22165244817733765, -0.12357392907142639, -0.09677591919898987, -0.22732894122600555, -0.053623415529727936, 0.44563204050064087, -0.6023890972137451, 0.2966640293598175, 0.3834201693534851, -0.3278222680091858, -0.1631360501050949, -0.22921594977378845, 0.12757453322410583, 0.3774186968803406, 0.17381732165813446, 0.29647529125213623, -0.029539164155721664, 0.16229528188705444, -0.07849034667015076, 0.14586390554904938, -0.28140413761138916, -0.04928110912442207, -0.04558643326163292, 0.13524362444877625, 0.14197246730327606, -0.03652901202440262, -0.22726331651210785, -0.021706631407141685, -0.05170176178216934, -0.05307968705892563, -0.4242404103279114, 0.07396867126226425, 0.2555032968521118, 0.32462266087532043, 0.5262852311134338, 0.06246882304549217, 0.43907463550567627, 0.2741703987121582, 0.035101354122161865, -0.08514462411403656, 0.5787374377250671, -0.20233237743377686, -0.1998821198940277, 0.009701710194349289, 0.2453022301197052, -0.11760606616735458, 0.09504710137844086, -0.3850998282432556, -0.19491082429885864, 0.16853243112564087, -0.11467418074607849, -0.10574636608362198, -0.1660594940185547, 0.05552498996257782, 0.28188493847846985, -0.5762337446212769, -0.6871483325958252, 0.4059183895587921, 0.47332215309143066, -0.4103279709815979, 0.7267807126045227, -0.5869195461273193, -0.26297080516815186, 0.2095642387866974, -0.18466320633888245, 0.7170382142066956, -0.21868057548999786, -0.09955769777297974, -0.09233033657073975, 0.3079003095626831, -0.039302047342061996, -0.172489732503891, -0.040016643702983856, -0.27098017930984497, -0.18532343208789825, -0.12546926736831665, -0.2476447969675064, 0.08484798669815063, 0.2775763273239136, 0.0025096051394939423, 0.3366938829421997, -0.2414916455745697, 0.480731725692749, 0.018430283293128014, -0.09305068850517273, 0.17149707674980164, -0.06028110161423683, -0.3047183156013489, 0.11556905508041382, 0.07779160141944885, 0.17580950260162354, -0.05944201350212097, -0.058444708585739136, -0.11472528427839279, -0.06742300093173981, -0.3334652781486511, 0.2548060715198517, -0.6193095445632935, 0.4070168733596802, -0.11859607696533203, -0.1381228268146515, -0.11806714534759521, 0.11568339169025421, 0.1650659590959549, 0.08378031849861145, -0.04017399996519089, 0.2410155087709427, 0.32646042108535767, 0.17914947867393494, 0.04176628217101097, -0.18669897317886353, 0.13898852467536926, 0.0957631841301918, -0.10712876170873642, 0.15879002213478088, -0.15443015098571777, -0.37526142597198486, -0.17600330710411072, 0.18447086215019226, 0.009123001247644424, -0.014728974550962448, -0.22403286397457123, 0.27889078855514526, 0.26172253489494324, 0.11547257006168365, 0.05109233409166336, 0.2583162784576416, 0.10496644675731659, 0.33746540546417236, -0.12671317160129547, -0.29268279671669006, 0.03194586932659149, 0.5468698143959045, 0.1948588788509369, -0.1740586757659912, 0.2723887264728546, -0.17556339502334595, -0.04219489544630051, -0.03350219130516052, -0.3243030309677124, 0.10448957979679108, -0.29069390892982483, 0.08634612709283829, -0.35254088044166565, 0.13696815073490143, 0.2956293523311615, -0.15168118476867676, 0.177285298705101, 0.24084240198135376, -0.10966739058494568, -0.3795478343963623, -0.06409376114606857, -0.031177036464214325, -0.05997658148407936, 0.07217399030923843, 0.118381567299366, -0.2975923418998718, -0.12805117666721344, 0.33150801062583923, -0.20371711254119873, 0.14262118935585022, 0.1388361155986786, 0.06126973032951355, -0.0742921456694603, 0.21384215354919434, 0.2881689965724945, -0.27103927731513977, -0.020650045946240425, 0.06421807408332825, -0.32460418343544006, -0.09577160328626633, -0.10543042421340942, 0.119521863758564, -0.2374325692653656, 0.12653683125972748, -0.09611672163009644, -0.045262135565280914, 0.2535041272640228, -0.2583848536014557, 0.17694281041622162, 0.44294241070747375, 0.2472514510154724, -0.12137285619974136, 0.03626637160778046, -0.2371959090232849, -0.19844557344913483, 0.2644014358520508, -0.19558867812156677, -0.00017511099576950073, 0.004138218704611063, 0.3197753131389618, 0.002001553773880005, -0.06612497568130493, -0.17957477271556854, -0.1680135428905487, -0.004072494804859161, 0.18742835521697998, 0.3716539740562439, -0.15245957672595978, 0.1358591616153717, 0.1358649879693985, 0.22964376211166382, 0.2164583057165146, -0.13118267059326172, 0.025959709659218788, 0.006481691263616085, 0.10729601234197617, -0.08309255540370941, 0.003598856972530484, 0.3172125518321991, 0.16025468707084656, -0.13532418012619019, 0.27863889932632446, 0.10401593148708344, -0.08376730233430862, 0.23445072770118713, 0.03863385692238808, 0.39398783445358276, -0.3727242350578308, 0.39576202630996704, 0.21920374035835266, 0.25170019268989563, 0.1452670693397522, 0.17965421080589294, 0.11626498401165009, 0.0013622865080833435, 0.256771981716156, 0.17827871441841125, 0.3827575445175171, 0.20700973272323608, 0.07899574935436249, -0.15745681524276733, -0.5870572924613953, -0.03520243987441063, 0.381971150636673, -0.3661767542362213, 0.5012779235839844, 0.02817276120185852, 0.058995749801397324, 0.16341863572597504, -0.31625035405158997, -0.30570733547210693, 0.38645270466804504, -0.014520648866891861, -0.23685070872306824, 0.18712939321994781, -0.20243915915489197, 0.07624047994613647, 0.038993943482637405, -0.007975786924362183, 0.04278542473912239, 0.5030099153518677, 0.16964977979660034, -0.22124041616916656, -0.013546457514166832, -0.18846863508224487, 0.11449696868658066, 0.42676234245300293, -0.11685581505298615, 0.14672894775867462, -0.06394191086292267, -0.13490237295627594, 0.04717492312192917, 0.3376615643501282, 0.460938036441803, 0.26162680983543396, 0.1134783923625946, 0.07904534041881561, 0.48463860154151917, 0.10159903764724731, -0.26998773217201233, 0.3003542423248291, -0.09871239960193634, -0.2325970083475113, 0.15142151713371277, 0.15021054446697235, -0.09258954226970673, 0.2429989129304886, -0.20071978867053986, 0.34916406869888306, -0.2665267586708069, 0.06343250721693039, -0.13399912416934967, 0.26278966665267944, -0.00196697935461998, 0.1811155378818512, -0.049006395041942596, -0.19750003516674042, 0.7122184634208679, 0.14420726895332336, 0.23820224404335022, 0.009711365215480328, 0.05152676999568939, 0.23910529911518097, 0.16208532452583313, 0.36635690927505493, 0.058446042239665985, -0.17986389994621277, -0.05939954146742821, -0.6679874658584595, 0.017487145960330963, -0.376148521900177, 0.21788358688354492, -0.08901148289442062, 0.2133030742406845, 0.2604062557220459, -0.08634699881076813, 0.24042855203151703, 0.0012779375538229942, 0.133468359708786, 0.24449343979358673, -0.43326112627983093, -0.2156454473733902, -0.18346385657787323, 0.05012694001197815, 0.04660846292972565, -0.43058881163597107, 0.02288736402988434, -0.05635685473680496, 0.07014615088701248, 0.04670865461230278, -0.23738986253738403, 0.1958329677581787, -0.11208873987197876, 0.6440412998199463, 0.14057610929012299, 0.3196023404598236, -0.06745530664920807, 0.08074162155389786, -0.3065131902694702, -0.10407281666994095, 0.19975990056991577, 0.23398199677467346, -0.0820053219795227, 0.2814271152019501, -0.3691292107105255, 0.02207351103425026, -0.26542043685913086, -0.06185409799218178, 0.15815256536006927, 0.0049341339617967606, -0.041892945766448975, -0.17688068747520447, 0.02340363711118698, 0.12277505546808243, 0.106358103454113, 0.5370635986328125, -0.19480320811271667, 0.38114938139915466, 0.012668564915657043, -0.08435424417257309, 0.23676685988903046, -0.5975604057312012, -0.059240784496068954, -0.12382807582616806, 0.2851487398147583, -0.12927260994911194, -0.0741119459271431, -0.26193347573280334, -0.03328395262360573, 0.4934826195240021, -0.20052260160446167, 0.0032075829803943634, 0.07302699238061905, -0.09207828342914581, 0.2536225914955139, -0.12442895770072937, 0.07576587051153183, 0.10356093943119049, -0.07844030857086182, 0.07039327919483185, -0.20118077099323273 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
Hi ! The hash used for caching `map` results is the fingerprint of the resulting dataset. It is computed using three things: - the old fingerprint of the dataset - the hash of the function - the hash of the other parameters passed to `map` You can compute the hash of your function (or any python object) with ```python from datasets.fingerprint import Hasher my_func = lambda x: x + 1 print(Hasher.hash(my_func)) ``` If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it.
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
94
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No Hi ! The hash used for caching `map` results is the fingerprint of the resulting dataset. It is computed using three things: - the old fingerprint of the dataset - the hash of the function - the hash of the other parameters passed to `map` You can compute the hash of your function (or any python object) with ```python from datasets.fingerprint import Hasher my_func = lambda x: x + 1 print(Hasher.hash(my_func)) ``` If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it.
[ -0.2978547513484955, -0.04235486686229706, -0.07583016157150269, 0.423616886138916, -0.07194650918245316, -0.027689583599567413, 0.23264187574386597, 0.3540043532848358, 0.20896056294441223, -0.06976702809333801, 0.04105135798454285, 0.18866665661334991, -0.28496962785720825, -0.2252899706363678, 0.11287043243646622, 0.29755300283432007, 0.05280393362045288, 0.11804214864969254, -0.10905776917934418, -0.15407884120941162, -0.015063676983118057, 0.2576182782649994, -0.04692401736974716, -0.09365189075469971, -0.2029946893453598, 0.10558225214481354, 0.02628207765519619, 0.13408109545707703, 0.09218060970306396, -0.274039626121521, 0.5368281602859497, 0.0920562744140625, 0.1350371241569519, 0.5165358185768127, -0.00012106735084671527, 0.14664380252361298, 0.28590595722198486, -0.21573901176452637, -0.21815170347690582, -0.12804438173770905, -0.2788817286491394, -0.08327910304069519, -0.12381835281848907, -0.2300586700439453, -0.012047754600644112, 0.01221462618559599, -0.04811251908540726, -0.853602945804596, 0.4599449038505554, 0.06610377877950668, 0.1565442532300949, -0.1820601522922516, -0.3796679377555847, 0.12594075500965118, 0.03826800733804703, -0.07413820922374725, 0.020573211833834648, 0.14913775026798248, 0.13223198056221008, -0.09457974880933762, -0.04124801605939865, 0.5044329166412354, -0.08291450142860413, -0.058124419301748276, 0.00167856365442276, 0.053882673382759094, 0.23300686478614807, -0.1952105164527893, 0.1459399312734604, 0.10849654674530029, 0.19637858867645264, -0.21240150928497314, -0.35019463300704956, -0.27278050780296326, -0.3075907528400421, -0.213521346449852, 0.3252163529396057, -0.15558229386806488, 0.14686742424964905, 0.16517920792102814, -0.6091318130493164, -0.012385443784296513, 0.19131377339363098, -0.026544608175754547, -0.019740641117095947, -0.11296987533569336, -0.16819298267364502, 0.15201663970947266, 0.10837599635124207, -0.03200288861989975, 0.2745791971683502, -0.1657440960407257, -0.005322776734828949, 0.45618051290512085, -0.06966108083724976, 0.20847806334495544, 0.30966317653656006, 0.06381788849830627, -0.039825405925512314, 0.26310640573501587, 0.17517167329788208, 0.10681132227182388, -0.03458521142601967, -0.06441150605678558, 0.13061805069446564, 0.21332646906375885, 0.24048861861228943, 0.2522968351840973, -0.04967363923788071, -0.11468970030546188, -0.5343182682991028, 0.05868688225746155, -0.12548092007637024, -0.28305113315582275, 0.7806982398033142, 0.17872220277786255, -0.06201208382844925, -0.4015016555786133, 0.06464094668626785, 0.04148344323039055, -0.425152987241745, -0.35265010595321655, 0.14821095764636993, 0.4227847456932068, -0.22410371899604797, 0.23589614033699036, -0.03786810487508774, -0.13864558935165405, -0.2654690742492676, 0.1546199768781662, -0.16684146225452423, -0.20380939543247223, -0.3884482979774475, 0.1796002835035324, 0.3731364905834198, -0.40052035450935364, 0.27015718817710876, 0.08726479113101959, 0.06049452722072601, -0.2748984098434448, 0.165198415517807, -0.13406620919704437, 0.5168506503105164, 0.06579621881246567, 0.005364593118429184, 0.21829861402511597, 0.15906503796577454, 0.037864118814468384, -0.22425594925880432, 0.10186854004859924, -0.5072762966156006, -0.1304602175951004, 0.3186747431755066, 0.07642430812120438, -0.23963332176208496, 0.3016888499259949, -0.20983755588531494, 0.26442253589630127, 0.37796056270599365, -0.3355061709880829, -0.11665134876966476, -0.20697596669197083, -0.2666154205799103, -0.47855237126350403, 0.41955429315567017, 0.6090711951255798, -0.2946229875087738, -0.31020987033843994, -0.1382855772972107, -0.028104986995458603, -0.059906668961048126, 0.06828831136226654, -0.2763515114784241, 0.09926750510931015, -0.3678860068321228, 0.02616431564092636, 0.4927735924720764, -0.35721346735954285, -0.48763135075569153, 0.04744809865951538, 0.25086021423339844, 0.5972848534584045, -0.08021198958158493, -0.14638137817382812, 0.19304698705673218, -0.22662809491157532, 0.28265076875686646, 0.11323253065347672, 0.021368365734815598, -0.14294376969337463, -0.16659760475158691, -0.10392932593822479, 0.1472650170326233, -0.12597325444221497, 0.3338225185871124, 0.1621624231338501, 0.18656781315803528, -0.12450075894594193, 0.13041040301322937, -0.04702485725283623, -0.01865607500076294, 0.3194217085838318, -0.08833995461463928, -0.046556033194065094, 0.12333863973617554, -0.25343114137649536, -0.30302372574806213, 0.4161659777164459, -0.2770422697067261, -0.5969231724739075, 0.028956390917301178, 0.048469118773937225, -0.2076307237148285, -0.06451965123414993, -0.17082034051418304, -0.24341800808906555, 0.031651392579078674, 0.22972263395786285, 0.22840264439582825, -0.02110007219016552, -0.05451783537864685, 0.5442662239074707, 0.01027677021920681, -0.27405059337615967, -0.2433665245771408, 0.16923251748085022, 0.2576337158679962, -0.17161384224891663, -0.30555200576782227, 0.0876920223236084, 0.3064354360103607, -0.14919047057628632, -0.1570725440979004, 0.16958904266357422, 0.05949483439326286, 0.20136858522891998, -0.22495907545089722, 0.29292845726013184, -0.16005446016788483, -0.12229613959789276, 0.15848317742347717, 0.02842600829899311, -0.04161309450864792, -0.16369566321372986, -0.02392330765724182, 0.3278396427631378, 0.16893069446086884, 0.002059727907180786, 0.05164981633424759, -0.186027392745018, 0.18950966000556946, -0.10541211068630219, -0.1175350621342659, -0.2751559615135193, 0.15478515625, -0.18861190974712372, 0.4881472587585449, 0.23946312069892883, 0.08603635430335999, 0.17198516428470612, 0.48863735795021057, 0.2141721397638321, 0.13402104377746582, -0.05347936600446701, -0.3166263699531555, -0.1791444718837738, -0.18317162990570068, 0.005126159638166428, 0.16205887496471405, -0.0005778448539786041, -0.021061662584543228, -0.023351242765784264, 0.017993779852986336, 0.2533574402332306, 0.07798969745635986, -0.23412786424160004, 0.3470127582550049, 0.14445804059505463, 0.11984928697347641, 0.03592071309685707, -0.1744268834590912, 0.045837607234716415, 0.12112095206975937, -0.041086480021476746, -0.46686843037605286, 0.136464923620224, -0.3292940855026245, 0.2719797194004059, -0.24520376324653625, -0.06383030861616135, 0.028658796101808548, -0.22461681067943573, -0.191974937915802, 0.31946930289268494, 0.2880188226699829, 0.2144111543893814, -0.3410928249359131, 0.11466162651777267, -0.18947312235832214, -0.16039445996284485, -0.010080412030220032, -0.11313451081514359, -0.3489118218421936, -0.008692862465977669, 0.14383473992347717, -0.20550137758255005, 0.20750118792057037, -0.02559836395084858, -0.14011278748512268, -0.26771101355552673, -0.359572172164917, 0.09351198375225067, 0.2070472538471222, 0.3455575108528137, -0.24129122495651245, -0.09006720781326294, -0.20699459314346313, -0.06373947113752365, 0.17087292671203613, -0.23139157891273499, -0.14288456737995148, -0.06841816008090973, -0.005727372132241726, 0.0865047425031662, 0.09386338293552399, -0.40327775478363037, -0.30044975876808167, 0.06979760527610779, -0.10724934935569763, -0.08476375043392181, 0.03768729418516159, 0.07338972389698029, -0.144119992852211, -0.21604399383068085, -0.03278737887740135, -0.049536801874637604, -0.4220377206802368, -0.4178793132305145, 0.2509203851222992, -0.23217056691646576, 0.03694386035203934, -0.12748606503009796, -0.12137065082788467, -0.0014035329222679138, 0.580202043056488, -0.3909652829170227, 0.1654575616121292, -0.009616168215870857, 0.05026392266154289, 0.0005155988037586212, -0.1375778168439865, 0.44441717863082886, 0.19671225547790527, 0.1541723757982254, -0.24199286103248596, -0.41169995069503784, 0.03495802730321884, -0.0705294981598854, 0.28733572363853455, 0.12383393198251724, 0.17018947005271912, -0.020132174715399742, 1.096538782119751, 0.31841057538986206, -0.21035067737102509, 0.06612399220466614, -0.0407358855009079, 0.2642989754676819, -0.01091679185628891, -0.3952404260635376, -0.16543933749198914, -0.15206694602966309, -0.19277913868427277, 0.057801295071840286, 0.06328615546226501, -0.3083129823207855, -0.04003724083304405, 0.21403086185455322, -0.717714250087738, -0.2080446034669876, 0.2859524190425873, -0.6640015244483948, 0.27851253747940063, 0.15919798612594604, 0.17277541756629944, -0.5495753884315491, 0.06869187951087952, 0.08213482797145844, -0.14909571409225464, 0.5069199204444885, 0.0073019652627408504, -0.16759531199932098, 0.1631198674440384, 0.03673245757818222, 0.1653807908296585, 0.2624441981315613, 0.22165244817733765, -0.12357392907142639, -0.09677591919898987, -0.22732894122600555, -0.053623415529727936, 0.44563204050064087, -0.6023890972137451, 0.2966640293598175, 0.3834201693534851, -0.3278222680091858, -0.1631360501050949, -0.22921594977378845, 0.12757453322410583, 0.3774186968803406, 0.17381732165813446, 0.29647529125213623, -0.029539164155721664, 0.16229528188705444, -0.07849034667015076, 0.14586390554904938, -0.28140413761138916, -0.04928110912442207, -0.04558643326163292, 0.13524362444877625, 0.14197246730327606, -0.03652901202440262, -0.22726331651210785, -0.021706631407141685, -0.05170176178216934, -0.05307968705892563, -0.4242404103279114, 0.07396867126226425, 0.2555032968521118, 0.32462266087532043, 0.5262852311134338, 0.06246882304549217, 0.43907463550567627, 0.2741703987121582, 0.035101354122161865, -0.08514462411403656, 0.5787374377250671, -0.20233237743377686, -0.1998821198940277, 0.009701710194349289, 0.2453022301197052, -0.11760606616735458, 0.09504710137844086, -0.3850998282432556, -0.19491082429885864, 0.16853243112564087, -0.11467418074607849, -0.10574636608362198, -0.1660594940185547, 0.05552498996257782, 0.28188493847846985, -0.5762337446212769, -0.6871483325958252, 0.4059183895587921, 0.47332215309143066, -0.4103279709815979, 0.7267807126045227, -0.5869195461273193, -0.26297080516815186, 0.2095642387866974, -0.18466320633888245, 0.7170382142066956, -0.21868057548999786, -0.09955769777297974, -0.09233033657073975, 0.3079003095626831, -0.039302047342061996, -0.172489732503891, -0.040016643702983856, -0.27098017930984497, -0.18532343208789825, -0.12546926736831665, -0.2476447969675064, 0.08484798669815063, 0.2775763273239136, 0.0025096051394939423, 0.3366938829421997, -0.2414916455745697, 0.480731725692749, 0.018430283293128014, -0.09305068850517273, 0.17149707674980164, -0.06028110161423683, -0.3047183156013489, 0.11556905508041382, 0.07779160141944885, 0.17580950260162354, -0.05944201350212097, -0.058444708585739136, -0.11472528427839279, -0.06742300093173981, -0.3334652781486511, 0.2548060715198517, -0.6193095445632935, 0.4070168733596802, -0.11859607696533203, -0.1381228268146515, -0.11806714534759521, 0.11568339169025421, 0.1650659590959549, 0.08378031849861145, -0.04017399996519089, 0.2410155087709427, 0.32646042108535767, 0.17914947867393494, 0.04176628217101097, -0.18669897317886353, 0.13898852467536926, 0.0957631841301918, -0.10712876170873642, 0.15879002213478088, -0.15443015098571777, -0.37526142597198486, -0.17600330710411072, 0.18447086215019226, 0.009123001247644424, -0.014728974550962448, -0.22403286397457123, 0.27889078855514526, 0.26172253489494324, 0.11547257006168365, 0.05109233409166336, 0.2583162784576416, 0.10496644675731659, 0.33746540546417236, -0.12671317160129547, -0.29268279671669006, 0.03194586932659149, 0.5468698143959045, 0.1948588788509369, -0.1740586757659912, 0.2723887264728546, -0.17556339502334595, -0.04219489544630051, -0.03350219130516052, -0.3243030309677124, 0.10448957979679108, -0.29069390892982483, 0.08634612709283829, -0.35254088044166565, 0.13696815073490143, 0.2956293523311615, -0.15168118476867676, 0.177285298705101, 0.24084240198135376, -0.10966739058494568, -0.3795478343963623, -0.06409376114606857, -0.031177036464214325, -0.05997658148407936, 0.07217399030923843, 0.118381567299366, -0.2975923418998718, -0.12805117666721344, 0.33150801062583923, -0.20371711254119873, 0.14262118935585022, 0.1388361155986786, 0.06126973032951355, -0.0742921456694603, 0.21384215354919434, 0.2881689965724945, -0.27103927731513977, -0.020650045946240425, 0.06421807408332825, -0.32460418343544006, -0.09577160328626633, -0.10543042421340942, 0.119521863758564, -0.2374325692653656, 0.12653683125972748, -0.09611672163009644, -0.045262135565280914, 0.2535041272640228, -0.2583848536014557, 0.17694281041622162, 0.44294241070747375, 0.2472514510154724, -0.12137285619974136, 0.03626637160778046, -0.2371959090232849, -0.19844557344913483, 0.2644014358520508, -0.19558867812156677, -0.00017511099576950073, 0.004138218704611063, 0.3197753131389618, 0.002001553773880005, -0.06612497568130493, -0.17957477271556854, -0.1680135428905487, -0.004072494804859161, 0.18742835521697998, 0.3716539740562439, -0.15245957672595978, 0.1358591616153717, 0.1358649879693985, 0.22964376211166382, 0.2164583057165146, -0.13118267059326172, 0.025959709659218788, 0.006481691263616085, 0.10729601234197617, -0.08309255540370941, 0.003598856972530484, 0.3172125518321991, 0.16025468707084656, -0.13532418012619019, 0.27863889932632446, 0.10401593148708344, -0.08376730233430862, 0.23445072770118713, 0.03863385692238808, 0.39398783445358276, -0.3727242350578308, 0.39576202630996704, 0.21920374035835266, 0.25170019268989563, 0.1452670693397522, 0.17965421080589294, 0.11626498401165009, 0.0013622865080833435, 0.256771981716156, 0.17827871441841125, 0.3827575445175171, 0.20700973272323608, 0.07899574935436249, -0.15745681524276733, -0.5870572924613953, -0.03520243987441063, 0.381971150636673, -0.3661767542362213, 0.5012779235839844, 0.02817276120185852, 0.058995749801397324, 0.16341863572597504, -0.31625035405158997, -0.30570733547210693, 0.38645270466804504, -0.014520648866891861, -0.23685070872306824, 0.18712939321994781, -0.20243915915489197, 0.07624047994613647, 0.038993943482637405, -0.007975786924362183, 0.04278542473912239, 0.5030099153518677, 0.16964977979660034, -0.22124041616916656, -0.013546457514166832, -0.18846863508224487, 0.11449696868658066, 0.42676234245300293, -0.11685581505298615, 0.14672894775867462, -0.06394191086292267, -0.13490237295627594, 0.04717492312192917, 0.3376615643501282, 0.460938036441803, 0.26162680983543396, 0.1134783923625946, 0.07904534041881561, 0.48463860154151917, 0.10159903764724731, -0.26998773217201233, 0.3003542423248291, -0.09871239960193634, -0.2325970083475113, 0.15142151713371277, 0.15021054446697235, -0.09258954226970673, 0.2429989129304886, -0.20071978867053986, 0.34916406869888306, -0.2665267586708069, 0.06343250721693039, -0.13399912416934967, 0.26278966665267944, -0.00196697935461998, 0.1811155378818512, -0.049006395041942596, -0.19750003516674042, 0.7122184634208679, 0.14420726895332336, 0.23820224404335022, 0.009711365215480328, 0.05152676999568939, 0.23910529911518097, 0.16208532452583313, 0.36635690927505493, 0.058446042239665985, -0.17986389994621277, -0.05939954146742821, -0.6679874658584595, 0.017487145960330963, -0.376148521900177, 0.21788358688354492, -0.08901148289442062, 0.2133030742406845, 0.2604062557220459, -0.08634699881076813, 0.24042855203151703, 0.0012779375538229942, 0.133468359708786, 0.24449343979358673, -0.43326112627983093, -0.2156454473733902, -0.18346385657787323, 0.05012694001197815, 0.04660846292972565, -0.43058881163597107, 0.02288736402988434, -0.05635685473680496, 0.07014615088701248, 0.04670865461230278, -0.23738986253738403, 0.1958329677581787, -0.11208873987197876, 0.6440412998199463, 0.14057610929012299, 0.3196023404598236, -0.06745530664920807, 0.08074162155389786, -0.3065131902694702, -0.10407281666994095, 0.19975990056991577, 0.23398199677467346, -0.0820053219795227, 0.2814271152019501, -0.3691292107105255, 0.02207351103425026, -0.26542043685913086, -0.06185409799218178, 0.15815256536006927, 0.0049341339617967606, -0.041892945766448975, -0.17688068747520447, 0.02340363711118698, 0.12277505546808243, 0.106358103454113, 0.5370635986328125, -0.19480320811271667, 0.38114938139915466, 0.012668564915657043, -0.08435424417257309, 0.23676685988903046, -0.5975604057312012, -0.059240784496068954, -0.12382807582616806, 0.2851487398147583, -0.12927260994911194, -0.0741119459271431, -0.26193347573280334, -0.03328395262360573, 0.4934826195240021, -0.20052260160446167, 0.0032075829803943634, 0.07302699238061905, -0.09207828342914581, 0.2536225914955139, -0.12442895770072937, 0.07576587051153183, 0.10356093943119049, -0.07844030857086182, 0.07039327919483185, -0.20118077099323273 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
> If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it. Yes I think that was the issue. For the hash of the function: * does it consider just the name or the actual code of the function * does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here)
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
70
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No > If `prepare_dataset` is always executed, maybe this is because your `processor` has a different hash each time you want to execute it. Yes I think that was the issue. For the hash of the function: * does it consider just the name or the actual code of the function * does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here)
[ -0.2978547513484955, -0.04235486686229706, -0.07583016157150269, 0.423616886138916, -0.07194650918245316, -0.027689583599567413, 0.23264187574386597, 0.3540043532848358, 0.20896056294441223, -0.06976702809333801, 0.04105135798454285, 0.18866665661334991, -0.28496962785720825, -0.2252899706363678, 0.11287043243646622, 0.29755300283432007, 0.05280393362045288, 0.11804214864969254, -0.10905776917934418, -0.15407884120941162, -0.015063676983118057, 0.2576182782649994, -0.04692401736974716, -0.09365189075469971, -0.2029946893453598, 0.10558225214481354, 0.02628207765519619, 0.13408109545707703, 0.09218060970306396, -0.274039626121521, 0.5368281602859497, 0.0920562744140625, 0.1350371241569519, 0.5165358185768127, -0.00012106735084671527, 0.14664380252361298, 0.28590595722198486, -0.21573901176452637, -0.21815170347690582, -0.12804438173770905, -0.2788817286491394, -0.08327910304069519, -0.12381835281848907, -0.2300586700439453, -0.012047754600644112, 0.01221462618559599, -0.04811251908540726, -0.853602945804596, 0.4599449038505554, 0.06610377877950668, 0.1565442532300949, -0.1820601522922516, -0.3796679377555847, 0.12594075500965118, 0.03826800733804703, -0.07413820922374725, 0.020573211833834648, 0.14913775026798248, 0.13223198056221008, -0.09457974880933762, -0.04124801605939865, 0.5044329166412354, -0.08291450142860413, -0.058124419301748276, 0.00167856365442276, 0.053882673382759094, 0.23300686478614807, -0.1952105164527893, 0.1459399312734604, 0.10849654674530029, 0.19637858867645264, -0.21240150928497314, -0.35019463300704956, -0.27278050780296326, -0.3075907528400421, -0.213521346449852, 0.3252163529396057, -0.15558229386806488, 0.14686742424964905, 0.16517920792102814, -0.6091318130493164, -0.012385443784296513, 0.19131377339363098, -0.026544608175754547, -0.019740641117095947, -0.11296987533569336, -0.16819298267364502, 0.15201663970947266, 0.10837599635124207, -0.03200288861989975, 0.2745791971683502, -0.1657440960407257, -0.005322776734828949, 0.45618051290512085, -0.06966108083724976, 0.20847806334495544, 0.30966317653656006, 0.06381788849830627, -0.039825405925512314, 0.26310640573501587, 0.17517167329788208, 0.10681132227182388, -0.03458521142601967, -0.06441150605678558, 0.13061805069446564, 0.21332646906375885, 0.24048861861228943, 0.2522968351840973, -0.04967363923788071, -0.11468970030546188, -0.5343182682991028, 0.05868688225746155, -0.12548092007637024, -0.28305113315582275, 0.7806982398033142, 0.17872220277786255, -0.06201208382844925, -0.4015016555786133, 0.06464094668626785, 0.04148344323039055, -0.425152987241745, -0.35265010595321655, 0.14821095764636993, 0.4227847456932068, -0.22410371899604797, 0.23589614033699036, -0.03786810487508774, -0.13864558935165405, -0.2654690742492676, 0.1546199768781662, -0.16684146225452423, -0.20380939543247223, -0.3884482979774475, 0.1796002835035324, 0.3731364905834198, -0.40052035450935364, 0.27015718817710876, 0.08726479113101959, 0.06049452722072601, -0.2748984098434448, 0.165198415517807, -0.13406620919704437, 0.5168506503105164, 0.06579621881246567, 0.005364593118429184, 0.21829861402511597, 0.15906503796577454, 0.037864118814468384, -0.22425594925880432, 0.10186854004859924, -0.5072762966156006, -0.1304602175951004, 0.3186747431755066, 0.07642430812120438, -0.23963332176208496, 0.3016888499259949, -0.20983755588531494, 0.26442253589630127, 0.37796056270599365, -0.3355061709880829, -0.11665134876966476, -0.20697596669197083, -0.2666154205799103, -0.47855237126350403, 0.41955429315567017, 0.6090711951255798, -0.2946229875087738, -0.31020987033843994, -0.1382855772972107, -0.028104986995458603, -0.059906668961048126, 0.06828831136226654, -0.2763515114784241, 0.09926750510931015, -0.3678860068321228, 0.02616431564092636, 0.4927735924720764, -0.35721346735954285, -0.48763135075569153, 0.04744809865951538, 0.25086021423339844, 0.5972848534584045, -0.08021198958158493, -0.14638137817382812, 0.19304698705673218, -0.22662809491157532, 0.28265076875686646, 0.11323253065347672, 0.021368365734815598, -0.14294376969337463, -0.16659760475158691, -0.10392932593822479, 0.1472650170326233, -0.12597325444221497, 0.3338225185871124, 0.1621624231338501, 0.18656781315803528, -0.12450075894594193, 0.13041040301322937, -0.04702485725283623, -0.01865607500076294, 0.3194217085838318, -0.08833995461463928, -0.046556033194065094, 0.12333863973617554, -0.25343114137649536, -0.30302372574806213, 0.4161659777164459, -0.2770422697067261, -0.5969231724739075, 0.028956390917301178, 0.048469118773937225, -0.2076307237148285, -0.06451965123414993, -0.17082034051418304, -0.24341800808906555, 0.031651392579078674, 0.22972263395786285, 0.22840264439582825, -0.02110007219016552, -0.05451783537864685, 0.5442662239074707, 0.01027677021920681, -0.27405059337615967, -0.2433665245771408, 0.16923251748085022, 0.2576337158679962, -0.17161384224891663, -0.30555200576782227, 0.0876920223236084, 0.3064354360103607, -0.14919047057628632, -0.1570725440979004, 0.16958904266357422, 0.05949483439326286, 0.20136858522891998, -0.22495907545089722, 0.29292845726013184, -0.16005446016788483, -0.12229613959789276, 0.15848317742347717, 0.02842600829899311, -0.04161309450864792, -0.16369566321372986, -0.02392330765724182, 0.3278396427631378, 0.16893069446086884, 0.002059727907180786, 0.05164981633424759, -0.186027392745018, 0.18950966000556946, -0.10541211068630219, -0.1175350621342659, -0.2751559615135193, 0.15478515625, -0.18861190974712372, 0.4881472587585449, 0.23946312069892883, 0.08603635430335999, 0.17198516428470612, 0.48863735795021057, 0.2141721397638321, 0.13402104377746582, -0.05347936600446701, -0.3166263699531555, -0.1791444718837738, -0.18317162990570068, 0.005126159638166428, 0.16205887496471405, -0.0005778448539786041, -0.021061662584543228, -0.023351242765784264, 0.017993779852986336, 0.2533574402332306, 0.07798969745635986, -0.23412786424160004, 0.3470127582550049, 0.14445804059505463, 0.11984928697347641, 0.03592071309685707, -0.1744268834590912, 0.045837607234716415, 0.12112095206975937, -0.041086480021476746, -0.46686843037605286, 0.136464923620224, -0.3292940855026245, 0.2719797194004059, -0.24520376324653625, -0.06383030861616135, 0.028658796101808548, -0.22461681067943573, -0.191974937915802, 0.31946930289268494, 0.2880188226699829, 0.2144111543893814, -0.3410928249359131, 0.11466162651777267, -0.18947312235832214, -0.16039445996284485, -0.010080412030220032, -0.11313451081514359, -0.3489118218421936, -0.008692862465977669, 0.14383473992347717, -0.20550137758255005, 0.20750118792057037, -0.02559836395084858, -0.14011278748512268, -0.26771101355552673, -0.359572172164917, 0.09351198375225067, 0.2070472538471222, 0.3455575108528137, -0.24129122495651245, -0.09006720781326294, -0.20699459314346313, -0.06373947113752365, 0.17087292671203613, -0.23139157891273499, -0.14288456737995148, -0.06841816008090973, -0.005727372132241726, 0.0865047425031662, 0.09386338293552399, -0.40327775478363037, -0.30044975876808167, 0.06979760527610779, -0.10724934935569763, -0.08476375043392181, 0.03768729418516159, 0.07338972389698029, -0.144119992852211, -0.21604399383068085, -0.03278737887740135, -0.049536801874637604, -0.4220377206802368, -0.4178793132305145, 0.2509203851222992, -0.23217056691646576, 0.03694386035203934, -0.12748606503009796, -0.12137065082788467, -0.0014035329222679138, 0.580202043056488, -0.3909652829170227, 0.1654575616121292, -0.009616168215870857, 0.05026392266154289, 0.0005155988037586212, -0.1375778168439865, 0.44441717863082886, 0.19671225547790527, 0.1541723757982254, -0.24199286103248596, -0.41169995069503784, 0.03495802730321884, -0.0705294981598854, 0.28733572363853455, 0.12383393198251724, 0.17018947005271912, -0.020132174715399742, 1.096538782119751, 0.31841057538986206, -0.21035067737102509, 0.06612399220466614, -0.0407358855009079, 0.2642989754676819, -0.01091679185628891, -0.3952404260635376, -0.16543933749198914, -0.15206694602966309, -0.19277913868427277, 0.057801295071840286, 0.06328615546226501, -0.3083129823207855, -0.04003724083304405, 0.21403086185455322, -0.717714250087738, -0.2080446034669876, 0.2859524190425873, -0.6640015244483948, 0.27851253747940063, 0.15919798612594604, 0.17277541756629944, -0.5495753884315491, 0.06869187951087952, 0.08213482797145844, -0.14909571409225464, 0.5069199204444885, 0.0073019652627408504, -0.16759531199932098, 0.1631198674440384, 0.03673245757818222, 0.1653807908296585, 0.2624441981315613, 0.22165244817733765, -0.12357392907142639, -0.09677591919898987, -0.22732894122600555, -0.053623415529727936, 0.44563204050064087, -0.6023890972137451, 0.2966640293598175, 0.3834201693534851, -0.3278222680091858, -0.1631360501050949, -0.22921594977378845, 0.12757453322410583, 0.3774186968803406, 0.17381732165813446, 0.29647529125213623, -0.029539164155721664, 0.16229528188705444, -0.07849034667015076, 0.14586390554904938, -0.28140413761138916, -0.04928110912442207, -0.04558643326163292, 0.13524362444877625, 0.14197246730327606, -0.03652901202440262, -0.22726331651210785, -0.021706631407141685, -0.05170176178216934, -0.05307968705892563, -0.4242404103279114, 0.07396867126226425, 0.2555032968521118, 0.32462266087532043, 0.5262852311134338, 0.06246882304549217, 0.43907463550567627, 0.2741703987121582, 0.035101354122161865, -0.08514462411403656, 0.5787374377250671, -0.20233237743377686, -0.1998821198940277, 0.009701710194349289, 0.2453022301197052, -0.11760606616735458, 0.09504710137844086, -0.3850998282432556, -0.19491082429885864, 0.16853243112564087, -0.11467418074607849, -0.10574636608362198, -0.1660594940185547, 0.05552498996257782, 0.28188493847846985, -0.5762337446212769, -0.6871483325958252, 0.4059183895587921, 0.47332215309143066, -0.4103279709815979, 0.7267807126045227, -0.5869195461273193, -0.26297080516815186, 0.2095642387866974, -0.18466320633888245, 0.7170382142066956, -0.21868057548999786, -0.09955769777297974, -0.09233033657073975, 0.3079003095626831, -0.039302047342061996, -0.172489732503891, -0.040016643702983856, -0.27098017930984497, -0.18532343208789825, -0.12546926736831665, -0.2476447969675064, 0.08484798669815063, 0.2775763273239136, 0.0025096051394939423, 0.3366938829421997, -0.2414916455745697, 0.480731725692749, 0.018430283293128014, -0.09305068850517273, 0.17149707674980164, -0.06028110161423683, -0.3047183156013489, 0.11556905508041382, 0.07779160141944885, 0.17580950260162354, -0.05944201350212097, -0.058444708585739136, -0.11472528427839279, -0.06742300093173981, -0.3334652781486511, 0.2548060715198517, -0.6193095445632935, 0.4070168733596802, -0.11859607696533203, -0.1381228268146515, -0.11806714534759521, 0.11568339169025421, 0.1650659590959549, 0.08378031849861145, -0.04017399996519089, 0.2410155087709427, 0.32646042108535767, 0.17914947867393494, 0.04176628217101097, -0.18669897317886353, 0.13898852467536926, 0.0957631841301918, -0.10712876170873642, 0.15879002213478088, -0.15443015098571777, -0.37526142597198486, -0.17600330710411072, 0.18447086215019226, 0.009123001247644424, -0.014728974550962448, -0.22403286397457123, 0.27889078855514526, 0.26172253489494324, 0.11547257006168365, 0.05109233409166336, 0.2583162784576416, 0.10496644675731659, 0.33746540546417236, -0.12671317160129547, -0.29268279671669006, 0.03194586932659149, 0.5468698143959045, 0.1948588788509369, -0.1740586757659912, 0.2723887264728546, -0.17556339502334595, -0.04219489544630051, -0.03350219130516052, -0.3243030309677124, 0.10448957979679108, -0.29069390892982483, 0.08634612709283829, -0.35254088044166565, 0.13696815073490143, 0.2956293523311615, -0.15168118476867676, 0.177285298705101, 0.24084240198135376, -0.10966739058494568, -0.3795478343963623, -0.06409376114606857, -0.031177036464214325, -0.05997658148407936, 0.07217399030923843, 0.118381567299366, -0.2975923418998718, -0.12805117666721344, 0.33150801062583923, -0.20371711254119873, 0.14262118935585022, 0.1388361155986786, 0.06126973032951355, -0.0742921456694603, 0.21384215354919434, 0.2881689965724945, -0.27103927731513977, -0.020650045946240425, 0.06421807408332825, -0.32460418343544006, -0.09577160328626633, -0.10543042421340942, 0.119521863758564, -0.2374325692653656, 0.12653683125972748, -0.09611672163009644, -0.045262135565280914, 0.2535041272640228, -0.2583848536014557, 0.17694281041622162, 0.44294241070747375, 0.2472514510154724, -0.12137285619974136, 0.03626637160778046, -0.2371959090232849, -0.19844557344913483, 0.2644014358520508, -0.19558867812156677, -0.00017511099576950073, 0.004138218704611063, 0.3197753131389618, 0.002001553773880005, -0.06612497568130493, -0.17957477271556854, -0.1680135428905487, -0.004072494804859161, 0.18742835521697998, 0.3716539740562439, -0.15245957672595978, 0.1358591616153717, 0.1358649879693985, 0.22964376211166382, 0.2164583057165146, -0.13118267059326172, 0.025959709659218788, 0.006481691263616085, 0.10729601234197617, -0.08309255540370941, 0.003598856972530484, 0.3172125518321991, 0.16025468707084656, -0.13532418012619019, 0.27863889932632446, 0.10401593148708344, -0.08376730233430862, 0.23445072770118713, 0.03863385692238808, 0.39398783445358276, -0.3727242350578308, 0.39576202630996704, 0.21920374035835266, 0.25170019268989563, 0.1452670693397522, 0.17965421080589294, 0.11626498401165009, 0.0013622865080833435, 0.256771981716156, 0.17827871441841125, 0.3827575445175171, 0.20700973272323608, 0.07899574935436249, -0.15745681524276733, -0.5870572924613953, -0.03520243987441063, 0.381971150636673, -0.3661767542362213, 0.5012779235839844, 0.02817276120185852, 0.058995749801397324, 0.16341863572597504, -0.31625035405158997, -0.30570733547210693, 0.38645270466804504, -0.014520648866891861, -0.23685070872306824, 0.18712939321994781, -0.20243915915489197, 0.07624047994613647, 0.038993943482637405, -0.007975786924362183, 0.04278542473912239, 0.5030099153518677, 0.16964977979660034, -0.22124041616916656, -0.013546457514166832, -0.18846863508224487, 0.11449696868658066, 0.42676234245300293, -0.11685581505298615, 0.14672894775867462, -0.06394191086292267, -0.13490237295627594, 0.04717492312192917, 0.3376615643501282, 0.460938036441803, 0.26162680983543396, 0.1134783923625946, 0.07904534041881561, 0.48463860154151917, 0.10159903764724731, -0.26998773217201233, 0.3003542423248291, -0.09871239960193634, -0.2325970083475113, 0.15142151713371277, 0.15021054446697235, -0.09258954226970673, 0.2429989129304886, -0.20071978867053986, 0.34916406869888306, -0.2665267586708069, 0.06343250721693039, -0.13399912416934967, 0.26278966665267944, -0.00196697935461998, 0.1811155378818512, -0.049006395041942596, -0.19750003516674042, 0.7122184634208679, 0.14420726895332336, 0.23820224404335022, 0.009711365215480328, 0.05152676999568939, 0.23910529911518097, 0.16208532452583313, 0.36635690927505493, 0.058446042239665985, -0.17986389994621277, -0.05939954146742821, -0.6679874658584595, 0.017487145960330963, -0.376148521900177, 0.21788358688354492, -0.08901148289442062, 0.2133030742406845, 0.2604062557220459, -0.08634699881076813, 0.24042855203151703, 0.0012779375538229942, 0.133468359708786, 0.24449343979358673, -0.43326112627983093, -0.2156454473733902, -0.18346385657787323, 0.05012694001197815, 0.04660846292972565, -0.43058881163597107, 0.02288736402988434, -0.05635685473680496, 0.07014615088701248, 0.04670865461230278, -0.23738986253738403, 0.1958329677581787, -0.11208873987197876, 0.6440412998199463, 0.14057610929012299, 0.3196023404598236, -0.06745530664920807, 0.08074162155389786, -0.3065131902694702, -0.10407281666994095, 0.19975990056991577, 0.23398199677467346, -0.0820053219795227, 0.2814271152019501, -0.3691292107105255, 0.02207351103425026, -0.26542043685913086, -0.06185409799218178, 0.15815256536006927, 0.0049341339617967606, -0.041892945766448975, -0.17688068747520447, 0.02340363711118698, 0.12277505546808243, 0.106358103454113, 0.5370635986328125, -0.19480320811271667, 0.38114938139915466, 0.012668564915657043, -0.08435424417257309, 0.23676685988903046, -0.5975604057312012, -0.059240784496068954, -0.12382807582616806, 0.2851487398147583, -0.12927260994911194, -0.0741119459271431, -0.26193347573280334, -0.03328395262360573, 0.4934826195240021, -0.20052260160446167, 0.0032075829803943634, 0.07302699238061905, -0.09207828342914581, 0.2536225914955139, -0.12442895770072937, 0.07576587051153183, 0.10356093943119049, -0.07844030857086182, 0.07039327919483185, -0.20118077099323273 ]
https://github.com/huggingface/datasets/issues/2415
Cached dataset not loaded
> does it consider just the name or the actual code of the function It looks at the name and the actual code and all variables such as recursively. It uses `dill` to do so, which is based on `pickle`. Basically the hash is computed using the pickle bytes of your function (computed using `dill` to support most python objects). > does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here) Yes it does thanks to recursive pickling.
## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No
87
Cached dataset not loaded ## Describe the bug I have a large dataset (common_voice, english) where I use several map and filter functions. Sometimes my cached datasets after specific functions are not loaded. I always use the same arguments, same functions, no seed… ## Steps to reproduce the bug ```python def filter_by_duration(batch): return ( batch["duration"] <= 10 and batch["duration"] >= 1 and len(batch["target_text"]) > 5 ) def prepare_dataset(batch): batch["input_values"] = processor( batch["speech"], sampling_rate=batch["sampling_rate"][0] ).input_values with processor.as_target_processor(): batch["labels"] = processor(batch["target_text"]).input_ids return batch train_dataset = train_dataset.filter( filter_by_duration, remove_columns=["duration"], num_proc=data_args.preprocessing_num_workers, ) # PROBLEM HERE -> below function is reexecuted and cache is not loaded train_dataset = train_dataset.map( prepare_dataset, remove_columns=train_dataset.column_names, batch_size=training_args.per_device_train_batch_size, batched=True, num_proc=data_args.preprocessing_num_workers, ) # Later in script set_caching_enabled(False) # apply map on trained model to eval/test sets ``` ## Expected results The cached dataset should always be reloaded. ## Actual results The function is reexecuted. I have access to cached files `cache-xxxxx.arrow`. Is there a way I can somehow load manually 2 versions and see how the hash was created for debug purposes (to know if it's an issue with dataset or function)? ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Linux-5.8.0-45-generic-x86_64-with-glibc2.29 - Python version: 3.8.5 - PyTorch version (GPU?): 1.8.1+cu102 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No > does it consider just the name or the actual code of the function It looks at the name and the actual code and all variables such as recursively. It uses `dill` to do so, which is based on `pickle`. Basically the hash is computed using the pickle bytes of your function (computed using `dill` to support most python objects). > does it consider variables that are not passed explicitly as parameters to the functions (such as the processor here) Yes it does thanks to recursive pickling.
[ -0.2978547513484955, -0.04235486686229706, -0.07583016157150269, 0.423616886138916, -0.07194650918245316, -0.027689583599567413, 0.23264187574386597, 0.3540043532848358, 0.20896056294441223, -0.06976702809333801, 0.04105135798454285, 0.18866665661334991, -0.28496962785720825, -0.2252899706363678, 0.11287043243646622, 0.29755300283432007, 0.05280393362045288, 0.11804214864969254, -0.10905776917934418, -0.15407884120941162, -0.015063676983118057, 0.2576182782649994, -0.04692401736974716, -0.09365189075469971, -0.2029946893453598, 0.10558225214481354, 0.02628207765519619, 0.13408109545707703, 0.09218060970306396, -0.274039626121521, 0.5368281602859497, 0.0920562744140625, 0.1350371241569519, 0.5165358185768127, -0.00012106735084671527, 0.14664380252361298, 0.28590595722198486, -0.21573901176452637, -0.21815170347690582, -0.12804438173770905, -0.2788817286491394, -0.08327910304069519, -0.12381835281848907, -0.2300586700439453, -0.012047754600644112, 0.01221462618559599, -0.04811251908540726, -0.853602945804596, 0.4599449038505554, 0.06610377877950668, 0.1565442532300949, -0.1820601522922516, -0.3796679377555847, 0.12594075500965118, 0.03826800733804703, -0.07413820922374725, 0.020573211833834648, 0.14913775026798248, 0.13223198056221008, -0.09457974880933762, -0.04124801605939865, 0.5044329166412354, -0.08291450142860413, -0.058124419301748276, 0.00167856365442276, 0.053882673382759094, 0.23300686478614807, -0.1952105164527893, 0.1459399312734604, 0.10849654674530029, 0.19637858867645264, -0.21240150928497314, -0.35019463300704956, -0.27278050780296326, -0.3075907528400421, -0.213521346449852, 0.3252163529396057, -0.15558229386806488, 0.14686742424964905, 0.16517920792102814, -0.6091318130493164, -0.012385443784296513, 0.19131377339363098, -0.026544608175754547, -0.019740641117095947, -0.11296987533569336, -0.16819298267364502, 0.15201663970947266, 0.10837599635124207, -0.03200288861989975, 0.2745791971683502, -0.1657440960407257, -0.005322776734828949, 0.45618051290512085, -0.06966108083724976, 0.20847806334495544, 0.30966317653656006, 0.06381788849830627, -0.039825405925512314, 0.26310640573501587, 0.17517167329788208, 0.10681132227182388, -0.03458521142601967, -0.06441150605678558, 0.13061805069446564, 0.21332646906375885, 0.24048861861228943, 0.2522968351840973, -0.04967363923788071, -0.11468970030546188, -0.5343182682991028, 0.05868688225746155, -0.12548092007637024, -0.28305113315582275, 0.7806982398033142, 0.17872220277786255, -0.06201208382844925, -0.4015016555786133, 0.06464094668626785, 0.04148344323039055, -0.425152987241745, -0.35265010595321655, 0.14821095764636993, 0.4227847456932068, -0.22410371899604797, 0.23589614033699036, -0.03786810487508774, -0.13864558935165405, -0.2654690742492676, 0.1546199768781662, -0.16684146225452423, -0.20380939543247223, -0.3884482979774475, 0.1796002835035324, 0.3731364905834198, -0.40052035450935364, 0.27015718817710876, 0.08726479113101959, 0.06049452722072601, -0.2748984098434448, 0.165198415517807, -0.13406620919704437, 0.5168506503105164, 0.06579621881246567, 0.005364593118429184, 0.21829861402511597, 0.15906503796577454, 0.037864118814468384, -0.22425594925880432, 0.10186854004859924, -0.5072762966156006, -0.1304602175951004, 0.3186747431755066, 0.07642430812120438, -0.23963332176208496, 0.3016888499259949, -0.20983755588531494, 0.26442253589630127, 0.37796056270599365, -0.3355061709880829, -0.11665134876966476, -0.20697596669197083, -0.2666154205799103, -0.47855237126350403, 0.41955429315567017, 0.6090711951255798, -0.2946229875087738, -0.31020987033843994, -0.1382855772972107, -0.028104986995458603, -0.059906668961048126, 0.06828831136226654, -0.2763515114784241, 0.09926750510931015, -0.3678860068321228, 0.02616431564092636, 0.4927735924720764, -0.35721346735954285, -0.48763135075569153, 0.04744809865951538, 0.25086021423339844, 0.5972848534584045, -0.08021198958158493, -0.14638137817382812, 0.19304698705673218, -0.22662809491157532, 0.28265076875686646, 0.11323253065347672, 0.021368365734815598, -0.14294376969337463, -0.16659760475158691, -0.10392932593822479, 0.1472650170326233, -0.12597325444221497, 0.3338225185871124, 0.1621624231338501, 0.18656781315803528, -0.12450075894594193, 0.13041040301322937, -0.04702485725283623, -0.01865607500076294, 0.3194217085838318, -0.08833995461463928, -0.046556033194065094, 0.12333863973617554, -0.25343114137649536, -0.30302372574806213, 0.4161659777164459, -0.2770422697067261, -0.5969231724739075, 0.028956390917301178, 0.048469118773937225, -0.2076307237148285, -0.06451965123414993, -0.17082034051418304, -0.24341800808906555, 0.031651392579078674, 0.22972263395786285, 0.22840264439582825, -0.02110007219016552, -0.05451783537864685, 0.5442662239074707, 0.01027677021920681, -0.27405059337615967, -0.2433665245771408, 0.16923251748085022, 0.2576337158679962, -0.17161384224891663, -0.30555200576782227, 0.0876920223236084, 0.3064354360103607, -0.14919047057628632, -0.1570725440979004, 0.16958904266357422, 0.05949483439326286, 0.20136858522891998, -0.22495907545089722, 0.29292845726013184, -0.16005446016788483, -0.12229613959789276, 0.15848317742347717, 0.02842600829899311, -0.04161309450864792, -0.16369566321372986, -0.02392330765724182, 0.3278396427631378, 0.16893069446086884, 0.002059727907180786, 0.05164981633424759, -0.186027392745018, 0.18950966000556946, -0.10541211068630219, -0.1175350621342659, -0.2751559615135193, 0.15478515625, -0.18861190974712372, 0.4881472587585449, 0.23946312069892883, 0.08603635430335999, 0.17198516428470612, 0.48863735795021057, 0.2141721397638321, 0.13402104377746582, -0.05347936600446701, -0.3166263699531555, -0.1791444718837738, -0.18317162990570068, 0.005126159638166428, 0.16205887496471405, -0.0005778448539786041, -0.021061662584543228, -0.023351242765784264, 0.017993779852986336, 0.2533574402332306, 0.07798969745635986, -0.23412786424160004, 0.3470127582550049, 0.14445804059505463, 0.11984928697347641, 0.03592071309685707, -0.1744268834590912, 0.045837607234716415, 0.12112095206975937, -0.041086480021476746, -0.46686843037605286, 0.136464923620224, -0.3292940855026245, 0.2719797194004059, -0.24520376324653625, -0.06383030861616135, 0.028658796101808548, -0.22461681067943573, -0.191974937915802, 0.31946930289268494, 0.2880188226699829, 0.2144111543893814, -0.3410928249359131, 0.11466162651777267, -0.18947312235832214, -0.16039445996284485, -0.010080412030220032, -0.11313451081514359, -0.3489118218421936, -0.008692862465977669, 0.14383473992347717, -0.20550137758255005, 0.20750118792057037, -0.02559836395084858, -0.14011278748512268, -0.26771101355552673, -0.359572172164917, 0.09351198375225067, 0.2070472538471222, 0.3455575108528137, -0.24129122495651245, -0.09006720781326294, -0.20699459314346313, -0.06373947113752365, 0.17087292671203613, -0.23139157891273499, -0.14288456737995148, -0.06841816008090973, -0.005727372132241726, 0.0865047425031662, 0.09386338293552399, -0.40327775478363037, -0.30044975876808167, 0.06979760527610779, -0.10724934935569763, -0.08476375043392181, 0.03768729418516159, 0.07338972389698029, -0.144119992852211, -0.21604399383068085, -0.03278737887740135, -0.049536801874637604, -0.4220377206802368, -0.4178793132305145, 0.2509203851222992, -0.23217056691646576, 0.03694386035203934, -0.12748606503009796, -0.12137065082788467, -0.0014035329222679138, 0.580202043056488, -0.3909652829170227, 0.1654575616121292, -0.009616168215870857, 0.05026392266154289, 0.0005155988037586212, -0.1375778168439865, 0.44441717863082886, 0.19671225547790527, 0.1541723757982254, -0.24199286103248596, -0.41169995069503784, 0.03495802730321884, -0.0705294981598854, 0.28733572363853455, 0.12383393198251724, 0.17018947005271912, -0.020132174715399742, 1.096538782119751, 0.31841057538986206, -0.21035067737102509, 0.06612399220466614, -0.0407358855009079, 0.2642989754676819, -0.01091679185628891, -0.3952404260635376, -0.16543933749198914, -0.15206694602966309, -0.19277913868427277, 0.057801295071840286, 0.06328615546226501, -0.3083129823207855, -0.04003724083304405, 0.21403086185455322, -0.717714250087738, -0.2080446034669876, 0.2859524190425873, -0.6640015244483948, 0.27851253747940063, 0.15919798612594604, 0.17277541756629944, -0.5495753884315491, 0.06869187951087952, 0.08213482797145844, -0.14909571409225464, 0.5069199204444885, 0.0073019652627408504, -0.16759531199932098, 0.1631198674440384, 0.03673245757818222, 0.1653807908296585, 0.2624441981315613, 0.22165244817733765, -0.12357392907142639, -0.09677591919898987, -0.22732894122600555, -0.053623415529727936, 0.44563204050064087, -0.6023890972137451, 0.2966640293598175, 0.3834201693534851, -0.3278222680091858, -0.1631360501050949, -0.22921594977378845, 0.12757453322410583, 0.3774186968803406, 0.17381732165813446, 0.29647529125213623, -0.029539164155721664, 0.16229528188705444, -0.07849034667015076, 0.14586390554904938, -0.28140413761138916, -0.04928110912442207, -0.04558643326163292, 0.13524362444877625, 0.14197246730327606, -0.03652901202440262, -0.22726331651210785, -0.021706631407141685, -0.05170176178216934, -0.05307968705892563, -0.4242404103279114, 0.07396867126226425, 0.2555032968521118, 0.32462266087532043, 0.5262852311134338, 0.06246882304549217, 0.43907463550567627, 0.2741703987121582, 0.035101354122161865, -0.08514462411403656, 0.5787374377250671, -0.20233237743377686, -0.1998821198940277, 0.009701710194349289, 0.2453022301197052, -0.11760606616735458, 0.09504710137844086, -0.3850998282432556, -0.19491082429885864, 0.16853243112564087, -0.11467418074607849, -0.10574636608362198, -0.1660594940185547, 0.05552498996257782, 0.28188493847846985, -0.5762337446212769, -0.6871483325958252, 0.4059183895587921, 0.47332215309143066, -0.4103279709815979, 0.7267807126045227, -0.5869195461273193, -0.26297080516815186, 0.2095642387866974, -0.18466320633888245, 0.7170382142066956, -0.21868057548999786, -0.09955769777297974, -0.09233033657073975, 0.3079003095626831, -0.039302047342061996, -0.172489732503891, -0.040016643702983856, -0.27098017930984497, -0.18532343208789825, -0.12546926736831665, -0.2476447969675064, 0.08484798669815063, 0.2775763273239136, 0.0025096051394939423, 0.3366938829421997, -0.2414916455745697, 0.480731725692749, 0.018430283293128014, -0.09305068850517273, 0.17149707674980164, -0.06028110161423683, -0.3047183156013489, 0.11556905508041382, 0.07779160141944885, 0.17580950260162354, -0.05944201350212097, -0.058444708585739136, -0.11472528427839279, -0.06742300093173981, -0.3334652781486511, 0.2548060715198517, -0.6193095445632935, 0.4070168733596802, -0.11859607696533203, -0.1381228268146515, -0.11806714534759521, 0.11568339169025421, 0.1650659590959549, 0.08378031849861145, -0.04017399996519089, 0.2410155087709427, 0.32646042108535767, 0.17914947867393494, 0.04176628217101097, -0.18669897317886353, 0.13898852467536926, 0.0957631841301918, -0.10712876170873642, 0.15879002213478088, -0.15443015098571777, -0.37526142597198486, -0.17600330710411072, 0.18447086215019226, 0.009123001247644424, -0.014728974550962448, -0.22403286397457123, 0.27889078855514526, 0.26172253489494324, 0.11547257006168365, 0.05109233409166336, 0.2583162784576416, 0.10496644675731659, 0.33746540546417236, -0.12671317160129547, -0.29268279671669006, 0.03194586932659149, 0.5468698143959045, 0.1948588788509369, -0.1740586757659912, 0.2723887264728546, -0.17556339502334595, -0.04219489544630051, -0.03350219130516052, -0.3243030309677124, 0.10448957979679108, -0.29069390892982483, 0.08634612709283829, -0.35254088044166565, 0.13696815073490143, 0.2956293523311615, -0.15168118476867676, 0.177285298705101, 0.24084240198135376, -0.10966739058494568, -0.3795478343963623, -0.06409376114606857, -0.031177036464214325, -0.05997658148407936, 0.07217399030923843, 0.118381567299366, -0.2975923418998718, -0.12805117666721344, 0.33150801062583923, -0.20371711254119873, 0.14262118935585022, 0.1388361155986786, 0.06126973032951355, -0.0742921456694603, 0.21384215354919434, 0.2881689965724945, -0.27103927731513977, -0.020650045946240425, 0.06421807408332825, -0.32460418343544006, -0.09577160328626633, -0.10543042421340942, 0.119521863758564, -0.2374325692653656, 0.12653683125972748, -0.09611672163009644, -0.045262135565280914, 0.2535041272640228, -0.2583848536014557, 0.17694281041622162, 0.44294241070747375, 0.2472514510154724, -0.12137285619974136, 0.03626637160778046, -0.2371959090232849, -0.19844557344913483, 0.2644014358520508, -0.19558867812156677, -0.00017511099576950073, 0.004138218704611063, 0.3197753131389618, 0.002001553773880005, -0.06612497568130493, -0.17957477271556854, -0.1680135428905487, -0.004072494804859161, 0.18742835521697998, 0.3716539740562439, -0.15245957672595978, 0.1358591616153717, 0.1358649879693985, 0.22964376211166382, 0.2164583057165146, -0.13118267059326172, 0.025959709659218788, 0.006481691263616085, 0.10729601234197617, -0.08309255540370941, 0.003598856972530484, 0.3172125518321991, 0.16025468707084656, -0.13532418012619019, 0.27863889932632446, 0.10401593148708344, -0.08376730233430862, 0.23445072770118713, 0.03863385692238808, 0.39398783445358276, -0.3727242350578308, 0.39576202630996704, 0.21920374035835266, 0.25170019268989563, 0.1452670693397522, 0.17965421080589294, 0.11626498401165009, 0.0013622865080833435, 0.256771981716156, 0.17827871441841125, 0.3827575445175171, 0.20700973272323608, 0.07899574935436249, -0.15745681524276733, -0.5870572924613953, -0.03520243987441063, 0.381971150636673, -0.3661767542362213, 0.5012779235839844, 0.02817276120185852, 0.058995749801397324, 0.16341863572597504, -0.31625035405158997, -0.30570733547210693, 0.38645270466804504, -0.014520648866891861, -0.23685070872306824, 0.18712939321994781, -0.20243915915489197, 0.07624047994613647, 0.038993943482637405, -0.007975786924362183, 0.04278542473912239, 0.5030099153518677, 0.16964977979660034, -0.22124041616916656, -0.013546457514166832, -0.18846863508224487, 0.11449696868658066, 0.42676234245300293, -0.11685581505298615, 0.14672894775867462, -0.06394191086292267, -0.13490237295627594, 0.04717492312192917, 0.3376615643501282, 0.460938036441803, 0.26162680983543396, 0.1134783923625946, 0.07904534041881561, 0.48463860154151917, 0.10159903764724731, -0.26998773217201233, 0.3003542423248291, -0.09871239960193634, -0.2325970083475113, 0.15142151713371277, 0.15021054446697235, -0.09258954226970673, 0.2429989129304886, -0.20071978867053986, 0.34916406869888306, -0.2665267586708069, 0.06343250721693039, -0.13399912416934967, 0.26278966665267944, -0.00196697935461998, 0.1811155378818512, -0.049006395041942596, -0.19750003516674042, 0.7122184634208679, 0.14420726895332336, 0.23820224404335022, 0.009711365215480328, 0.05152676999568939, 0.23910529911518097, 0.16208532452583313, 0.36635690927505493, 0.058446042239665985, -0.17986389994621277, -0.05939954146742821, -0.6679874658584595, 0.017487145960330963, -0.376148521900177, 0.21788358688354492, -0.08901148289442062, 0.2133030742406845, 0.2604062557220459, -0.08634699881076813, 0.24042855203151703, 0.0012779375538229942, 0.133468359708786, 0.24449343979358673, -0.43326112627983093, -0.2156454473733902, -0.18346385657787323, 0.05012694001197815, 0.04660846292972565, -0.43058881163597107, 0.02288736402988434, -0.05635685473680496, 0.07014615088701248, 0.04670865461230278, -0.23738986253738403, 0.1958329677581787, -0.11208873987197876, 0.6440412998199463, 0.14057610929012299, 0.3196023404598236, -0.06745530664920807, 0.08074162155389786, -0.3065131902694702, -0.10407281666994095, 0.19975990056991577, 0.23398199677467346, -0.0820053219795227, 0.2814271152019501, -0.3691292107105255, 0.02207351103425026, -0.26542043685913086, -0.06185409799218178, 0.15815256536006927, 0.0049341339617967606, -0.041892945766448975, -0.17688068747520447, 0.02340363711118698, 0.12277505546808243, 0.106358103454113, 0.5370635986328125, -0.19480320811271667, 0.38114938139915466, 0.012668564915657043, -0.08435424417257309, 0.23676685988903046, -0.5975604057312012, -0.059240784496068954, -0.12382807582616806, 0.2851487398147583, -0.12927260994911194, -0.0741119459271431, -0.26193347573280334, -0.03328395262360573, 0.4934826195240021, -0.20052260160446167, 0.0032075829803943634, 0.07302699238061905, -0.09207828342914581, 0.2536225914955139, -0.12442895770072937, 0.07576587051153183, 0.10356093943119049, -0.07844030857086182, 0.07039327919483185, -0.20118077099323273 ]
https://github.com/huggingface/datasets/issues/2413
AttributeError: 'DatasetInfo' object has no attribute 'task_templates'
Hi ! Can you try using a more up-to-date version ? We added the task_templates in `datasets` 1.7.0. Ideally when you're working on new datasets, you should install and use the local version of your fork of `datasets`. Here I think you tried to run the 1.7.0 tests with the 1.6.2 code
## Describe the bug Hello, I'm trying to add dataset and contribute, but test keep fail with below cli. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<my_dataset>` ## Steps to reproduce the bug It seems like a bug when I see an error with the existing dataset, not the dataset I'm trying to add. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<any_dataset>` ## Expected results All test passed ## Actual results ``` # check that dataset is not empty self.parent.assertListEqual(sorted(dataset_builder.info.splits.keys()), sorted(dataset)) for split in dataset_builder.info.splits.keys(): # check that loaded datset is not empty self.parent.assertTrue(len(dataset[split]) > 0) # check that we can cast features for each task template > task_templates = dataset_builder.info.task_templates E AttributeError: 'DatasetInfo' object has no attribute 'task_templates' tests/test_dataset_common.py:175: AttributeError ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Darwin-20.4.0-x86_64-i386-64bit - Python version: 3.7.7 - PyTorch version (GPU?): 1.7.0 (False) - Tensorflow version (GPU?): 2.3.0 (False) - Using GPU in script?: No - Using distributed or parallel set-up in script?: No
52
AttributeError: 'DatasetInfo' object has no attribute 'task_templates' ## Describe the bug Hello, I'm trying to add dataset and contribute, but test keep fail with below cli. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<my_dataset>` ## Steps to reproduce the bug It seems like a bug when I see an error with the existing dataset, not the dataset I'm trying to add. ` RUN_SLOW=1 pytest tests/test_dataset_common.py::LocalDatasetTest::test_load_dataset_all_configs_<any_dataset>` ## Expected results All test passed ## Actual results ``` # check that dataset is not empty self.parent.assertListEqual(sorted(dataset_builder.info.splits.keys()), sorted(dataset)) for split in dataset_builder.info.splits.keys(): # check that loaded datset is not empty self.parent.assertTrue(len(dataset[split]) > 0) # check that we can cast features for each task template > task_templates = dataset_builder.info.task_templates E AttributeError: 'DatasetInfo' object has no attribute 'task_templates' tests/test_dataset_common.py:175: AttributeError ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.2 - Platform: Darwin-20.4.0-x86_64-i386-64bit - Python version: 3.7.7 - PyTorch version (GPU?): 1.7.0 (False) - Tensorflow version (GPU?): 2.3.0 (False) - Using GPU in script?: No - Using distributed or parallel set-up in script?: No Hi ! Can you try using a more up-to-date version ? We added the task_templates in `datasets` 1.7.0. Ideally when you're working on new datasets, you should install and use the local version of your fork of `datasets`. Here I think you tried to run the 1.7.0 tests with the 1.6.2 code
[ -0.47355371713638306, -0.2719741463661194, -0.012150700204074383, 0.05978717282414436, 0.26718130707740784, 0.2102227807044983, 0.25459372997283936, 0.38515332341194153, 0.03191370517015457, 0.18610873818397522, 0.0951908603310585, 0.44205620884895325, -0.15097400546073914, 0.0039892252534627914, 0.05634550750255585, -0.0786747932434082, -0.03145217150449753, 0.1539630889892578, 0.31976318359375, 0.017136067152023315, -0.2879471778869629, -0.11336570978164673, -0.004304945468902588, -0.11820080876350403, -0.15429632365703583, -0.17149685323238373, -0.15796156227588654, 0.051167890429496765, 0.1129555031657219, -0.3455851972103119, 0.42983442544937134, -0.108359694480896, -0.009347010403871536, 0.49184852838516235, -0.00012101993343094364, 0.17860020697116852, 0.3251257538795471, -0.0006493628025054932, -0.49683091044425964, -0.06566901504993439, -0.39139941334724426, -0.3287818133831024, 0.06360840052366257, -0.16349558532238007, -0.20257321000099182, -0.33423441648483276, -0.06325291097164154, -0.329806387424469, -0.08676949143409729, 0.41783618927001953, 0.1655728816986084, 0.5218766927719116, -0.150970458984375, -0.4315092861652374, 0.1217653900384903, 0.17860007286071777, -0.28036046028137207, 0.17083993554115295, 0.6216213703155518, -0.10344534367322922, 0.3462252914905548, 0.005315109621733427, -0.0010407492518424988, 0.1662089079618454, 0.13227564096450806, -0.1352190226316452, 0.2234204113483429, -0.3972384035587311, -0.018080268055200577, 0.0762011855840683, 0.5973716974258423, -0.2986176311969757, -0.43074989318847656, -0.14196889102458954, 0.2230951189994812, 0.03220485895872116, -0.0421731173992157, -0.16696104407310486, -0.24005484580993652, -0.03511669859290123, -0.09033963829278946, -0.15313255786895752, -0.161922425031662, 0.07520134001970291, 0.1189875453710556, 0.02219066023826599, 0.18503916263580322, 0.11126463860273361, -0.21306286752223969, 0.14331559836864471, -0.09717843681573868, -0.05813927203416824, -0.25521954894065857, 0.11321823298931122, -0.23130027949810028, -0.2929350733757019, 0.16806656122207642, -0.3805031180381775, 0.24166065454483032, 0.34716087579727173, -0.034808602184057236, -0.16173821687698364, 0.12671992182731628, 0.20005375146865845, 0.030334200710058212, 0.234373539686203, 0.10623706877231598, 0.23299787938594818, 0.06635895371437073, -0.11033768951892853, 0.01226414367556572, -0.10697004944086075, 0.052507445216178894, -0.2436968982219696, 0.22875849902629852, 0.14407728612422943, 0.6398680806159973, -0.07559804618358612, -0.5606927871704102, -0.0253957137465477, -0.02517714910209179, 0.00505679240450263, 0.2622106969356537, 0.43886446952819824, 0.012870111502707005, -0.09753207117319107, -0.19453713297843933, 0.3225841522216797, -0.26285818219184875, -0.08235961943864822, -0.25784334540367126, 0.20400144159793854, 0.004374414682388306, -0.13953839242458344, 0.32209765911102295, -0.17101851105690002, 0.2165568470954895, 0.055246368050575256, 0.18476328253746033, -0.008051995187997818, 0.2094968557357788, -0.31638941168785095, -0.20448088645935059, 0.3319317698478699, 0.018388111144304276, 0.38583895564079285, 0.056431323289871216, -0.293910413980484, -0.1657145619392395, 0.2179042398929596, -0.29733943939208984, -0.5190387964248657, -0.017320746555924416, 0.20606879889965057, -0.060103531926870346, -0.1723545789718628, -0.3511286973953247, -0.05579620227217674, 0.15495768189430237, -0.13100312650203705, -0.1286190152168274, -0.3681011199951172, -0.19069497287273407, -0.1142808198928833, 0.2976219952106476, 0.4823676347732544, -0.3817061185836792, -0.05358540639281273, -0.08985801786184311, -0.14562973380088806, 0.03482695668935776, -0.0019261166453361511, -0.09124701470136642, 0.3778110444545746, -0.2277226448059082, -0.09185075759887695, 0.30799758434295654, -0.4803476631641388, -0.3461223244667053, 0.331658273935318, -0.08462267369031906, -0.03427362069487572, 0.18296021223068237, 0.08664379268884659, 0.281520277261734, -0.23433323204517365, 0.00016058236360549927, 0.1537235975265503, -0.24272364377975464, -0.03473998233675957, -0.27114906907081604, -0.007260691374540329, 0.46360349655151367, 0.2265041023492813, 0.17624495923519135, 0.011409886181354523, 0.21855607628822327, 0.025042619556188583, 0.06449443846940994, -0.12378135323524475, 0.1112314760684967, 0.19500453770160675, 0.7014124393463135, -0.17780780792236328, 0.2300516813993454, -0.25323861837387085, -0.6865370273590088, 0.3442716896533966, 0.2985440492630005, 0.052937060594558716, -0.07832595705986023, 0.04653824120759964, -0.4575313627719879, 0.21225035190582275, -0.4423661530017853, -0.30454331636428833, -0.023945115506649017, 0.17521625757217407, -0.03688155859708786, -0.28622594475746155, -0.18150946497917175, 0.12142640352249146, -0.32438239455223083, 0.0647803395986557, 0.16746573150157928, 0.31537365913391113, -0.0987434908747673, -0.23849382996559143, -0.11680551618337631, 0.045453183352947235, 0.15867072343826294, -0.19165077805519104, -0.22628024220466614, 0.180482417345047, 0.07185226678848267, 0.07655166834592819, 0.2165350317955017, -0.028148233890533447, 0.24040564894676208, -0.24617868661880493, -0.14841368794441223, 0.17856284976005554, 0.2710605263710022, -0.17660579085350037, -0.025980398058891296, 0.06944522261619568, 0.03500102460384369, 0.3100697994232178, -0.045337412506341934, -0.05028789862990379, 0.33703917264938354, -0.03357244282960892, 0.10171761363744736, -0.01983124390244484, 0.2580481767654419, 0.09840083122253418, 0.41893163323402405, -0.26813623309135437, -0.30105310678482056, 0.1251324713230133, 0.040460873395204544, 0.07952627539634705, -0.033653780817985535, 0.09768535196781158, -0.1843663454055786, 0.21013784408569336, 0.13496415317058563, 0.18009410798549652, 0.6353422403335571, 0.17387208342552185, -0.11095115542411804, -0.10638990253210068, -0.16779834032058716, -0.06142272427678108, 0.07787775993347168, -0.042495667934417725, 0.24843645095825195, 0.39335399866104126, 0.28785085678100586, 0.0008511161431670189, -0.17639699578285217, -0.425284743309021, 0.347266286611557, 0.496587872505188, -0.3807480037212372, -0.01144335139542818, 0.042328111827373505, -0.11847641319036484, -0.13183048367500305, -0.14069920778274536, 0.03343595564365387, -0.30649518966674805, 0.10570310056209564, 0.19731052219867706, -0.014866376295685768, 0.22243432700634003, 0.022959552705287933, 0.012861013412475586, 0.07811382412910461, -0.5534873604774475, -0.37243157625198364, -0.15851038694381714, -0.1578890085220337, 0.09622569382190704, 0.20589029788970947, -0.2709435820579529, 0.45089152455329895, -0.021534457802772522, -0.02566562220454216, -0.2439599633216858, -0.2913553714752197, -0.009034797549247742, -0.07240331172943115, 0.6468446254730225, -0.09694601595401764, 0.30117952823638916, 0.2462475448846817, -0.26886236667633057, 0.43664276599884033, -0.0899263396859169, -0.2616489827632904, 0.11559717357158661, -0.05542377755045891, -0.21924476325511932, -0.13619579374790192, -0.6507863402366638, -0.2763219475746155, -0.2776767313480377, -0.1019047200679779, 0.11670735478401184, 0.05169340968132019, 0.431148499250412, 0.277000367641449, 0.1257614940404892, 0.28522196412086487, 0.20579217374324799, 0.13208052515983582, 0.02030589058995247, 0.20529994368553162, -0.041547443717718124, -0.30831220746040344, -0.09454858303070068, -0.19308672845363617, 0.12208007276058197, 0.20345662534236908, -0.1758292317390442, -0.38684767484664917, -0.21760031580924988, 0.523040771484375, -0.1018582135438919, -0.14443659782409668, 0.3942803144454956, 0.08560386300086975, 0.011637357994914055, -0.1326027810573578, -0.11417226493358612, -0.00935053825378418, 0.10628781467676163, 0.12524482607841492, -0.13736671209335327, 0.29161131381988525, -0.13651598989963531, 0.6200544238090515, 0.19935975968837738, -0.13216105103492737, 0.20840692520141602, -0.350450724363327, 0.26251378655433655, -0.1612609326839447, -0.712933361530304, 0.22276955842971802, 0.06421208381652832, -0.33097583055496216, -0.05109226703643799, -0.13292518258094788, -0.09100469201803207, 0.04873576760292053, -0.034181542694568634, 0.0032990239560604095, 0.07408353686332703, -0.048287533223629, -0.17819049954414368, 0.2059231400489807, -0.020680729299783707, 0.08263801783323288, -0.3545072376728058, -0.15849274396896362, 0.15715497732162476, 0.6275928020477295, -0.1528112292289734, -0.08350057154893875, -0.27048543095588684, -0.1670541912317276, -0.31885889172554016, 0.08245065808296204, 0.11775174736976624, 0.4406628906726837, -0.19660989940166473, 0.02352007105946541, 0.131479412317276, -0.024656740948557854, 0.5827751159667969, -0.2723329961299896, 0.009570728987455368, 0.3472293019294739, -0.04137095808982849, -0.25903555750846863, -0.1730455756187439, -0.36931875348091125, 0.42032328248023987, 0.1536155343055725, 0.614022433757782, -0.02261173725128174, 0.008664245717227459, 0.013277887366712093, 0.2609712481498718, -0.1683848649263382, -0.05992187187075615, -0.11851498484611511, -0.4029224216938019, -0.2713457942008972, 0.24483588337898254, 0.03870704025030136, 0.37781962752342224, 0.13941650092601776, -0.07503221929073334, -0.428024023771286, -0.14759978652000427, 0.22681936621665955, 0.18320538103580475, 0.1736445426940918, 0.1870412826538086, 0.5258874297142029, -0.42113593220710754, 0.10388928651809692, 0.5118347406387329, 0.32376375794410706, -0.22787463665008545, -0.12010927498340607, -0.03147432953119278, -0.20608194172382355, 0.6010957956314087, 0.019677378237247467, -0.13026028871536255, 0.031051483005285263, -0.3375556170940399, 0.05403285473585129, -0.3637283742427826, 0.1568114459514618, 0.3803384304046631, 0.08331172913312912, -0.344288170337677, -0.505156934261322, 0.1283791959285736, 0.18149617314338684, 0.001211419701576233, 0.46869292855262756, -0.12122757732868195, -0.17343313992023468, 0.13502588868141174, -0.0839671865105629, 0.7279373407363892, 0.05676323175430298, -0.17430628836154938, 0.47825905680656433, 0.08984380960464478, 0.22999261319637299, -0.1943996250629425, 0.13692152500152588, -0.3040017783641815, -0.6132846474647522, 0.1750735491514206, -0.23510989546775818, 0.27829641103744507, -0.006407700479030609, -0.05996282398700714, 0.13079968094825745, 0.05329005420207977, 0.24046190083026886, 0.08388832211494446, 0.40367451310157776, 0.06495118141174316, -0.09041596949100494, -0.09537069499492645, 0.13007526099681854, -0.13130652904510498, 0.2946188151836395, -0.03428591415286064, 0.06265263259410858, -0.1721249669790268, -0.1849192976951599, -0.29377543926239014, 0.12194011360406876, -0.12664271891117096, 0.14838288724422455, 0.19174760580062866, -0.5770086050033569, 0.38922539353370667, -0.09818342328071594, 0.1473287045955658, 0.11357326805591583, -0.17175555229187012, 0.18870000541210175, -0.029844120144844055, 0.21571309864521027, 0.05909297615289688, -0.16626575589179993, 0.5821645855903625, -0.06799822300672531, -0.16114117205142975, 0.20861831307411194, -0.21798741817474365, -0.13606351613998413, -0.03403382748365402, -0.055677756667137146, 0.1239263117313385, -0.4858952760696411, -0.2893357574939728, 0.09655322134494781, 0.11619442701339722, -0.2459215223789215, 0.08012250065803528, 0.1002979725599289, -0.25551748275756836, 0.2285141944885254, -0.060574304312467575, -0.2476043403148651, -0.016640815883874893, 0.013246938586235046, 0.22248807549476624, 0.13109159469604492, 0.7664228677749634, 0.036079179495573044, 0.06390921026468277, -0.2532012462615967, 0.029471375048160553, 0.3147090673446655, -0.44006219506263733, 0.07148545980453491, 0.057359226047992706, 0.1125405877828598, 0.021795248612761497, 0.23327219486236572, -0.00622916966676712, 0.22170594334602356, -0.022741777822375298, -0.42348194122314453, -0.327249139547348, -0.09127072989940643, -0.014876794070005417, 0.2613730728626251, -0.10002821683883667, 0.1467788964509964, 0.1819489300251007, 0.1697804182767868, -0.2714860439300537, -0.12075977772474289, -0.12029852718114853, 0.24439860880374908, 0.19467969238758087, 0.2275516390800476, 0.3158331513404846, -0.1297932118177414, 0.06980569660663605, -0.263022243976593, -0.059752099215984344, -0.16420727968215942, -0.14477267861366272, 0.14876589179039001, 0.09924541413784027, 0.1020180881023407, -0.13596734404563904, -0.26633089780807495, 0.17797738313674927, -0.10224705934524536, 0.06815758347511292, -0.09234116971492767, -0.1924227923154831, 0.3209662139415741, 0.42433977127075195, 0.03263312578201294, -0.12769386172294617, 0.29276731610298157, -0.032830506563186646, 0.21546268463134766, -0.012304999865591526, 0.1906452625989914, 0.19587519764900208, 0.1034165769815445, -0.4052974283695221, 0.0003743171691894531, -0.11551816761493683, 0.07560334354639053, 0.08167225122451782, -0.319063663482666, 0.24221855401992798, 0.0013437173329293728, 0.15887366235256195, 0.20178218185901642, -0.2113504260778427, 0.20053303241729736, 0.23237398266792297, 0.17278674244880676, -0.38053393363952637, 0.01322245318442583, 0.3443753719329834, -0.09093647450208664, 0.22072333097457886, 0.15888097882270813, 0.00005661323666572571, -0.08342912048101425, 0.14082607626914978, 0.18941205739974976, 0.13268129527568817, -0.2120162695646286, 0.08797040581703186, 0.16162514686584473, 0.062088388949632645, -0.024875354021787643, 0.10539448261260986, 0.044381942600011826, -0.048097915947437286, 0.19441497325897217, -0.12335406988859177, 0.2816073000431061, 0.31732091307640076, -0.14101779460906982, 0.13635054230690002, -0.13460522890090942, 0.3186083734035492, -0.21828573942184448, 0.039169177412986755, -0.21417978405952454, 0.1011762022972107, 0.6601548194885254, -0.13646018505096436, -0.09018802642822266, 0.0490117073059082, 0.014031339436769485, -0.29897716641426086, 0.04710812494158745, -0.13004034757614136, -0.04233093932271004, -0.13688725233078003, -0.18994058668613434, -0.031825896352529526, -0.2115701586008072, 0.11765234172344208, -0.021062083542346954, -0.21881495416164398, -0.13815030455589294, 0.32864004373550415, 0.5079286694526672, -0.06061645597219467, -0.29607176780700684, 0.31816235184669495, -0.016279511153697968, -0.13821953535079956, -0.04451252147555351, 0.40150365233421326, 0.5818592309951782, 0.33977770805358887, 0.03342853859066963, 0.09619893878698349, -0.02385619655251503, -0.24889065325260162, 0.04813902825117111, 0.19564427435398102, -0.19657668471336365, -0.04349050298333168, 0.28110963106155396, 0.1509517878293991, -0.09051191806793213, 0.043768882751464844, 0.06191786751151085, -0.2591663599014282, -0.3974074721336365, 0.7871952056884766, 0.05636657774448395, -0.3766655921936035, -0.14806872606277466, 0.08794310688972473, -0.28590136766433716, -0.08431892096996307, 0.5475353598594666, 0.03421936184167862, 0.026959117501974106, -0.10531910508871078, 0.04755823314189911, -0.13067668676376343, 0.2556796371936798, 0.3318819999694824, -0.1418064534664154, -0.47057798504829407, 0.07994300127029419, -0.5435575246810913, 0.2905920445919037, -0.2085738480091095, -0.21392589807510376, 0.01806563511490822, 0.1728946417570114, -0.11403388530015945, -0.017373140901327133, 0.2625359296798706, 0.12513642013072968, 0.17598795890808105, 0.12868918478488922, -0.3384447693824768, -0.2251586765050888, -0.32299160957336426, 0.1170923262834549, 0.13619564473628998, -0.1330696940422058, 0.0005559921264648438, -0.10721065104007721, 0.033751823008060455, -0.14111614227294922, -0.2769262194633484, 0.49845337867736816, -0.11270643770694733, 0.28052181005477905, -0.05470936745405197, 0.6785974502563477, 0.042135611176490784, 0.04878237843513489, -0.07441553473472595, -0.40862545371055603, -0.19279542565345764, 0.31528913974761963, 0.024218235164880753, 0.17210045456886292, 0.02641652710735798, -0.1725982278585434, -0.3324013650417328, 0.02257682755589485, -0.0961744487285614, -0.35472041368484497, -0.010009191930294037, 0.2915281355381012, -0.22769922018051147, 0.16954077780246735, 0.1270211935043335, -0.0010683350265026093, 0.09566410630941391, 0.16803568601608276, -0.26586487889289856, -0.47732871770858765, 0.3552929162979126, -0.2708621323108673, -0.2547754645347595, -0.20502614974975586, 0.2875128984451294, -0.057904861867427826, 0.1274871826171875, -0.32610243558883667, -0.1663329005241394, 0.5073918700218201, -0.18392330408096313, -0.07951146364212036, 0.30611318349838257, 0.20084820687770844, 0.19906561076641083, -0.000138159841299057, 0.19514510035514832, -0.07868853956460953, -0.04518286883831024, 0.1501545011997223, -0.13029271364212036 ]
https://github.com/huggingface/datasets/issues/2407
.map() function got an unexpected keyword argument 'cache_file_name'
Hi @cindyxinyiwang, Did you try adding `.arrow` after `cache_file_name` argument? Here I think they're expecting something like that only for a cache file: https://github.com/huggingface/datasets/blob/e08362256fb157c0b3038437fc0d7a0bbb50de5c/src/datasets/arrow_dataset.py#L1556-L1558
## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0
24
.map() function got an unexpected keyword argument 'cache_file_name' ## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0 Hi @cindyxinyiwang, Did you try adding `.arrow` after `cache_file_name` argument? Here I think they're expecting something like that only for a cache file: https://github.com/huggingface/datasets/blob/e08362256fb157c0b3038437fc0d7a0bbb50de5c/src/datasets/arrow_dataset.py#L1556-L1558
[ 0.1322992593050003, 0.06898874044418335, 0.03823644295334816, 0.000056974589824676514, 0.05202998220920563, 0.29637137055397034, 0.17080287635326385, 0.33897921442985535, -0.06356201320886612, -0.020300835371017456, 0.1289212852716446, 0.6100249886512756, -0.24109219014644623, -0.5483765006065369, 0.048803042620420456, 0.09025974571704865, 0.39293643832206726, -0.08653496205806732, 0.21034063398838043, 0.016069553792476654, -0.3766416907310486, 0.38970962166786194, -0.05644369125366211, 0.2779178321361542, -0.45116087794303894, -0.2072952538728714, -0.08944401890039444, -0.06648799031972885, -0.08960629254579544, -0.391181617975235, 0.25532248616218567, 0.09012587368488312, -0.07566167414188385, 0.48987117409706116, -0.0001236526877619326, -0.06260070204734802, 0.062139689922332764, -0.16462750732898712, -0.20501725375652313, -0.33761757612228394, -0.10807442665100098, 0.05430195480585098, -0.0680708959698677, -0.4970971643924713, 0.21295171976089478, -0.08339498937129974, 0.18863116204738617, -0.6428588032722473, 0.14559723436832428, 0.17250263690948486, 0.1301085501909256, -0.10110481083393097, -0.24132739007472992, -0.1786014586687088, 0.10321038961410522, -0.11683960258960724, -0.011462684720754623, 0.20414133369922638, 0.03535822033882141, -0.26020458340644836, 0.10320771485567093, 0.3366817533969879, -0.3803628385066986, -0.09668342769145966, 0.4977584183216095, 0.017751939594745636, -0.21169647574424744, -0.33914995193481445, 0.2500307857990265, -0.15667182207107544, 0.12364818900823593, -0.4110819697380066, -0.3522389531135559, -0.13294249773025513, -0.32125458121299744, -0.10883581638336182, 0.16138485074043274, -0.09946595132350922, -0.14315836131572723, -0.017212659120559692, 0.01871332712471485, -0.2126893699169159, 0.007732979953289032, 0.13749825954437256, 0.22523179650306702, 0.10870552808046341, -0.19588616490364075, 0.36183497309684753, 0.34916460514068604, -0.08339309692382812, -0.21663907170295715, -0.35249730944633484, -0.04012968763709068, 0.38945725560188293, -0.19266189634799957, -0.010810881853103638, 0.04618583619594574, 0.117001473903656, 0.0980420932173729, -0.30935192108154297, -0.09268601983785629, -0.1450904905796051, 0.08139920979738235, 0.30734798312187195, 0.23568734526634216, 0.2836826741695404, 0.3462313711643219, 0.48690736293792725, -0.15318380296230316, -0.30880802869796753, -0.2916908860206604, -0.20595216751098633, 0.07630151510238647, -0.1290072798728943, 0.5090189576148987, -0.06781022250652313, 0.2955312728881836, -0.10165715217590332, 0.098353810608387, 0.09172679483890533, -0.3417956233024597, -0.003655677428469062, -0.09902439266443253, 0.34146833419799805, 0.14482662081718445, -0.09432800859212875, -0.008740507066249847, 0.20826613903045654, 0.048468828201293945, -0.14157769083976746, -0.13756617903709412, 0.05208329111337662, -0.25372540950775146, 0.21014682948589325, -0.1983952820301056, -0.04640935733914375, 0.13957233726978302, 0.013763043098151684, 0.17055758833885193, -0.11628437042236328, 0.16029620170593262, -0.04729360342025757, 0.23732814192771912, -0.15630261600017548, -0.11536762118339539, 0.49762919545173645, 0.28216734528541565, -0.22788789868354797, -0.11834324151277542, 0.025422576814889908, -0.5410774946212769, -0.31628313660621643, 0.0000615101307630539, 0.02212674543261528, -0.03465261310338974, 0.12628155946731567, -0.4266485273838043, 0.012055281549692154, 0.5163835287094116, -0.2676180899143219, 0.03081154078245163, -0.030468322336673737, -0.2301567643880844, -0.48133566975593567, 0.020797880366444588, 0.32713639736175537, -0.07348667830228806, -0.030248846858739853, -0.027182411402463913, 0.1944451779127121, -0.003358207643032074, 0.16815140843391418, -0.09358623623847961, 0.18998895585536957, -0.2116827517747879, 0.7205880284309387, 0.5101913213729858, -0.2484842836856842, -0.5775414109230042, 0.27339187264442444, -0.2147664725780487, 0.0139011200517416, -0.08617284148931503, 0.02861950919032097, 0.45201268792152405, -0.1365363746881485, 0.4372091293334961, -0.07317002862691879, -0.04095391929149628, 0.1518026888370514, -0.2699034810066223, -0.23993806540966034, 0.12617307901382446, -0.25839895009994507, -0.05067310109734535, 0.17632606625556946, 0.08051910251379013, 0.06210961192846298, 0.12626010179519653, 0.09793020784854889, 0.2342856377363205, 0.08389782905578613, 0.28903093934059143, 0.07284203171730042, 0.02576085738837719, -0.00843568705022335, -0.29220813512802124, 0.08391127735376358, 0.1964595913887024, -0.42001280188560486, -0.32983702421188354, -0.4760623574256897, -0.05610767751932144, 0.042485155165195465, -0.18846556544303894, -0.07340049743652344, 0.006482750177383423, 0.07842152565717697, 0.06399741768836975, 0.12062440812587738, -0.07598229497671127, -0.002385355532169342, 0.04359261691570282, -0.05427718907594681, 0.061199381947517395, -0.2633385956287384, -0.07965969294309616, -0.1117175966501236, -0.23687368631362915, -0.192124605178833, 0.40087074041366577, -0.0590946227312088, -0.3225567638874054, 0.4013505280017853, -0.007704774383455515, 0.11715060472488403, -0.06122537702322006, 0.2972915768623352, -0.29905977845191956, -0.042083196341991425, 0.04869510978460312, 0.006959490478038788, 0.08799298107624054, -0.02579440549015999, 0.11874226480722427, 0.1925864964723587, 0.26063352823257446, 0.1826837658882141, -0.23367074131965637, 0.29604536294937134, -0.023592473939061165, 0.04379972442984581, 0.0012438306584954262, -0.2449381947517395, -0.040242280811071396, -0.14080855250358582, 0.3976157009601593, -0.11827811598777771, 0.051816970109939575, 0.0109170600771904, 0.487901508808136, 0.1254066824913025, 0.1525571346282959, -0.0630093663930893, -0.1764899492263794, 0.025393500924110413, 0.08999986201524734, 0.36291009187698364, 0.574231743812561, -0.006951121147722006, 0.04512520134449005, -0.00718068890273571, 0.14515824615955353, 0.08546775579452515, 0.09000908583402634, 0.045647308230400085, -0.10757315158843994, -0.23441779613494873, -0.08521027117967606, 0.24098314344882965, 0.05706661194562912, 0.03898531571030617, 0.13914228975772858, 0.10184673219919205, -0.19432586431503296, 0.29801005125045776, -0.09213854372501373, -0.007241480052471161, -0.06847111880779266, -0.06503226608037949, -0.23147225379943848, -0.49210286140441895, -0.10233063995838165, 0.1390247941017151, 0.0433204360306263, 0.26134681701660156, -0.204520583152771, 0.1948716938495636, 0.0464906170964241, -0.48444026708602905, -0.015364795923233032, -0.23889416456222534, -0.04314474016427994, -0.20435887575149536, 0.027389880269765854, -0.3609803318977356, 0.4219367504119873, -0.03879259526729584, -0.008577228523790836, -0.37263011932373047, -0.1466672718524933, 0.13304740190505981, -0.12244254350662231, 0.15310773253440857, 0.14152754843235016, 0.10626920312643051, -0.3267294764518738, -0.19409604370594025, 0.1713123321533203, -0.2614378333091736, 0.033119507133960724, -0.07873953133821487, 0.11218281835317612, -0.24848629534244537, -0.15608185529708862, -0.09558186680078506, -0.061449699103832245, -0.12652267515659332, 0.32408201694488525, -0.3173367381095886, 0.08801405876874924, 0.14321647584438324, -0.027241002768278122, 0.22211609780788422, -0.3109343945980072, -0.10956895351409912, -0.35839059948921204, -0.478510320186615, 0.43541285395622253, -0.28448599576950073, -0.21512438356876373, 0.0019909553229808807, 0.057266294956207275, 0.164038747549057, 0.24379469454288483, -0.2821911871433258, -0.23564353585243225, 0.11574412882328033, 0.25708651542663574, 0.01831866055727005, -0.009019369259476662, 0.2191236913204193, -0.01119244284927845, 0.087284155189991, -0.3030952215194702, -0.4302421510219574, 0.13510289788246155, 0.10227932035923004, 0.3065892159938812, 0.40033861994743347, 0.2809002697467804, 0.3629712760448456, 0.7278519868850708, 0.33568984270095825, -0.02669096365571022, 0.4212539494037628, -0.1764855682849884, 0.3586522340774536, -0.030842937529087067, -0.4959000051021576, -0.07594519853591919, -0.0961446762084961, -0.26453980803489685, -0.04912666976451874, -0.08765560388565063, -0.13606320321559906, 0.11832322180271149, -0.11515402793884277, -0.23053178191184998, -0.4181850552558899, 0.05338318645954132, -0.39171475172042847, 0.13264402747154236, 0.06158129498362541, 0.14904990792274475, -0.5956488251686096, -0.08495082706212997, 0.11584678292274475, 0.2924688458442688, 0.15793822705745697, 0.15321838855743408, -0.33816900849342346, -0.013526967726647854, -0.43530261516571045, 0.5255327820777893, 0.03767015412449837, 0.30087897181510925, -0.1652257889509201, 0.12785235047340393, -0.03307829797267914, 0.2386568784713745, 0.7517746686935425, -0.2644410729408264, 0.03143996745347977, 0.07120540738105774, 0.23087173700332642, -0.2254033237695694, 0.04618341848254204, 0.21630442142486572, 0.8413044214248657, 0.1609925478696823, 0.47456780076026917, -0.14877909421920776, -0.11961746215820312, -0.2819729149341583, 0.09354148060083389, -0.1004231870174408, -0.005204671993851662, -0.04152384772896767, -0.056500278413295746, -0.40090039372444153, -0.009070299565792084, 0.23558343946933746, -0.015031278133392334, 0.36742159724235535, 0.14244909584522247, 0.13310809433460236, 0.055859051644802094, 0.1616944968700409, 0.19140303134918213, 0.3781103193759918, -0.07542148977518082, -0.20050829648971558, 0.2696881890296936, -0.014087393879890442, 0.10372115671634674, 0.2063843160867691, -0.25061118602752686, -0.12454995512962341, -0.13124939799308777, -0.09986712038516998, 0.38932397961616516, 0.15802128612995148, -0.2658323347568512, 0.08027206361293793, -0.08589523285627365, -0.01753300428390503, 0.014058655127882957, 0.211313858628273, 0.4594944715499878, -0.05930524319410324, -0.5275678038597107, -0.4904378652572632, 0.2581530809402466, 0.2997870147228241, -0.2697073817253113, 0.8450323939323425, 0.06755613535642624, -0.3200569450855255, 0.42225563526153564, -0.10427848249673843, 0.8706279397010803, 0.017451230436563492, 0.2338985800743103, -0.12014821916818619, 0.11418318748474121, 0.3580423593521118, -0.02659578062593937, -0.05447179079055786, -0.17597004771232605, 0.07301829755306244, 0.045564815402030945, 0.027188751846551895, 0.08684248477220535, 0.4136991500854492, -0.3510039448738098, 0.21767547726631165, -0.052441686391830444, 0.4112330675125122, -0.04470384865999222, 0.012216754257678986, -0.046439386904239655, -0.18672049045562744, -0.08712628483772278, 0.10723671317100525, -0.025974318385124207, 0.1294773668050766, -0.018379971385002136, -0.16372442245483398, -0.006874829530715942, -0.49776291847229004, -0.1725834459066391, -0.0030546989291906357, -0.5952803492546082, 0.30111610889434814, -0.11354801058769226, 0.06059682369232178, 0.0023503191769123077, 0.3404521644115448, 0.07943204790353775, 0.22276458144187927, -0.08414814621210098, -0.01882079616189003, 0.11507195979356766, 0.0066186366602778435, -0.12016420811414719, -0.29546767473220825, 0.14258040487766266, 0.1661803126335144, 0.011297740042209625, 0.13898658752441406, -0.07045063376426697, -0.5288643836975098, -0.19384139776229858, 0.06230602040886879, 0.2274821400642395, -0.30009832978248596, -0.48119133710861206, -0.20018386840820312, -0.14630277454853058, -0.05382981151342392, 0.019069144502282143, 0.044960007071495056, -0.07980123162269592, 0.31884506344795227, -0.1389809101819992, -0.24374417960643768, 0.2529883086681366, 0.3342951834201813, -0.3944346606731415, -0.22947032749652863, 0.4249683916568756, -0.3405415117740631, -0.07562129944562912, -0.07758749276399612, 0.0927995964884758, -0.06276287138462067, -0.00843726471066475, 0.1716310828924179, -0.2090989500284195, 0.1777828186750412, -0.08073779940605164, 0.11714872717857361, 0.21705719828605652, 0.22742632031440735, 0.00676378607749939, -0.3460569381713867, -0.23969081044197083, 0.0677240863442421, -0.19671404361724854, 0.14274485409259796, 0.1849370002746582, -0.02980644628405571, 0.07217396050691605, 0.16508908569812775, -0.19447803497314453, 0.1778859794139862, 0.017508288845419884, 0.06197730079293251, 0.3951486647129059, 0.3479493260383606, 0.2850726246833801, -0.1957455426454544, -0.040535151958465576, 0.21434257924556732, -0.17043353617191315, -0.06896281242370605, -0.3461573123931885, 0.20592740178108215, 0.21867361664772034, 0.02539619244635105, 0.10100914537906647, -0.3307483196258545, 0.1104188859462738, -0.35753628611564636, 0.05084339156746864, 0.3860601782798767, -0.06877703964710236, 0.32033029198646545, 0.3072122037410736, 0.12996438145637512, 0.006086919456720352, 0.034959547221660614, -0.04584906995296478, 0.17528384923934937, 0.029745645821094513, 0.20475715398788452, 0.018548985943198204, -0.013254217803478241, -0.12007559090852737, 0.13091513514518738, -0.08501514792442322, 0.09919731318950653, 0.16454258561134338, -0.1579207330942154, 0.10425403714179993, 0.4336743950843811, 0.03092445433139801, 0.1451108753681183, -0.4857899248600006, -0.030735695734620094, 0.2163938283920288, 0.06973285228013992, 0.11546429991722107, -0.2508099675178528, 0.7881993651390076, 0.11060047894716263, -0.07300199568271637, 0.2349618524312973, 0.021775465458631516, -0.017869465053081512, -0.10219679772853851, -0.17013317346572876, 0.44060948491096497, -0.45144665241241455, 0.3755291998386383, 0.27480849623680115, 0.21617086231708527, 0.3323148488998413, 0.2810062766075134, 0.33598896861076355, 0.19870525598526, 0.5423116087913513, -0.2920406460762024, 0.2530555725097656, 0.2998805344104767, -0.14172890782356262, 0.1987137496471405, -0.22958175837993622, 0.16809239983558655, 0.17973260581493378, -0.22098183631896973, 0.4865630269050598, -0.048222750425338745, 0.40052491426467896, -0.38155919313430786, -0.08103365451097488, 0.13543939590454102, 0.16930723190307617, -0.25994110107421875, -0.030371813103556633, 0.078450508415699, -0.002745911478996277, -0.05215125158429146, -0.1279711276292801, -0.11717043817043304, -0.14993970096111298, 0.6191291809082031, 0.0023006796836853027, 0.08403491973876953, 0.14023366570472717, -0.10333891957998276, 0.1035475805401802, 0.43822523951530457, -0.42161086201667786, -0.06686245650053024, -0.3315860629081726, 0.025369003415107727, 0.09932027757167816, 0.17964547872543335, 0.5354412794113159, 0.5416945815086365, -0.08271515369415283, 0.11621557176113129, 0.09408670663833618, -0.09465762972831726, 0.04728544503450394, 0.048032067716121674, -0.1029655784368515, -0.26420021057128906, 0.20533090829849243, 0.03720839321613312, 0.01438648160547018, 0.14313209056854248, 0.21957546472549438, 0.4603921175003052, -0.032006412744522095, 0.1295129805803299, -0.1524963527917862, -0.25741344690322876, -0.24867045879364014, 0.27307939529418945, -0.33201783895492554, -0.09967334568500519, 0.36871224641799927, 0.16826339066028595, 0.2206093668937683, -0.1890612095594406, 0.04019119217991829, 0.24393250048160553, 0.09871447086334229, 0.2074970006942749, -0.06574904918670654, -0.5534560084342957, -0.15500923991203308, -0.6261844635009766, 0.16479797661304474, -0.06274206936359406, 0.13777010142803192, 0.024012913927435875, -0.029565248638391495, -0.0035259872674942017, 0.12770800292491913, 0.18399879336357117, -0.19068840146064758, -0.21762950718402863, 0.3382577896118164, -0.1625494807958603, -0.15864233672618866, 0.057739242911338806, 0.1596437692642212, 0.4403265416622162, -0.23998823761940002, -0.017272505909204483, 0.0005735000595450401, -0.021347928792238235, -0.3502500057220459, -0.1870134174823761, 0.08245372772216797, -0.0299031063914299, 0.6764064431190491, 0.02507680095732212, 0.24001775681972504, -0.007061980664730072, -0.23464058339595795, -0.055680450052022934, 0.181379035115242, -0.2350437343120575, -0.13565292954444885, -0.17921577394008636, 0.2597791254520416, -0.4148191511631012, -0.28549376130104065, -0.5130305290222168, -0.12743282318115234, -0.059039462357759476, -0.2208191454410553, -0.15859822928905487, 0.2819313406944275, -0.036310311406850815, 0.20870177447795868, 0.0730711966753006, 0.4152945578098297, -0.23379147052764893, 0.629226565361023, -0.1960887908935547, -0.07455547153949738, 0.5311340093612671, -0.6217184066772461, -0.4185054302215576, 0.16022124886512756, 0.2648942172527313, -0.09576859325170517, -0.43358615040779114, -0.46372848749160767, -0.18151001632213593, 0.4318001866340637, 0.08124469220638275, -0.3228624761104584, -0.02388393133878708, -0.14685088396072388, 0.13042597472667694, 0.038393374532461166, 0.5380344390869141, 0.002140577882528305, -0.1710178703069687, 0.31739166378974915, -0.37949246168136597 ]
https://github.com/huggingface/datasets/issues/2407
.map() function got an unexpected keyword argument 'cache_file_name'
Hi ! `cache_file_name` is an argument of the `Dataset.map` method. Can you check that your `dataset` is indeed a `Dataset` object ? If you loaded several splits, then it would actually be a `DatasetDict` (one dataset per split, in a dictionary). In this case, since there are several datasets in the dict, the `DatasetDict.map` method requires a `cache_file_names` argument (with an 's'), so that you can provide one file name per split.
## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0
72
.map() function got an unexpected keyword argument 'cache_file_name' ## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0 Hi ! `cache_file_name` is an argument of the `Dataset.map` method. Can you check that your `dataset` is indeed a `Dataset` object ? If you loaded several splits, then it would actually be a `DatasetDict` (one dataset per split, in a dictionary). In this case, since there are several datasets in the dict, the `DatasetDict.map` method requires a `cache_file_names` argument (with an 's'), so that you can provide one file name per split.
[ 0.08439640700817108, 0.0935959666967392, 0.04566146805882454, 0.01830308884382248, 0.04155674949288368, 0.2793115973472595, 0.22148728370666504, 0.3731047213077545, -0.02776584029197693, -0.00002381950616836548, 0.13107778131961823, 0.6276788115501404, -0.2474793940782547, -0.4753698408603668, 0.07406558096408844, 0.12463169544935226, 0.392575740814209, -0.0903923511505127, 0.24322928488254547, -0.006880361586809158, -0.38103362917900085, 0.373701810836792, -0.054173894226551056, 0.25555700063705444, -0.4504035711288452, -0.1992647796869278, -0.11359909921884537, -0.05848393589258194, -0.051888979971408844, -0.346601665019989, 0.1828310340642929, 0.11610779166221619, -0.08575347065925598, 0.4750775396823883, -0.0001235759409610182, -0.09175972640514374, 0.03601120412349701, -0.16313929855823517, -0.2555076777935028, -0.2864118218421936, -0.14425480365753174, 0.03749270737171173, -0.10721980035305023, -0.5347393155097961, 0.24055668711662292, -0.08323220163583755, 0.1901533305644989, -0.6212077736854553, 0.15418289601802826, 0.1646748185157776, 0.1337842047214508, -0.09382298588752747, -0.24038498103618622, -0.16841191053390503, 0.08720207959413528, -0.09684911370277405, -0.008124049752950668, 0.1451236605644226, -0.02406363934278488, -0.2789241373538971, 0.11037691682577133, 0.3297780156135559, -0.3978562355041504, -0.10068568587303162, 0.4735761284828186, 0.03468351066112518, -0.2390230894088745, -0.3423893451690674, 0.25420892238616943, -0.16413596272468567, 0.12790216505527496, -0.4114084541797638, -0.34956762194633484, -0.14972978830337524, -0.334396094083786, -0.1376325637102127, 0.1707211136817932, -0.06763341277837753, -0.11312440037727356, -0.0006659515202045441, 0.01424019318073988, -0.23251479864120483, 0.057813167572021484, 0.131453737616539, 0.18718528747558594, 0.10651330649852753, -0.16101714968681335, 0.3629956543445587, 0.3264003396034241, -0.06949131190776825, -0.2115771323442459, -0.39122316241264343, -0.04884197190403938, 0.35522621870040894, -0.16831514239311218, -0.03167510777711868, 0.08342254906892776, 0.07869933545589447, 0.07302474230527878, -0.3154940605163574, -0.12966637313365936, -0.15372103452682495, 0.11062419414520264, 0.32092010974884033, 0.28930002450942993, 0.23969335854053497, 0.3267399072647095, 0.5005455017089844, -0.1488438993692398, -0.2889007329940796, -0.2772116959095001, -0.17842820286750793, 0.06008811295032501, -0.0740305483341217, 0.5499646067619324, -0.046290695667266846, 0.28365176916122437, -0.0727449357509613, 0.05186443775892258, 0.08158234506845474, -0.360110342502594, -0.0161585733294487, -0.07813213020563126, 0.3521362245082855, 0.1568029373884201, -0.07408826053142548, -0.012762630358338356, 0.17118701338768005, 0.0065889377146959305, -0.18793584406375885, -0.16257359087467194, 0.05916782468557358, -0.23780640959739685, 0.24467964470386505, -0.17189578711986542, -0.027115479111671448, 0.07703272998332977, 0.015663038939237595, 0.14331144094467163, -0.17588749527931213, 0.16570205986499786, -0.09217493236064911, 0.2263481318950653, -0.13344191014766693, -0.08519454300403595, 0.5168966054916382, 0.2525646388530731, -0.2299637794494629, -0.15413600206375122, 0.04802636057138443, -0.5041531920433044, -0.34011000394821167, 0.011679073795676231, 0.033463750034570694, -0.030984073877334595, 0.14962992072105408, -0.38826319575309753, 0.030137421563267708, 0.5299625992774963, -0.2702379524707794, -0.02357906848192215, -0.0733262449502945, -0.2511705458164215, -0.4917125701904297, 0.03831077367067337, 0.34974944591522217, -0.1092497706413269, -0.03633571043610573, -0.0776752233505249, 0.15530337393283844, 0.027933262288570404, 0.15169601142406464, -0.10273586213588715, 0.27077263593673706, -0.20818886160850525, 0.7426682114601135, 0.4991738200187683, -0.19637365639209747, -0.6254304051399231, 0.261572927236557, -0.18257403373718262, -0.014056481420993805, -0.0932936891913414, 0.03504714369773865, 0.5258508920669556, -0.15059484541416168, 0.444566011428833, -0.00910957157611847, -0.04769154638051987, 0.20189979672431946, -0.2865404784679413, -0.2564963400363922, 0.13291122019290924, -0.22725480794906616, -0.0024047009646892548, 0.15722358226776123, 0.09223126620054245, 0.1445806622505188, 0.1027359813451767, 0.09254741668701172, 0.22529712319374084, 0.046777382493019104, 0.28004127740859985, 0.0934416800737381, 0.023327894508838654, -0.01014581136405468, -0.28041908144950867, 0.054640598595142365, 0.2277623414993286, -0.45431143045425415, -0.29498839378356934, -0.5119611620903015, -0.07370831817388535, 0.059626609086990356, -0.1761673092842102, -0.052607592195272446, 0.01416526734828949, 0.11373414099216461, 0.03380567207932472, 0.0811939537525177, -0.0729893147945404, -0.018671216443181038, 0.07816138863563538, -0.08532068878412247, 0.05498794838786125, -0.214161217212677, -0.10005346685647964, -0.12306319177150726, -0.2338082641363144, -0.16426697373390198, 0.41286700963974, -0.03535757213830948, -0.3176955580711365, 0.43002739548683167, 0.038387004286050797, 0.08243633061647415, -0.10839357227087021, 0.2794743776321411, -0.30457907915115356, -0.03247298300266266, 0.05365205556154251, 0.017365586012601852, 0.13329285383224487, -0.013159669935703278, 0.07823944836854935, 0.16278721392154694, 0.29412367939949036, 0.15256041288375854, -0.22311821579933167, 0.3086063861846924, -0.03001951240003109, 0.0038746148347854614, 0.045796796679496765, -0.2656095027923584, -0.04478849098086357, -0.13679465651512146, 0.31530848145484924, -0.09627757966518402, 0.04367414116859436, 0.05859849601984024, 0.5465812087059021, 0.08965124189853668, 0.202180415391922, -0.053996630012989044, -0.14803412556648254, -0.0148797407746315, 0.05003190040588379, 0.37058067321777344, 0.5701338052749634, -0.007413081359118223, 0.03293071687221527, 0.004989737644791603, 0.14010745286941528, 0.10618624091148376, 0.07740119099617004, 0.053928665816783905, -0.13770920038223267, -0.2030056118965149, -0.09618724137544632, 0.21350523829460144, 0.05815902352333069, 0.054728154093027115, 0.19709512591362, 0.11846952885389328, -0.21860304474830627, 0.31404995918273926, -0.11627965420484543, 0.0529644712805748, -0.0950973704457283, -0.03774102404713631, -0.22133907675743103, -0.5031984448432922, -0.08698797971010208, 0.18243326246738434, 0.02258417382836342, 0.2560202479362488, -0.13593178987503052, 0.23383906483650208, -0.0110112763941288, -0.40881091356277466, 0.017166048288345337, -0.2472449690103531, -0.08292390406131744, -0.21463704109191895, 0.04589309170842171, -0.29601067304611206, 0.4335896670818329, -0.05149281024932861, -0.06582212448120117, -0.37635305523872375, -0.09990394115447998, 0.15061995387077332, -0.12823039293289185, 0.16671790182590485, 0.14365383982658386, 0.11262756586074829, -0.26142483949661255, -0.225721538066864, 0.16476450860500336, -0.27018895745277405, 0.034973300993442535, -0.06692419946193695, 0.13975100219249725, -0.23692145943641663, -0.142332062125206, -0.12076929956674576, -0.09062425792217255, -0.116722971200943, 0.2587154805660248, -0.3342747688293457, 0.12456303089857101, 0.09981714934110641, -0.06381034106016159, 0.20114628970623016, -0.24834221601486206, -0.157229483127594, -0.40223872661590576, -0.38837024569511414, 0.3892166018486023, -0.2708660066127777, -0.22935260832309723, 0.0011087208986282349, 0.05923570692539215, 0.10550905019044876, 0.2628524899482727, -0.29505428671836853, -0.20787127315998077, 0.11554845422506332, 0.21732881665229797, 0.00640476867556572, -0.01768447645008564, 0.2701449394226074, -0.004127930384129286, 0.09523600339889526, -0.29701244831085205, -0.4936097264289856, 0.10925547033548355, 0.12011558562517166, 0.32296085357666016, 0.339429646730423, 0.31437626481056213, 0.3534236550331116, 0.7107340693473816, 0.3199201226234436, -0.0045729950070381165, 0.3914828598499298, -0.1586189866065979, 0.3285059332847595, -0.031245112419128418, -0.5154385566711426, -0.04358932003378868, -0.13569653034210205, -0.3268219828605652, -0.01969026029109955, -0.12998339533805847, -0.1846945583820343, 0.12776969373226166, -0.10521779954433441, -0.27550381422042847, -0.43948572874069214, 0.07918988913297653, -0.3375868797302246, 0.17550435662269592, 0.06306254863739014, 0.19056260585784912, -0.6088646054267883, -0.07442235946655273, 0.08664658665657043, 0.27272889018058777, 0.13861539959907532, 0.11839477717876434, -0.3839704990386963, 0.007286109030246735, -0.3965050280094147, 0.5132545828819275, 0.03120608814060688, 0.3311234414577484, -0.1937032788991928, 0.10703162103891373, -0.015355542302131653, 0.19302615523338318, 0.7922768592834473, -0.2679603695869446, 0.04548831656575203, 0.12107986211776733, 0.2072671502828598, -0.17343053221702576, 0.01651005446910858, 0.17672717571258545, 0.8107906579971313, 0.18466469645500183, 0.45979994535446167, -0.1755235493183136, -0.11265898495912552, -0.20835599303245544, 0.09266035258769989, -0.15047407150268555, -0.006576483137905598, -0.04101640358567238, -0.09565223753452301, -0.4337197542190552, -0.01707613468170166, 0.21698680520057678, 0.01946415938436985, 0.34849169850349426, 0.1774248480796814, 0.10022643953561783, 0.0034341961145401, 0.1716178059577942, 0.19581863284111023, 0.3997894525527954, -0.036751847714185715, -0.14226363599300385, 0.26970216631889343, -0.05359606444835663, 0.11510628461837769, 0.17663955688476562, -0.2531777024269104, -0.1062379777431488, -0.10473322123289108, -0.10755738615989685, 0.3750826120376587, 0.18199191987514496, -0.2561531960964203, 0.03445134311914444, -0.11163456737995148, -0.00822865217924118, -0.05925911292433739, 0.22585918009281158, 0.463869571685791, -0.09269566088914871, -0.595725953578949, -0.5398172736167908, 0.23287439346313477, 0.3057688772678375, -0.272908478975296, 0.7845088243484497, 0.027497921139001846, -0.310246080160141, 0.47552210092544556, -0.11168655008077621, 0.9144572019577026, -0.022253528237342834, 0.23028920590877533, -0.13555088639259338, 0.1126963347196579, 0.3551310896873474, -0.06164140999317169, -0.012677239254117012, -0.19803492724895477, 0.032815948128700256, 0.04303693026304245, 0.03278804197907448, 0.09275403618812561, 0.40473562479019165, -0.3663412630558014, 0.2410905659198761, -0.1058434396982193, 0.4469727575778961, -0.04073157161474228, -0.007034126669168472, -0.039002031087875366, -0.20013734698295593, -0.05244697630405426, 0.12045736610889435, -0.057145193219184875, 0.12195953726768494, -0.003504667431116104, -0.13798308372497559, 0.03857181593775749, -0.4939674139022827, -0.21754741668701172, 0.02639549970626831, -0.5055752396583557, 0.32412075996398926, -0.1637340784072876, 0.09338141977787018, -0.014718817546963692, 0.30701884627342224, 0.08650732785463333, 0.23905529081821442, -0.034642986953258514, -0.000835515558719635, 0.0770900547504425, 0.006674051750451326, -0.12860819697380066, -0.28439366817474365, 0.15961840748786926, 0.18532294034957886, -0.007342815399169922, 0.14856278896331787, -0.025737939402461052, -0.5060883164405823, -0.22246117889881134, 0.07304602116346359, 0.28588253259658813, -0.3665446937084198, -0.43859031796455383, -0.17201018333435059, -0.11139415204524994, -0.10332942754030228, 0.023890651762485504, 0.010729782283306122, -0.10972602665424347, 0.35750052332878113, -0.23952405154705048, -0.23724529147148132, 0.24617113173007965, 0.35175907611846924, -0.3285673260688782, -0.18570266664028168, 0.4542020857334137, -0.3402636647224426, -0.06531292200088501, -0.11184794455766678, 0.11139523237943649, -0.09102962911128998, 0.0006982684135437012, 0.2068593055009842, -0.27254006266593933, 0.16384141147136688, -0.10233359038829803, 0.12585847079753876, 0.1827770620584488, 0.22749021649360657, -0.020673399791121483, -0.3733627200126648, -0.18487592041492462, 0.03569032624363899, -0.17711833119392395, 0.15853309631347656, 0.23617392778396606, 0.002523801289498806, 0.024297839030623436, 0.22089579701423645, -0.20258870720863342, 0.1812765747308731, -0.03203703463077545, 0.08583144843578339, 0.37614086270332336, 0.3112930357456207, 0.2769513428211212, -0.2245524525642395, -0.031489863991737366, 0.19768618047237396, -0.16317132115364075, -0.07211679220199585, -0.34992852807044983, 0.20807671546936035, 0.22009068727493286, 0.025081170722842216, 0.06581178307533264, -0.3174198269844055, 0.1206403374671936, -0.3502311706542969, 0.04486147686839104, 0.392879843711853, -0.06695482134819031, 0.2886345386505127, 0.35480496287345886, 0.13577455282211304, 0.015074022114276886, 0.03601288050413132, -0.04921691119670868, 0.18359670042991638, 0.01800435781478882, 0.25344282388687134, 0.03223942592740059, -0.011304914951324463, -0.18233458697795868, 0.1354922354221344, -0.0019151940941810608, 0.11676014214754105, 0.1840481162071228, -0.16130128502845764, 0.1362328827381134, 0.4229465425014496, 0.016165580600500107, 0.17292243242263794, -0.5007994771003723, -0.03654279187321663, 0.23023772239685059, 0.06792601197957993, 0.12308323383331299, -0.276117205619812, 0.8008131980895996, 0.07609033584594727, -0.11692531406879425, 0.24351412057876587, 0.034542184323072433, 0.024529896676540375, -0.1695738583803177, -0.16691970825195312, 0.46129241585731506, -0.41057366132736206, 0.38825225830078125, 0.3578396737575531, 0.20917804539203644, 0.3332798480987549, 0.25393927097320557, 0.3218890428543091, 0.1807008683681488, 0.578399658203125, -0.2584550380706787, 0.29089316725730896, 0.30103355646133423, -0.12142650783061981, 0.19677504897117615, -0.27287498116493225, 0.1934947669506073, 0.1676933318376541, -0.18047159910202026, 0.4687674343585968, -0.09061452746391296, 0.32377880811691284, -0.41490328311920166, -0.08032718300819397, 0.09422282874584198, 0.19066129624843597, -0.2526557743549347, -0.034854255616664886, 0.07952611893415451, 0.019923657178878784, -0.08976591378450394, -0.0753985047340393, -0.11359024047851562, -0.16838660836219788, 0.6030051708221436, 0.008533947169780731, 0.06575082242488861, 0.11920704692602158, -0.14185252785682678, 0.0852060616016388, 0.4310849905014038, -0.46837034821510315, -0.07251791656017303, -0.38374173641204834, 0.06913897395133972, 0.12287206947803497, 0.15990687906742096, 0.5544432997703552, 0.5351933240890503, -0.11234267055988312, 0.09138859808444977, 0.10165755450725555, -0.06206454336643219, 0.025630872696638107, 0.016752097755670547, -0.13843290507793427, -0.1652917116880417, 0.21060992777347565, 0.03663191199302673, 0.016408901661634445, 0.0945240929722786, 0.23684927821159363, 0.42038291692733765, -0.032059215009212494, 0.16905206441879272, -0.11363793909549713, -0.22543272376060486, -0.24430245161056519, 0.2671292722225189, -0.322889119386673, -0.14186598360538483, 0.38168856501579285, 0.18013152480125427, 0.2626311480998993, -0.15055851638317108, 0.046992525458335876, 0.23385410010814667, 0.13374213874340057, 0.1655440330505371, -0.11067987233400345, -0.553216814994812, -0.13508792221546173, -0.6108710765838623, 0.15028142929077148, -0.09912441670894623, 0.11340910196304321, 0.04174070432782173, 0.00306829996407032, -0.0390891507267952, 0.10867485404014587, 0.14022262394428253, -0.13638325035572052, -0.21917158365249634, 0.35421785712242126, -0.1631866842508316, -0.161208376288414, 0.04170151799917221, 0.14460299909114838, 0.4254313111305237, -0.27171334624290466, 0.029863661155104637, 0.020312905311584473, -0.015078313648700714, -0.3144221901893616, -0.22707629203796387, 0.09028354287147522, -0.058068759739398956, 0.6488997340202332, 0.028929686173796654, 0.2742854952812195, 0.006396446377038956, -0.21491117775440216, -0.04725239798426628, 0.17430192232131958, -0.2483462691307068, -0.1251503825187683, -0.17846554517745972, 0.2291240692138672, -0.3856540620326996, -0.1919008493423462, -0.51900315284729, -0.11397289484739304, -0.059140972793102264, -0.17112424969673157, -0.1509467512369156, 0.24570530652999878, -0.01371036097407341, 0.23054388165473938, 0.11105888336896896, 0.43784430623054504, -0.2536051869392395, 0.6320556402206421, -0.19981330633163452, -0.06735695153474808, 0.5248289108276367, -0.6005613803863525, -0.4457893371582031, 0.10416540503501892, 0.27973103523254395, -0.11805396527051926, -0.4135185182094574, -0.4719395935535431, -0.19090592861175537, 0.4383026361465454, 0.03404742106795311, -0.3247112035751343, -0.015911778435111046, -0.08349162340164185, 0.10943984985351562, 0.04215371981263161, 0.4812164306640625, 0.011709809303283691, -0.18956111371517181, 0.37452974915504456, -0.3594849109649658 ]
https://github.com/huggingface/datasets/issues/2407
.map() function got an unexpected keyword argument 'cache_file_name'
I think you are right. I used cache_file_names={data1: name1, data2: name2} and it works. Thank you!
## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0
16
.map() function got an unexpected keyword argument 'cache_file_name' ## Describe the bug I'm trying to save the result of datasets.map() to a specific file, so that I can easily share it among multiple computers without reprocessing the dataset. However, when I try to pass an argument 'cache_file_name' to the .map() function, it throws an error that ".map() function got an unexpected keyword argument 'cache_file_name'". I believe I'm using the latest dataset 1.6.2. Also seems like the document and the actual code indicates there is an argument 'cache_file_name' for the .map() function. Here is the code I use ## Steps to reproduce the bug ```datasets = load_from_disk(dataset_path=my_path) [...] def tokenize_function(examples): return tokenizer(examples[text_column_name]) logger.info("Mapping dataset to tokenized dataset.") tokenized_datasets = datasets.map( tokenize_function, batched=True, num_proc=preprocessing_num_workers, remove_columns=column_names, load_from_cache_file=True, cache_file_name="my_tokenized_file" ) ``` ## Actual results tokenized_datasets = datasets.map( TypeError: map() got an unexpected keyword argument 'cache_file_name' ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version:1.6.2 - Platform:Linux-4.18.0-193.28.1.el8_2.x86_64-x86_64-with-glibc2.10 - Python version:3.8.5 - PyArrow version:3.0.0 I think you are right. I used cache_file_names={data1: name1, data2: name2} and it works. Thank you!
[ 0.15060578286647797, 0.09318816661834717, 0.04623488709330559, -0.006892696022987366, 0.04963481426239014, 0.29383477568626404, 0.21114620566368103, 0.3586554527282715, -0.06443952023983002, 0.01763574779033661, 0.119479700922966, 0.6066256165504456, -0.24757365882396698, -0.48796188831329346, 0.06840026378631592, 0.1206597313284874, 0.41489970684051514, -0.08681291341781616, 0.20501117408275604, 0.002126164734363556, -0.37797778844833374, 0.36054104566574097, -0.071999691426754, 0.24150095880031586, -0.4130327105522156, -0.14762578904628754, -0.11090383678674698, -0.07805956155061722, -0.051236532628536224, -0.3494434058666229, 0.17832998931407928, 0.13312718272209167, -0.08975435793399811, 0.4608038663864136, -0.0001248522603418678, -0.0772017166018486, 0.0131903737783432, -0.18955641984939575, -0.19990473985671997, -0.3421221971511841, -0.1010749340057373, 0.02253754250705242, -0.06838136166334152, -0.516525149345398, 0.2275048792362213, -0.17302057147026062, 0.20019026100635529, -0.5802551507949829, 0.1264275163412094, 0.1558324694633484, 0.12115952372550964, -0.11189556866884232, -0.23707889020442963, -0.1584712415933609, 0.07618014514446259, -0.12485422194004059, -0.010695036500692368, 0.1948433816432953, 0.010860398411750793, -0.27780836820602417, 0.15662211179733276, 0.32394033670425415, -0.42111438512802124, -0.0880388468503952, 0.4996000826358795, 0.056510236114263535, -0.22052955627441406, -0.3682152330875397, 0.24684515595436096, -0.15575829148292542, 0.16004720330238342, -0.4097856879234314, -0.3636481761932373, -0.12352660298347473, -0.30609452724456787, -0.10573463141918182, 0.16891780495643616, -0.09691613912582397, -0.12874047458171844, -0.026952434331178665, 0.01850707083940506, -0.23594222962856293, 0.05173923075199127, 0.15583667159080505, 0.251569002866745, 0.08785132318735123, -0.16671061515808105, 0.3883557915687561, 0.3064812421798706, -0.08606181293725967, -0.223598450422287, -0.40859827399253845, -0.03074881061911583, 0.35729074478149414, -0.18477457761764526, -0.04179339110851288, 0.05710216239094734, 0.07327680289745331, 0.07527272403240204, -0.3570680618286133, -0.10440333187580109, -0.17618337273597717, 0.10446497052907944, 0.34140080213546753, 0.2398311048746109, 0.2543741762638092, 0.33292797207832336, 0.4893091917037964, -0.15979218482971191, -0.3360435664653778, -0.3116050064563751, -0.20105493068695068, 0.06604029983282089, -0.09647215157747269, 0.5460066199302673, -0.07668586820363998, 0.2803618311882019, -0.10206833481788635, 0.11009769886732101, 0.07509451359510422, -0.37827327847480774, -0.012523677200078964, -0.08007969707250595, 0.3749350905418396, 0.1374797374010086, -0.07995593547821045, -0.013176195323467255, 0.19785404205322266, 0.057404451072216034, -0.1682077944278717, -0.14082609117031097, 0.08838184177875519, -0.22282668948173523, 0.23665189743041992, -0.18653468787670135, -0.01900036633014679, 0.13545016944408417, 0.02653660997748375, 0.1726420521736145, -0.15200157463550568, 0.20273905992507935, -0.08685240149497986, 0.247214674949646, -0.1467597633600235, -0.0666588842868805, 0.5224134922027588, 0.23761215806007385, -0.24462108314037323, -0.14675848186016083, 0.06541550904512405, -0.519585907459259, -0.2889373302459717, -0.000585140660405159, 0.011489364318549633, -0.029698578640818596, 0.1388431191444397, -0.4297340214252472, 0.008814841508865356, 0.5321176052093506, -0.30102992057800293, -0.006985373795032501, -0.05024398863315582, -0.24984446167945862, -0.5160021781921387, 0.02987075038254261, 0.3006645441055298, -0.08049964904785156, -0.032352231442928314, 0.018752261996269226, 0.20078030228614807, 0.007507495582103729, 0.15448229014873505, -0.09840185940265656, 0.24791786074638367, -0.19842669367790222, 0.6995724439620972, 0.5317050218582153, -0.23377636075019836, -0.5732622146606445, 0.26889508962631226, -0.17981944978237152, -0.025647535920143127, -0.0756227895617485, 0.0339847132563591, 0.4914744794368744, -0.15284746885299683, 0.44690728187561035, -0.05361232906579971, -0.029082195833325386, 0.1925884634256363, -0.2574969530105591, -0.22340379655361176, 0.16939572989940643, -0.2530670762062073, -0.042002055794000626, 0.1683843433856964, 0.07359717786312103, 0.09564880281686783, 0.1005285382270813, 0.07759798318147659, 0.24574115872383118, 0.06068708002567291, 0.2730288803577423, 0.08781442046165466, 0.02923525497317314, 0.011729493737220764, -0.2583971321582794, 0.058203838765621185, 0.20644861459732056, -0.4496220350265503, -0.28033578395843506, -0.4923887252807617, -0.02690904028713703, 0.040175147354602814, -0.15731802582740784, -0.03349996730685234, -0.0036603547632694244, 0.09836351871490479, 0.06600542366504669, 0.11219178140163422, -0.08795833587646484, -0.0005154404789209366, 0.06361767649650574, -0.07784255594015121, 0.08917047083377838, -0.2292366623878479, -0.07122991979122162, -0.12886419892311096, -0.21817097067832947, -0.20205870270729065, 0.42929214239120483, -0.031807202845811844, -0.29883551597595215, 0.38828739523887634, -0.027162747457623482, 0.06652944535017014, -0.07847190648317337, 0.32371294498443604, -0.3152005672454834, -0.009199216961860657, 0.05075833201408386, -0.005759876221418381, 0.1366645246744156, -0.014488250017166138, 0.09826431423425674, 0.178529292345047, 0.3157639503479004, 0.16907328367233276, -0.22281967103481293, 0.3009202480316162, -0.030198771506547928, 0.012548793107271194, 0.03002803586423397, -0.2449699342250824, -0.039888765662908554, -0.12261319160461426, 0.3339977562427521, -0.10226911306381226, -0.0005510970950126648, 0.035217657685279846, 0.5029198527336121, 0.12204113602638245, 0.17327314615249634, -0.069568932056427, -0.1503669023513794, -0.001280132681131363, 0.06646840274333954, 0.31709447503089905, 0.594368040561676, -0.0066190604120492935, 0.017345447093248367, -0.008895954117178917, 0.1392172873020172, 0.10312090814113617, 0.06919889152050018, 0.036526523530483246, -0.12976984679698944, -0.24335339665412903, -0.06271351873874664, 0.21507760882377625, 0.08546117693185806, 0.04917747899889946, 0.2067359834909439, 0.11328332871198654, -0.21300624310970306, 0.2950798571109772, -0.07896889746189117, 0.019150078296661377, -0.07549431174993515, -0.052041154354810715, -0.23207005858421326, -0.48212605714797974, -0.08611612021923065, 0.2031513899564743, 0.041654329746961594, 0.27744966745376587, -0.15840239822864532, 0.16302454471588135, -0.008411243557929993, -0.4518018960952759, 0.013333097100257874, -0.2092439979314804, -0.04351717233657837, -0.21834230422973633, 0.02057226002216339, -0.3122442066669464, 0.42935654520988464, -0.022157466039061546, -0.06263748556375504, -0.39321470260620117, -0.13212233781814575, 0.1364067941904068, -0.13246935606002808, 0.16972607374191284, 0.13607744872570038, 0.10699101537466049, -0.28481966257095337, -0.19638089835643768, 0.18699680268764496, -0.266124427318573, 0.050092317163944244, -0.07283127307891846, 0.11403796821832657, -0.2556237578392029, -0.13445881009101868, -0.08876828104257584, -0.08708541095256805, -0.08546869456768036, 0.2680516541004181, -0.32166939973831177, 0.13086828589439392, 0.08595098555088043, -0.05223645269870758, 0.1807767152786255, -0.29636532068252563, -0.12830249965190887, -0.34908512234687805, -0.4505203664302826, 0.40807029604911804, -0.2937379479408264, -0.21431787312030792, 0.016028951853513718, 0.061853498220443726, 0.11602407693862915, 0.2370445430278778, -0.25217461585998535, -0.2652907073497772, 0.13300541043281555, 0.22808900475502014, 0.013117838650941849, -0.00572303868830204, 0.23802490532398224, 0.0031645381823182106, 0.08662095665931702, -0.3071548342704773, -0.4675835967063904, 0.11937824636697769, 0.14098629355430603, 0.31892964243888855, 0.3793572783470154, 0.2845684885978699, 0.3596891462802887, 0.6702025532722473, 0.3310697078704834, -0.005252961069345474, 0.4259996712207794, -0.18994611501693726, 0.34777235984802246, -0.02956075221300125, -0.5100739002227783, -0.08949758112430573, -0.09392888844013214, -0.29866307973861694, -0.03973613679409027, -0.11994800716638565, -0.15531137585639954, 0.09200842678546906, -0.12179107964038849, -0.2851128578186035, -0.41316768527030945, 0.06248784810304642, -0.3208039700984955, 0.1612468957901001, 0.07938335835933685, 0.14295035600662231, -0.6122847199440002, -0.12166973203420639, 0.06588338315486908, 0.2694430947303772, 0.14539754390716553, 0.12119733542203903, -0.3798372745513916, -0.028433389961719513, -0.4286343455314636, 0.5219663977622986, 0.03205375373363495, 0.32552000880241394, -0.16890738904476166, 0.1328074038028717, -0.016233891248703003, 0.2232997566461563, 0.7702388167381287, -0.30018487572669983, 0.022660842165350914, 0.10396914184093475, 0.2140936255455017, -0.20866161584854126, 0.01427369937300682, 0.19267025589942932, 0.8246278166770935, 0.16406166553497314, 0.4790228009223938, -0.15949970483779907, -0.1409148871898651, -0.2343812882900238, 0.1006200835108757, -0.145394429564476, -0.024745166301727295, -0.04786987602710724, -0.09617231786251068, -0.4246605634689331, -0.05032535642385483, 0.19720155000686646, -0.00021692737936973572, 0.35740557312965393, 0.17224889993667603, 0.12644337117671967, 0.05276115983724594, 0.20199856162071228, 0.18734310567378998, 0.3689808249473572, -0.016377873718738556, -0.12771612405776978, 0.23738744854927063, -0.035000309348106384, 0.12156365811824799, 0.13706380128860474, -0.23052671551704407, -0.10817208886146545, -0.13592717051506042, -0.11481201648712158, 0.4389285147190094, 0.149615079164505, -0.28441983461380005, 0.08291617035865784, -0.13370122015476227, -0.031995050609111786, -0.01721472665667534, 0.21210145950317383, 0.4726814031600952, -0.07829239219427109, -0.5838587284088135, -0.5335860252380371, 0.2385368049144745, 0.3074764013290405, -0.27679532766342163, 0.8010510206222534, 0.0006075724959373474, -0.3199247717857361, 0.45469462871551514, -0.10772622376680374, 0.8967580199241638, -0.02939280867576599, 0.2561298906803131, -0.14852610230445862, 0.11161012947559357, 0.365604043006897, -0.029530465602874756, -0.022260311990976334, -0.1998395472764969, 0.040997739881277084, 0.042898453772068024, 0.012294653803110123, 0.09137284010648727, 0.4195525050163269, -0.364023357629776, 0.2675349712371826, -0.07550384104251862, 0.45959505438804626, -0.04352749139070511, -0.005550418049097061, -0.0019315499812364578, -0.20611709356307983, -0.08435795456171036, 0.10253502428531647, -0.038067735731601715, 0.0937526673078537, 0.004314731806516647, -0.16887317597866058, 0.012575488537549973, -0.49773740768432617, -0.1557014286518097, 0.0034700538963079453, -0.5351474285125732, 0.3101596236228943, -0.13946355879306793, 0.09569907188415527, -0.034322723746299744, 0.35704368352890015, 0.08537215739488602, 0.24379482865333557, -0.05735698342323303, -0.033269595354795456, 0.07859858125448227, 0.009206741116940975, -0.13051843643188477, -0.27710163593292236, 0.12491724640130997, 0.18103307485580444, -0.00510898232460022, 0.17529964447021484, -0.02513185329735279, -0.5194833278656006, -0.21738845109939575, 0.0601094588637352, 0.2489190697669983, -0.3463411331176758, -0.4690989851951599, -0.17688056826591492, -0.14152781665325165, -0.08656343072652817, 0.01103456225246191, 0.019792862236499786, -0.13610439002513885, 0.3602219223976135, -0.22079114615917206, -0.2241201251745224, 0.26385366916656494, 0.36755260825157166, -0.318948894739151, -0.20108067989349365, 0.44956883788108826, -0.3525356352329254, -0.05134594440460205, -0.07352112233638763, 0.09725915640592575, -0.10466743260622025, 0.0384296253323555, 0.20395584404468536, -0.18285775184631348, 0.19782929122447968, -0.11940872669219971, 0.1648615598678589, 0.1596924066543579, 0.22411975264549255, 0.03176122531294823, -0.34819844365119934, -0.21534259617328644, 0.04793727770447731, -0.1564861536026001, 0.13367675244808197, 0.22498005628585815, -0.011873608455061913, 0.04721207171678543, 0.17854173481464386, -0.1908363401889801, 0.1848514825105667, -0.026770811527967453, 0.08827716112136841, 0.3773249685764313, 0.34355491399765015, 0.28946453332901, -0.2011670619249344, -0.04056217521429062, 0.18544690310955048, -0.1447349339723587, -0.06308494508266449, -0.3401409983634949, 0.2215382158756256, 0.2339002788066864, 0.03389804810285568, 0.07869137078523636, -0.3499487042427063, 0.09290386736392975, -0.36375877261161804, 0.04239180311560631, 0.43071144819259644, -0.0725797712802887, 0.30738574266433716, 0.3182027339935303, 0.11266139149665833, 0.009708065539598465, 0.05858549475669861, -0.042137712240219116, 0.16384172439575195, 0.023089194670319557, 0.22500678896903992, 0.03667464852333069, 0.006176002323627472, -0.17365889251232147, 0.13463611900806427, -0.06448422372341156, 0.06582175940275192, 0.15878629684448242, -0.14275865256786346, 0.12765248119831085, 0.4364609718322754, 0.02931610867381096, 0.16256631910800934, -0.5086866617202759, -0.007061907090246677, 0.2376185655593872, 0.05087340623140335, 0.10906848311424255, -0.2607002258300781, 0.8278589844703674, 0.10902678221464157, -0.10831890255212784, 0.23992477357387543, 0.0589892752468586, 0.0016383454203605652, -0.1321205049753189, -0.1859840452671051, 0.4091365933418274, -0.4331188201904297, 0.33832988142967224, 0.28803831338882446, 0.23412086069583893, 0.3518943786621094, 0.26146233081817627, 0.3701033294200897, 0.1764340102672577, 0.5423183441162109, -0.2519463002681732, 0.25703099370002747, 0.2938838005065918, -0.1519252508878708, 0.17426797747612, -0.24554237723350525, 0.2053663432598114, 0.16001084446907043, -0.18533125519752502, 0.4770709276199341, -0.10641179978847504, 0.33857691287994385, -0.3598342537879944, -0.05612640455365181, 0.11439386755228043, 0.19506514072418213, -0.2536487579345703, -0.06184358149766922, 0.07250697910785675, 0.009816654026508331, -0.06204434484243393, -0.09283663332462311, -0.10134868323802948, -0.18832392990589142, 0.6053309440612793, 0.019247591495513916, 0.08361101895570755, 0.12080927193164825, -0.12015055865049362, 0.129900723695755, 0.41474461555480957, -0.44763487577438354, -0.08834431320428848, -0.35819947719573975, 0.06682559847831726, 0.11627030372619629, 0.17138230800628662, 0.5463883876800537, 0.5371782183647156, -0.091375932097435, 0.11082801967859268, 0.07895322144031525, -0.07590629905462265, 0.04811754822731018, 0.04188757762312889, -0.10368016362190247, -0.18172621726989746, 0.19532091915607452, 0.024169305339455605, 0.02871635928750038, 0.11694154143333435, 0.22795693576335907, 0.4599264860153198, -0.038241684436798096, 0.14894519746303558, -0.11419552564620972, -0.23892667889595032, -0.24140962958335876, 0.263871967792511, -0.34292569756507874, -0.12065409123897552, 0.38877034187316895, 0.21081732213497162, 0.23384663462638855, -0.16183732450008392, 0.03527884930372238, 0.21223485469818115, 0.09105122089385986, 0.1747749149799347, -0.09273373335599899, -0.5577602982521057, -0.12715187668800354, -0.5940542817115784, 0.15524283051490784, -0.07874953746795654, 0.1418321579694748, 0.02929343841969967, 0.0033741388469934464, -0.00012861937284469604, 0.11258439719676971, 0.14464743435382843, -0.16402217745780945, -0.24200282990932465, 0.37224632501602173, -0.13343054056167603, -0.16986185312271118, 0.0288320891559124, 0.17341351509094238, 0.4382992088794708, -0.2452842891216278, 0.005116086453199387, -0.018446896225214005, -0.024294957518577576, -0.37474894523620605, -0.18711848556995392, 0.0896143764257431, -0.057366788387298584, 0.6901990175247192, 0.010239673778414726, 0.2794250249862671, 0.010122910141944885, -0.21893282234668732, -0.011947836726903915, 0.16734574735164642, -0.23614473640918732, -0.14496678113937378, -0.18624860048294067, 0.21860849857330322, -0.41186314821243286, -0.20179052650928497, -0.5065128207206726, -0.15141728520393372, -0.08316096663475037, -0.20640569925308228, -0.11748334765434265, 0.2421703338623047, 0.019177250564098358, 0.2319871038198471, 0.06846753507852554, 0.4040105640888214, -0.2606869637966156, 0.6287734508514404, -0.216526597738266, -0.043962329626083374, 0.5280609130859375, -0.6110007762908936, -0.4437097907066345, 0.10858676582574844, 0.28437942266464233, -0.15797510743141174, -0.4147575795650482, -0.47194352746009827, -0.16675230860710144, 0.4483356773853302, 0.07611133903265, -0.32205232977867126, 0.00979710929095745, -0.12448716163635254, 0.13421453535556793, 0.06222919747233391, 0.45023831725120544, -0.020782936364412308, -0.1780713051557541, 0.28838473558425903, -0.35137826204299927 ]
https://github.com/huggingface/datasets/issues/2400
Concatenate several datasets with removed columns is not working.
Hi, did you fill out the env info section manually or by copy-pasting the output of the `datasets-cli env` command? This code should work without issues on 1.6.2 version (I'm working on master (1.6.2.dev0 version) and can't reproduce this error).
## Describe the bug You can't concatenate datasets when you removed columns before. ## Steps to reproduce the bug ```python from datasets import load_dataset, concatenate_datasets wikiann= load_dataset("wikiann","en") wikiann["train"] = wikiann["train"].remove_columns(["langs","spans"]) wikiann["test"] = wikiann["test"].remove_columns(["langs","spans"]) assert wikiann["train"].features.type == wikiann["test"].features.type concate = concatenate_datasets([wikiann["train"],wikiann["test"]]) ``` ## Expected results Merged dataset ## Actual results ```python ValueError: External features info don't match the dataset: Got {'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'ner_tags': Sequence(feature=ClassLabel(num_classes=7, names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC'], names_file=None, id=None), length=-1, id=None), 'langs': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'spans': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<langs: list<item: string>, ner_tags: list<item: int64>, spans: list<item: string>, tokens: list<item: string>> but expected something like {'ner_tags': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<ner_tags: list<item: int64>, tokens: list<item: string>> ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: ~1.6.2~ 1.5.0 - Platform: macos - Python version: 3.8.5 - PyArrow version: 3.0.0
40
Concatenate several datasets with removed columns is not working. ## Describe the bug You can't concatenate datasets when you removed columns before. ## Steps to reproduce the bug ```python from datasets import load_dataset, concatenate_datasets wikiann= load_dataset("wikiann","en") wikiann["train"] = wikiann["train"].remove_columns(["langs","spans"]) wikiann["test"] = wikiann["test"].remove_columns(["langs","spans"]) assert wikiann["train"].features.type == wikiann["test"].features.type concate = concatenate_datasets([wikiann["train"],wikiann["test"]]) ``` ## Expected results Merged dataset ## Actual results ```python ValueError: External features info don't match the dataset: Got {'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'ner_tags': Sequence(feature=ClassLabel(num_classes=7, names=['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC'], names_file=None, id=None), length=-1, id=None), 'langs': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'spans': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<langs: list<item: string>, ner_tags: list<item: int64>, spans: list<item: string>, tokens: list<item: string>> but expected something like {'ner_tags': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} with type struct<ner_tags: list<item: int64>, tokens: list<item: string>> ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: ~1.6.2~ 1.5.0 - Platform: macos - Python version: 3.8.5 - PyArrow version: 3.0.0 Hi, did you fill out the env info section manually or by copy-pasting the output of the `datasets-cli env` command? This code should work without issues on 1.6.2 version (I'm working on master (1.6.2.dev0 version) and can't reproduce this error).
[ -0.050396546721458435, -0.1630987524986267, -0.03724987804889679, 0.29215872287750244, 0.07128649204969406, 0.16081500053405762, 0.427557110786438, 0.39729976654052734, -0.1280238926410675, 0.09719819575548172, -0.21168582141399384, 0.2830117344856262, 0.11641430109739304, 0.2401473969221115, -0.33151692152023315, -0.2897307872772217, 0.30339232087135315, -0.04976579546928406, -0.11161060631275177, 0.008924692869186401, -0.2896190881729126, 0.15857252478599548, -0.5898987650871277, -0.08124089241027832, -0.2130749523639679, 0.3191346526145935, -0.43025726079940796, 0.010183651000261307, 0.015857888385653496, -0.010766785591840744, 0.24893231689929962, 0.03487430512905121, 0.09118328243494034, 0.2840426564216614, -0.00011212431854801252, -0.10661984980106354, 0.21691516041755676, -0.09814680367708206, -0.051017094403505325, -0.07685749232769012, -0.3660034239292145, -0.32899776101112366, 0.0968489944934845, -0.1380762904882431, 0.09260847419500351, -0.39347392320632935, -0.5519927740097046, -0.315090537071228, -0.07372213900089264, 0.3357473909854889, 0.1743547022342682, 0.1843101978302002, 0.1966739147901535, 0.05801970139145851, 0.09816537797451019, -0.10654576122760773, -0.14004479348659515, -0.30293092131614685, -0.0800742506980896, -0.22235655784606934, 0.4281580150127411, 0.20235675573349, -0.17753203213214874, -0.21881461143493652, -0.11700031906366348, 0.27386629581451416, -0.13496753573417664, -0.3314729630947113, -0.06746111810207367, 0.17710253596305847, 0.5298750996589661, -0.17047038674354553, -0.07860124111175537, -0.11115339398384094, 0.14926300942897797, -0.35331571102142334, 0.10710090398788452, 0.2344943881034851, 0.09673824906349182, 0.0004621557891368866, -0.07604826241731644, 0.18617932498455048, -0.07124070078134537, 0.199037566781044, 0.002985134720802307, 0.378944993019104, 0.1802266389131546, 0.09264753013849258, -0.0005091503262519836, -0.2979045510292053, 0.20165182650089264, -0.45108360052108765, -0.10826292634010315, 0.10075413435697556, -0.6059809923171997, -0.050556380301713943, -0.059148840606212616, -0.2208828330039978, 0.19620370864868164, 0.06682811677455902, -0.32452067732810974, -0.08439923077821732, 0.19130973517894745, 0.10332095623016357, 0.17775769531726837, 0.4177732467651367, -0.11637965589761734, 0.2942087650299072, -0.20896412432193756, 0.1199079230427742, -0.09707123041152954, 0.08320292830467224, 0.07536616921424866, -0.056155379861593246, 0.07013911008834839, 0.10111265629529953, 0.3909549117088318, -0.09691888839006424, -0.11478044837713242, 0.1432805210351944, -0.3422622084617615, 0.004498460795730352, -0.19693876802921295, -0.12636899948120117, -0.16672438383102417, 0.5428561568260193, 0.037758708000183105, 0.34657418727874756, 0.15970562398433685, -0.06622029840946198, -0.2639195919036865, 0.006823783740401268, -0.023092349991202354, -0.3497835099697113, -0.013638202100992203, -0.07297830283641815, 0.025217680260539055, 0.3798222839832306, 0.07187068462371826, -0.037039559334516525, -0.2197399139404297, -0.19569815695285797, 0.2782515287399292, -0.04062309488654137, 0.0026139281690120697, -0.22289784252643585, 0.4038156569004059, -0.16401582956314087, 0.038097016513347626, -0.043440282344818115, -0.5051546096801758, -0.14251570403575897, -0.6818560361862183, 0.24048657715320587, 0.03189582750201225, 0.010437117889523506, -0.14102590084075928, 0.1947815716266632, 0.12999483942985535, 0.2286321520805359, -0.1718491017818451, -0.20433145761489868, 0.08448798954486847, -0.11658672988414764, 0.3006390929222107, 0.10320053994655609, -0.22589823603630066, 0.08968470990657806, 0.23806577920913696, 0.024185067042708397, 0.414875328540802, 0.16802380979061127, 0.008054796606302261, 0.09379362314939499, -0.31909069418907166, -0.0370066873729229, 0.4073169529438019, -0.3568257689476013, -0.07533355057239532, 0.03448457643389702, 0.001947157084941864, 0.3965245485305786, 0.06307295709848404, -0.17251238226890564, -0.02132304199039936, 0.11550720781087875, 0.39020583033561707, 0.37712979316711426, 0.008526047691702843, -0.04849386587738991, -0.09528736770153046, -0.30980822443962097, 0.38172096014022827, -0.06490594148635864, 0.01631925255060196, 0.297275185585022, 0.14580470323562622, -0.34831538796424866, 0.37543895840644836, -0.23168545961380005, -0.04688853770494461, 0.3996680974960327, 0.13509707152843475, 0.0140620656311512, -0.07876322418451309, -0.02770603634417057, -0.6223956942558289, 0.0030922293663024902, 0.006015311926603317, 0.15217366814613342, 0.0274600088596344, -0.15279850363731384, -0.029560208320617676, -0.15358158946037292, -0.27289047837257385, 0.06497695297002792, 0.16271519660949707, 0.18236933648586273, 0.0888022780418396, -0.1181529313325882, -0.22292925417423248, 0.412044495344162, -0.08627095073461533, 0.07039421796798706, -0.3407653272151947, 0.30831843614578247, -0.17237892746925354, 0.032928261905908585, 0.10735116899013519, 0.38068050146102905, 0.30773183703422546, 0.031149394810199738, -0.11542356759309769, 0.30308565497398376, -0.17708130180835724, -0.15948350727558136, -0.1415899693965912, -0.1729777604341507, 0.03140471503138542, -0.10568162798881531, -0.2074013352394104, -0.0851077139377594, -0.007330612745136023, -0.09691314399242401, -0.09338847547769547, 0.18591022491455078, -0.03482474014163017, 0.38726040720939636, 0.02379429340362549, 0.0162359531968832, 0.20361243188381195, -0.11431241035461426, -0.044455017894506454, -0.16320879757404327, 0.195618137717247, 0.057159170508384705, -0.22435706853866577, 0.09471199661493301, -0.3509664833545685, 0.1010201945900917, 0.44271448254585266, 0.3745531439781189, -0.22291874885559082, -0.01973988115787506, -0.25666606426239014, -0.050371211022138596, 0.08027540892362595, -0.04371553659439087, 0.5458468198776245, 0.28569766879081726, -0.13915827870368958, 0.2237304449081421, 0.1402377486228943, -0.024175170809030533, 0.10974635928869247, 0.17192023992538452, 0.05357617512345314, 0.42722901701927185, 0.3137715756893158, 0.14904473721981049, -0.031078005209565163, -0.13941439986228943, 0.08145110309123993, 0.11540516465902328, -0.2603967487812042, 0.06826379150152206, -0.4254438877105713, -0.32822757959365845, -0.06430722028017044, -0.4015084505081177, -0.19658610224723816, -0.525353193283081, -0.25882387161254883, -0.001973416656255722, -0.22721686959266663, 0.358868271112442, -0.24518387019634247, -0.14078356325626373, 0.11126480996608734, -0.3164881467819214, -0.16178926825523376, -0.006038319785147905, -0.010985318571329117, 0.10993023216724396, -0.028419554233551025, -0.07249253988265991, -0.11418323218822479, -0.1195509135723114, -0.029025422409176826, -0.27935436367988586, -0.18028216063976288, 0.07838903367519379, -0.4108562469482422, -0.005950752645730972, 0.08335697650909424, -0.14610429108142853, 0.042866215109825134, -0.5514671206474304, 0.2130686491727829, 0.3447151184082031, -0.09899449348449707, 0.35319745540618896, 0.1951981484889984, -0.046055085957050323, -0.039807625114917755, -0.4187438189983368, -0.17645061016082764, -0.33591538667678833, 0.036709874868392944, 0.08657798171043396, 0.09534971415996552, 0.28008097410202026, 0.19133126735687256, -0.17750926315784454, 0.08754225820302963, 0.028054501861333847, -0.1698320358991623, -0.17274227738380432, 0.19655343890190125, 0.028986163437366486, -0.19540902972221375, 0.03770243749022484, -0.046609871089458466, 0.11345924437046051, 0.14093367755413055, -0.11584344506263733, -0.0908903107047081, -0.12764477729797363, 0.3326509892940521, -0.12097491323947906, 0.21437214314937592, 0.1329696774482727, 0.1540292352437973, 0.02312089316546917, 0.07875040918588638, 0.028015263378620148, 0.04315926879644394, 0.12992924451828003, 0.34296202659606934, -0.22132810950279236, 0.13725852966308594, -0.14957143366336823, 0.13753731548786163, 0.3419879972934723, -0.025724511593580246, 0.2826385498046875, 0.022258082404732704, 0.3406059741973877, -0.1352030634880066, -0.5328831076622009, -0.1271975189447403, -0.08142231404781342, 0.329021692276001, -0.03296324610710144, -0.24765869975090027, -0.1753961592912674, -0.17299315333366394, 0.24394655227661133, -0.06947776675224304, -0.09176778048276901, -0.03337394446134567, -0.25836825370788574, 0.22067970037460327, 0.11476023495197296, -0.2689765989780426, -0.1551431566476822, -0.1641211211681366, -0.02456306293606758, 0.08014360815286636, 0.03750409185886383, -0.149705708026886, -0.6010110378265381, 0.010080353356897831, -0.24052444100379944, 0.3405507206916809, 0.2059510052204132, 0.41487497091293335, 0.21380515396595, -0.3147102892398834, -0.3111153244972229, 0.09815650433301926, 0.30108895897865295, -0.27332064509391785, -0.5399447679519653, 0.5859161019325256, 0.2233327031135559, -0.1713491827249527, -0.46759405732154846, -0.19976365566253662, -0.19708852469921112, 0.23860633373260498, 0.5842810273170471, -0.13349536061286926, -0.14470238983631134, 0.5269436240196228, 0.6180108785629272, 0.11994536221027374, 0.04106340557336807, -0.32139062881469727, -0.06275687366724014, -0.41766059398651123, -0.2730877101421356, -0.02289309725165367, 0.5833284854888916, -0.41074106097221375, -0.17398247122764587, -0.19976677000522614, -0.4016900360584259, 0.21258637309074402, -0.29196444153785706, 0.3892844319343567, 0.1077706441283226, 0.20858697593212128, -0.4233535826206207, 0.48588255047798157, 0.10327759385108948, 0.4562613070011139, 0.13942919671535492, -0.56730055809021, 0.016768908128142357, -0.16748833656311035, 0.7560825943946838, -0.1930592954158783, -0.15197448432445526, 0.44947710633277893, -0.5763660669326782, 0.3119751214981079, 0.0449158139526844, 0.24683193862438202, 0.3549005687236786, 0.015138545073568821, -0.19962112605571747, -0.09140066802501678, 0.028182387351989746, 0.18547965586185455, 0.05225197970867157, 0.5647602677345276, -0.005814790725708008, -0.28556910157203674, -0.02445310540497303, -0.2005772590637207, 0.7556121945381165, 0.3028387725353241, 0.020840439945459366, 0.09656966477632523, 0.11472484469413757, 0.35757091641426086, -0.020462581887841225, 0.3085595965385437, -0.35349151492118835, -0.17346793413162231, -0.038928501307964325, -0.1595141738653183, 0.14113202691078186, -0.37611860036849976, -0.3558766543865204, 0.278634250164032, -0.49317389726638794, 0.726992666721344, -0.03470172733068466, 0.18872196972370148, 0.10594455152750015, -0.20082518458366394, -0.06800548732280731, 0.03787189722061157, 0.05801840499043465, -0.18675312399864197, -0.12298328429460526, 0.0072538359090685844, -0.07997584342956543, -0.10677524656057358, 0.013525247573852539, 0.44192448258399963, 0.0047341748140752316, 0.4068096876144409, -0.08967484533786774, -0.3423575162887573, -0.06092143803834915, 0.460670530796051, 0.29994142055511475, 0.010273870080709457, 0.10205145925283432, -0.2231277972459793, 0.11348824203014374, -0.016071658581495285, 0.04678935557603836, -0.33108457922935486, -0.06810721755027771, 0.09271163493394852, -0.38785189390182495, 0.31560635566711426, 0.15167202055454254, -0.3560873866081238, -0.297537624835968, 0.10842210054397583, 0.08183801919221878, -0.4882436692714691, -0.17004328966140747, 0.1675432026386261, -0.0017365925014019012, -0.26655736565589905, 0.12259848415851593, -0.09743018448352814, -0.2891649603843689, 0.2967383563518524, -0.0802769809961319, -0.28687167167663574, -0.19647186994552612, 0.32179805636405945, 0.28626900911331177, 0.013193424791097641, 0.464584082365036, 0.12843665480613708, 0.13287799060344696, -0.08339820802211761, 0.06753277033567429, -0.10735048353672028, -0.17717331647872925, -0.007698393426835537, -0.1745191067457199, 0.018500342965126038, -0.0949164479970932, 0.5044789910316467, -0.2347291260957718, 0.2245819866657257, 0.11394891142845154, -0.1793147623538971, -0.3401866555213928, 0.10366784036159515, -0.14667542278766632, 0.08925138413906097, -0.09590104222297668, 0.30435436964035034, -0.17474901676177979, 0.12041976302862167, -0.2747636139392853, -0.0956491008400917, -0.24621157348155975, 0.18675805628299713, 0.11899249255657196, -0.04170975089073181, 0.025952830910682678, -0.149689719080925, 0.14645729959011078, 0.19570980966091156, 0.25363612174987793, -0.24748003482818604, -0.08263076841831207, 0.08717048913240433, 0.2038487195968628, -0.07529140263795853, -0.09007270634174347, -0.06640574336051941, -0.2871434986591339, -0.19953475892543793, -0.11681750416755676, -0.06530531495809555, -0.04179391264915466, 0.27978307008743286, -0.15379802882671356, -0.07640994340181351, -0.0361274853348732, 0.025408267974853516, -0.04094396531581879, 0.06462161988019943, -0.25114354491233826, -0.06395594030618668, -0.23189184069633484, -0.031002510339021683, -0.28645870089530945, 0.025182195007801056, -0.12435109913349152, 0.30925339460372925, 0.2894909381866455, -0.10833151638507843, -0.2965259253978729, -0.14837417006492615, 0.20372703671455383, 0.23299768567085266, -0.1955137550830841, 0.08036093413829803, 0.06745512783527374, 0.19031716883182526, -0.4417678117752075, -0.29188260436058044, 0.08223208785057068, 0.14209119975566864, 0.09776705503463745, 0.18508675694465637, 0.2802197337150574, -0.15550114214420319, -0.05772203207015991, -0.090895876288414, 0.3061233162879944, 0.16049054265022278, 0.43710076808929443, 0.4279780685901642, 0.05712582543492317, 0.12861822545528412, 0.102972611784935, 0.23782342672348022, -0.03849954158067703, 0.19319912791252136, 0.1888798028230667, -0.06996262073516846, 0.23641937971115112, -0.11554671823978424, 0.07914458215236664, -0.16057449579238892, 0.3062419593334198, 0.04597631096839905, 0.00834481418132782, 0.10925209522247314, -0.017033308744430542, -0.1481684148311615, -0.036527831107378006, -0.3210128843784332, -0.06509164720773697, 0.3818085789680481, -0.11063896864652634, 0.10320700705051422, -0.042441681027412415, -0.1661798059940338, 0.12701067328453064, -0.020253537222743034, 0.1957322508096695, 0.007718060165643692, 0.32948923110961914, -0.11013178527355194, -0.07890176773071289, -0.09903139621019363, 0.26789891719818115, 0.5671165585517883, 0.38193655014038086, -0.20401260256767273, -0.056275345385074615, 0.2738368511199951, 0.1424812376499176, -0.04934798553586006, 0.2027289867401123, 0.5455589294433594, 0.2673031687736511, 0.057130903005599976, -0.05078161880373955, 0.027180563658475876, -0.22872339189052582, 0.099541574716568, 0.2750025987625122, 0.024840258061885834, -0.339669793844223, 0.23540665209293365, 0.14329694211483002, -0.17918479442596436, 0.06704308092594147, 0.09115909039974213, 0.14559833705425262, -0.5377758741378784, 0.4148105978965759, 0.11682236194610596, -0.2847915589809418, -0.019849207252264023, 0.05305873230099678, -0.07160507887601852, 0.00643570302054286, 0.6549481153488159, 0.4100567102432251, 0.2773199677467346, 0.07865502685308456, 0.12118269503116608, 0.14260715246200562, 0.2290961742401123, 0.49575576186180115, 0.04658149182796478, -0.458292156457901, -0.24252846837043762, -0.41704654693603516, -0.058907650411129, -0.0299222432076931, -0.10185980796813965, 0.12884944677352905, 0.24195732176303864, 0.2251453399658203, 0.1913023293018341, -0.059840068221092224, 0.2551979720592499, 0.2330656498670578, -0.21047601103782654, -0.6309729814529419, -0.22509010136127472, 0.025340616703033447, 0.04108389467000961, 0.021310050040483475, -0.35830068588256836, 0.3948848843574524, 0.13165389001369476, 0.07898520678281784, -0.16514940559864044, 0.022408321499824524, 0.1879855990409851, 0.034958429634571075, -0.005115590989589691, 0.2527991235256195, 0.35673800110816956, -0.04893979802727699, -0.04158001020550728, -0.04855865612626076, -0.19911375641822815, -0.11303889751434326, 0.12649135291576385, -0.1278737336397171, 0.12836404144763947, -0.1019970253109932, 0.10068930685520172, -0.1587139219045639, 0.10352612286806107, 0.40206587314605713, 0.10557422041893005, -0.33914273977279663, 0.08877366781234741, 0.2914130389690399, 0.09356879442930222, 0.1896459311246872, 0.5305511355400085, -0.08921180665493011, 0.4117045998573303, -0.11162362992763519, -0.4936133921146393, 0.2872147858142853, 0.0231085903942585, -0.6537193655967712, -0.19102230668067932, 0.15635283291339874, 0.256680965423584, 0.14432933926582336, -0.3373318612575531, -0.010527953505516052, 0.48992064595222473, -0.15237173438072205, -0.12012895941734314, 0.3732357919216156, 0.007130486890673637, 0.2497653216123581, 0.024418380111455917, -0.10451693832874298, 0.14682365953922272, -0.14723612368106842, 0.005559645593166351, 0.004517335444688797 ]
https://github.com/huggingface/datasets/issues/2396
strange datasets from OSCAR corpus
Hi ! Thanks for reporting cc @pjox is this an issue from the data ? Anyway we should at least mention that OSCAR could contain such contents in the dataset card, you're totally right @jerryIsHere
![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11
35
strange datasets from OSCAR corpus ![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11 Hi ! Thanks for reporting cc @pjox is this an issue from the data ? Anyway we should at least mention that OSCAR could contain such contents in the dataset card, you're totally right @jerryIsHere
[ 0.2676995098590851, 0.05709473788738251, -0.002301223576068878, 0.5770173072814941, 0.15650004148483276, 0.06097019463777542, -0.012423831969499588, 0.24926820397377014, -0.26459312438964844, 0.04861327260732651, -0.5796427726745605, -0.10799747705459595, 0.04310506209731102, -0.051175445318222046, -0.009494383819401264, -0.30193087458610535, 0.1105535551905632, 0.05995876342058182, 0.0344037190079689, -0.36925387382507324, -0.12914085388183594, 0.2438742220401764, -0.09914098680019379, 0.06843853741884232, -0.01047738641500473, -0.1464851200580597, -0.2549026906490326, -0.0072286128997802734, -0.39760786294937134, 0.02827562764286995, 0.16913023591041565, 0.12572166323661804, 0.044724948704242706, 0.3785853385925293, -0.00010987844143528491, -0.167539581656456, 0.224149689078331, -0.03261689841747284, 0.12372829020023346, -0.059777647256851196, 0.17778003215789795, 0.042733535170555115, -0.009944693185389042, 0.034117721021175385, -0.2434697151184082, -0.27769735455513, 0.004046598449349403, 0.14979441463947296, 0.29365575313568115, 0.41057315468788147, 0.23799863457679749, 0.06309830397367477, -0.11716996133327484, -0.13369633257389069, 0.20728033781051636, -0.03233632445335388, -0.2481696754693985, 0.18103547394275665, 0.4662701189517975, 0.07619152218103409, -0.11216745525598526, 0.05764419212937355, 0.028333386406302452, -0.10125422477722168, 0.21700474619865417, -0.11117858439683914, -0.2650502324104309, -0.4842264950275421, 0.29328009486198425, 0.5078216791152954, 0.307979941368103, -0.0811571255326271, -0.258942574262619, -0.2738274037837982, 0.09889373928308487, -0.2739085853099823, 0.2932353913784027, 0.3606126308441162, 0.07457463443279266, 0.2289147824048996, -0.2088942676782608, 0.19545552134513855, -0.1180681437253952, 0.40859705209732056, -0.2678513526916504, -0.1681361198425293, -0.22384023666381836, 0.01978965476155281, 0.06708322465419769, -0.06706941872835159, 0.039549656212329865, -0.27900105714797974, 0.02165910415351391, 0.27278435230255127, -0.16986800730228424, -0.13532370328903198, 0.037827618420124054, 0.44806888699531555, 0.1993468999862671, -0.1269882619380951, -0.055765300989151, 0.18986016511917114, -0.3269466161727905, -0.0471588671207428, 0.335408091545105, 0.1453731805086136, -0.15727972984313965, -0.13771453499794006, 0.14238524436950684, 0.1614498496055603, 0.08489957451820374, 0.22076445817947388, -0.07770483940839767, -0.08426816016435623, -0.22454610466957092, -0.3745214641094208, 0.09915561974048615, -0.3770408630371094, -0.2749185264110565, 0.3003405034542084, -0.6244725584983826, 0.29171958565711975, 0.035768430680036545, 0.12989473342895508, -0.19988124072551727, 0.06678147614002228, -0.01671508140861988, 0.20291917026042938, -0.11944838613271713, -0.039737191051244736, -0.1921679675579071, 0.25450026988983154, -0.2170640528202057, 0.23726169764995575, 0.040141668170690536, -0.27052000164985657, 0.24935317039489746, 0.18564391136169434, 0.3698449730873108, -0.13690543174743652, -0.07998564094305038, -0.4004630446434021, -0.019562408328056335, 0.09292255342006683, -0.17454612255096436, 0.1127902939915657, 0.0614742785692215, -0.326107919216156, -0.12227081507444382, -0.17412832379341125, -0.30788174271583557, -0.143182635307312, 0.07866359502077103, 0.18306398391723633, -0.43354254961013794, 0.0327020063996315, -0.3430887758731842, 0.375133752822876, 0.019455522298812866, 0.310107946395874, 0.30698245763778687, -0.08483901619911194, -0.2614414393901825, 0.11048020422458649, -0.15102091431617737, 0.37715357542037964, -0.006525006145238876, -0.08352843672037125, -0.16610245406627655, 0.08150617778301239, 0.307962566614151, 0.24006398022174835, -0.022867510095238686, -0.08667381852865219, -0.278959184885025, 0.1016654223203659, -0.05556703358888626, -0.23388804495334625, -0.3346048891544342, 0.29961052536964417, 0.18446998298168182, 0.2973279356956482, -0.1442999243736267, -0.1274278312921524, 0.23228561878204346, -0.27343592047691345, 0.22173593938350677, 0.17402039468288422, 0.05132550746202469, -0.02726261503994465, -0.3290058672428131, -0.11871404200792313, -0.35859906673431396, 0.06627634167671204, 0.13027209043502808, 0.08799649029970169, 0.03590085729956627, 0.06225563585758209, 0.35742512345314026, 0.026875089854002, 0.0745495855808258, 0.1326262354850769, -0.13394632935523987, 0.40236395597457886, 0.16605810821056366, 0.0027952343225479126, 0.07459922879934311, 0.24809744954109192, -0.3026060163974762, 0.5085476636886597, 0.018082156777381897, -0.22575032711029053, -0.19976180791854858, -0.23861663043498993, -0.28206637501716614, -0.24553149938583374, 0.14677628874778748, -0.18496179580688477, 0.0019982121884822845, 0.3076113164424896, 0.04638754948973656, 0.04559837281703949, -0.23204529285430908, 0.022844024002552032, -0.5470092296600342, 0.17837382853031158, 0.0564255565404892, 0.13136018812656403, 0.1921941041946411, 0.22658061981201172, 0.002263389527797699, -0.12884800136089325, 0.018816621974110603, 0.07111886888742447, -0.3784908950328827, 0.5216881036758423, 0.010541994124650955, 0.3390636444091797, 0.48426926136016846, -0.3351535201072693, 0.18675938248634338, 0.0962926596403122, 0.2057121992111206, -0.05957455933094025, -0.11921954900026321, 0.4944601058959961, 0.17038537561893463, -0.1687861680984497, 0.07066115736961365, 0.016497226431965828, 0.2834598422050476, -0.133600115776062, -0.2227504402399063, -0.2548023462295532, 0.4240823984146118, 0.1479577273130417, 0.45483288168907166, 0.19432862102985382, -0.41069045662879944, 0.22089914977550507, 0.008012436330318451, -0.04428793489933014, 0.2007296085357666, 0.3062264919281006, -0.19378772377967834, -0.025721177458763123, 0.02271510288119316, 0.24689672887325287, 0.14871716499328613, 0.06257397681474686, -0.07497759163379669, 0.31867891550064087, -0.06945866346359253, -0.3558126986026764, 0.11184671521186829, 0.19623197615146637, 0.444673091173172, 0.09990926831960678, 0.3605707585811615, 0.22025135159492493, -0.7133969068527222, 0.12600791454315186, -0.011981526389718056, 0.3289737105369568, -0.15429046750068665, 0.23275889456272125, -0.10935499519109726, -0.3838169276714325, -0.42559993267059326, -0.052606310695409775, -0.11972279846668243, -0.0765787661075592, 0.19171196222305298, -0.007962014526128769, -0.07109004259109497, -0.06067170202732086, -0.25330376625061035, 0.21267060935497284, -0.23073484003543854, 0.3920394778251648, -0.0970005989074707, -0.00013228366151452065, -0.11997229605913162, 0.12991881370544434, 0.12056145071983337, 0.015621956437826157, 0.42617857456207275, -0.223446324467659, -0.14499391615390778, -0.20552721619606018, -0.5277352929115295, 0.3550103008747101, -0.037032634019851685, -0.08284085988998413, -0.07096132636070251, -0.12303148210048676, -0.2948217988014221, -0.0460338294506073, 0.05507596209645271, -0.17522379755973816, -0.1702316403388977, 0.05685361474752426, -0.14047057926654816, -0.008630686439573765, 0.03840743377804756, -0.4563497006893158, -0.21691785752773285, -0.060090065002441406, 0.22155620157718658, 0.13420969247817993, 0.16094326972961426, 0.460066556930542, -0.2288883775472641, 0.14005477726459503, 0.16698907315731049, 0.08079084008932114, -0.5246054530143738, -0.35672587156295776, 0.3421804904937744, -0.32040128111839294, -0.4378070533275604, -0.20665106177330017, -0.26817411184310913, -0.11364610493183136, 0.041976671665906906, -0.3773084282875061, -0.5895923972129822, -0.2654286324977875, -0.19500228762626648, 0.3902936577796936, -0.3890119791030884, 0.06611823290586472, -0.3487098515033722, -0.11243090033531189, 0.000254705548286438, 0.3013927638530731, -0.017222464084625244, 0.007514523342251778, 0.25629153847694397, -0.23898425698280334, 0.5512994527816772, 0.06275573372840881, 0.34882569313049316, 0.2001672238111496, 0.07852457463741302, 0.4007731080055237, 0.1514522284269333, 0.25624364614486694, -0.03192213922739029, -0.13403485715389252, 0.35679176449775696, -0.16099533438682556, -0.011034554801881313, 0.41102975606918335, 0.10140077769756317, -0.25888264179229736, -0.011515192687511444, 0.12571148574352264, -0.27048593759536743, -0.23279790580272675, 0.01372679602354765, -0.07529720664024353, -0.044432833790779114, 0.061964478343725204, -0.01682957261800766, 0.24663037061691284, -0.4781700074672699, -0.04590489715337753, 0.08499452471733093, -0.048380471765995026, -0.04806075617671013, -0.15556700527668, 0.036181919276714325, -0.6853787302970886, 0.12992796301841736, 0.0055808937177062035, 0.21575705707073212, -0.09814783930778503, 0.3015877902507782, 0.22292748093605042, 0.11424991488456726, 0.6046196818351746, -0.0360768660902977, 0.019758494570851326, 0.06408810615539551, -0.15938298404216766, -0.22273242473602295, -0.17619629204273224, -0.4290165901184082, 0.2636866271495819, 0.2155933976173401, 0.23501573503017426, -0.14004036784172058, -0.007607799023389816, 0.21083833277225494, 0.04383377730846405, -0.19880101084709167, 0.04525994881987572, -0.014093980193138123, -0.5783289074897766, 0.020485764369368553, -0.056600503623485565, 0.2570241391658783, 0.24611420929431915, -0.246566042304039, -0.1783548891544342, 0.027397796511650085, 0.3921893835067749, 0.5225205421447754, 0.08226573467254639, 0.07780173420906067, 0.5562983751296997, 0.12650515139102936, 0.048596471548080444, 0.27940821647644043, 0.2785664200782776, 0.7305170297622681, -0.13835179805755615, -0.4596148133277893, -0.078700490295887, -0.3730384409427643, -0.0539417639374733, 0.5012970566749573, 0.07331985235214233, -0.04616916924715042, -0.31453877687454224, -0.021248750388622284, -0.2173008769750595, 0.19828565418720245, 0.36735501885414124, 0.06784746050834656, -0.3099006414413452, -0.3381641209125519, 0.6486572623252869, 0.09730201959609985, -0.21171605587005615, -0.007556557655334473, 0.26585787534713745, -0.23913781344890594, 0.35737478733062744, 0.012272395193576813, 0.95424884557724, -0.19128362834453583, -0.04422476515173912, 0.26484215259552, 0.20077843964099884, 0.48902058601379395, 0.0048601217567920685, 0.04700997844338417, -0.25527864694595337, -0.47623541951179504, -0.08913373947143555, 0.11255340278148651, 0.1524905264377594, 0.25247299671173096, 0.05041657015681267, 0.1695687472820282, 0.15079860389232635, -0.33075281977653503, -0.004623726010322571, -0.09305444359779358, -0.10977935045957565, -0.1424427628517151, -0.38580843806266785, 0.23357605934143066, 0.08788198232650757, 0.49077194929122925, -0.025133373215794563, 0.04822045564651489, -0.3262653946876526, 0.010600786656141281, -0.5220405459403992, 0.0588059276342392, 0.13095873594284058, -0.09445217251777649, 0.3296046853065491, -0.5177636742591858, 0.23150420188903809, 0.0937846451997757, 0.3234197795391083, -0.2126331478357315, -0.2467212677001953, 0.33991116285324097, -0.0834047868847847, -0.3022838234901428, 0.301239013671875, -0.09058662503957748, 0.3471252918243408, -0.12349953502416611, -0.12975123524665833, 0.1222679615020752, 0.2607761025428772, 0.14458569884300232, -0.21152323484420776, -0.09851373732089996, -0.08900763094425201, -0.17294909060001373, -0.4047577679157257, -0.11948667466640472, -0.1400166004896164, -0.10100371390581131, 0.15344449877738953, -0.015741504728794098, 0.018401717767119408, -0.017660222947597504, 0.08930464833974838, -0.31602126359939575, -0.029737018048763275, 0.41777727007865906, 0.29088157415390015, -0.08667191863059998, 0.33455970883369446, 0.5006685256958008, -0.09244562685489655, -0.056955862790346146, -0.13565637171268463, 0.124019555747509, -0.39934465289115906, 0.016660641878843307, -0.13710002601146698, -0.16212493181228638, -0.13536407053470612, 0.07183371484279633, -0.03210148960351944, -0.1690671145915985, 0.03480928763747215, -0.40835124254226685, 0.048429131507873535, 0.04934895783662796, 0.3094578683376312, 0.05822291970252991, -0.03811193257570267, 0.0904548168182373, 0.2750757038593292, 0.14988768100738525, -0.3072504997253418, 0.2171391397714615, -0.2439669519662857, 0.033764708787202835, -0.15287494659423828, 0.005028184503316879, 0.03456840291619301, -0.24592672288417816, -0.03815244883298874, 0.08665366470813751, -0.14061087369918823, -0.17846953868865967, -0.09954728186130524, 0.11217138171195984, -0.012554623186588287, -0.3512525260448456, 0.2863210439682007, 0.149129718542099, -0.08904717862606049, -0.2008603811264038, 0.10198061168193817, 0.5271872282028198, 0.205179363489151, -0.07904164493083954, 0.07986145466566086, -0.16672611236572266, 0.07782022655010223, -0.0986044704914093, 0.06898096948862076, 0.34013956785202026, 0.1839006245136261, -0.06724774092435837, 0.11607397347688675, -0.2392149120569229, -0.060752708464860916, -0.03283189237117767, -0.3738976716995239, -0.24262121319770813, 0.429731160402298, -0.02695213258266449, 0.2511419653892517, 0.6954820156097412, 0.08825249969959259, 0.3521158695220947, -0.3342873156070709, 0.016747059300541878, -0.00967329740524292, 0.1583520621061325, -0.39267227053642273, -0.04779531806707382, -0.04763565585017204, 0.2072637528181076, -0.00010728836059570312, 0.07491372525691986, 0.046064358204603195, -0.022993791848421097, -0.272286593914032, 0.008051048964262009, 0.5071802139282227, 0.016391806304454803, 0.20850977301597595, 0.06894534826278687, 0.11973142623901367, 0.05851855129003525, 0.243647500872612, -0.09288229048252106, 0.20505967736244202, 0.27131378650665283, -0.010676510632038116, 0.3332251012325287, -0.2813113331794739, 0.34892919659614563, 0.3693646490573883, -0.3195889890193939, 0.013631023466587067, 0.5468193292617798, -0.21574193239212036, 0.2831246256828308, 0.19770029187202454, 0.2938274145126343, 0.13921532034873962, -0.13104575872421265, -0.3772866129875183, 0.12101529538631439, -0.003999095410108566, -0.10158848762512207, -0.09904457628726959, -0.3409671187400818, -0.11251480877399445, 0.17732161283493042, -0.3309965133666992, -0.19190408289432526, 0.20418745279312134, -0.05047079920768738, -0.45785272121429443, -0.3864656388759613, 0.08865061402320862, -0.0775410458445549, 0.30632132291793823, 0.03721565380692482, 0.3571668267250061, 0.2162110060453415, -0.13437208533287048, 0.10023713111877441, 0.5791750550270081, 0.12900836765766144, 0.12826213240623474, 0.3204135000705719, 0.22090104222297668, -0.16289348900318146, 0.016524849459528923, 0.012279734015464783, 0.1575542688369751, 0.120112843811512, -0.09919840097427368, 0.08560039103031158, 0.11032328009605408, -0.13724207878112793, 0.2281876504421234, 0.06725183129310608, 0.14381849765777588, -0.12290482223033905, 0.4894863963127136, -0.14649885892868042, 0.07096406072378159, -0.24759238958358765, 0.022625111043453217, -0.3075386583805084, 0.2617526650428772, 0.28106391429901123, -0.2151384949684143, 0.16082978248596191, -0.14716802537441254, 0.08992768079042435, -0.044711243361234665, 0.3532957434654236, 0.5815426111221313, -0.009843237698078156, -0.014345086179673672, -0.06639277935028076, -0.5804968476295471, 0.42641323804855347, -0.2836047112941742, 0.17149041593074799, 0.0004597203806042671, 0.16922040283679962, 0.024556122720241547, 0.18254117667675018, -0.30310624837875366, 0.33416661620140076, -0.14469291269779205, -0.1285569667816162, -0.36439213156700134, 0.11178913712501526, -0.2892953157424927, 0.14273135364055634, -0.09776449203491211, -0.009853444993495941, 0.3696795403957367, -0.3764725923538208, 0.02496996521949768, -0.12940318882465363, 0.004003360867500305, -0.4783973693847656, -0.0495423823595047, 0.2290341556072235, 0.23193028569221497, 0.013325035572052002, -0.11636605113744736, -0.06660506874322891, -0.26149943470954895, -0.24943958222866058, -0.070426806807518, 0.4824528992176056, -0.06028316542506218, -0.13186980783939362, 0.15805676579475403, -0.09324918687343597, 0.24041181802749634, 0.37705621123313904, 0.01446080207824707, -0.17392556369304657, -0.4429992437362671, 0.039975911378860474, -0.18740442395210266, -0.035226501524448395, -0.06088554486632347, 0.5569927096366882, -0.1725473701953888, -0.1392378807067871, 0.03910776972770691, -0.5822049379348755, 0.32994112372398376, -0.555907666683197, 0.165803462266922, -0.22324636578559875, 0.1830236315727234, 0.06886524707078934, -0.2526188790798187, -0.44506388902664185, 0.11042884737253189, 0.10244584828615189, -0.07687025517225266, -0.1648370623588562, -0.06648147106170654, -0.06413240730762482, -0.19866842031478882, -0.12431180477142334, 0.29405468702316284, 0.24359148740768433, -0.23611201345920563, 0.3124827742576599, -0.02279314585030079 ]
https://github.com/huggingface/datasets/issues/2396
strange datasets from OSCAR corpus
Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11
93
strange datasets from OSCAR corpus ![image](https://user-images.githubusercontent.com/50871412/119260850-4f876b80-bc07-11eb-8894-124302600643.png) ![image](https://user-images.githubusercontent.com/50871412/119260875-675eef80-bc07-11eb-9da4-ee27567054ac.png) From the [official site ](https://oscar-corpus.com/), the Yue Chinese dataset should have 2.2KB data. 7 training instances is obviously not a right number. As I can read Yue Chinese, I call tell the last instance is definitely not something that would appear on Common Crawl. And even if you don't read Yue Chinese, you can tell the first six instance are problematic. (It is embarrassing, as the 7 training instances look exactly like something from a pornographic novel or flitting messages in a chat of a dating app) It might not be the problem of the huggingface/datasets implementation, because when I tried to download the dataset from the official site, I found out that the zip file is corrupted. I will try to inform the host of OSCAR corpus later. Awy a remake about this dataset in huggingface/datasets is needed, perhaps after the host of the dataset fixes the issue. > Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it? Thanks a lot, the new post is here: https://github.com/oscar-corpus/oscar-website/issues/11 Hi @jerryIsHere , sorry for the late response! Sadly this is normal, the problem comes form fasttext's classifier which we used to create the original corpus. In general the classifier is not really capable of properly recognizing Yue Chineese so the file ends un being just noise from Common Crawl. Some of these problems with OSCAR were already discussed [here](https://arxiv.org/pdf/2103.12028.pdf) but we are working on explicitly documenting the problems by language on our website. In fact, could please you open an issue on [our repo](https://github.com/oscar-corpus/oscar-website/issues) as well so that we can track it?
[ 0.2676995098590851, 0.05709473788738251, -0.002301223576068878, 0.5770173072814941, 0.15650004148483276, 0.06097019463777542, -0.012423831969499588, 0.24926820397377014, -0.26459312438964844, 0.04861327260732651, -0.5796427726745605, -0.10799747705459595, 0.04310506209731102, -0.051175445318222046, -0.009494383819401264, -0.30193087458610535, 0.1105535551905632, 0.05995876342058182, 0.0344037190079689, -0.36925387382507324, -0.12914085388183594, 0.2438742220401764, -0.09914098680019379, 0.06843853741884232, -0.01047738641500473, -0.1464851200580597, -0.2549026906490326, -0.0072286128997802734, -0.39760786294937134, 0.02827562764286995, 0.16913023591041565, 0.12572166323661804, 0.044724948704242706, 0.3785853385925293, -0.00010987844143528491, -0.167539581656456, 0.224149689078331, -0.03261689841747284, 0.12372829020023346, -0.059777647256851196, 0.17778003215789795, 0.042733535170555115, -0.009944693185389042, 0.034117721021175385, -0.2434697151184082, -0.27769735455513, 0.004046598449349403, 0.14979441463947296, 0.29365575313568115, 0.41057315468788147, 0.23799863457679749, 0.06309830397367477, -0.11716996133327484, -0.13369633257389069, 0.20728033781051636, -0.03233632445335388, -0.2481696754693985, 0.18103547394275665, 0.4662701189517975, 0.07619152218103409, -0.11216745525598526, 0.05764419212937355, 0.028333386406302452, -0.10125422477722168, 0.21700474619865417, -0.11117858439683914, -0.2650502324104309, -0.4842264950275421, 0.29328009486198425, 0.5078216791152954, 0.307979941368103, -0.0811571255326271, -0.258942574262619, -0.2738274037837982, 0.09889373928308487, -0.2739085853099823, 0.2932353913784027, 0.3606126308441162, 0.07457463443279266, 0.2289147824048996, -0.2088942676782608, 0.19545552134513855, -0.1180681437253952, 0.40859705209732056, -0.2678513526916504, -0.1681361198425293, -0.22384023666381836, 0.01978965476155281, 0.06708322465419769, -0.06706941872835159, 0.039549656212329865, -0.27900105714797974, 0.02165910415351391, 0.27278435230255127, -0.16986800730228424, -0.13532370328903198, 0.037827618420124054, 0.44806888699531555, 0.1993468999862671, -0.1269882619380951, -0.055765300989151, 0.18986016511917114, -0.3269466161727905, -0.0471588671207428, 0.335408091545105, 0.1453731805086136, -0.15727972984313965, -0.13771453499794006, 0.14238524436950684, 0.1614498496055603, 0.08489957451820374, 0.22076445817947388, -0.07770483940839767, -0.08426816016435623, -0.22454610466957092, -0.3745214641094208, 0.09915561974048615, -0.3770408630371094, -0.2749185264110565, 0.3003405034542084, -0.6244725584983826, 0.29171958565711975, 0.035768430680036545, 0.12989473342895508, -0.19988124072551727, 0.06678147614002228, -0.01671508140861988, 0.20291917026042938, -0.11944838613271713, -0.039737191051244736, -0.1921679675579071, 0.25450026988983154, -0.2170640528202057, 0.23726169764995575, 0.040141668170690536, -0.27052000164985657, 0.24935317039489746, 0.18564391136169434, 0.3698449730873108, -0.13690543174743652, -0.07998564094305038, -0.4004630446434021, -0.019562408328056335, 0.09292255342006683, -0.17454612255096436, 0.1127902939915657, 0.0614742785692215, -0.326107919216156, -0.12227081507444382, -0.17412832379341125, -0.30788174271583557, -0.143182635307312, 0.07866359502077103, 0.18306398391723633, -0.43354254961013794, 0.0327020063996315, -0.3430887758731842, 0.375133752822876, 0.019455522298812866, 0.310107946395874, 0.30698245763778687, -0.08483901619911194, -0.2614414393901825, 0.11048020422458649, -0.15102091431617737, 0.37715357542037964, -0.006525006145238876, -0.08352843672037125, -0.16610245406627655, 0.08150617778301239, 0.307962566614151, 0.24006398022174835, -0.022867510095238686, -0.08667381852865219, -0.278959184885025, 0.1016654223203659, -0.05556703358888626, -0.23388804495334625, -0.3346048891544342, 0.29961052536964417, 0.18446998298168182, 0.2973279356956482, -0.1442999243736267, -0.1274278312921524, 0.23228561878204346, -0.27343592047691345, 0.22173593938350677, 0.17402039468288422, 0.05132550746202469, -0.02726261503994465, -0.3290058672428131, -0.11871404200792313, -0.35859906673431396, 0.06627634167671204, 0.13027209043502808, 0.08799649029970169, 0.03590085729956627, 0.06225563585758209, 0.35742512345314026, 0.026875089854002, 0.0745495855808258, 0.1326262354850769, -0.13394632935523987, 0.40236395597457886, 0.16605810821056366, 0.0027952343225479126, 0.07459922879934311, 0.24809744954109192, -0.3026060163974762, 0.5085476636886597, 0.018082156777381897, -0.22575032711029053, -0.19976180791854858, -0.23861663043498993, -0.28206637501716614, -0.24553149938583374, 0.14677628874778748, -0.18496179580688477, 0.0019982121884822845, 0.3076113164424896, 0.04638754948973656, 0.04559837281703949, -0.23204529285430908, 0.022844024002552032, -0.5470092296600342, 0.17837382853031158, 0.0564255565404892, 0.13136018812656403, 0.1921941041946411, 0.22658061981201172, 0.002263389527797699, -0.12884800136089325, 0.018816621974110603, 0.07111886888742447, -0.3784908950328827, 0.5216881036758423, 0.010541994124650955, 0.3390636444091797, 0.48426926136016846, -0.3351535201072693, 0.18675938248634338, 0.0962926596403122, 0.2057121992111206, -0.05957455933094025, -0.11921954900026321, 0.4944601058959961, 0.17038537561893463, -0.1687861680984497, 0.07066115736961365, 0.016497226431965828, 0.2834598422050476, -0.133600115776062, -0.2227504402399063, -0.2548023462295532, 0.4240823984146118, 0.1479577273130417, 0.45483288168907166, 0.19432862102985382, -0.41069045662879944, 0.22089914977550507, 0.008012436330318451, -0.04428793489933014, 0.2007296085357666, 0.3062264919281006, -0.19378772377967834, -0.025721177458763123, 0.02271510288119316, 0.24689672887325287, 0.14871716499328613, 0.06257397681474686, -0.07497759163379669, 0.31867891550064087, -0.06945866346359253, -0.3558126986026764, 0.11184671521186829, 0.19623197615146637, 0.444673091173172, 0.09990926831960678, 0.3605707585811615, 0.22025135159492493, -0.7133969068527222, 0.12600791454315186, -0.011981526389718056, 0.3289737105369568, -0.15429046750068665, 0.23275889456272125, -0.10935499519109726, -0.3838169276714325, -0.42559993267059326, -0.052606310695409775, -0.11972279846668243, -0.0765787661075592, 0.19171196222305298, -0.007962014526128769, -0.07109004259109497, -0.06067170202732086, -0.25330376625061035, 0.21267060935497284, -0.23073484003543854, 0.3920394778251648, -0.0970005989074707, -0.00013228366151452065, -0.11997229605913162, 0.12991881370544434, 0.12056145071983337, 0.015621956437826157, 0.42617857456207275, -0.223446324467659, -0.14499391615390778, -0.20552721619606018, -0.5277352929115295, 0.3550103008747101, -0.037032634019851685, -0.08284085988998413, -0.07096132636070251, -0.12303148210048676, -0.2948217988014221, -0.0460338294506073, 0.05507596209645271, -0.17522379755973816, -0.1702316403388977, 0.05685361474752426, -0.14047057926654816, -0.008630686439573765, 0.03840743377804756, -0.4563497006893158, -0.21691785752773285, -0.060090065002441406, 0.22155620157718658, 0.13420969247817993, 0.16094326972961426, 0.460066556930542, -0.2288883775472641, 0.14005477726459503, 0.16698907315731049, 0.08079084008932114, -0.5246054530143738, -0.35672587156295776, 0.3421804904937744, -0.32040128111839294, -0.4378070533275604, -0.20665106177330017, -0.26817411184310913, -0.11364610493183136, 0.041976671665906906, -0.3773084282875061, -0.5895923972129822, -0.2654286324977875, -0.19500228762626648, 0.3902936577796936, -0.3890119791030884, 0.06611823290586472, -0.3487098515033722, -0.11243090033531189, 0.000254705548286438, 0.3013927638530731, -0.017222464084625244, 0.007514523342251778, 0.25629153847694397, -0.23898425698280334, 0.5512994527816772, 0.06275573372840881, 0.34882569313049316, 0.2001672238111496, 0.07852457463741302, 0.4007731080055237, 0.1514522284269333, 0.25624364614486694, -0.03192213922739029, -0.13403485715389252, 0.35679176449775696, -0.16099533438682556, -0.011034554801881313, 0.41102975606918335, 0.10140077769756317, -0.25888264179229736, -0.011515192687511444, 0.12571148574352264, -0.27048593759536743, -0.23279790580272675, 0.01372679602354765, -0.07529720664024353, -0.044432833790779114, 0.061964478343725204, -0.01682957261800766, 0.24663037061691284, -0.4781700074672699, -0.04590489715337753, 0.08499452471733093, -0.048380471765995026, -0.04806075617671013, -0.15556700527668, 0.036181919276714325, -0.6853787302970886, 0.12992796301841736, 0.0055808937177062035, 0.21575705707073212, -0.09814783930778503, 0.3015877902507782, 0.22292748093605042, 0.11424991488456726, 0.6046196818351746, -0.0360768660902977, 0.019758494570851326, 0.06408810615539551, -0.15938298404216766, -0.22273242473602295, -0.17619629204273224, -0.4290165901184082, 0.2636866271495819, 0.2155933976173401, 0.23501573503017426, -0.14004036784172058, -0.007607799023389816, 0.21083833277225494, 0.04383377730846405, -0.19880101084709167, 0.04525994881987572, -0.014093980193138123, -0.5783289074897766, 0.020485764369368553, -0.056600503623485565, 0.2570241391658783, 0.24611420929431915, -0.246566042304039, -0.1783548891544342, 0.027397796511650085, 0.3921893835067749, 0.5225205421447754, 0.08226573467254639, 0.07780173420906067, 0.5562983751296997, 0.12650515139102936, 0.048596471548080444, 0.27940821647644043, 0.2785664200782776, 0.7305170297622681, -0.13835179805755615, -0.4596148133277893, -0.078700490295887, -0.3730384409427643, -0.0539417639374733, 0.5012970566749573, 0.07331985235214233, -0.04616916924715042, -0.31453877687454224, -0.021248750388622284, -0.2173008769750595, 0.19828565418720245, 0.36735501885414124, 0.06784746050834656, -0.3099006414413452, -0.3381641209125519, 0.6486572623252869, 0.09730201959609985, -0.21171605587005615, -0.007556557655334473, 0.26585787534713745, -0.23913781344890594, 0.35737478733062744, 0.012272395193576813, 0.95424884557724, -0.19128362834453583, -0.04422476515173912, 0.26484215259552, 0.20077843964099884, 0.48902058601379395, 0.0048601217567920685, 0.04700997844338417, -0.25527864694595337, -0.47623541951179504, -0.08913373947143555, 0.11255340278148651, 0.1524905264377594, 0.25247299671173096, 0.05041657015681267, 0.1695687472820282, 0.15079860389232635, -0.33075281977653503, -0.004623726010322571, -0.09305444359779358, -0.10977935045957565, -0.1424427628517151, -0.38580843806266785, 0.23357605934143066, 0.08788198232650757, 0.49077194929122925, -0.025133373215794563, 0.04822045564651489, -0.3262653946876526, 0.010600786656141281, -0.5220405459403992, 0.0588059276342392, 0.13095873594284058, -0.09445217251777649, 0.3296046853065491, -0.5177636742591858, 0.23150420188903809, 0.0937846451997757, 0.3234197795391083, -0.2126331478357315, -0.2467212677001953, 0.33991116285324097, -0.0834047868847847, -0.3022838234901428, 0.301239013671875, -0.09058662503957748, 0.3471252918243408, -0.12349953502416611, -0.12975123524665833, 0.1222679615020752, 0.2607761025428772, 0.14458569884300232, -0.21152323484420776, -0.09851373732089996, -0.08900763094425201, -0.17294909060001373, -0.4047577679157257, -0.11948667466640472, -0.1400166004896164, -0.10100371390581131, 0.15344449877738953, -0.015741504728794098, 0.018401717767119408, -0.017660222947597504, 0.08930464833974838, -0.31602126359939575, -0.029737018048763275, 0.41777727007865906, 0.29088157415390015, -0.08667191863059998, 0.33455970883369446, 0.5006685256958008, -0.09244562685489655, -0.056955862790346146, -0.13565637171268463, 0.124019555747509, -0.39934465289115906, 0.016660641878843307, -0.13710002601146698, -0.16212493181228638, -0.13536407053470612, 0.07183371484279633, -0.03210148960351944, -0.1690671145915985, 0.03480928763747215, -0.40835124254226685, 0.048429131507873535, 0.04934895783662796, 0.3094578683376312, 0.05822291970252991, -0.03811193257570267, 0.0904548168182373, 0.2750757038593292, 0.14988768100738525, -0.3072504997253418, 0.2171391397714615, -0.2439669519662857, 0.033764708787202835, -0.15287494659423828, 0.005028184503316879, 0.03456840291619301, -0.24592672288417816, -0.03815244883298874, 0.08665366470813751, -0.14061087369918823, -0.17846953868865967, -0.09954728186130524, 0.11217138171195984, -0.012554623186588287, -0.3512525260448456, 0.2863210439682007, 0.149129718542099, -0.08904717862606049, -0.2008603811264038, 0.10198061168193817, 0.5271872282028198, 0.205179363489151, -0.07904164493083954, 0.07986145466566086, -0.16672611236572266, 0.07782022655010223, -0.0986044704914093, 0.06898096948862076, 0.34013956785202026, 0.1839006245136261, -0.06724774092435837, 0.11607397347688675, -0.2392149120569229, -0.060752708464860916, -0.03283189237117767, -0.3738976716995239, -0.24262121319770813, 0.429731160402298, -0.02695213258266449, 0.2511419653892517, 0.6954820156097412, 0.08825249969959259, 0.3521158695220947, -0.3342873156070709, 0.016747059300541878, -0.00967329740524292, 0.1583520621061325, -0.39267227053642273, -0.04779531806707382, -0.04763565585017204, 0.2072637528181076, -0.00010728836059570312, 0.07491372525691986, 0.046064358204603195, -0.022993791848421097, -0.272286593914032, 0.008051048964262009, 0.5071802139282227, 0.016391806304454803, 0.20850977301597595, 0.06894534826278687, 0.11973142623901367, 0.05851855129003525, 0.243647500872612, -0.09288229048252106, 0.20505967736244202, 0.27131378650665283, -0.010676510632038116, 0.3332251012325287, -0.2813113331794739, 0.34892919659614563, 0.3693646490573883, -0.3195889890193939, 0.013631023466587067, 0.5468193292617798, -0.21574193239212036, 0.2831246256828308, 0.19770029187202454, 0.2938274145126343, 0.13921532034873962, -0.13104575872421265, -0.3772866129875183, 0.12101529538631439, -0.003999095410108566, -0.10158848762512207, -0.09904457628726959, -0.3409671187400818, -0.11251480877399445, 0.17732161283493042, -0.3309965133666992, -0.19190408289432526, 0.20418745279312134, -0.05047079920768738, -0.45785272121429443, -0.3864656388759613, 0.08865061402320862, -0.0775410458445549, 0.30632132291793823, 0.03721565380692482, 0.3571668267250061, 0.2162110060453415, -0.13437208533287048, 0.10023713111877441, 0.5791750550270081, 0.12900836765766144, 0.12826213240623474, 0.3204135000705719, 0.22090104222297668, -0.16289348900318146, 0.016524849459528923, 0.012279734015464783, 0.1575542688369751, 0.120112843811512, -0.09919840097427368, 0.08560039103031158, 0.11032328009605408, -0.13724207878112793, 0.2281876504421234, 0.06725183129310608, 0.14381849765777588, -0.12290482223033905, 0.4894863963127136, -0.14649885892868042, 0.07096406072378159, -0.24759238958358765, 0.022625111043453217, -0.3075386583805084, 0.2617526650428772, 0.28106391429901123, -0.2151384949684143, 0.16082978248596191, -0.14716802537441254, 0.08992768079042435, -0.044711243361234665, 0.3532957434654236, 0.5815426111221313, -0.009843237698078156, -0.014345086179673672, -0.06639277935028076, -0.5804968476295471, 0.42641323804855347, -0.2836047112941742, 0.17149041593074799, 0.0004597203806042671, 0.16922040283679962, 0.024556122720241547, 0.18254117667675018, -0.30310624837875366, 0.33416661620140076, -0.14469291269779205, -0.1285569667816162, -0.36439213156700134, 0.11178913712501526, -0.2892953157424927, 0.14273135364055634, -0.09776449203491211, -0.009853444993495941, 0.3696795403957367, -0.3764725923538208, 0.02496996521949768, -0.12940318882465363, 0.004003360867500305, -0.4783973693847656, -0.0495423823595047, 0.2290341556072235, 0.23193028569221497, 0.013325035572052002, -0.11636605113744736, -0.06660506874322891, -0.26149943470954895, -0.24943958222866058, -0.070426806807518, 0.4824528992176056, -0.06028316542506218, -0.13186980783939362, 0.15805676579475403, -0.09324918687343597, 0.24041181802749634, 0.37705621123313904, 0.01446080207824707, -0.17392556369304657, -0.4429992437362671, 0.039975911378860474, -0.18740442395210266, -0.035226501524448395, -0.06088554486632347, 0.5569927096366882, -0.1725473701953888, -0.1392378807067871, 0.03910776972770691, -0.5822049379348755, 0.32994112372398376, -0.555907666683197, 0.165803462266922, -0.22324636578559875, 0.1830236315727234, 0.06886524707078934, -0.2526188790798187, -0.44506388902664185, 0.11042884737253189, 0.10244584828615189, -0.07687025517225266, -0.1648370623588562, -0.06648147106170654, -0.06413240730762482, -0.19866842031478882, -0.12431180477142334, 0.29405468702316284, 0.24359148740768433, -0.23611201345920563, 0.3124827742576599, -0.02279314585030079 ]
https://github.com/huggingface/datasets/issues/2391
Missing original answers in kilt-TriviaQA
That could be useful indeed! Feel free to open a PR on the dataset card if you already have some code that runs, otherwise we'll take care of it soon :)
I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
31
Missing original answers in kilt-TriviaQA I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :) That could be useful indeed! Feel free to open a PR on the dataset card if you already have some code that runs, otherwise we'll take care of it soon :)
[ 0.5064162611961365, -0.3483676314353943, -0.035132747143507004, 0.06285189837217331, -0.1213432103395462, -0.10113460570573807, 0.03444095700979233, 0.31334078311920166, 0.12680944800376892, 0.18385624885559082, 0.16401545703411102, 0.49276724457740784, 0.11229744553565979, 0.40526941418647766, -0.250984787940979, 0.3889527916908264, -0.0829046443104744, -0.0019129812717437744, -0.026675835251808167, -0.31870073080062866, -0.23221440613269806, 0.2161712497472763, -0.10545714199542999, -0.01274898648262024, -0.4187040627002716, 0.17896103858947754, -0.12258407473564148, 0.08864778280258179, 0.1447676420211792, -0.361823707818985, 0.41381707787513733, -0.029504116624593735, -0.05719851329922676, -0.05118682235479355, -0.00011639954027486965, -0.2085259109735489, 0.03552458435297012, -0.14102117717266083, -0.46764814853668213, -0.000773996114730835, -0.5212782025337219, 0.01645836792886257, -0.0597764253616333, -0.16130274534225464, -0.05748658627271652, 0.286445289850235, -0.0024459194391965866, -0.021005768328905106, 0.30944183468818665, 0.25426533818244934, 0.17705562710762024, -0.09324359893798828, -0.06348415464162827, -0.180021733045578, 0.035694170743227005, 0.24467730522155762, -0.16472290456295013, 0.15399929881095886, -0.14393705129623413, -0.050352878868579865, 0.027917660772800446, 0.3840644955635071, 0.18034350872039795, 0.10957889258861542, -0.21048012375831604, -0.13230609893798828, 0.12365955859422684, -0.2465534508228302, 0.40076568722724915, 0.2841532230377197, 0.23484447598457336, 0.12069900333881378, -0.3248022198677063, -0.19772550463676453, 0.09325467050075531, 0.28809231519699097, -0.010973595082759857, 0.12440335750579834, -0.13635066151618958, -0.2952623963356018, -0.2086619734764099, -0.025646990165114403, -0.06788306683301926, -0.007224425673484802, -0.16179825365543365, 0.2719794511795044, 0.1087464839220047, 0.04168901592493057, -0.11805342137813568, -0.06471031159162521, 0.20205508172512054, -0.007148683071136475, -0.2676001489162445, 0.23209120333194733, -0.4236132502555847, -0.2010638564825058, 0.14822837710380554, 0.04339068382978439, 0.2846265137195587, -0.29849696159362793, 0.057742372155189514, 0.1936495006084442, -0.28782469034194946, -0.11573784798383713, 0.2814105749130249, 0.2249249666929245, 0.501560389995575, -0.46626919507980347, -0.0686965212225914, 0.17938175797462463, -0.18484528362751007, -0.10559939593076706, -0.06977629661560059, 0.028526626527309418, -0.12665720283985138, -0.17905345559120178, 0.09185408800840378, -0.39604058861732483, -0.22030681371688843, 0.0945567637681961, -0.33545419573783875, 0.09287287294864655, -0.08022492378950119, 0.0914255827665329, -0.3331417739391327, 0.46119046211242676, -0.167501300573349, 0.211943581700325, -0.30964788794517517, -0.2978353500366211, -0.16363310813903809, -0.1647341400384903, 0.06613098084926605, 0.08750908821821213, 0.283436119556427, -0.2787397503852844, 0.4228966236114502, 0.2885059118270874, 0.09341289103031158, -0.10773344337940216, -0.058377087116241455, -0.19300438463687897, 0.010414928197860718, 0.126509428024292, 0.09968163073062897, 0.1406679004430771, 0.1707724928855896, -0.01019103080034256, 0.13283348083496094, 0.371559739112854, -0.47982537746429443, -0.39269113540649414, -0.1743844449520111, 0.2275594174861908, -0.06896550953388214, -0.15293310582637787, -0.098171167075634, 0.25568458437919617, -0.13503864407539368, -0.1339007318019867, -0.06446786969900131, -0.3494914770126343, -0.08679194748401642, -0.2528095245361328, 0.4844793975353241, 0.14431045949459076, -0.254411906003952, 0.22708848118782043, -0.20287853479385376, 0.039989735931158066, -0.22312122583389282, 0.1565091609954834, -0.039298973977565765, 0.3329616189002991, -0.16087400913238525, -0.04079695791006088, -0.1055169478058815, -0.4473591148853302, -0.21607066690921783, -0.364700585603714, 0.45454978942871094, 0.378732830286026, -0.24079230427742004, 0.15384279191493988, 0.07451663166284561, 0.11859338730573654, -0.034405842423439026, 0.09071552008390427, -0.12997938692569733, -0.10178425908088684, -0.3159194588661194, -0.34248289465904236, 0.16046422719955444, 0.2800523638725281, 0.09279640018939972, -0.04623957723379135, 0.21453657746315002, 0.11779824644327164, 0.20156851410865784, 0.10858599841594696, -0.23225142061710358, 0.29033517837524414, 0.40230870246887207, 0.18295817077159882, 0.15446634590625763, 0.1252216100692749, -0.2956432104110718, 0.16485682129859924, -0.5367692708969116, 0.0007428936660289764, 0.37561333179473877, -0.2755926847457886, -0.5543513298034668, 0.15629900991916656, -0.1554645597934723, -0.512069582939148, 0.1259925663471222, -0.1458703875541687, 0.2678467631340027, 0.0769699364900589, 0.03192288056015968, 0.2687181532382965, -0.290915310382843, -0.1769290715456009, -0.15929777920246124, 0.26407715678215027, -0.019436826929450035, -0.13745930790901184, -0.08753310143947601, 0.6361719369888306, 0.26969894766807556, 0.3276679217815399, -0.006210781633853912, 0.23204025626182556, 0.17520835995674133, 0.1612212359905243, 0.4861152172088623, -0.04015810787677765, 0.21189916133880615, -0.05899970978498459, -0.21368707716464996, 0.21254950761795044, -0.06427836418151855, -0.05619896203279495, -0.32044246792793274, 0.20872558653354645, 0.1455157995223999, 0.17261429131031036, -0.13789722323417664, 0.13279010355472565, -0.21519702672958374, -0.21840061247348785, 0.21377190947532654, 0.024188295006752014, -0.02266867086291313, -0.2658395767211914, -0.5356955528259277, -0.03125368803739548, -0.331892728805542, 0.34337228536605835, 0.24863950908184052, 0.2554905414581299, -0.004929445683956146, 0.06348910927772522, -0.14126905798912048, -0.08936935663223267, 0.46904516220092773, -0.21267308294773102, 0.1278374344110489, 0.16646502912044525, -0.12823843955993652, -0.061342909932136536, 0.018239278346300125, -0.0580953024327755, -0.05920513719320297, -0.020052924752235413, 0.2152729481458664, 0.2801453769207001, 0.6623123288154602, 0.14408206939697266, -0.10309173166751862, 0.47664424777030945, -0.051128409802913666, -0.0771930068731308, -0.054572489112615585, -0.17994384467601776, -0.4775119423866272, -0.13864603638648987, 0.06926969438791275, 0.07776566594839096, -0.13313326239585876, -0.4419928193092346, 0.4497724175453186, 0.3484993875026703, -0.11115424335002899, 0.19798187911510468, 0.0012842416763305664, 0.11983483284711838, -0.22226394712924957, 0.04963231086730957, -0.3405991494655609, -0.42281487584114075, -0.4497852027416229, 0.12236037850379944, -0.3684007525444031, -0.0903133898973465, 0.27180543541908264, -0.09712859988212585, -0.3501994013786316, -0.5005817413330078, -0.5326232314109802, 0.009932085871696472, 0.10494977235794067, 0.43077313899993896, -0.03469283878803253, 0.36757153272628784, -0.6405916810035706, -0.26775020360946655, 0.3842476010322571, -0.03500203415751457, -0.17979450523853302, 0.028036821633577347, 0.07557932287454605, 0.17945024371147156, -0.13997161388397217, -0.5063713192939758, -0.06883417069911957, -0.085363008081913, 0.2127438187599182, 0.23307742178440094, 0.17550408840179443, 0.29806771874427795, 0.053534720093011856, -0.15224024653434753, -0.059304412454366684, -0.0652662143111229, -0.47018808126449585, -0.14780300855636597, 0.30930134654045105, -0.16506332159042358, -0.3541279435157776, 0.14350949227809906, -0.08791680634021759, 0.27151599526405334, -0.06382769346237183, -0.598034679889679, -0.6656983494758606, 0.052820947021245956, 0.4026941657066345, -0.2056809961795807, -0.09435077011585236, 0.13417798280715942, -0.1361101120710373, -0.019553078338503838, -0.044832997024059296, -0.02506396174430847, 0.48793745040893555, 0.4266463816165924, 0.5124356746673584, 0.12805427610874176, 0.013632753863930702, 0.30421724915504456, 0.7666114568710327, 0.19360457360744476, 0.5757524371147156, 0.17755553126335144, -0.2589361369609833, 0.16251862049102783, -0.055680014193058014, -0.11491402983665466, 0.5098049640655518, -0.078285351395607, 0.1934158056974411, 0.28232041001319885, 0.09995252639055252, 0.5670225024223328, 0.04736974835395813, 0.36389005184173584, -0.3983496129512787, -0.41996249556541443, -0.24846412241458893, -0.13259029388427734, 0.3250521719455719, 0.22499433159828186, 0.16741561889648438, -0.0775938630104065, -0.40308263897895813, 0.29562318325042725, -0.10992416739463806, 0.17702966928482056, 0.015324336476624012, -0.2180572748184204, -0.24176129698753357, -0.10924755781888962, 0.19046998023986816, 0.07655014842748642, 0.1864430159330368, -0.06294772773981094, 0.1542728841304779, 0.23699785768985748, -0.055732712149620056, 0.7960612177848816, 0.08462590724229813, -0.1019815057516098, -0.18672354519367218, 0.06516733020544052, -0.2904495596885681, -0.3532455563545227, -0.039793387055397034, -0.34156686067581177, 0.017859870567917824, 0.23519934713840485, -0.24991649389266968, -0.014818022958934307, 0.10095923393964767, 0.11286220699548721, -0.26157596707344055, 0.17125187814235687, -0.0988674983382225, -0.38279783725738525, -0.25673097372055054, -0.09675952047109604, -0.09503716975450516, 0.2531142830848694, -0.0929270088672638, 0.023866165429353714, -0.012058524414896965, 0.16066965460777283, 0.048075102269649506, 0.24130307137966156, 0.24783015251159668, 0.08516862243413925, 0.11729979515075684, -0.015527132898569107, -0.190350741147995, 0.06684273481369019, 0.3774351179599762, 0.23023372888565063, 0.183760404586792, 0.07321266829967499, -0.20651237666606903, 0.39327046275138855, 0.2801284193992615, 0.0807281881570816, 0.20014700293540955, -0.11469900608062744, -0.01639368385076523, -0.2932940721511841, 0.17888516187667847, 0.17891722917556763, -0.2708422839641571, 0.06006315350532532, -0.010409492999315262, 0.22079843282699585, -0.1354476809501648, -0.09364237636327744, 0.06852716952562332, 0.22772803902626038, -0.03872910141944885, 0.06137591600418091, 0.2984565496444702, 0.862037181854248, 0.2510133683681488, 0.009186096489429474, 0.23571479320526123, -0.18890482187271118, 0.11071939766407013, -0.22185274958610535, 0.2238606959581375, -0.3860092759132385, -0.0747002586722374, 0.17033149302005768, 0.07380852103233337, -0.22335544228553772, 0.09233088791370392, 0.10111629962921143, 0.3213036358356476, 0.1428893357515335, 0.24709013104438782, -0.04294780641794205, 0.1438780277967453, -0.14224311709403992, -0.062182795256376266, 0.063084177672863, 0.20918840169906616, -0.19769598543643951, 0.37094932794570923, -0.18528008460998535, -0.10612161457538605, -0.05736042186617851, 0.10747091472148895, -0.168191060423851, 0.22970885038375854, -0.4546375274658203, 0.21383921802043915, 0.6036263108253479, -0.2568199038505554, -0.24943000078201294, 0.4904201924800873, 0.39047765731811523, 0.28370681405067444, -0.160892516374588, 0.25277844071388245, 0.3619237244129181, 0.2905689477920532, 0.15966619551181793, 0.30116552114486694, -0.044193483889102936, -0.20049452781677246, -0.274479478597641, 0.23915809392929077, -0.2606869339942932, 0.15327922999858856, -0.5899580717086792, -0.048435769975185394, 0.14947284758090973, -0.05348875746130943, -0.15846069157123566, -0.07261928915977478, 0.1473383754491806, -0.16024458408355713, 0.12087413668632507, -0.22764380276203156, 0.16105319559574127, 0.24698421359062195, -0.006584648042917252, -0.14571793377399445, -0.13511329889297485, 0.37757572531700134, 0.07432428002357483, 0.03562817722558975, 0.6234517097473145, -0.1352861374616623, -0.07629694044589996, -0.04367874190211296, 0.003999553620815277, -0.4881563186645508, -0.07858289033174515, 0.028373315930366516, 0.059843212366104126, -0.2092081606388092, 0.0018561857286840677, 0.6113401651382446, 0.09770587831735611, -0.05170463025569916, 0.11086831986904144, -0.4042429029941559, -0.023132767528295517, 0.5424612760543823, -0.10969483852386475, -0.011648189276456833, 0.08965019136667252, -0.01291942223906517, -0.08215334266424179, 0.08506663143634796, -0.3287646174430847, -0.11488084495067596, -0.3234308660030365, 0.29876115918159485, -0.28685057163238525, 0.057161394506692886, 0.1276664435863495, -0.1636982560157776, 0.05207943171262741, -0.07882322371006012, -0.012203510850667953, -0.23554185032844543, -0.38411471247673035, 0.0905057042837143, 0.250494122505188, 0.1839330494403839, -0.019866865128278732, -0.3337651491165161, -0.05735253915190697, 0.012757422402501106, 0.03250427916646004, 0.23872005939483643, -0.01325494796037674, 0.18521235883235931, -0.07369399070739746, 0.33115896582603455, -0.24951311945915222, 0.16073881089687347, 0.08075448125600815, 0.023689404129981995, 0.1116960197687149, -0.200422465801239, -0.1917160004377365, 0.06199079751968384, -0.023557627573609352, -0.013496629893779755, -0.06856748461723328, -0.22203266620635986, 0.10840392112731934, -0.08385607600212097, -0.04399259015917778, 0.052622247487306595, -0.08611910045146942, -0.12796714901924133, -0.21773584187030792, 0.028618210926651955, 0.2521513104438782, 0.17698898911476135, -0.2502528429031372, 0.262626588344574, -0.16075846552848816, -0.16089601814746857, -0.16673341393470764, 0.11706067621707916, 0.3037753999233246, -0.2903395891189575, 0.5298928022384644, 0.25492316484451294, -0.22797858715057373, -0.6408799290657043, 0.21012581884860992, 0.07193198800086975, -0.09144879877567291, -0.022144678980112076, 0.0974094346165657, -0.3312939405441284, -0.20360666513442993, 0.07682480663061142, 0.018105104565620422, 0.1511266529560089, 0.27976664900779724, -0.09194555878639221, 0.483486145734787, 0.11854925751686096, 0.042940061539411545, 0.051775261759757996, -0.12837360799312592, 0.23728862404823303, 0.09682869911193848, 0.3769882619380951, -0.14750562608242035, -0.3596101701259613, -0.14840859174728394, 0.15348422527313232, -0.2363642156124115, -0.04053787142038345, -0.09696239978075027, -0.16266998648643494, -0.1764698326587677, 0.12789912521839142, 0.015806637704372406, -0.2733187675476074, 0.021288253366947174, 0.25614815950393677, -0.36475467681884766, -0.36578550934791565, -0.21741065382957458, 0.22967329621315002, 0.4608757495880127, 0.1824726164340973, 0.41390883922576904, -0.039317503571510315, 0.19236978888511658, 0.22099898755550385, 0.35002031922340393, -0.07217489182949066, 0.1619298756122589, -0.19389382004737854, -0.07450871169567108, 0.12422685325145721, 0.0568593293428421, 0.28547701239585876, 0.20527240633964539, 0.38761886954307556, -0.1374138593673706, 0.25484707951545715, 0.1557369977235794, -0.17461304366588593, -0.16425983607769012, -0.025373008102178574, -0.09422977268695831, -0.2613268494606018, 0.22152751684188843, 0.23760835826396942, -0.037414684891700745, 0.2884162366390228, 0.052332814782857895, -0.09625357389450073, -0.1368665099143982, -0.3797750473022461, 0.3199315667152405, 0.09542843699455261, -0.015635866671800613, 0.0930592343211174, -0.14099252223968506, -0.07707089185714722, 0.31248724460601807, -0.12721744179725647, -0.22804932296276093, -0.1602305769920349, -0.4929159879684448, -0.025581486523151398, 0.22388020157814026, 0.05633608251810074, 0.2680434584617615, -0.0726587325334549, -0.1488179862499237, -0.004256337881088257, -0.10191836953163147, -0.5042884349822998, 0.29659703373908997, -0.04931133985519409, -0.25498294830322266, 0.06579970568418503, -0.029459163546562195, -0.20648306608200073, 0.011988341808319092, -0.034847110509872437, 0.238612562417984, 0.046057455241680145, -0.06785303354263306, 0.2699086666107178, -0.26494503021240234, 0.16799545288085938, -0.06200109422206879, -0.1175936907529831, 0.060035184025764465, 0.0688103437423706, 0.05793066322803497, -0.08771200478076935, 0.20346514880657196, -0.22161675989627838, 0.07337121665477753, -0.23311543464660645, -0.4398473799228668, 0.33524543046951294, 0.30590611696243286, -0.21004892885684967, 0.04816296696662903, 0.38955530524253845, 0.3441234827041626, 0.01081391703337431, -0.21742206811904907, 0.20597106218338013, 0.013693630695343018, 0.029510559514164925, 0.37685203552246094, 0.141666978597641, -0.01948990672826767, 0.2824307382106781, -0.2910395562648773, -0.2156050056219101, 0.3001191318035126, -0.2305026799440384, -0.1258995085954666, -0.2456984519958496, 0.39337825775146484, -0.24053633213043213, -0.17750133574008942, -0.5544111728668213, -0.32222872972488403, 0.3366212248802185, 0.003243967890739441, 0.4184281527996063, 0.011128289625048637, -0.18151140213012695, 0.036799389868974686, 0.011832263320684433, 0.09384214878082275, 0.08796602487564087, 0.030250435695052147, 0.17884932458400726, -0.024147529155015945 ]
https://github.com/huggingface/datasets/issues/2391
Missing original answers in kilt-TriviaQA
I can open a PR but there is 2 details to fix: - the name for the corresponding key (e.g. `original_answer`) - how to implement it: I’m not sure what happens when you map `lambda x: {'input': ...}` as it keeps the other keys (e.g. `output`) intact but here since we want to set a nested value (e.g. `x['output']['original_answer']`) I implemented it with a regular function (not lambda), see below ```py def add_original_answer(x, trivia_qa, triviaqa_map): i = triviaqa_map[x['id']] x['output']['original_answer'] = trivia_qa['validation'][i]['answer']['value'] return x ```
I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :)
84
Missing original answers in kilt-TriviaQA I previously opened an issue at https://github.com/facebookresearch/KILT/issues/42 but from the answer of @fabiopetroni it seems that the problem comes from HF-datasets ## Describe the bug The `answer` field in kilt-TriviaQA, e.g. `kilt_tasks['train_triviaqa'][0]['output']['answer']` contains a list of alternative answer which are accepted for the question. However it'd be nice to know the original answer to the question (the only fields in `output` are `'answer', 'meta', 'provenance'`) ## How to fix It can be fixed by retrieving the original answer from the original TriviaQA (e.g. `trivia_qa['train'][0]['answer']['value']`), perhaps at the same place as here where one retrieves the questions https://github.com/huggingface/datasets/blob/master/datasets/kilt_tasks/README.md#loading-the-kilt-knowledge-source-and-task-data cc @yjernite who previously answered to an issue about KILT and TriviaQA :) I can open a PR but there is 2 details to fix: - the name for the corresponding key (e.g. `original_answer`) - how to implement it: I’m not sure what happens when you map `lambda x: {'input': ...}` as it keeps the other keys (e.g. `output`) intact but here since we want to set a nested value (e.g. `x['output']['original_answer']`) I implemented it with a regular function (not lambda), see below ```py def add_original_answer(x, trivia_qa, triviaqa_map): i = triviaqa_map[x['id']] x['output']['original_answer'] = trivia_qa['validation'][i]['answer']['value'] return x ```
[ 0.5155785083770752, -0.35373979806900024, 0.03276095166802406, 0.039589494466781616, -0.10538661479949951, -0.07997751235961914, -0.029591161757707596, 0.2565177083015442, 0.08557279407978058, 0.13210247457027435, 0.04429127275943756, 0.5437099933624268, 0.19369812309741974, 0.42384883761405945, -0.18132027983665466, 0.32870587706565857, 0.06412538886070251, 0.10501666367053986, 0.1597798764705658, -0.29603925347328186, -0.31451717019081116, 0.2330387532711029, -0.11702459305524826, 0.16460755467414856, -0.1306227296590805, 0.01203802227973938, -0.20159250497817993, 0.2183440923690796, 0.24921588599681854, -0.3835996687412262, 0.30440959334373474, -0.0027337782084941864, -0.13357269763946533, -0.0683758482336998, -0.0001235717354575172, -0.24832691252231598, 0.010017044842243195, -0.2631392478942871, -0.4476828873157501, 0.01356053352355957, -0.5491886138916016, 0.0013699810951948166, -0.22675658762454987, -0.2673230767250061, 0.024685561656951904, 0.0820411890745163, -0.0023392457515001297, -0.18118834495544434, 0.2089126855134964, 0.15286576747894287, 0.059402644634246826, -0.14578060805797577, 0.15898115932941437, -0.0494777150452137, 0.0174916610121727, 0.07626026123762131, -0.14842677116394043, 0.16958758234977722, -0.13611525297164917, -0.02447446994483471, 0.13856172561645508, 0.2619100511074066, 0.10546386241912842, 0.01107871625572443, -0.15407663583755493, -0.02432316541671753, 0.10231655836105347, -0.24424049258232117, 0.41187596321105957, 0.18826264142990112, 0.12290995568037033, -0.20383375883102417, -0.43195056915283203, -0.2443811595439911, 0.10367104411125183, -0.018734943121671677, -0.017104722559452057, 0.0892714112997055, -0.21563099324703217, -0.2821563482284546, -0.0009045905899256468, -0.22651122510433197, -0.022012043744325638, 0.13207951188087463, -0.05507129058241844, 0.3479357957839966, 0.21658797562122345, 0.1588953286409378, -0.1401015818119049, -0.06326748430728912, 0.33298787474632263, -0.1604587286710739, -0.1640906035900116, 0.31526103615760803, -0.32405391335487366, -0.1331786811351776, 0.19005048274993896, 0.001953035593032837, 0.218977153301239, -0.4318748712539673, -0.008609200827777386, 0.1560155153274536, -0.2777458131313324, -0.026953749358654022, 0.20087161660194397, 0.21891841292381287, 0.5501317977905273, -0.29205167293548584, -0.07074597477912903, 0.2034401297569275, -0.1683301329612732, -0.1551695466041565, 0.018757566809654236, 0.13573521375656128, -0.03589528799057007, -0.00023226439952850342, 0.1213163435459137, -0.2009124755859375, -0.3044288754463196, 0.3365495204925537, -0.5707333087921143, 0.1031196266412735, -0.2290995717048645, 0.1706623136997223, -0.1619625985622406, 0.43705713748931885, -0.11992037296295166, 0.2700343132019043, -0.2904256284236908, -0.14022432267665863, -0.08878486603498459, -0.007845818996429443, 0.09488369524478912, 0.21937960386276245, 0.12993082404136658, -0.3555331528186798, 0.46276018023490906, 0.3198016881942749, 0.19345936179161072, -0.04612688720226288, -0.03131898120045662, -0.1281023919582367, 0.01695045828819275, 0.12400877475738525, 0.11926901340484619, 0.027367280796170235, 0.21304412186145782, -0.2978675961494446, 0.07438593357801437, 0.38168761134147644, -0.3751227855682373, -0.34079211950302124, -0.10229314863681793, 0.08083374798297882, -0.15571317076683044, -0.08526058495044708, -0.11028953641653061, 0.37844857573509216, -0.015219509601593018, -0.14954964816570282, -0.03935430198907852, -0.31069809198379517, -0.13294294476509094, -0.39057108759880066, 0.4902433454990387, 0.1699138879776001, -0.35412564873695374, 0.3064577281475067, -0.23604077100753784, 0.09285342693328857, -0.30664578080177307, -0.037056561559438705, -0.07630206644535065, 0.4838710129261017, -0.1619308888912201, 0.04906266927719116, -0.23149147629737854, -0.45751404762268066, -0.33838409185409546, -0.30095693469047546, 0.4830969572067261, 0.4284089207649231, -0.08704415708780289, 0.02142508514225483, 0.03199873864650726, 0.013146411627531052, 0.006103023886680603, -0.1040412038564682, -0.1317988783121109, -0.2140953689813614, -0.17623622715473175, -0.19444094598293304, -0.04963139444589615, 0.05664127692580223, 0.08293338119983673, 0.10371237248182297, 0.28350594639778137, 0.20772327482700348, 0.19058872759342194, 0.004529464989900589, -0.1778165102005005, 0.30823421478271484, 0.3007480800151825, 0.11624215543270111, 0.12037303298711777, 0.025978408753871918, -0.3274592459201813, 0.1223377212882042, -0.6618947982788086, -0.03086382895708084, 0.1369941532611847, -0.33318132162094116, -0.5493911504745483, 0.3154104948043823, -0.16417738795280457, -0.6335080862045288, 0.04826652258634567, -0.06749598681926727, 0.21006780862808228, -0.056967951357364655, -0.06619870662689209, 0.22120049595832825, -0.199456587433815, -0.18544834852218628, -0.24819473922252655, 0.16946007311344147, -0.026096390560269356, -0.0751713365316391, -0.19154447317123413, 0.5666313171386719, 0.3558180332183838, 0.35270845890045166, 0.003131688106805086, 0.31009602546691895, 0.2255420982837677, 0.05094360560178757, 0.46345770359039307, 0.07239887118339539, 0.22536519169807434, 0.08203072845935822, -0.12451908737421036, 0.29911768436431885, 0.08019918203353882, 0.016804948449134827, -0.35680684447288513, 0.42123329639434814, 0.22993849217891693, 0.08372616767883301, -0.14748503267765045, -0.05548713356256485, -0.2449638545513153, -0.2046157270669937, 0.18838679790496826, -0.04845517873764038, -0.1713009923696518, -0.2022145688533783, -0.5047813057899475, -0.1734984666109085, -0.3660632371902466, 0.4657450020313263, 0.17795632779598236, 0.0015858393162488937, 0.04227690398693085, -0.0474729910492897, -0.14077892899513245, -0.034896720200777054, 0.40811794996261597, -0.06633322685956955, 0.3968333601951599, 0.12436947971582413, -0.16096152365207672, -0.00584583543241024, -0.020860377699136734, 0.0360136553645134, 0.12781961262226105, -0.01643015444278717, 0.0743788555264473, 0.4520237147808075, 0.6341480016708374, 0.08206913620233536, -0.07467998564243317, 0.45353975892066956, -0.06034048646688461, 0.0384698249399662, -0.18192893266677856, -0.1642482429742813, -0.42144379019737244, 0.09347686916589737, 0.03677305951714516, 0.19537876546382904, 0.07223986834287643, -0.5293921828269958, 0.3032275438308716, 0.41728734970092773, -0.03951244428753853, 0.2344900518655777, 0.04522507265210152, 0.06016819179058075, -0.08578469604253769, -0.06925912946462631, -0.2800630033016205, -0.4454108774662018, -0.3175092041492462, 0.010132744908332825, -0.49489298462867737, -0.21194037795066833, 0.1414640098810196, 0.15087321400642395, -0.33602970838546753, -0.6223657131195068, -0.6542860269546509, -0.00594155490398407, -0.004556890577077866, 0.5484634637832642, 0.04284658282995224, 0.3344562351703644, -0.6263725161552429, -0.42827630043029785, 0.3463870584964752, 0.11272197961807251, -0.3175828456878662, 0.02246776595711708, -0.023642994463443756, 0.10381072014570236, 0.01792086660861969, -0.5704705715179443, -0.048938632011413574, -0.09771251678466797, 0.18170779943466187, 0.06740722060203552, 0.25842422246932983, 0.10287783294916153, 0.04570615664124489, -0.24386291205883026, 0.11919669806957245, -0.19697140157222748, -0.5478496551513672, 0.08367379009723663, 0.3846220374107361, -0.24778951704502106, -0.28647783398628235, -0.07009688019752502, -0.3900150656700134, 0.2580221891403198, -0.09270178526639938, -0.4573441743850708, -0.64681476354599, 0.1500915288925171, 0.5276091694831848, -0.13406340777873993, 0.08616182953119278, 0.15640318393707275, 0.024238133803009987, 0.07434777915477753, -0.19856113195419312, -0.1410766839981079, 0.4161970913410187, 0.3931497633457184, 0.597463846206665, 0.31264013051986694, 0.07237859070301056, 0.3485160171985626, 0.7757425308227539, 0.2300550639629364, 0.5763299465179443, 0.17803439497947693, -0.31863895058631897, 0.12776270508766174, -0.03498273342847824, -0.21928302943706512, 0.2881551682949066, -0.10394397377967834, 0.2534278631210327, 0.20454490184783936, 0.028541162610054016, 0.37371179461479187, 0.10928134620189667, 0.26374396681785583, -0.3957769274711609, -0.4265754818916321, -0.24012134969234467, -0.16530071198940277, 0.42564359307289124, 0.14692112803459167, 0.17870086431503296, -0.23626889288425446, -0.30382296442985535, 0.2833181619644165, -0.2621349096298218, 0.15196499228477478, 0.042962297797203064, -0.1555483043193817, -0.2987041175365448, -0.21145117282867432, 0.3432160019874573, 0.1276804357767105, 0.17069321870803833, 0.04840221628546715, 0.16961058974266052, 0.2524096369743347, -0.12080199271440506, 0.8238661289215088, -0.0635681226849556, -0.131423681974411, -0.11528579890727997, -0.03951470926403999, -0.2656165361404419, -0.1850190907716751, 0.0102546326816082, -0.1166948452591896, 0.024125102907419205, 0.3816303610801697, -0.3781967759132385, 0.08801578730344772, -0.016408994793891907, 0.026828356087207794, -0.39051154255867004, 0.0672973170876503, -0.11104454845190048, -0.4707728326320648, -0.4302366375923157, -0.08626573532819748, -0.141679048538208, 0.4008595645427704, 0.15940958261489868, 0.2181689292192459, -0.027657268568873405, 0.2795984745025635, 0.214121013879776, 0.2251778244972229, 0.2607109248638153, 0.15954206883907318, 0.061312150210142136, -0.07618218660354614, -0.2943114638328552, 0.01922287419438362, 0.5156419277191162, 0.12718737125396729, 0.23659686744213104, 0.017917342483997345, -0.12568645179271698, 0.30589210987091064, 0.35332581400871277, 0.041207339614629745, 0.22494232654571533, -0.19229528307914734, 0.015325203537940979, -0.24255043268203735, 0.059174295514822006, 0.11553598940372467, -0.24367736279964447, 0.0901331901550293, -0.17249618470668793, 0.16822436451911926, -0.2947556674480438, -0.35213136672973633, 0.08688800036907196, 0.2420429140329361, -0.10139293968677521, 0.30365943908691406, 0.3035932183265686, 0.9488316178321838, 0.335324764251709, 0.11356179416179657, 0.36088964343070984, -0.20754963159561157, 0.02588723413646221, -0.27347010374069214, 0.15196798741817474, -0.37402743101119995, -0.0625600591301918, 0.05723857134580612, 0.05836303159594536, -0.2141703963279724, 0.16852526366710663, 0.052463967353105545, 0.4384441077709198, 0.24372415244579315, 0.18488240242004395, 0.0702228993177414, 0.14095211029052734, -0.0924055427312851, -0.07478407025337219, 0.0029513146728277206, 0.0531415194272995, -0.11547352373600006, 0.34010618925094604, -0.09087494015693665, -0.16923269629478455, -0.22103291749954224, 0.03445445001125336, -0.2264450341463089, 0.1442910134792328, -0.5238336324691772, 0.313312292098999, 0.4568425714969635, -0.27576744556427, -0.2541203796863556, 0.7030186653137207, 0.43009674549102783, 0.2325907051563263, -0.07265636324882507, 0.2624039947986603, 0.5008454322814941, 0.22846336662769318, 0.2381431758403778, 0.21718350052833557, -0.018211452290415764, -0.08430945873260498, -0.29409095644950867, 0.3372740149497986, -0.2506555914878845, 0.1089555025100708, -0.6670826077461243, -0.057519733905792236, -0.04276355355978012, -0.14263875782489777, -0.18508808314800262, -0.03360538184642792, 0.14588317275047302, -0.21897836029529572, -0.009564319625496864, -0.25360673666000366, 0.09221822768449783, 0.2272178828716278, -0.24083168804645538, -0.10842488706111908, -0.06685473024845123, 0.44786638021469116, 0.10546746850013733, 0.15713681280612946, 0.6415706872940063, -0.20986084640026093, -0.03648289293050766, 0.09304755181074142, 0.06466453522443771, -0.4503229260444641, -0.02963561937212944, 0.12327904254198074, 0.02148907259106636, -0.3334919512271881, -0.10612016171216965, 0.42819100618362427, 0.15372911095619202, 0.0174202062189579, 0.10434667766094208, -0.43972766399383545, -0.14457125961780548, 0.4621884226799011, -0.11762085556983948, 0.0034600459039211273, 0.21420899033546448, 0.008286646567285061, -0.20109599828720093, 0.24368414282798767, -0.23195882141590118, -0.17018452286720276, -0.18654826283454895, 0.16144266724586487, 0.02754632942378521, 0.12245785444974899, 0.2052399218082428, -0.08905799686908722, 0.016014723107218742, -0.13053706288337708, 0.044464681297540665, -0.11655375361442566, -0.45276325941085815, 0.16144044697284698, 0.11642337590456009, 0.2653879225254059, -0.0771382600069046, -0.3488805294036865, 0.06513623893260956, -0.061104916036129, 0.12415727972984314, 0.3242110311985016, 0.03994739055633545, 0.34240227937698364, 0.016631420701742172, 0.2856265902519226, -0.15702694654464722, -0.0011673606932163239, 0.09977948665618896, 0.1727505922317505, 0.20727144181728363, -0.028578460216522217, -0.21263904869556427, 0.04609978199005127, 0.060051329433918, 0.038118038326501846, -0.04444102942943573, -0.21180462837219238, 0.3314491808414459, 0.16556042432785034, -0.11965003609657288, -0.0943991094827652, -0.030867017805576324, -0.1426914781332016, -0.2555018961429596, 0.12207183241844177, 0.0399627648293972, 0.03147558867931366, -0.3359084129333496, 0.17707960307598114, -0.04400234296917915, -0.2765427827835083, -0.11218340694904327, 0.25420939922332764, 0.34688249230384827, -0.2869991064071655, 0.39375877380371094, 0.10902740806341171, -0.11697711795568466, -0.6292843818664551, -0.0057365382090210915, 0.24320784211158752, 0.0002799704670906067, -0.01836259290575981, 0.28236451745033264, -0.16129887104034424, -0.1265541911125183, 0.22004495561122894, 0.10014742612838745, 0.0030181091278791428, 0.30947554111480713, -0.07660983502864838, 0.49546220898628235, 0.15014971792697906, 0.1288388967514038, 0.009294986724853516, -0.0002636834979057312, 0.19242003560066223, 0.23085658252239227, 0.2963755130767822, 0.13186079263687134, -0.3133868873119354, 0.06840325891971588, 0.32146692276000977, -0.17370671033859253, -0.29780733585357666, -0.16786949336528778, -0.16063939034938812, -0.19572798907756805, 0.013650663197040558, 0.07727977633476257, -0.407787024974823, 0.16816414892673492, 0.1826028674840927, -0.27927327156066895, -0.2892882227897644, -0.17586290836334229, 0.21516278386116028, 0.506921112537384, 0.0770091861486435, 0.36927530169487, 0.10246440768241882, 0.14286257326602936, 0.13201338052749634, 0.27464559674263, 0.067481130361557, 0.0623282790184021, -0.38423237204551697, 0.13076815009117126, 0.20498907566070557, -0.02768918313086033, 0.356719434261322, 0.13309091329574585, 0.3253234624862671, 0.043426916003227234, 0.33251044154167175, 0.01280859112739563, -0.10458531975746155, -0.19911782443523407, 0.14048513770103455, -0.05530840530991554, -0.17451994121074677, 0.26986634731292725, 0.28817102313041687, -0.04934787377715111, 0.42045220732688904, 0.14918646216392517, -0.13163724541664124, -0.2629207968711853, -0.2125602662563324, 0.2651273012161255, 0.22611555457115173, 0.0008915446233004332, 0.036984726786613464, -0.02916102111339569, -0.19426566362380981, 0.3717496693134308, -0.16830939054489136, -0.29886946082115173, 0.0201072096824646, -0.4621518552303314, -0.06882397085428238, 0.2794617712497711, -0.2333631068468094, 0.2594427466392517, -0.10440833866596222, 0.08048560470342636, -0.014782730489969254, -0.223164901137352, -0.6184477806091309, 0.1799287348985672, 0.17110131680965424, -0.16298556327819824, -0.01951431855559349, 0.08123423159122467, -0.10837043821811676, 0.027061499655246735, -0.07250496745109558, 0.08821626007556915, 0.2514553368091583, -0.11194712668657303, 0.24208185076713562, -0.30794352293014526, 0.20207199454307556, -0.2945336699485779, -0.1013779491186142, 0.1801871955394745, 0.05554581061005592, -0.13797803223133087, -0.05389545112848282, 0.3241073191165924, -0.026142055168747902, -0.09841015934944153, -0.19210493564605713, -0.3853358328342438, 0.35871076583862305, 0.2550293803215027, -0.4032892882823944, 0.06649219244718552, 0.2871655225753784, 0.30470937490463257, -0.15479321777820587, -0.2566086947917938, 0.41106361150741577, -0.09028579294681549, 0.06152169778943062, 0.2689646780490875, 0.2679351270198822, -0.08875559270381927, 0.5461471080780029, -0.16596192121505737, -0.3539319932460785, 0.4041141867637634, -0.32297784090042114, -0.0972539633512497, 0.005163523368537426, 0.31677377223968506, -0.3020550608634949, -0.07450304925441742, -0.4578881859779358, -0.23537075519561768, 0.3377517759799957, -0.08853568881750107, 0.13654333353042603, 0.02597743272781372, -0.3285069465637207, -0.0027851909399032593, -0.003505755215883255, 0.11008167266845703, 0.18736684322357178, -0.01893612928688526, 0.06264789402484894, -0.11444595456123352 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Looks like there are multiple issues regarding this (#2386, #2322) and it's a WIP #2329. Currently these datasets are being loaded in-memory which is causing this issue. Quoting @mariosasko here for a quick fix: > set `keep_in_memory` to `False` when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them)
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
69
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Looks like there are multiple issues regarding this (#2386, #2322) and it's a WIP #2329. Currently these datasets are being loaded in-memory which is causing this issue. Quoting @mariosasko here for a quick fix: > set `keep_in_memory` to `False` when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them)
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Hi ! Since `datasets` 1.6.0 we no longer keep small datasets (<250MB) on disk and load them in RAM instead by default. This makes data processing and iterating on data faster. However datasets in RAM currently have no way to reload previous results from the cache (since nothing is written on disk). We are working on making the caching work for datasets in RAM. Until then, I'd recommend passing `keep_in_memory=False` to the calls to `load_dataset` like here: https://github.com/huggingface/transformers/blob/223943872e8c9c3fc11db3c6e93da07f5177423f/examples/pytorch/language-modeling/run_clm.py#L233 This way you say explicitly that you want your dataset to stay on the disk, and it will be able to recover previously computed results from the cache.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
106
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Hi ! Since `datasets` 1.6.0 we no longer keep small datasets (<250MB) on disk and load them in RAM instead by default. This makes data processing and iterating on data faster. However datasets in RAM currently have no way to reload previous results from the cache (since nothing is written on disk). We are working on making the caching work for datasets in RAM. Until then, I'd recommend passing `keep_in_memory=False` to the calls to `load_dataset` like here: https://github.com/huggingface/transformers/blob/223943872e8c9c3fc11db3c6e93da07f5177423f/examples/pytorch/language-modeling/run_clm.py#L233 This way you say explicitly that you want your dataset to stay on the disk, and it will be able to recover previously computed results from the cache.
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
OK, It doesn't look like we can use the proposed workaround - see https://github.com/huggingface/transformers/issues/11801 Could you please add an env var for us to be able to turn off this unwanted in our situation behavior? It is really problematic for dev work, when one needs to restart the training very often and needs a quick startup time. Manual editing of standard scripts is not a practical option when one uses examples. This could also be a problem for tests, which will be slower because of lack of cache, albeit usually we use tiny datasets there. I think we want caching for tests. Thank you.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
104
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq OK, It doesn't look like we can use the proposed workaround - see https://github.com/huggingface/transformers/issues/11801 Could you please add an env var for us to be able to turn off this unwanted in our situation behavior? It is really problematic for dev work, when one needs to restart the training very often and needs a quick startup time. Manual editing of standard scripts is not a practical option when one uses examples. This could also be a problem for tests, which will be slower because of lack of cache, albeit usually we use tiny datasets there. I think we want caching for tests. Thank you.
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Hi @stas00, You are right: an env variable is needed to turn off this behavior. I am adding it. For the moment there is a config parameter to turn off this behavior: `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None` You can find this info in the docs: - in the docstring of the parameter `keep_in_memory` of the function [`load_datasets`](https://huggingface.co/docs/datasets/package_reference/loading_methods.html#datasets.load_dataset): - in a Note in the docs about [Loading a Dataset](https://huggingface.co/docs/datasets/loading_datasets.html#from-the-huggingface-hub) > The default in 🤗Datasets is to memory-map the dataset on drive if its size is larger than datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES (default 250 MiB); otherwise, the dataset is copied in-memory. This behavior can be disabled by setting datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None, and in this case the dataset is not loaded in memory.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
115
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Hi @stas00, You are right: an env variable is needed to turn off this behavior. I am adding it. For the moment there is a config parameter to turn off this behavior: `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None` You can find this info in the docs: - in the docstring of the parameter `keep_in_memory` of the function [`load_datasets`](https://huggingface.co/docs/datasets/package_reference/loading_methods.html#datasets.load_dataset): - in a Note in the docs about [Loading a Dataset](https://huggingface.co/docs/datasets/loading_datasets.html#from-the-huggingface-hub) > The default in 🤗Datasets is to memory-map the dataset on drive if its size is larger than datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES (default 250 MiB); otherwise, the dataset is copied in-memory. This behavior can be disabled by setting datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES = None, and in this case the dataset is not loaded in memory.
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Yes, but this still requires one to edit the standard example scripts, so if I'm doing that already I just as well can add `keep_in_memory=False`. May be the low hanging fruit is to add `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` env var to match the config, and if the user sets it to 0, then it'll be the same as `keep_in_memory=False` or `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0`?
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
58
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Yes, but this still requires one to edit the standard example scripts, so if I'm doing that already I just as well can add `keep_in_memory=False`. May be the low hanging fruit is to add `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` env var to match the config, and if the user sets it to 0, then it'll be the same as `keep_in_memory=False` or `datasets.config.MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0`?
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
@stas00, however, for the moment, setting the value to `0` is equivalent to the opposite, i.e. `keep_in_memory=True`. This means the max size until which I load in memory is 0 bytes. Tell me if this is logical/convenient, or I should change it.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
42
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq @stas00, however, for the moment, setting the value to `0` is equivalent to the opposite, i.e. `keep_in_memory=True`. This means the max size until which I load in memory is 0 bytes. Tell me if this is logical/convenient, or I should change it.
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
In my PR, to turn off current default bahavior, you should set env variable to one of: `{"", "OFF", "NO", "FALSE"}`. For example: ``` MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES= ```
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
26
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq In my PR, to turn off current default bahavior, you should set env variable to one of: `{"", "OFF", "NO", "FALSE"}`. For example: ``` MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES= ```
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
IMHO, this behaviour is not very intuitive, as 0 is a normal quantity of bytes. So `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` to me reads as don't cache ever. Also "SIZE_IN_BYTES" that can take one of `{"", "OFF", "NO", "FALSE"}` is also quite odd. I think supporting a very simple `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` that can accept any numerical value to match the name of the variable, requires minimal logic and is very straightforward. So if you could adjust this logic - then `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` is all that's needed to not do in-memory datasets. Does it make sense?
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
89
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq IMHO, this behaviour is not very intuitive, as 0 is a normal quantity of bytes. So `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` to me reads as don't cache ever. Also "SIZE_IN_BYTES" that can take one of `{"", "OFF", "NO", "FALSE"}` is also quite odd. I think supporting a very simple `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES` that can accept any numerical value to match the name of the variable, requires minimal logic and is very straightforward. So if you could adjust this logic - then `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=0` is all that's needed to not do in-memory datasets. Does it make sense?
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
I understand your point @stas00, as I am not very convinced with current implementation. My concern is: which numerical value should then pass a user who wants `keep_in_memory=True` by default, independently of dataset size? Currently it is `0` for this case.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
41
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq I understand your point @stas00, as I am not very convinced with current implementation. My concern is: which numerical value should then pass a user who wants `keep_in_memory=True` by default, independently of dataset size? Currently it is `0` for this case.
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
That's a good question, and again the normal bytes can be used for that: ``` MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=1e12 # (~2**40) ``` Since it's unlikely that anybody will have more than 1TB RAM. It's also silly that it uses BYTES and not MBYTES - that level of refinement doesn't seem to be of a practical use in this context. Not sure when it was added and if there are back-compat issues here, but perhaps it could be renamed `MAX_IN_MEMORY_DATASET_SIZE` and support 1M, 1G, 1T, etc. But scientific notation is quite intuitive too, as each 000 zeros is the next M, G, T multiplier. Minus the discrepancy of 1024 vs 1000, which adds up. And it is easy to write down `1e12`, as compared to `1099511627776` (2**40). (`1.1e12` is more exact).
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
127
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq That's a good question, and again the normal bytes can be used for that: ``` MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=1e12 # (~2**40) ``` Since it's unlikely that anybody will have more than 1TB RAM. It's also silly that it uses BYTES and not MBYTES - that level of refinement doesn't seem to be of a practical use in this context. Not sure when it was added and if there are back-compat issues here, but perhaps it could be renamed `MAX_IN_MEMORY_DATASET_SIZE` and support 1M, 1G, 1T, etc. But scientific notation is quite intuitive too, as each 000 zeros is the next M, G, T multiplier. Minus the discrepancy of 1024 vs 1000, which adds up. And it is easy to write down `1e12`, as compared to `1099511627776` (2**40). (`1.1e12` is more exact).
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2387
datasets 1.6 ignores cache
Great! Thanks, @stas00. I am implementing your suggestion to turn off default value when set to `0`. For the other suggestion (allowing different metric prefixes), I will discuss with @lhoestq to agree on its implementation.
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq
35
datasets 1.6 ignores cache Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612 Quoting @VictorSanh: > > I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335): > > > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}` > > while the same command with the latest version of datasets (actually starting at `1.6.0`) gives: > > `{'train': [], 'validation': []}` > I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used. to reproduce: ``` USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \ --model_name_or_path gpt2 \ --dataset_name "stas/openwebtext-10k" \ --output_dir output_dir \ --overwrite_output_dir \ --do_train \ --do_eval \ --max_train_samples 1000 \ --max_eval_samples 200 \ --per_device_train_batch_size 4 \ --per_device_eval_batch_size 4 \ --num_train_epochs 1 \ --warmup_steps 8 \ --block_size 64 \ --fp16 \ --report_to none ``` the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run. @lhoestq Great! Thanks, @stas00. I am implementing your suggestion to turn off default value when set to `0`. For the other suggestion (allowing different metric prefixes), I will discuss with @lhoestq to agree on its implementation.
[ -0.21584869921207428, 0.02031119167804718, 0.04224259778857231, 0.1404154747724533, 0.1821737438440323, 0.04623045027256012, 0.1409808248281479, 0.3139573335647583, 0.055158939212560654, -0.06445346772670746, -0.23593854904174805, -0.057946931570768356, -0.024700477719306946, -0.3315778970718384, -0.10819143056869507, 0.01980491355061531, 0.21446442604064941, 0.023075751960277557, -0.1678415685892105, -0.04096922278404236, -0.1443578004837036, 0.26739510893821716, -0.1282912641763687, -0.22863651812076569, -0.6212521195411682, 0.15365825593471527, -0.05398726463317871, -0.05782829225063324, -0.1436339020729065, -0.3942040503025055, 0.36811965703964233, 0.2826855182647705, 0.11369533836841583, 0.4599286913871765, -0.00012042996968375519, 0.15956903994083405, 0.20316864550113678, 0.021155385300517082, -0.4104936718940735, -0.0573558509349823, 0.03545534610748291, -0.08395908027887344, 0.021498961374163628, 0.1640302836894989, -0.2790544331073761, -0.030637741088867188, 0.19111771881580353, -0.5746433734893799, 0.45242029428482056, 0.34329652786254883, 0.1602974683046341, 0.5254050493240356, -0.1487576812505722, -0.037879642099142075, -0.060833729803562164, -0.030115574598312378, -0.3328547775745392, 0.09263724088668823, 0.13140395283699036, 0.0842178463935852, -0.2770286500453949, 0.35248836874961853, 0.09798534214496613, -0.021820779889822006, 0.161335751414299, 0.010781487450003624, -0.1585702896118164, 0.02028444968163967, 0.2987554371356964, 0.10706190019845963, 0.37876397371292114, -0.2141120433807373, -0.5825320482254028, -0.33645185828208923, -0.35387110710144043, 0.006452770903706551, 0.34401068091392517, -0.06550741195678711, 0.1379140466451645, 0.3956795632839203, -0.43314889073371887, -0.06844688206911087, 0.06999421119689941, -0.004433669149875641, 0.061145663261413574, 0.2066863775253296, -0.11624635756015778, -0.0994940921664238, 0.12310256063938141, 0.14990916848182678, 0.1937524527311325, -0.163527712225914, -0.10912534594535828, 0.29927849769592285, -0.35598886013031006, -0.01081288605928421, 0.16669872403144836, 0.03966017812490463, 0.011087417602539062, 0.11882364749908447, 0.06401324272155762, 0.13640497624874115, 0.09252917021512985, -0.2549796402454376, -0.0728781670331955, 0.583361804485321, 0.19471105933189392, 0.2663056254386902, 0.018417686223983765, 0.0475955531001091, -0.15672969818115234, -0.09623362869024277, -0.04480026662349701, -0.21941091120243073, 0.22287429869174957, -0.0724635124206543, 0.16002023220062256, -0.1779891401529312, -0.008368562906980515, 0.16883139312267303, 0.05226125568151474, -0.10712002962827682, 0.14252011477947235, 0.2979217767715454, -0.19977428019046783, 0.2688969075679779, -0.07179103046655655, -0.16609157621860504, -0.28279510140419006, 0.04258996248245239, -0.363668292760849, -0.06255657970905304, -0.2846514880657196, 0.2555698752403259, 0.2676331698894501, -0.37241849303245544, 0.43671920895576477, 0.1324850469827652, 0.22684547305107117, 0.018266931176185608, 0.03582243621349335, -0.11249922215938568, 0.3517656922340393, 0.14983655512332916, -0.4831210672855377, 0.41046443581581116, 0.09792706370353699, 0.15432077646255493, -0.2801339328289032, -0.03450425714254379, -0.16246670484542847, -0.2589816153049469, 0.1788681298494339, 0.09670697152614594, -0.475932240486145, -0.2851252257823944, 0.12386252731084824, 0.24923129379749298, 0.35305657982826233, -0.18263961374759674, 0.05768739432096481, -0.054648034274578094, -0.3108604848384857, -0.04241909831762314, 0.20721732079982758, 0.6110776662826538, -0.09871870279312134, -0.27019014954566956, 0.3160690367221832, 0.0783182829618454, 0.10782762616872787, 0.2469792515039444, -0.11518076062202454, -0.20416241884231567, -0.09440940618515015, -0.045154158025979996, 0.21275246143341064, -0.2799158990383148, -0.6564034223556519, 0.0895092561841011, 0.03162591904401779, 0.27868616580963135, 0.06271933764219284, -0.030414577573537827, 0.11691651493310928, -0.21881325542926788, -0.1698896735906601, 0.17601892352104187, 0.08739577978849411, 0.11032373458147049, -0.48861002922058105, -0.3197345733642578, 0.004968367516994476, 0.014940310269594193, 0.16074040532112122, 0.14257414638996124, -0.20669102668762207, 0.1983785182237625, 0.06475843489170074, 0.10646727681159973, 0.2382349967956543, 0.417674720287323, -0.05778501555323601, -0.25080406665802, 0.23935116827487946, -0.20668449997901917, -0.46799004077911377, 0.38137468695640564, -0.05820196866989136, 0.15043626725673676, 0.051388971507549286, -0.09193508327007294, -0.3147418200969696, -0.19004596769809723, -0.3224802613258362, -0.41298621892929077, 0.029199786484241486, 0.08356135338544846, 0.4664492607116699, -0.06278865039348602, -0.2708909511566162, 0.4161103069782257, 0.17768435180187225, 0.20261940360069275, -0.19791485369205475, -0.03670617192983627, -0.07150009274482727, -0.12923549115657806, -0.3720753788948059, -0.054815731942653656, 0.15075106918811798, -0.2703869938850403, -0.16460689902305603, 0.43573737144470215, -0.05497449263930321, 0.12648485600948334, -0.016379594802856445, 0.2787235975265503, 0.13101521134376526, 0.20948362350463867, 0.1261981725692749, 0.1861448585987091, -0.17185266315937042, -0.020707305520772934, -0.04009082913398743, 0.37440866231918335, 0.19887100160121918, 0.21210037171840668, 0.1096508800983429, -0.05789663642644882, -0.052380505949258804, 0.02003660425543785, -0.02719508856534958, -0.3291665017604828, 0.25928038358688354, -0.09703272581100464, 0.6289586424827576, 0.1915283352136612, 0.0682520717382431, 0.273796409368515, 0.734914243221283, 0.1994314342737198, -0.2323364019393921, 0.1495772898197174, -0.2541773319244385, -0.3552420139312744, 0.16007453203201294, 0.28084081411361694, 0.3655436635017395, 0.09676254540681839, 0.40164920687675476, 0.12173192948102951, -0.05928131937980652, -0.09258162975311279, 0.1318967342376709, -0.10376842319965363, 0.03655689209699631, -0.07430749386548996, 0.05655568093061447, 0.26312944293022156, -0.32602232694625854, 0.13602732121944427, 0.011720705777406693, 0.10843525826931, -0.11941911280155182, 0.2409166842699051, -0.3367224931716919, 0.2784651517868042, -0.1354546993970871, -0.14320112764835358, -0.37870675325393677, -0.20354168117046356, -0.04893723130226135, 0.11523666977882385, -0.0025187432765960693, 0.32485437393188477, -0.2567088007926941, 0.17130351066589355, -0.03612913936376572, -0.3038974702358246, -0.49683046340942383, -0.1464487910270691, -0.2653336822986603, -0.05227618291974068, -0.0077604930847883224, -0.37814781069755554, -0.041796810925006866, -0.17041608691215515, -0.24277497828006744, -0.19787417352199554, -0.329762727022171, 0.15431925654411316, -0.07255305349826813, -0.02892344258725643, -0.07184678316116333, 0.05689382180571556, -0.13047702610492706, 0.09072928875684738, 0.17321784794330597, -0.3506855070590973, -0.16936936974525452, -0.036920614540576935, 0.08410632610321045, 0.14310447871685028, -0.21307188272476196, -0.21049121022224426, 0.007705811411142349, -0.27911531925201416, 0.13159243762493134, -0.16913755238056183, -0.036310143768787384, 0.5730291604995728, 0.01804811879992485, 0.049354344606399536, -0.15419872105121613, 0.19358088076114655, -0.28173601627349854, -0.5460476279258728, 0.4480651319026947, -0.006834610365331173, -0.3691212236881256, -0.1439012587070465, 0.01376306265592575, 0.1789385825395584, 0.3921630382537842, -0.18156325817108154, -0.24659323692321777, -0.39608871936798096, 0.0011065900325775146, 0.21099214255809784, 0.06586351990699768, 0.6789281368255615, -0.012011956423521042, -0.05644720047712326, -0.21564078330993652, -0.11547994613647461, 0.14036978781223297, -0.17449048161506653, 0.3218705952167511, -0.2863912880420685, 0.11334920674562454, 0.26143643260002136, 0.6822912096977234, 0.21176457405090332, -0.054289449006319046, 0.22974412143230438, 0.22260726988315582, 0.4835839569568634, -0.37018054723739624, -0.2817360758781433, -0.030361194163560867, -0.22764486074447632, 0.04231830686330795, 0.10513631999492645, 0.285407692193985, 0.13458947837352753, -0.17571380734443665, 0.08382797241210938, 0.07810614258050919, -0.28135547041893005, 0.039714425802230835, -0.34403643012046814, 0.332294225692749, 0.4198824465274811, 0.35268929600715637, -0.29395735263824463, -0.06161009520292282, 0.08503147959709167, 0.16777628660202026, 0.24163243174552917, 0.1613156497478485, -0.13083946704864502, 0.6268688440322876, -0.7827768325805664, 0.21769513189792633, -0.021079862490296364, 0.271577924489975, 0.11716845631599426, -0.2589389681816101, 0.0737985149025917, -0.07937932759523392, 0.46842479705810547, 0.034529849886894226, -0.09156249463558197, 0.08982975780963898, -0.2584148049354553, -0.3263623118400574, -0.06760592013597488, 0.05066526308655739, 0.06552683562040329, 0.5230591297149658, 0.3059900104999542, -0.26127734780311584, -0.5721395015716553, -0.002523636445403099, 0.02656349167227745, 0.0670708417892456, -0.0700506791472435, -0.30954256653785706, -0.010732121765613556, -0.05101044476032257, -0.04545516520738602, 0.21166905760765076, 0.05121811106801033, 0.009772651828825474, 0.20603488385677338, -0.23570917546749115, -0.07497090101242065, 0.11236248910427094, 0.08760827779769897, 0.24824824929237366, -0.13537511229515076, 0.2141055017709732, 0.35167086124420166, 0.0993550568819046, -0.13072481751441956, 0.3770354986190796, -0.15819208323955536, -0.5206757187843323, -0.03820875659584999, 0.20253844559192657, -0.1003958061337471, 0.3610544800758362, -0.1493234783411026, -0.04942462593317032, 0.11878664046525955, 0.030899789184331894, -0.0949639156460762, 0.345708966255188, 0.26626497507095337, 0.15490616858005524, -0.320754736661911, -0.4492097496986389, 0.42681267857551575, 0.08613906800746918, -0.030366331338882446, 0.30225807428359985, 0.33201780915260315, -0.18875513970851898, 0.13813960552215576, -0.03812330216169357, 0.7185453176498413, 0.1204468309879303, 0.3983491361141205, 0.18047890067100525, -0.10226549953222275, 0.41653597354888916, 0.19652719795703888, 0.2679460048675537, -0.15170446038246155, -0.36949360370635986, 0.04004759341478348, -0.0396893285214901, 0.07798689603805542, 0.1464395374059677, -0.07728931307792664, 0.3025544285774231, 0.1651712954044342, 0.235342875123024, 0.15264549851417542, 0.10489438474178314, -0.17423322796821594, -0.09782788157463074, -0.0854356586933136, 0.14951589703559875, -0.09774835407733917, 0.35201478004455566, -0.0446074940264225, -0.02886645868420601, 0.022839870303869247, -0.31221306324005127, -0.19369623064994812, 0.08014484494924545, -0.40667057037353516, 0.13650652766227722, 0.3283132314682007, -0.323477566242218, 0.10018673539161682, 0.021860305219888687, 0.4756092429161072, -0.12112626433372498, -0.1954512745141983, 0.2320108413696289, -0.18953055143356323, 0.17078351974487305, 0.10861422121524811, -0.17739702761173248, 0.3854375183582306, 0.11220983415842056, 0.037696920335292816, -0.36451348662376404, -0.2503792643547058, -0.4268314242362976, 0.13465210795402527, 0.005633436143398285, -0.1293724626302719, -0.20192238688468933, 0.039619069546461105, 0.057724203914403915, -0.12951244413852692, -0.21135424077510834, 0.11548705399036407, 0.0673520639538765, 0.0494723804295063, 0.06625496596097946, -0.15441499650478363, -0.21198739111423492, -0.17640602588653564, 0.6264655590057373, -0.1077423170208931, -0.5085909366607666, 0.4606713652610779, -0.03960411250591278, -0.2720070481300354, -0.00727221742272377, -0.21385321021080017, 0.2910126745700836, -0.5071921944618225, 0.26665231585502625, -0.08126518130302429, -0.31470251083374023, 0.08674091100692749, 0.1454068124294281, 0.033226706087589264, -0.06329572945833206, -0.24467816948890686, 0.06862151622772217, -0.5114700794219971, 0.00860508531332016, -0.2004602700471878, 0.2193797081708908, -0.072959303855896, 0.0024339165538549423, -0.011456385254859924, 0.15091674029827118, -0.24758459627628326, 0.03133774548768997, 0.06554949283599854, -0.020034320652484894, 0.07157917320728302, -0.4475187659263611, 0.5194180011749268, -0.21061448752880096, -0.07882634550333023, 0.08933378756046295, -0.3692188560962677, -0.1395169198513031, -0.2798086404800415, 0.15582320094108582, 0.020189590752124786, -0.06329768896102905, -0.10175588726997375, 0.22427020967006683, -0.1317816972732544, -0.38509780168533325, 0.2663281261920929, 0.4267377257347107, -0.08594110608100891, 0.21773596107959747, 0.1543675661087036, 0.2008507251739502, 0.1570761799812317, -0.11204537749290466, -0.1153181940317154, 0.08053337037563324, 0.07986387610435486, 0.23234355449676514, 0.023299794644117355, 0.07374446094036102, -0.06671811640262604, 0.05984202399849892, 0.26922792196273804, -0.01681198924779892, 0.28430452942848206, -0.2442564219236374, -0.16338230669498444, 0.1765938252210617, 0.2694579064846039, 0.2560470700263977, 0.23523057997226715, -0.3531942069530487, 0.051498569548130035, 0.1367589384317398, -0.06650684773921967, -0.09131499379873276, 0.2504136562347412, 0.12064918130636215, 0.16050946712493896, 0.04725328087806702, 0.08179259300231934, 0.1953170895576477, 0.5193352699279785, 0.23480352759361267, 0.5798425078392029, -0.296686053276062, 0.3942887783050537, 0.14552918076515198, 0.3598189353942871, 0.138356551527977, 0.6228572130203247, 0.059275418519973755, 0.008825570344924927, 0.06378331780433655, -0.18409764766693115, 0.4451982080936432, -0.1497715413570404, 0.2619175314903259, -0.14699724316596985, -0.26221537590026855, -0.1380574107170105, 0.00833989679813385, -0.14964696764945984, 0.2342555820941925, -0.19900035858154297, 0.30888980627059937, -0.20921342074871063, -0.13994507491588593, -0.14026334881782532, 0.009695049375295639, -0.18278029561042786, -0.3270069658756256, 0.2731025218963623, 0.02931356430053711, -0.025441933423280716, 0.03490119054913521, -0.04063324257731438, 0.013208817690610886, 0.350433349609375, -0.1268632411956787, 0.057767920196056366, -0.2136366069316864, -0.16553106904029846, -0.08698932081460953, 0.3347529470920563, -0.09475637972354889, 0.3914249539375305, -0.1091875433921814, -0.11418606340885162, -0.06273260712623596, 0.5630706548690796, 0.2443898320198059, 0.20788580179214478, 0.033291980624198914, 0.13163812458515167, -0.10752369463443756, -0.031200004741549492, -0.10291262716054916, 0.3895370364189148, -0.06376838684082031, -0.15379475057125092, 0.028889339417219162, 0.02816476859152317, -0.074489526450634, 0.04834291711449623, -0.4329920709133148, 0.013191407546401024, -0.2983928918838501, 0.5955244898796082, -0.13271380960941315, -0.2584175169467926, -0.057787805795669556, 0.1808207631111145, -0.18529996275901794, 0.14273326098918915, 0.19719405472278595, -0.147271066904068, 0.038988567888736725, -0.2511451244354248, 0.04606320708990097, 0.21188850700855255, 0.5874788761138916, 0.4427192509174347, 0.037164464592933655, -0.20491598546504974, -0.03141315281391144, -0.5466333627700806, 0.01097124069929123, 0.16608400642871857, 0.4006890654563904, -0.0006389375776052475, 0.027808861806988716, -0.1901569366455078, 0.06173870712518692, 0.024827323853969574, 0.158418208360672, -0.06573177874088287, -0.12598466873168945, -0.3469356894493103, 0.2608812153339386, 0.013286422938108444, 0.000439593568444252, 0.1867106854915619, -0.2607448697090149, 0.08679942786693573, 0.08108359575271606, -0.03249857574701309, -0.1374962031841278, 0.08216527104377747, 0.01621735468506813, -0.16073067486286163, 0.24065013229846954, 0.30362915992736816, -0.08840255439281464, 0.17020097374916077, -0.1911834329366684, -0.6736295819282532, -0.09309954941272736, -0.18958120048046112, -0.06929961591959, -0.14848840236663818, 0.365591436624527, -0.38947466015815735, -0.41644608974456787, -0.23340393602848053, 0.2534014582633972, 0.15258632600307465, -0.028604425489902496, -0.1299515962600708, -0.04578652232885361, -0.12605969607830048, 0.22340521216392517, 0.23472203314304352, 0.4405474364757538, -0.029499374330043793, 0.14464479684829712, -0.62410569190979, -0.367964506149292, 0.48541900515556335, -0.36640748381614685, -0.2516690492630005, -0.11988554149866104, 0.15061679482460022, 0.3509038984775543, -0.45595279335975647, -0.7183164954185486, 0.06427513808012009, 0.1543940305709839, 0.04681776463985443, -0.25767314434051514, 0.24993786215782166, 0.038386017084121704, 0.12654918432235718, -0.1445232480764389, 0.5700889825820923, 0.2609191834926605, -0.18836580216884613, -0.026507562026381493, -0.10230635106563568 ]
https://github.com/huggingface/datasets/issues/2377
ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather
Hi ! This is because we are actually using the arrow streaming format. We plan to switch to the arrow IPC format. More info at #1933
## Describe the bug A clear and concise description of what the bug is. ## Steps to reproduce the bug ```python from datasets import load_dataset from pyarrow import feather dataset = load_dataset('imdb', split='train') dataset.save_to_disk('dataset_dir') table = feather.read_table('dataset_dir/dataset.arrow') ``` ## Expected results I expect that the saved dataset can be read by the official Apache Arrow methods. ## Actual results ``` File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table reader.open(source, use_memory_map=memory_map) File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: datasets-1.6.2 - Platform: Linux - Python version: 3.7 - PyArrow version: 0.17.1, also 2.0.0
26
ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather ## Describe the bug A clear and concise description of what the bug is. ## Steps to reproduce the bug ```python from datasets import load_dataset from pyarrow import feather dataset = load_dataset('imdb', split='train') dataset.save_to_disk('dataset_dir') table = feather.read_table('dataset_dir/dataset.arrow') ``` ## Expected results I expect that the saved dataset can be read by the official Apache Arrow methods. ## Actual results ``` File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table reader.open(source, use_memory_map=memory_map) File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: datasets-1.6.2 - Platform: Linux - Python version: 3.7 - PyArrow version: 0.17.1, also 2.0.0 Hi ! This is because we are actually using the arrow streaming format. We plan to switch to the arrow IPC format. More info at #1933
[ -0.20403382182121277, 0.16021832823753357, -0.024091705679893494, 0.3715013265609741, 0.1489739716053009, 0.2544102072715759, -0.006909016519784927, 0.5975214838981628, -0.5161226391792297, -0.11885406076908112, -0.3667040169239044, 0.6461247205734253, -0.07226525992155075, -0.7478832006454468, 0.07418005913496017, 0.25508779287338257, 0.1921531856060028, 0.10284361988306046, -0.08289007842540741, -0.06577682495117188, -0.08976608514785767, 0.2092617154121399, -0.05718977749347687, 0.275265097618103, -0.3663756847381592, -0.08847355097532272, 0.08422674238681793, 0.2411670982837677, 0.06672598421573639, -0.3410424590110779, 0.32465946674346924, -0.13353903591632843, 0.08212313801050186, 0.1735122799873352, -0.000114237773232162, 0.18003295361995697, 0.3546249270439148, -0.11444131284952164, -0.2745324373245239, 0.09625855088233948, 0.3013072609901428, 0.021618684753775597, 0.2277008444070816, -0.35995998978614807, 0.21596038341522217, -0.4508237838745117, 0.092009998857975, -0.1863127201795578, 0.4654631018638611, 0.5436748266220093, 0.1880563199520111, 0.12983565032482147, 0.24797092378139496, 0.11846332252025604, 0.644387423992157, 0.0946035236120224, -0.17381097376346588, 0.654380738735199, -0.10605980455875397, -0.13335739076137543, -0.24280110001564026, -0.03750310093164444, -0.26143908500671387, -0.061827775090932846, -0.04637903720140457, 0.14919495582580566, -0.13615107536315918, -0.26983949542045593, -0.08364203572273254, -0.008621461689472198, 0.2848902940750122, -0.571386456489563, -0.3896675109863281, 0.014983415603637695, 0.14160332083702087, -0.11297955363988876, 0.20314010977745056, 0.23241044580936432, -0.20086391270160675, 0.2662528455257416, 0.36003854870796204, 0.10513392835855484, -0.35504963994026184, 0.17756621539592743, 0.19635796546936035, -0.33508819341659546, -0.13830943405628204, 0.07528608292341232, 0.105506531894207, 0.21649514138698578, 0.4860538840293884, 0.023340601474046707, -0.1866556704044342, -0.03199908882379532, -0.05970974639058113, 0.1197863519191742, -0.03456816077232361, 0.02612951025366783, 0.12668922543525696, 0.2536792755126953, 0.35682904720306396, 0.03112740069627762, -0.024876147508621216, 0.2956562936306, -0.24254700541496277, -0.20753857493400574, -0.012028411030769348, -0.24473325908184052, 0.48499083518981934, -0.007226377259939909, -0.10940499603748322, -0.12980234622955322, 0.08734192699193954, -0.11381806433200836, 0.3794032037258148, -0.27560949325561523, 0.3993118405342102, -0.17659135162830353, -0.4321504831314087, 0.062113430351018906, -0.1248619481921196, 0.11264855414628983, -0.08111906796693802, 0.24524500966072083, 0.06823428720235825, -0.13488072156906128, 0.16609764099121094, 0.4020649790763855, -0.12241661548614502, -0.3004591166973114, -0.08933105319738388, -0.0793369710445404, 0.10359065234661102, 0.0683879479765892, 0.1880316287279129, -0.2568868100643158, 0.2237665355205536, 0.15022695064544678, 0.0028195977210998535, 0.08673056960105896, -0.015380755998194218, -0.3452121615409851, 0.02908594161272049, 0.19927839934825897, 0.1487947702407837, 0.20662228763103485, 0.09153220057487488, -0.20930154621601105, -0.12304007261991501, 0.1477123498916626, -0.200252503156662, -0.09064847975969315, -0.27705878019332886, 0.12812195718288422, 0.0046731457114219666, -0.014755446463823318, -0.6079190373420715, -0.08934418857097626, 0.0797852948307991, -0.368920236825943, 0.06630346179008484, -0.2139703929424286, 0.23916718363761902, -0.517117977142334, 0.19669736921787262, 0.19870135188102722, -0.4703051745891571, 0.3383231461048126, -0.1878833919763565, -0.1323554366827011, 0.16997450590133667, 0.23646123707294464, -0.1800810992717743, -0.03976967930793762, -0.3184484839439392, 0.36594414710998535, 0.6282652616500854, -0.21152621507644653, -0.5290194749832153, 0.02655385062098503, 0.00944478064775467, -0.09247763454914093, 0.12124887853860855, 0.10066108405590057, 0.19235746562480927, -0.07838193327188492, 0.07307862490415573, 0.1113944798707962, 0.17527832090854645, -0.09645316004753113, -0.4493742883205414, 0.0013983268290758133, -0.1251823753118515, 0.013961203396320343, -0.36025840044021606, -0.23029732704162598, 0.46380576491355896, -0.38220134377479553, 0.39073446393013, 0.015933852642774582, 0.22057196497917175, 0.19575004279613495, 0.319807231426239, -0.05180051177740097, -0.0862395390868187, -0.12104228138923645, -0.3550286889076233, 0.049210697412490845, 0.042687997221946716, -0.2842833399772644, -0.3007989525794983, -0.35536783933639526, -0.05040788650512695, 0.08466122299432755, -0.14558278024196625, 0.004623943939805031, 0.11441007256507874, -0.05773967504501343, 0.1321229189634323, 0.42650243639945984, -0.13043808937072754, -0.07742232829332352, -0.18394650518894196, 0.18631547689437866, 0.07736050337553024, 0.38325434923171997, -0.1710485965013504, -0.42525604367256165, 0.05467793345451355, -0.001370459794998169, -0.06634048372507095, -0.01817704364657402, -0.1635926067829132, 0.444454163312912, -0.10484785586595535, -0.002779461443424225, 0.10656954348087311, 0.0027234703302383423, 0.025876518338918686, -0.44402989745140076, 0.07029373943805695, 0.26751840114593506, 0.21141178905963898, 0.11475398391485214, -0.16186648607254028, 0.4025800824165344, 0.23455016314983368, -0.05265592783689499, -0.0595330074429512, -0.07638140022754669, 0.29200711846351624, 0.17405855655670166, 0.004944222047924995, 0.0926574170589447, -0.06246645376086235, 0.06988604366779327, 0.4033072888851166, -0.22433601319789886, -0.2936953008174896, 0.17012861371040344, 0.4582488536834717, 0.10704737901687622, 0.20351913571357727, 0.19000980257987976, -0.4580405354499817, -0.0727929174900055, 0.2644939124584198, 0.09985470771789551, 0.36135706305503845, 0.23051871359348297, 0.12193351984024048, -0.18435600399971008, -0.3392292857170105, -0.24280616641044617, 0.12256483733654022, 0.10365825891494751, 0.3005487322807312, 0.20480883121490479, 0.3009170591831207, -0.027212239801883698, -0.5037744641304016, -0.19163638353347778, -0.09732609242200851, 0.023830318823456764, -0.21014653146266937, 0.2568072974681854, -0.23812651634216309, -0.3353669047355652, -0.21724525094032288, -0.12483233958482742, -0.15860304236412048, -0.3103269338607788, -0.03655388206243515, 0.578018069267273, 0.02327275648713112, -0.11160357296466827, -0.15079373121261597, -0.0620754212141037, 0.21441945433616638, -0.15835414826869965, -0.38969194889068604, 0.08004965633153915, -0.5274574160575867, 0.04438849166035652, 0.3925110995769501, -0.08379782736301422, 0.38022032380104065, 0.15377943217754364, 0.1395399421453476, -0.4493112862110138, 0.002101905643939972, -0.11229339241981506, -0.28091734647750854, 0.419034481048584, -0.3382551372051239, 0.1093493402004242, -0.26375091075897217, -0.08912443369626999, 0.17179064452648163, -0.015430022031068802, -0.1937982141971588, 0.1257684975862503, 0.03717382624745369, -0.007129244972020388, -0.009525459259748459, -0.19344556331634521, -0.1541958451271057, -0.34275195002555847, 0.27945059537887573, -0.050247542560100555, 0.06500094383955002, -0.020280618220567703, 0.25401628017425537, 0.47802871465682983, 0.06823655217885971, 0.09170041233301163, 0.0518784262239933, -0.18182024359703064, 0.716171383857727, -0.17220985889434814, -0.36409562826156616, 0.16335710883140564, -0.05500015616416931, 0.11007697880268097, 0.06105978786945343, -0.5219789147377014, -0.28395459055900574, -0.006811404600739479, 0.6309648752212524, -0.06638889014720917, -0.010587723925709724, 0.1917039006948471, 0.0353517010807991, -0.07994747906923294, -0.0474480465054512, 0.08404302597045898, -0.15300193428993225, 0.03232835978269577, 0.0995263159275055, -0.10429628938436508, 0.316824346780777, -0.06425507366657257, 0.6338436603546143, 0.14604514837265015, 0.093523308634758, 0.5382618308067322, -0.3165525496006012, 0.347982257604599, -0.19607672095298767, -0.09643371403217316, -0.36404743790626526, -0.3192085027694702, 0.062113575637340546, 0.005476750433444977, 0.059529952704906464, -0.1623481661081314, 0.10422840714454651, 0.018825680017471313, -0.3889213800430298, -0.3310847282409668, 0.1735132336616516, -0.1545095294713974, -0.10188647359609604, -0.03406997397542, 0.13194027543067932, 0.346170574426651, -0.2330644130706787, 0.14959071576595306, 0.32633426785469055, 0.17938396334648132, 0.11159159243106842, 0.17821548879146576, -0.1987200528383255, -0.3324727416038513, 0.2440045326948166, -0.06070457026362419, 0.11203516274690628, 0.09345667064189911, -0.11823961138725281, 0.2939035892486572, -0.11689882725477219, 0.5011328458786011, 0.14053663611412048, -0.02421257644891739, 0.27025771141052246, 0.26703882217407227, -0.621515691280365, -0.07479555904865265, -0.03141283243894577, 0.014358852058649063, -0.060166630893945694, 0.22607888281345367, -0.03390152007341385, 0.0088192755356431, -0.18767912685871124, 0.26433607935905457, -0.06380459666252136, 0.1802321821451187, -0.21454115211963654, -0.27971452474594116, -0.2812100052833557, -0.023373909294605255, 0.15155458450317383, -0.03183872252702713, -0.28282174468040466, -0.2102077752351761, -0.20413586497306824, -0.20650073885917664, 0.06238751485943794, 0.12137869000434875, 0.3808791935443878, -0.24504216015338898, 0.10075747966766357, -0.09313032031059265, -0.010214023292064667, 0.5208442807197571, 0.5118019580841064, 0.22574235498905182, -0.461184024810791, -0.1422622799873352, -0.1319180279970169, 0.038469165563583374, 0.106828473508358, -0.27732473611831665, -0.026535645127296448, -0.26172593235969543, -0.17412851750850677, 0.06487639248371124, 0.054083481431007385, 0.2572915852069855, -0.30831822752952576, -0.07067500799894333, -0.01824345253407955, 0.7317121624946594, 0.11170099675655365, 0.08366584777832031, 0.286312997341156, 0.32118070125579834, -0.1072598472237587, 0.4641647934913635, 0.21228379011154175, 0.7479279637336731, 0.04313806816935539, 0.4643580913543701, 0.5308559536933899, -0.21229569613933563, 0.016034144908189774, -0.16498219966888428, 0.1785256564617157, -0.3695946931838989, -0.03267441689968109, -0.029942192137241364, 0.01342635229229927, -0.10001551359891891, 0.01423448696732521, 0.0010388456284999847, -0.06077446788549423, 0.01996055245399475, 0.0011277683079242706, -0.0676591694355011, -0.11161807924509048, -0.21841886639595032, -0.05880739912390709, -0.1353924423456192, 0.13306686282157898, 0.05355590209364891, -0.08946673572063446, 0.1921910047531128, -0.312752366065979, -0.564592182636261, 0.00881538912653923, -0.14918261766433716, 0.15723732113838196, -0.19519738852977753, 0.4169207811355591, -0.17627744376659393, -0.5911445617675781, -0.13032224774360657, 0.2761574983596802, -0.21002571284770966, -0.20870740711688995, -0.11287432909011841, -0.13830558955669403, 0.3252478539943695, -0.1204843819141388, -0.14169317483901978, -0.263870507478714, 0.3116105794906616, -0.020835908129811287, 0.09037437289953232, 0.1997542381286621, -0.005999588407576084, -0.22223632037639618, 0.24246135354042053, 0.18910682201385498, 0.24538743495941162, -0.10292372852563858, -0.10395288467407227, -0.3850196599960327, -0.3170566260814667, -0.2708207368850708, 0.11129836738109589, 0.06073515862226486, 0.15595971047878265, -0.0029870495200157166, -0.0495331697165966, -0.07720515877008438, 0.060841817408800125, 0.5257682204246521, -0.108498714864254, 0.12391096353530884, 0.34883877635002136, -0.21543563902378082, -0.244449645280838, -0.1800951361656189, 0.3286752700805664, 0.032328300178050995, -0.7142590284347534, 0.3077315092086792, -0.03781851381063461, 0.3314645290374756, -0.20948415994644165, -0.1696850210428238, 0.17571018636226654, -0.22758516669273376, -0.2607494294643402, -0.33196964859962463, -0.30525606870651245, 0.28264889121055603, 0.1260705292224884, 0.027767186984419823, 0.1368635892868042, -0.20622459053993225, 0.11973267793655396, -0.26209941506385803, -0.23281265795230865, 0.18259277939796448, 0.22931453585624695, -0.02868400141596794, -0.001306844875216484, 0.12938407063484192, 0.21120142936706543, 0.04925702139735222, 0.1066417247056961, 0.26110145449638367, 0.01316780410706997, -0.20776614546775818, -0.030849261209368706, 0.14104139804840088, 0.0917196273803711, -0.03652755916118622, -0.038339417427778244, -0.2797238826751709, -0.0027393046766519547, -0.10044188797473907, -0.14711681008338928, -0.1317080557346344, -0.04071614891290665, -0.05807233974337578, 0.4979652464389801, 0.2660631835460663, -0.0053356848657131195, 0.0013513118028640747, -0.16199274361133575, 0.18021109700202942, -0.10331905633211136, 0.06901876628398895, -0.13133201003074646, -0.09963053464889526, -0.39116841554641724, -0.0428953617811203, -0.1632249802350998, 0.011755397543311119, 0.24430647492408752, -0.2647138237953186, -0.19165685772895813, 0.038171883672475815, 0.20378239452838898, 0.46492964029312134, -0.1592673659324646, -0.19721196591854095, 0.3094664216041565, 0.14194920659065247, -0.06947483122348785, -0.054208915680646896, -0.027800973504781723, -0.15135334432125092, -0.11065034568309784, -0.05024508386850357, -0.07065463066101074, -0.0053173452615737915, -0.1682131141424179, -0.0643656849861145, 0.08700147271156311, -0.18880964815616608, -0.04262944683432579, 0.2759269177913666, 0.14242511987686157, 0.15025867521762848, 0.2690137028694153, -0.04997147247195244, 0.34203776717185974, 0.5846753716468811, -0.08604917675256729, 0.2105802297592163, 0.23411718010902405, -0.19951367378234863, -0.1195707693696022, -0.21192315220832825, -0.24840526282787323, -0.3364701271057129, 0.0029910802841186523, 0.21386155486106873, 0.210857093334198, 0.6503981351852417, 0.10613952577114105, -0.1071246936917305, 0.03916141390800476, 0.15952184796333313, -0.09887757152318954, 0.10204499959945679, 0.09033572673797607, -0.043511729687452316, 0.19651257991790771, 0.0737742930650711, -0.3059614300727844, -0.2051430493593216, 0.11161760240793228, 0.3435765504837036, -0.11873999238014221, -0.05925098806619644, 0.19659152626991272, 0.19876700639724731, 0.20775023102760315, -0.042481131851673126, 0.035711005330085754, 0.26619386672973633, 0.022638540714979172, -0.20926454663276672, -0.05005776137113571, 0.4795776307582855, 0.05337746441364288, -0.03903159126639366, 0.11924383789300919, -0.026942644268274307, -0.07285600155591965, -0.03084726817905903, 0.08921702206134796, 0.2304479330778122, 0.23294295370578766, 0.29754117131233215, 0.1788155436515808, -0.10635453462600708, -0.012292623519897461, -0.13554643094539642, 0.14129510521888733, 0.033021729439496994, 0.20033474266529083, -0.28766652941703796, -0.3980266749858856, -0.20610752701759338, -0.22611436247825623, -0.060093361884355545, 0.1351630836725235, 0.37320712208747864, -0.008725284598767757, -0.03438572958111763, -0.023107152432203293, 0.07422987371683121, -0.0843384712934494, 0.29004549980163574, 0.4074522852897644, 0.0998019278049469, -0.15303467214107513, -0.07337377220392227, -0.46349358558654785, 0.17582020163536072, -0.12391091883182526, 0.11787569522857666, -0.09902989864349365, 0.2496950477361679, 0.042052011936903, 0.09011024981737137, 0.15349945425987244, -0.23410823941230774, 0.2216779887676239, 0.5094464421272278, -0.21632038056850433, -0.07032333314418793, -0.03879883885383606, -0.06733051687479019, -0.06957937777042389, -0.4108837842941284, 0.2714149057865143, -0.12259615212678909, 0.10921894758939743, -0.09085625410079956, -0.16142630577087402, 0.12386195361614227, 0.23905348777770996, 0.6692214012145996, -0.12426109611988068, 0.21275511384010315, -0.07502255588769913, -0.08665981143712997, -0.3000469207763672, 0.05261439457535744, -0.07317350804805756, 0.17817756533622742, 0.00022463127970695496, 0.5266057252883911, -0.040452469140291214, -0.30386045575141907, -0.1741483062505722, 0.30721527338027954, -0.05748362094163895, -0.023513002321124077, -0.05279465764760971, 0.03846970200538635, -0.15735749900341034, 0.11572903394699097, -0.057801228016614914, 0.027186807245016098, 0.011674325913190842, 0.21897760033607483, -0.4629128575325012, -0.6108030676841736, 0.41288667917251587, -0.3112280070781708, -0.0361100472509861, 0.29892635345458984, 0.42742615938186646, 0.25026458501815796, 0.09310983121395111, -0.35299378633499146, -0.1512591689825058, 0.47585371136665344, -0.24476274847984314, -0.2351061999797821, 0.2724815607070923, 0.011676661670207977, 0.1664251983165741, -0.031509172171354294, 0.5087145566940308, 0.0213005393743515, -0.2097070813179016, 0.049402330070734024, -0.4608900547027588 ]
https://github.com/huggingface/datasets/issues/2373
Loading dataset from local path
Version below works, checked again in the docs, and data_files should be a path. ``` ds = datasets.load_dataset('my_script.py', data_files='/data/dir/corpus.txt', cache_dir='.') ```
I'm trying to load a local dataset with the code below ``` ds = datasets.load_dataset('my_script.py', data_files='corpus.txt', data_dir='/data/dir', cache_dir='.') ``` But internally a BuilderConfig is created, which tries to use getmtime on the data_files string, without using data_dir. Is this a bug or am I not using the load_dataset correctly? https://github.com/huggingface/datasets/blob/bc61954083f74e6460688202e9f77dde2475319c/src/datasets/builder.py#L153
21
Loading dataset from local path I'm trying to load a local dataset with the code below ``` ds = datasets.load_dataset('my_script.py', data_files='corpus.txt', data_dir='/data/dir', cache_dir='.') ``` But internally a BuilderConfig is created, which tries to use getmtime on the data_files string, without using data_dir. Is this a bug or am I not using the load_dataset correctly? https://github.com/huggingface/datasets/blob/bc61954083f74e6460688202e9f77dde2475319c/src/datasets/builder.py#L153 Version below works, checked again in the docs, and data_files should be a path. ``` ds = datasets.load_dataset('my_script.py', data_files='/data/dir/corpus.txt', cache_dir='.') ```
[ -0.3634895980358124, 0.22408467531204224, 0.0534442700445652, 0.4514979124069214, 0.14152994751930237, -0.12070629745721817, 0.49879664182662964, 0.06493572145700455, 0.11394524574279785, 0.12790332734584808, 0.16706132888793945, 0.11647893488407135, -0.000026203691959381104, 0.16189733147621155, 0.20335188508033752, 0.2234761267900467, -0.0005669295787811279, 0.07684288173913956, -0.15611177682876587, -0.06864483654499054, -0.23243147134780884, 0.11964837461709976, -0.01564668118953705, 0.18718105554580688, -0.3966732919216156, 0.31614863872528076, 0.004133017733693123, 0.6595538854598999, 0.020151156932115555, -0.15945373475551605, 0.46352604031562805, -0.019413307309150696, 0.2626413404941559, 0.6896221041679382, -0.00012339733075350523, 0.319505512714386, 0.4197116494178772, -0.13705499470233917, -0.44519197940826416, -0.36300188302993774, -0.3213689923286438, -0.12058404088020325, 0.27304714918136597, -0.11777156591415405, -0.3139311671257019, 0.1684606373310089, 0.1296427994966507, -0.47963184118270874, 0.1251050978899002, 0.35126209259033203, 0.08643364161252975, 0.19551780819892883, -0.4008829891681671, -0.007488214410841465, 0.08753055334091187, 0.4546247124671936, 0.00393998809158802, 0.2868141531944275, 0.20271891355514526, -0.0509551465511322, 0.04031103476881981, -0.10944727063179016, -0.11455186456441879, 0.16706699132919312, 0.7290754914283752, 0.20447011291980743, 0.24629506468772888, 0.11953714489936829, 0.12717992067337036, 0.2097664475440979, 0.8114510774612427, -0.21892738342285156, -0.3567315340042114, -0.3475867211818695, -0.2959792912006378, -0.1321895718574524, 0.29137930274009705, 0.19590140879154205, -0.328308641910553, 0.1550276130437851, -0.28264257311820984, -0.17591114342212677, -0.038554973900318146, 0.3217874765396118, 0.021646082401275635, 0.244560107588768, -0.1323627531528473, 0.23209846019744873, -0.16405941545963287, 0.09899372607469559, 0.3219015896320343, -0.3972787857055664, -0.025057870894670486, 0.23577719926834106, 0.1988215446472168, 0.3457134962081909, 0.04927588254213333, 0.41591206192970276, -0.04021608829498291, 0.018808403983712196, -0.04867895692586899, 0.031959619373083115, -0.05948580801486969, 0.13285905122756958, 0.428754597902298, 0.045041974633932114, 0.16613028943538666, 0.1457967907190323, 0.15681004524230957, 0.015915105119347572, -0.1326693445444107, -0.11070884019136429, -0.09797265380620956, -0.4574613571166992, -0.10042800009250641, -0.19337180256843567, 0.2295656055212021, -0.14939628541469574, 0.046451181173324585, -0.27240288257598877, 0.2526025176048279, -0.08674931526184082, 0.30009448528289795, 0.38816726207733154, -0.1646876484155655, -0.13381105661392212, -0.08427125215530396, 0.22511138021945953, -0.17908766865730286, 0.04831567779183388, -0.3583282232284546, -0.26507076621055603, -0.20434778928756714, 0.02765672095119953, -0.047333262860774994, -0.2438426911830902, 0.28383001685142517, -0.051334820687770844, 0.15490156412124634, -0.15376576781272888, -0.19941775500774384, 0.13641580939292908, 0.12717393040657043, 0.3635898232460022, -0.2581690847873688, 0.1701279580593109, 0.22174762189388275, -0.3667542338371277, -0.24716299772262573, 0.29832491278648376, -0.30655765533447266, -0.5425300598144531, 0.014951976016163826, 0.05589999631047249, -0.21243911981582642, 0.001862902194261551, -0.06381545215845108, -0.14495816826820374, 0.4413241147994995, 0.01118035614490509, -0.13967323303222656, -0.029743611812591553, -0.5766786932945251, -0.06877032667398453, 0.2972016930580139, 0.6269581317901611, -0.47445860505104065, -0.22997920215129852, -0.035493869334459305, -0.15828290581703186, 0.126175194978714, 0.09543678164482117, -0.5179552435874939, 0.5660895705223083, -0.2751982510089874, -0.26632094383239746, 0.503383219242096, -0.4492171108722687, -0.10948002338409424, 0.5727272629737854, -0.2467738538980484, -0.1474415361881256, 0.03934615105390549, 0.16607500612735748, -0.1855110228061676, -0.11981654912233353, 0.29403284192085266, 0.4177986979484558, -0.04290308803319931, 0.10911340266466141, -0.09202082455158234, -0.11668669432401657, 0.17993326485157013, 0.11572563648223877, -0.020854290574789047, 0.22627514600753784, 0.15642163157463074, -0.1143685132265091, 0.16038423776626587, -0.020293157547712326, 0.09399888664484024, 0.21067436039447784, -0.25375133752822876, 0.0658295750617981, 0.12784290313720703, 0.15467306971549988, -0.5286967158317566, 0.39859679341316223, -0.0480773039162159, -0.15693390369415283, 0.0695541650056839, -0.0701722651720047, -0.15849757194519043, 0.17531970143318176, -0.43329909443855286, 0.0715487077832222, -0.11696571111679077, 0.2941359281539917, -0.010416032746434212, -0.18620336055755615, -0.26255500316619873, 0.09079782664775848, -0.08276178687810898, 0.10091643035411835, -0.22762568295001984, -0.003242572769522667, 0.07230759412050247, -0.013983876444399357, -0.22088414430618286, 0.13989782333374023, 0.0464978963136673, -0.15807026624679565, -0.1367749571800232, 0.3328726887702942, 0.11752975732088089, 0.43916410207748413, -0.16910293698310852, 0.07237967103719711, 0.08578579872846603, 0.26358845829963684, 0.15446726977825165, 0.056492581963539124, 0.10032736510038376, -0.19379109144210815, -0.12972068786621094, 0.20464569330215454, -0.16006360948085785, 0.39117440581321716, -0.02273966558277607, -0.09614494442939758, 0.17777761816978455, 0.04372907802462578, -0.16708587110042572, -0.05359852686524391, -0.0064448826014995575, 0.06018584221601486, 0.47692716121673584, 0.2809217870235443, -0.17881399393081665, 0.029252037405967712, 0.06159372255206108, -0.022472867742180824, -0.07841374725103378, 0.04491279646754265, -0.16925722360610962, -0.11533088982105255, -0.07131879031658173, 0.07335859537124634, 0.30550462007522583, 0.04558678716421127, 0.1843344122171402, 0.019974518567323685, 0.07140107452869415, -0.3972019851207733, 0.15884512662887573, 0.09648965299129486, 0.0015546040376648307, 0.10229502618312836, -0.23467187583446503, -0.28733256459236145, -0.1957283616065979, 0.2077188640832901, 0.08727392554283142, -0.0018093287944793701, -0.5557534098625183, 0.29861879348754883, -0.3373386561870575, -0.23220059275627136, -0.312439888715744, -0.5424565672874451, -0.1791618913412094, -0.15867219865322113, -0.16135132312774658, 0.11121925711631775, -0.038728803396224976, -0.018735520541667938, -0.004573628306388855, 0.17167781293392181, -0.023629693314433098, -0.674497663974762, -0.12747889757156372, -0.2660987973213196, -0.34353896975517273, -0.11251397430896759, 0.4159899055957794, 0.08572157472372055, -0.03538037836551666, -0.3524419367313385, -0.05736400559544563, -0.14744770526885986, 0.21983128786087036, 0.35960185527801514, 0.0932922512292862, 0.7534449696540833, 0.18832601606845856, 0.020210444927215576, 0.23763860762119293, 0.08742816746234894, 0.2951367199420929, 0.1826607882976532, 0.01835651509463787, -0.04421086609363556, 0.0366407111287117, -0.08592535555362701, -0.3417370319366455, -0.04147126525640488, -0.20507560670375824, -0.18075895309448242, 0.13919678330421448, 0.2741289734840393, 0.15450158715248108, 0.6428104639053345, 0.15566085278987885, 0.08049723505973816, -0.14194007217884064, 0.19031313061714172, -0.12236244231462479, -0.8258026242256165, 0.08878152072429657, -0.14598862826824188, -0.2825869917869568, -0.11993172019720078, -0.03681938350200653, 0.17500466108322144, -0.12008775770664215, -0.3841402530670166, 0.01650179922580719, 0.03891013562679291, 0.1934177130460739, 0.31299299001693726, -0.02687542326748371, 0.14772288501262665, -0.16650304198265076, 0.13916833698749542, -0.11518849432468414, -0.2201763093471527, 0.30474454164505005, -0.046377137303352356, 0.06811404973268509, 0.3982470631599426, 0.2701756954193115, -0.34906235337257385, 0.6581436395645142, -0.04194684326648712, -0.13548435270786285, 0.2687523365020752, -0.3474262058734894, 0.5696569085121155, -0.367719441652298, -0.1921463906764984, 0.12787456810474396, 0.27344536781311035, -0.5633004307746887, 0.35236024856567383, 0.3173485994338989, 0.04214588552713394, -0.27800697088241577, -0.14254072308540344, -0.009333696216344833, -0.26351505517959595, -0.035683006048202515, -0.03577333688735962, -0.08396127074956894, 0.250980019569397, 0.26070722937583923, -0.14208583533763885, -0.12884126603603363, -0.05280351638793945, 0.5240067839622498, 0.18276862800121307, 0.07125654816627502, -0.033155255019664764, 0.0538775734603405, -0.3607847988605499, 0.09303214401006699, -0.0018486471381038427, 0.07119561731815338, -0.029478425160050392, -0.0747772604227066, 0.1303325891494751, 0.007590081542730331, 0.5740768909454346, -0.04265650361776352, 0.27000537514686584, 0.19737818837165833, -0.14769306778907776, -0.4956391155719757, -0.005018401890993118, 0.32443180680274963, 0.3547220826148987, -0.2119244784116745, 0.5544862747192383, 0.024803221225738525, -0.35230088233947754, -0.14252303540706635, 0.2888288199901581, -0.30240628123283386, -0.27552518248558044, -0.2828819751739502, -0.09085898101329803, -0.16932618618011475, -0.13591745495796204, -0.2644427418708801, 0.16047264635562897, 0.31734541058540344, -0.05426166206598282, 0.019996417686343193, 0.2740508019924164, -0.10122425854206085, -0.24052250385284424, 0.260354608297348, -0.051235489547252655, 0.1918957233428955, 0.36953669786453247, 0.2724655866622925, 0.13307435810565948, 0.4891778230667114, -0.15258720517158508, 0.05896700918674469, 0.10667775571346283, -0.11384308338165283, 0.2623549699783325, 0.35422539710998535, -0.26611199975013733, -0.2850039601325989, 0.43558812141418457, -0.07140852510929108, -0.44312170147895813, 0.14520002901554108, 0.06508921831846237, -0.05850350856781006, -0.012493575923144817, -0.7041831612586975, 0.32112208008766174, -0.028768757358193398, -0.09167110919952393, 0.3414556086063385, -0.27610480785369873, -0.3676849603652954, 0.036656737327575684, 0.05145770683884621, 0.5803354978561401, -0.110928013920784, 0.33930695056915283, 0.49122413992881775, 0.10376840829849243, -0.12056098133325577, -0.01980980485677719, -0.11634919047355652, -0.3502040207386017, 0.07329913973808289, -0.07539361715316772, -0.2070188671350479, 0.07149552553892136, 0.4098726511001587, 0.08383212983608246, 0.32902419567108154, -0.21011532843112946, 0.4944484531879425, 0.007386781740933657, 0.2272142767906189, 0.060157716274261475, -0.35344168543815613, -0.05657009035348892, 0.05227421969175339, 0.06426027417182922, 0.2843474745750427, -0.17758357524871826, 0.09629565477371216, 0.04192011430859566, -0.12118672579526901, 0.10790593922138214, 0.02365214005112648, -0.198973149061203, 0.037989601492881775, 0.1669692099094391, -0.303842157125473, -0.3285159468650818, 0.3571912944316864, 0.18556436896324158, -0.08420932292938232, -0.2812744975090027, 0.1942753791809082, -0.14520412683486938, 0.1037386953830719, -0.16156190633773804, -0.058767132461071014, 0.15013505518436432, -0.0364127978682518, 0.008747085928916931, -0.35428258776664734, -0.3601636588573456, -0.346910297870636, 0.2884584069252014, 0.04095011204481125, 0.0974462628364563, -0.16047009825706482, -0.35760119557380676, 0.015593595802783966, 0.3156898319721222, -0.002219758927822113, 0.04402552917599678, 0.19339829683303833, -0.0006959820166230202, 0.0494028776884079, -0.00001845136284828186, -0.5221161842346191, -0.11392129957675934, 0.26398250460624695, -0.05919581651687622, 0.13990333676338196, 0.488307386636734, 0.14802135527133942, -0.1267177164554596, -0.09117509424686432, 0.2864243984222412, 0.2808632552623749, -0.08196717500686646, 0.08186301589012146, 0.24992232024669647, 0.07197612524032593, 0.034453149884939194, 0.4461491107940674, 0.12572002410888672, -0.1293548047542572, -0.24813231825828552, -0.36154142022132874, -0.347200483083725, 0.05999761074781418, -0.15472711622714996, 0.1391311138868332, 0.20288822054862976, -0.08087471127510071, 0.1917206346988678, -0.296477735042572, -0.15241265296936035, -0.05029699206352234, 0.07778196781873703, 0.06936796754598618, 0.21648885309696198, 0.22361013293266296, 0.3147009015083313, -0.0005693733692169189, -0.06753065437078476, -0.3426746129989624, -0.24850547313690186, -0.09015406668186188, -0.02613961510360241, 0.206873819231987, 0.012219593860208988, -0.06919193267822266, 0.05072977766394615, -0.34208399057388306, -0.3368500769138336, -0.2921670079231262, 0.2289034128189087, 0.27732476592063904, -0.09910295903682709, -0.0458296500146389, 0.24318785965442657, 0.13267575204372406, -0.06904703378677368, 0.16241216659545898, -0.038318976759910583, 0.36690831184387207, -0.0795852318406105, 0.12482962012290955, -0.35002440214157104, -0.08156159520149231, 0.19670093059539795, 0.21489286422729492, 0.04906170070171356, 0.16047316789627075, 0.3099260926246643, -0.46758127212524414, 0.18035997450351715, 0.14351825416088104, 0.41641291975975037, 0.20391175150871277, -0.1885012686252594, 0.059692904353141785, 0.21569481492042542, -0.012617548927664757, -0.048964276909828186, -0.13709180057048798, 0.10808241367340088, 0.03048405423760414, -0.03068222664296627, 0.317330539226532, 0.1685628741979599, -0.08036918193101883, -0.08990059792995453, 0.04712279886007309, 0.4480670988559723, -0.07068823277950287, -0.050753965973854065, 0.36083096265792847, -0.11417107284069061, 0.3597218990325928, 0.2721738815307617, 0.34586262702941895, 0.11396022886037827, 0.5598079562187195, -0.052659548819065094, 0.000024298205971717834, 0.20401957631111145, 0.17231827974319458, -0.16342535614967346, -0.592369794845581, 0.3253549635410309, 0.23902738094329834, -0.10987208783626556, -0.16110309958457947, -0.11570674180984497, 0.5343719720840454, -0.22196315228939056, 0.25050100684165955, -0.21629111468791962, 0.1709725707769394, -0.10292758792638779, -0.4251098036766052, -0.3079391419887543, -0.14122137427330017, 0.22825098037719727, -0.018624339252710342, -0.16146057844161987, -0.0644492655992508, -0.14944201707839966, -0.1645066887140274, 0.18853525817394257, 0.06293442845344543, 0.31347891688346863, -0.052844636142253876, -0.4776817560195923, -0.2475818246603012, 0.3105487525463104, -0.20905078947544098, 0.1323186308145523, 0.3261488676071167, 0.01682928577065468, 0.2841065526008606, 0.33340802788734436, 0.04736470803618431, -0.09627929329872131, -0.07107070088386536, -0.10936298966407776, -0.32424038648605347, 0.17649254202842712, -0.3072253465652466, 0.08207468688488007, 0.4704861044883728, 0.0694294273853302, -0.06978751718997955, 0.08795416355133057, 0.15330016613006592, 0.32444965839385986, -0.22353334724903107, 0.3136506676673889, 0.12433251738548279, -0.00687272846698761, -0.07627199590206146, 0.17009946703910828, -0.20686545968055725, -0.06776643544435501, 0.6105196475982666, 0.07706169039011002, 0.31277140974998474, -0.021563250571489334, -0.013297650963068008, -0.017982788383960724, 0.6097304821014404, 0.15468984842300415, 0.26493963599205017, -0.20729465782642365, 0.008738458156585693, -0.7007184624671936, 0.027111686766147614, -0.09706756472587585, 0.31817859411239624, 0.15447410941123962, 0.11893762648105621, 0.10336007922887802, 0.052530862390995026, 0.04557305574417114, -0.012733787298202515, 0.10660837590694427, -0.1811341494321823, 0.21783532202243805, -0.3707609176635742, -0.2538203001022339, 0.19916802644729614, 0.060661472380161285, -0.4984823167324066, 0.08056334406137466, -0.33723628520965576, -0.08701113611459732, 0.06404463946819305, 0.003641001880168915, 0.208963543176651, -0.06510736793279648, 0.25288471579551697, -0.10773065686225891, 0.13231304287910461, 0.061413176357746124, 0.06692501902580261, -0.48297327756881714, -0.20130211114883423, -0.3909187912940979, 0.09296781569719315, -0.5008546113967896, 0.03836608678102493, -0.6236855983734131, 0.11196939647197723, -0.6095497608184814, -0.03925517946481705, 0.13572534918785095, -0.1387309730052948, -0.042216524481773376, -0.05550805479288101, -0.4150228798389435, 0.18581931293010712, 0.17461609840393066, 0.011105172336101532, -0.017715752124786377, 0.11925259232521057, 0.003547556698322296, -0.0809883177280426, 0.6704127788543701, -0.2766197919845581, -0.23860357701778412, -0.044081032276153564, -0.07265681028366089, 0.030004650354385376, -0.323281854391098, -0.22785669565200806, 0.16097146272659302, 0.40656179189682007, -0.07125387340784073, 0.015342742204666138, -0.29616138339042664, -0.08069351315498352, 0.25294333696365356, -0.12260140478610992, 0.12222253531217575, 0.016147717833518982, -0.21879339218139648, -0.22711703181266785, -0.31310713291168213 ]
https://github.com/huggingface/datasets/issues/2363
Trying to use metric.compute but get OSError
also, I test the function on some little data , get the same message: ``` Python 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from datasets import load_metric >>> metric = load_metric('accuracy') >>> metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0]) 2021-05-15 16:39:17.240991: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 >>> metric.compute() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 112, in pyarrow.lib.check_status OSError: error closing file ```
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0
113
Trying to use metric.compute but get OSError I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0 also, I test the function on some little data , get the same message: ``` Python 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from datasets import load_metric >>> metric = load_metric('accuracy') >>> metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0]) 2021-05-15 16:39:17.240991: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 >>> metric.compute() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 112, in pyarrow.lib.check_status OSError: error closing file ```
[ -0.39441871643066406, -0.2529717683792114, -0.0330117791891098, 0.3631945252418518, 0.25313127040863037, -0.10110492259263992, 0.23285265266895294, 0.1392669528722763, 0.2106887251138687, 0.6745789051055908, -0.02712155133485794, 0.06741391122341156, -0.056197576224803925, 0.0007949601858854294, -0.14105334877967834, -0.16666460037231445, -0.12399386614561081, 0.012945204973220825, 0.000006996095180511475, 0.07801619172096252, -0.33733370900154114, 0.04249408468604088, -0.22039325535297394, 0.07182266563177109, -0.05419914424419403, -0.20792561769485474, 0.2063426524400711, 0.04261410981416702, -0.5113475322723389, -0.23875127732753754, 0.23515252768993378, -0.32088443636894226, 0.21703073382377625, 0.8475169539451599, -0.00011492488556541502, 0.13263964653015137, 0.008718930184841156, -0.10041088610887527, -0.09454882144927979, -0.2760726809501648, 0.21046999096870422, -0.21029651165008545, 0.0614100843667984, -0.28949618339538574, 0.14162468910217285, -0.025002069771289825, -0.20491598546504974, -0.33479106426239014, 0.2580508887767792, 0.5588134527206421, 0.10943873971700668, 0.48057714104652405, 0.05719009414315224, -0.1703309416770935, -0.37479469180107117, -0.34424513578414917, 0.03925873339176178, 0.6707539558410645, -0.09424638748168945, -0.12500537931919098, -0.0927228108048439, -0.03975598141551018, 0.23412802815437317, 0.08773238956928253, 0.20651566982269287, -0.13264800608158112, 0.8326208591461182, -0.22519150376319885, -0.14898806810379028, -0.05729646980762482, 0.10047969222068787, 0.054225921630859375, -0.36622706055641174, 0.321256160736084, -0.06409875303506851, -0.7123776078224182, -0.008344672620296478, -0.05547697842121124, -0.3298594057559967, -0.16635359823703766, -0.3520742356777191, -0.01619769260287285, -0.46709489822387695, 0.06509102135896683, -0.2273934930562973, 0.26917362213134766, -0.1618950366973877, 0.07616375386714935, 0.31423529982566833, 0.33564484119415283, 0.07203634083271027, -0.028517212718725204, 0.16787388920783997, 0.2304375171661377, -0.5341541767120361, -0.007972493767738342, -0.1267387568950653, -0.09359436482191086, -0.23412004113197327, -0.2478044480085373, 0.3044131100177765, 0.02293405868113041, 0.23922809958457947, 0.27803128957748413, -0.19586119055747986, 0.8154187202453613, 0.08282097429037094, 0.1414991319179535, 0.028899652883410454, 0.3671554625034332, -0.07615020126104355, -0.07633625715970993, -0.06664737313985825, -0.3928148150444031, 0.330564945936203, 0.1671803891658783, -0.17894987761974335, -0.0470934621989727, -0.5103239417076111, -0.08257179707288742, -0.3074183166027069, -0.1921127289533615, 0.3589555025100708, 0.07821513712406158, -0.10964074730873108, 0.13007555902004242, 0.28783339262008667, 0.19022902846336365, -0.2090023308992386, -0.1163049191236496, -0.23768918216228485, 0.32532262802124023, -0.26515236496925354, 0.14274322986602783, -0.20881347358226776, -0.28257012367248535, 0.21089963614940643, -0.03393242880702019, 0.2929001748561859, -0.37274467945098877, 0.14899113774299622, -0.10232731699943542, -0.06215556710958481, 0.07558619976043701, 0.10423897206783295, -0.22661489248275757, 0.47158321738243103, -0.18890102207660675, 0.10122822970151901, 0.035244327038526535, -0.6336891055107117, -0.43290936946868896, 0.05771062895655632, 0.21425002813339233, -0.10435235500335693, 0.11759047210216522, -0.26505571603775024, 0.04526323452591896, 0.32392263412475586, 0.18269170820713043, -0.035202302038669586, -0.11266933381557465, -0.4177846908569336, -0.14721080660820007, 0.2840811312198639, -0.25805413722991943, -0.24516646564006805, 0.011953882873058319, 0.05279763787984848, -0.0917620062828064, 0.2312353253364563, 0.23829002678394318, -0.18307432532310486, 0.6743608713150024, -0.09393253177404404, -0.2390211820602417, 0.5787598490715027, -0.5383844971656799, -0.03570650517940521, -0.21727153658866882, -0.1931009590625763, -0.19199150800704956, 0.1511499285697937, -0.1073562279343605, 0.01821017824113369, 0.04679085686802864, 0.4387010335922241, 0.039570800960063934, -0.08896063268184662, -0.35619670152664185, -0.19951827824115753, 0.2851070761680603, 0.22790953516960144, 0.04197638854384422, 0.457037091255188, 0.2853609323501587, 0.16951575875282288, -0.0684722289443016, 0.18879786133766174, -0.01803012564778328, -0.2879210114479065, -0.003023650497198105, 0.04003213718533516, -0.3892468214035034, 0.28945958614349365, -0.07791921496391296, 0.2788545787334442, 0.2235237956047058, -0.24662335216999054, 0.08261469006538391, 0.36098021268844604, 0.22368521988391876, -0.4406276345252991, 0.241733118891716, -0.1057097315788269, -0.04801032319664955, 0.07339458167552948, -0.21250596642494202, 0.25192034244537354, -0.04792625457048416, -0.0860949456691742, 0.050406500697135925, -0.4933122396469116, -0.023567913100123405, -0.18944823741912842, 0.06537307798862457, -0.12623330950737, -0.04486054182052612, -0.1458982229232788, -0.015313662588596344, 0.15430937707424164, 0.055686336010694504, -0.26932981610298157, 0.4298384487628937, 0.20296312868595123, -0.14560697972774506, -0.014435209333896637, 0.1559266746044159, -0.14748357236385345, 0.13285960257053375, -0.00933011807501316, -0.1915467083454132, 0.20045901834964752, -0.11410573869943619, 0.05357889086008072, 0.3843778371810913, 0.153572678565979, 0.017122209072113037, -0.10762251913547516, 0.06513606756925583, -0.05021882429718971, 0.20219692587852478, 0.02880106307566166, 0.027019530534744263, 0.44267037510871887, -0.35932356119155884, 0.05806181952357292, -0.37888115644454956, 0.3278767466545105, -0.4405212998390198, 0.3899688124656677, -0.039358556270599365, 0.06011167913675308, -0.010230250656604767, 0.12840625643730164, -0.07261894643306732, -0.37432658672332764, -0.2551703453063965, 0.4715958833694458, -0.047885771840810776, 0.04053543508052826, 0.09536214917898178, -0.07115399092435837, -0.06793035566806793, 0.03044191002845764, 0.34939080476760864, 0.20709438621997833, 0.02127283439040184, 0.04490102827548981, -0.052153874188661575, -0.046546779572963715, -0.1306067854166031, -0.028088826686143875, 0.34937289357185364, -0.22558832168579102, 0.1348802149295807, 0.07528688758611679, 0.21830782294273376, -0.19939979910850525, -0.1545162796974182, -0.20036467909812927, -0.32043784856796265, 0.011569704860448837, 0.14116285741329193, 0.32088997960090637, -0.13763989508152008, 0.13721129298210144, 0.12506914138793945, 0.4607318043708801, 0.2262214720249176, 0.28460341691970825, -0.16365306079387665, 0.04874420538544655, 0.03339012712240219, -0.09795600920915604, -0.21582253277301788, 0.24666333198547363, -0.35236820578575134, 0.07746956497430801, -0.08860091865062714, -0.18456488847732544, -0.1599784940481186, 0.0074026454240083694, 0.22935974597930908, 0.10246646404266357, -0.04207947850227356, -0.25567448139190674, 0.04280494526028633, 0.20963041484355927, -0.2503051459789276, -0.3007621467113495, 0.37455612421035767, -0.05875144153833389, -0.011741088703274727, -0.1317927986383438, -0.14124438166618347, -0.10161937773227692, -0.2883880138397217, -0.03608211874961853, 0.24831844866275787, 0.20629090070724487, 0.2738168239593506, -0.005697150249034166, 0.38143190741539, 0.4019237756729126, -0.054301828145980835, -0.1986667811870575, -0.547450065612793, 0.21483725309371948, -0.09256395697593689, -0.22764690220355988, 0.07016515731811523, -0.0187874473631382, 0.16778212785720825, 0.1912873089313507, -0.2886448800563812, -0.6735842823982239, 0.1889115571975708, 0.2871614992618561, -0.26099395751953125, 0.1604720503091812, 0.2804619073867798, -0.3490058183670044, -0.02871396206319332, -0.28144004940986633, -0.1038905680179596, 0.2245209813117981, 0.08482152968645096, 0.21121609210968018, -0.22107183933258057, 0.46464669704437256, 0.09414063394069672, 0.6489886045455933, 0.029646314680576324, -0.12810508906841278, 0.2985832989215851, 0.1537393480539322, 0.24475663900375366, -0.003853537142276764, -0.1338466852903366, 0.04899367690086365, 0.10641632974147797, -0.20387010276317596, 0.10170253366231918, -0.05574861168861389, 0.06512226164340973, -0.3501715064048767, -0.2313646823167801, 0.047140657901763916, -0.016883928328752518, -0.03693944960832596, -0.41606348752975464, 0.32323452830314636, -0.030121734365820885, 0.26977282762527466, -0.28843674063682556, 0.1355520486831665, 0.13576366007328033, 0.15787220001220703, 0.12880054116249084, -0.05689243972301483, -0.01397007703781128, -0.1706569492816925, -0.2526800036430359, 0.39380186796188354, 0.04983959347009659, 0.29469698667526245, -0.07715722918510437, 0.3258010149002075, -0.108652263879776, 0.1709330826997757, 0.6087875366210938, -0.1312519609928131, 0.03502219170331955, 0.1956072449684143, -0.2016812562942505, -0.355533242225647, -0.0019059181213378906, -0.3041399121284485, 0.16788232326507568, 0.07284602522850037, 0.7506989240646362, -0.024456940591335297, 0.01545153558254242, -0.0228768028318882, 0.3795050084590912, -0.22290480136871338, -0.38663676381111145, -0.2590605914592743, -0.23982635140419006, 0.20202051103115082, 0.054265595972537994, 0.023445742204785347, 0.37088704109191895, 0.11949710547924042, 0.23224984109401703, -0.05669587105512619, 0.19827812910079956, 0.09374948590993881, -0.06490961462259293, 0.011617028154432774, -0.14189772307872772, -0.1390073597431183, 0.054091792553663254, -0.05618642270565033, 0.26517078280448914, 0.0636061355471611, -0.0457773320376873, -0.5454131364822388, 0.1777895987033844, 0.1208340972661972, 0.23880919814109802, -0.08668799698352814, -0.2268010377883911, -0.1198790892958641, -0.045063361525535583, 0.2277992069721222, 0.14756010472774506, 0.10145902633666992, 0.20416070520877838, 0.3210233747959137, -0.2983640432357788, 0.009170543402433395, 0.4024379849433899, 0.27552250027656555, 0.18901143968105316, 0.16548967361450195, -0.23720790445804596, -0.19632305204868317, 0.06787775456905365, 0.3185475170612335, 0.41467636823654175, 0.03828956186771393, -0.3658932149410248, 0.5241263508796692, 0.2566731572151184, 0.1425119936466217, -0.21157746016979218, 0.18147510290145874, -0.10154444724321365, -0.44528883695602417, -0.13050967454910278, -0.2162661999464035, 0.17735639214515686, -0.17593279480934143, -0.10067616403102875, 0.5212770700454712, -0.23743294179439545, -0.059553731232881546, 0.22304993867874146, 0.012430530041456223, -0.21710874140262604, -0.13575375080108643, -0.17353810369968414, 0.09431752562522888, -0.10349401831626892, 0.1680273711681366, -0.25483548641204834, -0.029626954346895218, -0.02584708295762539, -0.05431056395173073, 0.06658469140529633, -0.1761956810951233, -0.31914639472961426, 0.22557853162288666, 0.1246945858001709, -0.307084321975708, 0.0238981693983078, 0.24323983490467072, 0.5752549767494202, -0.06619682908058167, 0.01342645101249218, -0.01246970146894455, -0.14345422387123108, -0.049682583659887314, 0.13969969749450684, -0.12982381880283356, 0.28279295563697815, -0.23514452576637268, 0.0005077645182609558, 0.10691851377487183, -0.22796891629695892, -0.30032581090927124, 0.4230242371559143, 0.03320980444550514, 0.1173316091299057, 0.02987494505941868, 0.06884483993053436, -0.3049267828464508, -0.18181881308555603, -0.19416256248950958, 0.10329550504684448, 0.17514568567276, -0.4289223849773407, 0.3889814019203186, -0.057468194514513016, -0.37502554059028625, 0.2138923555612564, 0.19492626190185547, 0.21536624431610107, -0.2504056990146637, 0.29167640209198, -0.06201159209012985, -0.10555411130189896, -0.0586545392870903, -0.16616131365299225, 0.002894687931984663, -0.019207574427127838, 0.1990184336900711, 0.018567794933915138, 0.3529021143913269, 0.021324440836906433, 0.21171607077121735, 0.3017181158065796, 0.05114571005105972, -0.1592129021883011, -0.736672043800354, -0.20209848880767822, 0.05775054916739464, -0.00010728836059570312, -0.14273467659950256, -0.1370646059513092, 0.21674862504005432, -0.13228538632392883, 0.17602528631687164, -0.25091153383255005, -0.010560475289821625, -0.23500332236289978, 0.15686969459056854, 0.04242141544818878, -0.14871692657470703, 0.22628197073936462, 0.16272389888763428, 0.0156820360571146, 0.22498564422130585, -0.21164487302303314, -0.17873597145080566, 0.10252989828586578, 0.16212204098701477, -0.05981244146823883, -0.06524143368005753, 0.39172905683517456, 0.037119023501873016, -0.3599076271057129, 0.05588171258568764, -0.23021645843982697, 0.3071425259113312, -0.14113031327724457, -0.1288592666387558, 0.16219545900821686, 0.628824770450592, 0.09028367698192596, 0.06734460592269897, 0.005225539207458496, 0.2742743492126465, -0.22512832283973694, 0.18293169140815735, -0.278062641620636, -0.1428380012512207, -0.3569371998310089, -0.15614351630210876, 0.015199333429336548, -0.17302554845809937, 0.291938841342926, -0.28613442182540894, 0.02828994020819664, -0.20887406170368195, 0.36285120248794556, 0.08997934311628342, -0.19754958152770996, 0.047319233417510986, 0.058977916836738586, 0.1172167956829071, -0.08008165657520294, 0.1394037902355194, 0.17287036776542664, 0.038854002952575684, 0.014811050146818161, 0.3321508765220642, -0.011075109243392944, 0.1098475456237793, -0.08268329501152039, -0.08213035762310028, 0.07256656885147095, 0.0972752571105957, -0.04203242063522339, -0.10374777019023895, -0.1657610833644867, 0.14776568114757538, 0.47436708211898804, 0.06687228381633759, 0.21826624870300293, 0.04280182719230652, -0.15228143334388733, 0.3543902039527893, 0.1275821477174759, -0.017383966594934464, -0.2526036500930786, -0.049409329891204834, -0.18363255262374878, 0.02116052806377411, -0.05325588583946228, -0.106214739382267, -0.24890422821044922, 0.08790725469589233, -0.4121103286743164, 0.1509920209646225, -0.21569672226905823, 0.126539409160614, -0.01605157181620598, 0.36916396021842957, -0.30330443382263184, -0.22890794277191162, 0.07839415967464447, -0.21603840589523315, 0.2938556969165802, 0.1115017831325531, -0.2649545967578888, -0.002756670117378235, -0.21851421892642975, 0.12513211369514465, -0.43486487865448, 0.5451759696006775, 0.23035699129104614, -0.317750483751297, 0.19501563906669617, 0.22116196155548096, 0.2615065276622772, -0.08305943012237549, 0.3307040333747864, 0.4944118857383728, 0.43111005425453186, -0.05471364036202431, 0.10258465260267258, 0.15072239935398102, -0.1535886824131012, 0.11900441348552704, 0.15927022695541382, 0.11580687761306763, -0.24258451163768768, 0.5202119946479797, 0.1174396276473999, -0.233567476272583, 0.3855021595954895, -0.23767490684986115, 0.49250224232673645, -0.3898623287677765, 0.05855400487780571, -0.02034527063369751, 0.034126587212085724, -0.31856879591941833, -0.07538380473852158, -0.1556568443775177, 0.1755647361278534, -0.19997525215148926, 0.032710328698158264, 0.07609115540981293, -0.07860632240772247, 0.05257006734609604, -0.29893890023231506, 0.3373311460018158, 0.33182471990585327, 0.29736608266830444, -0.3848652243614197, -0.006085388362407684, -0.4286867678165436, 0.13914057612419128, 0.020971840247511864, 0.08024805784225464, -0.011607721447944641, 0.04082636535167694, 0.042141541838645935, 0.2475111037492752, 0.4816514253616333, 0.09791293740272522, 0.12359272688627243, 0.20239843428134918, -0.44705942273139954, -0.17580202221870422, -0.15730878710746765, -0.34789299964904785, 0.09996215999126434, -0.21297237277030945, -0.02906353399157524, -0.3214385509490967, 0.0842481181025505, 0.033677298575639725, -0.042301177978515625, 0.23204082250595093, 0.6045461893081665, 0.2200203388929367, 0.06722771376371384, 0.45856815576553345, 0.0525992289185524, 0.18947520852088928, 0.3232189118862152, -0.021869855001568794, -0.25430557131767273, 0.062313683331012726, -0.0039303600788116455, 0.2870970666408539, -0.06634598225355148, -0.2871372401714325, -0.19541755318641663, 0.6739616394042969, 0.061697788536548615, -0.5848388671875, -0.06301738321781158, 0.12143882364034653, 0.02117238938808441, -0.13311749696731567, 0.4323016405105591, 0.06679853796958923, 0.19644835591316223, 0.21623019874095917, -0.2929877042770386, 0.021637169644236565, 0.4165512025356293, -0.17256903648376465, -0.3824043571949005, -0.062386270612478256, 0.13734346628189087, 0.19881469011306763, -0.24341022968292236, -0.465519517660141, 0.08241627365350723, 0.41984879970550537, -0.14236870408058167, -0.1497417390346527, 0.1252378225326538, -0.3407677114009857, 0.27485474944114685, 0.24066388607025146, 0.003970049321651459, -0.20934706926345825, -0.23140116035938263, -0.021755510941147804, -0.13187085092067719 ]
https://github.com/huggingface/datasets/issues/2363
Trying to use metric.compute but get OSError
Hi @hyusterr, If you look at the example provided in `metrics/accuracy.py`, it only does `metric.compute()` to calculate the accuracy. Here's an example: ``` from datasets import load_metric metric = load_metric('accuracy') output = metric.compute(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0]) print(output['accuracy']) # 0.5 ```
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0
44
Trying to use metric.compute but get OSError I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0 Hi @hyusterr, If you look at the example provided in `metrics/accuracy.py`, it only does `metric.compute()` to calculate the accuracy. Here's an example: ``` from datasets import load_metric metric = load_metric('accuracy') output = metric.compute(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0]) print(output['accuracy']) # 0.5 ```
[ -0.39441871643066406, -0.2529717683792114, -0.0330117791891098, 0.3631945252418518, 0.25313127040863037, -0.10110492259263992, 0.23285265266895294, 0.1392669528722763, 0.2106887251138687, 0.6745789051055908, -0.02712155133485794, 0.06741391122341156, -0.056197576224803925, 0.0007949601858854294, -0.14105334877967834, -0.16666460037231445, -0.12399386614561081, 0.012945204973220825, 0.000006996095180511475, 0.07801619172096252, -0.33733370900154114, 0.04249408468604088, -0.22039325535297394, 0.07182266563177109, -0.05419914424419403, -0.20792561769485474, 0.2063426524400711, 0.04261410981416702, -0.5113475322723389, -0.23875127732753754, 0.23515252768993378, -0.32088443636894226, 0.21703073382377625, 0.8475169539451599, -0.00011492488556541502, 0.13263964653015137, 0.008718930184841156, -0.10041088610887527, -0.09454882144927979, -0.2760726809501648, 0.21046999096870422, -0.21029651165008545, 0.0614100843667984, -0.28949618339538574, 0.14162468910217285, -0.025002069771289825, -0.20491598546504974, -0.33479106426239014, 0.2580508887767792, 0.5588134527206421, 0.10943873971700668, 0.48057714104652405, 0.05719009414315224, -0.1703309416770935, -0.37479469180107117, -0.34424513578414917, 0.03925873339176178, 0.6707539558410645, -0.09424638748168945, -0.12500537931919098, -0.0927228108048439, -0.03975598141551018, 0.23412802815437317, 0.08773238956928253, 0.20651566982269287, -0.13264800608158112, 0.8326208591461182, -0.22519150376319885, -0.14898806810379028, -0.05729646980762482, 0.10047969222068787, 0.054225921630859375, -0.36622706055641174, 0.321256160736084, -0.06409875303506851, -0.7123776078224182, -0.008344672620296478, -0.05547697842121124, -0.3298594057559967, -0.16635359823703766, -0.3520742356777191, -0.01619769260287285, -0.46709489822387695, 0.06509102135896683, -0.2273934930562973, 0.26917362213134766, -0.1618950366973877, 0.07616375386714935, 0.31423529982566833, 0.33564484119415283, 0.07203634083271027, -0.028517212718725204, 0.16787388920783997, 0.2304375171661377, -0.5341541767120361, -0.007972493767738342, -0.1267387568950653, -0.09359436482191086, -0.23412004113197327, -0.2478044480085373, 0.3044131100177765, 0.02293405868113041, 0.23922809958457947, 0.27803128957748413, -0.19586119055747986, 0.8154187202453613, 0.08282097429037094, 0.1414991319179535, 0.028899652883410454, 0.3671554625034332, -0.07615020126104355, -0.07633625715970993, -0.06664737313985825, -0.3928148150444031, 0.330564945936203, 0.1671803891658783, -0.17894987761974335, -0.0470934621989727, -0.5103239417076111, -0.08257179707288742, -0.3074183166027069, -0.1921127289533615, 0.3589555025100708, 0.07821513712406158, -0.10964074730873108, 0.13007555902004242, 0.28783339262008667, 0.19022902846336365, -0.2090023308992386, -0.1163049191236496, -0.23768918216228485, 0.32532262802124023, -0.26515236496925354, 0.14274322986602783, -0.20881347358226776, -0.28257012367248535, 0.21089963614940643, -0.03393242880702019, 0.2929001748561859, -0.37274467945098877, 0.14899113774299622, -0.10232731699943542, -0.06215556710958481, 0.07558619976043701, 0.10423897206783295, -0.22661489248275757, 0.47158321738243103, -0.18890102207660675, 0.10122822970151901, 0.035244327038526535, -0.6336891055107117, -0.43290936946868896, 0.05771062895655632, 0.21425002813339233, -0.10435235500335693, 0.11759047210216522, -0.26505571603775024, 0.04526323452591896, 0.32392263412475586, 0.18269170820713043, -0.035202302038669586, -0.11266933381557465, -0.4177846908569336, -0.14721080660820007, 0.2840811312198639, -0.25805413722991943, -0.24516646564006805, 0.011953882873058319, 0.05279763787984848, -0.0917620062828064, 0.2312353253364563, 0.23829002678394318, -0.18307432532310486, 0.6743608713150024, -0.09393253177404404, -0.2390211820602417, 0.5787598490715027, -0.5383844971656799, -0.03570650517940521, -0.21727153658866882, -0.1931009590625763, -0.19199150800704956, 0.1511499285697937, -0.1073562279343605, 0.01821017824113369, 0.04679085686802864, 0.4387010335922241, 0.039570800960063934, -0.08896063268184662, -0.35619670152664185, -0.19951827824115753, 0.2851070761680603, 0.22790953516960144, 0.04197638854384422, 0.457037091255188, 0.2853609323501587, 0.16951575875282288, -0.0684722289443016, 0.18879786133766174, -0.01803012564778328, -0.2879210114479065, -0.003023650497198105, 0.04003213718533516, -0.3892468214035034, 0.28945958614349365, -0.07791921496391296, 0.2788545787334442, 0.2235237956047058, -0.24662335216999054, 0.08261469006538391, 0.36098021268844604, 0.22368521988391876, -0.4406276345252991, 0.241733118891716, -0.1057097315788269, -0.04801032319664955, 0.07339458167552948, -0.21250596642494202, 0.25192034244537354, -0.04792625457048416, -0.0860949456691742, 0.050406500697135925, -0.4933122396469116, -0.023567913100123405, -0.18944823741912842, 0.06537307798862457, -0.12623330950737, -0.04486054182052612, -0.1458982229232788, -0.015313662588596344, 0.15430937707424164, 0.055686336010694504, -0.26932981610298157, 0.4298384487628937, 0.20296312868595123, -0.14560697972774506, -0.014435209333896637, 0.1559266746044159, -0.14748357236385345, 0.13285960257053375, -0.00933011807501316, -0.1915467083454132, 0.20045901834964752, -0.11410573869943619, 0.05357889086008072, 0.3843778371810913, 0.153572678565979, 0.017122209072113037, -0.10762251913547516, 0.06513606756925583, -0.05021882429718971, 0.20219692587852478, 0.02880106307566166, 0.027019530534744263, 0.44267037510871887, -0.35932356119155884, 0.05806181952357292, -0.37888115644454956, 0.3278767466545105, -0.4405212998390198, 0.3899688124656677, -0.039358556270599365, 0.06011167913675308, -0.010230250656604767, 0.12840625643730164, -0.07261894643306732, -0.37432658672332764, -0.2551703453063965, 0.4715958833694458, -0.047885771840810776, 0.04053543508052826, 0.09536214917898178, -0.07115399092435837, -0.06793035566806793, 0.03044191002845764, 0.34939080476760864, 0.20709438621997833, 0.02127283439040184, 0.04490102827548981, -0.052153874188661575, -0.046546779572963715, -0.1306067854166031, -0.028088826686143875, 0.34937289357185364, -0.22558832168579102, 0.1348802149295807, 0.07528688758611679, 0.21830782294273376, -0.19939979910850525, -0.1545162796974182, -0.20036467909812927, -0.32043784856796265, 0.011569704860448837, 0.14116285741329193, 0.32088997960090637, -0.13763989508152008, 0.13721129298210144, 0.12506914138793945, 0.4607318043708801, 0.2262214720249176, 0.28460341691970825, -0.16365306079387665, 0.04874420538544655, 0.03339012712240219, -0.09795600920915604, -0.21582253277301788, 0.24666333198547363, -0.35236820578575134, 0.07746956497430801, -0.08860091865062714, -0.18456488847732544, -0.1599784940481186, 0.0074026454240083694, 0.22935974597930908, 0.10246646404266357, -0.04207947850227356, -0.25567448139190674, 0.04280494526028633, 0.20963041484355927, -0.2503051459789276, -0.3007621467113495, 0.37455612421035767, -0.05875144153833389, -0.011741088703274727, -0.1317927986383438, -0.14124438166618347, -0.10161937773227692, -0.2883880138397217, -0.03608211874961853, 0.24831844866275787, 0.20629090070724487, 0.2738168239593506, -0.005697150249034166, 0.38143190741539, 0.4019237756729126, -0.054301828145980835, -0.1986667811870575, -0.547450065612793, 0.21483725309371948, -0.09256395697593689, -0.22764690220355988, 0.07016515731811523, -0.0187874473631382, 0.16778212785720825, 0.1912873089313507, -0.2886448800563812, -0.6735842823982239, 0.1889115571975708, 0.2871614992618561, -0.26099395751953125, 0.1604720503091812, 0.2804619073867798, -0.3490058183670044, -0.02871396206319332, -0.28144004940986633, -0.1038905680179596, 0.2245209813117981, 0.08482152968645096, 0.21121609210968018, -0.22107183933258057, 0.46464669704437256, 0.09414063394069672, 0.6489886045455933, 0.029646314680576324, -0.12810508906841278, 0.2985832989215851, 0.1537393480539322, 0.24475663900375366, -0.003853537142276764, -0.1338466852903366, 0.04899367690086365, 0.10641632974147797, -0.20387010276317596, 0.10170253366231918, -0.05574861168861389, 0.06512226164340973, -0.3501715064048767, -0.2313646823167801, 0.047140657901763916, -0.016883928328752518, -0.03693944960832596, -0.41606348752975464, 0.32323452830314636, -0.030121734365820885, 0.26977282762527466, -0.28843674063682556, 0.1355520486831665, 0.13576366007328033, 0.15787220001220703, 0.12880054116249084, -0.05689243972301483, -0.01397007703781128, -0.1706569492816925, -0.2526800036430359, 0.39380186796188354, 0.04983959347009659, 0.29469698667526245, -0.07715722918510437, 0.3258010149002075, -0.108652263879776, 0.1709330826997757, 0.6087875366210938, -0.1312519609928131, 0.03502219170331955, 0.1956072449684143, -0.2016812562942505, -0.355533242225647, -0.0019059181213378906, -0.3041399121284485, 0.16788232326507568, 0.07284602522850037, 0.7506989240646362, -0.024456940591335297, 0.01545153558254242, -0.0228768028318882, 0.3795050084590912, -0.22290480136871338, -0.38663676381111145, -0.2590605914592743, -0.23982635140419006, 0.20202051103115082, 0.054265595972537994, 0.023445742204785347, 0.37088704109191895, 0.11949710547924042, 0.23224984109401703, -0.05669587105512619, 0.19827812910079956, 0.09374948590993881, -0.06490961462259293, 0.011617028154432774, -0.14189772307872772, -0.1390073597431183, 0.054091792553663254, -0.05618642270565033, 0.26517078280448914, 0.0636061355471611, -0.0457773320376873, -0.5454131364822388, 0.1777895987033844, 0.1208340972661972, 0.23880919814109802, -0.08668799698352814, -0.2268010377883911, -0.1198790892958641, -0.045063361525535583, 0.2277992069721222, 0.14756010472774506, 0.10145902633666992, 0.20416070520877838, 0.3210233747959137, -0.2983640432357788, 0.009170543402433395, 0.4024379849433899, 0.27552250027656555, 0.18901143968105316, 0.16548967361450195, -0.23720790445804596, -0.19632305204868317, 0.06787775456905365, 0.3185475170612335, 0.41467636823654175, 0.03828956186771393, -0.3658932149410248, 0.5241263508796692, 0.2566731572151184, 0.1425119936466217, -0.21157746016979218, 0.18147510290145874, -0.10154444724321365, -0.44528883695602417, -0.13050967454910278, -0.2162661999464035, 0.17735639214515686, -0.17593279480934143, -0.10067616403102875, 0.5212770700454712, -0.23743294179439545, -0.059553731232881546, 0.22304993867874146, 0.012430530041456223, -0.21710874140262604, -0.13575375080108643, -0.17353810369968414, 0.09431752562522888, -0.10349401831626892, 0.1680273711681366, -0.25483548641204834, -0.029626954346895218, -0.02584708295762539, -0.05431056395173073, 0.06658469140529633, -0.1761956810951233, -0.31914639472961426, 0.22557853162288666, 0.1246945858001709, -0.307084321975708, 0.0238981693983078, 0.24323983490467072, 0.5752549767494202, -0.06619682908058167, 0.01342645101249218, -0.01246970146894455, -0.14345422387123108, -0.049682583659887314, 0.13969969749450684, -0.12982381880283356, 0.28279295563697815, -0.23514452576637268, 0.0005077645182609558, 0.10691851377487183, -0.22796891629695892, -0.30032581090927124, 0.4230242371559143, 0.03320980444550514, 0.1173316091299057, 0.02987494505941868, 0.06884483993053436, -0.3049267828464508, -0.18181881308555603, -0.19416256248950958, 0.10329550504684448, 0.17514568567276, -0.4289223849773407, 0.3889814019203186, -0.057468194514513016, -0.37502554059028625, 0.2138923555612564, 0.19492626190185547, 0.21536624431610107, -0.2504056990146637, 0.29167640209198, -0.06201159209012985, -0.10555411130189896, -0.0586545392870903, -0.16616131365299225, 0.002894687931984663, -0.019207574427127838, 0.1990184336900711, 0.018567794933915138, 0.3529021143913269, 0.021324440836906433, 0.21171607077121735, 0.3017181158065796, 0.05114571005105972, -0.1592129021883011, -0.736672043800354, -0.20209848880767822, 0.05775054916739464, -0.00010728836059570312, -0.14273467659950256, -0.1370646059513092, 0.21674862504005432, -0.13228538632392883, 0.17602528631687164, -0.25091153383255005, -0.010560475289821625, -0.23500332236289978, 0.15686969459056854, 0.04242141544818878, -0.14871692657470703, 0.22628197073936462, 0.16272389888763428, 0.0156820360571146, 0.22498564422130585, -0.21164487302303314, -0.17873597145080566, 0.10252989828586578, 0.16212204098701477, -0.05981244146823883, -0.06524143368005753, 0.39172905683517456, 0.037119023501873016, -0.3599076271057129, 0.05588171258568764, -0.23021645843982697, 0.3071425259113312, -0.14113031327724457, -0.1288592666387558, 0.16219545900821686, 0.628824770450592, 0.09028367698192596, 0.06734460592269897, 0.005225539207458496, 0.2742743492126465, -0.22512832283973694, 0.18293169140815735, -0.278062641620636, -0.1428380012512207, -0.3569371998310089, -0.15614351630210876, 0.015199333429336548, -0.17302554845809937, 0.291938841342926, -0.28613442182540894, 0.02828994020819664, -0.20887406170368195, 0.36285120248794556, 0.08997934311628342, -0.19754958152770996, 0.047319233417510986, 0.058977916836738586, 0.1172167956829071, -0.08008165657520294, 0.1394037902355194, 0.17287036776542664, 0.038854002952575684, 0.014811050146818161, 0.3321508765220642, -0.011075109243392944, 0.1098475456237793, -0.08268329501152039, -0.08213035762310028, 0.07256656885147095, 0.0972752571105957, -0.04203242063522339, -0.10374777019023895, -0.1657610833644867, 0.14776568114757538, 0.47436708211898804, 0.06687228381633759, 0.21826624870300293, 0.04280182719230652, -0.15228143334388733, 0.3543902039527893, 0.1275821477174759, -0.017383966594934464, -0.2526036500930786, -0.049409329891204834, -0.18363255262374878, 0.02116052806377411, -0.05325588583946228, -0.106214739382267, -0.24890422821044922, 0.08790725469589233, -0.4121103286743164, 0.1509920209646225, -0.21569672226905823, 0.126539409160614, -0.01605157181620598, 0.36916396021842957, -0.30330443382263184, -0.22890794277191162, 0.07839415967464447, -0.21603840589523315, 0.2938556969165802, 0.1115017831325531, -0.2649545967578888, -0.002756670117378235, -0.21851421892642975, 0.12513211369514465, -0.43486487865448, 0.5451759696006775, 0.23035699129104614, -0.317750483751297, 0.19501563906669617, 0.22116196155548096, 0.2615065276622772, -0.08305943012237549, 0.3307040333747864, 0.4944118857383728, 0.43111005425453186, -0.05471364036202431, 0.10258465260267258, 0.15072239935398102, -0.1535886824131012, 0.11900441348552704, 0.15927022695541382, 0.11580687761306763, -0.24258451163768768, 0.5202119946479797, 0.1174396276473999, -0.233567476272583, 0.3855021595954895, -0.23767490684986115, 0.49250224232673645, -0.3898623287677765, 0.05855400487780571, -0.02034527063369751, 0.034126587212085724, -0.31856879591941833, -0.07538380473852158, -0.1556568443775177, 0.1755647361278534, -0.19997525215148926, 0.032710328698158264, 0.07609115540981293, -0.07860632240772247, 0.05257006734609604, -0.29893890023231506, 0.3373311460018158, 0.33182471990585327, 0.29736608266830444, -0.3848652243614197, -0.006085388362407684, -0.4286867678165436, 0.13914057612419128, 0.020971840247511864, 0.08024805784225464, -0.011607721447944641, 0.04082636535167694, 0.042141541838645935, 0.2475111037492752, 0.4816514253616333, 0.09791293740272522, 0.12359272688627243, 0.20239843428134918, -0.44705942273139954, -0.17580202221870422, -0.15730878710746765, -0.34789299964904785, 0.09996215999126434, -0.21297237277030945, -0.02906353399157524, -0.3214385509490967, 0.0842481181025505, 0.033677298575639725, -0.042301177978515625, 0.23204082250595093, 0.6045461893081665, 0.2200203388929367, 0.06722771376371384, 0.45856815576553345, 0.0525992289185524, 0.18947520852088928, 0.3232189118862152, -0.021869855001568794, -0.25430557131767273, 0.062313683331012726, -0.0039303600788116455, 0.2870970666408539, -0.06634598225355148, -0.2871372401714325, -0.19541755318641663, 0.6739616394042969, 0.061697788536548615, -0.5848388671875, -0.06301738321781158, 0.12143882364034653, 0.02117238938808441, -0.13311749696731567, 0.4323016405105591, 0.06679853796958923, 0.19644835591316223, 0.21623019874095917, -0.2929877042770386, 0.021637169644236565, 0.4165512025356293, -0.17256903648376465, -0.3824043571949005, -0.062386270612478256, 0.13734346628189087, 0.19881469011306763, -0.24341022968292236, -0.465519517660141, 0.08241627365350723, 0.41984879970550537, -0.14236870408058167, -0.1497417390346527, 0.1252378225326538, -0.3407677114009857, 0.27485474944114685, 0.24066388607025146, 0.003970049321651459, -0.20934706926345825, -0.23140116035938263, -0.021755510941147804, -0.13187085092067719 ]
https://github.com/huggingface/datasets/issues/2363
Trying to use metric.compute but get OSError
I thought I can use Metric to collect predictions and references, this follows the step from huggingface's sample colab. BTW, I fix the problem by setting other cache_dir in load_metric, but I'm still wondering about the mechanism.
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0
37
Trying to use metric.compute but get OSError I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0 I thought I can use Metric to collect predictions and references, this follows the step from huggingface's sample colab. BTW, I fix the problem by setting other cache_dir in load_metric, but I'm still wondering about the mechanism.
[ -0.39441871643066406, -0.2529717683792114, -0.0330117791891098, 0.3631945252418518, 0.25313127040863037, -0.10110492259263992, 0.23285265266895294, 0.1392669528722763, 0.2106887251138687, 0.6745789051055908, -0.02712155133485794, 0.06741391122341156, -0.056197576224803925, 0.0007949601858854294, -0.14105334877967834, -0.16666460037231445, -0.12399386614561081, 0.012945204973220825, 0.000006996095180511475, 0.07801619172096252, -0.33733370900154114, 0.04249408468604088, -0.22039325535297394, 0.07182266563177109, -0.05419914424419403, -0.20792561769485474, 0.2063426524400711, 0.04261410981416702, -0.5113475322723389, -0.23875127732753754, 0.23515252768993378, -0.32088443636894226, 0.21703073382377625, 0.8475169539451599, -0.00011492488556541502, 0.13263964653015137, 0.008718930184841156, -0.10041088610887527, -0.09454882144927979, -0.2760726809501648, 0.21046999096870422, -0.21029651165008545, 0.0614100843667984, -0.28949618339538574, 0.14162468910217285, -0.025002069771289825, -0.20491598546504974, -0.33479106426239014, 0.2580508887767792, 0.5588134527206421, 0.10943873971700668, 0.48057714104652405, 0.05719009414315224, -0.1703309416770935, -0.37479469180107117, -0.34424513578414917, 0.03925873339176178, 0.6707539558410645, -0.09424638748168945, -0.12500537931919098, -0.0927228108048439, -0.03975598141551018, 0.23412802815437317, 0.08773238956928253, 0.20651566982269287, -0.13264800608158112, 0.8326208591461182, -0.22519150376319885, -0.14898806810379028, -0.05729646980762482, 0.10047969222068787, 0.054225921630859375, -0.36622706055641174, 0.321256160736084, -0.06409875303506851, -0.7123776078224182, -0.008344672620296478, -0.05547697842121124, -0.3298594057559967, -0.16635359823703766, -0.3520742356777191, -0.01619769260287285, -0.46709489822387695, 0.06509102135896683, -0.2273934930562973, 0.26917362213134766, -0.1618950366973877, 0.07616375386714935, 0.31423529982566833, 0.33564484119415283, 0.07203634083271027, -0.028517212718725204, 0.16787388920783997, 0.2304375171661377, -0.5341541767120361, -0.007972493767738342, -0.1267387568950653, -0.09359436482191086, -0.23412004113197327, -0.2478044480085373, 0.3044131100177765, 0.02293405868113041, 0.23922809958457947, 0.27803128957748413, -0.19586119055747986, 0.8154187202453613, 0.08282097429037094, 0.1414991319179535, 0.028899652883410454, 0.3671554625034332, -0.07615020126104355, -0.07633625715970993, -0.06664737313985825, -0.3928148150444031, 0.330564945936203, 0.1671803891658783, -0.17894987761974335, -0.0470934621989727, -0.5103239417076111, -0.08257179707288742, -0.3074183166027069, -0.1921127289533615, 0.3589555025100708, 0.07821513712406158, -0.10964074730873108, 0.13007555902004242, 0.28783339262008667, 0.19022902846336365, -0.2090023308992386, -0.1163049191236496, -0.23768918216228485, 0.32532262802124023, -0.26515236496925354, 0.14274322986602783, -0.20881347358226776, -0.28257012367248535, 0.21089963614940643, -0.03393242880702019, 0.2929001748561859, -0.37274467945098877, 0.14899113774299622, -0.10232731699943542, -0.06215556710958481, 0.07558619976043701, 0.10423897206783295, -0.22661489248275757, 0.47158321738243103, -0.18890102207660675, 0.10122822970151901, 0.035244327038526535, -0.6336891055107117, -0.43290936946868896, 0.05771062895655632, 0.21425002813339233, -0.10435235500335693, 0.11759047210216522, -0.26505571603775024, 0.04526323452591896, 0.32392263412475586, 0.18269170820713043, -0.035202302038669586, -0.11266933381557465, -0.4177846908569336, -0.14721080660820007, 0.2840811312198639, -0.25805413722991943, -0.24516646564006805, 0.011953882873058319, 0.05279763787984848, -0.0917620062828064, 0.2312353253364563, 0.23829002678394318, -0.18307432532310486, 0.6743608713150024, -0.09393253177404404, -0.2390211820602417, 0.5787598490715027, -0.5383844971656799, -0.03570650517940521, -0.21727153658866882, -0.1931009590625763, -0.19199150800704956, 0.1511499285697937, -0.1073562279343605, 0.01821017824113369, 0.04679085686802864, 0.4387010335922241, 0.039570800960063934, -0.08896063268184662, -0.35619670152664185, -0.19951827824115753, 0.2851070761680603, 0.22790953516960144, 0.04197638854384422, 0.457037091255188, 0.2853609323501587, 0.16951575875282288, -0.0684722289443016, 0.18879786133766174, -0.01803012564778328, -0.2879210114479065, -0.003023650497198105, 0.04003213718533516, -0.3892468214035034, 0.28945958614349365, -0.07791921496391296, 0.2788545787334442, 0.2235237956047058, -0.24662335216999054, 0.08261469006538391, 0.36098021268844604, 0.22368521988391876, -0.4406276345252991, 0.241733118891716, -0.1057097315788269, -0.04801032319664955, 0.07339458167552948, -0.21250596642494202, 0.25192034244537354, -0.04792625457048416, -0.0860949456691742, 0.050406500697135925, -0.4933122396469116, -0.023567913100123405, -0.18944823741912842, 0.06537307798862457, -0.12623330950737, -0.04486054182052612, -0.1458982229232788, -0.015313662588596344, 0.15430937707424164, 0.055686336010694504, -0.26932981610298157, 0.4298384487628937, 0.20296312868595123, -0.14560697972774506, -0.014435209333896637, 0.1559266746044159, -0.14748357236385345, 0.13285960257053375, -0.00933011807501316, -0.1915467083454132, 0.20045901834964752, -0.11410573869943619, 0.05357889086008072, 0.3843778371810913, 0.153572678565979, 0.017122209072113037, -0.10762251913547516, 0.06513606756925583, -0.05021882429718971, 0.20219692587852478, 0.02880106307566166, 0.027019530534744263, 0.44267037510871887, -0.35932356119155884, 0.05806181952357292, -0.37888115644454956, 0.3278767466545105, -0.4405212998390198, 0.3899688124656677, -0.039358556270599365, 0.06011167913675308, -0.010230250656604767, 0.12840625643730164, -0.07261894643306732, -0.37432658672332764, -0.2551703453063965, 0.4715958833694458, -0.047885771840810776, 0.04053543508052826, 0.09536214917898178, -0.07115399092435837, -0.06793035566806793, 0.03044191002845764, 0.34939080476760864, 0.20709438621997833, 0.02127283439040184, 0.04490102827548981, -0.052153874188661575, -0.046546779572963715, -0.1306067854166031, -0.028088826686143875, 0.34937289357185364, -0.22558832168579102, 0.1348802149295807, 0.07528688758611679, 0.21830782294273376, -0.19939979910850525, -0.1545162796974182, -0.20036467909812927, -0.32043784856796265, 0.011569704860448837, 0.14116285741329193, 0.32088997960090637, -0.13763989508152008, 0.13721129298210144, 0.12506914138793945, 0.4607318043708801, 0.2262214720249176, 0.28460341691970825, -0.16365306079387665, 0.04874420538544655, 0.03339012712240219, -0.09795600920915604, -0.21582253277301788, 0.24666333198547363, -0.35236820578575134, 0.07746956497430801, -0.08860091865062714, -0.18456488847732544, -0.1599784940481186, 0.0074026454240083694, 0.22935974597930908, 0.10246646404266357, -0.04207947850227356, -0.25567448139190674, 0.04280494526028633, 0.20963041484355927, -0.2503051459789276, -0.3007621467113495, 0.37455612421035767, -0.05875144153833389, -0.011741088703274727, -0.1317927986383438, -0.14124438166618347, -0.10161937773227692, -0.2883880138397217, -0.03608211874961853, 0.24831844866275787, 0.20629090070724487, 0.2738168239593506, -0.005697150249034166, 0.38143190741539, 0.4019237756729126, -0.054301828145980835, -0.1986667811870575, -0.547450065612793, 0.21483725309371948, -0.09256395697593689, -0.22764690220355988, 0.07016515731811523, -0.0187874473631382, 0.16778212785720825, 0.1912873089313507, -0.2886448800563812, -0.6735842823982239, 0.1889115571975708, 0.2871614992618561, -0.26099395751953125, 0.1604720503091812, 0.2804619073867798, -0.3490058183670044, -0.02871396206319332, -0.28144004940986633, -0.1038905680179596, 0.2245209813117981, 0.08482152968645096, 0.21121609210968018, -0.22107183933258057, 0.46464669704437256, 0.09414063394069672, 0.6489886045455933, 0.029646314680576324, -0.12810508906841278, 0.2985832989215851, 0.1537393480539322, 0.24475663900375366, -0.003853537142276764, -0.1338466852903366, 0.04899367690086365, 0.10641632974147797, -0.20387010276317596, 0.10170253366231918, -0.05574861168861389, 0.06512226164340973, -0.3501715064048767, -0.2313646823167801, 0.047140657901763916, -0.016883928328752518, -0.03693944960832596, -0.41606348752975464, 0.32323452830314636, -0.030121734365820885, 0.26977282762527466, -0.28843674063682556, 0.1355520486831665, 0.13576366007328033, 0.15787220001220703, 0.12880054116249084, -0.05689243972301483, -0.01397007703781128, -0.1706569492816925, -0.2526800036430359, 0.39380186796188354, 0.04983959347009659, 0.29469698667526245, -0.07715722918510437, 0.3258010149002075, -0.108652263879776, 0.1709330826997757, 0.6087875366210938, -0.1312519609928131, 0.03502219170331955, 0.1956072449684143, -0.2016812562942505, -0.355533242225647, -0.0019059181213378906, -0.3041399121284485, 0.16788232326507568, 0.07284602522850037, 0.7506989240646362, -0.024456940591335297, 0.01545153558254242, -0.0228768028318882, 0.3795050084590912, -0.22290480136871338, -0.38663676381111145, -0.2590605914592743, -0.23982635140419006, 0.20202051103115082, 0.054265595972537994, 0.023445742204785347, 0.37088704109191895, 0.11949710547924042, 0.23224984109401703, -0.05669587105512619, 0.19827812910079956, 0.09374948590993881, -0.06490961462259293, 0.011617028154432774, -0.14189772307872772, -0.1390073597431183, 0.054091792553663254, -0.05618642270565033, 0.26517078280448914, 0.0636061355471611, -0.0457773320376873, -0.5454131364822388, 0.1777895987033844, 0.1208340972661972, 0.23880919814109802, -0.08668799698352814, -0.2268010377883911, -0.1198790892958641, -0.045063361525535583, 0.2277992069721222, 0.14756010472774506, 0.10145902633666992, 0.20416070520877838, 0.3210233747959137, -0.2983640432357788, 0.009170543402433395, 0.4024379849433899, 0.27552250027656555, 0.18901143968105316, 0.16548967361450195, -0.23720790445804596, -0.19632305204868317, 0.06787775456905365, 0.3185475170612335, 0.41467636823654175, 0.03828956186771393, -0.3658932149410248, 0.5241263508796692, 0.2566731572151184, 0.1425119936466217, -0.21157746016979218, 0.18147510290145874, -0.10154444724321365, -0.44528883695602417, -0.13050967454910278, -0.2162661999464035, 0.17735639214515686, -0.17593279480934143, -0.10067616403102875, 0.5212770700454712, -0.23743294179439545, -0.059553731232881546, 0.22304993867874146, 0.012430530041456223, -0.21710874140262604, -0.13575375080108643, -0.17353810369968414, 0.09431752562522888, -0.10349401831626892, 0.1680273711681366, -0.25483548641204834, -0.029626954346895218, -0.02584708295762539, -0.05431056395173073, 0.06658469140529633, -0.1761956810951233, -0.31914639472961426, 0.22557853162288666, 0.1246945858001709, -0.307084321975708, 0.0238981693983078, 0.24323983490467072, 0.5752549767494202, -0.06619682908058167, 0.01342645101249218, -0.01246970146894455, -0.14345422387123108, -0.049682583659887314, 0.13969969749450684, -0.12982381880283356, 0.28279295563697815, -0.23514452576637268, 0.0005077645182609558, 0.10691851377487183, -0.22796891629695892, -0.30032581090927124, 0.4230242371559143, 0.03320980444550514, 0.1173316091299057, 0.02987494505941868, 0.06884483993053436, -0.3049267828464508, -0.18181881308555603, -0.19416256248950958, 0.10329550504684448, 0.17514568567276, -0.4289223849773407, 0.3889814019203186, -0.057468194514513016, -0.37502554059028625, 0.2138923555612564, 0.19492626190185547, 0.21536624431610107, -0.2504056990146637, 0.29167640209198, -0.06201159209012985, -0.10555411130189896, -0.0586545392870903, -0.16616131365299225, 0.002894687931984663, -0.019207574427127838, 0.1990184336900711, 0.018567794933915138, 0.3529021143913269, 0.021324440836906433, 0.21171607077121735, 0.3017181158065796, 0.05114571005105972, -0.1592129021883011, -0.736672043800354, -0.20209848880767822, 0.05775054916739464, -0.00010728836059570312, -0.14273467659950256, -0.1370646059513092, 0.21674862504005432, -0.13228538632392883, 0.17602528631687164, -0.25091153383255005, -0.010560475289821625, -0.23500332236289978, 0.15686969459056854, 0.04242141544818878, -0.14871692657470703, 0.22628197073936462, 0.16272389888763428, 0.0156820360571146, 0.22498564422130585, -0.21164487302303314, -0.17873597145080566, 0.10252989828586578, 0.16212204098701477, -0.05981244146823883, -0.06524143368005753, 0.39172905683517456, 0.037119023501873016, -0.3599076271057129, 0.05588171258568764, -0.23021645843982697, 0.3071425259113312, -0.14113031327724457, -0.1288592666387558, 0.16219545900821686, 0.628824770450592, 0.09028367698192596, 0.06734460592269897, 0.005225539207458496, 0.2742743492126465, -0.22512832283973694, 0.18293169140815735, -0.278062641620636, -0.1428380012512207, -0.3569371998310089, -0.15614351630210876, 0.015199333429336548, -0.17302554845809937, 0.291938841342926, -0.28613442182540894, 0.02828994020819664, -0.20887406170368195, 0.36285120248794556, 0.08997934311628342, -0.19754958152770996, 0.047319233417510986, 0.058977916836738586, 0.1172167956829071, -0.08008165657520294, 0.1394037902355194, 0.17287036776542664, 0.038854002952575684, 0.014811050146818161, 0.3321508765220642, -0.011075109243392944, 0.1098475456237793, -0.08268329501152039, -0.08213035762310028, 0.07256656885147095, 0.0972752571105957, -0.04203242063522339, -0.10374777019023895, -0.1657610833644867, 0.14776568114757538, 0.47436708211898804, 0.06687228381633759, 0.21826624870300293, 0.04280182719230652, -0.15228143334388733, 0.3543902039527893, 0.1275821477174759, -0.017383966594934464, -0.2526036500930786, -0.049409329891204834, -0.18363255262374878, 0.02116052806377411, -0.05325588583946228, -0.106214739382267, -0.24890422821044922, 0.08790725469589233, -0.4121103286743164, 0.1509920209646225, -0.21569672226905823, 0.126539409160614, -0.01605157181620598, 0.36916396021842957, -0.30330443382263184, -0.22890794277191162, 0.07839415967464447, -0.21603840589523315, 0.2938556969165802, 0.1115017831325531, -0.2649545967578888, -0.002756670117378235, -0.21851421892642975, 0.12513211369514465, -0.43486487865448, 0.5451759696006775, 0.23035699129104614, -0.317750483751297, 0.19501563906669617, 0.22116196155548096, 0.2615065276622772, -0.08305943012237549, 0.3307040333747864, 0.4944118857383728, 0.43111005425453186, -0.05471364036202431, 0.10258465260267258, 0.15072239935398102, -0.1535886824131012, 0.11900441348552704, 0.15927022695541382, 0.11580687761306763, -0.24258451163768768, 0.5202119946479797, 0.1174396276473999, -0.233567476272583, 0.3855021595954895, -0.23767490684986115, 0.49250224232673645, -0.3898623287677765, 0.05855400487780571, -0.02034527063369751, 0.034126587212085724, -0.31856879591941833, -0.07538380473852158, -0.1556568443775177, 0.1755647361278534, -0.19997525215148926, 0.032710328698158264, 0.07609115540981293, -0.07860632240772247, 0.05257006734609604, -0.29893890023231506, 0.3373311460018158, 0.33182471990585327, 0.29736608266830444, -0.3848652243614197, -0.006085388362407684, -0.4286867678165436, 0.13914057612419128, 0.020971840247511864, 0.08024805784225464, -0.011607721447944641, 0.04082636535167694, 0.042141541838645935, 0.2475111037492752, 0.4816514253616333, 0.09791293740272522, 0.12359272688627243, 0.20239843428134918, -0.44705942273139954, -0.17580202221870422, -0.15730878710746765, -0.34789299964904785, 0.09996215999126434, -0.21297237277030945, -0.02906353399157524, -0.3214385509490967, 0.0842481181025505, 0.033677298575639725, -0.042301177978515625, 0.23204082250595093, 0.6045461893081665, 0.2200203388929367, 0.06722771376371384, 0.45856815576553345, 0.0525992289185524, 0.18947520852088928, 0.3232189118862152, -0.021869855001568794, -0.25430557131767273, 0.062313683331012726, -0.0039303600788116455, 0.2870970666408539, -0.06634598225355148, -0.2871372401714325, -0.19541755318641663, 0.6739616394042969, 0.061697788536548615, -0.5848388671875, -0.06301738321781158, 0.12143882364034653, 0.02117238938808441, -0.13311749696731567, 0.4323016405105591, 0.06679853796958923, 0.19644835591316223, 0.21623019874095917, -0.2929877042770386, 0.021637169644236565, 0.4165512025356293, -0.17256903648376465, -0.3824043571949005, -0.062386270612478256, 0.13734346628189087, 0.19881469011306763, -0.24341022968292236, -0.465519517660141, 0.08241627365350723, 0.41984879970550537, -0.14236870408058167, -0.1497417390346527, 0.1252378225326538, -0.3407677114009857, 0.27485474944114685, 0.24066388607025146, 0.003970049321651459, -0.20934706926345825, -0.23140116035938263, -0.021755510941147804, -0.13187085092067719 ]
https://github.com/huggingface/datasets/issues/2363
Trying to use metric.compute but get OSError
I tried this code on a colab notebook and it worked fine (with gpu enabled): ``` from datasets import load_metric metric = load_metric('accuracy') output = metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0]) final_score = metric.compute() print(final_score) # 0.5 ``` Also, in `load_metric`, I saw `cache_dir` is optional and it defaults to `~/.datasets/`
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0
53
Trying to use metric.compute but get OSError I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0 I tried this code on a colab notebook and it worked fine (with gpu enabled): ``` from datasets import load_metric metric = load_metric('accuracy') output = metric.add_batch(predictions=[1, 1, 1, 1], references=[1, 1, 0, 0]) final_score = metric.compute() print(final_score) # 0.5 ``` Also, in `load_metric`, I saw `cache_dir` is optional and it defaults to `~/.datasets/`
[ -0.39441871643066406, -0.2529717683792114, -0.0330117791891098, 0.3631945252418518, 0.25313127040863037, -0.10110492259263992, 0.23285265266895294, 0.1392669528722763, 0.2106887251138687, 0.6745789051055908, -0.02712155133485794, 0.06741391122341156, -0.056197576224803925, 0.0007949601858854294, -0.14105334877967834, -0.16666460037231445, -0.12399386614561081, 0.012945204973220825, 0.000006996095180511475, 0.07801619172096252, -0.33733370900154114, 0.04249408468604088, -0.22039325535297394, 0.07182266563177109, -0.05419914424419403, -0.20792561769485474, 0.2063426524400711, 0.04261410981416702, -0.5113475322723389, -0.23875127732753754, 0.23515252768993378, -0.32088443636894226, 0.21703073382377625, 0.8475169539451599, -0.00011492488556541502, 0.13263964653015137, 0.008718930184841156, -0.10041088610887527, -0.09454882144927979, -0.2760726809501648, 0.21046999096870422, -0.21029651165008545, 0.0614100843667984, -0.28949618339538574, 0.14162468910217285, -0.025002069771289825, -0.20491598546504974, -0.33479106426239014, 0.2580508887767792, 0.5588134527206421, 0.10943873971700668, 0.48057714104652405, 0.05719009414315224, -0.1703309416770935, -0.37479469180107117, -0.34424513578414917, 0.03925873339176178, 0.6707539558410645, -0.09424638748168945, -0.12500537931919098, -0.0927228108048439, -0.03975598141551018, 0.23412802815437317, 0.08773238956928253, 0.20651566982269287, -0.13264800608158112, 0.8326208591461182, -0.22519150376319885, -0.14898806810379028, -0.05729646980762482, 0.10047969222068787, 0.054225921630859375, -0.36622706055641174, 0.321256160736084, -0.06409875303506851, -0.7123776078224182, -0.008344672620296478, -0.05547697842121124, -0.3298594057559967, -0.16635359823703766, -0.3520742356777191, -0.01619769260287285, -0.46709489822387695, 0.06509102135896683, -0.2273934930562973, 0.26917362213134766, -0.1618950366973877, 0.07616375386714935, 0.31423529982566833, 0.33564484119415283, 0.07203634083271027, -0.028517212718725204, 0.16787388920783997, 0.2304375171661377, -0.5341541767120361, -0.007972493767738342, -0.1267387568950653, -0.09359436482191086, -0.23412004113197327, -0.2478044480085373, 0.3044131100177765, 0.02293405868113041, 0.23922809958457947, 0.27803128957748413, -0.19586119055747986, 0.8154187202453613, 0.08282097429037094, 0.1414991319179535, 0.028899652883410454, 0.3671554625034332, -0.07615020126104355, -0.07633625715970993, -0.06664737313985825, -0.3928148150444031, 0.330564945936203, 0.1671803891658783, -0.17894987761974335, -0.0470934621989727, -0.5103239417076111, -0.08257179707288742, -0.3074183166027069, -0.1921127289533615, 0.3589555025100708, 0.07821513712406158, -0.10964074730873108, 0.13007555902004242, 0.28783339262008667, 0.19022902846336365, -0.2090023308992386, -0.1163049191236496, -0.23768918216228485, 0.32532262802124023, -0.26515236496925354, 0.14274322986602783, -0.20881347358226776, -0.28257012367248535, 0.21089963614940643, -0.03393242880702019, 0.2929001748561859, -0.37274467945098877, 0.14899113774299622, -0.10232731699943542, -0.06215556710958481, 0.07558619976043701, 0.10423897206783295, -0.22661489248275757, 0.47158321738243103, -0.18890102207660675, 0.10122822970151901, 0.035244327038526535, -0.6336891055107117, -0.43290936946868896, 0.05771062895655632, 0.21425002813339233, -0.10435235500335693, 0.11759047210216522, -0.26505571603775024, 0.04526323452591896, 0.32392263412475586, 0.18269170820713043, -0.035202302038669586, -0.11266933381557465, -0.4177846908569336, -0.14721080660820007, 0.2840811312198639, -0.25805413722991943, -0.24516646564006805, 0.011953882873058319, 0.05279763787984848, -0.0917620062828064, 0.2312353253364563, 0.23829002678394318, -0.18307432532310486, 0.6743608713150024, -0.09393253177404404, -0.2390211820602417, 0.5787598490715027, -0.5383844971656799, -0.03570650517940521, -0.21727153658866882, -0.1931009590625763, -0.19199150800704956, 0.1511499285697937, -0.1073562279343605, 0.01821017824113369, 0.04679085686802864, 0.4387010335922241, 0.039570800960063934, -0.08896063268184662, -0.35619670152664185, -0.19951827824115753, 0.2851070761680603, 0.22790953516960144, 0.04197638854384422, 0.457037091255188, 0.2853609323501587, 0.16951575875282288, -0.0684722289443016, 0.18879786133766174, -0.01803012564778328, -0.2879210114479065, -0.003023650497198105, 0.04003213718533516, -0.3892468214035034, 0.28945958614349365, -0.07791921496391296, 0.2788545787334442, 0.2235237956047058, -0.24662335216999054, 0.08261469006538391, 0.36098021268844604, 0.22368521988391876, -0.4406276345252991, 0.241733118891716, -0.1057097315788269, -0.04801032319664955, 0.07339458167552948, -0.21250596642494202, 0.25192034244537354, -0.04792625457048416, -0.0860949456691742, 0.050406500697135925, -0.4933122396469116, -0.023567913100123405, -0.18944823741912842, 0.06537307798862457, -0.12623330950737, -0.04486054182052612, -0.1458982229232788, -0.015313662588596344, 0.15430937707424164, 0.055686336010694504, -0.26932981610298157, 0.4298384487628937, 0.20296312868595123, -0.14560697972774506, -0.014435209333896637, 0.1559266746044159, -0.14748357236385345, 0.13285960257053375, -0.00933011807501316, -0.1915467083454132, 0.20045901834964752, -0.11410573869943619, 0.05357889086008072, 0.3843778371810913, 0.153572678565979, 0.017122209072113037, -0.10762251913547516, 0.06513606756925583, -0.05021882429718971, 0.20219692587852478, 0.02880106307566166, 0.027019530534744263, 0.44267037510871887, -0.35932356119155884, 0.05806181952357292, -0.37888115644454956, 0.3278767466545105, -0.4405212998390198, 0.3899688124656677, -0.039358556270599365, 0.06011167913675308, -0.010230250656604767, 0.12840625643730164, -0.07261894643306732, -0.37432658672332764, -0.2551703453063965, 0.4715958833694458, -0.047885771840810776, 0.04053543508052826, 0.09536214917898178, -0.07115399092435837, -0.06793035566806793, 0.03044191002845764, 0.34939080476760864, 0.20709438621997833, 0.02127283439040184, 0.04490102827548981, -0.052153874188661575, -0.046546779572963715, -0.1306067854166031, -0.028088826686143875, 0.34937289357185364, -0.22558832168579102, 0.1348802149295807, 0.07528688758611679, 0.21830782294273376, -0.19939979910850525, -0.1545162796974182, -0.20036467909812927, -0.32043784856796265, 0.011569704860448837, 0.14116285741329193, 0.32088997960090637, -0.13763989508152008, 0.13721129298210144, 0.12506914138793945, 0.4607318043708801, 0.2262214720249176, 0.28460341691970825, -0.16365306079387665, 0.04874420538544655, 0.03339012712240219, -0.09795600920915604, -0.21582253277301788, 0.24666333198547363, -0.35236820578575134, 0.07746956497430801, -0.08860091865062714, -0.18456488847732544, -0.1599784940481186, 0.0074026454240083694, 0.22935974597930908, 0.10246646404266357, -0.04207947850227356, -0.25567448139190674, 0.04280494526028633, 0.20963041484355927, -0.2503051459789276, -0.3007621467113495, 0.37455612421035767, -0.05875144153833389, -0.011741088703274727, -0.1317927986383438, -0.14124438166618347, -0.10161937773227692, -0.2883880138397217, -0.03608211874961853, 0.24831844866275787, 0.20629090070724487, 0.2738168239593506, -0.005697150249034166, 0.38143190741539, 0.4019237756729126, -0.054301828145980835, -0.1986667811870575, -0.547450065612793, 0.21483725309371948, -0.09256395697593689, -0.22764690220355988, 0.07016515731811523, -0.0187874473631382, 0.16778212785720825, 0.1912873089313507, -0.2886448800563812, -0.6735842823982239, 0.1889115571975708, 0.2871614992618561, -0.26099395751953125, 0.1604720503091812, 0.2804619073867798, -0.3490058183670044, -0.02871396206319332, -0.28144004940986633, -0.1038905680179596, 0.2245209813117981, 0.08482152968645096, 0.21121609210968018, -0.22107183933258057, 0.46464669704437256, 0.09414063394069672, 0.6489886045455933, 0.029646314680576324, -0.12810508906841278, 0.2985832989215851, 0.1537393480539322, 0.24475663900375366, -0.003853537142276764, -0.1338466852903366, 0.04899367690086365, 0.10641632974147797, -0.20387010276317596, 0.10170253366231918, -0.05574861168861389, 0.06512226164340973, -0.3501715064048767, -0.2313646823167801, 0.047140657901763916, -0.016883928328752518, -0.03693944960832596, -0.41606348752975464, 0.32323452830314636, -0.030121734365820885, 0.26977282762527466, -0.28843674063682556, 0.1355520486831665, 0.13576366007328033, 0.15787220001220703, 0.12880054116249084, -0.05689243972301483, -0.01397007703781128, -0.1706569492816925, -0.2526800036430359, 0.39380186796188354, 0.04983959347009659, 0.29469698667526245, -0.07715722918510437, 0.3258010149002075, -0.108652263879776, 0.1709330826997757, 0.6087875366210938, -0.1312519609928131, 0.03502219170331955, 0.1956072449684143, -0.2016812562942505, -0.355533242225647, -0.0019059181213378906, -0.3041399121284485, 0.16788232326507568, 0.07284602522850037, 0.7506989240646362, -0.024456940591335297, 0.01545153558254242, -0.0228768028318882, 0.3795050084590912, -0.22290480136871338, -0.38663676381111145, -0.2590605914592743, -0.23982635140419006, 0.20202051103115082, 0.054265595972537994, 0.023445742204785347, 0.37088704109191895, 0.11949710547924042, 0.23224984109401703, -0.05669587105512619, 0.19827812910079956, 0.09374948590993881, -0.06490961462259293, 0.011617028154432774, -0.14189772307872772, -0.1390073597431183, 0.054091792553663254, -0.05618642270565033, 0.26517078280448914, 0.0636061355471611, -0.0457773320376873, -0.5454131364822388, 0.1777895987033844, 0.1208340972661972, 0.23880919814109802, -0.08668799698352814, -0.2268010377883911, -0.1198790892958641, -0.045063361525535583, 0.2277992069721222, 0.14756010472774506, 0.10145902633666992, 0.20416070520877838, 0.3210233747959137, -0.2983640432357788, 0.009170543402433395, 0.4024379849433899, 0.27552250027656555, 0.18901143968105316, 0.16548967361450195, -0.23720790445804596, -0.19632305204868317, 0.06787775456905365, 0.3185475170612335, 0.41467636823654175, 0.03828956186771393, -0.3658932149410248, 0.5241263508796692, 0.2566731572151184, 0.1425119936466217, -0.21157746016979218, 0.18147510290145874, -0.10154444724321365, -0.44528883695602417, -0.13050967454910278, -0.2162661999464035, 0.17735639214515686, -0.17593279480934143, -0.10067616403102875, 0.5212770700454712, -0.23743294179439545, -0.059553731232881546, 0.22304993867874146, 0.012430530041456223, -0.21710874140262604, -0.13575375080108643, -0.17353810369968414, 0.09431752562522888, -0.10349401831626892, 0.1680273711681366, -0.25483548641204834, -0.029626954346895218, -0.02584708295762539, -0.05431056395173073, 0.06658469140529633, -0.1761956810951233, -0.31914639472961426, 0.22557853162288666, 0.1246945858001709, -0.307084321975708, 0.0238981693983078, 0.24323983490467072, 0.5752549767494202, -0.06619682908058167, 0.01342645101249218, -0.01246970146894455, -0.14345422387123108, -0.049682583659887314, 0.13969969749450684, -0.12982381880283356, 0.28279295563697815, -0.23514452576637268, 0.0005077645182609558, 0.10691851377487183, -0.22796891629695892, -0.30032581090927124, 0.4230242371559143, 0.03320980444550514, 0.1173316091299057, 0.02987494505941868, 0.06884483993053436, -0.3049267828464508, -0.18181881308555603, -0.19416256248950958, 0.10329550504684448, 0.17514568567276, -0.4289223849773407, 0.3889814019203186, -0.057468194514513016, -0.37502554059028625, 0.2138923555612564, 0.19492626190185547, 0.21536624431610107, -0.2504056990146637, 0.29167640209198, -0.06201159209012985, -0.10555411130189896, -0.0586545392870903, -0.16616131365299225, 0.002894687931984663, -0.019207574427127838, 0.1990184336900711, 0.018567794933915138, 0.3529021143913269, 0.021324440836906433, 0.21171607077121735, 0.3017181158065796, 0.05114571005105972, -0.1592129021883011, -0.736672043800354, -0.20209848880767822, 0.05775054916739464, -0.00010728836059570312, -0.14273467659950256, -0.1370646059513092, 0.21674862504005432, -0.13228538632392883, 0.17602528631687164, -0.25091153383255005, -0.010560475289821625, -0.23500332236289978, 0.15686969459056854, 0.04242141544818878, -0.14871692657470703, 0.22628197073936462, 0.16272389888763428, 0.0156820360571146, 0.22498564422130585, -0.21164487302303314, -0.17873597145080566, 0.10252989828586578, 0.16212204098701477, -0.05981244146823883, -0.06524143368005753, 0.39172905683517456, 0.037119023501873016, -0.3599076271057129, 0.05588171258568764, -0.23021645843982697, 0.3071425259113312, -0.14113031327724457, -0.1288592666387558, 0.16219545900821686, 0.628824770450592, 0.09028367698192596, 0.06734460592269897, 0.005225539207458496, 0.2742743492126465, -0.22512832283973694, 0.18293169140815735, -0.278062641620636, -0.1428380012512207, -0.3569371998310089, -0.15614351630210876, 0.015199333429336548, -0.17302554845809937, 0.291938841342926, -0.28613442182540894, 0.02828994020819664, -0.20887406170368195, 0.36285120248794556, 0.08997934311628342, -0.19754958152770996, 0.047319233417510986, 0.058977916836738586, 0.1172167956829071, -0.08008165657520294, 0.1394037902355194, 0.17287036776542664, 0.038854002952575684, 0.014811050146818161, 0.3321508765220642, -0.011075109243392944, 0.1098475456237793, -0.08268329501152039, -0.08213035762310028, 0.07256656885147095, 0.0972752571105957, -0.04203242063522339, -0.10374777019023895, -0.1657610833644867, 0.14776568114757538, 0.47436708211898804, 0.06687228381633759, 0.21826624870300293, 0.04280182719230652, -0.15228143334388733, 0.3543902039527893, 0.1275821477174759, -0.017383966594934464, -0.2526036500930786, -0.049409329891204834, -0.18363255262374878, 0.02116052806377411, -0.05325588583946228, -0.106214739382267, -0.24890422821044922, 0.08790725469589233, -0.4121103286743164, 0.1509920209646225, -0.21569672226905823, 0.126539409160614, -0.01605157181620598, 0.36916396021842957, -0.30330443382263184, -0.22890794277191162, 0.07839415967464447, -0.21603840589523315, 0.2938556969165802, 0.1115017831325531, -0.2649545967578888, -0.002756670117378235, -0.21851421892642975, 0.12513211369514465, -0.43486487865448, 0.5451759696006775, 0.23035699129104614, -0.317750483751297, 0.19501563906669617, 0.22116196155548096, 0.2615065276622772, -0.08305943012237549, 0.3307040333747864, 0.4944118857383728, 0.43111005425453186, -0.05471364036202431, 0.10258465260267258, 0.15072239935398102, -0.1535886824131012, 0.11900441348552704, 0.15927022695541382, 0.11580687761306763, -0.24258451163768768, 0.5202119946479797, 0.1174396276473999, -0.233567476272583, 0.3855021595954895, -0.23767490684986115, 0.49250224232673645, -0.3898623287677765, 0.05855400487780571, -0.02034527063369751, 0.034126587212085724, -0.31856879591941833, -0.07538380473852158, -0.1556568443775177, 0.1755647361278534, -0.19997525215148926, 0.032710328698158264, 0.07609115540981293, -0.07860632240772247, 0.05257006734609604, -0.29893890023231506, 0.3373311460018158, 0.33182471990585327, 0.29736608266830444, -0.3848652243614197, -0.006085388362407684, -0.4286867678165436, 0.13914057612419128, 0.020971840247511864, 0.08024805784225464, -0.011607721447944641, 0.04082636535167694, 0.042141541838645935, 0.2475111037492752, 0.4816514253616333, 0.09791293740272522, 0.12359272688627243, 0.20239843428134918, -0.44705942273139954, -0.17580202221870422, -0.15730878710746765, -0.34789299964904785, 0.09996215999126434, -0.21297237277030945, -0.02906353399157524, -0.3214385509490967, 0.0842481181025505, 0.033677298575639725, -0.042301177978515625, 0.23204082250595093, 0.6045461893081665, 0.2200203388929367, 0.06722771376371384, 0.45856815576553345, 0.0525992289185524, 0.18947520852088928, 0.3232189118862152, -0.021869855001568794, -0.25430557131767273, 0.062313683331012726, -0.0039303600788116455, 0.2870970666408539, -0.06634598225355148, -0.2871372401714325, -0.19541755318641663, 0.6739616394042969, 0.061697788536548615, -0.5848388671875, -0.06301738321781158, 0.12143882364034653, 0.02117238938808441, -0.13311749696731567, 0.4323016405105591, 0.06679853796958923, 0.19644835591316223, 0.21623019874095917, -0.2929877042770386, 0.021637169644236565, 0.4165512025356293, -0.17256903648376465, -0.3824043571949005, -0.062386270612478256, 0.13734346628189087, 0.19881469011306763, -0.24341022968292236, -0.465519517660141, 0.08241627365350723, 0.41984879970550537, -0.14236870408058167, -0.1497417390346527, 0.1252378225326538, -0.3407677114009857, 0.27485474944114685, 0.24066388607025146, 0.003970049321651459, -0.20934706926345825, -0.23140116035938263, -0.021755510941147804, -0.13187085092067719 ]
https://github.com/huggingface/datasets/issues/2363
Trying to use metric.compute but get OSError
Hi ! By default it caches the predictions and references used to compute the metric in `~/.cache/huggingface/datasets/metrics` (not `~/.datasets/`). Let me update the documentation @bhavitvyamalik . The cache is used to store all the predictions and references passed to `add_batch` for example in order to compute the metric later when `compute` is called. I think the issue might come from the cache directory that is used by default. Can you check that you have the right permissions ? Otherwise feel free to set `cache_dir` to another location.
I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0
87
Trying to use metric.compute but get OSError I want to use metric.compute from load_metric('accuracy') to get training accuracy, but receive OSError. I am wondering what is the mechanism behind the metric calculation, why would it report an OSError? ```python 195 for epoch in range(num_train_epochs): 196 model.train() 197 for step, batch in enumerate(train_loader): 198 # print(batch['input_ids'].shape) 199 outputs = model(**batch) 200 201 loss = outputs.loss 202 loss /= gradient_accumulation_steps 203 accelerator.backward(loss) 204 205 predictions = outputs.logits.argmax(dim=-1) 206 metric.add_batch( 207 predictions=accelerator.gather(predictions), 208 references=accelerator.gather(batch['labels']) 209 ) 210 progress_bar.set_postfix({'loss': loss.item(), 'train batch acc.': train_metrics}) 211 212 if (step + 1) % 50 == 0 or step == len(train_loader) - 1: 213 train_metrics = metric.compute() ``` the error message is as below: ``` Traceback (most recent call last): File "run_multi.py", line 273, in <module> main() File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/yshuang/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "run_multi.py", line 213, in main train_metrics = metric.compute() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 391, in compute self._finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/metric.py", line 342, in _finalize self.writer.finalize() File "/home/yshuang/.local/lib/python3.8/site-packages/datasets/arrow_writer.py", line 370, in finalize self.stream.close() File "pyarrow/io.pxi", line 132, in pyarrow.lib.NativeFile.close File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status OSError: error closing file ``` ## Environment info <!-- You can run the command `datasets-cli env` and copy-and-paste its output below. --> - `datasets` version: 1.6.1 - Platform: Linux NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" - Python version: python3.8.5 - PyArrow version: 4.0.0 Hi ! By default it caches the predictions and references used to compute the metric in `~/.cache/huggingface/datasets/metrics` (not `~/.datasets/`). Let me update the documentation @bhavitvyamalik . The cache is used to store all the predictions and references passed to `add_batch` for example in order to compute the metric later when `compute` is called. I think the issue might come from the cache directory that is used by default. Can you check that you have the right permissions ? Otherwise feel free to set `cache_dir` to another location.
[ -0.39441871643066406, -0.2529717683792114, -0.0330117791891098, 0.3631945252418518, 0.25313127040863037, -0.10110492259263992, 0.23285265266895294, 0.1392669528722763, 0.2106887251138687, 0.6745789051055908, -0.02712155133485794, 0.06741391122341156, -0.056197576224803925, 0.0007949601858854294, -0.14105334877967834, -0.16666460037231445, -0.12399386614561081, 0.012945204973220825, 0.000006996095180511475, 0.07801619172096252, -0.33733370900154114, 0.04249408468604088, -0.22039325535297394, 0.07182266563177109, -0.05419914424419403, -0.20792561769485474, 0.2063426524400711, 0.04261410981416702, -0.5113475322723389, -0.23875127732753754, 0.23515252768993378, -0.32088443636894226, 0.21703073382377625, 0.8475169539451599, -0.00011492488556541502, 0.13263964653015137, 0.008718930184841156, -0.10041088610887527, -0.09454882144927979, -0.2760726809501648, 0.21046999096870422, -0.21029651165008545, 0.0614100843667984, -0.28949618339538574, 0.14162468910217285, -0.025002069771289825, -0.20491598546504974, -0.33479106426239014, 0.2580508887767792, 0.5588134527206421, 0.10943873971700668, 0.48057714104652405, 0.05719009414315224, -0.1703309416770935, -0.37479469180107117, -0.34424513578414917, 0.03925873339176178, 0.6707539558410645, -0.09424638748168945, -0.12500537931919098, -0.0927228108048439, -0.03975598141551018, 0.23412802815437317, 0.08773238956928253, 0.20651566982269287, -0.13264800608158112, 0.8326208591461182, -0.22519150376319885, -0.14898806810379028, -0.05729646980762482, 0.10047969222068787, 0.054225921630859375, -0.36622706055641174, 0.321256160736084, -0.06409875303506851, -0.7123776078224182, -0.008344672620296478, -0.05547697842121124, -0.3298594057559967, -0.16635359823703766, -0.3520742356777191, -0.01619769260287285, -0.46709489822387695, 0.06509102135896683, -0.2273934930562973, 0.26917362213134766, -0.1618950366973877, 0.07616375386714935, 0.31423529982566833, 0.33564484119415283, 0.07203634083271027, -0.028517212718725204, 0.16787388920783997, 0.2304375171661377, -0.5341541767120361, -0.007972493767738342, -0.1267387568950653, -0.09359436482191086, -0.23412004113197327, -0.2478044480085373, 0.3044131100177765, 0.02293405868113041, 0.23922809958457947, 0.27803128957748413, -0.19586119055747986, 0.8154187202453613, 0.08282097429037094, 0.1414991319179535, 0.028899652883410454, 0.3671554625034332, -0.07615020126104355, -0.07633625715970993, -0.06664737313985825, -0.3928148150444031, 0.330564945936203, 0.1671803891658783, -0.17894987761974335, -0.0470934621989727, -0.5103239417076111, -0.08257179707288742, -0.3074183166027069, -0.1921127289533615, 0.3589555025100708, 0.07821513712406158, -0.10964074730873108, 0.13007555902004242, 0.28783339262008667, 0.19022902846336365, -0.2090023308992386, -0.1163049191236496, -0.23768918216228485, 0.32532262802124023, -0.26515236496925354, 0.14274322986602783, -0.20881347358226776, -0.28257012367248535, 0.21089963614940643, -0.03393242880702019, 0.2929001748561859, -0.37274467945098877, 0.14899113774299622, -0.10232731699943542, -0.06215556710958481, 0.07558619976043701, 0.10423897206783295, -0.22661489248275757, 0.47158321738243103, -0.18890102207660675, 0.10122822970151901, 0.035244327038526535, -0.6336891055107117, -0.43290936946868896, 0.05771062895655632, 0.21425002813339233, -0.10435235500335693, 0.11759047210216522, -0.26505571603775024, 0.04526323452591896, 0.32392263412475586, 0.18269170820713043, -0.035202302038669586, -0.11266933381557465, -0.4177846908569336, -0.14721080660820007, 0.2840811312198639, -0.25805413722991943, -0.24516646564006805, 0.011953882873058319, 0.05279763787984848, -0.0917620062828064, 0.2312353253364563, 0.23829002678394318, -0.18307432532310486, 0.6743608713150024, -0.09393253177404404, -0.2390211820602417, 0.5787598490715027, -0.5383844971656799, -0.03570650517940521, -0.21727153658866882, -0.1931009590625763, -0.19199150800704956, 0.1511499285697937, -0.1073562279343605, 0.01821017824113369, 0.04679085686802864, 0.4387010335922241, 0.039570800960063934, -0.08896063268184662, -0.35619670152664185, -0.19951827824115753, 0.2851070761680603, 0.22790953516960144, 0.04197638854384422, 0.457037091255188, 0.2853609323501587, 0.16951575875282288, -0.0684722289443016, 0.18879786133766174, -0.01803012564778328, -0.2879210114479065, -0.003023650497198105, 0.04003213718533516, -0.3892468214035034, 0.28945958614349365, -0.07791921496391296, 0.2788545787334442, 0.2235237956047058, -0.24662335216999054, 0.08261469006538391, 0.36098021268844604, 0.22368521988391876, -0.4406276345252991, 0.241733118891716, -0.1057097315788269, -0.04801032319664955, 0.07339458167552948, -0.21250596642494202, 0.25192034244537354, -0.04792625457048416, -0.0860949456691742, 0.050406500697135925, -0.4933122396469116, -0.023567913100123405, -0.18944823741912842, 0.06537307798862457, -0.12623330950737, -0.04486054182052612, -0.1458982229232788, -0.015313662588596344, 0.15430937707424164, 0.055686336010694504, -0.26932981610298157, 0.4298384487628937, 0.20296312868595123, -0.14560697972774506, -0.014435209333896637, 0.1559266746044159, -0.14748357236385345, 0.13285960257053375, -0.00933011807501316, -0.1915467083454132, 0.20045901834964752, -0.11410573869943619, 0.05357889086008072, 0.3843778371810913, 0.153572678565979, 0.017122209072113037, -0.10762251913547516, 0.06513606756925583, -0.05021882429718971, 0.20219692587852478, 0.02880106307566166, 0.027019530534744263, 0.44267037510871887, -0.35932356119155884, 0.05806181952357292, -0.37888115644454956, 0.3278767466545105, -0.4405212998390198, 0.3899688124656677, -0.039358556270599365, 0.06011167913675308, -0.010230250656604767, 0.12840625643730164, -0.07261894643306732, -0.37432658672332764, -0.2551703453063965, 0.4715958833694458, -0.047885771840810776, 0.04053543508052826, 0.09536214917898178, -0.07115399092435837, -0.06793035566806793, 0.03044191002845764, 0.34939080476760864, 0.20709438621997833, 0.02127283439040184, 0.04490102827548981, -0.052153874188661575, -0.046546779572963715, -0.1306067854166031, -0.028088826686143875, 0.34937289357185364, -0.22558832168579102, 0.1348802149295807, 0.07528688758611679, 0.21830782294273376, -0.19939979910850525, -0.1545162796974182, -0.20036467909812927, -0.32043784856796265, 0.011569704860448837, 0.14116285741329193, 0.32088997960090637, -0.13763989508152008, 0.13721129298210144, 0.12506914138793945, 0.4607318043708801, 0.2262214720249176, 0.28460341691970825, -0.16365306079387665, 0.04874420538544655, 0.03339012712240219, -0.09795600920915604, -0.21582253277301788, 0.24666333198547363, -0.35236820578575134, 0.07746956497430801, -0.08860091865062714, -0.18456488847732544, -0.1599784940481186, 0.0074026454240083694, 0.22935974597930908, 0.10246646404266357, -0.04207947850227356, -0.25567448139190674, 0.04280494526028633, 0.20963041484355927, -0.2503051459789276, -0.3007621467113495, 0.37455612421035767, -0.05875144153833389, -0.011741088703274727, -0.1317927986383438, -0.14124438166618347, -0.10161937773227692, -0.2883880138397217, -0.03608211874961853, 0.24831844866275787, 0.20629090070724487, 0.2738168239593506, -0.005697150249034166, 0.38143190741539, 0.4019237756729126, -0.054301828145980835, -0.1986667811870575, -0.547450065612793, 0.21483725309371948, -0.09256395697593689, -0.22764690220355988, 0.07016515731811523, -0.0187874473631382, 0.16778212785720825, 0.1912873089313507, -0.2886448800563812, -0.6735842823982239, 0.1889115571975708, 0.2871614992618561, -0.26099395751953125, 0.1604720503091812, 0.2804619073867798, -0.3490058183670044, -0.02871396206319332, -0.28144004940986633, -0.1038905680179596, 0.2245209813117981, 0.08482152968645096, 0.21121609210968018, -0.22107183933258057, 0.46464669704437256, 0.09414063394069672, 0.6489886045455933, 0.029646314680576324, -0.12810508906841278, 0.2985832989215851, 0.1537393480539322, 0.24475663900375366, -0.003853537142276764, -0.1338466852903366, 0.04899367690086365, 0.10641632974147797, -0.20387010276317596, 0.10170253366231918, -0.05574861168861389, 0.06512226164340973, -0.3501715064048767, -0.2313646823167801, 0.047140657901763916, -0.016883928328752518, -0.03693944960832596, -0.41606348752975464, 0.32323452830314636, -0.030121734365820885, 0.26977282762527466, -0.28843674063682556, 0.1355520486831665, 0.13576366007328033, 0.15787220001220703, 0.12880054116249084, -0.05689243972301483, -0.01397007703781128, -0.1706569492816925, -0.2526800036430359, 0.39380186796188354, 0.04983959347009659, 0.29469698667526245, -0.07715722918510437, 0.3258010149002075, -0.108652263879776, 0.1709330826997757, 0.6087875366210938, -0.1312519609928131, 0.03502219170331955, 0.1956072449684143, -0.2016812562942505, -0.355533242225647, -0.0019059181213378906, -0.3041399121284485, 0.16788232326507568, 0.07284602522850037, 0.7506989240646362, -0.024456940591335297, 0.01545153558254242, -0.0228768028318882, 0.3795050084590912, -0.22290480136871338, -0.38663676381111145, -0.2590605914592743, -0.23982635140419006, 0.20202051103115082, 0.054265595972537994, 0.023445742204785347, 0.37088704109191895, 0.11949710547924042, 0.23224984109401703, -0.05669587105512619, 0.19827812910079956, 0.09374948590993881, -0.06490961462259293, 0.011617028154432774, -0.14189772307872772, -0.1390073597431183, 0.054091792553663254, -0.05618642270565033, 0.26517078280448914, 0.0636061355471611, -0.0457773320376873, -0.5454131364822388, 0.1777895987033844, 0.1208340972661972, 0.23880919814109802, -0.08668799698352814, -0.2268010377883911, -0.1198790892958641, -0.045063361525535583, 0.2277992069721222, 0.14756010472774506, 0.10145902633666992, 0.20416070520877838, 0.3210233747959137, -0.2983640432357788, 0.009170543402433395, 0.4024379849433899, 0.27552250027656555, 0.18901143968105316, 0.16548967361450195, -0.23720790445804596, -0.19632305204868317, 0.06787775456905365, 0.3185475170612335, 0.41467636823654175, 0.03828956186771393, -0.3658932149410248, 0.5241263508796692, 0.2566731572151184, 0.1425119936466217, -0.21157746016979218, 0.18147510290145874, -0.10154444724321365, -0.44528883695602417, -0.13050967454910278, -0.2162661999464035, 0.17735639214515686, -0.17593279480934143, -0.10067616403102875, 0.5212770700454712, -0.23743294179439545, -0.059553731232881546, 0.22304993867874146, 0.012430530041456223, -0.21710874140262604, -0.13575375080108643, -0.17353810369968414, 0.09431752562522888, -0.10349401831626892, 0.1680273711681366, -0.25483548641204834, -0.029626954346895218, -0.02584708295762539, -0.05431056395173073, 0.06658469140529633, -0.1761956810951233, -0.31914639472961426, 0.22557853162288666, 0.1246945858001709, -0.307084321975708, 0.0238981693983078, 0.24323983490467072, 0.5752549767494202, -0.06619682908058167, 0.01342645101249218, -0.01246970146894455, -0.14345422387123108, -0.049682583659887314, 0.13969969749450684, -0.12982381880283356, 0.28279295563697815, -0.23514452576637268, 0.0005077645182609558, 0.10691851377487183, -0.22796891629695892, -0.30032581090927124, 0.4230242371559143, 0.03320980444550514, 0.1173316091299057, 0.02987494505941868, 0.06884483993053436, -0.3049267828464508, -0.18181881308555603, -0.19416256248950958, 0.10329550504684448, 0.17514568567276, -0.4289223849773407, 0.3889814019203186, -0.057468194514513016, -0.37502554059028625, 0.2138923555612564, 0.19492626190185547, 0.21536624431610107, -0.2504056990146637, 0.29167640209198, -0.06201159209012985, -0.10555411130189896, -0.0586545392870903, -0.16616131365299225, 0.002894687931984663, -0.019207574427127838, 0.1990184336900711, 0.018567794933915138, 0.3529021143913269, 0.021324440836906433, 0.21171607077121735, 0.3017181158065796, 0.05114571005105972, -0.1592129021883011, -0.736672043800354, -0.20209848880767822, 0.05775054916739464, -0.00010728836059570312, -0.14273467659950256, -0.1370646059513092, 0.21674862504005432, -0.13228538632392883, 0.17602528631687164, -0.25091153383255005, -0.010560475289821625, -0.23500332236289978, 0.15686969459056854, 0.04242141544818878, -0.14871692657470703, 0.22628197073936462, 0.16272389888763428, 0.0156820360571146, 0.22498564422130585, -0.21164487302303314, -0.17873597145080566, 0.10252989828586578, 0.16212204098701477, -0.05981244146823883, -0.06524143368005753, 0.39172905683517456, 0.037119023501873016, -0.3599076271057129, 0.05588171258568764, -0.23021645843982697, 0.3071425259113312, -0.14113031327724457, -0.1288592666387558, 0.16219545900821686, 0.628824770450592, 0.09028367698192596, 0.06734460592269897, 0.005225539207458496, 0.2742743492126465, -0.22512832283973694, 0.18293169140815735, -0.278062641620636, -0.1428380012512207, -0.3569371998310089, -0.15614351630210876, 0.015199333429336548, -0.17302554845809937, 0.291938841342926, -0.28613442182540894, 0.02828994020819664, -0.20887406170368195, 0.36285120248794556, 0.08997934311628342, -0.19754958152770996, 0.047319233417510986, 0.058977916836738586, 0.1172167956829071, -0.08008165657520294, 0.1394037902355194, 0.17287036776542664, 0.038854002952575684, 0.014811050146818161, 0.3321508765220642, -0.011075109243392944, 0.1098475456237793, -0.08268329501152039, -0.08213035762310028, 0.07256656885147095, 0.0972752571105957, -0.04203242063522339, -0.10374777019023895, -0.1657610833644867, 0.14776568114757538, 0.47436708211898804, 0.06687228381633759, 0.21826624870300293, 0.04280182719230652, -0.15228143334388733, 0.3543902039527893, 0.1275821477174759, -0.017383966594934464, -0.2526036500930786, -0.049409329891204834, -0.18363255262374878, 0.02116052806377411, -0.05325588583946228, -0.106214739382267, -0.24890422821044922, 0.08790725469589233, -0.4121103286743164, 0.1509920209646225, -0.21569672226905823, 0.126539409160614, -0.01605157181620598, 0.36916396021842957, -0.30330443382263184, -0.22890794277191162, 0.07839415967464447, -0.21603840589523315, 0.2938556969165802, 0.1115017831325531, -0.2649545967578888, -0.002756670117378235, -0.21851421892642975, 0.12513211369514465, -0.43486487865448, 0.5451759696006775, 0.23035699129104614, -0.317750483751297, 0.19501563906669617, 0.22116196155548096, 0.2615065276622772, -0.08305943012237549, 0.3307040333747864, 0.4944118857383728, 0.43111005425453186, -0.05471364036202431, 0.10258465260267258, 0.15072239935398102, -0.1535886824131012, 0.11900441348552704, 0.15927022695541382, 0.11580687761306763, -0.24258451163768768, 0.5202119946479797, 0.1174396276473999, -0.233567476272583, 0.3855021595954895, -0.23767490684986115, 0.49250224232673645, -0.3898623287677765, 0.05855400487780571, -0.02034527063369751, 0.034126587212085724, -0.31856879591941833, -0.07538380473852158, -0.1556568443775177, 0.1755647361278534, -0.19997525215148926, 0.032710328698158264, 0.07609115540981293, -0.07860632240772247, 0.05257006734609604, -0.29893890023231506, 0.3373311460018158, 0.33182471990585327, 0.29736608266830444, -0.3848652243614197, -0.006085388362407684, -0.4286867678165436, 0.13914057612419128, 0.020971840247511864, 0.08024805784225464, -0.011607721447944641, 0.04082636535167694, 0.042141541838645935, 0.2475111037492752, 0.4816514253616333, 0.09791293740272522, 0.12359272688627243, 0.20239843428134918, -0.44705942273139954, -0.17580202221870422, -0.15730878710746765, -0.34789299964904785, 0.09996215999126434, -0.21297237277030945, -0.02906353399157524, -0.3214385509490967, 0.0842481181025505, 0.033677298575639725, -0.042301177978515625, 0.23204082250595093, 0.6045461893081665, 0.2200203388929367, 0.06722771376371384, 0.45856815576553345, 0.0525992289185524, 0.18947520852088928, 0.3232189118862152, -0.021869855001568794, -0.25430557131767273, 0.062313683331012726, -0.0039303600788116455, 0.2870970666408539, -0.06634598225355148, -0.2871372401714325, -0.19541755318641663, 0.6739616394042969, 0.061697788536548615, -0.5848388671875, -0.06301738321781158, 0.12143882364034653, 0.02117238938808441, -0.13311749696731567, 0.4323016405105591, 0.06679853796958923, 0.19644835591316223, 0.21623019874095917, -0.2929877042770386, 0.021637169644236565, 0.4165512025356293, -0.17256903648376465, -0.3824043571949005, -0.062386270612478256, 0.13734346628189087, 0.19881469011306763, -0.24341022968292236, -0.465519517660141, 0.08241627365350723, 0.41984879970550537, -0.14236870408058167, -0.1497417390346527, 0.1252378225326538, -0.3407677114009857, 0.27485474944114685, 0.24066388607025146, 0.003970049321651459, -0.20934706926345825, -0.23140116035938263, -0.021755510941147804, -0.13187085092067719 ]
https://github.com/huggingface/datasets/issues/2356
How to Add New Metrics Guide
Hi ! sorry for the late response It would be fantastic to have a guide for adding metrics as well ! Currently we only have this template here: https://github.com/huggingface/datasets/blob/master/templates/new_metric_script.py We can also include test utilities for metrics in the guide. We have a pytest suite with commands that you can use to make sure your metric works as expected. It has two useful commands: 1. This commands tests the code in the `Examples:` desction of the docstring of the metric: ``` pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name> ``` This will run this code for example: https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/metrics/accuracy/accuracy.py#L40-L45 Moreover this test is meant to be fast so users are free to add patches to the metric to avoid intensive computations. And example of intensive call patch can be found here: https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/tests/test_metric_common.py#L138-L151 2. This test runs the same thing as 1. except that it doesn't use patches (the real metric is used): ``` RUN_SLOW=1 pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name> ``` Finally additional metric-specific tests can be added to `test_metric_common.py`. Voila :) Feel free to ping me if you have any question or if I can help
**Is your feature request related to a problem? Please describe.** Currently there is an absolutely fantastic guide for how to contribute a new dataset to the library. However, there isn't one for adding new metrics. **Describe the solution you'd like** I'd like for a guide in a similar style to the dataset guide for adding metrics. I believe many of the content in the dataset guide such as setup can be easily copied over with minimal changes. Also, from what I've seen with existing metrics, it shouldn't be as complicated, especially in documentation of the metric, mainly just citation and usage. The most complicated part I see would be in automated tests that run the new metrics, but y'all's test suite seem pretty comprehensive, so it might not be that hard. **Describe alternatives you've considered** One alternative would be just not having the metrics be community generated and so would not need a step by step guide. New metrics would just be proposed as issues and the internal team would take care of them. However, I think it makes more sense to have a step by step guide for contributors to follow. **Additional context** I'd be happy to help with creating this guide as I am very interested in adding software engineering metrics to the library :nerd_face:, the part I would need guidance on would be testing. P.S. Love the library and community y'all have built! :hugs:
176
How to Add New Metrics Guide **Is your feature request related to a problem? Please describe.** Currently there is an absolutely fantastic guide for how to contribute a new dataset to the library. However, there isn't one for adding new metrics. **Describe the solution you'd like** I'd like for a guide in a similar style to the dataset guide for adding metrics. I believe many of the content in the dataset guide such as setup can be easily copied over with minimal changes. Also, from what I've seen with existing metrics, it shouldn't be as complicated, especially in documentation of the metric, mainly just citation and usage. The most complicated part I see would be in automated tests that run the new metrics, but y'all's test suite seem pretty comprehensive, so it might not be that hard. **Describe alternatives you've considered** One alternative would be just not having the metrics be community generated and so would not need a step by step guide. New metrics would just be proposed as issues and the internal team would take care of them. However, I think it makes more sense to have a step by step guide for contributors to follow. **Additional context** I'd be happy to help with creating this guide as I am very interested in adding software engineering metrics to the library :nerd_face:, the part I would need guidance on would be testing. P.S. Love the library and community y'all have built! :hugs: Hi ! sorry for the late response It would be fantastic to have a guide for adding metrics as well ! Currently we only have this template here: https://github.com/huggingface/datasets/blob/master/templates/new_metric_script.py We can also include test utilities for metrics in the guide. We have a pytest suite with commands that you can use to make sure your metric works as expected. It has two useful commands: 1. This commands tests the code in the `Examples:` desction of the docstring of the metric: ``` pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name> ``` This will run this code for example: https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/metrics/accuracy/accuracy.py#L40-L45 Moreover this test is meant to be fast so users are free to add patches to the metric to avoid intensive computations. And example of intensive call patch can be found here: https://github.com/huggingface/datasets/blob/e0787aa2a781cc15a80f7597f56d1f12e23df4c9/tests/test_metric_common.py#L138-L151 2. This test runs the same thing as 1. except that it doesn't use patches (the real metric is used): ``` RUN_SLOW=1 pytest tests/test_metric_common.py::LocalMetricTest::test_load_metric_<metric_name> ``` Finally additional metric-specific tests can be added to `test_metric_common.py`. Voila :) Feel free to ping me if you have any question or if I can help
[ 0.018429886549711227, 0.009165912866592407, -0.0002696588635444641, -0.15583214163780212, 0.03944389522075653, 0.08829446882009506, -0.06632773578166962, 0.030539916828274727, 0.026421643793582916, 0.08176053315401077, 0.016023222357034683, 0.26922428607940674, -0.13361263275146484, 0.2791260778903961, 0.2526018023490906, -0.1617620587348938, -0.11027296632528305, -0.06914128363132477, 0.16170966625213623, 0.020425014197826385, -0.0027733035385608673, -0.021874992176890373, 0.3294088840484619, 0.05451074242591858, -0.11646445095539093, -0.04808691889047623, -0.1330726593732834, 0.06651881337165833, -0.4833088517189026, -0.6584541201591492, 0.15862193703651428, 0.13528940081596375, -0.1188625693321228, 0.48452460765838623, -0.00011031928443117067, -0.3142382800579071, 0.20920653641223907, -0.06700477749109268, -0.11984916031360626, -0.44114184379577637, 0.02993243932723999, -0.7234886288642883, 0.1960807889699936, -0.09320129454135895, 0.031284675002098083, -0.13471518456935883, -0.15543362498283386, 0.1224786639213562, -0.02821710705757141, 0.1885773092508316, 0.21301066875457764, 0.09767782688140869, 0.044395629316568375, -0.3083939254283905, -0.26032984256744385, 0.3114713728427887, -0.4239772856235504, 0.5435326099395752, 0.30795931816101074, 0.1700695902109146, 0.09516146034002304, -0.0022232788614928722, 0.03364013135433197, -0.035485658794641495, 0.6798272132873535, -0.08972248435020447, 0.08044128119945526, 0.10717801749706268, -0.32542118430137634, 0.3772416412830353, 0.47955912351608276, -0.3143446743488312, -0.3093021512031555, -0.28317880630493164, 0.16838757693767548, -0.4429858922958374, -0.2639278173446655, -0.13538220524787903, -0.08716845512390137, -0.2493710219860077, -0.26695579290390015, -0.4700171947479248, -0.24333029985427856, 0.15335910022258759, 0.17878147959709167, 0.007376536726951599, 0.005796365439891815, -0.10159606486558914, 0.29979875683784485, 0.13847394287586212, -0.4045339524745941, 0.08821822702884674, -0.08048056066036224, 0.38472825288772583, 0.06262025237083435, -0.411401629447937, 0.26713815331459045, 0.021075475960969925, 0.46936944127082825, 0.13058704137802124, 0.32207757234573364, 0.04162851721048355, -0.33156818151474, 0.10198923945426941, 0.06972358375787735, 0.030216988176107407, 0.20648059248924255, 0.025961976498365402, 0.09070748090744019, 0.33961647748947144, 0.4559905230998993, -0.2520836293697357, 0.3968571722507477, -0.0956559106707573, 0.049977224320173264, 0.06858471781015396, 0.14712299406528473, -0.39933258295059204, -0.03774205967783928, -0.31212544441223145, 0.4328276813030243, -0.4076389670372009, 0.44145670533180237, 0.08972568064928055, -0.05200331285595894, -0.29158130288124084, -0.34026920795440674, 0.32530272006988525, -0.14875386655330658, 0.2075924277305603, -0.07392636686563492, 0.13444393873214722, -0.3010624051094055, 0.5152188539505005, 0.18276472389698029, -0.29416516423225403, 0.24200959503650665, 0.16667580604553223, 0.15226444602012634, -0.1999552994966507, 0.0022772029042243958, 0.24042533338069916, 0.04784173145890236, -0.05701695755124092, -0.12383465468883514, 0.16959166526794434, -0.11993858218193054, -0.28512176871299744, -0.3717525005340576, -0.04535290598869324, -0.34888049960136414, -0.4204469919204712, -0.2678244113922119, 0.14132584631443024, -0.31096410751342773, -0.3429507613182068, -0.10608728975057602, 0.49332934617996216, -0.38942983746528625, -0.19691473245620728, 0.048450395464897156, 0.4269005060195923, -0.28206244111061096, -0.31009453535079956, 0.0637533962726593, 0.3579253554344177, -0.3396792411804199, -0.23241615295410156, -0.23419034481048584, 0.025399552658200264, -0.1374925673007965, -0.038981590420007706, -0.029750216752290726, 0.158949077129364, 0.0738946944475174, -0.1113869845867157, 0.5824453234672546, -0.28020668029785156, 0.2215576171875, 0.032762423157691956, -0.08531856536865234, -0.2565300464630127, -0.13043621182441711, 0.4572611153125763, 0.026526983827352524, -0.2065906673669815, -0.28328895568847656, 0.05710315704345703, -0.19428859651088715, -0.24728986620903015, -0.15416891872882843, -0.12377510219812393, 0.2240419089794159, -0.11530005931854248, -0.06951908767223358, -0.0026224330067634583, 0.4326040744781494, -0.019256725907325745, -0.1784527599811554, -0.10232071578502655, -0.23358087241649628, 0.2795450687408447, 0.5255994200706482, -0.02197323739528656, 0.21931135654449463, -0.21874791383743286, -0.15634876489639282, -0.01797497272491455, 0.1284734457731247, -0.11664816737174988, 0.35910099744796753, -0.17868895828723907, -0.4749305844306946, -0.05243352800607681, 0.05223621055483818, 0.06697593629360199, 0.022109754383563995, -0.33392560482025146, -0.04201510548591614, 0.054615359753370285, -0.1838296353816986, -0.023948481306433678, -0.32591721415519714, 0.4437638521194458, -0.05013566091656685, 0.016187356784939766, 0.03870410472154617, 0.0317184142768383, 0.08271437138319016, 0.5306405425071716, 0.28601905703544617, 0.09814328700304031, -0.06623005867004395, 0.14833833277225494, 0.029212230816483498, 0.06748342514038086, 0.21218618750572205, 0.6915301084518433, 0.5469903945922852, -0.08050385862588882, 0.20354622602462769, -0.261483371257782, -0.09562762081623077, -0.1592148244380951, -0.26880282163619995, 0.2466142177581787, -0.30729976296424866, 0.10973484814167023, -0.12033320963382721, 0.05137094110250473, -0.06169223040342331, -0.028906919062137604, -0.12411202490329742, -0.18571573495864868, 0.17903366684913635, -0.09516018629074097, -0.06637676060199738, -0.06750262528657913, 0.22527509927749634, 0.20730051398277283, 0.18980886042118073, -0.10844321548938751, 0.030164573341608047, 0.3718453347682953, 0.13675379753112793, -0.13958975672721863, -0.1679079234600067, 0.08200764656066895, 0.11655307561159134, 0.24251866340637207, 0.0056010037660598755, 0.09168367087841034, -0.3783508837223053, -0.11685753613710403, -0.08956839889287949, 0.1801924854516983, -0.3604489266872406, -0.022836357355117798, 0.014599675312638283, 0.12394904345273972, 0.04420046508312225, -0.0018290691077709198, -0.16319118440151215, 0.16063900291919708, -0.16253343224525452, -0.11564090102910995, 0.08263847976922989, 0.05635654926300049, -0.009575330652296543, -0.25892892479896545, -0.32230883836746216, -0.24847346544265747, 0.2069886326789856, -0.017650041729211807, 0.13114948570728302, -0.012033041566610336, 0.17714157700538635, 0.31367751955986023, -0.3538408875465393, -0.006278662011027336, -0.1025250107049942, -0.27698349952697754, -0.014698844403028488, 0.15585075318813324, 0.08372814953327179, -0.010705443099141121, 0.542371392250061, 0.08234298974275589, 0.39530664682388306, -0.43688341975212097, -0.8153740763664246, -0.07248005270957947, -0.11266094446182251, 0.612594723701477, 0.08427104353904724, 0.08969710022211075, 0.11666430532932281, -0.22696690261363983, 0.02119067683815956, -0.1636057198047638, 0.03612273931503296, 0.0461704283952713, -0.32352590560913086, 0.05308762192726135, -0.18687781691551208, -0.2285001277923584, -0.08367279917001724, -0.38016170263290405, 0.15298312902450562, 0.19034776091575623, 0.06738846004009247, 0.22705762088298798, 0.045443158596754074, 0.06812306493520737, -0.004525082651525736, 0.2067427933216095, -0.09900631010532379, 0.030344266444444656, 0.22203940153121948, -0.3982444405555725, -0.12085829675197601, 0.25291934609413147, 0.01725267618894577, 0.2168857753276825, -0.19776500761508942, -0.2195442169904709, -0.7192436456680298, 0.06334397196769714, 0.36623018980026245, 0.15674003958702087, 0.311951220035553, 0.18608979880809784, 0.031219273805618286, 0.011689366772770882, -0.05078325420618057, -0.5496688485145569, -0.06240535527467728, 0.335500031709671, 0.21130728721618652, -0.1976543366909027, 0.2261875569820404, 0.16391193866729736, 0.5142986178398132, 0.12518680095672607, -0.1498405933380127, 0.2382321059703827, 0.08076226711273193, 0.5520667433738708, 0.09712553769350052, -0.2344651073217392, 0.08342773467302322, 0.1130741536617279, 0.13812319934368134, 0.011228777468204498, 0.4134220778942108, -0.047334447503089905, -0.05958617851138115, -0.17694325745105743, -0.17020264267921448, 0.06393802165985107, 0.09181340783834457, 0.0583689920604229, 0.24053144454956055, -0.24755646288394928, -0.009953189641237259, -0.5171262621879578, -0.49166548252105713, 0.18986524641513824, 0.661861002445221, 0.11304611712694168, 0.1411307156085968, -0.30029571056365967, -0.20056946575641632, -0.36769357323646545, 0.08518990129232407, 0.2254049926996231, -0.3414382040500641, -0.35526105761528015, 0.14653563499450684, -0.031388476490974426, 0.1897527426481247, -0.1730232685804367, -0.2952406704425812, -0.5991570949554443, 0.24475783109664917, 0.09048910439014435, -0.04453181475400925, 0.15228313207626343, 0.11540478467941284, 0.3179462254047394, 0.10514378547668457, 0.278682678937912, -0.380790650844574, -0.15594206750392914, 0.2681198716163635, 0.45882487297058105, -0.0700066089630127, -0.04447648674249649, 0.1528836041688919, -0.4423779547214508, 0.09445115923881531, 0.002582043409347534, -0.33483579754829407, 0.1386280655860901, 0.3370289206504822, -0.1488553136587143, 0.25337210297584534, 0.07846585661172867, 0.25787466764450073, 0.026287995278835297, 0.052640169858932495, 0.3170260488986969, 0.08849388360977173, 0.14094144105911255, -0.23625671863555908, -0.06294377893209457, 0.006125286221504211, -0.156948059797287, 0.15501615405082703, -0.02969127893447876, -0.22917327284812927, 0.5229883790016174, 0.08986711502075195, 0.2265155166387558, 0.5072433948516846, -0.16217608749866486, 0.046264246106147766, -0.3842119872570038, 0.11181896179914474, 0.03009258769452572, 0.20982083678245544, -0.30153006315231323, -0.3861687183380127, 0.5291601419448853, 0.06272636353969574, -0.10920296609401703, 0.6401623487472534, 0.20590950548648834, 0.11340981721878052, 0.013444332405924797, 0.12259382009506226, 0.8073387145996094, -0.19809065759181976, -0.2586933672428131, 0.09107055515050888, -0.4162577986717224, 0.498708575963974, -0.19074039161205292, -0.25564682483673096, -0.22058777511119843, 0.08981789648532867, 0.06569238007068634, -0.03812891244888306, 0.02049729973077774, -0.292364239692688, -0.01210494339466095, 0.2856825888156891, -0.1299082636833191, -0.07042475044727325, -0.022638102993369102, 0.4557744264602661, 0.046586327254772186, -0.3004555106163025, 0.2458128184080124, 0.2028038203716278, -0.12557926774024963, -0.05082013085484505, -0.09167685359716415, -0.17650040984153748, -0.026897510513663292, 0.036250628530979156, -0.35644006729125977, -0.5494889616966248, 0.20384801924228668, -0.19031603634357452, 0.22379916906356812, -0.44087231159210205, 0.27946531772613525, -0.017074737697839737, 0.5803316235542297, 0.01225452683866024, -0.22433683276176453, 0.10151395201683044, -0.635173499584198, 0.05416489019989967, -0.07116224616765976, 0.04360947012901306, 0.23325514793395996, -0.13845014572143555, 0.047197796404361725, 0.2041129469871521, 0.06312184035778046, -0.26924246549606323, -0.14609172940254211, -0.10665777325630188, 0.017049945890903473, -0.32274746894836426, 0.28495457768440247, 0.18657350540161133, 0.19085028767585754, -0.20299220085144043, 0.11635088920593262, 0.48658889532089233, -0.0669860988855362, 0.18611225485801697, 0.1797458976507187, 0.04261033236980438, -0.2171352356672287, -0.19579154253005981, -0.0896969810128212, -0.48441094160079956, -0.13370107114315033, -0.12196561694145203, -0.11052680760622025, -0.09289911389350891, -0.14923927187919617, 0.1604570746421814, -0.07800334692001343, -0.12327825278043747, 0.27985092997550964, 0.07643231749534607, 0.13705718517303467, 0.20578810572624207, 0.19913706183433533, -0.055714406073093414, -0.11544185876846313, -0.100929394364357, -0.19449804723262787, 0.17545440793037415, -0.2165118306875229, 0.14903387427330017, -0.5839190483093262, -0.01832733303308487, 0.026488816365599632, 0.3320853114128113, -0.31755417585372925, -0.02645314298570156, 0.10453420132398605, 0.1118406429886818, 0.27535805106163025, 0.02942773699760437, -0.15665297210216522, -0.1903885453939438, -0.06236403435468674, -0.25469356775283813, -0.1563495546579361, -0.10914509743452072, -0.32507002353668213, 0.15311789512634277, -0.22120141983032227, 0.08979994058609009, -0.08399813622236252, 0.04112657159566879, 0.04714921861886978, 0.1006324365735054, 0.010900620371103287, 0.08740922063589096, -0.15416845679283142, 0.09485162794589996, -0.25945112109184265, 0.0788019448518753, 0.07374273985624313, 0.045784369111061096, 0.21430733799934387, 0.4922332763671875, 0.08931133896112442, 0.1163206398487091, -0.19136904180049896, 0.04066579043865204, 0.1258859485387802, 0.20757067203521729, 0.1541229784488678, -0.2356116771697998, 0.035545140504837036, 0.2782091796398163, 0.09684664011001587, 0.28689372539520264, 0.03737807273864746, -0.19930851459503174, 0.03517238795757294, 0.33897924423217773, 0.015388865023851395, 0.15139953792095184, 0.03280022740364075, -0.08442316949367523, 0.07709406316280365, 0.17647020518779755, 0.27657464146614075, 0.0741945207118988, 0.5186917185783386, 0.20163199305534363, 0.3859254717826843, -0.18018653988838196, 0.07597605139017105, -0.09419920295476913, 0.17873874306678772, -0.1183590441942215, 0.08947187662124634, -0.07165002822875977, 0.5985194444656372, 0.10026633739471436, 0.01659168303012848, -0.22169829905033112, -0.08507483452558517, 0.3150958716869354, 0.058901820331811905, 0.07011936604976654, 0.0637240782380104, 0.015208706259727478, 0.10973308980464935, -0.14764419198036194, 0.326640248298645, -0.2443140745162964, 0.1892072856426239, 0.5347024202346802, -0.03614168241620064, -0.2718054950237274, -0.053948454558849335, -0.10501129925251007, 0.12879116833209991, 0.06595177948474884, -0.2847750782966614, -0.13387531042099, -0.19623422622680664, -0.2545797824859619, 0.22748254239559174, -0.335002064704895, 0.12663421034812927, -0.2393215149641037, 0.15380443632602692, -0.01686125434935093, 0.04301375523209572, 0.26153892278671265, 0.23646122217178345, 0.07565037906169891, -0.008682316169142723, -0.10079634189605713, 0.030982565134763718, -0.0299997515976429, 0.37889182567596436, 0.19013038277626038, -0.14598846435546875, 0.014038889668881893, 0.41529685258865356, -0.1666007936000824, -0.09028586745262146, 0.36965295672416687, 0.19239972531795502, -0.11166372895240784, -0.1447288542985916, -0.14766372740268707, 0.13990047574043274, -0.13019271194934845, 0.37740251421928406, -0.41946977376937866, -0.11620664596557617, -0.3492372930049896, 0.3389999270439148, 0.32434555888175964, -0.13707640767097473, -0.1120394617319107, -0.21741816401481628, -0.06917493045330048, -0.04272003471851349, 0.5133611559867859, -0.05308082327246666, -0.17484530806541443, -0.20776771008968353, 0.11121711134910583, 0.2073674350976944, -0.10237260162830353, 0.3140535056591034, 0.3296167552471161, -0.22290219366550446, -0.11808551847934723, -0.40544018149375916, -0.25192296504974365, 0.15386271476745605, 0.12757866084575653, 0.02107168361544609, -0.023910146206617355, -0.06613563746213913, 0.32105302810668945, 0.3211808204650879, 0.0025877859443426132, 0.17245052754878998, -0.18278363347053528, -0.3393133580684662, -0.1350647360086441, 0.0585566870868206, -0.25470200181007385, -0.12272512167692184, 0.3190796375274658, -0.08182045817375183, -0.4071909785270691, -0.016970694065093994, -0.1636163890361786, 0.17094583809375763, 0.2222645878791809, 0.507132887840271, 0.2640208601951599, 0.050347261130809784, 0.44836339354515076, 0.10607167333364487, -0.09985820949077606, -0.12607267498970032, -0.03301267698407173, 0.1640866994857788, 0.0844273567199707, -0.1180989146232605, 0.2994469106197357, 0.004277749918401241, -0.2160634845495224, -0.24864718317985535, 0.5709845423698425, 0.08783195912837982, -0.17024457454681396, -0.08670756965875626, 0.05191807448863983, -0.08797945082187653, -0.17365695536136627, 0.3191547691822052, 0.38811060786247253, 0.07663655281066895, 0.4116772413253784, 0.07796984910964966, -0.06926129758358002, 0.25467514991760254, -0.08810441941022873, 0.13793089985847473, 0.07838395237922668, 0.24938908219337463, 0.47459876537323, -0.04394280165433884, -0.5338277220726013, -0.06248168274760246, 0.2976028621196747, -0.07795921713113785, -0.1717205047607422, 0.5125023126602173, -0.13979972898960114, -0.05331529676914215, -0.11887331306934357, -0.023523196578025818, 0.05850222334265709, -0.10798849165439606, 0.19566544890403748, -0.01099414937198162 ]
https://github.com/huggingface/datasets/issues/2350
`FaissIndex.save` throws error on GPU
Just in case, this is a workaround that I use in my code and it seems to do the job. ```python if use_gpu_index: data["train"]._indexes["text_emb"].faiss_index = faiss.index_gpu_to_cpu(data["train"]._indexes["text_emb"].faiss_index) ```
## Describe the bug After training an index with a factory string `OPQ16_128,IVF512,PQ32` on GPU, `.save_faiss_index` throws this error. ``` File "index_wikipedia.py", line 119, in <module> data["train"].save_faiss_index("text_emb", index_save_path) File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 470, in save_faiss_index index.save(file) File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 334, in save faiss.write_index(index, str(file)) File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/faiss/swigfaiss_avx2.py", line 5654, in write_index return _swigfaiss.write_index(*args) RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /root/miniconda3/conda-bld/faiss-pkg_1613235005464/work/faiss/impl/index_write.cpp:453: don't know how to serialize this type of index ``` ## Steps to reproduce the bug Any dataset will do, I just selected a familiar one. ```python import numpy as np import datasets INDEX_STR = "OPQ16_128,IVF512,PQ32" INDEX_SAVE_PATH = "will_not_save.faiss" data = datasets.load_dataset("Fraser/news-category-dataset", split=f"train[:10000]") def encode(item): return {"text_emb": np.random.randn(768).astype(np.float32)} data = data.map(encode) data.add_faiss_index(column="text_emb", string_factory=INDEX_STR, train_size=10_000, device=0) data.save_faiss_index("text_emb", INDEX_SAVE_PATH) ``` ## Expected results Saving the index ## Actual results Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) ... don't know how to serialize this type of index ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.10 - Python version: 3.8.8 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): 2.2.0 (False) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No I will be proposing a fix in a couple of minutes
27
`FaissIndex.save` throws error on GPU ## Describe the bug After training an index with a factory string `OPQ16_128,IVF512,PQ32` on GPU, `.save_faiss_index` throws this error. ``` File "index_wikipedia.py", line 119, in <module> data["train"].save_faiss_index("text_emb", index_save_path) File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 470, in save_faiss_index index.save(file) File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 334, in save faiss.write_index(index, str(file)) File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/faiss/swigfaiss_avx2.py", line 5654, in write_index return _swigfaiss.write_index(*args) RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /root/miniconda3/conda-bld/faiss-pkg_1613235005464/work/faiss/impl/index_write.cpp:453: don't know how to serialize this type of index ``` ## Steps to reproduce the bug Any dataset will do, I just selected a familiar one. ```python import numpy as np import datasets INDEX_STR = "OPQ16_128,IVF512,PQ32" INDEX_SAVE_PATH = "will_not_save.faiss" data = datasets.load_dataset("Fraser/news-category-dataset", split=f"train[:10000]") def encode(item): return {"text_emb": np.random.randn(768).astype(np.float32)} data = data.map(encode) data.add_faiss_index(column="text_emb", string_factory=INDEX_STR, train_size=10_000, device=0) data.save_faiss_index("text_emb", INDEX_SAVE_PATH) ``` ## Expected results Saving the index ## Actual results Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) ... don't know how to serialize this type of index ## Environment info - `datasets` version: 1.6.2 - Platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.10 - Python version: 3.8.8 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): 2.2.0 (False) - Using GPU in script?: Yes - Using distributed or parallel set-up in script?: No I will be proposing a fix in a couple of minutes Just in case, this is a workaround that I use in my code and it seems to do the job. ```python if use_gpu_index: data["train"]._indexes["text_emb"].faiss_index = faiss.index_gpu_to_cpu(data["train"]._indexes["text_emb"].faiss_index) ```
[ -0.11386935412883759, 0.23111572861671448, 0.049321386963129044, 0.2159433662891388, 0.35923635959625244, 0.1624380648136139, 0.5158486366271973, 0.509063184261322, 0.2508895695209503, 0.22490346431732178, 0.06692954152822495, 0.23696093261241913, 0.05093267932534218, -0.06800299882888794, -0.13808518648147583, -0.03890761733055115, 0.27007749676704407, 0.26283955574035645, 0.15735626220703125, -0.16931454837322235, -0.44070130586624146, 0.011673243716359138, -0.0017450451850891113, 0.25762876868247986, -0.24858349561691284, -0.04467744380235672, -0.09316056221723557, 0.01688305288553238, -0.10027451813220978, -0.43972718715667725, 0.06796074658632278, -0.2787284553050995, 0.4836607873439789, 0.30831289291381836, -0.00011195111437700689, 0.16159266233444214, 0.2866712808609009, -0.17243698239326477, -0.2263420671224594, 0.14830458164215088, -0.06782004237174988, 0.13925975561141968, 0.03826763480901718, -0.2912580668926239, -0.17101642489433289, -0.2987518608570099, 0.09409666806459427, -0.2719939649105072, -0.1236027330160141, 0.30526456236839294, 0.2272421419620514, -0.19253496825695038, 0.30929991602897644, -0.11319919675588608, 0.18933887779712677, -0.020289890468120575, -0.13423015177249908, 0.049811601638793945, -0.39209380745887756, 0.34106504917144775, 0.28511637449264526, 0.3660792112350464, -0.012644892558455467, -0.419009268283844, -0.2800436019897461, 0.17593476176261902, 0.6013675332069397, -0.24395674467086792, 0.11664742976427078, -0.04168343544006348, 0.13410508632659912, -0.28881725668907166, -0.3871851861476898, 0.1896897256374359, 0.24920453131198883, -0.4939919114112854, -0.04770732671022415, 0.06562048196792603, 0.04721195623278618, 0.2803216278553009, 0.5671788454055786, -0.10802078247070312, -0.14547795057296753, -0.04824484884738922, 0.18102531135082245, 0.07697289437055588, -0.04557017982006073, 0.20254597067832947, -0.09050941467285156, -0.288937509059906, -0.1879063844680786, -0.003743240609765053, 0.09842782467603683, -0.05473942682147026, -0.34312018752098083, 0.006289977580308914, -0.17570805549621582, -0.43424543738365173, -0.005537860095500946, -0.006652262061834335, -0.43125203251838684, -0.008348386734724045, 0.27033668756484985, 0.11885303258895874, -0.3501148521900177, 0.16056320071220398, 0.009782440960407257, -0.16193321347236633, 0.1525244414806366, 0.021844109520316124, -0.21328358352184296, -0.09223975986242294, -0.11685138195753098, 0.12364896386861801, -0.1891152262687683, -0.0733325183391571, 0.21622702479362488, -0.22175025939941406, -0.5828647017478943, 0.3758401870727539, -0.3595433533191681, 0.1377793848514557, 0.011137823574244976, 0.5140866637229919, 0.07913090288639069, 0.0501042976975441, 0.16527964174747467, 0.2339891791343689, -0.11105480790138245, -0.14194241166114807, -0.21111182868480682, -0.11084392666816711, 0.2596280574798584, 0.23572216928005219, -0.16448043286800385, -0.3422324061393738, -0.002743945922702551, 0.06697501242160797, -0.34034377336502075, -0.02362074889242649, 0.10933554172515869, -0.2806960642337799, 0.002855919301509857, 0.3031328320503235, 0.10094255208969116, 0.0751548558473587, 0.19129960238933563, -0.3268488645553589, -0.10660713165998459, 0.040204934775829315, 0.06743625551462173, -0.14084921777248383, -0.3725000321865082, 0.21875903010368347, 0.2860942482948303, -0.1972837746143341, 0.6523467302322388, 0.0753614753484726, 0.3555600643157959, 0.1765323430299759, 0.09534528851509094, -0.06761758774518967, -0.09798533469438553, -0.3917904496192932, 0.36248281598091125, 0.14306703209877014, -0.18603312969207764, -0.011312462389469147, 0.09574628621339798, 0.06627577543258667, 0.38028427958488464, 0.5683286190032959, 0.3160375952720642, 0.23908239603042603, -0.21215206384658813, 0.420356810092926, 0.2726427912712097, -0.37799960374832153, -0.280284583568573, 0.13307109475135803, -0.13572904467582703, -0.21286359429359436, 0.20117154717445374, 0.059153225272893906, 0.1582610011100769, -0.05843479558825493, 0.4598625600337982, 0.11829774081707001, 0.06503229588270187, -0.10885404050350189, -0.49009373784065247, -0.5541244745254517, 0.20363453030586243, 0.10985332727432251, 0.00847594439983368, -0.1918826401233673, -0.17552319169044495, -0.5428341627120972, 0.28119388222694397, -0.243263840675354, -0.0737856850028038, 0.024940337985754013, 0.7233160734176636, 0.15376129746437073, 0.24237968027591705, -0.036604538559913635, 0.13837194442749023, -0.06222333759069443, -0.1854732483625412, -0.02904438227415085, -0.11470972001552582, -0.23717594146728516, -0.02232779562473297, 0.018374746665358543, 0.0365036278963089, 0.049404554069042206, 0.11411254107952118, 0.01314835250377655, -0.11993542313575745, 0.3434329926967621, -0.2094557285308838, 0.03981134295463562, -0.3076530992984772, 0.06262132525444031, -0.20816445350646973, 0.07222656905651093, -0.3703285753726959, -0.4066973328590393, -0.14258745312690735, 0.1701202392578125, 0.3474282920360565, -0.18631328642368317, 0.012517867609858513, 0.3988083302974701, 0.03449488431215286, -0.15583322942256927, 0.10123051702976227, 0.02620987594127655, -0.048924170434474945, -0.25363582372665405, 0.03073887713253498, 0.5145238637924194, 0.18807947635650635, 0.1472201645374298, -0.004876747727394104, 0.3355098366737366, 0.1963055431842804, -0.02423916757106781, -0.08469731360673904, 0.13067792356014252, 0.46052995324134827, -0.008765745908021927, -0.03395824134349823, -0.29896965622901917, 0.02842920832335949, 0.026836920529603958, 0.05559471622109413, -0.04183397442102432, -0.668185830116272, 0.23403561115264893, 0.2718903720378876, 0.0009320545941591263, 0.5030540823936462, 0.08905930817127228, -0.3418866991996765, 0.0547042191028595, -0.0895654633641243, -0.543465256690979, 0.23455461859703064, 0.13728275895118713, -0.14673426747322083, -0.12370236963033676, -0.3353565037250519, -0.17710335552692413, 0.4169146716594696, -0.22559477388858795, 0.09044026583433151, 0.10402928292751312, 0.10147140920162201, 0.059389449656009674, -0.18809962272644043, 0.03374827280640602, -0.16967372596263885, 0.017756132408976555, -0.31703609228134155, 0.15627920627593994, -0.13127104938030243, 0.013449504971504211, -0.24442845582962036, -0.18427519500255585, -0.032165396958589554, 0.044315360486507416, 0.05388718843460083, 0.130515918135643, -0.11422134935855865, 0.28442510962486267, -0.3202931582927704, 0.32815608382225037, 0.42097845673561096, -0.12389688938856125, -0.05179324746131897, -0.01826191134750843, -0.3266085088253021, -0.03972441703081131, 0.060019031167030334, -0.01897224597632885, 0.1622941493988037, -0.08220213651657104, -0.04531487822532654, -0.2157869040966034, -0.09341293573379517, 0.0835171788930893, -0.14677701890468597, 0.38597896695137024, -0.03450000286102295, 0.08701629936695099, 0.005154341459274292, -0.0344151146709919, 0.10847024619579315, 0.045898690819740295, -0.06047501415014267, -0.0019139889627695084, -0.17695027589797974, 0.03194541484117508, -0.15693238377571106, -0.20867466926574707, -0.19142268598079681, -0.23424510657787323, 0.28270936012268066, -0.03736239671707153, 0.20859679579734802, 0.15101736783981323, 0.04117793217301369, 0.2148134410381317, 0.11204554885625839, -0.08298425376415253, -0.3446105122566223, -0.11679959297180176, 0.32813820242881775, -0.023374080657958984, -0.48751363158226013, 0.0882832258939743, 0.0634186789393425, -0.19235862791538239, -0.06280075758695602, -0.09271760284900665, 0.3474019467830658, -0.038161501288414, 0.08321395516395569, -0.15458811819553375, 0.15552332997322083, 0.29916274547576904, -0.07973498106002808, -0.05006791651248932, -0.12722915410995483, -0.1483064591884613, 0.2376614212989807, 0.07840661704540253, 0.35457250475883484, -0.2086634337902069, 0.3585052490234375, -0.027800021693110466, 0.44868963956832886, 0.2896330952644348, -0.34328192472457886, 0.24183720350265503, -0.06333208829164505, 0.23571856319904327, -0.05129685252904892, -0.19331733882427216, 0.2188628613948822, 0.011307895183563232, -0.24358408153057098, 0.12163994461297989, -0.359211266040802, 0.001047033816576004, 0.26252323389053345, 0.13176116347312927, -0.012520436197519302, -0.26196736097335815, 0.11382456123828888, -0.0019272975623607635, 0.3059879541397095, -0.16390962898731232, 0.38125407695770264, 0.07672359049320221, 0.1408039629459381, 0.27543115615844727, 0.46342676877975464, 0.25282278656959534, -0.07807479798793793, 0.16760492324829102, -0.19338220357894897, -0.3587155342102051, 0.26002809405326843, 0.0077124545350670815, 0.7269454598426819, -0.07580378651618958, -0.17173874378204346, 0.21199537813663483, -0.04522206261754036, 0.7033807635307312, -0.18836654722690582, -0.3067082166671753, 0.3672280013561249, 0.35156503319740295, -0.5859758257865906, -0.17059434950351715, -0.13656044006347656, 0.09839628636837006, 0.07489567250013351, 0.4549071788787842, -0.0962129682302475, -0.16584090888500214, 0.08272439241409302, 0.01766057312488556, -0.305420845746994, -0.2055089920759201, -0.3597080409526825, -0.2932021915912628, -0.1851573884487152, 0.282406210899353, -0.21689832210540771, 0.2141849845647812, -0.07001105695962906, 0.26651257276535034, -0.5732186436653137, -0.12136206775903702, -0.03491845726966858, -0.009225783869624138, 0.3289054334163666, -0.12248367816209793, 0.11294589936733246, 0.08899544179439545, 0.08805287629365921, 0.21549947559833527, -0.024900920689105988, 0.15731798112392426, 0.0749237984418869, 0.11200425028800964, -0.0866682380437851, 0.09695674479007721, 0.2478032410144806, -0.10182414948940277, 0.05576679855585098, -0.19263440370559692, -0.041637033224105835, -0.3843397796154022, -0.037236589938402176, 0.27318522334098816, -0.06814847886562347, -0.31491032242774963, -0.0548357218503952, 0.5327314734458923, -0.08085775375366211, -0.0924982950091362, 0.05703689530491829, 0.23782138526439667, -0.2765059471130371, 0.7876931428909302, 0.5123695731163025, 0.8745914101600647, -0.02493342012166977, 0.23877499997615814, 0.31363311409950256, -0.4298112988471985, 0.45047515630722046, -0.08738482743501663, 0.326560914516449, -0.6909177899360657, -0.20897674560546875, 0.007177596911787987, 0.03879733011126518, 0.17890213429927826, -0.3683890700340271, -0.4958123564720154, -0.010302211157977581, -0.2931322455406189, -0.042661573737859726, 0.06842181831598282, 0.13115628063678741, -0.10148262232542038, -0.3177868723869324, -0.11300210654735565, 0.126093327999115, 0.19392041862010956, -0.0398438535630703, -0.0478852316737175, -0.11769048869609833, -0.12018746137619019, 0.017348214983940125, -0.2380909025669098, 0.17133119702339172, -0.07186244428157806, 0.44901275634765625, -0.24360120296478271, -0.18581953644752502, -0.23321352899074554, -0.3181985914707184, 0.5306909680366516, -0.14262215793132782, -0.1438908874988556, -0.16893330216407776, -0.046187736093997955, -0.052006568759679794, -0.04572470486164093, -0.257760226726532, 0.42935240268707275, 0.10324414819478989, -0.12714336812496185, 0.003966338932514191, 0.15613937377929688, -0.0028364919126033783, -0.2947377562522888, -0.13677725195884705, -0.41672617197036743, -0.17053741216659546, -0.2591073513031006, -0.21236521005630493, 0.12812145054340363, -0.14328612387180328, 0.1266583502292633, 0.12549197673797607, -0.2148142158985138, 0.3663399815559387, -0.193705216050148, -0.19924724102020264, -0.09686809778213501, 0.3377801477909088, 0.17166271805763245, 0.2284013032913208, 0.41872158646583557, -0.03127708286046982, -0.1312444806098938, -0.28683000802993774, -0.008741755038499832, 0.05887458100914955, 0.10390592366456985, 0.04447336494922638, -0.3001893162727356, -0.19035831093788147, -0.07657284289598465, -0.05674852803349495, 0.09825167059898376, -0.407913476228714, -0.3621656596660614, -0.19886788725852966, -0.39845505356788635, 0.04851154237985611, -0.06949204206466675, 0.19060426950454712, -0.03423799201846123, 0.22577349841594696, -0.19611695408821106, -0.20545724034309387, -0.31270962953567505, 0.05222030729055405, -0.2639797329902649, 0.10252794623374939, -0.16759531199932098, -0.07676012068986893, 0.19807960093021393, -0.04227565973997116, 0.18427203595638275, 0.23288865387439728, 0.027505334466695786, -0.18868491053581238, -0.3180933892726898, 0.09429244697093964, 0.0779784619808197, 0.0868210569024086, -0.11646836996078491, -0.08052170276641846, -0.16693291068077087, -0.012343471869826317, -0.16847464442253113, 0.18319517374038696, -0.05917908251285553, 0.17523735761642456, -0.08390134572982788, 0.13674134016036987, -0.015272537246346474, -0.004783879965543747, 0.1312588006258011, 0.34500694274902344, 0.07495515048503876, 0.17244592308998108, -0.4182548522949219, 0.06498107314109802, -0.19200637936592102, 0.009751439094543457, 0.2220519483089447, 0.17874258756637573, 0.17394140362739563, -0.26619017124176025, -0.33851128816604614, 0.09609673917293549, -0.0441376194357872, 0.2958495616912842, -0.33342626690864563, -0.19056858122348785, 0.19592472910881042, 0.2207360565662384, -0.06759505718946457, -0.034242697060108185, 0.21210511028766632, -0.3065630793571472, -0.10313226282596588, 0.2337239384651184, 0.3573594093322754, 0.23692753911018372, -0.355180561542511, 0.11684054881334305, 0.23025700449943542, 0.30612480640411377, -0.01723433844745159, 0.00008106976747512817, 0.19745634496212006, 0.19806507229804993, 0.14067421853542328, 0.16162636876106262, 0.5372232794761658, 0.7073376178741455, 0.00982271134853363, 0.1949506253004074, 0.25890061259269714, -0.016818005591630936, -0.06783207505941391, 0.03410575911402702, 0.22008845210075378, 0.03671880066394806, -0.030813127756118774, 0.0902552530169487, -0.005316786468029022, 0.10245198011398315, -0.2976325750350952, -0.3377815783023834, -0.010342136025428772, 0.23416487872600555, -0.29713407158851624, -0.17466117441654205, -0.01574467122554779, 0.12657564878463745, -0.03710447624325752, -0.18240489065647125, 0.027761807665228844, 0.10887635499238968, -0.04757571220397949, 0.1855153739452362, -0.17676587402820587, -0.16554541885852814, -0.2276676595211029, 0.517217755317688, 0.35380998253822327, -0.20132967829704285, 0.06861015409231186, 0.034289322793483734, -0.18338888883590698, -0.22043734788894653, 0.20491912961006165, 0.476328581571579, 0.422963410615921, -0.40530720353126526, 0.33715829253196716, -0.060810189694166183, 0.012129561975598335, 0.03331712260842323, -0.19487088918685913, 0.05025159567594528, 0.04374901205301285, 0.2616237699985504, 0.1441909372806549, -0.0435960590839386, -0.15281322598457336, 0.244541198015213, 0.42852315306663513, -0.0031444691121578217, -0.03181573003530502, -0.2115761935710907, 0.06569094210863113, -0.029151201248168945, -0.07215111702680588, -0.3379940986633301, 0.3102940618991852, 0.40123414993286133, -0.08701110631227493, 0.25442954897880554, 0.14738020300865173, 0.07806692272424698, -0.12072496116161346, 0.22958964109420776, 0.12370100617408752, -0.09283294528722763, -0.24310961365699768, 0.0275108739733696, -0.13230982422828674, 0.27228042483329773, -0.06674216687679291, 0.1401512175798416, 0.19521333277225494, 0.5284091830253601, 0.0032883435487747192, -0.2131548523902893, 0.2024681270122528, 0.1564047485589981, 0.3337163031101227, 0.30438703298568726, -0.20111696422100067, -0.06493163108825684, -0.37024372816085815, -0.11552000045776367, -0.0019278768450021744, -0.2382214367389679, 0.32548588514328003, 0.010602901689708233, 0.15084969997406006, -0.10657049715518951, -0.27408429980278015, -0.0899968147277832, -0.26837319135665894, 0.8571711182594299, 0.16990643739700317, -0.1377740502357483, -0.2573101222515106, -0.33936813473701477, -0.06603485345840454, 0.017976608127355576, -0.331230491399765, 0.09666025638580322, -0.017148278653621674, 0.2599121034145355, -0.2001359760761261, -0.2401794046163559, -0.3278622627258301, 0.6025984883308411, 0.10201601684093475, -0.18820184469223022, -0.20617882907390594, 0.31538695096969604, -0.236720472574234, -0.1087488979101181, 0.03242681175470352, 0.21041947603225708, 0.047104351222515106, 0.5866943597793579, -0.18955224752426147, -0.2843567728996277, 0.5402364730834961, -0.32238081097602844, -0.228123277425766, -0.1142284944653511, 0.4193394184112549, 0.3192797303199768, 0.30784541368484497, -0.5473868250846863, -0.08137951046228409, 0.22163638472557068, 0.05496525391936302, -0.19709588587284088, -0.18577679991722107, 0.22532549500465393, -0.052556153386831284, -0.10444536805152893, 0.010250858962535858, 0.07744968682527542, 0.13657985627651215, 0.09699103236198425, -0.29579198360443115 ]
https://github.com/huggingface/datasets/issues/2347
Add an API to access the language and pretty name of a dataset
Hi ! With @bhavitvyamalik we discussed about having something like ```python from datasets import load_dataset_card dataset_card = load_dataset_card("squad") print(dataset_card.metadata.pretty_name) # Stanford Question Answering Dataset (SQuAD) print(dataset_card.metadata.languages) # ["en"] ``` What do you think ? I don't know if you already have a way to load the model tags in `transformers` but we can agree on the API to have something consistent. Also note that the pretty name would only be used to show users something prettier than a dataset id, but in the end the source of truth will stay the dataset id (here `squad`).
It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts.
95
Add an API to access the language and pretty name of a dataset It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts. Hi ! With @bhavitvyamalik we discussed about having something like ```python from datasets import load_dataset_card dataset_card = load_dataset_card("squad") print(dataset_card.metadata.pretty_name) # Stanford Question Answering Dataset (SQuAD) print(dataset_card.metadata.languages) # ["en"] ``` What do you think ? I don't know if you already have a way to load the model tags in `transformers` but we can agree on the API to have something consistent. Also note that the pretty name would only be used to show users something prettier than a dataset id, but in the end the source of truth will stay the dataset id (here `squad`).
[ -0.1883871704339981, 0.11107923090457916, -0.11896535754203796, 0.3318746089935303, 0.3078958988189697, 0.12758085131645203, 0.27148813009262085, 0.2705743610858917, -0.16304732859134674, 0.23702996969223022, 0.18236735463142395, 0.530704140663147, -0.22001463174819946, 0.34264469146728516, 0.20764289796352386, -0.19734930992126465, -0.07991326600313187, -0.06949441134929657, 0.06912289559841156, -0.06899149715900421, -0.17610925436019897, -0.09074999392032623, 0.16332991421222687, 0.15836477279663086, -0.03018748015165329, 0.026196379214525223, -0.0522686243057251, -0.3547738194465637, -0.04908858239650726, -0.38332945108413696, 0.026507394388318062, 0.2685782015323639, 0.2704100012779236, 0.05354872718453407, -0.00011185125913470984, -0.15147680044174194, 0.42804932594299316, -0.08540138602256775, -0.3574960231781006, -0.3493800759315491, -0.30738911032676697, -0.1295085847377777, 0.1739203780889511, -0.3760479986667633, -0.17675045132637024, -0.3267538845539093, 0.20222945511341095, -0.35407164692878723, 0.26440250873565674, -0.061954066157341, 0.17677000164985657, 0.14592130482196808, -0.1946239173412323, -0.009847646579146385, 0.10312367975711823, 0.637222945690155, -0.1374300867319107, 0.07192155718803406, 0.36689743399620056, -0.031522493809461594, 0.05378936976194382, 0.4254774749279022, 0.14570297300815582, -0.09927360713481903, 0.11429308354854584, 0.2550070881843567, 0.05851563811302185, -0.24412375688552856, 0.19676390290260315, 0.30800971388816833, 0.6004464626312256, -0.32627296447753906, -0.5997578501701355, -0.3656819462776184, -0.022137530148029327, 0.02692210115492344, -0.1059643104672432, 0.10072171688079834, 0.00557360053062439, 0.32571941614151, 0.06483708322048187, -0.11782006919384003, -0.32475632429122925, 0.15062850713729858, 0.28713709115982056, 0.6731767654418945, 0.06360971182584763, 0.22268930077552795, -0.22688619792461395, -0.05360720306634903, 0.28417420387268066, -0.23076209425926208, -0.01927204057574272, 0.34665730595588684, 0.0307832770049572, -0.25913509726524353, 0.07648240029811859, -0.06776485592126846, 0.04041752964258194, 0.26866769790649414, 0.02460302785038948, 0.25208723545074463, -0.18396730720996857, 0.057052262127399445, 0.18636909127235413, -0.05834583938121796, 0.36566904187202454, 0.3474366068840027, 0.1395953893661499, -0.2905351519584656, 0.3369947075843811, -0.11281024664640427, -0.40095973014831543, 0.3998139798641205, 0.1455470472574234, 0.23624035716056824, 0.11471721529960632, 0.029319580644369125, 0.1392047256231308, 0.09950414299964905, -0.0031158477067947388, -0.1937737613916397, 0.04378267005085945, 0.2090451717376709, -0.10296580195426941, 0.48383188247680664, -0.057531289756298065, -0.055888257920742035, 0.26197564601898193, -0.28495144844055176, -0.03960535302758217, -0.04287601634860039, -0.15562979876995087, 0.20164284110069275, 0.13356292247772217, 0.4709697365760803, 0.1575273871421814, -0.20210884511470795, 0.021137259900569916, 0.08886566758155823, 0.5216778516769409, -0.1072579026222229, 0.16994008421897888, -0.14296501874923706, -0.15530629456043243, 0.24788396060466766, 0.03408576175570488, -0.3316376209259033, -0.38183462619781494, 0.09097576141357422, -0.1794745922088623, -0.0662015825510025, -0.22352497279644012, 0.20195138454437256, -0.12367748469114304, -0.07438696920871735, -0.3969195783138275, 0.5461203455924988, 0.06218663603067398, -0.033647604286670685, 0.0947900339961052, 0.04390067607164383, -0.08058741688728333, -0.01771126687526703, -0.10085387527942657, 0.4807061553001404, -0.32252317667007446, -0.3198379874229431, 0.14149416983127594, -0.19291183352470398, -0.16377755999565125, -0.16369648277759552, -0.4127160310745239, 0.27816346287727356, 0.0034137722104787827, -0.05159325152635574, 0.44487452507019043, -0.4333391785621643, -0.031821392476558685, 0.1604062169790268, -0.05319473147392273, -0.0830707773566246, 0.2868572175502777, 0.20675493776798248, 0.12311877310276031, 0.0766080841422081, -0.021454595029354095, 0.43166351318359375, -0.14719870686531067, 0.013513477519154549, 0.09248161315917969, -0.5783838033676147, 0.18797001242637634, 0.48532891273498535, 0.15013138949871063, -0.08931184560060501, 0.023871712386608124, 0.23888830840587616, 0.4389699399471283, -0.1998257040977478, 0.033159516751766205, -0.1284463107585907, 0.2546336352825165, -0.07271857559680939, 0.10667228698730469, -0.2864496111869812, -0.4631732702255249, 0.09160809963941574, -0.18453900516033173, 0.32530537247657776, -0.20720352232456207, -0.3501710891723633, 0.18266642093658447, 0.06918538361787796, -0.1576737016439438, 0.24292391538619995, 0.11337240040302277, -0.04185932129621506, -0.11353375017642975, -0.13306060433387756, -0.14948953688144684, 0.06751038879156113, -0.09911605715751648, -0.08898959308862686, -0.5047962665557861, -0.09326773881912231, 0.07359008491039276, 0.13284450769424438, -0.33856892585754395, 0.015720803290605545, -0.12939351797103882, -0.1548285037279129, -0.08186746388673782, 0.0013927780091762543, 0.35185056924819946, 0.11507716029882431, 0.19761517643928528, 0.6180107593536377, 0.2905842661857605, -0.2617432475090027, 0.05044913291931152, 0.3226175010204315, 0.21683363616466522, 0.01217864453792572, -0.3475635051727295, 0.3583140969276428, -0.06800602376461029, 0.2737094759941101, 0.09674221277236938, -0.14907421171665192, 0.4255138039588928, 0.17469723522663116, -0.3774280250072479, -0.30483078956604004, -0.060177791863679886, 0.14652732014656067, 0.14752395451068878, -0.05681362748146057, 0.00016533583402633667, 0.14344510436058044, 0.5072762966156006, -0.08790302276611328, 0.05340156704187393, 0.031084252521395683, -0.08184575289487839, -0.011130552738904953, 0.042272016406059265, 0.21098963916301727, 0.2227068543434143, 0.24076782166957855, -0.2791878581047058, -0.06004266440868378, 0.28378310799598694, -0.04285285621881485, 0.26949217915534973, 0.4083026647567749, 0.04916660115122795, -0.23137909173965454, -0.04854874312877655, 0.135413259267807, 0.09251388162374496, -0.516659677028656, 0.17627301812171936, 0.08565454185009003, -0.10000517964363098, 0.27049341797828674, 0.11030638217926025, -0.3297910690307617, -0.3040929138660431, -0.3567906618118286, -0.1466900259256363, -0.23146331310272217, 0.02768062800168991, -0.4174095690250397, -0.2768648564815521, 0.12855581939220428, -0.10565896332263947, 0.2818361818790436, -0.2166181057691574, -0.280174195766449, -0.08088240027427673, -0.6389323472976685, -0.18287071585655212, 0.028298627585172653, 0.1939234435558319, -0.12331625819206238, 0.4811231195926666, -0.1316092163324356, 0.24420522153377533, 0.09484616667032242, -0.51688551902771, 0.2221328765153885, 0.1477462351322174, 0.150362029671669, 0.0017751678824424744, -0.001078382134437561, 0.32423877716064453, -0.09514003247022629, 0.089657261967659, -0.12819980084896088, 0.24952468276023865, -0.06757891178131104, -0.06333781778812408, -0.2475171983242035, -0.12163606286048889, -0.31748685240745544, -0.6008818745613098, -0.1647491604089737, 0.04975835978984833, -0.05855613201856613, 0.18879932165145874, 0.3861446976661682, -0.1314360648393631, 0.2721606194972992, -0.16658826172351837, -0.044286854565143585, -0.1468525528907776, -0.08805759251117706, 0.13319671154022217, -0.10978394746780396, -0.17247046530246735, -0.196182981133461, -0.29975080490112305, 0.26965999603271484, -0.2651051878929138, 0.09181113541126251, -0.16284409165382385, -0.05972571671009064, 0.06776237487792969, 0.013744551688432693, 0.039194509387016296, 0.3031947612762451, 0.18963150680065155, 0.03165972977876663, 0.13819819688796997, -0.1563604474067688, 0.13737750053405762, 0.0796181932091713, 0.091643787920475, -0.09599222987890244, 0.11443068832159042, -0.2332942932844162, 0.4291263222694397, -0.05796927958726883, -0.2486731857061386, 0.09412986040115356, 0.11766478419303894, -0.03987796977162361, 0.19802170991897583, -0.2120462954044342, -0.1962479054927826, -0.06987646222114563, -0.10648201406002045, 0.34613439440727234, -0.07216894626617432, -0.41989603638648987, -0.2104194611310959, -0.012127302587032318, -0.27098962664604187, -0.2303486317396164, 0.4262930750846863, -0.24710246920585632, 0.02946491539478302, 0.16585229337215424, 0.16178074479103088, -0.39896678924560547, -0.004736193455755711, 0.05862781032919884, 0.01790643483400345, 0.012240462005138397, -0.10635674744844437, -0.4593091309070587, -0.2083377093076706, 0.16585516929626465, 0.2547627091407776, 0.14048251509666443, 0.11631445586681366, -0.1070871353149414, -0.05919385701417923, -0.04270738363265991, 0.048587340861558914, 0.3832085132598877, -0.2628859281539917, -0.2734737992286682, -0.151347815990448, -0.09408962726593018, -0.24438360333442688, -0.00474301353096962, -0.44924113154411316, -0.2510792911052704, 0.06725133210420609, 0.5958278179168701, -0.34254559874534607, -0.1368211954832077, -0.006786264479160309, 0.11040720343589783, -0.32475167512893677, -0.12077785283327103, -0.0612853541970253, 0.0893334224820137, -0.32247716188430786, 0.009052731096744537, 0.028800906613469124, -0.06050097197294235, 0.12050477415323257, 0.018633656203746796, 0.002924727275967598, 0.21229907870292664, 0.28573814034461975, 0.5010874271392822, 0.0051695434376597404, 0.1010543555021286, 0.10192432999610901, 0.14251255989074707, 0.06530486047267914, -0.26375457644462585, 0.2954237461090088, -0.11718611419200897, -0.4510859251022339, 0.15699300169944763, -0.1934812217950821, 0.4109792709350586, 0.24778330326080322, 0.10502634197473526, 0.2390015721321106, 0.32342833280563354, -0.04192003607749939, -0.530734658241272, 0.20668552815914154, -0.15487393736839294, 0.10491230338811874, -0.5274234414100647, -0.9195460081100464, 0.6403459310531616, -0.035996221005916595, -0.2454497367143631, 0.13277655839920044, 0.27893322706222534, -0.3952607810497284, 0.9277617335319519, 0.2805682420730591, 1.183876872062683, -0.11090509593486786, 0.11335732042789459, -0.29158300161361694, -0.2011348307132721, 0.684121310710907, -0.21746988594532013, -0.09817246347665787, -0.35969778895378113, -0.10682841390371323, -0.10669896006584167, -0.020615104585886, 0.17018508911132812, 0.40033984184265137, -0.2707739770412445, 0.0070976680144667625, 0.06798054277896881, 0.27979782223701477, 0.0900006890296936, 0.6961338520050049, -0.1064021959900856, -0.5078455209732056, -0.1485535055398941, 0.10921710729598999, -0.28807246685028076, -0.0006126463413238525, -0.14430955052375793, -0.23251472413539886, -0.22260530292987823, -0.07178938388824463, -0.30356571078300476, 0.1049661710858345, -0.2098398655653, 0.19040033221244812, -0.06778335571289062, 0.02535077929496765, 0.409252405166626, -0.0756428986787796, 0.20828457176685333, 0.30113011598587036, -0.3239884376525879, 0.18336354196071625, -0.20042526721954346, 0.15889734029769897, 0.12420283257961273, -0.09747626632452011, 0.34600889682769775, 0.12205065041780472, -0.31348717212677, 0.3545209765434265, 0.2316942662000656, 0.06503068655729294, -0.5912466049194336, -0.032343052327632904, 0.21094079315662384, -0.11958388984203339, -0.22721746563911438, -0.13361488282680511, -0.17758271098136902, 0.00889740139245987, 0.1382501721382141, 0.2032518982887268, -0.23601965606212616, 0.13286566734313965, 0.2284071445465088, -0.02866630256175995, -0.08317555487155914, -0.043063245713710785, 0.01032448559999466, -0.13838446140289307, 0.22292383015155792, 0.07317186892032623, -0.08809934556484222, -0.2573053240776062, 0.15894079208374023, 0.2945394515991211, -0.5770973563194275, -0.3447636663913727, 0.20882302522659302, -0.3290333151817322, -0.16391621530056, -0.21639713644981384, 0.18215018510818481, -0.008536547422409058, -0.06310737133026123, -0.22034989297389984, -0.3973641097545624, 0.28961318731307983, 0.1392592042684555, 0.24030666053295135, 0.06785056740045547, -0.3488307595252991, -0.2570105493068695, 0.2480115443468094, -0.32640594244003296, -0.3125215768814087, 0.020885968580842018, 0.20377907156944275, 0.12414046376943588, 0.04633456468582153, 0.03686850890517235, -0.2900845408439636, 0.05256094038486481, -0.09615148603916168, 0.03326880931854248, -0.22681698203086853, -0.4099677801132202, 0.14317971467971802, 0.12583579123020172, 0.02873881347477436, -0.1444212794303894, -0.08908681571483612, 0.11207972466945648, -0.3430493474006653, 0.09002216160297394, -0.01470274105668068, 0.12792587280273438, 0.44790002703666687, 0.14007045328617096, 0.0852239578962326, -0.23263560235500336, 0.2551235556602478, 0.08845275640487671, 0.23506860435009003, 0.30741041898727417, 0.21317905187606812, -0.02866464853286743, -0.006874389946460724, -0.09189875423908234, 0.23670434951782227, 0.32323700189590454, 0.25919705629348755, 0.01993725821375847, 0.033157799392938614, 0.3183538317680359, 0.31116411089897156, -0.016222260892391205, 0.1008429080247879, 0.014846017584204674, -0.018662557005882263, 0.18839538097381592, 0.2323777824640274, -0.2617146074771881, 0.0040881033055484295, -0.028803467750549316, -0.10456583648920059, 0.14201368391513824, 0.4495275318622589, -0.026092780753970146, 0.4359012246131897, 0.0027749910950660706, -0.054331742227077484, 0.5126652121543884, 0.05427912622690201, 0.20526841282844543, 0.39019453525543213, 0.010082919150590897, 0.12123976647853851, 0.20003774762153625, 0.18717944622039795, 0.26217442750930786, 0.2354493886232376, -0.15859773755073547, 0.5301887392997742, 0.056832797825336456, 0.1388508677482605, 0.27174094319343567, 0.10856412351131439, -0.09605559706687927, -0.19258955121040344, 0.03696197271347046, 0.4369644820690155, 0.1960626244544983, -0.055625177919864655, 0.047914065420627594, 0.0679950937628746, -0.2876183092594147, -0.15705497562885284, 0.058042123913764954, -0.2667619585990906, 0.03682900220155716, -0.07226016372442245, -0.06056114286184311, -0.17121554911136627, 0.06366901844739914, -0.36445194482803345, 0.02716325968503952, 0.17701855301856995, -0.027799293398857117, 0.06802947074174881, 0.008592305704951286, 0.24448850750923157, 0.15617944300174713, -0.2653377056121826, -0.14342916011810303, 0.09312102198600769, -0.06880626082420349, -0.24152681231498718, 0.1719190627336502, 0.023570451885461807, 0.1138702854514122, -0.13193750381469727, 0.3289742171764374, -0.13611054420471191, -0.10003036260604858, -0.1604035347700119, 0.18976613879203796, 0.19981849193572998, 0.03661658987402916, 0.02143210917711258, 0.1722930669784546, -0.10961165279150009, -0.30688557028770447, 0.19885358214378357, 0.04782199114561081, -0.039237357676029205, 0.6089421510696411, 0.19559751451015472, -0.1415049135684967, -0.1341373324394226, 0.15175625681877136, -0.5333812236785889, 0.20322003960609436, 0.5581696033477783, 0.16502657532691956, 0.03168414160609245, -0.062493205070495605, 0.04369334876537323, -0.011329885572195053, 0.3779030740261078, 0.11152118444442749, 0.27411702275276184, -0.34510496258735657, 0.3276251554489136, -0.4101562201976776, -0.11485148221254349, 0.15458576381206512, 0.18770994246006012, 0.037359192967414856, -0.07405387610197067, 0.36242929100990295, 0.17159149050712585, -0.24548913538455963, 0.1477736234664917, -0.08646988868713379, 0.12682774662971497, -0.27892547845840454, -0.2352338582277298, -0.17527247965335846, 0.23592321574687958, 0.06592387706041336, -0.18393227458000183, -0.05102105811238289, 0.1628493219614029, -0.05996431037783623, -0.6815499663352966, -0.12166419625282288, 0.25569987297058105, -0.07087003439664841, 0.3999887704849243, -0.005488656461238861, 0.36386263370513916, -0.0179953221231699, 0.08983304351568222, -0.19187551736831665, -0.19611799716949463, -0.03331981599330902, 0.4306811988353729, 0.11517797410488129, 0.17242294549942017, -0.014109782874584198, -0.19969616830348969, -0.22733387351036072, -0.3305164873600006, -0.29134413599967957, -0.36926692724227905, -0.4320262670516968, -0.05033048242330551, -0.19145697355270386, 0.015161184594035149, -0.19385011494159698, 0.16404639184474945, 0.06465791910886765, 0.051359109580516815, 0.07392525672912598, 0.03804420679807663, 0.30934011936187744, -0.3006002902984619, -0.3384075164794922, -0.07319729775190353, 0.08807604014873505, -0.3810877799987793, 0.14827947318553925, -0.6339797377586365, 0.1331762969493866, 0.30601730942726135, -0.13052302598953247, -0.0326128825545311, 0.2848797142505646, 0.44097012281417847, 0.19681088626384735, -0.3064328730106354, 0.2921523153781891, -0.07987937331199646, 0.005739057436585426, -0.2772659361362457, -0.18489597737789154 ]
https://github.com/huggingface/datasets/issues/2347
Add an API to access the language and pretty name of a dataset
What dataset_info method are you talking about @julien-c ? In `huggingface_hub` I can only see `model_info`.
It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts.
16
Add an API to access the language and pretty name of a dataset It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts. What dataset_info method are you talking about @julien-c ? In `huggingface_hub` I can only see `model_info`.
[ -0.2759426534175873, -0.1491752415895462, -0.0873623639345169, 0.41507822275161743, 0.3421383500099182, 0.11897195130586624, 0.38973844051361084, 0.37097734212875366, -0.022361306473612785, 0.374637246131897, 0.07790285348892212, 0.5090556144714355, -0.06015201658010483, 0.3841821253299713, 0.346150666475296, -0.20234721899032593, -0.1172478124499321, 0.012967832386493683, -0.08033467829227448, -0.12114809453487396, -0.196213036775589, 0.05210486799478531, 0.11083714663982391, 0.12417082488536835, -0.2669227719306946, 0.04545699805021286, -0.0540003776550293, -0.13884177803993225, -0.07908860594034195, -0.33752501010894775, 0.0865449532866478, 0.2850351929664612, 0.2838595509529114, 0.02946234494447708, -0.00010763965838123113, -0.024507615715265274, 0.4776883125305176, -0.1515955775976181, -0.36187198758125305, -0.22177307307720184, -0.32965683937072754, -0.1733141541481018, 0.24182863533496857, -0.4034041464328766, -0.1884513795375824, -0.21383075416088104, 0.22442153096199036, -0.1580805778503418, 0.34320133924484253, 0.051303375512361526, 0.21729736030101776, 0.3994921147823334, -0.10267509520053864, -0.137363001704216, 0.04761405289173126, 0.6418028473854065, -0.2143191695213318, -0.06894198060035706, 0.264570415019989, 0.13622228801250458, -0.1340617537498474, 0.4863944947719574, 0.2200392782688141, -0.1540040820837021, 0.05014202743768692, 0.19366884231567383, 0.028020784258842468, -0.1995520442724228, 0.1938813328742981, 0.29814285039901733, 0.5250980257987976, -0.28988879919052124, -0.4724090099334717, -0.3455612063407898, -0.07657583057880402, 0.005901971831917763, -0.06327860802412033, 0.10383319109678268, -0.07815690338611603, 0.3310467004776001, -0.001547984080389142, -0.18274131417274475, -0.3698804974555969, -0.08848859369754791, 0.3872876763343811, 0.6222919225692749, -0.06677986681461334, 0.21563899517059326, -0.13518914580345154, -0.06148946285247803, 0.28252506256103516, -0.1690816432237625, -0.12772531807422638, 0.28681960701942444, -0.03932292386889458, -0.3108918070793152, 0.23933401703834534, 0.11929027736186981, 0.06759297102689743, 0.13767728209495544, 0.1428581327199936, 0.3573163151741028, -0.18099366128444672, 0.08885420858860016, 0.13850128650665283, -0.030754227191209793, 0.3093573749065399, 0.22641249001026154, 0.23604314029216766, -0.021528352051973343, 0.33873701095581055, -0.21906229853630066, -0.32927578687667847, 0.45112037658691406, 0.0249062180519104, 0.23040097951889038, 0.10447821021080017, -0.016483109444379807, 0.14434310793876648, -0.03542783483862877, 0.27607840299606323, -0.2522018849849701, 0.1782286912202835, 0.2969039976596832, -0.05139733850955963, 0.3812243938446045, -0.11835160851478577, -0.11536611616611481, 0.09541557729244232, -0.3546547591686249, -0.11898930370807648, -0.038348570466041565, -0.19363637268543243, 0.27524542808532715, 0.07666175067424774, 0.33256322145462036, 0.16663137078285217, -0.15257930755615234, 0.019611027091741562, 0.21200230717658997, 0.3784125745296478, 0.029719874262809753, 0.17519447207450867, 0.014085568487644196, -0.14199934899806976, 0.1474352478981018, 0.05964682251214981, -0.08740418404340744, -0.4299764633178711, -0.013639189302921295, -0.3822399973869324, -0.31695231795310974, -0.2568478286266327, 0.1982743740081787, -0.0872386023402214, 0.05013715475797653, -0.30388304591178894, 0.6148658394813538, -0.07844967395067215, -0.10667729377746582, 0.1258222907781601, 0.11141399294137955, -0.1736580729484558, -0.05882292613387108, -0.06184012442827225, 0.4257535934448242, -0.2679537236690521, -0.3829321265220642, -0.030751727521419525, -0.3184661269187927, -0.04778698831796646, -0.10053788125514984, -0.5002005100250244, 0.21817708015441895, -0.09351431578397751, 0.05183100700378418, 0.49717971682548523, -0.3273157775402069, -0.04258667677640915, 0.16939494013786316, -0.016675934195518494, -0.08044503629207611, 0.26928821206092834, 0.15715990960597992, 0.05338403582572937, 0.03252382203936577, -0.0044341906905174255, 0.2725389003753662, -0.15329281985759735, 0.02940479852259159, 0.06305815279483795, -0.5404407382011414, 0.05461067333817482, 0.39316195249557495, 0.0242336206138134, 0.08292432129383087, 0.11602258682250977, 0.2529332935810089, 0.4412277936935425, -0.19625654816627502, 0.0433010458946228, 0.04857935756444931, 0.24258023500442505, -0.14257214963436127, 0.12004977464675903, -0.2552196681499481, -0.5282453894615173, 0.13423395156860352, -0.29676327109336853, 0.3904131352901459, -0.20908094942569733, -0.3232308030128479, 0.1848081350326538, 0.14155997335910797, -0.11268045008182526, 0.0030876100063323975, 0.15544968843460083, 0.08296516537666321, -0.07351239025592804, -0.2124793976545334, -0.24609683454036713, 0.18519100546836853, -0.07520212978124619, -0.07619397342205048, -0.657002329826355, -0.1036592349410057, 0.032633498311042786, 0.045293573290109634, -0.29220473766326904, -0.006101548671722412, -0.05036287009716034, -0.21643538773059845, -0.12347320467233658, 0.08442369848489761, 0.29596197605133057, 0.1233169436454773, 0.09772832691669464, 0.5998764038085938, 0.2218782752752304, -0.1326139271259308, -0.04507201164960861, 0.04764118045568466, 0.20046593248844147, 0.029669180512428284, -0.32120099663734436, 0.40760666131973267, 0.08485622704029083, 0.19175371527671814, 0.10733138024806976, -0.05580892413854599, 0.33797892928123474, 0.21430855989456177, -0.2994890511035919, -0.3178256154060364, -0.0228860042989254, 0.2004348188638687, 0.20860588550567627, -0.038723550736904144, -0.042947620153427124, 0.12272527813911438, 0.6142541766166687, -0.0771297886967659, -0.03940269351005554, 0.17761367559432983, 0.062075357884168625, -0.05802461504936218, 0.20857511460781097, 0.17282523214817047, 0.27950453758239746, 0.24702948331832886, -0.2898241877555847, 0.017585504800081253, 0.225006103515625, -0.04262389987707138, 0.21762990951538086, 0.2541158199310303, 0.1007629930973053, -0.297542005777359, -0.06936995685100555, 0.09423581510782242, -0.08050775527954102, -0.5052803158760071, 0.14704637229442596, 0.10810781270265579, -0.11461737751960754, 0.2134949117898941, 0.004820400848984718, -0.18654397130012512, -0.22608338296413422, -0.25937026739120483, -0.24238377809524536, -0.23215653002262115, 0.06392502784729004, -0.34439265727996826, -0.2731076776981354, 0.1675041764974594, -0.16855186223983765, 0.4209555387496948, -0.19392549991607666, -0.07944495975971222, -0.327448308467865, -0.49931830167770386, -0.1878136694431305, 0.05640396103262901, 0.1114858016371727, -0.08590563386678696, 0.43335285782814026, -0.17520426213741302, 0.2551006078720093, 0.04516594856977463, -0.47065290808677673, 0.35590049624443054, -0.033787548542022705, 0.10944728553295135, 0.21594130992889404, 0.1232699304819107, 0.31014949083328247, -0.07566870003938675, 0.15845301747322083, -0.20968203246593475, 0.11835271120071411, -0.09827399253845215, -0.09855922311544418, -0.21476933360099792, -0.1783457100391388, -0.22318759560585022, -0.3574560880661011, -0.3391284644603729, 0.1538425236940384, -0.146839439868927, 0.2661878764629364, 0.38401034474372864, -0.18795588612556458, 0.3901931941509247, -0.1318165510892868, 0.0069883763790130615, -0.1764030158519745, -0.2814939022064209, 0.08713343739509583, -0.2605368196964264, -0.22365041077136993, -0.2518213093280792, -0.200170636177063, 0.3316073417663574, -0.19170348346233368, -0.0048788972198963165, -0.14157164096832275, -0.3200163245201111, 0.039623383432626724, 0.048522982746362686, 0.10057340562343597, 0.5203323364257812, 0.17143882811069489, -0.003811012953519821, 0.003642614930868149, -0.348967969417572, 0.128969207406044, 0.18562299013137817, 0.038186609745025635, -0.044859230518341064, 0.12240514904260635, -0.27036893367767334, 0.3509942293167114, -0.1466296762228012, -0.13902659714221954, 0.2506452202796936, -0.022420620545744896, 0.12327220290899277, -0.0202530175447464, -0.17599011957645416, -0.1975337415933609, -0.026125535368919373, -0.12810179591178894, 0.292398601770401, -0.09986251592636108, -0.21148712933063507, -0.28656256198883057, -0.14110341668128967, -0.13243931531906128, -0.2634536921977997, 0.41398364305496216, -0.11963486671447754, 0.0964193046092987, 0.12256790697574615, 0.163596510887146, -0.35753968358039856, 0.09894511103630066, 0.07903975248336792, 0.0718197152018547, 0.05861158296465874, -0.14384031295776367, -0.4632593095302582, -0.20924629271030426, -0.04059673845767975, 0.31203651428222656, 0.07984573394060135, 0.09897341579198837, -0.25522470474243164, -0.19339704513549805, -0.04376479983329773, 0.009986774064600468, 0.38931626081466675, -0.29749244451522827, -0.45504868030548096, -0.18424952030181885, -0.23640596866607666, -0.3232540786266327, 0.02578376606106758, -0.40251073241233826, -0.21866315603256226, -0.03482022508978844, 0.6307072043418884, -0.3656848967075348, -0.330807089805603, 0.06331764161586761, 0.003972361329942942, -0.3565930128097534, -0.1163439154624939, -0.1900073140859604, 0.06245124340057373, -0.3366027772426605, -0.08492708951234818, 0.020080188289284706, -0.02102472074329853, 0.1621304452419281, 0.09799337387084961, 0.1038384735584259, 0.19543296098709106, 0.1701410412788391, 0.5530710816383362, -0.03272436186671257, 0.07671584188938141, 0.008706241846084595, 0.20720209181308746, 0.1496095210313797, -0.1514517217874527, 0.3655204474925995, -0.10820047557353973, -0.3777083456516266, 0.20841646194458008, -0.09886770695447922, 0.40413936972618103, 0.3018050789833069, 0.12141063809394836, 0.306057870388031, 0.31977495551109314, 0.013270974159240723, -0.5712265372276306, 0.2327626347541809, 0.003801584243774414, 0.01524230558425188, -0.5912835001945496, -0.7295426726341248, 0.6037895679473877, -0.18069691956043243, -0.16620436310768127, 0.2758646011352539, 0.4441760182380676, -0.3743603527545929, 0.8279209136962891, 0.23873963952064514, 1.1571502685546875, 0.004930336028337479, 0.10821086913347244, -0.21903428435325623, -0.17637211084365845, 0.6383496522903442, -0.13405099511146545, -0.03543917089700699, -0.31631138920783997, -0.12725041806697845, -0.15563242137432098, 0.04543950781226158, 0.25525933504104614, 0.2740704417228699, -0.2787880301475525, 0.06185568496584892, 0.1432448923587799, 0.20306481420993805, -0.07262086868286133, 0.5821603536605835, -0.22017858922481537, -0.5713000297546387, -0.27412888407707214, 0.13410627841949463, -0.22989808022975922, 0.1336834877729416, -0.1209983378648758, -0.315632700920105, -0.06032112240791321, -0.20102405548095703, -0.3641355633735657, 0.034994568675756454, -0.1870695799589157, 0.07555331289768219, 0.07280223071575165, 0.11585313081741333, 0.34650567173957825, -0.05908021703362465, 0.15764284133911133, 0.26527735590934753, -0.4127747416496277, 0.2081746757030487, -0.33867186307907104, 0.19518987834453583, -0.0009978229645639658, -0.13990485668182373, 0.3260081112384796, 0.026308618485927582, -0.4010038673877716, 0.22740191221237183, 0.15535040199756622, 0.0811634510755539, -0.4271913468837738, -0.05891798436641693, 0.11835163831710815, -0.13510018587112427, -0.19091033935546875, -0.15818437933921814, -0.2536543011665344, -0.11620652675628662, 0.16126058995723724, 0.07363656908273697, -0.2075072079896927, 0.06474313884973526, 0.25582897663116455, -0.024678099900484085, -0.15407423675060272, -0.013058990240097046, -0.16138777136802673, -0.17684346437454224, 0.17807579040527344, 0.055151622742414474, -0.057113830000162125, -0.29742908477783203, 0.10337715595960617, 0.5576286315917969, -0.6720747947692871, -0.21360887587070465, 0.1543552279472351, -0.3262689709663391, -0.17956143617630005, -0.0015343241393566132, 0.14896705746650696, -0.0895676389336586, -0.09930576384067535, -0.13932660222053528, -0.5680286288261414, 0.2761215567588806, 0.022276954725384712, 0.3341540992259979, 0.02257493883371353, -0.2911902964115143, -0.1335543543100357, 0.3174363374710083, -0.36668694019317627, -0.3855098485946655, -0.0382181815803051, 0.118794746696949, 0.2027069330215454, 0.09076163172721863, 0.2256065458059311, -0.15372103452682495, 0.036187879741191864, 0.036679018288850784, -0.06186256557703018, -0.18937715888023376, -0.4390677809715271, 0.12911157310009003, 0.07570451498031616, 0.10535446554422379, -0.10973186790943146, -0.04485056549310684, 0.01114132534712553, -0.3443034291267395, 0.2489372193813324, 0.04684848338365555, 0.12690629065036774, 0.543554425239563, 0.21136939525604248, 0.06834587454795837, -0.2815265357494354, 0.14730393886566162, 0.15190339088439941, 0.3099829852581024, 0.24643312394618988, 0.09006993472576141, -0.23110783100128174, -0.020708419382572174, -0.011920120567083359, 0.39512908458709717, 0.4228619933128357, 0.19546297192573547, -0.05162035673856735, 0.19059626758098602, 0.24332305788993835, 0.15494273602962494, 0.1229504644870758, -0.025110848248004913, 0.002826701384037733, 0.006945250555872917, 0.233028382062912, 0.21948789060115814, -0.17004120349884033, 0.03649052605032921, -0.032467663288116455, -0.17863473296165466, 0.147006556391716, 0.47300371527671814, 0.06293134391307831, 0.43947696685791016, 0.19331206381320953, -0.03913133591413498, 0.3884006142616272, -0.018023882061243057, 0.1633436530828476, 0.4092825949192047, -0.05438676476478577, 0.23352259397506714, 0.4315817654132843, 0.13843736052513123, 0.29059967398643494, 0.31318193674087524, -0.14123639464378357, 0.5300734043121338, 0.01807883381843567, 0.14208734035491943, 0.3447800874710083, -0.06358060240745544, -0.04743315652012825, -0.25583186745643616, 0.02652716636657715, 0.4020940065383911, 0.12371406704187393, 0.035930335521698, 0.06168689206242561, 0.053274717181921005, -0.36573442816734314, -0.08722133934497833, -0.15541508793830872, -0.2191484123468399, 0.08880774676799774, -0.02202790603041649, -0.09626105427742004, -0.12480030953884125, 0.17010554671287537, -0.07338735461235046, 0.047295283526182175, 0.06609800457954407, 0.0869520828127861, 0.10958300530910492, -0.06150210648775101, 0.32587921619415283, 0.1874174326658249, -0.22201484441757202, -0.019037561491131783, 0.18660326302051544, -0.21591773629188538, -0.1455269604921341, 0.2004786729812622, 0.06515532732009888, 0.0697600245475769, 0.05860671401023865, 0.30834832787513733, -0.06430011987686157, -0.09091112017631531, -0.14696268737316132, 0.26063621044158936, 0.19618432223796844, 0.14022040367126465, 0.0009800978004932404, 0.17453835904598236, -0.13177642226219177, -0.24618469178676605, 0.05265667289495468, 0.10503189265727997, -0.05192774161696434, 0.5253123044967651, 0.16507378220558167, -0.20077234506607056, -0.20890794694423676, 0.14330880343914032, -0.43486982583999634, 0.19774286448955536, 0.44843152165412903, 0.028645478188991547, 0.040916647762060165, -0.13600285351276398, 0.07824558019638062, -0.024552732706069946, 0.6048403978347778, 0.13330022990703583, 0.08839638531208038, -0.27851665019989014, 0.10971680283546448, -0.31280601024627686, -0.0625598207116127, 0.17690621316432953, 0.18582779169082642, 0.11769872158765793, -0.14741286635398865, 0.33640843629837036, 0.0009128078818321228, -0.1275825798511505, -0.02595599740743637, -0.04272998496890068, 0.09221763908863068, -0.250952810049057, -0.1546511948108673, -0.20822270214557648, 0.07996786385774612, 0.03806152939796448, -0.16756755113601685, 0.07930324226617813, 0.27856138348579407, -0.0724620595574379, -0.6869028210639954, 0.011971406638622284, 0.1952441781759262, -0.06336590647697449, 0.27830803394317627, 0.1250910460948944, 0.4131278991699219, -0.24563118815422058, 0.11881420761346817, -0.25100040435791016, -0.19415181875228882, -0.030201368033885956, 0.23117944598197937, 0.1099972128868103, 0.08967774361371994, 0.027212275192141533, -0.31310510635375977, -0.4556759297847748, -0.11585910618305206, -0.1330254077911377, -0.1714409738779068, -0.31307801604270935, 0.01913013868033886, -0.24086236953735352, -0.10936837643384933, 0.05005950108170509, 0.16871315240859985, 0.1611701250076294, -0.1018984392285347, 0.04309922456741333, 0.022652311250567436, 0.37170159816741943, -0.1529969722032547, -0.4717788100242615, 0.004760350100696087, 0.08351732045412064, -0.4209599196910858, 0.026865389198064804, -0.7214279174804688, 0.1415538489818573, 0.18854689598083496, -0.11729113012552261, -0.1767594963312149, 0.4244629740715027, 0.34510305523872375, 0.1086069792509079, -0.2637031376361847, 0.43207117915153503, 0.11486551910638809, -0.022783534601330757, -0.22369003295898438, -0.15378883481025696 ]
https://github.com/huggingface/datasets/issues/2345
[Question] How to move and reuse preprocessed dataset?
<s>Hi :) Can you share with us the code you used ?</s> EDIT: from https://github.com/huggingface/transformers/issues/11665#issuecomment-838348291 I understand you're using the run_clm.py script. Can you share your logs ?
Hi, I am training a gpt-2 from scratch using run_clm.py. I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess), I tried to : copy path_to_cache_dir/datasets to new_cache_dir/datasets set export HF_DATASETS_CACHE="new_cache_dir/" but the program still re-preprocess the whole dataset without loading cache. I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M. What is the proper way to do this?
28
[Question] How to move and reuse preprocessed dataset? Hi, I am training a gpt-2 from scratch using run_clm.py. I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess), I tried to : copy path_to_cache_dir/datasets to new_cache_dir/datasets set export HF_DATASETS_CACHE="new_cache_dir/" but the program still re-preprocess the whole dataset without loading cache. I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M. What is the proper way to do this? <s>Hi :) Can you share with us the code you used ?</s> EDIT: from https://github.com/huggingface/transformers/issues/11665#issuecomment-838348291 I understand you're using the run_clm.py script. Can you share your logs ?
[ -0.16012486815452576, -0.3261343836784363, 0.0653829574584961, 0.3396511673927307, 0.28645938634872437, 0.17157313227653503, 0.13545748591423035, 0.18122397363185883, -0.08091132342815399, -0.15583743155002594, -0.13779036700725555, 0.03987704589962959, -0.16895927488803864, 0.058720432221889496, 0.2985677421092987, -0.2673770785331726, 0.15522484481334686, 0.01882246881723404, -0.32016196846961975, 0.0475621297955513, -0.05998066067695618, 0.004169890657067299, -0.059054818004369736, -0.2007908970117569, -0.44161659479141235, -0.03137711435556412, -0.24801507592201233, 0.1666656732559204, 0.18284954130649567, -0.18625761568546295, 0.25329336524009705, 0.2420499473810196, 0.3576464354991913, 0.6828826069831848, -0.00012436335964594036, 0.13355693221092224, -0.27281510829925537, -0.23172710835933685, -0.27668583393096924, 0.0331290066242218, 0.3927202820777893, -0.12148647755384445, -0.1350308060646057, -0.18297092616558075, -0.4399239420890808, -0.31364181637763977, -0.1345018893480301, -0.4278987646102905, 0.7499091029167175, 0.16959483921527863, 0.042768191546201706, -0.21321554481983185, -0.2778225839138031, 0.00850377045571804, 0.027857281267642975, 0.06359890848398209, -0.014203978702425957, 0.13013629615306854, 0.29926830530166626, 0.05612357705831528, 0.27045202255249023, 0.02005206048488617, -0.1339307725429535, 0.14008942246437073, 0.15269285440444946, -0.20024727284908295, -0.2576466500759125, -0.0023743920028209686, 0.20374220609664917, -0.0177665576338768, 0.39463821053504944, -0.5167762041091919, -0.07368169724941254, -0.32284364104270935, 0.0029743462800979614, -0.5202158093452454, -0.2885061502456665, 0.12190312147140503, 0.09309807419776917, 0.4745029807090759, -0.42115554213523865, -0.47928735613822937, -0.1270090937614441, -0.4231948256492615, 0.20904949307441711, 0.17585547268390656, -0.033433422446250916, 0.22109690308570862, -0.00027875974774360657, 0.34287142753601074, 0.24613326787948608, 0.03273337706923485, -0.20686864852905273, 0.23028145730495453, -0.03864412382245064, 0.041680797934532166, -0.1857782006263733, 0.18955081701278687, -0.035490889102220535, 0.34633082151412964, -0.021986477077007294, -0.20441246032714844, 0.3041289150714874, -0.21637308597564697, -0.03109065070748329, 0.3699343800544739, -0.23820433020591736, 0.36910203099250793, 0.06160745397210121, -0.254855751991272, -0.33969569206237793, -0.28200751543045044, -0.3452652096748352, -0.07960737496614456, 0.39174091815948486, 0.34458792209625244, 0.13777101039886475, -0.15793021023273468, 0.09674713760614395, 0.03251851350069046, 0.03050272911787033, -0.3261358439922333, -0.13528567552566528, 0.19699707627296448, 0.015093150548636913, 0.12617261707782745, 0.29385167360305786, 0.08263568580150604, -0.11281194537878036, -0.34164947271347046, -0.18115411698818207, 0.14554253220558167, -0.333100825548172, 0.34820008277893066, 0.0287012942135334, -0.014870665967464447, 0.21177102625370026, 0.015367326326668262, 0.10506781935691833, -0.11697404831647873, 0.47385820746421814, -0.0793648511171341, 0.15131784975528717, 0.2509044110774994, -0.13665485382080078, 0.24948392808437347, 0.2912712097167969, 0.3461933135986328, -0.23795023560523987, 0.5287483930587769, -0.2154998481273651, -0.3498133718967438, 0.4890759587287903, -0.06873713433742523, 0.028009645640850067, 0.17870068550109863, -0.28509992361068726, 0.06609025597572327, 0.4531789720058441, 0.04260718449950218, -0.036398373544216156, -0.2588692903518677, -0.15594428777694702, -0.2766830325126648, 0.22641490399837494, 0.15480823814868927, -0.32930827140808105, -0.15834099054336548, 0.34454700350761414, 0.2285209596157074, 0.3519318103790283, 0.38673460483551025, -0.2995571792125702, 0.4961070418357849, -0.21725033223628998, -0.34107470512390137, 0.4171505272388458, -0.3627423942089081, -0.08318399637937546, 0.061020586639642715, -0.058627188205718994, 0.029593216255307198, 0.03954010829329491, 0.0728786513209343, -0.16417013108730316, -0.32656338810920715, -0.3916643261909485, 0.5252675414085388, 0.06572800129652023, 0.09549304097890854, -0.3008168637752533, -0.28642404079437256, 0.24046535789966583, -0.1850554347038269, 0.07820770144462585, 0.16475138068199158, -0.1351284384727478, 0.06965742260217667, 0.2654249668121338, -0.14665590226650238, 0.1503962278366089, 0.21129363775253296, 0.17970027029514313, 0.10575143247842789, -0.04256795346736908, 0.022896714508533478, -0.40021222829818726, 0.12646526098251343, -0.24175047874450684, -0.284082293510437, 0.3042553663253784, -0.16354063153266907, -0.2996504306793213, -0.18779468536376953, -0.2450939267873764, -0.23756742477416992, -0.08999401330947876, 0.16761115193367004, 0.48520606756210327, -0.2807750403881073, -0.21595069766044617, 0.4022930860519409, -0.024898281320929527, 0.09422580897808075, -0.061466094106435776, 0.27304649353027344, -0.05323832482099533, -0.1499198079109192, -0.1567533165216446, -0.14149075746536255, 0.3739394247531891, -0.33980605006217957, -0.10570764541625977, 0.3445955812931061, 0.031597476452589035, 0.13847580552101135, 0.09726397693157196, 0.3569539189338684, -0.008206039667129517, -0.22922241687774658, 0.27190953493118286, -0.010220173746347427, -0.027483634650707245, -0.09119042754173279, -0.3177950084209442, 0.37257206439971924, 0.026294678449630737, 0.17166967689990997, 0.09857350587844849, -0.2230466604232788, -0.12047812342643738, -0.20005503296852112, 0.13637295365333557, 0.23610898852348328, 0.008320488035678864, 0.16062268614768982, 0.344600647687912, 0.20634585618972778, -0.04032685607671738, 0.24034300446510315, 0.36126115918159485, 0.055327195674180984, -0.06498386710882187, -0.1507968008518219, -0.228864848613739, -0.3063417673110962, 0.06693309545516968, 0.06149991974234581, 0.04326380044221878, 0.06684092432260513, 0.28606322407722473, 0.2623818516731262, 0.05532412603497505, -0.046174488961696625, 0.07678799331188202, -0.26492124795913696, 0.402797669172287, 0.0500800646841526, 0.019139666110277176, 0.06342064589262009, 0.22200679779052734, 0.43084147572517395, 0.227350652217865, 0.41333436965942383, -0.19753532111644745, 0.2897777855396271, -0.22995184361934662, 0.19586136937141418, -0.16458290815353394, 0.125137060880661, 0.023576149716973305, 0.10686997324228287, -0.2166406214237213, 0.36308759450912476, 0.3512013256549835, 0.06731262058019638, -0.0015798639506101608, 0.06939290463924408, -0.06739579141139984, -0.2549564242362976, -0.0874466672539711, -0.2556748688220978, -0.07445862889289856, -0.08613993227481842, 0.2902080714702606, -0.12083718180656433, 0.26387959718704224, 0.11155863851308823, -0.07418408244848251, -0.2830798923969269, 0.2449817657470703, 0.23415416479110718, 0.008221335709095001, 0.1375826746225357, -0.14804935455322266, 0.3238558769226074, 0.14077554643154144, 0.2528506815433502, -0.013952547684311867, -0.14294041693210602, -0.06608131527900696, -0.16445881128311157, -0.1860053390264511, 0.16518206894397736, -0.07939182221889496, -0.26651906967163086, -0.17224077880382538, -0.044010430574417114, 0.16939657926559448, 0.14644944667816162, 0.015791699290275574, -0.03709646686911583, 0.046087928116321564, -0.22819001972675323, 0.3308410346508026, 0.1997733861207962, -0.1972014158964157, -0.70815110206604, 0.18703116476535797, -0.08555907756090164, -0.1360955685377121, 0.018775302916765213, 0.11960914731025696, 0.203018918633461, 0.22348371148109436, -0.3637005686759949, -0.1337096244096756, -0.1479484885931015, 0.07380080223083496, -0.0395292267203331, 0.2716372311115265, 0.48049047589302063, 0.057730142027139664, 0.08347955346107483, 0.021952778100967407, -0.0803534984588623, 0.3806946873664856, 0.13155633211135864, 0.1364145129919052, 0.1978853940963745, 0.23097237944602966, 0.1304399073123932, 0.8657287359237671, 0.1493237018585205, -0.08539268374443054, 0.16922655701637268, 0.05962643027305603, 0.2112220972776413, -0.30189454555511475, -0.052155256271362305, 0.014780384488403797, 0.03335263580083847, -0.34994834661483765, 0.17035916447639465, 0.020553313195705414, -0.13422875106334686, -0.11046113818883896, 0.0983513593673706, -0.013528451323509216, -0.2050619274377823, 0.17405089735984802, 0.05718378350138664, 0.4164009094238281, 0.17006990313529968, -0.0592021718621254, -0.26423972845077515, -0.09062161296606064, 0.08674971759319305, -0.12534311413764954, 0.5051716566085815, 0.3344734013080597, -0.49850526452064514, -0.05937755107879639, -0.4051261246204376, 0.2841690182685852, -0.11728330701589584, 0.005669124890118837, 0.03324427083134651, -0.10580558329820633, 0.20110225677490234, -0.22896647453308105, 0.2697000801563263, -0.1669815331697464, 0.0831257551908493, 0.3571739196777344, -0.13331761956214905, -0.003628671169281006, -0.1654502898454666, 0.0012462623417377472, 0.2042502760887146, 0.25255316495895386, -0.09186451137065887, -0.23783433437347412, -0.33946311473846436, 0.06861871480941772, 0.25824445486068726, -0.5208465456962585, 0.06371702998876572, -0.21251976490020752, -0.4796689748764038, -0.34960317611694336, 0.1302875578403473, 0.3499249517917633, 0.040125321596860886, -0.19079633057117462, 0.3724317252635956, -0.15830396115779877, 0.048916079103946686, 0.32826483249664307, -0.08347232639789581, 0.3856505751609802, 0.1348901093006134, 0.12372826039791107, 0.11123832315206528, 0.18298092484474182, 0.01651068776845932, 0.29146140813827515, -0.2944527268409729, 0.3888121247291565, -0.11822419613599777, 0.03834615275263786, 0.36288467049598694, 0.296047568321228, -0.0848831832408905, 0.10075812041759491, -0.19634269177913666, 0.11075858771800995, -0.5120965242385864, 0.01605963334441185, 0.07578744739294052, -0.061205148696899414, -0.546021580696106, -0.7416171431541443, 0.002743177115917206, 0.3119484782218933, -0.1413746327161789, 0.3256010413169861, -0.17913903295993805, -0.34823527932167053, 0.12492702901363373, 0.13372740149497986, 1.270159125328064, -0.3682629466056824, 0.39322683215141296, 0.04073108732700348, -0.06165309622883797, 0.21483448147773743, -0.3995693325996399, -0.04848141223192215, -0.35408341884613037, -0.19104115664958954, 0.04142146557569504, -0.14020226895809174, 0.27013158798217773, 0.19668641686439514, -0.1686214953660965, 0.4666837453842163, -0.38777416944503784, -0.18282859027385712, -0.08219939470291138, 0.2741085886955261, 0.30675172805786133, 0.006217046640813351, 0.2844866216182709, 0.044111162424087524, -0.2560632824897766, 0.03129950910806656, -0.18875595927238464, 0.17665137350559235, 0.14921267330646515, 0.1573357880115509, -0.3251628875732422, -0.05472519248723984, -0.5776563286781311, 0.10043313354253769, -0.35108092427253723, -0.454257071018219, 0.025711487978696823, 0.04670761898159981, 0.6525632739067078, 0.0427267923951149, -0.04459451138973236, 0.26357999444007874, -0.2201935052871704, 0.020985620096325874, -0.20383204519748688, 0.1770695298910141, 0.3226621150970459, 0.0799306333065033, -0.17618566751480103, 0.23241719603538513, -0.009687327779829502, -0.3173384666442871, -0.15253572165966034, -0.40096598863601685, 0.28169357776641846, -0.2887672185897827, -0.2285510003566742, 0.5524752140045166, -0.014187982305884361, -0.17868861556053162, 0.03777920454740524, 0.32035237550735474, -0.3139818608760834, 0.3353339433670044, -0.2060254067182541, -0.2728104889392853, -0.052052561193704605, 0.12358404695987701, 0.37626129388809204, -0.3565499782562256, 0.40926212072372437, 0.28529834747314453, -0.050352297723293304, -0.07180178165435791, -0.03970486670732498, 0.18626092374324799, -0.4198507070541382, 0.26622098684310913, 0.03121004067361355, 0.05643849074840546, 0.0017471385654062033, 0.011773411184549332, -0.002035420387983322, 0.09725841879844666, -0.11929157376289368, 0.1641537845134735, -0.43604880571365356, -0.19158227741718292, 0.24044954776763916, 0.40879058837890625, 0.2104068100452423, 0.05367777496576309, -0.058893077075481415, 0.3609122037887573, -0.20577716827392578, 0.14556962251663208, 0.054998449981212616, 0.1449218988418579, 0.24170415103435516, -0.21051937341690063, -0.011302205733954906, -0.16702166199684143, -0.05605721473693848, -0.081570103764534, -0.09909074753522873, -0.12872278690338135, -0.37002643942832947, 0.22826331853866577, -0.09820366650819778, -0.06233707815408707, -0.042941849678754807, -0.515285849571228, 0.0373099148273468, -0.355905145406723, 0.13763582706451416, 0.29393020272254944, 0.123700812458992, 0.10710354149341583, 0.37441200017929077, -0.3064482510089874, -0.1304829716682434, -0.0919971764087677, 0.11066801846027374, -0.15355299413204193, 0.14881503582000732, 0.13497120141983032, 0.12690302729606628, -0.11728700995445251, -0.24065527319908142, -0.02450217306613922, 0.5484572649002075, 0.11060487478971481, 0.2084982991218567, -0.1628061830997467, -0.043651096522808075, -0.1176140159368515, 0.19291582703590393, 0.03889894485473633, -0.10154348611831665, 0.23501919209957123, 0.3835318982601166, -0.043762750923633575, -0.3034854829311371, 0.22427614033222198, 0.28383681178092957, -0.15231524407863617, -0.18746232986450195, 0.4942162036895752, 0.3747982382774353, 0.4605588912963867, -0.1184181272983551, 0.026678267866373062, 0.5552835464477539, -0.21292249858379364, 0.01997375674545765, 0.010002128779888153, 0.2258823961019516, 0.018315207213163376, 0.32310980558395386, 0.36412882804870605, 0.09607388824224472, -0.0058242641389369965, -0.02623584121465683, 0.24257022142410278, 0.21656417846679688, -0.026168424636125565, -0.16564074158668518, -0.3985559344291687, -0.10743047297000885, 0.1001921072602272, 0.05028064176440239, 0.24423104524612427, -0.26186344027519226, 0.23483240604400635, 0.2859804034233093, -0.5793053507804871, 0.04399307072162628, 0.6533371210098267, -0.08780165016651154, -0.2688233256340027, -0.14391633868217468, -0.023238204419612885, -0.174187570810318, 0.1452491730451584, -0.0670848935842514, -0.2645210027694702, 0.14413495361804962, 0.009661003947257996, 0.1244766041636467, -0.003913436084985733, 0.12865334749221802, 0.0638977512717247, 0.07358166575431824, 0.024455655366182327, 0.37576228380203247, 0.13579203188419342, -0.18399757146835327, -0.05588523671030998, 0.012155106291174889, 0.1858714520931244, -0.08887890726327896, -0.22008644044399261, 0.3250598907470703, 0.056581076234579086, 0.17787542939186096, -0.10810580104589462, 0.046183936297893524, -0.2707104980945587, -0.07793878018856049, -0.1502169966697693, -0.05633677542209625, 0.0050877658650279045, -0.09750552475452423, -0.27033811807632446, -0.0184381902217865, -0.08285820484161377, 0.5797557830810547, 0.29447969794273376, -0.36804133653640747, -0.08141624927520752, 0.39543500542640686, -0.3513239622116089, 0.17194274067878723, 0.7235894203186035, -0.04041624814271927, 0.11659660190343857, -0.10811670869588852, -0.0002357233315706253, 0.3333333432674408, 0.2498609721660614, 0.21393710374832153, 0.0659509226679802, -0.28394651412963867, -0.2710179090499878, -0.5490258932113647, -0.07664629071950912, -0.11911876499652863, 0.15204764902591705, -0.07258825749158859, 0.04088025540113449, 0.28855830430984497, -0.14871688187122345, 0.2767311930656433, -0.018229760229587555, 0.29158976674079895, 0.18259432911872864, -0.2095012068748474, -0.19717217981815338, -0.10702906548976898, 0.42693784832954407, 0.025856826454401016, -0.29443618655204773, -0.008118677884340286, 0.49323102831840515, -0.11124056577682495, -0.33964210748672485, 0.06012668460607529, 0.01224936917424202, 0.10717426240444183, 0.29795917868614197, -0.033613599836826324, 0.010399974882602692, 0.17519506812095642, 0.09916442632675171, -0.10639442503452301, 0.18401437997817993, -0.03183768689632416, -0.2652289867401123, -0.2596701681613922, 0.12237092852592468, -0.6407399773597717, -0.3083278238773346, -0.4538686275482178, -0.3385768532752991, 0.14369961619377136, -0.04207824170589447, -0.44108298420906067, -0.24718675017356873, -0.25588199496269226, 0.37395381927490234, 0.3258473873138428, 0.39890167117118835, -0.16534310579299927, 0.009337279945611954, -0.5237100720405579, 0.11571283638477325, 0.7863520979881287, -0.02775092050433159, -0.45559290051460266, 0.00949818640947342, 0.035279326140880585, 0.09275513887405396, 0.014647673815488815, -0.29819685220718384, 0.12914368510246277, 0.23761264979839325, -0.04241073131561279, -0.22377176582813263, 0.4407905638217926, -0.32159239053726196, 0.0996616780757904, 0.045173805207014084, 0.35378003120422363, 0.005990440025925636, -0.24018731713294983, -0.43620339035987854, -0.06648844480514526 ]
https://github.com/huggingface/datasets/issues/2345
[Question] How to move and reuse preprocessed dataset?
Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same
Hi, I am training a gpt-2 from scratch using run_clm.py. I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess), I tried to : copy path_to_cache_dir/datasets to new_cache_dir/datasets set export HF_DATASETS_CACHE="new_cache_dir/" but the program still re-preprocess the whole dataset without loading cache. I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M. What is the proper way to do this?
33
[Question] How to move and reuse preprocessed dataset? Hi, I am training a gpt-2 from scratch using run_clm.py. I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess), I tried to : copy path_to_cache_dir/datasets to new_cache_dir/datasets set export HF_DATASETS_CACHE="new_cache_dir/" but the program still re-preprocess the whole dataset without loading cache. I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M. What is the proper way to do this? Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same
[ -0.23785990476608276, -0.15300814807415009, 0.04165593162178993, 0.3084847927093506, 0.18331629037857056, 0.21348857879638672, -0.05760835483670235, 0.2500770688056946, -0.10958094894886017, -0.22529231011867523, -0.04646439850330353, 0.15800434350967407, -0.12602242827415466, -0.035717159509658813, 0.27025407552719116, -0.1903042197227478, 0.19263982772827148, -0.05153040587902069, -0.20874708890914917, -0.005714017897844315, -0.05119849741458893, -0.03502022475004196, -0.022217590361833572, -0.2187878042459488, -0.3487529754638672, -0.1432221531867981, -0.28693386912345886, 0.15774890780448914, 0.14091277122497559, -0.21852853894233704, 0.14966674149036407, 0.19886530935764313, 0.39165589213371277, 0.5650050640106201, -0.0001259738055523485, 0.08032065629959106, -0.26052767038345337, -0.1995311826467514, -0.2637186646461487, 0.000429689884185791, 0.4051918387413025, -0.1469469517469406, -0.14890500903129578, -0.11501993238925934, -0.42028307914733887, -0.38495826721191406, -0.12875644862651825, -0.5107622146606445, 0.5873052477836609, 0.20248429477214813, 0.025847455486655235, -0.41926512122154236, -0.30315905809402466, -0.0005871461471542716, 0.07715577632188797, -0.10913240909576416, 0.028140751644968987, 0.1772213876247406, 0.29827484488487244, 0.0634804517030716, 0.23172089457511902, -0.005960442125797272, -0.16951462626457214, 0.22839471697807312, 0.08964084833860397, -0.24638350307941437, -0.2650197446346283, 0.010324377566576004, 0.21332967281341553, -0.07821150869131088, 0.37871596217155457, -0.5245107412338257, -0.040891773998737335, -0.30216166377067566, 0.044078778475522995, -0.6296892166137695, -0.29018139839172363, 0.14053946733474731, 0.08987410366535187, 0.33295169472694397, -0.3665981590747833, -0.5225884318351746, -0.027164757251739502, -0.35222548246383667, 0.23708102107048035, 0.17141497135162354, -0.016061268746852875, 0.2046981155872345, 0.017326779663562775, 0.3591579794883728, 0.30001261830329895, 0.06836774945259094, -0.26267749071121216, 0.17619065940380096, 0.009651437401771545, 0.13861273229122162, -0.1080910935997963, 0.3031715750694275, -0.057535041123628616, 0.3915189504623413, 0.023514626547694206, -0.2391519844532013, 0.3578473925590515, -0.19922390580177307, -0.0719352513551712, 0.2576841115951538, -0.16834589838981628, 0.2766536772251129, 0.01022149994969368, -0.3261597454547882, -0.42546242475509644, -0.3058951795101166, -0.34179139137268066, -0.15319736301898956, 0.3950914740562439, 0.3623051345348358, 0.04954370856285095, -0.19941620528697968, 0.07791610062122345, 0.12613123655319214, -0.0675555020570755, -0.3604215979576111, -0.19750910997390747, 0.11432059109210968, -0.03640695661306381, 0.06734557449817657, 0.21854178607463837, 0.10093022137880325, -0.1091732457280159, -0.43409842252731323, -0.17629335820674896, 0.140309140086174, -0.3342282176017761, 0.40149858593940735, 0.01006338745355606, -0.1399189680814743, 0.3073943853378296, 0.10289674252271652, 0.045237354934215546, -0.14457416534423828, 0.48537737131118774, -0.14543427526950836, 0.22677722573280334, 0.16876135766506195, -0.09333443641662598, 0.1907976120710373, 0.3086637854576111, 0.4347536563873291, -0.21615076065063477, 0.5089268088340759, -0.2469210922718048, -0.30783894658088684, 0.528089702129364, -0.0791083350777626, 0.05584742873907089, 0.17708250880241394, -0.14431098103523254, 0.10374326258897781, 0.4253029525279999, 0.05282718315720558, -0.03524111956357956, -0.2709798216819763, -0.19385041296482086, -0.2852814495563507, 0.23838397860527039, 0.0972616970539093, -0.3305187225341797, -0.0629708468914032, 0.3851662278175354, 0.3416411578655243, 0.36172834038734436, 0.20831507444381714, -0.24224528670310974, 0.48055383563041687, -0.2082837074995041, -0.3495694398880005, 0.4447631239891052, -0.2732561230659485, -0.012618830427527428, 0.05920364707708359, 0.00023092329502105713, -0.009672628715634346, 0.02836943417787552, 0.05421426147222519, -0.15922865271568298, -0.2620944678783417, -0.3656531870365143, 0.42156708240509033, 0.006927136331796646, 0.0015505347400903702, -0.3235529065132141, -0.18500420451164246, 0.20350082218647003, -0.29051464796066284, 0.06564120203256607, 0.13886305689811707, -0.03448530286550522, -0.030191149562597275, 0.20496982336044312, -0.08198778331279755, 0.08434902876615524, 0.19556251168251038, 0.15728989243507385, 0.1549062579870224, -0.10082095116376877, 0.07081335037946701, -0.23960036039352417, 0.08753933757543564, -0.16136805713176727, -0.39618149399757385, 0.44017571210861206, -0.09771931171417236, -0.23224389553070068, -0.24173390865325928, -0.19620971381664276, -0.19001410901546478, -0.07407638430595398, 0.2564923167228699, 0.48034238815307617, -0.24775518476963043, -0.13381661474704742, 0.4130372107028961, -0.11295506358146667, 0.008651288226246834, 0.003567451611161232, 0.16173982620239258, -0.0026040691882371902, -0.18925194442272186, -0.053904030472040176, -0.12406941503286362, 0.41594719886779785, -0.24611088633537292, -0.05099457874894142, 0.3192647397518158, 0.09499025344848633, 0.0605703741312027, 0.07526909559965134, 0.2710303068161011, -0.12370435148477554, -0.1199658215045929, 0.30891504883766174, -0.12303426861763, -0.08587957173585892, -0.13370868563652039, -0.2027672827243805, 0.35106152296066284, 0.12170961499214172, 0.15867562592029572, 0.11185577511787415, -0.2967468500137329, -0.13903307914733887, -0.12289045751094818, 0.2126416265964508, 0.22220531105995178, 0.08911985903978348, 0.14002008736133575, 0.372726708650589, 0.13292156159877777, -0.14425264298915863, 0.30771198868751526, 0.2793329060077667, 0.13693122565746307, -0.06440731137990952, -0.16296762228012085, -0.17813175916671753, -0.34204262495040894, 0.10873585194349289, 0.016905393451452255, 0.032184384763240814, 0.0411657840013504, 0.3943570554256439, 0.30039119720458984, -0.009593556635081768, -0.07227049767971039, 0.012082479894161224, -0.362324595451355, 0.41061773896217346, 0.06696616113185883, -0.02873932011425495, 0.05990218371152878, 0.26836955547332764, 0.49519452452659607, 0.2788166105747223, 0.4521007835865021, -0.1961212158203125, 0.21681533753871918, -0.3017239272594452, 0.12974369525909424, -0.12247981131076813, 0.16066721081733704, 0.0639338344335556, 0.07586488127708435, -0.21716195344924927, 0.39820095896720886, 0.3844768702983856, 0.05360465496778488, -0.13656030595302582, 0.07622751593589783, -0.14812321960926056, -0.20675627887248993, 0.005270212888717651, -0.3171881437301636, -0.14346447587013245, -0.0825677216053009, 0.2953959107398987, -0.12938494980335236, 0.35841548442840576, 0.09575742483139038, -0.07636898010969162, -0.29985013604164124, 0.31415846943855286, 0.15875983238220215, 0.0824844092130661, 0.13225433230400085, -0.19299867749214172, 0.26592475175857544, 0.10275620222091675, 0.26072046160697937, -0.03648175671696663, -0.11003342270851135, -0.06440381705760956, -0.1994868814945221, -0.24382559955120087, 0.1560235172510147, -0.01772344298660755, -0.28507477045059204, -0.09290698170661926, 0.01741597056388855, 0.04261917620897293, 0.2385847121477127, 0.022847909480333328, -0.18192742764949799, 0.055590514093637466, -0.26184481382369995, 0.30498242378234863, 0.25636863708496094, -0.23940126597881317, -0.7709594368934631, 0.14796626567840576, -0.1281968057155609, -0.033267464488744736, 0.08229885995388031, 0.1963886022567749, 0.29008182883262634, 0.2994518280029297, -0.4189984202384949, -0.11117435246706009, -0.03211045265197754, 0.14026854932308197, -0.07524596154689789, 0.21256276965141296, 0.36017218232154846, 0.04972413554787636, 0.05643216520547867, 0.007620014250278473, -0.08855797350406647, 0.37899017333984375, 0.06662888824939728, 0.1641145795583725, 0.20583856105804443, 0.30592435598373413, 0.17005831003189087, 0.7813286185264587, 0.20206178724765778, -0.1195315569639206, 0.22478678822517395, 0.07024766504764557, 0.2524738013744354, -0.32474642992019653, 0.05427660793066025, 0.16149082779884338, 0.035138458013534546, -0.30579715967178345, 0.08492528647184372, -0.019172009080648422, -0.11129084974527359, -0.12504395842552185, 0.10553592443466187, -0.03070589154958725, -0.12236714363098145, 0.16007833182811737, -0.13687552511692047, 0.44176092743873596, 0.11526946723461151, -0.05971498414874077, -0.3022226393222809, -0.11328858137130737, 0.045308683067560196, -0.21385954320430756, 0.5286315679550171, 0.4135555028915405, -0.46549129486083984, -0.05172020196914673, -0.3803648352622986, 0.3111921548843384, -0.11609356105327606, 0.06818745285272598, 0.034391190856695175, -0.11867660284042358, 0.1350328028202057, -0.20683524012565613, 0.09614960104227066, -0.22193296253681183, 0.08728605508804321, 0.36394163966178894, -0.006168495863676071, 0.10040775686502457, -0.2459687441587448, 0.03812539204955101, 0.3307681083679199, 0.20198805630207062, -0.1875588297843933, -0.16587945818901062, -0.30085715651512146, 0.04667142033576965, 0.2752131521701813, -0.4799242615699768, 0.11151313036680222, -0.20506735146045685, -0.48215606808662415, -0.21873465180397034, 0.21057114005088806, 0.256754070520401, 0.06959334760904312, -0.17358356714248657, 0.38100680708885193, -0.17154455184936523, 0.01671118661761284, 0.354327917098999, -0.08668124675750732, 0.39934268593788147, 0.1708686798810959, 0.14616963267326355, 0.06032563000917435, 0.2983468174934387, 0.13288874924182892, 0.27681344747543335, -0.41915592551231384, 0.49385976791381836, -0.12471858412027359, 0.002068684436380863, 0.37094977498054504, 0.1941181868314743, -0.13251754641532898, 0.10681213438510895, -0.3122168481349945, 0.04768548905849457, -0.4304373562335968, 0.020357508212327957, 0.0458393320441246, -0.10626128315925598, -0.5128143429756165, -0.8027748465538025, -0.0159524604678154, 0.3981412351131439, -0.130441814661026, 0.4157746434211731, -0.3875638246536255, -0.2967142164707184, -0.032983843237161636, 0.2522018551826477, 1.105542778968811, -0.27897632122039795, 0.30330026149749756, -0.012561529874801636, -0.10850803554058075, 0.18009743094444275, -0.34059977531433105, -0.037591949105262756, -0.2607923746109009, -0.15693140029907227, 0.02349834330379963, -0.11653539538383484, 0.26800936460494995, 0.22125627100467682, -0.09872531145811081, 0.4781961739063263, -0.3981008529663086, -0.25514307618141174, -0.0945037305355072, 0.20805451273918152, 0.2884458005428314, 0.16945451498031616, 0.4030934274196625, 0.048677802085876465, -0.2707052230834961, -0.07892054319381714, -0.14536207914352417, 0.24967651069164276, 0.18755118548870087, 0.2118334025144577, -0.3258020877838135, -0.09706088900566101, -0.6363193392753601, -0.022820860147476196, -0.4688449800014496, -0.5695707201957703, -0.06409658491611481, 0.027000412344932556, 0.6920264959335327, -0.07837367057800293, 0.05217907205224037, 0.19227485358715057, -0.10541871935129166, -0.00012522537144832313, -0.13126662373542786, 0.10473024845123291, 0.3144964873790741, 0.0321059376001358, -0.0976969301700592, 0.2907629609107971, 0.0027098320424556732, -0.31395745277404785, -0.23783083260059357, -0.3568236231803894, 0.2640898823738098, -0.21408629417419434, -0.2281089872121811, 0.587404727935791, 0.097505122423172, -0.14917795360088348, 0.026064548641443253, 0.29767847061157227, -0.23884007334709167, 0.35823553800582886, -0.3314954340457916, -0.23712682723999023, -0.05527901276946068, 0.0935942605137825, 0.3266555964946747, -0.32534313201904297, 0.3527354300022125, 0.2297743409872055, -0.06812512874603271, -0.049240127205848694, -0.07661572843790054, 0.19661955535411835, -0.19451463222503662, 0.2431262731552124, 0.028232291340827942, 0.14771313965320587, 0.0749347135424614, -0.12441033124923706, -0.020303890109062195, 0.16624461114406586, -0.002920035272836685, 0.17606015503406525, -0.2919260561466217, -0.22856704890727997, 0.23357875645160675, 0.32546141743659973, 0.14555829763412476, 0.03578999638557434, -0.03620404005050659, 0.38472381234169006, -0.16433018445968628, 0.1703977882862091, 0.14720940589904785, 0.19582848250865936, 0.09670991450548172, -0.02783951163291931, -0.15058806538581848, -0.07951456308364868, -0.061350367963314056, -0.07198841124773026, -0.042462825775146484, -0.10175503045320511, -0.30528149008750916, 0.22707980871200562, -0.1314205825328827, 0.01051262766122818, 0.025407984852790833, -0.5276871919631958, 0.060091257095336914, -0.2723104953765869, 0.04100381210446358, 0.2522374093532562, 0.07614456862211227, 0.10772610455751419, 0.3695375919342041, -0.2398175597190857, -0.017399335280060768, -0.11289770901203156, 0.09502388536930084, -0.07661564648151398, 0.1053001806139946, 0.20430055260658264, 0.21238186955451965, -0.10243105888366699, -0.14055219292640686, -0.09461819380521774, 0.38503384590148926, 0.09947711229324341, 0.060764919966459274, -0.1666932851076126, -0.0035706721246242523, -0.07910875231027603, 0.15110008418560028, 0.12830880284309387, -0.021394478157162666, 0.18411140143871307, 0.47078725695610046, -0.05095222592353821, -0.3081832230091095, 0.18968860805034637, 0.27169302105903625, -0.11237896978855133, -0.19972562789916992, 0.4546191096305847, 0.39582058787345886, 0.383706659078598, -0.19811420142650604, -0.050229333341121674, 0.4299532175064087, -0.25973594188690186, 0.01398597564548254, 0.0014537274837493896, 0.31359386444091797, 0.005233839154243469, 0.2828735411167145, 0.39442458748817444, -0.010802015662193298, -0.003789883106946945, -0.009748145937919617, 0.35083821415901184, 0.38818439841270447, -0.09304755926132202, -0.21046608686447144, -0.4430539608001709, -0.09842821955680847, 0.1430864930152893, 0.10505814850330353, 0.2753292918205261, -0.3274122476577759, 0.21625584363937378, 0.34005090594291687, -0.6805124878883362, 0.10706879943609238, 0.5620396733283997, -0.10465133935213089, -0.26444536447525024, -0.30835944414138794, -0.07166020572185516, -0.11368581652641296, 0.21155431866645813, -0.06496253609657288, -0.26482152938842773, 0.09528017789125443, 0.0017645731568336487, 0.07347330451011658, -0.05376584082841873, 0.06909927725791931, -0.02160527929663658, 0.039568327367305756, 0.06848931312561035, 0.45424848794937134, 0.0731869786977768, -0.26539352536201477, 0.0276845321059227, -0.032373592257499695, 0.1969398409128189, -0.013179745525121689, -0.1961667835712433, 0.2902057468891144, 0.10383334755897522, 0.17310458421707153, -0.16795557737350464, 0.045080386102199554, -0.20117011666297913, -0.19191469252109528, -0.13372473418712616, -0.07895070314407349, 0.06492716819047928, 0.0693722665309906, -0.27457931637763977, -0.036362163722515106, -0.046329330652952194, 0.4864158034324646, 0.34175294637680054, -0.3559120297431946, -0.01751474291086197, 0.4189004898071289, -0.28054720163345337, 0.15136724710464478, 0.7690725922584534, -0.03261936455965042, 0.04578425735235214, -0.11324065923690796, -0.005276980809867382, 0.29715967178344727, 0.23742574453353882, 0.19259881973266602, 0.0036205463111400604, -0.2640180289745331, -0.3714715242385864, -0.4844544529914856, -0.042769454419612885, -0.27414366602897644, 0.1524686962366104, -0.13314053416252136, 0.07441746443510056, 0.2540321946144104, -0.16761629283428192, 0.2727183699607849, 0.033594660460948944, 0.2813009023666382, 0.2858585715293884, -0.2592862844467163, -0.2775995135307312, -0.13739970326423645, 0.46016913652420044, 0.055729225277900696, -0.1455211490392685, -0.060298193246126175, 0.3954569101333618, -0.10138598084449768, -0.30697572231292725, -0.02616875246167183, 0.09529875218868256, 0.21491743624210358, 0.351346492767334, -0.05765426903963089, -0.023830696940422058, 0.14551085233688354, 0.13768811523914337, -0.14066174626350403, 0.2595165967941284, -0.04162345454096794, -0.17880463600158691, -0.29747599363327026, -0.015736810863018036, -0.6356415152549744, -0.2866189181804657, -0.411428302526474, -0.2497587949037552, 0.1543261557817459, 0.020093487575650215, -0.2996416389942169, -0.2943607270717621, -0.1123158261179924, 0.3462572395801544, 0.3360643982887268, 0.4151573181152344, -0.19476839900016785, 0.0636695995926857, -0.5413559675216675, 0.14313513040542603, 0.6640559434890747, -0.02830716222524643, -0.3156382143497467, -0.06690577417612076, 0.06137176975607872, 0.11238269507884979, 0.08195259422063828, -0.23636022210121155, 0.1080254539847374, 0.29146528244018555, -0.07504817843437195, -0.18936528265476227, 0.41506052017211914, -0.3093845546245575, 0.12590904533863068, 0.046756427735090256, 0.2780735492706299, 0.021297434344887733, -0.24348324537277222, -0.40023133158683777, -0.061164066195487976 ]
https://github.com/huggingface/datasets/issues/2345
[Question] How to move and reuse preprocessed dataset?
> Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same I only changed the `preprocessing_num_workers` maybe it is the problem~ I will try again~
Hi, I am training a gpt-2 from scratch using run_clm.py. I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess), I tried to : copy path_to_cache_dir/datasets to new_cache_dir/datasets set export HF_DATASETS_CACHE="new_cache_dir/" but the program still re-preprocess the whole dataset without loading cache. I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M. What is the proper way to do this?
48
[Question] How to move and reuse preprocessed dataset? Hi, I am training a gpt-2 from scratch using run_clm.py. I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess), I tried to : copy path_to_cache_dir/datasets to new_cache_dir/datasets set export HF_DATASETS_CACHE="new_cache_dir/" but the program still re-preprocess the whole dataset without loading cache. I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M. What is the proper way to do this? > Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same I only changed the `preprocessing_num_workers` maybe it is the problem~ I will try again~
[ -0.230279803276062, -0.18237121403217316, 0.04121697321534157, 0.3404655456542969, 0.1980704963207245, 0.2086261808872223, -0.037507157772779465, 0.2514607608318329, -0.10370323061943054, -0.20876769721508026, -0.03143658488988876, 0.1630256325006485, -0.1305733621120453, -0.04403042793273926, 0.258270263671875, -0.19118379056453705, 0.17555490136146545, -0.045262113213539124, -0.19152766466140747, -0.016569897532463074, -0.053558021783828735, -0.02511046640574932, -0.03213638439774513, -0.21022175252437592, -0.3548285663127899, -0.12174581736326218, -0.2918241620063782, 0.16535793244838715, 0.14795134961605072, -0.2046291083097458, 0.1572982668876648, 0.17879320681095123, 0.4092198610305786, 0.5932109355926514, -0.00012621939822565764, 0.060590311884880066, -0.25137627124786377, -0.19234104454517365, -0.27296873927116394, -0.01861223578453064, 0.39155951142311096, -0.13809210062026978, -0.14161863923072815, -0.12926509976387024, -0.4168546199798584, -0.35400545597076416, -0.1318831592798233, -0.5027416348457336, 0.6082746982574463, 0.2023896425962448, 0.03399369865655899, -0.41830646991729736, -0.3058910369873047, -0.0001166400033980608, 0.0776553750038147, -0.10234957933425903, 0.0107619259506464, 0.19950801134109497, 0.30098479986190796, 0.06558121740818024, 0.2533356845378876, -0.00545235862955451, -0.19132506847381592, 0.21612979471683502, 0.07716779410839081, -0.24895815551280975, -0.24196705222129822, -0.0063001848757267, 0.21722695231437683, -0.06449747830629349, 0.38540077209472656, -0.49558648467063904, -0.021413734182715416, -0.28367969393730164, 0.05257140100002289, -0.6237032413482666, -0.2847483456134796, 0.15358543395996094, 0.07427920401096344, 0.33919796347618103, -0.36947375535964966, -0.5197533965110779, -0.02864188700914383, -0.34357595443725586, 0.24527525901794434, 0.15273256599903107, -0.0363955944776535, 0.21966323256492615, -0.00644480437040329, 0.37117254734039307, 0.3126404881477356, 0.06752870976924896, -0.26235824823379517, 0.1733519434928894, -0.018105942755937576, 0.13033799827098846, -0.11845561116933823, 0.3414279818534851, -0.059679217636585236, 0.3688018321990967, 0.01898767612874508, -0.21778571605682373, 0.3481895327568054, -0.19313687086105347, -0.06107116863131523, 0.2535794973373413, -0.15754389762878418, 0.2674422860145569, 0.015301987528800964, -0.3059372901916504, -0.44100192189216614, -0.3064711093902588, -0.3355247974395752, -0.17662303149700165, 0.4219079613685608, 0.37313413619995117, 0.0536552369594574, -0.226764976978302, 0.06512284278869629, 0.11510265618562698, -0.09631091356277466, -0.36283156275749207, -0.18811631202697754, 0.11919095367193222, -0.026797562837600708, 0.06199372559785843, 0.22984172403812408, 0.1135949119925499, -0.13001056015491486, -0.42592984437942505, -0.17846420407295227, 0.12098206579685211, -0.36206352710723877, 0.4047141671180725, 0.017048828303813934, -0.1473720669746399, 0.2812192738056183, 0.13470104336738586, 0.057677704840898514, -0.15785691142082214, 0.46185898780822754, -0.16006354987621307, 0.22256869077682495, 0.15691964328289032, -0.08888083696365356, 0.21682462096214294, 0.3071725368499756, 0.4267372488975525, -0.20223185420036316, 0.5157366991043091, -0.2954549789428711, -0.2999770939350128, 0.5050633549690247, -0.08357889950275421, 0.07639413326978683, 0.2000044733285904, -0.1416003704071045, 0.07938076555728912, 0.42808797955513, 0.05876319482922554, -0.03154211491346359, -0.2942139506340027, -0.19643785059452057, -0.29261863231658936, 0.2295440137386322, 0.09536589682102203, -0.3276755213737488, -0.05931251496076584, 0.37420669198036194, 0.33528536558151245, 0.37598684430122375, 0.22208674252033234, -0.24647608399391174, 0.46642014384269714, -0.23966307938098907, -0.346623957157135, 0.4473836123943329, -0.2679064869880676, -0.01572723686695099, 0.0745583176612854, -0.0023962780833244324, -0.004546932876110077, 0.017857126891613007, 0.03990565985441208, -0.17056192457675934, -0.2612139582633972, -0.37346217036247253, 0.402881383895874, 0.01826825551688671, -0.018143579363822937, -0.3461931049823761, -0.1834283173084259, 0.2144177109003067, -0.28156575560569763, 0.0643005445599556, 0.1546645164489746, -0.02365995943546295, -0.03973464295268059, 0.21385705471038818, -0.07063399255275726, 0.08128774911165237, 0.21073885262012482, 0.15814952552318573, 0.16102510690689087, -0.08663509786128998, 0.06362241506576538, -0.2418336570262909, 0.09508369117975235, -0.1858508437871933, -0.3736921548843384, 0.4266282916069031, -0.07928566634654999, -0.23098087310791016, -0.257977694272995, -0.20687086880207062, -0.19034820795059204, -0.07725561410188675, 0.25294023752212524, 0.4489647150039673, -0.25135600566864014, -0.10351663827896118, 0.4262000620365143, -0.10116280615329742, -0.0061497814022004604, 0.012942018918693066, 0.18107332289218903, -0.019684815779328346, -0.19416692852973938, -0.06441057473421097, -0.11356326192617416, 0.4528130888938904, -0.25041380524635315, -0.07202497869729996, 0.30931445956230164, 0.08099520951509476, 0.0377839058637619, 0.061208441853523254, 0.2628927230834961, -0.12486978620290756, -0.1418721079826355, 0.29705512523651123, -0.1096222996711731, -0.08127741515636444, -0.14037252962589264, -0.18648958206176758, 0.3085309863090515, 0.12512221932411194, 0.16711869835853577, 0.09392265975475311, -0.27577194571495056, -0.1386350691318512, -0.16137544810771942, 0.2355557680130005, 0.20983168482780457, 0.09031689167022705, 0.14273236691951752, 0.3833734095096588, 0.12530073523521423, -0.1511945128440857, 0.30497246980667114, 0.29185613989830017, 0.15685634315013885, -0.06599996238946915, -0.1570338010787964, -0.18179479241371155, -0.3211260437965393, 0.08391043543815613, 0.025722604244947433, 0.06249632686376572, 0.0498829148709774, 0.3670092821121216, 0.2906752824783325, 0.005905936472117901, -0.08496291935443878, 0.02759610116481781, -0.36115050315856934, 0.42451897263526917, 0.08339428901672363, -0.032940614968538284, 0.06889569014310837, 0.2673458755016327, 0.4997740685939789, 0.27032962441444397, 0.4532826542854309, -0.22019639611244202, 0.20374524593353271, -0.3384385406970978, 0.14291861653327942, -0.14214615523815155, 0.1770971715450287, 0.05654001235961914, 0.06768564134836197, -0.2187456637620926, 0.38744810223579407, 0.39271968603134155, 0.05597841739654541, -0.11535342037677765, 0.07608397305011749, -0.15754035115242004, -0.18253737688064575, -0.021274302154779434, -0.3034435510635376, -0.17451676726341248, -0.08934304118156433, 0.31289929151535034, -0.11447141319513321, 0.3428856134414673, 0.09563416242599487, -0.08548716455698013, -0.3158888816833496, 0.308526873588562, 0.14823490381240845, 0.0799039825797081, 0.1736138015985489, -0.19991743564605713, 0.28251034021377563, 0.09879881143569946, 0.2641466557979584, -0.017163634300231934, -0.11961419880390167, -0.0731898695230484, -0.1901330202817917, -0.22726213932037354, 0.1431860625743866, -0.022869735956192017, -0.28410768508911133, -0.11198902875185013, 0.00004534423351287842, 0.02246920019388199, 0.21440912783145905, 0.025883249938488007, -0.18332238495349884, 0.05136795714497566, -0.26496827602386475, 0.29355666041374207, 0.2573854923248291, -0.25785592198371887, -0.7665919661521912, 0.15638713538646698, -0.11816451698541641, -0.06546607613563538, 0.0767873227596283, 0.22341661155223846, 0.2946223020553589, 0.2762683033943176, -0.41941404342651367, -0.08271078765392303, -0.034430861473083496, 0.14995554089546204, -0.09588082134723663, 0.20324847102165222, 0.3651016652584076, 0.053362246602773666, 0.060273781418800354, -0.009296383708715439, -0.10479915142059326, 0.3742389380931854, 0.07744396477937698, 0.20636121928691864, 0.2159639298915863, 0.29401519894599915, 0.1451084166765213, 0.7868186831474304, 0.19515223801136017, -0.1160387247800827, 0.2585868239402771, 0.0802672728896141, 0.25124356150627136, -0.30907562375068665, -0.012897136621177197, 0.17198628187179565, 0.03763209283351898, -0.303814172744751, 0.08741745352745056, -0.028799187391996384, -0.1278553158044815, -0.13060405850410461, 0.0801117867231369, -0.04498762637376785, -0.13032834231853485, 0.15630099177360535, -0.1270855814218521, 0.4329034090042114, 0.11490526795387268, -0.06226745620369911, -0.28006863594055176, -0.11001048237085342, 0.052033595740795135, -0.1749267429113388, 0.5241789221763611, 0.4021216630935669, -0.4852679371833801, -0.06360732018947601, -0.3512476980686188, 0.3219728469848633, -0.11578409373760223, 0.10282646119594574, 0.007392320781946182, -0.07976391911506653, 0.15732960402965546, -0.18209637701511383, 0.14643609523773193, -0.2514874041080475, 0.08118273317813873, 0.3863934278488159, -0.005377486348152161, 0.09936168044805527, -0.253802627325058, 0.053466375917196274, 0.33083778619766235, 0.20372416079044342, -0.18131902813911438, -0.17520560324192047, -0.32174625992774963, 0.04340699315071106, 0.27837949991226196, -0.4798925518989563, 0.0575091652572155, -0.2167825549840927, -0.46277618408203125, -0.21492794156074524, 0.1868022084236145, 0.25785133242607117, 0.09622984379529953, -0.18622493743896484, 0.36779433488845825, -0.15463422238826752, 0.028689783066511154, 0.3485637605190277, -0.11752814054489136, 0.40739724040031433, 0.1658470332622528, 0.1470041424036026, 0.04447734355926514, 0.3160405158996582, 0.13483066856861115, 0.2624262571334839, -0.4285258948802948, 0.49404335021972656, -0.10705921798944473, -0.0019586430862545967, 0.37771159410476685, 0.19692310690879822, -0.13402462005615234, 0.11917069554328918, -0.3015604317188263, 0.0703527182340622, -0.420350581407547, -0.02221187949180603, 0.06243380904197693, -0.09164696931838989, -0.5123931765556335, -0.7761762142181396, -0.014444150030612946, 0.3869953453540802, -0.13435760140419006, 0.4250026345252991, -0.4090656042098999, -0.3004300594329834, -0.03225035220384598, 0.2574758231639862, 1.1520466804504395, -0.24994032084941864, 0.2839632034301758, -0.01636945828795433, -0.11217547208070755, 0.17524118721485138, -0.32073575258255005, -0.05087783932685852, -0.2835557758808136, -0.1752738356590271, 0.024964792653918266, -0.13390931487083435, 0.2799002528190613, 0.2194494903087616, -0.11744582653045654, 0.4820217490196228, -0.42744964361190796, -0.24951359629631042, -0.09071528166532516, 0.2142430543899536, 0.2973356246948242, 0.172482430934906, 0.40002742409706116, 0.047079309821128845, -0.2730313539505005, -0.055562738329172134, -0.14581066370010376, 0.2094360589981079, 0.1826089769601822, 0.20976310968399048, -0.3370376229286194, -0.09021647274494171, -0.658204197883606, -0.02639979124069214, -0.45538800954818726, -0.5626405477523804, -0.0016361456364393234, 0.018777109682559967, 0.6962356567382812, -0.05976353958249092, 0.03414539247751236, 0.18858066201210022, -0.1038893535733223, 0.012305637821555138, -0.1183067187666893, 0.11310628056526184, 0.3138382136821747, 0.03379117697477341, -0.1306765079498291, 0.27515408396720886, 0.002553459256887436, -0.3120917081832886, -0.25957921147346497, -0.338428258895874, 0.26287269592285156, -0.22883035242557526, -0.26920193433761597, 0.5659240484237671, 0.10441188514232635, -0.17462158203125, 0.03163323551416397, 0.283249169588089, -0.23250140249729156, 0.3902270495891571, -0.31281349062919617, -0.2564024329185486, -0.04957317188382149, 0.11703760921955109, 0.3268795311450958, -0.32384544610977173, 0.38627371191978455, 0.21988938748836517, -0.07809491455554962, -0.056283704936504364, -0.07845476269721985, 0.19178712368011475, -0.2133917212486267, 0.23469948768615723, 0.029292941093444824, 0.16812573373317719, 0.07503945380449295, -0.14420628547668457, -0.025183923542499542, 0.18458133935928345, -0.006863422691822052, 0.14839328825473785, -0.28237465023994446, -0.23915879428386688, 0.21266275644302368, 0.3108687996864319, 0.1389671266078949, 0.04355504363775253, -0.011382561177015305, 0.37748026847839355, -0.1695411652326584, 0.17381587624549866, 0.13615718483924866, 0.19000346958637238, 0.10557497292757034, -0.04301150143146515, -0.17157499492168427, -0.09249541163444519, -0.06217985600233078, -0.07268790155649185, -0.03864273056387901, -0.10440592467784882, -0.3125815987586975, 0.22721943259239197, -0.12484007328748703, 0.01865081861615181, 0.010605289600789547, -0.5460447669029236, 0.06608210504055023, -0.25955021381378174, 0.009959734976291656, 0.2569548189640045, 0.07860369980335236, 0.11298703402280807, 0.3769870698451996, -0.23835060000419617, -0.04197113215923309, -0.0839817076921463, 0.08836151659488678, -0.07254658639431, 0.11493229120969772, 0.17684265971183777, 0.23234643042087555, -0.09961434453725815, -0.1672755777835846, -0.12295130640268326, 0.3646804094314575, 0.11547017097473145, 0.06246083602309227, -0.14642193913459778, 0.01973888650536537, -0.06209130585193634, 0.1360788643360138, 0.11752387881278992, -0.030667556449770927, 0.1765669882297516, 0.48567262291908264, -0.053396232426166534, -0.3026420474052429, 0.2002393752336502, 0.29103636741638184, -0.09907916188240051, -0.22045861184597015, 0.45531603693962097, 0.38831132650375366, 0.3621026277542114, -0.18997667729854584, -0.04467019438743591, 0.4329746663570404, -0.2688754200935364, 0.005052428226917982, 0.012992661446332932, 0.3136690855026245, 0.013778287917375565, 0.29580721259117126, 0.3763061761856079, -0.036789633333683014, -0.006809648126363754, -0.010944932699203491, 0.3377038836479187, 0.3985642194747925, -0.08336910605430603, -0.18288010358810425, -0.43475496768951416, -0.11146673560142517, 0.15325047075748444, 0.0929492712020874, 0.2628050744533539, -0.34644386172294617, 0.23017951846122742, 0.32396945357322693, -0.691601037979126, 0.13161906599998474, 0.5701612234115601, -0.12107745558023453, -0.23602242767810822, -0.3140924274921417, -0.0584087148308754, -0.11905066668987274, 0.17842014133930206, -0.06884324550628662, -0.25002574920654297, 0.10475721955299377, 0.03156914561986923, 0.03870958462357521, -0.047005459666252136, 0.03870926424860954, 0.0005983933806419373, 0.03772629797458649, 0.056116584688425064, 0.4386214315891266, 0.05684302747249603, -0.24714261293411255, 0.01576177030801773, -0.011866843327879906, 0.19603480398654938, 0.034603819251060486, -0.18176181614398956, 0.23707568645477295, 0.12542694807052612, 0.18166479468345642, -0.15496496856212616, 0.057723499834537506, -0.19789859652519226, -0.17785005271434784, -0.12923984229564667, -0.07553847879171371, 0.05595499277114868, 0.07509686052799225, -0.2512833774089813, 0.0002849642187356949, -0.05409610643982887, 0.47338876128196716, 0.3421151638031006, -0.35794392228126526, -0.02995937317609787, 0.40785324573516846, -0.27292612195014954, 0.1792834848165512, 0.7854650616645813, -0.04293181374669075, 0.046399280428886414, -0.1331852674484253, -0.005266325548291206, 0.2972891628742218, 0.25287961959838867, 0.2097206711769104, -0.0023795589804649353, -0.29233992099761963, -0.36107563972473145, -0.5111782550811768, -0.047932423651218414, -0.2610586881637573, 0.1552477777004242, -0.11502484977245331, 0.05861092358827591, 0.25919002294540405, -0.18304431438446045, 0.3036310076713562, 0.042581215500831604, 0.30513548851013184, 0.2993864119052887, -0.283643513917923, -0.27195268869400024, -0.1196969598531723, 0.4597979784011841, 0.0529470294713974, -0.1639264076948166, -0.026403676718473434, 0.41319540143013, -0.10127997398376465, -0.31611204147338867, -0.022377338260412216, 0.07934391498565674, 0.22791290283203125, 0.3597215712070465, -0.05422733724117279, -0.020810984075069427, 0.14565777778625488, 0.143670454621315, -0.1295800507068634, 0.2380603849887848, -0.02728429064154625, -0.15919438004493713, -0.2762354910373688, -0.020770367234945297, -0.6245561838150024, -0.2775929570198059, -0.43870216608047485, -0.24654555320739746, 0.12489929795265198, 0.033427100628614426, -0.30823004245758057, -0.30337825417518616, -0.09339849650859833, 0.35529741644859314, 0.33411478996276855, 0.41783520579338074, -0.19405043125152588, 0.06600771844387054, -0.5593665242195129, 0.12980011105537415, 0.6791753768920898, -0.019156044349074364, -0.3333542048931122, -0.057547204196453094, 0.08808252960443497, 0.09385053813457489, 0.06558052450418472, -0.2357255220413208, 0.07162600010633469, 0.30248478055000305, -0.06427565962076187, -0.15962845087051392, 0.43084952235221863, -0.31774580478668213, 0.15438562631607056, 0.06593663990497589, 0.25630784034729004, 0.04530290141701698, -0.22204536199569702, -0.36712929606437683, -0.05032123625278473 ]
https://github.com/huggingface/datasets/issues/2344
Is there a way to join multiple datasets in one?
Hi ! We don't have `join`/`merge` on a certain column as in pandas. Maybe you can just use the [concatenate_datasets](https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=concatenate#datasets.concatenate_datasets) function.
**Is your feature request related to a problem? Please describe.** I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2? **Describe the solution you'd like** Id like to join them with a merge or join method, just like pandas dataframes. **Additional context** If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation.
21
Is there a way to join multiple datasets in one? **Is your feature request related to a problem? Please describe.** I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2? **Describe the solution you'd like** Id like to join them with a merge or join method, just like pandas dataframes. **Additional context** If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation. Hi ! We don't have `join`/`merge` on a certain column as in pandas. Maybe you can just use the [concatenate_datasets](https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=concatenate#datasets.concatenate_datasets) function.
[ -0.4773365259170532, -0.6935089230537415, -0.09794414043426514, 0.17958788573741913, 0.139943927526474, 0.32479047775268555, -0.2019503265619278, 0.09135644137859344, 0.023280873894691467, 0.03147130459547043, -0.5830705165863037, -0.014750316739082336, 0.20583777129650116, 0.48026442527770996, 0.09730316698551178, -0.3352281153202057, 0.20614612102508545, 0.05332699790596962, -0.06825493276119232, 0.19073009490966797, -0.0057577937841415405, 0.12056267261505127, -0.13839960098266602, -0.052756041288375854, -0.4373384416103363, 0.14367875456809998, -0.5212437510490417, -0.14369001984596252, -0.22376126050949097, 0.14991554617881775, 0.3690568804740906, 0.3095444142818451, 0.15829895436763763, 0.4412492513656616, -0.00011309365800116211, -0.23986387252807617, 0.08313094824552536, 0.09189394116401672, -0.11585450172424316, -0.24478574097156525, -0.2960628271102905, -0.24010367691516876, 0.13320916891098022, 0.12417647987604141, -0.055751897394657135, -0.031555358320474625, 0.07952103763818741, 0.06544741243124008, 0.09696964919567108, -0.10989450663328171, 0.1444481611251831, 0.07971025258302689, 0.2500303387641907, -0.17348457872867584, -0.1637137532234192, 0.5111463665962219, 0.010818487033247948, 0.15243588387966156, 0.4946923851966858, -0.048520930111408234, 0.6609495878219604, -0.006498986855149269, 0.06655791401863098, -0.06837072968482971, 0.22856080532073975, 0.10077522695064545, -0.050841331481933594, -0.47457078099250793, -0.36077284812927246, 0.3082880675792694, 0.5458725094795227, -0.1255922019481659, -0.4932381510734558, -0.23681899905204773, 0.24776962399482727, 0.021384989842772484, -0.1913360357284546, 0.32881060242652893, 0.20860522985458374, 0.024096988141536713, -0.20643602311611176, -0.39171382784843445, 0.05327410250902176, 0.15835228562355042, -0.06973520666360855, 0.19579604268074036, -0.05132049694657326, 0.09082426130771637, 0.06955473124980927, -0.268191933631897, 0.03520715981721878, -0.16608285903930664, -0.15166200697422028, 0.1595122069120407, -0.6084680557250977, -0.3992607891559601, -0.2260911464691162, 0.3628481328487396, 0.480244517326355, 0.20241667330265045, -0.19853144884109497, 0.005876848474144936, -0.43152308464050293, 0.23007771372795105, 0.2824994921684265, -0.23996639251708984, 0.02403995767235756, -0.2077750563621521, 0.30549973249435425, -0.10439567267894745, -0.11970511078834534, -0.06679262965917587, 0.1038355901837349, -0.1081269234418869, -0.4562073051929474, -0.26210758090019226, 0.12902213633060455, -0.024584386497735977, 0.003955053165555, -0.3191898465156555, 0.12430093437433243, -0.07096588611602783, -0.04131195321679115, 0.060606636106967926, -0.16559991240501404, 0.11679671704769135, -0.13964363932609558, 0.23027242720127106, -0.19073225557804108, -0.2304217666387558, -0.0756719633936882, 0.11195264756679535, 0.016552571207284927, 0.28939899802207947, -0.17126241326332092, -0.49427860975265503, -0.20400039851665497, 0.4133862853050232, 0.4074549674987793, 0.046917594969272614, -0.08393774181604385, -0.28429725766181946, -0.1569371223449707, 0.09500303864479065, 0.2700357735157013, -0.04439058154821396, 0.08420564234256744, 0.023763492703437805, -0.146383598446846, -0.12032466381788254, -0.4403831958770752, -0.28853639960289, -0.4382292628288269, 0.09076691418886185, 0.046517275273799896, -0.03413575887680054, -0.4737569987773895, 0.475234717130661, -0.24979299306869507, -0.09179958701133728, -0.0570734366774559, 0.192323699593544, -0.17752771079540253, -0.11399760097265244, 0.11596084386110306, 0.017362385988235474, -0.07768866419792175, -0.1454380750656128, 0.13517257571220398, -0.07031312584877014, -0.32923635840415955, 0.18613678216934204, -0.23839986324310303, 0.1550079584121704, -0.1052752286195755, 0.0049514248967170715, 0.36956286430358887, -0.43028974533081055, -0.028741246089339256, 0.05892500653862953, 0.1559227705001831, -0.14391665160655975, -0.07549593597650528, 0.27008768916130066, 0.043854113668203354, 0.11775397509336472, 0.17228171229362488, 0.4885496497154236, -0.1066974550485611, -0.17042812705039978, 0.16334237158298492, -0.28347617387771606, 0.2085459977388382, 0.09724879264831543, -0.031383272260427475, -0.21481677889823914, 0.08631594479084015, -0.1664019227027893, 0.2248513400554657, -0.060707610100507736, 0.052888378500938416, 0.22436842322349548, 0.06302151083946228, 0.21025492250919342, -0.008477769792079926, -0.4905327260494232, -0.4413348436355591, -0.025932401418685913, 0.28552407026290894, 0.08499523997306824, 0.2845335304737091, -0.24953395128250122, 0.17808577418327332, -0.2793404459953308, -0.09169250726699829, -0.007967367768287659, 0.005875028669834137, -0.021832630038261414, 0.18568938970565796, -0.28263407945632935, -0.5492196083068848, 0.685990571975708, 0.11561040580272675, 0.014912213198840618, -0.5255337357521057, 0.7264197468757629, 0.03021523728966713, 0.08212047070264816, 0.0499671995639801, 0.27667492628097534, 0.05785401538014412, -0.06262776255607605, 0.2358020842075348, 0.13076075911521912, -0.36586806178092957, 0.20620203018188477, 0.44053977727890015, 0.13159172236919403, 0.37305083870887756, -0.23773010075092316, -0.2601432800292969, -0.3811030387878418, 0.06794183701276779, -0.19564393162727356, -0.36050620675086975, 0.28508666157722473, -0.02076101303100586, 0.3033422827720642, 0.06463813036680222, 0.04769427329301834, 0.09721173346042633, -0.03692884370684624, -0.1704225093126297, 0.037231892347335815, -0.025171127170324326, -0.019658710807561874, -0.0002522319555282593, 0.16993305087089539, -0.3979133367538452, 0.03021114319562912, 0.11816960573196411, -0.006336713209748268, -0.016138114035129547, -0.09983047097921371, -0.28157520294189453, 0.09551690518856049, -0.0223460141569376, 0.04717307165265083, 0.4209534525871277, 0.2107749730348587, -0.1005111038684845, 0.09120737016201019, -0.02226009964942932, 0.015199325978755951, 0.041053883731365204, 0.1977774202823639, -0.0018748202128335834, 0.157687246799469, 0.23791290819644928, 0.062928706407547, -0.04659417271614075, -0.07101751863956451, 0.259068101644516, -0.027197835966944695, -0.16939759254455566, -0.2094568908214569, -0.12843239307403564, -0.32415443658828735, -0.031835321336984634, -0.3003280460834503, -0.45720162987709045, -0.29400184750556946, -0.1320745050907135, 0.1283113807439804, 0.178322434425354, -0.010823186486959457, 0.17795395851135254, 0.5747691988945007, -0.2819279432296753, 0.222096249461174, -0.1566823273897171, 0.28540751338005066, 0.23182889819145203, 0.13720114529132843, 0.11106378585100174, 0.11056187003850937, 0.30096086859703064, -0.015874626114964485, 0.1589299440383911, -0.4940423369407654, -0.15341240167617798, 0.029591280966997147, -0.23876525461673737, 0.2145950347185135, 0.05409020557999611, 0.22759442031383514, -0.042771659791469574, -0.32973331212997437, 0.30569881200790405, 0.1753019392490387, -0.12375142425298691, -0.19030678272247314, 0.00144952570553869, 0.11994949728250504, -0.06526831537485123, 0.04787430912256241, -0.3397686779499054, -0.2575618028640747, 0.1969042271375656, -0.13475459814071655, 0.03663032501935959, -0.252994179725647, -0.1064913347363472, 0.030194338411092758, -0.33418500423431396, -0.035330645740032196, -0.04608769714832306, -0.4317246973514557, 0.25343841314315796, -0.2205066978931427, -0.1305096596479416, 0.13445313274860382, 0.057315289974212646, 0.09837719798088074, -0.3787463903427124, -0.04783763363957405, -0.35171887278556824, -0.24645189940929413, 0.026712756603956223, 0.07778890430927277, 0.3056211769580841, 0.0439627543091774, -0.06870666146278381, 0.051046714186668396, 0.04277163743972778, -0.19383978843688965, -0.1942005157470703, 0.4216267764568329, 0.2125372737646103, -0.12208909541368484, 0.2178722620010376, -0.20569521188735962, 0.14738412201404572, 0.6442357301712036, 0.2356085628271103, -0.04136895388364792, 0.04473155364394188, 0.18443529307842255, -0.10918108373880386, -0.4813731610774994, -0.07420419901609421, -0.10046669840812683, 0.4089365601539612, 0.17733776569366455, 0.3692168593406677, 0.4297555983066559, -0.3885725140571594, -0.14694543182849884, 0.048018813133239746, -0.022658202797174454, -0.1660974621772766, -0.12425822019577026, 0.08029969036579132, -0.28286707401275635, -0.6389859914779663, -0.08559286594390869, -0.042625557631254196, -0.13982394337654114, 0.4228817820549011, 0.08307074755430222, -0.08251004666090012, -0.3596101403236389, -0.19805262982845306, -0.29966598749160767, 0.2538965344429016, 0.22774305939674377, -0.12854774296283722, 0.03730512037873268, 0.3393596410751343, -0.033712953329086304, 0.1487988382577896, 0.5826120376586914, -0.1726081222295761, -0.670480489730835, 0.06162846460938454, -0.17111338675022125, -0.20939074456691742, -0.06732102483510971, 0.137640580534935, 0.14142921566963196, -0.037987109273672104, 0.6065418124198914, -0.1926565170288086, -0.20452360808849335, 0.41820937395095825, 0.2603173553943634, -0.144849494099617, -0.1371815800666809, -0.02557605691254139, -0.04890865832567215, -0.3120494782924652, -0.22894427180290222, 0.059659093618392944, 0.24737973511219025, 0.06129872798919678, -0.14330336451530457, -0.03249269723892212, -0.12592405080795288, 0.4951264262199402, -0.23315222561359406, 0.06111444905400276, 0.3976520895957947, 0.1118563860654831, 0.21889431774616241, 0.06084715202450752, -0.025124171748757362, 0.5964619517326355, -0.007302615791559219, -0.5920337438583374, -0.047439806163311005, 0.05379216745495796, 0.8099614977836609, -0.02540186047554016, 0.18662545084953308, 0.6380630731582642, -0.2588060796260834, 0.12421870976686478, -0.21459956467151642, 0.08657819032669067, 0.20604628324508667, 0.2696509063243866, -0.7012065649032593, -0.24555405974388123, 0.5334431529045105, 0.127952441573143, 0.07212482392787933, 0.2506324052810669, 0.3512205481529236, -0.04616077244281769, -0.13746120035648346, -0.08918305486440659, 0.9792343974113464, -0.013622745871543884, 0.06466806679964066, -0.08480068296194077, -0.0947202816605568, 0.6272911429405212, -0.14846083521842957, 0.05520172417163849, 0.017842363566160202, -0.2724738121032715, -0.13287444412708282, -0.06503264605998993, 0.12012537568807602, -0.11202415823936462, -0.17667414247989655, 0.1030934527516365, -0.04235111176967621, 0.3266200125217438, -0.08393479138612747, 0.25981229543685913, 0.055508874356746674, -0.1796264797449112, -0.3709908127784729, 0.05887854844331741, -0.07566951215267181, -0.12636634707450867, -0.09264690428972244, -0.036231838166713715, 0.14693255722522736, 0.1938902735710144, -0.26062631607055664, -0.3029320538043976, 0.32811954617500305, 0.1651674509048462, 0.13334418833255768, -0.1908021718263626, 0.23595574498176575, 0.3386782705783844, 0.3834405541419983, 0.01565660908818245, -0.25819510221481323, 0.07907818257808685, -0.40216895937919617, -0.08437157422304153, -0.37971556186676025, -0.2739928066730499, 0.1269817054271698, 0.04400663822889328, -0.26015031337738037, 0.3154331147670746, 0.33322128653526306, -0.30632537603378296, -0.35821759700775146, 0.3029263913631439, -0.15167944133281708, -0.21196655929088593, -0.25804266333580017, 0.32632210850715637, 0.3057921528816223, -0.14073823392391205, 0.05334150418639183, 0.2744376063346863, -0.227475106716156, 0.11496073007583618, 0.017761558294296265, -0.09822530299425125, -0.08110681176185608, 0.2735077738761902, 0.15084029734134674, -0.2412649691104889, 0.15715812146663666, 0.2811255156993866, 0.025403667241334915, 0.04339703172445297, 0.11417222768068314, 0.4336083233356476, -0.1087920069694519, 0.038872648030519485, -0.09651865065097809, 0.37965959310531616, 0.07312441617250443, 0.19972233474254608, 0.1604214906692505, -0.0799415335059166, -0.08858612179756165, -0.22321821749210358, -0.17123444378376007, 0.342149555683136, -0.02583739534020424, 0.2213168442249298, 0.03294476121664047, 0.14060890674591064, 0.1405460238456726, 0.5654835104942322, -0.22082601487636566, 0.08641514182090759, -0.19651058316230774, 0.021731622517108917, 0.16065576672554016, 0.11509590595960617, -0.25854891538619995, -0.09735555946826935, -0.04710223525762558, -0.05688861757516861, 0.1047084629535675, -0.1868646740913391, 0.0041204653680324554, 0.16338174045085907, 0.25803396105766296, -0.012333666905760765, -0.09002798795700073, -0.0745779350399971, 0.03455834463238716, -0.19893878698349, 0.12174876034259796, -0.01644950360059738, 0.0835835337638855, -0.19787046313285828, 0.3910059332847595, -0.30015456676483154, -0.2309046983718872, 0.14930778741836548, 0.3866787850856781, 0.10703977942466736, 0.0033810329623520374, -0.061889998614788055, -0.10581403970718384, -0.09338705986738205, -0.02339164726436138, 0.18827444314956665, 0.3616147041320801, -0.15706276893615723, 0.009891442954540253, 0.11906629800796509, -0.021558236330747604, 0.022130068391561508, 0.43167227506637573, -0.0803113579750061, -0.09188209474086761, 0.6225709915161133, 0.024901021271944046, 0.04197585582733154, -0.15967699885368347, -0.21277154982089996, 0.22123588621616364, 0.10807044059038162, -0.03061811812222004, 0.05427087843418121, 0.09248730540275574, 0.29695838689804077, -0.1719510704278946, -0.02382093295454979, 0.10183833539485931, -0.011028934270143509, 0.28809037804603577, 0.33246657252311707, 0.2076011449098587, -0.12690502405166626, 0.41564667224884033, 0.21110400557518005, 0.073903888463974, 0.1609969437122345, -0.21678248047828674, 0.056325845420360565, 0.07357297092676163, -0.014142770320177078, 0.7791047096252441, -0.003928052261471748, 0.1016906350851059, -0.1748669445514679, 0.0833340585231781, -0.40817791223526, -0.004006177186965942, 0.2450898289680481, -0.2864972949028015, -0.38047686219215393, -0.09748435020446777, 0.5531995892524719, 0.041274525225162506, -0.10277016460895538, 0.3428950607776642, -0.12116760015487671, 0.13957753777503967, 0.12337017059326172, 0.12229888141155243, -0.4584866762161255, 0.24428540468215942, -0.06418871879577637, 0.22473715245723724, 0.06177575886249542, 0.33955976366996765, 0.6070734858512878, 0.26016953587532043, -0.03094780631363392, -0.1975216269493103, 0.207158625125885, 0.022777102887630463, -0.1020902693271637, 0.5970638394355774, 0.2625040113925934, 0.01222827099263668, 0.05130605399608612, 0.3758939206600189, -0.05994546040892601, 0.05887504667043686, 0.2854732275009155, -0.08491877466440201, -0.051626890897750854, -0.3078397214412689, 0.2585429251194, 0.16019307076931, 0.01675209403038025, -0.057139936834573746, -0.41108056902885437, 0.1542842835187912, -0.8882022500038147, 0.24300417304039001, -0.21213015913963318, -0.1556629091501236, -0.08128170669078827, 0.14952130615711212, -0.21426472067832947, -0.16692402958869934, 0.5107835531234741, -0.303263396024704, -0.15263879299163818, -0.04965486750006676, 0.0925268903374672, 0.13104334473609924, 0.39222976565361023, 0.484109491109848, 0.3431786596775055, -0.17799516022205353, -0.3353409767150879, -0.2935388386249542, -0.2749543786048889, 0.1368609219789505, 0.17347750067710876, -0.1628401130437851, 0.06115975230932236, -0.0481860414147377, 0.03912872448563576, 0.12453719973564148, -0.1670335978269577, 0.17341595888137817, 0.017460457980632782, -0.21684066951274872, -0.12756983935832977, 0.09650350362062454, -0.08454124629497528, -0.08098703622817993, 0.24685737490653992, 0.4023834466934204, 0.0646207332611084, -0.1149132251739502, -0.04566536098718643, 0.24843212962150574, 0.24903389811515808, -0.33403390645980835, -0.0683516263961792, 0.17555497586727142, 0.4713207483291626, -0.07812175154685974, 0.28382137417793274, -0.008298542350530624, -0.31505316495895386, -0.08181184530258179, 0.19705921411514282, -0.22040462493896484, 0.10180491209030151, -0.3778834044933319, -0.057126712054014206, 0.16972757875919342, -0.16769380867481232, -0.024620722979307175, 0.13126033544540405, -0.20868781208992004, -0.12023387849330902, -0.17193418741226196, -0.12160944193601608, 0.2517894506454468, 0.36072301864624023, -0.08745326101779938, -0.0675932914018631, 0.1652052253484726, -0.12065643072128296, 0.061615779995918274, 0.09145189076662064, -0.30865180492401123, -0.31417015194892883, -0.0062716007232666016, 0.2522934675216675, 0.143966943025589, -0.5772435665130615, -0.33708205819129944, 0.23708277940750122, 0.08402211219072342, -0.0770445466041565, 0.59874427318573, 0.2726125717163086, -0.03071604110300541, -0.21703672409057617, 0.028837382793426514, 0.11161141097545624, 0.026554284617304802, -0.003445930778980255, -0.14776639640331268 ]
https://github.com/huggingface/datasets/issues/2337
NonMatchingChecksumError for web_of_science dataset
I've raised a PR for this. Should work with `dataset = load_dataset("web_of_science", "WOS11967", ignore_verifications=True)`once it gets merged into the main branch. Thanks for reporting this!
NonMatchingChecksumError when trying to download the web_of_science dataset. >NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://data.mendeley.com/datasets/9rw3vkcfy4/6/files/c9ea673d-5542-44c0-ab7b-f1311f7d61df/WebOfScience.zip?dl=1'] Setting `ignore_verfications=True` results in OSError. >OSError: Cannot find data file. Original error: [Errno 20] Not a directory: '/root/.cache/huggingface/datasets/downloads/37ab2c42f50d553c1d0ea432baca3e9e11fedea4aeec63a81e6b7e25dd10d4e7/WOS5736/X.txt' ```python dataset = load_dataset('web_of_science', 'WOS5736') ``` There are 3 data instances and they all don't work. 'WOS5736', 'WOS11967', 'WOS46985' datasets 1.6.2 python 3.7.10 Ubuntu 18.04.5 LTS
25
NonMatchingChecksumError for web_of_science dataset NonMatchingChecksumError when trying to download the web_of_science dataset. >NonMatchingChecksumError: Checksums didn't match for dataset source files: ['https://data.mendeley.com/datasets/9rw3vkcfy4/6/files/c9ea673d-5542-44c0-ab7b-f1311f7d61df/WebOfScience.zip?dl=1'] Setting `ignore_verfications=True` results in OSError. >OSError: Cannot find data file. Original error: [Errno 20] Not a directory: '/root/.cache/huggingface/datasets/downloads/37ab2c42f50d553c1d0ea432baca3e9e11fedea4aeec63a81e6b7e25dd10d4e7/WOS5736/X.txt' ```python dataset = load_dataset('web_of_science', 'WOS5736') ``` There are 3 data instances and they all don't work. 'WOS5736', 'WOS11967', 'WOS46985' datasets 1.6.2 python 3.7.10 Ubuntu 18.04.5 LTS I've raised a PR for this. Should work with `dataset = load_dataset("web_of_science", "WOS11967", ignore_verifications=True)`once it gets merged into the main branch. Thanks for reporting this!
[ -0.0851588100194931, -0.07917521893978119, -0.06877364218235016, 0.21224889159202576, 0.14462894201278687, 0.16705048084259033, -0.06744642555713654, 0.3561590909957886, 0.3357117474079132, 0.17037636041641235, -0.184129536151886, -0.08829420804977417, 0.032025132328271866, -0.04910041391849518, -0.17920279502868652, 0.39106759428977966, 0.1115439310669899, 0.07040576636791229, 0.1489616185426712, -0.023138538002967834, -0.18310479819774628, 0.36232393980026245, -0.07175599783658981, -0.1976109892129898, -0.17421084642410278, 0.21031038463115692, 0.077029749751091, 0.2272588610649109, -0.12066320329904556, -0.24195322394371033, 0.50315260887146, 0.14768604934215546, 0.21829356253147125, 0.5435402989387512, -0.00012597686145454645, 0.1516779363155365, 0.25659507513046265, -0.03430826589465141, -0.28877121210098267, -0.2909291982650757, -0.2795558273792267, -0.4759104251861572, -0.05878719687461853, 0.0108695849776268, 0.1746034324169159, 0.16570907831192017, 0.08828721195459366, -0.1844344139099121, 0.043126992881298065, 0.32767975330352783, 0.09150310605764389, 0.5787204504013062, 0.25563734769821167, 0.09548858553171158, 0.20897504687309265, 0.12257380783557892, -0.035404056310653687, 0.3028370440006256, 0.3427017033100128, 0.2210134118795395, 0.11646274477243423, 0.06072261556982994, -0.22143959999084473, 0.3517247140407562, 0.10202747583389282, -0.03683742508292198, 0.17356878519058228, -0.5107841491699219, 0.2583925724029541, 0.5678051114082336, 0.4979860782623291, -0.00438302755355835, -0.4195263385772705, -0.16576388478279114, -0.37333109974861145, 0.01574554108083248, 0.36659958958625793, 0.25913506746292114, -0.3134573698043823, 0.013368630781769753, -0.3301944434642792, 0.08453052490949631, -0.07721127569675446, 0.3896191716194153, 0.018025927245616913, 0.28355127573013306, -0.029587876051664352, -0.05714677274227142, 0.11614969372749329, -0.10186745226383209, 0.5316745638847351, -0.43824589252471924, 0.20054927468299866, 0.14416149258613586, -0.42129215598106384, -0.17661380767822266, -0.15646684169769287, 0.5054700970649719, 0.38024935126304626, 0.09734179079532623, 0.11994776874780655, 0.17523717880249023, -0.38934099674224854, 0.16727638244628906, 0.07532928884029388, 0.1147172749042511, -0.04744800180196762, 0.013533267192542553, 0.3122352361679077, 0.24396821856498718, 0.02974284067749977, 0.13695397973060608, 0.15775558352470398, -0.32427406311035156, 0.3243069052696228, -0.23139730095863342, 0.32000988721847534, -0.42318737506866455, -0.33062759041786194, 0.0906517431139946, -0.31262731552124023, -0.0955951064825058, 0.14818403124809265, 0.3303672671318054, -0.12785005569458008, 0.4152511656284332, 0.007104180753231049, 0.18330633640289307, -0.0802413821220398, -0.10897485166788101, -0.2528928220272064, -0.06734390556812286, 0.0680786669254303, 0.2231651097536087, 0.338722288608551, -0.04649186506867409, 0.5633107423782349, 0.04719143733382225, 0.255327433347702, -0.02421163022518158, 0.0645127072930336, 0.11922650039196014, -0.06533107906579971, 0.5076719522476196, 0.037769999355077744, 0.17639227211475372, 0.19255709648132324, -0.020630069077014923, -0.12922778725624084, 0.15454916656017303, -0.29983043670654297, -0.34669673442840576, -0.036166124045848846, 0.07290836423635483, -0.5573632717132568, -0.29706957936286926, 0.06675863265991211, -0.33451899886131287, 0.18524980545043945, -0.3027682602405548, -0.024020902812480927, -0.16866391897201538, -0.007672060281038284, -0.1457054316997528, 0.037421129643917084, 0.2380305975675583, -0.14479631185531616, -0.04072042182087898, -0.038201116025447845, -0.08330456912517548, 0.2342768907546997, 0.17728924751281738, -0.052478715777397156, -0.07863209396600723, -0.4035303592681885, -0.08021043986082077, 0.2724960744380951, -0.15743675827980042, -0.6148738265037537, 0.09992040693759918, 0.18087990581989288, 0.20845986902713776, 0.22434943914413452, 0.1730826199054718, -0.3209438920021057, -0.08141288161277771, -0.1034119725227356, -0.12010557949542999, -0.015613144263625145, 0.010025395080447197, -0.31119081377983093, -0.1605878621339798, 0.1613958179950714, 0.19054430723190308, 0.14213751256465912, 0.03889510780572891, 0.07761207967996597, -0.29169052839279175, 0.4403515160083771, -0.23108813166618347, -0.01021112035959959, 0.1556788682937622, 0.2587718367576599, 0.23197680711746216, 0.05061650276184082, -0.18163499236106873, -0.5557795763015747, 0.32318928837776184, -0.13680079579353333, -0.00969059020280838, -0.030093565583229065, -0.07737751305103302, -0.1430778205394745, -0.2569602131843567, -0.28460025787353516, -0.2503168284893036, -0.09026798605918884, 0.29492324590682983, 0.4509868919849396, -0.04893321916460991, -0.15751847624778748, 0.03791018947958946, -0.1419365555047989, 0.18654672801494598, -0.3568163514137268, 0.33746519684791565, -0.04525550454854965, 0.014525080099701881, -0.027278192341327667, 0.03767918050289154, 0.12709033489227295, -0.044038161635398865, -0.1227165088057518, 0.40655648708343506, 0.01820553094148636, -0.05074070394039154, 0.10548959672451019, 0.4436122179031372, 0.13504397869110107, -0.129782572388649, -0.021437352523207664, 0.37854504585266113, 0.04949963092803955, 0.03357228636741638, -0.20137807726860046, 0.2474856823682785, -0.13905870914459229, 0.35441672801971436, 0.0880436897277832, 0.260663777589798, 0.24485379457473755, -0.1513052135705948, -0.18408989906311035, -0.06711612641811371, 0.4213159382343292, -0.356178879737854, 0.09809714555740356, -0.08242009580135345, -0.15690195560455322, 0.03166690468788147, 0.07915017008781433, -0.2353089153766632, 0.008786968886852264, 0.2170218825340271, 0.06293568760156631, -0.08831654489040375, -0.05959942936897278, 0.5852556228637695, 0.5754345059394836, 0.19979144632816315, 0.11848059296607971, 0.08072807639837265, -0.030116640031337738, -0.12028444558382034, 0.11565126478672028, 0.2258460819721222, 0.08752983808517456, 0.3959549367427826, 0.056620266288518906, -0.04067324101924896, -0.4490392506122589, -0.2895908057689667, -0.0693226233124733, 0.20491111278533936, -0.4617796540260315, -0.07148363441228867, -0.26735377311706543, -0.026800572872161865, -0.4079291820526123, -0.142302468419075, -0.6074791550636292, -0.5206975936889648, 0.0005129612982273102, 0.3735802471637726, -0.02954675629734993, 0.3360089659690857, -0.47618770599365234, -0.030933991074562073, -0.1708241105079651, -0.06827366352081299, -0.11131377518177032, 0.24012045562267303, -0.07354415208101273, -0.10283330082893372, 0.4562331736087799, -0.008245240896940231, 0.2831135392189026, -0.3246205747127533, -0.052508316934108734, -0.7112346291542053, -0.39087817072868347, 0.04804745316505432, 0.027290627360343933, -0.016577066853642464, 0.33024173974990845, 0.2918691635131836, 0.06967329978942871, -0.20945334434509277, 0.2388787716627121, -0.3470226526260376, -0.27581655979156494, 0.1425105333328247, -0.02702672779560089, -0.03242068365216255, 0.16906879842281342, -0.1787816882133484, -0.2738601863384247, -0.31062206625938416, -0.16191783547401428, 0.09886825084686279, 0.11759783327579498, 0.3009371757507324, -0.006698283366858959, 0.05930693820118904, 0.05647293105721474, 0.24263572692871094, -0.3133752942085266, -0.8532571196556091, 0.46547770500183105, 0.0037944638170301914, -0.1866527795791626, 0.20905396342277527, -0.0538751445710659, 0.2935715317726135, 0.229727640748024, -0.44641852378845215, -0.3201850354671478, -0.3100651204586029, -0.1366553157567978, 0.2622303366661072, 0.17172764241695404, 0.43478676676750183, -0.15022356808185577, -0.025073079392313957, -0.08673765510320663, -0.17591235041618347, 0.0649079829454422, -0.13060474395751953, 0.6317175030708313, -0.0790109932422638, 0.05772140622138977, 0.04545437917113304, 0.7125914692878723, 0.38632696866989136, 0.06749531626701355, 0.30427899956703186, 0.2701836824417114, 0.31623825430870056, 0.06913131475448608, -0.2132718861103058, -0.20780059695243835, -0.11379441618919373, -0.01803663745522499, 0.2296578288078308, 0.08893103152513504, 0.0873778909444809, -0.17191094160079956, -0.00797215849161148, -0.37115296721458435, -0.1685083508491516, -0.12884309887886047, -0.08519299328327179, 0.26300302147865295, 0.1696462333202362, -0.043743234127759933, -0.1384742110967636, -0.28549692034721375, 0.022427208721637726, 0.3893094062805176, -0.016168028116226196, 0.05058067664504051, -0.408865362405777, 0.11297362297773361, -0.2739291489124298, 0.47510045766830444, -0.03726065531373024, 0.30570805072784424, 0.09803837537765503, -0.1773187220096588, 0.04618312418460846, -0.00030599627643823624, 0.6603271961212158, -0.39927247166633606, 0.24561429023742676, -0.2270684689283371, -0.052720628678798676, -0.2520555853843689, -0.27406662702560425, 0.039693642407655716, 0.162903293967247, 0.39870429039001465, 0.33974212408065796, -0.2540695071220398, -0.08062190562486649, 0.20215550065040588, 0.08741839230060577, -0.04500197246670723, -0.4370999038219452, -0.2332218587398529, -0.26446276903152466, -0.3989766836166382, -0.20299020409584045, 0.01574156992137432, 0.16827496886253357, -0.018936796113848686, -0.000024147331714630127, -0.0035436246544122696, -0.09683588892221451, 0.4360719323158264, -0.1660071760416031, 0.13863733410835266, 0.10400571674108505, 0.1729806661605835, 0.21666407585144043, 0.17232012748718262, 0.4092181921005249, 0.7318952679634094, -0.28749749064445496, -0.6002773642539978, -0.011357691138982773, -0.052717939019203186, 0.059787310659885406, 0.30570870637893677, 0.09644901752471924, -0.3372844457626343, 0.5632474422454834, 0.19887104630470276, 0.058583926409482956, -0.07687760144472122, 0.06755198538303375, 0.07075153291225433, -0.2937154471874237, -0.22777020931243896, 0.2731252908706665, 0.34299778938293457, 0.04260297119617462, 0.16352790594100952, 0.11388197541236877, -0.024872316047549248, 0.1626587063074112, 0.1482766717672348, 1.0862957239151, 0.08784414827823639, 0.1860828846693039, -0.052238188683986664, -0.1104118674993515, 0.2627033591270447, -0.19081059098243713, 0.1054060086607933, -0.3536969721317291, -0.30446159839630127, -0.2195749133825302, -0.27972492575645447, 0.16594302654266357, 0.1664828658103943, -0.11623823642730713, 0.5488877892494202, 0.11682267487049103, 0.21600031852722168, 0.20478488504886627, 0.16357086598873138, -0.5091703534126282, -0.0332462452352047, -0.05908370018005371, 0.08841884136199951, -0.09279987215995789, 0.5007277131080627, -0.07782260328531265, -0.1452208161354065, -0.27541422843933105, -0.19277797639369965, -0.2730581760406494, 0.15954434871673584, -0.13173966109752655, 0.24020057916641235, 0.3220723569393158, -0.23708288371562958, -0.11302833259105682, 0.48869967460632324, 0.38358038663864136, -0.16710305213928223, -0.3553112745285034, 0.13552191853523254, 0.2764643728733063, -0.1244996041059494, -0.017123641446232796, -0.3096615672111511, 0.2277703732252121, -0.0881362035870552, -0.149482861161232, -0.04791761189699173, -0.0436856634914875, -0.5708997249603271, -0.0020887553691864014, -0.2316407412290573, -0.12375186383724213, -0.41684621572494507, -0.12625867128372192, -0.19659414887428284, 0.021702125668525696, -0.2703315019607544, 0.03172849118709564, 0.3245987296104431, -0.3015620708465576, 0.10050669312477112, 0.003499899059534073, -0.2388790100812912, -0.2121371179819107, 0.4402432143688202, -0.06340072304010391, -0.09472369402647018, 0.3009137809276581, 0.10905542969703674, -0.1930946409702301, -0.031158309429883957, 0.037862300872802734, -0.18905048072338104, -0.39662522077560425, 0.17358815670013428, -0.09290102869272232, 0.08760417997837067, -0.07115586847066879, 0.2744779884815216, 0.2370472401380539, 0.25806722044944763, -0.013826683163642883, -0.6462165117263794, -0.1248563677072525, -0.09524674713611603, 0.061284154653549194, 0.5304861664772034, -0.4701801836490631, -0.07973404228687286, 0.000978216528892517, -0.22880318760871887, -0.1774573028087616, 0.10991649329662323, -0.23944032192230225, -0.26273515820503235, -0.17821504175662994, 0.022382359951734543, 0.13009674847126007, -0.16346406936645508, -0.054802559316158295, 0.0018499772995710373, -0.22108526527881622, -0.040341321378946304, -0.04347366839647293, 0.22579944133758545, 0.24790295958518982, -0.12102588266134262, 0.3199215233325958, 0.011033743619918823, -0.0919966995716095, -0.005469857715070248, -0.0953245609998703, 0.31373730301856995, 0.004057735204696655, -0.002281222492456436, 0.10968199372291565, -0.07830893248319626, -0.10452389717102051, -0.025328975170850754, -0.20692658424377441, 0.16308683156967163, 0.16183443367481232, 0.11519944667816162, -0.056639231741428375, -0.026281684637069702, 0.18526092171669006, 0.134385883808136, -0.0019719749689102173, -0.1917341649532318, 0.2688358724117279, -0.3860964775085449, -0.20620521903038025, 0.5657045245170593, 0.4447363615036011, 0.4240090847015381, -0.31896650791168213, 0.3215559422969818, 0.10605097562074661, 0.12015672028064728, -0.27951866388320923, -0.12211090326309204, 0.43271416425704956, 0.060362253338098526, -0.02853582799434662, 0.20223435759544373, 0.044261712580919266, -0.30048835277557373, 0.4922025799751282, 0.24664241075515747, 0.233419269323349, -0.3281932473182678, 0.36743494868278503, 0.4295714199542999, -0.16271314024925232, 0.14194241166114807, 0.29746583104133606, -0.0661257803440094, 0.016898274421691895, -0.036944225430488586, -0.08295262604951859, 0.24338629841804504, -0.4784405529499054, 0.12669195234775543, -0.07105279713869095, -0.4233187437057495, 0.19465488195419312, 0.013320192694664001, -0.0027757585048675537, -0.03045342117547989, 0.06992124021053314, 0.30760684609413147, -0.2630220949649811, 0.11276720464229584, -0.517410933971405, 0.03816993907094002, -0.035842277109622955, 0.0914095789194107, 0.07975238561630249, -0.32254427671432495, 0.03467997908592224, 0.15571239590644836, 0.023099567741155624, -0.2504734992980957, -0.02767118066549301, -0.0621575266122818, -0.3479337692260742, -0.4791833460330963, -0.03410709649324417, 0.009515548124909401, -0.02146066725254059, -0.07622428238391876, 0.05614329129457474, 0.230447456240654, -0.3766312897205353, 0.07804874330759048, 0.43580305576324463, 0.6305702924728394, 0.24793832004070282, -0.007842734456062317, 0.021425671875476837, -0.2103939801454544, -0.03097476437687874, -0.04728231579065323, 0.3579614758491516, 0.008460938930511475, -0.02921316772699356, 0.43398886919021606, 0.01565898023545742, -0.09159059077501297, 0.01623961329460144, -0.3148895800113678, 0.03728179633617401, -0.200228750705719, 0.5952574610710144, -0.02133605256676674, 0.1963334083557129, -0.03310704231262207, 0.05423634499311447, -0.3736695349216461, -0.3054947853088379, -0.06477147340774536, 0.04380788654088974, 0.12105507403612137, -0.020275671035051346, 0.00601494126021862, -0.19543850421905518, 0.29129794239997864, 0.49831295013427734, 0.09905878454446793, -0.3213222920894623, -0.09410986304283142, -0.8508209586143494, 0.1570826917886734, -0.13762691617012024, 0.12171980738639832, 0.0024771923199295998, 0.14142514765262604, -0.020226553082466125, 0.19381020963191986, 0.4343988299369812, 0.008165411651134491, -0.15851636230945587, 0.0657150074839592, 0.06366993486881256, -0.17664477229118347, -0.011665597558021545, -0.022834675386548042, 0.15257123112678528, -0.25369179248809814, 0.1695958822965622, 0.0036752289161086082, -0.04156496748328209, 0.054204508662223816, 0.16887040436267853, -0.07854105532169342, -0.16209200024604797, 0.1832965612411499, 0.17470335960388184, 0.5801801681518555, 0.008168216794729233, -0.17353060841560364, -0.12424367666244507, -0.06307178735733032, -0.3637915551662445, 0.38228604197502136, -0.07290610671043396, 0.39570367336273193, -0.3346647322177887, -0.24536849558353424, -0.30818405747413635, 0.1894780993461609, 0.1044970452785492, -0.1284390091896057, -0.07453268021345139, 0.15965208411216736, -0.21249648928642273, 0.2788161039352417, 0.3082186281681061, -0.039915747940540314, -0.11913542449474335, 0.26213669776916504, -0.2827538847923279, -0.2975851893424988, 0.6069637537002563, 0.03731589764356613, 0.0027410313487052917, -0.29812633991241455, 0.1216118112206459, -0.12061025947332382, -0.051075227558612823, -0.5369360446929932, 0.0036446675658226013, 0.3522103726863861, 0.0643131285905838, -0.3270989656448364, 0.1326463669538498, -0.18592293560504913, -0.0038295015692710876, 0.03173667564988136, 0.42683497071266174, 0.213313490152359, -0.33902135491371155, 0.13847264647483826, -0.13046064972877502 ]
https://github.com/huggingface/datasets/issues/2330
Allow passing `desc` to `tqdm` in `Dataset.map()`
I think the user could pass the `desc` parameter to `map` so that it can be displayed in the tqdm progress bar, as suggested by @cccntu. When there's no multiprocessing, the `desc` of the progress bar could be the `desc` passed by the user. In multiprocessing, we were already using a `desc` equal to `"#" + str(rank)`. We can change it to be `(desc or "") + "#" + str(rank)` instead. In the end, since both `desc` and `rank` could be None, we can have: ```python pbar_desc = (desc or "") + "#" + str(rank) if rank is not None else desc ``` Finally let's remember that if we add `desc` as a new parameter to `map`, we should add it to the `ignore_kwargs` list of the `@fingerprint_transform` decorator of `Dataset._map_single` since we don't want this parameter to affect the fingerprint of the resulting dataset.
It's normal to have many `map()` calls, and some of them can take a few minutes, it would be nice to have a description on the progress bar. Alternative solution: Print the description before/after the `map()` call.
145
Allow passing `desc` to `tqdm` in `Dataset.map()` It's normal to have many `map()` calls, and some of them can take a few minutes, it would be nice to have a description on the progress bar. Alternative solution: Print the description before/after the `map()` call. I think the user could pass the `desc` parameter to `map` so that it can be displayed in the tqdm progress bar, as suggested by @cccntu. When there's no multiprocessing, the `desc` of the progress bar could be the `desc` passed by the user. In multiprocessing, we were already using a `desc` equal to `"#" + str(rank)`. We can change it to be `(desc or "") + "#" + str(rank)` instead. In the end, since both `desc` and `rank` could be None, we can have: ```python pbar_desc = (desc or "") + "#" + str(rank) if rank is not None else desc ``` Finally let's remember that if we add `desc` as a new parameter to `map`, we should add it to the `ignore_kwargs` list of the `@fingerprint_transform` decorator of `Dataset._map_single` since we don't want this parameter to affect the fingerprint of the resulting dataset.
[ -0.35430389642715454, 0.035919979214668274, -0.060533054172992706, -0.16903141140937805, 0.37444984912872314, -0.1667569875717163, 0.2543705105781555, 0.21774379909038544, -0.31043195724487305, 0.41625356674194336, 0.2674724757671356, 0.6729353070259094, -0.01825132593512535, 0.08399921655654907, -0.1400046944618225, 0.0010157190263271332, -0.22454014420509338, 0.2880352735519409, -0.1542479395866394, 0.17336054146289825, -0.3427260220050812, -0.012350792065262794, -0.1521167755126953, 0.3334888815879822, -0.13368728756904602, -0.24900832772254944, 0.018901584669947624, 0.0414581224322319, -0.0060933660715818405, -0.6088417768478394, -0.2313154935836792, 0.45724809169769287, -0.11924684792757034, 0.2423425018787384, -0.00011326630192343146, 0.04491748660802841, 0.3025873005390167, -0.009029615670442581, 0.034307654947042465, -0.08769512176513672, -0.23071864247322083, -0.20860207080841064, 0.20544911921024323, -0.5455308556556702, 0.0810965821146965, 0.008324491791427135, 0.07799377292394638, -0.2727372348308563, 0.24674594402313232, -0.28379005193710327, 0.22675324976444244, 0.32248252630233765, -0.49636372923851013, -0.1730300933122635, 0.0051278844475746155, -0.1487738937139511, -0.23550353944301605, -0.053883638232946396, 0.40616607666015625, -0.07878763228654861, -0.360576331615448, 0.546603262424469, 0.03312263637781143, 0.104872927069664, 0.042441241443157196, 0.0684082955121994, 0.9416400194168091, -0.31118714809417725, 0.21625995635986328, 0.5596242547035217, -0.002546161413192749, -0.4033753573894501, -0.29369601607322693, -0.12522102892398834, 0.10106894373893738, -0.23646801710128784, -0.19622668623924255, -0.13182342052459717, -0.4667764902114868, 0.0572199821472168, -0.6661197543144226, 0.2062956839799881, 0.0636746734380722, -0.17565985023975372, -0.16169175505638123, 0.13248205184936523, 0.14726869761943817, 0.17535433173179626, 0.04844856262207031, -0.0012471936643123627, -0.04124622792005539, 0.012126894667744637, 0.13330784440040588, 0.041992537677288055, -0.2462378293275833, -0.2159465253353119, 0.2609497308731079, -0.15061691403388977, 0.02857130393385887, 0.08382683992385864, -0.1659720540046692, 0.27157968282699585, -0.1430589258670807, 0.21271145343780518, 0.15330372750759125, -0.01970396190881729, 0.28405067324638367, -0.008547965437173843, 0.03918019309639931, -0.3217783272266388, -0.11404761672019958, 0.06315811723470688, 0.33797040581703186, -0.24103961884975433, 0.5201625823974609, 0.4561317265033722, -0.0073195528239011765, 0.05796479061245918, -0.06259217113256454, 0.10707204043865204, 0.26223161816596985, 0.19722998142242432, -0.05016379430890083, 0.5713627338409424, 0.27559787034988403, 0.237329363822937, 0.02706003189086914, -0.1368018388748169, 0.06554651260375977, -0.11946384608745575, -0.15158188343048096, -0.20821020007133484, -0.31674110889434814, 0.12127071619033813, -0.3725420832633972, 0.28934693336486816, 0.06227082014083862, -0.013281712308526039, 0.3908942937850952, 0.08477741479873657, -0.004631884396076202, -0.14389044046401978, 0.39792340993881226, 0.353449285030365, -0.08681873977184296, 0.17200161516666412, 0.1429452896118164, -0.0032617561519145966, -0.2947629988193512, 0.4820665717124939, 0.017781928181648254, -0.029886862263083458, -0.03258267045021057, 0.1280909925699234, 0.045773133635520935, 0.25333988666534424, -0.14171507954597473, 0.14083752036094666, 0.03594619035720825, 0.029706154018640518, 0.25861066579818726, -0.1777568757534027, -0.43169811367988586, -0.33066362142562866, 0.010628418996930122, 0.16769924759864807, -0.18428969383239746, -0.24010366201400757, -0.17030824720859528, -0.037363629788160324, 0.30538004636764526, -0.02561182528734207, -0.21768294274806976, 0.3224104344844818, -0.021451694890856743, 0.35703980922698975, 0.6694250106811523, -0.24942122399806976, -0.12314598262310028, 0.4696352481842041, -0.32378536462783813, -0.10443136096000671, 0.11160378158092499, 0.0702895000576973, 0.3541642725467682, 0.004136866424232721, -0.044022902846336365, -0.09036961197853088, -0.12121812999248505, 0.30559512972831726, -0.09652654826641083, -0.13119828701019287, 0.2252177596092224, 0.0808439701795578, 0.18009285628795624, 0.04322550445795059, -0.10034749656915665, -0.3944583833217621, 0.46905797719955444, -0.06870029866695404, 0.1408860683441162, 0.10587874799966812, 0.03645943105220795, -0.2742231488227844, -0.2740655839443207, -0.1592954695224762, -0.1313498616218567, 0.3375799357891083, -0.1488398313522339, 0.0257425494492054, -0.23760481178760529, -0.388797402381897, -0.1905226707458496, 0.23812390863895416, -0.04001922532916069, 0.0005908124148845673, 0.1616581529378891, -0.14339490234851837, -0.22475473582744598, -0.14662939310073853, -0.01022050529718399, -0.1418241411447525, -0.011647656559944153, -0.12842856347560883, 0.2948247790336609, 0.036309972405433655, 0.188272625207901, -0.18885840475559235, -0.07422299683094025, 0.09349977970123291, 0.1895999014377594, 0.09577319025993347, -0.15551835298538208, 0.41989830136299133, 0.018533838912844658, 0.16534721851348877, 0.04074786230921745, 0.12632639706134796, -0.08865232765674591, -0.1433205008506775, -0.05798359960317612, 0.18850721418857574, -0.061012785881757736, -0.06293164193630219, 0.023790981620550156, 0.5794563293457031, 0.06644284725189209, 0.3983500003814697, -0.012299250811338425, 0.17487603425979614, 0.18805429339408875, -0.18324671685695648, -0.09059759229421616, -0.14297448098659515, -0.011573303490877151, 0.4477980136871338, 0.3834441900253296, -0.16733619570732117, -0.2730867564678192, 0.304169625043869, 0.5254002213478088, 0.1387413889169693, -0.006868369877338409, -0.0814468041062355, -0.17990431189537048, 0.28211143612861633, 0.14811666309833527, 0.018023516982793808, 0.17942874133586884, 0.33647212386131287, 0.10172029584646225, 0.10563589632511139, -0.15938811004161835, -0.02377399243414402, 0.07491789013147354, 0.030105087906122208, -0.00552168395370245, 0.01641744375228882, -0.05899542570114136, -0.14413964748382568, -0.08189330995082855, -0.25589871406555176, 0.06439576297998428, 0.06886444985866547, -0.2571945786476135, -0.0724460706114769, -0.05043472349643707, -0.08118712902069092, 0.01477920450270176, -0.19269859790802002, -0.043297652155160904, -0.41020989418029785, 0.16133584082126617, 0.03978382796049118, -0.2512665092945099, 0.4082573354244232, -0.0590762197971344, -0.20165739953517914, 0.19458913803100586, -0.09014451503753662, -0.08860259503126144, -0.3783824145793915, 0.18009138107299805, 0.016342099756002426, 0.10178420692682266, 0.010113192722201347, 0.3469293415546417, 0.016898972913622856, 0.14990709722042084, -0.21272335946559906, 0.019614525139331818, 0.05173260718584061, -0.1476738303899765, -0.03388982266187668, 0.07204708456993103, 0.22883614897727966, -0.2756093144416809, 0.1529303938150406, 0.24525226652622223, -0.2540288269519806, -0.11786497384309769, 0.05624929070472717, 0.14320310950279236, -0.03209349513053894, -0.27217358350753784, 0.149070143699646, -0.1415090411901474, -0.3524089753627777, 0.07915841788053513, -0.3988300561904907, 0.3791472315788269, -0.006454666145145893, -0.13703608512878418, 0.035149138420820236, 0.02232481725513935, -0.21526305377483368, -0.0719892829656601, -0.4446084499359131, 0.0634603425860405, -0.10083302110433578, -0.07321988046169281, -0.018656142055988312, 0.020743612200021744, 0.11502382159233093, 0.015026991255581379, -0.11339512467384338, -0.5253039002418518, -0.13968133926391602, 0.43271490931510925, -0.20146599411964417, -0.1334904581308365, 0.5469972491264343, 0.1849726438522339, -0.26857349276542664, -0.015079613775014877, -0.2984201908111572, 0.03383290767669678, 0.15087762475013733, 0.002323724329471588, -0.2157328724861145, 0.1579720675945282, -0.017331503331661224, 0.7264468669891357, 0.29102250933647156, -0.12672072649002075, -0.11478316783905029, -0.19624760746955872, 0.11064711958169937, 0.13178963959217072, -0.029017604887485504, -0.47551366686820984, -0.03745849430561066, -0.09404945373535156, 0.10276101529598236, -0.27093374729156494, -0.0640760064125061, 0.24854862689971924, 0.4160202443599701, -0.412084698677063, -0.3575229048728943, 0.11757349222898483, -0.3366905450820923, 0.22499117255210876, -0.3050576150417328, 0.2969428300857544, -0.11494338512420654, 0.12094687670469284, 0.012109208852052689, 0.24404390156269073, 0.10888873785734177, -0.29965370893478394, 0.0664752870798111, 0.014817725867033005, -0.37536486983299255, 0.26001423597335815, 0.193579763174057, -0.01399992872029543, -0.12858499586582184, -0.05220958590507507, 0.23728051781654358, 0.08445174247026443, 0.3091477155685425, -0.5974330306053162, 0.19051793217658997, 0.40916118025779724, -0.29033270478248596, -0.26866066455841064, 0.07443621754646301, -0.09347111731767654, 0.2835864722728729, 0.19285249710083008, 0.23234069347381592, -0.29175254702568054, -0.08166307210922241, -0.2049189954996109, -0.24622760713100433, -0.3318460285663605, -0.22685834765434265, -0.28256139159202576, -0.06737495213747025, -0.10567892342805862, 0.32894206047058105, 0.10572301596403122, -0.09313909709453583, -0.11216196417808533, -0.1835073083639145, 0.08507995307445526, -0.12896215915679932, 0.008907347917556763, 0.4399092197418213, 0.2581614851951599, 0.09575498104095459, 0.023138269782066345, 0.0018134750425815582, 0.02947176992893219, -0.2969568073749542, 0.2772448658943176, -0.07371510565280914, -0.05480851233005524, 0.11601671576499939, -0.10620534420013428, 0.37905824184417725, 0.46807989478111267, 0.020990941673517227, 0.4216799736022949, -0.08770839124917984, 0.35333794355392456, -0.2584060728549957, 0.25602659583091736, 0.07468229532241821, -0.20128585398197174, -0.1703723967075348, -0.1626453399658203, 0.38174501061439514, -0.0297061949968338, -0.27174192667007446, 0.19867366552352905, -0.2033969610929489, -0.1684940904378891, 0.008961912244558334, 0.22840940952301025, 1.0989409685134888, -0.6049193143844604, -0.06319181621074677, -0.3199732005596161, -0.12959685921669006, -0.19323760271072388, 0.16193564236164093, -0.14547546207904816, -0.3798649311065674, -0.09587793797254562, -0.044643327593803406, -0.12037444114685059, 0.1903117597103119, 0.22284933924674988, -0.4763146638870239, 0.04531100392341614, 0.08267702162265778, -0.015816792845726013, -0.05379730463027954, 0.08571988344192505, 0.22676877677440643, -0.5300148725509644, -0.26727601885795593, 0.0878039076924324, -0.0031317658722400665, -0.40762877464294434, -0.11083348840475082, -0.13810423016548157, 0.10120745003223419, 0.0013530142605304718, -0.20484831929206848, -0.1415642499923706, -0.5126555562019348, -0.0310579352080822, 0.022397171705961227, -0.28065311908721924, -0.0010204222053289413, -0.0021846815943717957, 0.0012873485684394836, 0.13480855524539948, -0.07371792197227478, 0.20515812933444977, 0.03283093497157097, 0.49956968426704407, -0.03958288952708244, -0.03461204096674919, 0.32749032974243164, 0.043050944805145264, -0.1543298363685608, 0.46004071831703186, -0.08859487622976303, -0.3783004879951477, -0.08805926889181137, 0.1505744904279709, 0.08951239287853241, 0.10454755276441574, 0.4316309690475464, 0.07056638598442078, 0.10727275907993317, -0.17736554145812988, 0.10752543807029724, 0.32973378896713257, -0.3013535737991333, 0.46648699045181274, 0.15095119178295135, -0.39719751477241516, 0.1685272455215454, 0.040090326219797134, 0.07155206054449081, 0.3789880573749542, 0.2130921483039856, -0.32001471519470215, -0.1801006942987442, -0.3070731461048126, 0.09815549105405807, -0.005128506571054459, -0.004761651158332825, 0.28172191977500916, 0.09221299737691879, 0.1112038642168045, 0.08243022114038467, 0.38291528820991516, -0.1607070416212082, 0.12880171835422516, -0.4710474908351898, -0.08618439733982086, -0.39926618337631226, -0.002344787120819092, -0.22320790588855743, 0.255808562040329, -0.16036173701286316, 0.7003139853477478, 0.08328115195035934, 0.27386200428009033, -0.3663797378540039, -0.25547343492507935, -0.45812568068504333, 0.39759305119514465, 0.14947454631328583, 0.171120285987854, 0.041752513498067856, -0.08950378000736237, 0.027585914358496666, 0.3001735806465149, -0.5012285709381104, -0.2796921730041504, -0.14677868783473969, 0.14853684604167938, 0.07189441472291946, 0.32118481397628784, 0.01044239941984415, 0.1530551314353943, 0.10071781277656555, -0.14857283234596252, 0.2995370626449585, 0.1371568739414215, -0.12627741694450378, 0.24343587458133698, 0.1613571047782898, 0.2583529055118561, -0.16146278381347656, -0.06586461514234543, 0.04883786290884018, 0.3448447287082672, -0.1857880800962448, 0.09289513528347015, -0.017729034647345543, 0.08145004510879517, 0.4266798794269562, 0.01634765788912773, 0.2751745879650116, 0.07508119940757751, 0.024607159197330475, 0.20151790976524353, 0.12300539016723633, -0.03353754058480263, 0.23133617639541626, -0.09556436538696289, -0.2803131341934204, -0.22497093677520752, 0.2154684066772461, 0.2163047343492508, -0.17000751197338104, 0.17589084804058075, 0.13570840656757355, -0.10213078558444977, 0.35647282004356384, 0.3878488838672638, 0.022943247109651566, 0.20967906713485718, 0.2662770748138428, -0.09071085602045059, -0.12202604860067368, -0.40077370405197144, -0.05654808506369591, 0.25150424242019653, 0.1686187982559204, 0.2333993911743164, 0.5188537240028381, 0.2669457793235779, 0.06284795701503754, 0.31217432022094727, 0.0969323143362999, 0.7731798887252808, 0.03558613359928131, -0.22807854413986206, -0.10630805045366287, 0.07787959277629852, 0.17724135518074036, 0.0026592612266540527, -0.009082682430744171, 0.25264522433280945, 0.12824338674545288, 0.16096904873847961, -0.249372199177742, -0.1211346685886383, -0.19300901889801025, 0.17436473071575165, -0.11438900977373123, -0.24444171786308289, 0.2082289159297943, 0.07027635723352432, -0.11699557304382324, -0.11880633234977722, 0.17326191067695618, 0.020639996975660324, 0.7649599313735962, -0.07204943895339966, 0.3239462971687317, -0.014843765646219254, -0.439348429441452, -0.05214356631040573, 0.2582204341888428, -0.40024176239967346, -0.1658608764410019, -0.14965306222438812, 0.2773957848548889, 0.21872784197330475, 0.35266822576522827, 0.10833843052387238, 0.1462211310863495, -0.39003607630729675, -0.05914761498570442, -0.09798301756381989, 0.12339982390403748, -0.0057191625237464905, -0.13465946912765503, -0.018647924065589905, -0.05860527977347374, 0.3146677315235138, 0.11233702301979065, -0.16522341966629028, 0.027472365647554398, 0.14352795481681824, 0.36738869547843933, -0.0919065922498703, 0.4869937002658844, 0.1941065639257431, -0.13556762039661407, 0.04839470982551575, -0.03338427096605301, -0.2675366997718811, -0.14289748668670654, 0.32065242528915405, -0.4000178873538971, 0.05881921947002411, -0.2263057380914688, 0.10199828445911407, 0.05968689173460007, 0.3621262311935425, 0.1174304261803627, 0.07237964868545532, -0.4723441004753113, -0.23494809865951538, -0.6552361249923706, 0.011401362717151642, -0.07699483633041382, -0.293052077293396, 0.16415418684482574, 0.20583494007587433, 0.005146987736225128, 0.36401259899139404, 0.4453578591346741, -0.24346017837524414, -0.19437675178050995, 0.24422094225883484, -0.3748539388179779, 0.0006776824593544006, 0.0834982767701149, -0.26161837577819824, 0.11323903501033783, -0.26401039958000183, 0.08541082590818405, 0.29797905683517456, 0.14508110284805298, 0.09148727357387543, -0.024064574390649796, 0.19539645314216614, 0.3445810079574585, 0.4567998945713043, -0.13066895306110382, 0.30795520544052124, -0.12574851512908936, 0.2529365122318268, 0.35776594281196594, 0.0457695908844471, -0.07508446276187897, 0.05228579044342041, 0.14102104306221008, 0.3408608138561249, 0.027918918058276176, -0.045230086892843246, -0.1750469207763672, -0.14576485753059387, 0.05758724361658096, -0.18900436162948608, -0.15554022789001465, 0.054809845983982086, -0.019832447171211243, 0.13721472024917603, -0.3962382376194, 0.0775618851184845, 0.26722264289855957, 0.41949689388275146, -0.18728387355804443, -0.6303864121437073, 0.2855833172798157, -0.20997615158557892, -0.6549609899520874, 0.006931479088962078, 0.2808077931404114, -0.5046140551567078, 0.14856648445129395, -0.7743091583251953, -0.0654679387807846, 0.1463041603565216, 0.10206455737352371, -0.15463128685951233, 0.1827254444360733, -0.5004355311393738, -0.09181289374828339, -0.17534172534942627, 0.11034772545099258, -0.011100787669420242, 0.009123371914029121, -0.3428892195224762, -0.33612895011901855 ]
https://github.com/huggingface/datasets/issues/2327
A syntax error in example
cc @beurkinger but I think this has been fixed internally and will soon be updated right ?
![image](https://user-images.githubusercontent.com/6883957/117315905-b47a5c00-aeba-11eb-91eb-b2a4a0212a56.png) Sorry to report with an image, I can't find the template source code of this snippet.
17
A syntax error in example ![image](https://user-images.githubusercontent.com/6883957/117315905-b47a5c00-aeba-11eb-91eb-b2a4a0212a56.png) Sorry to report with an image, I can't find the template source code of this snippet. cc @beurkinger but I think this has been fixed internally and will soon be updated right ?
[ 0.07156382501125336, -0.49510711431503296, -0.1797279417514801, -0.1540897935628891, 0.07747288048267365, -0.2150438129901886, 0.19750051200389862, 0.2825201451778412, -0.3641226291656494, 0.16879162192344666, 0.2558266818523407, 0.39970430731773376, 0.052938658744096756, 0.003908360376954079, 0.012435651384294033, -0.19997432827949524, 0.07288534939289093, 0.2567007839679718, 0.09480197727680206, 0.08978493511676788, -0.14153072237968445, 0.46162712574005127, -0.20606544613838196, 0.18989765644073486, -0.1933688521385193, -0.03796529024839401, 0.03171387314796448, 0.3373529016971588, -0.22730094194412231, -0.04700364172458649, 0.00109136663377285, 0.06417760252952576, -0.111503005027771, 0.03193230181932449, -0.0000933616902329959, 0.057327061891555786, 0.4510405659675598, -0.04771779477596283, -0.061772752553224564, -0.09620152413845062, -0.30832040309906006, 0.15017594397068024, -0.09740420430898666, -0.2114114761352539, -0.2634439170360565, -0.0932578518986702, 0.1575712263584137, 0.22519981861114502, 0.6356449723243713, 0.1518201231956482, 0.4007505774497986, -0.08715008944272995, 0.03720705583691597, -0.296317458152771, 0.19523277878761292, 0.1279035061597824, -0.04930830001831055, -0.0032208655029535294, 0.39667704701423645, -0.05207693576812744, 0.3011016249656677, 0.706695020198822, 0.14915594458580017, -0.06173667684197426, 0.1567123830318451, -0.06425692141056061, 0.09010590612888336, -0.1462889015674591, 0.11064819246530533, 0.2388547658920288, 0.19582602381706238, -0.004170846194028854, -0.02736022137105465, 0.19463711977005005, -0.2383275330066681, 0.05820475518703461, 0.1045202687382698, 0.11315202713012695, -0.0325612798333168, 0.16287153959274292, -0.1777629554271698, -0.33886539936065674, -0.4302212595939636, 0.07632135599851608, 0.1298827975988388, 0.1238822340965271, -0.27092841267585754, -0.08482206612825394, -0.07504072785377502, -0.07334116101264954, 0.06907998770475388, -0.09479782730340958, -0.17556612193584442, 0.032807283103466034, 0.3898116648197174, 0.033638037741184235, 0.263638973236084, -0.16647779941558838, 0.09073023498058319, 0.20936790108680725, 0.3645385503768921, 0.16178575158119202, 0.044567666947841644, 0.48415571451187134, -0.05986405536532402, -0.217721089720726, 0.10924120247364044, 0.09528788924217224, 0.2170196920633316, 0.24891437590122223, 0.19880348443984985, -0.1722971796989441, -0.20234742760658264, -0.44757598638534546, -0.17216812074184418, -0.019573789089918137, 0.1949792355298996, 0.07560750842094421, -0.021351536735892296, -0.13400545716285706, 0.04168497025966644, 0.03112983889877796, -0.05215844884514809, 0.2935713827610016, 0.28620225191116333, -0.26189124584198, 0.22293688356876373, -0.07315472513437271, -0.08399736881256104, -0.23749150335788727, -0.36686480045318604, 0.43445417284965515, -0.3073205351829529, -0.38179945945739746, -0.20561543107032776, -0.09994366765022278, 0.17979520559310913, 0.0794074758887291, 0.3844330310821533, -0.1954488307237625, 0.26935940980911255, 0.12350393831729889, 0.1823211908340454, 0.04056261479854584, -0.061338867992162704, -0.03780341148376465, 0.1874406933784485, -0.1407771110534668, 0.06339829415082932, 0.24036821722984314, -0.3574053943157196, 0.019871357828378677, -0.35016611218452454, 0.32570022344589233, 0.007102206349372864, 0.0871218740940094, -0.0016000792384147644, 0.1873684972524643, 0.2495841085910797, -0.017471762374043465, 0.07236047089099884, -0.07973931729793549, 0.004985589534044266, -0.18127760291099548, 0.03135344386100769, 0.1445378065109253, -0.10010199248790741, -0.02821117267012596, 0.0006584306247532368, -0.1491847187280655, 0.12897540628910065, 0.10016752779483795, -0.08553722500801086, 0.21905291080474854, -0.34499114751815796, 0.3650204539299011, 0.18839824199676514, -0.22180548310279846, 0.25691258907318115, 0.33054786920547485, -0.08984025567770004, -0.17624011635780334, -0.13852986693382263, -0.18381191790103912, -0.002771494910120964, -0.042413633316755295, -0.07613441348075867, 0.23000064492225647, 0.08003976196050644, 0.17932653427124023, -0.21262256801128387, 0.09473027288913727, -0.18675187230110168, -0.07178756594657898, -0.006120271980762482, -0.07825518399477005, 0.11668255925178528, 0.30369582772254944, 0.16523277759552002, -0.31827911734580994, -0.06936153769493103, 0.14383327960968018, 0.4180041551589966, -0.16718915104866028, 0.010069241747260094, 0.040981702506542206, 0.1267266720533371, -0.1673317849636078, -0.23092295229434967, 0.016776636242866516, -0.021233491599559784, 0.14634335041046143, -0.2395852506160736, -0.08002076297998428, -0.13422735035419464, -0.31199198961257935, 0.4072883129119873, 0.010612346231937408, -0.016910495236516, -0.18347114324569702, 0.021590840071439743, 0.013352684676647186, -0.20491860806941986, -0.03221819922327995, 0.02539968304336071, 0.04933444410562515, -0.3071590065956116, -0.07332555204629898, 0.03610934317111969, -0.25488778948783875, 0.024567358195781708, -0.10947375744581223, -0.1592317521572113, 0.444205105304718, 0.14132820069789886, 0.041452839970588684, -0.015219636261463165, 0.01024511456489563, -0.09014687687158585, -0.5474367141723633, -0.0892878845334053, 0.11338484287261963, 0.06389522552490234, -0.03888680040836334, -0.23138681054115295, 0.17928309738636017, 0.13700668513774872, -0.08500885218381882, 0.1044764369726181, 0.06206461787223816, 0.04352618753910065, 0.04700738564133644, -0.08100894838571548, -0.15321843326091766, -0.06859759986400604, 0.19449232518672943, -0.06539402157068253, -0.31095847487449646, -0.3392186760902405, -0.08844511955976486, 0.203523650765419, 0.03683345392346382, 0.20948562026023865, 0.08640745282173157, 0.11188937723636627, -0.048087045550346375, 0.13303522765636444, -0.1928911954164505, 0.009098060429096222, 0.1427800953388214, -0.09945659339427948, -0.030784403905272484, 0.07927271723747253, -0.3007699251174927, 0.3233332931995392, 0.11790435761213303, 0.13921861350536346, -0.09681303054094315, 0.0771729126572609, -0.1826913058757782, -0.256714791059494, -0.15863551199436188, -0.11801188439130783, -0.09274157136678696, -0.17038361728191376, 0.2097698152065277, -0.19078487157821655, -0.22858107089996338, 0.005440481938421726, 0.12159424275159836, -0.004311468452215195, -0.2447487711906433, 0.367456316947937, -0.017962422221899033, -0.174717515707016, 0.27532297372817993, 0.18645671010017395, 0.12156938761472702, 0.05656733363866806, 0.23792028427124023, -0.2804917097091675, 0.025879332795739174, -0.13762107491493225, 0.3204860985279083, 0.0677378922700882, -0.23995482921600342, 0.15885332226753235, -0.17850840091705322, 0.21509937942028046, -0.19114252924919128, -0.6027466654777527, 0.26688724756240845, 0.07936935126781464, 0.14505979418754578, 0.3221101760864258, 0.23251135647296906, -0.09926033020019531, 0.12945808470249176, 0.34993600845336914, -0.07398682087659836, -0.22065424919128418, 0.009632369503378868, 0.032422516494989395, -0.06437986344099045, -0.4315512180328369, 0.22533085942268372, 0.1619844287633896, -0.2519223690032959, -0.11344529688358307, 0.20325429737567902, 0.20855246484279633, 0.4996030032634735, 0.5264032483100891, 0.12378369271755219, -0.11645098775625229, 0.03993266075849533, 0.0033893573563545942, -0.31515443325042725, 0.17252525687217712, -0.34556278586387634, -0.28908607363700867, -0.17125903069972992, 0.09847273677587509, 0.17686624825000763, -0.1460031270980835, 0.05233252793550491, -0.389400452375412, 0.09248291701078415, -0.05565245449542999, -0.07452580332756042, -0.01149398647248745, -0.054732516407966614, -0.012913119047880173, -0.418771356344223, -0.5239930152893066, 0.16944687068462372, 0.15386530756950378, -0.37898048758506775, 0.1989578902721405, 0.06110898032784462, -0.08755698800086975, 0.24419081211090088, 0.4768982529640198, 0.042433205991983414, -0.07118946313858032, 0.2790893316268921, 0.004155181348323822, 0.3523951768875122, -0.023396700620651245, 0.11909064650535583, 0.20662899315357208, 0.36363548040390015, -0.018283048644661903, 0.14486634731292725, -0.023682210594415665, -0.07881222665309906, -0.04081370308995247, -0.013891823589801788, -0.18678975105285645, 0.07395781576633453, -0.007072059437632561, 0.32635390758514404, 0.07986313849687576, 0.09564758837223053, 0.02136332541704178, 0.12004320323467255, 0.21294677257537842, 0.18820877373218536, 0.3878164291381836, 0.2118503451347351, -0.023310385644435883, -0.04695077985525131, -0.18433886766433716, 0.09232895076274872, 0.16108906269073486, 0.10995178669691086, -0.15533703565597534, -0.11775612831115723, -0.2147226333618164, 0.06111406162381172, -0.31693893671035767, 0.40800321102142334, -0.2792225182056427, -0.16371528804302216, 0.13213586807250977, -0.09950961917638779, 0.06269469857215881, -0.058376092463731766, -0.2980414032936096, 0.39894726872444153, 0.17358680069446564, 0.09620323777198792, -0.15659786760807037, -0.06326630711555481, 0.065225750207901, -0.5374464392662048, -0.16478046774864197, 0.05017906427383423, -0.004447218030691147, -0.26462653279304504, -0.3756539225578308, -0.20797666907310486, 0.23887430131435394, -0.010698629543185234, 0.23181304335594177, -0.16140833497047424, 0.03565755859017372, -0.06718713045120239, -0.1758168488740921, 0.2079932540655136, 0.17051303386688232, -0.24785618484020233, -0.25055041909217834, -0.17061938345432281, -0.06738258898258209, 0.14987772703170776, -0.04243326187133789, -0.033712323755025864, 0.04047934710979462, 0.062447626143693924, -0.08817636221647263, 0.13363124430179596, 0.18851324915885925, -0.31400972604751587, -0.2016717791557312, -0.04431101679801941, 0.178208589553833, 0.16437992453575134, 0.02130371704697609, 0.1333988755941391, 0.1246832087635994, 0.032336827367544174, -0.2460220754146576, 0.2191874384880066, 0.09459330141544342, 0.03959833085536957, 0.2605471909046173, -0.032881684601306915, -0.21001726388931274, -0.0165724977850914, 0.26355522871017456, 0.8582578301429749, 0.2074979543685913, 0.04278481751680374, 0.21827927231788635, -0.2088032215833664, 0.18989704549312592, -0.09010674804449081, -0.0922134518623352, -0.35570213198661804, -0.09088753908872604, 0.06975486129522324, -0.14544786512851715, 0.12784549593925476, 0.10651174187660217, -0.09653035551309586, -0.14282561838626862, -0.2703925371170044, 0.18383283913135529, 0.010438944213092327, -0.024232110008597374, 0.15295173227787018, 0.07009347528219223, 0.0235539972782135, 0.3410840928554535, 0.06844641268253326, 0.02546963468194008, -0.28679588437080383, -0.3670869469642639, -0.18073949217796326, -0.39888155460357666, -0.2417755126953125, 0.32321059703826904, -0.11627263575792313, 0.19796158373355865, 0.30242955684661865, -0.1681700348854065, 0.0923658013343811, -0.14752356708049774, 0.023821227252483368, 0.05032069981098175, -0.2876911163330078, 0.36864858865737915, 0.29295966029167175, -0.1519894152879715, -0.30818143486976624, 0.3480052649974823, 0.21040698885917664, -0.39646002650260925, 0.14990127086639404, 0.10321122407913208, 0.07110797613859177, 0.0543963760137558, -0.3257025480270386, -0.08797615766525269, -0.048291534185409546, 0.046583596616983414, -0.24560841917991638, -0.03585479408502579, -0.25665754079818726, -0.3148046135902405, 0.3563576936721802, 0.13712114095687866, -0.1007087305188179, -0.17449870705604553, 0.3137005567550659, 0.018247611820697784, 0.18776942789554596, -0.03608276695013046, -0.04640430212020874, -0.06684118509292603, 0.13938263058662415, 0.21386699378490448, -0.2586382329463959, -0.35674628615379333, -0.05809060111641884, -0.14548859000205994, -0.3680631220340729, 0.355561763048172, -0.12438338249921799, -0.15833152830600739, -0.176283061504364, 0.329870343208313, 0.00423082709312439, 0.1877347081899643, 0.030169453471899033, -0.06215571612119675, 0.03451187163591385, -0.033037036657333374, -0.5213062763214111, 0.26177212595939636, -0.18928483128547668, 0.15114180743694305, 0.3945092260837555, -0.08113101124763489, -0.5572288036346436, 0.02856186032295227, -0.09014692902565002, -0.0746215209364891, 0.008112112991511822, 0.052741046994924545, 0.050455328077077866, 0.024988818913698196, 0.261666864156723, 0.34523826837539673, -0.2784819006919861, -0.41862723231315613, -0.1332176774740219, 0.08514891564846039, 0.05559929087758064, -0.1165202185511589, 0.3011629581451416, 0.37882083654403687, -0.21207335591316223, 0.05498047545552254, -0.03225468099117279, -0.2884771227836609, 0.09116850048303604, 0.13088105618953705, 0.029463354498147964, -0.11450181156396866, 0.3699077367782593, -0.24535828828811646, 0.2558152377605438, 0.3970491290092468, -0.11663982272148132, -0.08594544231891632, -0.013186953030526638, -0.31085190176963806, 0.250620573759079, 0.1698591560125351, 0.11494380980730057, 0.2961704730987549, 0.04019404202699661, -0.14457689225673676, 0.1179862767457962, -0.2378503978252411, 0.17965443432331085, -0.07051409780979156, -0.4775746166706085, 0.049994051456451416, -0.1605372428894043, 0.37344443798065186, -0.23969610035419464, 0.08755404502153397, 0.025952991098165512, 0.05507858470082283, 0.02773088589310646, 0.14271359145641327, -0.1049509048461914, 0.05200211703777313, -0.0014738664031028748, 0.17255336046218872, 0.07753542810678482, -0.24659962952136993, -0.04302728921175003, 0.19769126176834106, -0.25947126746177673, 0.1988375186920166, 0.0102924183011055, 0.1281139850616455, 0.1632467806339264, 0.35428380966186523, -0.08410780876874924, 0.062463320791721344, 0.1840747892856598, 0.051162950694561005, 0.31456029415130615, -0.06676845252513885, -0.07322464883327484, 0.19281139969825745, 0.43728598952293396, 0.31215807795524597, 0.07450125366449356, 0.08638095110654831, 0.46014681458473206, 0.1916150599718094, 0.024633115157485008, 0.3168790340423584, 0.0409524068236351, -0.15028546750545502, -0.39624300599098206, -0.05349614471197128, -0.34507882595062256, -0.2443109005689621, 0.03853984177112579, 0.06609736382961273, 0.20231810212135315, -0.06111595034599304, 0.05339738726615906, -0.03269004821777344, -0.00498054176568985, -0.033728912472724915, 0.0840255469083786, -0.34945961833000183, 0.26074516773223877, 0.11908300220966339, -0.0260092094540596, 0.12183700501918793, 0.21616604924201965, 0.571327269077301, 0.2512049078941345, 0.17278710007667542, -0.2073773294687271, -0.1644156575202942, -0.15530966222286224, 0.1315278708934784, 0.007102493196725845, 0.09518607705831528, -0.09034538269042969, 0.24186746776103973, 0.30232930183410645, -0.3576979637145996, 0.21530747413635254, 0.18498468399047852, -0.008501702919602394, 0.009510720148682594, -0.0305112823843956, -0.19852158427238464, -0.04816501587629318, -0.3636628985404968, 0.019319862127304077, -0.42573362588882446, -0.1030876561999321, 0.09754575788974762, 0.11034268140792847, -0.055046431720256805, 0.004438499920070171, 0.1791219860315323, 0.1831061691045761, 0.3706062436103821, 0.062400881201028824, 0.1879453957080841, -0.061824552714824677, -0.37388622760772705, -0.11206552386283875, 0.2231789231300354, -0.23633119463920593, -0.18322066962718964, 0.07119973748922348, 0.21329113841056824, 0.04347483068704605, -0.010412946343421936, 0.34752726554870605, 0.2639901340007782, -0.035209719091653824, 0.28555408120155334, -0.27706632018089294, 0.12656661868095398, 0.12735293805599213, -0.17645767331123352, 0.20802831649780273, -0.12526731193065643, 0.025298085063695908, -0.07868901640176773, 0.3584909439086914, -0.1522982120513916, -0.18297582864761353, -0.10088758170604706, -0.07521623373031616, 0.28101417422294617, 0.011712422594428062, -0.20903372764587402, -0.30996614694595337, -0.2741803824901581, 0.14195197820663452, -0.1518731266260147, -0.20743604004383087, 0.43171605467796326, 0.18177956342697144, 0.1159692257642746, 0.08780363202095032, -0.37825480103492737, -0.285450279712677, 0.02644684910774231, -0.1224934384226799, -0.20014730095863342, -0.26726847887039185, 0.17956368625164032, -0.15533378720283508, 0.033318858593702316, -0.16677801311016083, -0.043122388422489166, -0.16268955171108246, -0.2106926441192627, -0.4100953936576843, -0.6633718013763428, 0.5129122138023376, -0.38691359758377075, -0.3491474986076355, 0.19150453805923462, 0.0613829679787159, -0.05747198313474655, -0.11366517096757889, -0.22720277309417725, 0.17055246233940125, 0.19556650519371033, 0.05861809849739075, -0.11758372187614441, 0.1158122718334198, 0.1681639552116394, 0.06100275740027428, -0.017745453864336014, 0.08515956252813339, 0.2769681215286255, -0.1020570769906044, -0.1372489184141159, -0.34008967876434326 ]
https://github.com/huggingface/datasets/issues/2323
load_dataset("timit_asr") gives back duplicates of just one sample text
Thanks @ekeleshian for having reported. I am closing this issue once that you updated `datasets`. Feel free to reopen it if the problem persists.
## Describe the bug When you look up on key ["train"] and then ['text'], you get back a list with just one sentence duplicated 4620 times. Namely, the sentence "Would such an act of refusal be useful?". Similarly when you look up ['test'] and then ['text'], the list is one sentence repeated "The bungalow was pleasantly situated near the shore." 1680 times. I tried to work around the issue by downgrading to datasets version 1.3.0, inspired by [this post](https://www.gitmemory.com/issue/huggingface/datasets/2052/798904836) and removing the entire huggingface directory from ~/.cache, but I still get the same issue. ## Steps to reproduce the bug ```python from datasets import load_dataset timit = load_dataset("timit_asr") print(timit['train']['text']) print(timit['test']['text']) ``` ## Expected Result Rows of diverse text, like how it is shown in the [wav2vec2.0 tutorial](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_tuning_Wav2Vec2_for_English_ASR.ipynb) <img width="485" alt="Screen Shot 2021-05-05 at 9 09 57 AM" src="https://user-images.githubusercontent.com/33647474/117146094-d9b77f00-ad81-11eb-8306-f281850c127a.png"> ## Actual results Rows of repeated text. <img width="319" alt="Screen Shot 2021-05-05 at 9 11 53 AM" src="https://user-images.githubusercontent.com/33647474/117146231-f8b61100-ad81-11eb-834a-fc10410b0c9c.png"> ## Versions - Datasets: 1.3.0 - Python: 3.9.1 - Platform: macOS-11.2.1-x86_64-i386-64bit}
24
load_dataset("timit_asr") gives back duplicates of just one sample text ## Describe the bug When you look up on key ["train"] and then ['text'], you get back a list with just one sentence duplicated 4620 times. Namely, the sentence "Would such an act of refusal be useful?". Similarly when you look up ['test'] and then ['text'], the list is one sentence repeated "The bungalow was pleasantly situated near the shore." 1680 times. I tried to work around the issue by downgrading to datasets version 1.3.0, inspired by [this post](https://www.gitmemory.com/issue/huggingface/datasets/2052/798904836) and removing the entire huggingface directory from ~/.cache, but I still get the same issue. ## Steps to reproduce the bug ```python from datasets import load_dataset timit = load_dataset("timit_asr") print(timit['train']['text']) print(timit['test']['text']) ``` ## Expected Result Rows of diverse text, like how it is shown in the [wav2vec2.0 tutorial](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_tuning_Wav2Vec2_for_English_ASR.ipynb) <img width="485" alt="Screen Shot 2021-05-05 at 9 09 57 AM" src="https://user-images.githubusercontent.com/33647474/117146094-d9b77f00-ad81-11eb-8306-f281850c127a.png"> ## Actual results Rows of repeated text. <img width="319" alt="Screen Shot 2021-05-05 at 9 11 53 AM" src="https://user-images.githubusercontent.com/33647474/117146231-f8b61100-ad81-11eb-834a-fc10410b0c9c.png"> ## Versions - Datasets: 1.3.0 - Python: 3.9.1 - Platform: macOS-11.2.1-x86_64-i386-64bit} Thanks @ekeleshian for having reported. I am closing this issue once that you updated `datasets`. Feel free to reopen it if the problem persists.
[ 0.28218817710876465, -0.4890296459197998, 0.06362934410572052, 0.38354915380477905, 0.15507659316062927, 0.00932159274816513, 0.20255108177661896, 0.19717799127101898, -0.19604356586933136, 0.022564098238945007, -0.05378630757331848, 0.2588164806365967, -0.060761094093322754, -0.0019162744283676147, 0.1897573620080948, 0.0341101810336113, 0.1301133781671524, -0.003951214253902435, -0.08558513224124908, -0.21644318103790283, -0.03497179597616196, 0.5018298029899597, -0.1255064755678177, 0.039625488221645355, -0.3864384889602661, 0.08966562151908875, -0.22561822831630707, 0.09544055163860321, 0.02748948708176613, -0.4388810992240906, 0.20159786939620972, 0.25627976655960083, 0.007661217823624611, 0.17433318495750427, -0.00012940616579726338, -0.12382075935602188, 0.10333597660064697, 0.19669708609580994, -0.2948184609413147, -0.33761417865753174, 0.037145353853702545, -0.008201908320188522, 0.47654956579208374, 0.058815352618694305, -0.14463111758232117, -0.12299517542123795, 0.046137601137161255, -0.09110318124294281, 0.5953752398490906, 0.05308598652482033, 0.05547589808702469, -0.021303409710526466, -0.2731776237487793, -0.15022115409374237, 0.3001249134540558, 0.1408754140138626, 0.036184683442115784, 0.0638972595334053, 0.2574382722377777, 0.0740024670958519, 0.0937068983912468, 0.40736719965934753, -0.26146432757377625, 0.08036492019891739, 0.020191945135593414, 0.2505538761615753, -0.35216033458709717, -0.2842363119125366, 0.15673664212226868, 0.38189101219177246, 0.4144079089164734, -0.19498717784881592, -0.2438044548034668, -0.5332135558128357, 0.16194353997707367, 0.05395200103521347, 0.159735769033432, -0.0827350914478302, -0.2399926781654358, 0.13232778012752533, -0.27216973900794983, -0.02740335278213024, -0.00444997102022171, 0.0038484781980514526, 0.10316669940948486, -0.2842695116996765, -0.1285124123096466, 0.16184887290000916, 0.3656547963619232, -0.03831219673156738, -0.0753810703754425, -0.020119812339544296, -0.0413331501185894, 0.1814565658569336, -0.4986146092414856, 0.030070997774600983, 0.02702997997403145, -0.061234064400196075, 0.25116685032844543, 0.016116619110107422, 0.43275460600852966, -0.057935915887355804, -0.1301831156015396, -0.07730045169591904, 0.4126265048980713, 0.37753021717071533, 0.07272455096244812, -0.09546777606010437, 0.009243492037057877, -0.11860811710357666, -0.20985297858715057, 0.040331579744815826, -0.011101800948381424, 0.16108503937721252, 0.09674349427223206, -0.25852733850479126, 0.3425217270851135, -0.36904653906822205, -0.4510841965675354, 0.07068992406129837, -0.5093221664428711, -0.12097179144620895, -0.16022475063800812, 0.093509241938591, 0.13738562166690826, 0.38139933347702026, 0.18671827018260956, 0.14621073007583618, -0.17279481887817383, -0.27433380484580994, -0.13430936634540558, -0.1454470455646515, -0.030736273154616356, 0.1082838773727417, 0.1738087385892868, -0.5300573110580444, 0.29071044921875, 0.31796661019325256, 0.34180712699890137, -0.41827768087387085, -0.12332816421985626, -0.09303069114685059, -0.12392879277467728, 0.02928660251200199, -0.09267889708280563, 0.4591895639896393, 0.08312094956636429, -0.03519752621650696, 0.01120615005493164, -0.01250314712524414, -0.2134316861629486, -0.11967667192220688, 0.29374292492866516, -0.005847531370818615, -0.22258980572223663, -0.050810299813747406, 0.06543514132499695, 0.32920995354652405, 0.07487817108631134, 0.10934746265411377, -0.17916527390480042, -0.005952462553977966, -0.42674165964126587, -0.14108382165431976, 0.041411712765693665, 0.34808677434921265, -0.2709074020385742, -0.09089472889900208, 0.210688978433609, 0.27352213859558105, -0.0548241063952446, 0.5467904806137085, -0.04279862344264984, 0.4276213049888611, -0.26425912976264954, 0.07968822121620178, 0.018230602145195007, -0.40982717275619507, -0.29369741678237915, 0.2606925666332245, -0.13339632749557495, 0.357221394777298, 0.20871540904045105, 0.11097455024719238, 0.2958292067050934, 0.14192619919776917, 0.1747296154499054, 0.011238141916692257, 0.3328609764575958, -0.1269814670085907, -0.2913206219673157, -0.21657495200634003, 0.0697622001171112, 0.04623701050877571, -0.3213197588920593, 0.2135714441537857, 0.07121473550796509, 0.06110428273677826, 0.45594966411590576, 0.040125638246536255, -0.027841011062264442, 0.07619456946849823, 0.10838931798934937, 0.07143516838550568, 0.32670488953590393, -0.057660434395074844, -0.2763378620147705, 0.06276258081197739, 0.15355543792247772, 0.08994052559137344, 0.18926948308944702, -0.06971858441829681, -0.24109816551208496, -0.08709081262350082, -0.36443421244621277, -0.13096418976783752, -0.06535202264785767, 0.31864267587661743, 0.03368256613612175, 0.09683245420455933, -0.07003284990787506, 0.4874730408191681, -0.13978669047355652, 0.08680620044469833, -0.35340237617492676, 0.03995196521282196, 0.14232075214385986, 0.0782763734459877, 0.20957818627357483, 0.3197644054889679, 0.22628983855247498, 0.1240750402212143, 0.08341477066278458, 0.26348263025283813, 0.029740123078227043, 0.11414627730846405, -0.15745505690574646, -0.212615504860878, 0.19843348860740662, -0.22260113060474396, -0.08337865024805069, 0.17854712903499603, 0.2592635750770569, -0.1271859109401703, -0.2556268274784088, 0.19539199769496918, 0.1241353303194046, 0.2335556149482727, -0.05858957767486572, 0.021532626822590828, 0.08595053851604462, -0.06844396144151688, -0.10826201736927032, -0.2807024121284485, 0.542055070400238, -0.14989367127418518, 0.21801240742206573, 0.15388351678848267, -0.3125826120376587, 0.23606058955192566, 0.22390145063400269, -0.07175575941801071, -0.055958762764930725, 0.37219691276550293, -0.1574181318283081, -0.06509150564670563, -0.13544562458992004, 0.09647759795188904, 0.3051019310951233, 0.10979363322257996, 0.044740110635757446, 0.027225814759731293, -0.13086563348770142, 0.04559757560491562, 0.24553579092025757, -0.09214067459106445, -0.08831518888473511, 0.3082369863986969, 0.33800387382507324, -0.09456909447908401, -0.5984470844268799, 0.12924079596996307, -0.04421647638082504, 0.27601158618927, -0.3640025556087494, 0.01289469562470913, -0.367678701877594, 0.03856109082698822, -0.3294144570827484, -0.026490766555070877, -0.20051181316375732, -0.11366166919469833, 0.18861599266529083, 0.34738096594810486, 0.22703880071640015, 0.01754126325249672, 0.22767221927642822, 0.3561963438987732, -0.048933036625385284, 0.24103668332099915, -0.08919680118560791, 0.1284424513578415, -0.34551820158958435, -0.042488209903240204, -0.02307138219475746, 0.037393949925899506, 0.25735580921173096, -0.13492518663406372, -0.30740904808044434, -0.4002935290336609, -0.22278860211372375, 0.25313082337379456, -0.2650929093360901, 0.4105927348136902, 0.32208898663520813, -0.04366596043109894, -0.40779614448547363, -0.20741605758666992, 0.0193410012871027, -0.029796328395605087, -0.4018996059894562, 0.2117161601781845, -0.03610413894057274, 0.058592215180397034, -0.03962396830320358, -0.5401888489723206, 0.053617820143699646, 0.05010995641350746, 0.53221595287323, 0.015263460576534271, 0.08344022184610367, 0.289431095123291, 0.014745651744306087, 0.08218937367200851, -0.18898533284664154, 0.14076882600784302, -0.5706543922424316, -0.26448968052864075, 0.11451983451843262, 0.1552298218011856, -0.27800315618515015, -0.23977406322956085, 0.012084461748600006, -0.01234247162938118, -0.15118660032749176, -0.5954256057739258, -0.26200568675994873, -0.10776233673095703, 0.03248419985175133, -0.1540210247039795, 0.3147448003292084, 0.22699713706970215, 0.12439495325088501, 0.020305531099438667, -0.2161230742931366, 0.019108112901449203, 0.5199982523918152, 0.19486558437347412, 0.11954416334629059, 0.10722807049751282, 0.11791433393955231, -0.02235719934105873, 0.32573947310447693, 0.8683475255966187, 0.17310559749603271, 0.23021507263183594, -0.17268459498882294, 0.1653013825416565, -0.25049886107444763, -0.34759652614593506, -0.21557769179344177, -0.26883429288864136, 0.012716967612504959, 0.431297242641449, 0.13738615810871124, 0.1408708244562149, -0.16464516520500183, 0.15251420438289642, -0.18699228763580322, -0.20557822287082672, -0.16153165698051453, -0.13670480251312256, 0.11357702314853668, 0.141216441988945, -0.02899867668747902, 0.27222689986228943, -0.2952243387699127, -0.14933089911937714, -0.09740099310874939, 0.13421189785003662, -0.1416781097650528, -0.319952130317688, -0.07444150000810623, -0.6836332678794861, 0.06443242728710175, 0.24592499434947968, 0.29611942172050476, -0.006278805434703827, -0.012250898405909538, 0.483298659324646, 0.21600058674812317, 1.0575666427612305, -0.0956709235906601, 0.018702929839491844, -0.2254539430141449, -0.03845752775669098, -0.2621956467628479, 0.09486520290374756, -0.29560357332229614, -0.16043780744075775, -0.009118843823671341, 0.150004580616951, -0.13438193500041962, 0.07995850592851639, 0.05386718362569809, 0.43255215883255005, -0.28533342480659485, -0.19340476393699646, -0.35320764780044556, -0.2623344361782074, -0.31002575159072876, -0.024548180401325226, -0.018167799338698387, 0.10228969901800156, -0.23885060846805573, -0.030857596546411514, 0.025836840271949768, -0.12096082419157028, 0.4737128019332886, 0.1313101053237915, 0.6074252724647522, -0.017129383981227875, 0.4328969120979309, 0.5953526496887207, -0.1411609947681427, -0.36343541741371155, 0.8624759912490845, -0.12112179398536682, -0.261260062456131, -0.14371627569198608, -0.33272889256477356, 0.2774752676486969, 0.6624305248260498, -0.21866613626480103, 0.3310767710208893, -0.11240050196647644, -0.024794332683086395, -0.2145525962114334, -0.10217172652482986, 0.37960103154182434, 0.20690950751304626, 0.004373068921267986, -0.39035099744796753, 0.35991665720939636, -0.08258716762065887, -0.25809037685394287, 0.14400385320186615, 0.07825487852096558, -0.2731485366821289, 0.3259182572364807, -0.20668140053749084, 1.1999914646148682, -0.11445975303649902, 0.46276864409446716, 0.07442498207092285, 0.18929162621498108, 0.49357402324676514, 0.003852829337120056, -0.04390900582075119, -0.3514224588871002, -0.07620932161808014, -0.09383665025234222, 0.04941825196146965, -0.19002559781074524, 0.0923120379447937, -0.39710545539855957, 0.2927144169807434, 0.3565196990966797, 0.15518255531787872, 0.08801746368408203, 0.08528667688369751, -0.04183583706617355, -0.044251926243305206, -0.107916921377182, -0.10459892451763153, -0.06587114185094833, 0.1889074444770813, 0.2575893700122833, 0.17984658479690552, 0.2313103973865509, -0.5975795984268188, -0.4764409065246582, 0.007284741848707199, -0.32159510254859924, -0.010011151432991028, 0.10552981495857239, -0.3966958522796631, 0.0478971041738987, 0.39642763137817383, 0.16674655675888062, 0.12797285616397858, -0.12385439872741699, -0.16488046944141388, 0.224289208650589, 0.42867788672447205, -0.13588418066501617, -0.23015527427196503, -0.015352929010987282, 0.07643546164035797, -0.44192543625831604, -0.020290762186050415, 0.26070812344551086, -0.037719495594501495, -0.2543267607688904, 0.1783217340707779, -0.24975697696208954, -0.3596174418926239, 0.0049395132809877396, 0.2692561745643616, 0.17097894847393036, -0.34261927008628845, -0.03106570988893509, 0.14713777601718903, -0.31021633744239807, 0.08829520642757416, 0.020082535222172737, -0.32497233152389526, 0.058838825672864914, 0.7058209180831909, 0.3741152882575989, -0.1189950630068779, 0.5002731084823608, 0.26755768060684204, 0.011662088334560394, -0.09574976563453674, 0.22603702545166016, -0.039745282381772995, -0.481536328792572, 0.21513581275939941, -0.0029078738298267126, 0.09179423749446869, -0.2900528907775879, 0.42677149176597595, -0.021725982427597046, 0.1830296516418457, -0.1333240568637848, -0.29612618684768677, -0.04239586740732193, 0.2187689244747162, 0.13949637115001678, 0.16199429333209991, -0.17247867584228516, -0.16190634667873383, 0.00970916636288166, 0.11096712946891785, -0.1637849360704422, 0.11570583283901215, 0.044354453682899475, 0.16904190182685852, 0.051750652492046356, -0.0303460955619812, 0.2929792106151581, 0.06757853925228119, 0.07113446295261383, 0.26590704917907715, 0.06485326588153839, -0.09327801316976547, -0.29812127351760864, 0.22460044920444489, -0.09662914276123047, 0.10791085660457611, -0.06799908727407455, -0.0075087770819664, 0.20138365030288696, -0.19980204105377197, 0.23446398973464966, 0.35919883847236633, 0.1373307853937149, 0.12905986607074738, -0.1139100193977356, -0.17633509635925293, 0.11969394981861115, -0.05800440162420273, -0.31850385665893555, -0.03182552754878998, 0.32220223546028137, -0.00019056722521781921, 0.044784121215343475, -0.017414361238479614, 0.11479669064283371, 0.15573188662528992, 0.14757677912712097, -0.18783298134803772, -0.2165784239768982, -0.1440659761428833, -0.17868657410144806, 0.05390988290309906, 0.34928959608078003, 0.33452165126800537, -0.3116491734981537, -0.12014567106962204, 0.07104988396167755, 0.02499406971037388, -0.36299610137939453, -0.3286019265651703, -0.027624472975730896, -0.06747099757194519, -0.11072055250406265, 0.4090242087841034, 0.19636085629463196, -0.3866886496543884, 0.23008722066879272, -0.16663259267807007, 0.2678837776184082, -0.2556227445602417, 0.11148963868618011, 0.42083102464675903, 0.11706580221652985, -0.23090504109859467, -0.05390100181102753, -0.1027715802192688, -0.09727712720632553, 0.5784745812416077, -0.3655499517917633, 0.06614050269126892, -0.455635130405426, 0.3279431164264679, 0.2335665225982666, -0.16637110710144043, 0.34289756417274475, 0.2844088673591614, -0.3349226415157318, 0.23298662900924683, 0.015256360173225403, 0.5815436840057373, -0.026483960449695587, -0.06383520364761353, -0.2792888283729553, 0.13241522014141083, -0.16624152660369873, -0.3447321355342865, -0.000659111887216568, -0.34849461913108826, -0.33110758662223816, 0.25630781054496765, -0.07747714221477509, -0.22660799324512482, 0.5246610641479492, 0.1639329493045807, -0.0409051775932312, -0.708656370639801, -0.3736552596092224, -0.004537265747785568, 0.276652067899704, -0.2027629166841507, 0.41823768615722656, 0.32298868894577026, 0.003952428698539734, 0.3944137394428253, 0.4252389371395111, 0.3170164227485657, 0.08837085217237473, -0.0516749806702137, 0.31551113724708557, -0.4504493474960327, -0.00597100704908371, 0.0368654727935791, 0.305440753698349, -0.124253049492836, -0.10664735734462738, 0.09661991894245148, -0.10281732678413391, 0.05159023404121399, 0.04240637645125389, 0.20626088976860046, 0.04434322193264961, -0.5337693095207214, 0.26798033714294434, -0.17649215459823608, 0.17406544089317322, -0.06515603512525558, 0.14496645331382751, -0.5101773142814636, 0.26128870248794556, 0.39204350113868713, 0.05839209631085396, 0.010553272441029549, -0.08285947144031525, 0.03292160481214523, -0.13836412131786346, 0.2497991919517517, 0.26752257347106934, 0.10210775583982468, -0.2600739896297455, -0.14501389861106873, -0.5910230278968811, 0.033232174813747406, -0.19088025391101837, -0.005445796996355057, 0.14426414668560028, -0.04139453172683716, -0.03587140887975693, 0.27693086862564087, -0.0004987046122550964, 0.035481393337249756, -0.41291338205337524, 0.2628386616706848, -0.27234792709350586, -0.22963707149028778, 0.2392844706773758, 0.2164621502161026, -0.10239400714635849, -0.15034371614456177, 0.13336309790611267, -0.09759793430566788, -0.19301795959472656, -0.052888572216033936, 0.12031756341457367, -0.20286771655082703, -0.09920263290405273, -0.025236256420612335, 0.24764981865882874, 0.2405090481042862, 0.004569433629512787, -0.1746518611907959, -0.1247406005859375, -0.25874900817871094, -0.31795603036880493, 0.3191433846950531, 0.23176422715187073, 0.3002195656299591, -0.1924443244934082, -0.2965007424354553, 0.03145536407828331, 0.10419704020023346, 0.28280168771743774, 0.018973764032125473, -0.44514358043670654, 0.11568326503038406, -0.08795072138309479, 0.3841792047023773, -0.13023258745670319, 0.46568572521209717, -0.036980487406253815, 0.18306054174900055, -0.1826777458190918, -0.5681954026222229, 0.4401479661464691, -0.6994353532791138, -0.14016790688037872, -0.026372797787189484, 0.3481689691543579, 0.043787881731987, -0.23742026090621948, -0.9038194417953491, -0.1497894525527954, 0.36551228165626526, 0.08801072090864182, -0.10357587039470673, 0.38611406087875366, -0.045647598803043365, -0.05850374698638916, -0.14883418381214142, 0.39353495836257935, 0.4965202212333679, -0.1668691188097, 0.35871776938438416, -0.5926187634468079 ]
https://github.com/huggingface/datasets/issues/2322
Calls to map are not cached.
I tried upgrading to `datasets==1.6.2` and downgrading to `1.6.0`. Both versions produce the same output. Downgrading to `1.5.0` works and produces the following output for me: ```bash Downloading: 9.20kB [00:00, 3.94MB/s] Downloading: 5.99kB [00:00, 3.29MB/s] No config specified, defaulting to: sst/default Downloading and preparing dataset sst/default (download: 6.83 MiB, generated: 3.73 MiB, post-processed: Unknown size, total: 10.56 MiB) to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b... Dataset sst downloaded and prepared to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b. Subsequent calls will reuse this data. executed [0, 1] #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 94.83ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 92.75ba/s] executed [0, 1] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #0: 100%|██████████| 1/1 [00:00<00:00, 118.81ba/s] #1: 100%|██████████| 1/1 [00:00<00:00, 123.06ba/s] executed [0, 1] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 119.42ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 123.33ba/s] ############################## executed [0, 1] Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-6079777aa097c8f8.arrow Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-2dc05c46f68eda6e.arrow executed [0, 1] Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-1ca347e7430b98f1.arrow Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-c0f1a73ce3ba40cd.arrow executed [0, 1] Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-832a1407bf1ac5b7.arrow Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-036316a259b773c4.arrow - Datasets: 1.5.0 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ```
## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work.
387
Calls to map are not cached. ## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work. I tried upgrading to `datasets==1.6.2` and downgrading to `1.6.0`. Both versions produce the same output. Downgrading to `1.5.0` works and produces the following output for me: ```bash Downloading: 9.20kB [00:00, 3.94MB/s] Downloading: 5.99kB [00:00, 3.29MB/s] No config specified, defaulting to: sst/default Downloading and preparing dataset sst/default (download: 6.83 MiB, generated: 3.73 MiB, post-processed: Unknown size, total: 10.56 MiB) to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b... Dataset sst downloaded and prepared to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b. Subsequent calls will reuse this data. executed [0, 1] #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 94.83ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 92.75ba/s] executed [0, 1] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #0: 100%|██████████| 1/1 [00:00<00:00, 118.81ba/s] #1: 100%|██████████| 1/1 [00:00<00:00, 123.06ba/s] executed [0, 1] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 119.42ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 123.33ba/s] ############################## executed [0, 1] Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-6079777aa097c8f8.arrow Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-2dc05c46f68eda6e.arrow executed [0, 1] Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-1ca347e7430b98f1.arrow Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-c0f1a73ce3ba40cd.arrow executed [0, 1] Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-832a1407bf1ac5b7.arrow Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-036316a259b773c4.arrow - Datasets: 1.5.0 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ```
[ -0.16529929637908936, -0.39597225189208984, -0.008847633376717567, 0.14566156268119812, 0.20624274015426636, -0.10191810131072998, 0.3002684712409973, 0.12512938678264618, 0.3953082263469696, 0.020620882511138916, -0.036978669464588165, 0.2428552806377411, 0.16997145116329193, -0.2849344313144684, 0.18808673322200775, 0.25960442423820496, 0.27137747406959534, -0.03853382170200348, -0.22196584939956665, -0.17453429102897644, -0.19188164174556732, 0.17236433923244476, -0.306485652923584, -0.25734132528305054, -0.2379029393196106, 0.1117420569062233, -0.26038119196891785, -0.12303198128938675, 0.4237756133079529, -0.32121580839157104, 0.37847617268562317, -0.058065857738256454, 0.014867424964904785, 0.6959583759307861, -0.00011318772158119828, -0.1605285108089447, 0.13587559759616852, -0.13831950724124908, -0.0015477761626243591, 0.21333101391792297, -0.33895421028137207, -0.3100149929523468, -0.004519476089626551, -0.2349570393562317, -0.33073821663856506, 0.015122667886316776, -0.02393319644033909, -0.8197695016860962, 0.3728451728820801, 0.2541060149669647, 0.29510679841041565, 0.17261362075805664, -0.019022207707166672, 0.07428567111492157, 0.08660353720188141, -0.08379139006137848, -0.2725948691368103, -0.018692009150981903, 0.29952752590179443, -0.19743749499320984, -0.028206922113895416, 0.3594812750816345, -0.13195253908634186, 0.07357265800237656, 0.3317595422267914, 0.3265022337436676, 0.21804013848304749, -0.11859147250652313, 0.25679636001586914, -0.2258385717868805, 0.34444835782051086, -0.25056105852127075, -0.3402964770793915, -0.25219643115997314, -0.45128968358039856, -0.09359773248434067, 0.23053404688835144, -0.18163426220417023, -0.01751127652823925, 0.052323829382658005, -0.39514076709747314, 0.14610977470874786, 0.2768731117248535, 0.023933865129947662, 0.039148807525634766, 0.2585602402687073, -0.08576446771621704, 0.10614436864852905, 0.04407575726509094, -0.15750761330127716, 0.018533039838075638, -0.24768784642219543, -0.02332593873143196, 0.3876001238822937, -0.45780301094055176, 0.1309816539287567, 0.46486184000968933, 0.1431974470615387, -0.1110440269112587, -0.012944944202899933, 0.11935506761074066, -0.006080687046051025, 0.18636289238929749, 0.0010309703648090363, 0.06157728657126427, 0.4890258014202118, -0.010355457663536072, 0.355155885219574, -0.03754419833421707, -0.07195451110601425, -0.3230225145816803, -0.13232803344726562, 0.2659284770488739, -0.10086960345506668, 0.517533540725708, 0.16161379218101501, 0.20059219002723694, -0.1302776336669922, 0.18968361616134644, -0.0005333609879016876, -0.16335949301719666, -0.17487163841724396, 0.16171838343143463, 0.3469949960708618, 0.08699914813041687, -0.036533795297145844, -0.07700540125370026, -0.10873943567276001, -0.22075386345386505, -0.07633782178163528, -0.3961375653743744, -0.24385710060596466, -0.3070537745952606, 0.14955857396125793, 0.19743776321411133, -0.03266493231058121, 0.13559727370738983, 0.027335654944181442, -0.10057333111763, -0.335517019033432, 0.05462384968996048, -0.18763507902622223, 0.6559557318687439, 0.15888051688671112, -0.2145811915397644, 0.2533615827560425, 0.3517918586730957, 0.17983819544315338, -0.30275651812553406, 0.2812998592853546, -0.45567578077316284, -0.08744338154792786, 0.41421186923980713, 0.1292610615491867, -0.09990955144166946, -0.07479988038539886, -0.1504988968372345, 0.1253662407398224, 0.7231864333152771, -0.1573016494512558, 0.2668023109436035, -0.21290211379528046, -0.4821096658706665, -0.31872984766960144, 0.3494819402694702, 0.4953719973564148, -0.12810197472572327, -0.14054086804389954, 0.10628630965948105, 0.3853780925273895, 0.36833861470222473, 0.2536810338497162, -0.23943519592285156, 0.11122380197048187, -0.26862359046936035, 0.1886623054742813, 0.2342710793018341, -0.38494256138801575, -0.6794058680534363, -0.02503749169409275, -0.08278053998947144, 0.15952607989311218, 0.03071735054254532, -0.034351225942373276, 0.30047911405563354, -0.1870458722114563, 0.17195776104927063, -0.05722431838512421, -0.001851273700594902, 0.3272257447242737, -0.3206147253513336, -0.10737452656030655, 0.09274736046791077, -0.11547094583511353, -0.007123056799173355, 0.111723892390728, -0.030756331980228424, -0.1718791127204895, 0.022095318883657455, -0.08480116724967957, 0.0942302718758583, 0.2804452180862427, 0.18360461294651031, 0.07434556633234024, 0.14487901329994202, 0.022038422524929047, -0.3660166561603546, 0.3349866271018982, 0.053142353892326355, -0.36038875579833984, 0.06007089838385582, -0.1577848345041275, 0.02083733305335045, 0.01010659895837307, -0.09560047090053558, -0.3363131582736969, 0.10418874025344849, 0.3796643614768982, 0.4487689435482025, -0.03692418336868286, -0.025282159447669983, 0.17484718561172485, 0.41772428154945374, -0.135536789894104, -0.18360011279582977, -0.03417479246854782, -0.01376909576356411, -0.3760506212711334, -0.24279272556304932, 0.08944067358970642, 0.27498486638069153, -0.09275145828723907, -0.24926340579986572, 0.28871315717697144, 0.0752180889248848, 0.27193397283554077, -0.2303871512413025, 0.046538129448890686, -0.14502914249897003, 0.054500777274370193, 0.11245465278625488, 0.2869497537612915, 0.09865221381187439, -0.16743794083595276, -0.0972820445895195, 0.1450364589691162, 0.1807996928691864, 0.21960607171058655, -0.1466810703277588, -0.21147511899471283, -0.015951519832015038, -0.09384754300117493, 0.005285672843456268, -0.11328461766242981, 0.13613450527191162, -0.3531873822212219, 0.2921640872955322, 0.11155116558074951, 0.05682952702045441, 0.5075967907905579, 0.6477877497673035, 0.2599566876888275, 0.02535923942923546, -0.1637761890888214, -0.19480928778648376, -0.18789321184158325, 0.22201329469680786, 0.06816436350345612, 0.34806451201438904, 0.15230195224285126, 0.2674676179885864, -0.18972112238407135, 0.18178552389144897, -0.1461719125509262, 0.1767246425151825, -0.06012432277202606, -0.20661187171936035, -0.07824055105447769, 0.4010895788669586, -0.08567947894334793, -0.1126348227262497, 0.286783367395401, 0.05545096844434738, 0.014027576893568039, -0.28495243191719055, 0.2493804544210434, -0.22816906869411469, -0.019921250641345978, -0.015334525145590305, -0.011885668151080608, 0.03603607416152954, -0.2648219168186188, -0.1972469836473465, 0.21641893684864044, 0.10731299221515656, 0.27961263060569763, -0.22933334112167358, 0.08657006919384003, 0.1439073532819748, -0.30949923396110535, -0.20707988739013672, -0.1622282862663269, -0.29658129811286926, -0.021249718964099884, -0.07046828418970108, -0.4137970507144928, 0.30883368849754333, -0.10256582498550415, -0.02443692460656166, -0.1753556728363037, -0.07709596306085587, -0.10917405784130096, -0.09074398875236511, -0.15319353342056274, -0.194892019033432, -0.024498507380485535, -0.32437461614608765, 0.1080326959490776, 0.41733187437057495, -0.49498409032821655, -0.1076488196849823, -0.0787564367055893, 0.18748942017555237, -0.043140240013599396, -0.2904830276966095, -0.08769085258245468, -0.014073437079787254, -0.1836278885602951, 0.18088525533676147, -0.06433991342782974, 0.0390373133122921, 0.12682928144931793, -0.05661972612142563, 0.02361302077770233, -0.13719943165779114, -0.12450850009918213, -0.5041565299034119, -0.29039981961250305, 0.3763303756713867, -0.07810015231370926, -0.27421489357948303, 0.059222739189863205, 0.1451713591814041, 0.03413919359445572, 0.16567854583263397, -0.5678585171699524, -0.1953778862953186, -0.21569019556045532, 0.34426310658454895, 0.03333974629640579, 0.1807539314031601, 0.5501798391342163, -0.07305270433425903, -0.07682126760482788, -0.28497353196144104, -0.3120505213737488, 0.05485856905579567, 0.13226604461669922, 0.2266620695590973, 0.17392325401306152, 0.32409802079200745, 0.020418178290128708, 0.7732428908348083, 0.39368313550949097, -0.08567433059215546, 0.290810763835907, 0.0597863644361496, 0.1808587610721588, -0.3642304539680481, -0.3403160870075226, 0.03500978648662567, -0.18277406692504883, -0.12850335240364075, 0.2705574631690979, 0.3032846450805664, -0.022230440750718117, -0.10943947732448578, 0.22119975090026855, -0.19860127568244934, -0.3431117832660675, -0.030397428199648857, -0.24290227890014648, 0.29050683975219727, 0.11858651041984558, 0.2951210141181946, -0.585036039352417, -0.22024384140968323, -0.00608459860086441, -0.24780602753162384, 0.4443357288837433, 0.015836287289857864, -0.2791823744773865, 0.07557995617389679, -0.6623134613037109, 0.2993409037590027, 0.0712711289525032, 0.1914258897304535, -0.23367513716220856, -0.11590911448001862, 0.07142440229654312, -0.02687782794237137, 0.614919126033783, -0.0980299636721611, 0.21528075635433197, 0.2069246619939804, -0.0718017965555191, -0.2621387243270874, -0.13355426490306854, 0.12617357075214386, 0.40262117981910706, 0.2812734544277191, 0.2727687358856201, -0.09175754338502884, -0.059125449508428574, -0.19140063226222992, -0.0008061913540586829, 0.0033788159489631653, -0.172470822930336, -0.17902959883213043, -0.008447468280792236, 0.025712663307785988, -0.022418193519115448, 0.14632806181907654, -0.1725964993238449, -0.020340926945209503, -0.012626580893993378, 0.06038118898868561, -0.07830646634101868, -0.1084497720003128, -0.04587782546877861, 0.5428438782691956, 0.17471851408481598, 0.2683493196964264, 0.31548237800598145, -0.03907656669616699, 0.02330782823264599, 0.5417553782463074, -0.24278289079666138, -0.22251322865486145, 0.1127762645483017, -0.027603179216384888, -0.08532892912626266, 0.21515604853630066, -0.2347988337278366, -0.041710756719112396, 0.1057305708527565, 0.035225726664066315, -0.30954688787460327, -0.28571251034736633, 0.18606309592723846, 0.31175434589385986, -0.04063434153795242, -0.4116733968257904, 0.3023984432220459, 0.24737907946109772, -0.13563492894172668, 0.2800067365169525, -0.23446623980998993, -0.3694336414337158, 0.1577770859003067, -0.14955854415893555, 0.6636368632316589, -0.07869946956634521, 0.15714161098003387, -0.05205093324184418, 0.18352726101875305, 0.1946638822555542, 0.14745521545410156, 0.2649950385093689, -0.1044737696647644, 0.011988313868641853, 0.05419081449508667, -0.24875397980213165, -0.15913885831832886, 0.07498496770858765, -0.31460851430892944, 0.2809506952762604, -0.123678058385849, 0.5698893070220947, -0.0066644977778196335, -0.45520201325416565, 0.29008930921554565, -0.2605770528316498, -0.15752553939819336, 0.29719963669776917, 0.09734295308589935, 0.37260374426841736, 0.027375906705856323, 0.13371343910694122, -0.31401002407073975, -0.19547580182552338, -0.05457353591918945, 0.03662361204624176, -0.35558608174324036, 0.17640917003154755, 0.08296654373407364, -0.14333124458789825, -0.28577008843421936, 0.3172556161880493, 0.2478213608264923, -0.12968534231185913, -0.2597375512123108, -0.05242054536938667, 0.318518728017807, 0.42312154173851013, -0.07715071737766266, -0.20481644570827484, 0.09238076955080032, 0.13078191876411438, -0.07348649203777313, 0.0694008320569992, -0.07972947508096695, -0.43708401918411255, -0.2913399934768677, 0.30786073207855225, 0.020834431052207947, -0.21433933079242706, -0.02404138818383217, 0.038059934973716736, 0.14047962427139282, -0.03437235578894615, 0.17638476192951202, 0.0926654189825058, 0.0463755764067173, 0.35221827030181885, -0.3066442608833313, -0.03292170912027359, 0.09630143642425537, 0.6910688877105713, 0.176839679479599, -0.10925385355949402, 0.38446909189224243, 0.06219283863902092, -0.2908225655555725, -0.15182939171791077, -0.1682274043560028, -0.23745369911193848, -0.20495179295539856, 0.11359252035617828, -0.304787814617157, 0.05703827738761902, 0.12954361736774445, 0.0878923311829567, -0.0071599483489990234, 0.044558215886354446, -0.09394528716802597, -0.1312914341688156, -0.38297051191329956, -0.10608936846256256, 0.0017549693584442139, 0.05253481864929199, 0.19821622967720032, -0.05025232955813408, -0.0928945392370224, 0.17625726759433746, -0.33404847979545593, 0.061886757612228394, 0.07732702791690826, 0.15744921565055847, 0.12835058569908142, -0.13390406966209412, 0.28532764315605164, -0.19305065274238586, 0.05941168963909149, 0.07281708717346191, -0.4139115512371063, -0.2782284617424011, 0.1670396775007248, 0.09416355937719345, 0.03299872577190399, -0.12141699343919754, -0.2470843642950058, -0.22264257073402405, 0.01296208892017603, -0.5172247886657715, 0.056233879178762436, 0.30030936002731323, -0.10331611335277557, -0.061997268348932266, 0.12693673372268677, 0.05898768827319145, 0.30987870693206787, 0.1901082843542099, -0.11755160987377167, -0.008697547018527985, -0.22083765268325806, 0.2573598325252533, 0.0479162260890007, 0.13704127073287964, -0.05627243593335152, 0.03996080532670021, 0.10670413821935654, 0.1473340541124344, 0.35385146737098694, -0.34954768419265747, -0.09590603411197662, 0.17948803305625916, 0.19771988689899445, -0.06546260416507721, -0.17901644110679626, -0.0933837890625, -0.10486985743045807, 0.1833399385213852, -0.09191055595874786, -0.10308840125799179, 0.5036972165107727, 0.3170226812362671, 0.12333010137081146, 0.14068955183029175, 0.1180770993232727, -0.2553683817386627, 0.18052300810813904, 0.22579699754714966, 0.5175102353096008, -0.21569636464118958, 0.29682615399360657, 0.014034777879714966, 0.08834025263786316, 0.20303921401500702, 0.3545151650905609, 0.1806834191083908, -0.08875811845064163, 0.3053057789802551, 0.13881617784500122, 0.22445157170295715, 0.2918463349342346, 0.08283060789108276, -0.22979068756103516, -0.33086833357810974, 0.08285024017095566, 0.03153413534164429, -0.24587905406951904, 0.377828985452652, -0.10302625596523285, 0.16485823690891266, -0.23873133957386017, -0.21164189279079437, -0.2096368372440338, 0.18760071694850922, -0.3254331648349762, -0.1851075142621994, 0.25132662057876587, 0.014023758471012115, 0.2821993827819824, -0.0885624885559082, 0.027310436591506004, 0.10227957367897034, 0.48712220788002014, -0.08713385462760925, 0.15987899899482727, -0.038850851356983185, -0.41985005140304565, -0.05917271971702576, 0.5264779329299927, -0.23313231766223907, 0.35619062185287476, -0.1694318801164627, -0.052377186715602875, -0.12728095054626465, 0.2946248948574066, 0.36486902832984924, 0.23364907503128052, -0.050233107060194016, 0.241207093000412, 0.1879328191280365, -0.06433138251304626, -0.29874187707901, 0.4023095667362213, -0.15406246483325958, -0.4223712980747223, 0.13386261463165283, 0.11754423379898071, -0.104582279920578, 0.20911605656147003, -0.069880411028862, 0.30180850625038147, -0.1135064959526062, 0.11945020407438278, -0.3948717713356018, -0.18191447854042053, 0.050453849136829376, 0.08568122982978821, -0.0915619283914566, -0.07973802834749222, 0.2938600480556488, -0.10511603206396103, 0.287991464138031, -0.17609387636184692, 0.1067950427532196, -0.12202806770801544, 0.29778870940208435, 0.18544770777225494, 0.04382273927330971, -0.13899032771587372, -0.03231653571128845, -0.34742501378059387, 0.16197599470615387, -0.3173351287841797, 0.1556631624698639, -0.21746282279491425, 0.16787907481193542, -0.11324869841337204, -0.0024312101304531097, 0.28103888034820557, -0.4437096416950226, 0.1354290097951889, 0.25279903411865234, -0.2207794487476349, -0.23002518713474274, -0.21626140177249908, 0.06342745572328568, 0.2270527482032776, -0.4350835084915161, 0.3417457938194275, -0.28040611743927, 0.14635658264160156, -0.16108942031860352, 0.049328163266181946, 0.05928528681397438, 0.20931443572044373, 0.45569467544555664, 0.3434935510158539, 0.1172771081328392, 0.22266384959220886, 0.04802972823381424, -0.30162760615348816, -0.12587353587150574, 0.04261079430580139, 0.0033725574612617493, -0.18866075575351715, 0.16462725400924683, -0.5020897388458252, -0.3603519797325134, -0.22568738460540771, 0.011632886715233326, 0.21280847489833832, -0.10149990767240524, 0.07022828608751297, -0.1475331038236618, -0.13261133432388306, -0.11002497375011444, 0.06859796494245529, 0.2812516689300537, -0.261014848947525, 0.3380204737186432, -0.22172975540161133, -0.21343332529067993, 0.4488464891910553, -0.4780466854572296, -0.3460969030857086, -0.18685829639434814, 0.3811696469783783, -0.1383684277534485, -0.16568347811698914, -0.36003127694129944, -0.04661032557487488, 0.3932838439941406, 0.057171713560819626, -0.19772042334079742, 0.2492494285106659, -0.2645002007484436, 0.20715968310832977, -0.03341635689139366, 0.22385559976100922, 0.09521449357271194, 0.09804859757423401, 0.21554124355316162, -0.17455388605594635 ]
https://github.com/huggingface/datasets/issues/2322
Calls to map are not cached.
Hi, set `keep_in_memory` to False when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them): https://github.com/huggingface/datasets/blob/241a0b4a3a868778ee91e767ad406f9da7610df2/src/datasets/arrow_dataset.py#L1718 @albertvillanova It seems like this behavior was overlooked in #2182.
## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work.
46
Calls to map are not cached. ## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work. Hi, set `keep_in_memory` to False when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them): https://github.com/huggingface/datasets/blob/241a0b4a3a868778ee91e767ad406f9da7610df2/src/datasets/arrow_dataset.py#L1718 @albertvillanova It seems like this behavior was overlooked in #2182.
[ -0.16529929637908936, -0.39597225189208984, -0.008847633376717567, 0.14566156268119812, 0.20624274015426636, -0.10191810131072998, 0.3002684712409973, 0.12512938678264618, 0.3953082263469696, 0.020620882511138916, -0.036978669464588165, 0.2428552806377411, 0.16997145116329193, -0.2849344313144684, 0.18808673322200775, 0.25960442423820496, 0.27137747406959534, -0.03853382170200348, -0.22196584939956665, -0.17453429102897644, -0.19188164174556732, 0.17236433923244476, -0.306485652923584, -0.25734132528305054, -0.2379029393196106, 0.1117420569062233, -0.26038119196891785, -0.12303198128938675, 0.4237756133079529, -0.32121580839157104, 0.37847617268562317, -0.058065857738256454, 0.014867424964904785, 0.6959583759307861, -0.00011318772158119828, -0.1605285108089447, 0.13587559759616852, -0.13831950724124908, -0.0015477761626243591, 0.21333101391792297, -0.33895421028137207, -0.3100149929523468, -0.004519476089626551, -0.2349570393562317, -0.33073821663856506, 0.015122667886316776, -0.02393319644033909, -0.8197695016860962, 0.3728451728820801, 0.2541060149669647, 0.29510679841041565, 0.17261362075805664, -0.019022207707166672, 0.07428567111492157, 0.08660353720188141, -0.08379139006137848, -0.2725948691368103, -0.018692009150981903, 0.29952752590179443, -0.19743749499320984, -0.028206922113895416, 0.3594812750816345, -0.13195253908634186, 0.07357265800237656, 0.3317595422267914, 0.3265022337436676, 0.21804013848304749, -0.11859147250652313, 0.25679636001586914, -0.2258385717868805, 0.34444835782051086, -0.25056105852127075, -0.3402964770793915, -0.25219643115997314, -0.45128968358039856, -0.09359773248434067, 0.23053404688835144, -0.18163426220417023, -0.01751127652823925, 0.052323829382658005, -0.39514076709747314, 0.14610977470874786, 0.2768731117248535, 0.023933865129947662, 0.039148807525634766, 0.2585602402687073, -0.08576446771621704, 0.10614436864852905, 0.04407575726509094, -0.15750761330127716, 0.018533039838075638, -0.24768784642219543, -0.02332593873143196, 0.3876001238822937, -0.45780301094055176, 0.1309816539287567, 0.46486184000968933, 0.1431974470615387, -0.1110440269112587, -0.012944944202899933, 0.11935506761074066, -0.006080687046051025, 0.18636289238929749, 0.0010309703648090363, 0.06157728657126427, 0.4890258014202118, -0.010355457663536072, 0.355155885219574, -0.03754419833421707, -0.07195451110601425, -0.3230225145816803, -0.13232803344726562, 0.2659284770488739, -0.10086960345506668, 0.517533540725708, 0.16161379218101501, 0.20059219002723694, -0.1302776336669922, 0.18968361616134644, -0.0005333609879016876, -0.16335949301719666, -0.17487163841724396, 0.16171838343143463, 0.3469949960708618, 0.08699914813041687, -0.036533795297145844, -0.07700540125370026, -0.10873943567276001, -0.22075386345386505, -0.07633782178163528, -0.3961375653743744, -0.24385710060596466, -0.3070537745952606, 0.14955857396125793, 0.19743776321411133, -0.03266493231058121, 0.13559727370738983, 0.027335654944181442, -0.10057333111763, -0.335517019033432, 0.05462384968996048, -0.18763507902622223, 0.6559557318687439, 0.15888051688671112, -0.2145811915397644, 0.2533615827560425, 0.3517918586730957, 0.17983819544315338, -0.30275651812553406, 0.2812998592853546, -0.45567578077316284, -0.08744338154792786, 0.41421186923980713, 0.1292610615491867, -0.09990955144166946, -0.07479988038539886, -0.1504988968372345, 0.1253662407398224, 0.7231864333152771, -0.1573016494512558, 0.2668023109436035, -0.21290211379528046, -0.4821096658706665, -0.31872984766960144, 0.3494819402694702, 0.4953719973564148, -0.12810197472572327, -0.14054086804389954, 0.10628630965948105, 0.3853780925273895, 0.36833861470222473, 0.2536810338497162, -0.23943519592285156, 0.11122380197048187, -0.26862359046936035, 0.1886623054742813, 0.2342710793018341, -0.38494256138801575, -0.6794058680534363, -0.02503749169409275, -0.08278053998947144, 0.15952607989311218, 0.03071735054254532, -0.034351225942373276, 0.30047911405563354, -0.1870458722114563, 0.17195776104927063, -0.05722431838512421, -0.001851273700594902, 0.3272257447242737, -0.3206147253513336, -0.10737452656030655, 0.09274736046791077, -0.11547094583511353, -0.007123056799173355, 0.111723892390728, -0.030756331980228424, -0.1718791127204895, 0.022095318883657455, -0.08480116724967957, 0.0942302718758583, 0.2804452180862427, 0.18360461294651031, 0.07434556633234024, 0.14487901329994202, 0.022038422524929047, -0.3660166561603546, 0.3349866271018982, 0.053142353892326355, -0.36038875579833984, 0.06007089838385582, -0.1577848345041275, 0.02083733305335045, 0.01010659895837307, -0.09560047090053558, -0.3363131582736969, 0.10418874025344849, 0.3796643614768982, 0.4487689435482025, -0.03692418336868286, -0.025282159447669983, 0.17484718561172485, 0.41772428154945374, -0.135536789894104, -0.18360011279582977, -0.03417479246854782, -0.01376909576356411, -0.3760506212711334, -0.24279272556304932, 0.08944067358970642, 0.27498486638069153, -0.09275145828723907, -0.24926340579986572, 0.28871315717697144, 0.0752180889248848, 0.27193397283554077, -0.2303871512413025, 0.046538129448890686, -0.14502914249897003, 0.054500777274370193, 0.11245465278625488, 0.2869497537612915, 0.09865221381187439, -0.16743794083595276, -0.0972820445895195, 0.1450364589691162, 0.1807996928691864, 0.21960607171058655, -0.1466810703277588, -0.21147511899471283, -0.015951519832015038, -0.09384754300117493, 0.005285672843456268, -0.11328461766242981, 0.13613450527191162, -0.3531873822212219, 0.2921640872955322, 0.11155116558074951, 0.05682952702045441, 0.5075967907905579, 0.6477877497673035, 0.2599566876888275, 0.02535923942923546, -0.1637761890888214, -0.19480928778648376, -0.18789321184158325, 0.22201329469680786, 0.06816436350345612, 0.34806451201438904, 0.15230195224285126, 0.2674676179885864, -0.18972112238407135, 0.18178552389144897, -0.1461719125509262, 0.1767246425151825, -0.06012432277202606, -0.20661187171936035, -0.07824055105447769, 0.4010895788669586, -0.08567947894334793, -0.1126348227262497, 0.286783367395401, 0.05545096844434738, 0.014027576893568039, -0.28495243191719055, 0.2493804544210434, -0.22816906869411469, -0.019921250641345978, -0.015334525145590305, -0.011885668151080608, 0.03603607416152954, -0.2648219168186188, -0.1972469836473465, 0.21641893684864044, 0.10731299221515656, 0.27961263060569763, -0.22933334112167358, 0.08657006919384003, 0.1439073532819748, -0.30949923396110535, -0.20707988739013672, -0.1622282862663269, -0.29658129811286926, -0.021249718964099884, -0.07046828418970108, -0.4137970507144928, 0.30883368849754333, -0.10256582498550415, -0.02443692460656166, -0.1753556728363037, -0.07709596306085587, -0.10917405784130096, -0.09074398875236511, -0.15319353342056274, -0.194892019033432, -0.024498507380485535, -0.32437461614608765, 0.1080326959490776, 0.41733187437057495, -0.49498409032821655, -0.1076488196849823, -0.0787564367055893, 0.18748942017555237, -0.043140240013599396, -0.2904830276966095, -0.08769085258245468, -0.014073437079787254, -0.1836278885602951, 0.18088525533676147, -0.06433991342782974, 0.0390373133122921, 0.12682928144931793, -0.05661972612142563, 0.02361302077770233, -0.13719943165779114, -0.12450850009918213, -0.5041565299034119, -0.29039981961250305, 0.3763303756713867, -0.07810015231370926, -0.27421489357948303, 0.059222739189863205, 0.1451713591814041, 0.03413919359445572, 0.16567854583263397, -0.5678585171699524, -0.1953778862953186, -0.21569019556045532, 0.34426310658454895, 0.03333974629640579, 0.1807539314031601, 0.5501798391342163, -0.07305270433425903, -0.07682126760482788, -0.28497353196144104, -0.3120505213737488, 0.05485856905579567, 0.13226604461669922, 0.2266620695590973, 0.17392325401306152, 0.32409802079200745, 0.020418178290128708, 0.7732428908348083, 0.39368313550949097, -0.08567433059215546, 0.290810763835907, 0.0597863644361496, 0.1808587610721588, -0.3642304539680481, -0.3403160870075226, 0.03500978648662567, -0.18277406692504883, -0.12850335240364075, 0.2705574631690979, 0.3032846450805664, -0.022230440750718117, -0.10943947732448578, 0.22119975090026855, -0.19860127568244934, -0.3431117832660675, -0.030397428199648857, -0.24290227890014648, 0.29050683975219727, 0.11858651041984558, 0.2951210141181946, -0.585036039352417, -0.22024384140968323, -0.00608459860086441, -0.24780602753162384, 0.4443357288837433, 0.015836287289857864, -0.2791823744773865, 0.07557995617389679, -0.6623134613037109, 0.2993409037590027, 0.0712711289525032, 0.1914258897304535, -0.23367513716220856, -0.11590911448001862, 0.07142440229654312, -0.02687782794237137, 0.614919126033783, -0.0980299636721611, 0.21528075635433197, 0.2069246619939804, -0.0718017965555191, -0.2621387243270874, -0.13355426490306854, 0.12617357075214386, 0.40262117981910706, 0.2812734544277191, 0.2727687358856201, -0.09175754338502884, -0.059125449508428574, -0.19140063226222992, -0.0008061913540586829, 0.0033788159489631653, -0.172470822930336, -0.17902959883213043, -0.008447468280792236, 0.025712663307785988, -0.022418193519115448, 0.14632806181907654, -0.1725964993238449, -0.020340926945209503, -0.012626580893993378, 0.06038118898868561, -0.07830646634101868, -0.1084497720003128, -0.04587782546877861, 0.5428438782691956, 0.17471851408481598, 0.2683493196964264, 0.31548237800598145, -0.03907656669616699, 0.02330782823264599, 0.5417553782463074, -0.24278289079666138, -0.22251322865486145, 0.1127762645483017, -0.027603179216384888, -0.08532892912626266, 0.21515604853630066, -0.2347988337278366, -0.041710756719112396, 0.1057305708527565, 0.035225726664066315, -0.30954688787460327, -0.28571251034736633, 0.18606309592723846, 0.31175434589385986, -0.04063434153795242, -0.4116733968257904, 0.3023984432220459, 0.24737907946109772, -0.13563492894172668, 0.2800067365169525, -0.23446623980998993, -0.3694336414337158, 0.1577770859003067, -0.14955854415893555, 0.6636368632316589, -0.07869946956634521, 0.15714161098003387, -0.05205093324184418, 0.18352726101875305, 0.1946638822555542, 0.14745521545410156, 0.2649950385093689, -0.1044737696647644, 0.011988313868641853, 0.05419081449508667, -0.24875397980213165, -0.15913885831832886, 0.07498496770858765, -0.31460851430892944, 0.2809506952762604, -0.123678058385849, 0.5698893070220947, -0.0066644977778196335, -0.45520201325416565, 0.29008930921554565, -0.2605770528316498, -0.15752553939819336, 0.29719963669776917, 0.09734295308589935, 0.37260374426841736, 0.027375906705856323, 0.13371343910694122, -0.31401002407073975, -0.19547580182552338, -0.05457353591918945, 0.03662361204624176, -0.35558608174324036, 0.17640917003154755, 0.08296654373407364, -0.14333124458789825, -0.28577008843421936, 0.3172556161880493, 0.2478213608264923, -0.12968534231185913, -0.2597375512123108, -0.05242054536938667, 0.318518728017807, 0.42312154173851013, -0.07715071737766266, -0.20481644570827484, 0.09238076955080032, 0.13078191876411438, -0.07348649203777313, 0.0694008320569992, -0.07972947508096695, -0.43708401918411255, -0.2913399934768677, 0.30786073207855225, 0.020834431052207947, -0.21433933079242706, -0.02404138818383217, 0.038059934973716736, 0.14047962427139282, -0.03437235578894615, 0.17638476192951202, 0.0926654189825058, 0.0463755764067173, 0.35221827030181885, -0.3066442608833313, -0.03292170912027359, 0.09630143642425537, 0.6910688877105713, 0.176839679479599, -0.10925385355949402, 0.38446909189224243, 0.06219283863902092, -0.2908225655555725, -0.15182939171791077, -0.1682274043560028, -0.23745369911193848, -0.20495179295539856, 0.11359252035617828, -0.304787814617157, 0.05703827738761902, 0.12954361736774445, 0.0878923311829567, -0.0071599483489990234, 0.044558215886354446, -0.09394528716802597, -0.1312914341688156, -0.38297051191329956, -0.10608936846256256, 0.0017549693584442139, 0.05253481864929199, 0.19821622967720032, -0.05025232955813408, -0.0928945392370224, 0.17625726759433746, -0.33404847979545593, 0.061886757612228394, 0.07732702791690826, 0.15744921565055847, 0.12835058569908142, -0.13390406966209412, 0.28532764315605164, -0.19305065274238586, 0.05941168963909149, 0.07281708717346191, -0.4139115512371063, -0.2782284617424011, 0.1670396775007248, 0.09416355937719345, 0.03299872577190399, -0.12141699343919754, -0.2470843642950058, -0.22264257073402405, 0.01296208892017603, -0.5172247886657715, 0.056233879178762436, 0.30030936002731323, -0.10331611335277557, -0.061997268348932266, 0.12693673372268677, 0.05898768827319145, 0.30987870693206787, 0.1901082843542099, -0.11755160987377167, -0.008697547018527985, -0.22083765268325806, 0.2573598325252533, 0.0479162260890007, 0.13704127073287964, -0.05627243593335152, 0.03996080532670021, 0.10670413821935654, 0.1473340541124344, 0.35385146737098694, -0.34954768419265747, -0.09590603411197662, 0.17948803305625916, 0.19771988689899445, -0.06546260416507721, -0.17901644110679626, -0.0933837890625, -0.10486985743045807, 0.1833399385213852, -0.09191055595874786, -0.10308840125799179, 0.5036972165107727, 0.3170226812362671, 0.12333010137081146, 0.14068955183029175, 0.1180770993232727, -0.2553683817386627, 0.18052300810813904, 0.22579699754714966, 0.5175102353096008, -0.21569636464118958, 0.29682615399360657, 0.014034777879714966, 0.08834025263786316, 0.20303921401500702, 0.3545151650905609, 0.1806834191083908, -0.08875811845064163, 0.3053057789802551, 0.13881617784500122, 0.22445157170295715, 0.2918463349342346, 0.08283060789108276, -0.22979068756103516, -0.33086833357810974, 0.08285024017095566, 0.03153413534164429, -0.24587905406951904, 0.377828985452652, -0.10302625596523285, 0.16485823690891266, -0.23873133957386017, -0.21164189279079437, -0.2096368372440338, 0.18760071694850922, -0.3254331648349762, -0.1851075142621994, 0.25132662057876587, 0.014023758471012115, 0.2821993827819824, -0.0885624885559082, 0.027310436591506004, 0.10227957367897034, 0.48712220788002014, -0.08713385462760925, 0.15987899899482727, -0.038850851356983185, -0.41985005140304565, -0.05917271971702576, 0.5264779329299927, -0.23313231766223907, 0.35619062185287476, -0.1694318801164627, -0.052377186715602875, -0.12728095054626465, 0.2946248948574066, 0.36486902832984924, 0.23364907503128052, -0.050233107060194016, 0.241207093000412, 0.1879328191280365, -0.06433138251304626, -0.29874187707901, 0.4023095667362213, -0.15406246483325958, -0.4223712980747223, 0.13386261463165283, 0.11754423379898071, -0.104582279920578, 0.20911605656147003, -0.069880411028862, 0.30180850625038147, -0.1135064959526062, 0.11945020407438278, -0.3948717713356018, -0.18191447854042053, 0.050453849136829376, 0.08568122982978821, -0.0915619283914566, -0.07973802834749222, 0.2938600480556488, -0.10511603206396103, 0.287991464138031, -0.17609387636184692, 0.1067950427532196, -0.12202806770801544, 0.29778870940208435, 0.18544770777225494, 0.04382273927330971, -0.13899032771587372, -0.03231653571128845, -0.34742501378059387, 0.16197599470615387, -0.3173351287841797, 0.1556631624698639, -0.21746282279491425, 0.16787907481193542, -0.11324869841337204, -0.0024312101304531097, 0.28103888034820557, -0.4437096416950226, 0.1354290097951889, 0.25279903411865234, -0.2207794487476349, -0.23002518713474274, -0.21626140177249908, 0.06342745572328568, 0.2270527482032776, -0.4350835084915161, 0.3417457938194275, -0.28040611743927, 0.14635658264160156, -0.16108942031860352, 0.049328163266181946, 0.05928528681397438, 0.20931443572044373, 0.45569467544555664, 0.3434935510158539, 0.1172771081328392, 0.22266384959220886, 0.04802972823381424, -0.30162760615348816, -0.12587353587150574, 0.04261079430580139, 0.0033725574612617493, -0.18866075575351715, 0.16462725400924683, -0.5020897388458252, -0.3603519797325134, -0.22568738460540771, 0.011632886715233326, 0.21280847489833832, -0.10149990767240524, 0.07022828608751297, -0.1475331038236618, -0.13261133432388306, -0.11002497375011444, 0.06859796494245529, 0.2812516689300537, -0.261014848947525, 0.3380204737186432, -0.22172975540161133, -0.21343332529067993, 0.4488464891910553, -0.4780466854572296, -0.3460969030857086, -0.18685829639434814, 0.3811696469783783, -0.1383684277534485, -0.16568347811698914, -0.36003127694129944, -0.04661032557487488, 0.3932838439941406, 0.057171713560819626, -0.19772042334079742, 0.2492494285106659, -0.2645002007484436, 0.20715968310832977, -0.03341635689139366, 0.22385559976100922, 0.09521449357271194, 0.09804859757423401, 0.21554124355316162, -0.17455388605594635 ]
https://github.com/huggingface/datasets/issues/2322
Calls to map are not cached.
Hi @villmow, thanks for reporting. As @mariosasko has pointed out, we did not consider this case when introducing the feature of automatic in-memory for small datasets. This needs to be fixed.
## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work.
31
Calls to map are not cached. ## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work. Hi @villmow, thanks for reporting. As @mariosasko has pointed out, we did not consider this case when introducing the feature of automatic in-memory for small datasets. This needs to be fixed.
[ -0.16529929637908936, -0.39597225189208984, -0.008847633376717567, 0.14566156268119812, 0.20624274015426636, -0.10191810131072998, 0.3002684712409973, 0.12512938678264618, 0.3953082263469696, 0.020620882511138916, -0.036978669464588165, 0.2428552806377411, 0.16997145116329193, -0.2849344313144684, 0.18808673322200775, 0.25960442423820496, 0.27137747406959534, -0.03853382170200348, -0.22196584939956665, -0.17453429102897644, -0.19188164174556732, 0.17236433923244476, -0.306485652923584, -0.25734132528305054, -0.2379029393196106, 0.1117420569062233, -0.26038119196891785, -0.12303198128938675, 0.4237756133079529, -0.32121580839157104, 0.37847617268562317, -0.058065857738256454, 0.014867424964904785, 0.6959583759307861, -0.00011318772158119828, -0.1605285108089447, 0.13587559759616852, -0.13831950724124908, -0.0015477761626243591, 0.21333101391792297, -0.33895421028137207, -0.3100149929523468, -0.004519476089626551, -0.2349570393562317, -0.33073821663856506, 0.015122667886316776, -0.02393319644033909, -0.8197695016860962, 0.3728451728820801, 0.2541060149669647, 0.29510679841041565, 0.17261362075805664, -0.019022207707166672, 0.07428567111492157, 0.08660353720188141, -0.08379139006137848, -0.2725948691368103, -0.018692009150981903, 0.29952752590179443, -0.19743749499320984, -0.028206922113895416, 0.3594812750816345, -0.13195253908634186, 0.07357265800237656, 0.3317595422267914, 0.3265022337436676, 0.21804013848304749, -0.11859147250652313, 0.25679636001586914, -0.2258385717868805, 0.34444835782051086, -0.25056105852127075, -0.3402964770793915, -0.25219643115997314, -0.45128968358039856, -0.09359773248434067, 0.23053404688835144, -0.18163426220417023, -0.01751127652823925, 0.052323829382658005, -0.39514076709747314, 0.14610977470874786, 0.2768731117248535, 0.023933865129947662, 0.039148807525634766, 0.2585602402687073, -0.08576446771621704, 0.10614436864852905, 0.04407575726509094, -0.15750761330127716, 0.018533039838075638, -0.24768784642219543, -0.02332593873143196, 0.3876001238822937, -0.45780301094055176, 0.1309816539287567, 0.46486184000968933, 0.1431974470615387, -0.1110440269112587, -0.012944944202899933, 0.11935506761074066, -0.006080687046051025, 0.18636289238929749, 0.0010309703648090363, 0.06157728657126427, 0.4890258014202118, -0.010355457663536072, 0.355155885219574, -0.03754419833421707, -0.07195451110601425, -0.3230225145816803, -0.13232803344726562, 0.2659284770488739, -0.10086960345506668, 0.517533540725708, 0.16161379218101501, 0.20059219002723694, -0.1302776336669922, 0.18968361616134644, -0.0005333609879016876, -0.16335949301719666, -0.17487163841724396, 0.16171838343143463, 0.3469949960708618, 0.08699914813041687, -0.036533795297145844, -0.07700540125370026, -0.10873943567276001, -0.22075386345386505, -0.07633782178163528, -0.3961375653743744, -0.24385710060596466, -0.3070537745952606, 0.14955857396125793, 0.19743776321411133, -0.03266493231058121, 0.13559727370738983, 0.027335654944181442, -0.10057333111763, -0.335517019033432, 0.05462384968996048, -0.18763507902622223, 0.6559557318687439, 0.15888051688671112, -0.2145811915397644, 0.2533615827560425, 0.3517918586730957, 0.17983819544315338, -0.30275651812553406, 0.2812998592853546, -0.45567578077316284, -0.08744338154792786, 0.41421186923980713, 0.1292610615491867, -0.09990955144166946, -0.07479988038539886, -0.1504988968372345, 0.1253662407398224, 0.7231864333152771, -0.1573016494512558, 0.2668023109436035, -0.21290211379528046, -0.4821096658706665, -0.31872984766960144, 0.3494819402694702, 0.4953719973564148, -0.12810197472572327, -0.14054086804389954, 0.10628630965948105, 0.3853780925273895, 0.36833861470222473, 0.2536810338497162, -0.23943519592285156, 0.11122380197048187, -0.26862359046936035, 0.1886623054742813, 0.2342710793018341, -0.38494256138801575, -0.6794058680534363, -0.02503749169409275, -0.08278053998947144, 0.15952607989311218, 0.03071735054254532, -0.034351225942373276, 0.30047911405563354, -0.1870458722114563, 0.17195776104927063, -0.05722431838512421, -0.001851273700594902, 0.3272257447242737, -0.3206147253513336, -0.10737452656030655, 0.09274736046791077, -0.11547094583511353, -0.007123056799173355, 0.111723892390728, -0.030756331980228424, -0.1718791127204895, 0.022095318883657455, -0.08480116724967957, 0.0942302718758583, 0.2804452180862427, 0.18360461294651031, 0.07434556633234024, 0.14487901329994202, 0.022038422524929047, -0.3660166561603546, 0.3349866271018982, 0.053142353892326355, -0.36038875579833984, 0.06007089838385582, -0.1577848345041275, 0.02083733305335045, 0.01010659895837307, -0.09560047090053558, -0.3363131582736969, 0.10418874025344849, 0.3796643614768982, 0.4487689435482025, -0.03692418336868286, -0.025282159447669983, 0.17484718561172485, 0.41772428154945374, -0.135536789894104, -0.18360011279582977, -0.03417479246854782, -0.01376909576356411, -0.3760506212711334, -0.24279272556304932, 0.08944067358970642, 0.27498486638069153, -0.09275145828723907, -0.24926340579986572, 0.28871315717697144, 0.0752180889248848, 0.27193397283554077, -0.2303871512413025, 0.046538129448890686, -0.14502914249897003, 0.054500777274370193, 0.11245465278625488, 0.2869497537612915, 0.09865221381187439, -0.16743794083595276, -0.0972820445895195, 0.1450364589691162, 0.1807996928691864, 0.21960607171058655, -0.1466810703277588, -0.21147511899471283, -0.015951519832015038, -0.09384754300117493, 0.005285672843456268, -0.11328461766242981, 0.13613450527191162, -0.3531873822212219, 0.2921640872955322, 0.11155116558074951, 0.05682952702045441, 0.5075967907905579, 0.6477877497673035, 0.2599566876888275, 0.02535923942923546, -0.1637761890888214, -0.19480928778648376, -0.18789321184158325, 0.22201329469680786, 0.06816436350345612, 0.34806451201438904, 0.15230195224285126, 0.2674676179885864, -0.18972112238407135, 0.18178552389144897, -0.1461719125509262, 0.1767246425151825, -0.06012432277202606, -0.20661187171936035, -0.07824055105447769, 0.4010895788669586, -0.08567947894334793, -0.1126348227262497, 0.286783367395401, 0.05545096844434738, 0.014027576893568039, -0.28495243191719055, 0.2493804544210434, -0.22816906869411469, -0.019921250641345978, -0.015334525145590305, -0.011885668151080608, 0.03603607416152954, -0.2648219168186188, -0.1972469836473465, 0.21641893684864044, 0.10731299221515656, 0.27961263060569763, -0.22933334112167358, 0.08657006919384003, 0.1439073532819748, -0.30949923396110535, -0.20707988739013672, -0.1622282862663269, -0.29658129811286926, -0.021249718964099884, -0.07046828418970108, -0.4137970507144928, 0.30883368849754333, -0.10256582498550415, -0.02443692460656166, -0.1753556728363037, -0.07709596306085587, -0.10917405784130096, -0.09074398875236511, -0.15319353342056274, -0.194892019033432, -0.024498507380485535, -0.32437461614608765, 0.1080326959490776, 0.41733187437057495, -0.49498409032821655, -0.1076488196849823, -0.0787564367055893, 0.18748942017555237, -0.043140240013599396, -0.2904830276966095, -0.08769085258245468, -0.014073437079787254, -0.1836278885602951, 0.18088525533676147, -0.06433991342782974, 0.0390373133122921, 0.12682928144931793, -0.05661972612142563, 0.02361302077770233, -0.13719943165779114, -0.12450850009918213, -0.5041565299034119, -0.29039981961250305, 0.3763303756713867, -0.07810015231370926, -0.27421489357948303, 0.059222739189863205, 0.1451713591814041, 0.03413919359445572, 0.16567854583263397, -0.5678585171699524, -0.1953778862953186, -0.21569019556045532, 0.34426310658454895, 0.03333974629640579, 0.1807539314031601, 0.5501798391342163, -0.07305270433425903, -0.07682126760482788, -0.28497353196144104, -0.3120505213737488, 0.05485856905579567, 0.13226604461669922, 0.2266620695590973, 0.17392325401306152, 0.32409802079200745, 0.020418178290128708, 0.7732428908348083, 0.39368313550949097, -0.08567433059215546, 0.290810763835907, 0.0597863644361496, 0.1808587610721588, -0.3642304539680481, -0.3403160870075226, 0.03500978648662567, -0.18277406692504883, -0.12850335240364075, 0.2705574631690979, 0.3032846450805664, -0.022230440750718117, -0.10943947732448578, 0.22119975090026855, -0.19860127568244934, -0.3431117832660675, -0.030397428199648857, -0.24290227890014648, 0.29050683975219727, 0.11858651041984558, 0.2951210141181946, -0.585036039352417, -0.22024384140968323, -0.00608459860086441, -0.24780602753162384, 0.4443357288837433, 0.015836287289857864, -0.2791823744773865, 0.07557995617389679, -0.6623134613037109, 0.2993409037590027, 0.0712711289525032, 0.1914258897304535, -0.23367513716220856, -0.11590911448001862, 0.07142440229654312, -0.02687782794237137, 0.614919126033783, -0.0980299636721611, 0.21528075635433197, 0.2069246619939804, -0.0718017965555191, -0.2621387243270874, -0.13355426490306854, 0.12617357075214386, 0.40262117981910706, 0.2812734544277191, 0.2727687358856201, -0.09175754338502884, -0.059125449508428574, -0.19140063226222992, -0.0008061913540586829, 0.0033788159489631653, -0.172470822930336, -0.17902959883213043, -0.008447468280792236, 0.025712663307785988, -0.022418193519115448, 0.14632806181907654, -0.1725964993238449, -0.020340926945209503, -0.012626580893993378, 0.06038118898868561, -0.07830646634101868, -0.1084497720003128, -0.04587782546877861, 0.5428438782691956, 0.17471851408481598, 0.2683493196964264, 0.31548237800598145, -0.03907656669616699, 0.02330782823264599, 0.5417553782463074, -0.24278289079666138, -0.22251322865486145, 0.1127762645483017, -0.027603179216384888, -0.08532892912626266, 0.21515604853630066, -0.2347988337278366, -0.041710756719112396, 0.1057305708527565, 0.035225726664066315, -0.30954688787460327, -0.28571251034736633, 0.18606309592723846, 0.31175434589385986, -0.04063434153795242, -0.4116733968257904, 0.3023984432220459, 0.24737907946109772, -0.13563492894172668, 0.2800067365169525, -0.23446623980998993, -0.3694336414337158, 0.1577770859003067, -0.14955854415893555, 0.6636368632316589, -0.07869946956634521, 0.15714161098003387, -0.05205093324184418, 0.18352726101875305, 0.1946638822555542, 0.14745521545410156, 0.2649950385093689, -0.1044737696647644, 0.011988313868641853, 0.05419081449508667, -0.24875397980213165, -0.15913885831832886, 0.07498496770858765, -0.31460851430892944, 0.2809506952762604, -0.123678058385849, 0.5698893070220947, -0.0066644977778196335, -0.45520201325416565, 0.29008930921554565, -0.2605770528316498, -0.15752553939819336, 0.29719963669776917, 0.09734295308589935, 0.37260374426841736, 0.027375906705856323, 0.13371343910694122, -0.31401002407073975, -0.19547580182552338, -0.05457353591918945, 0.03662361204624176, -0.35558608174324036, 0.17640917003154755, 0.08296654373407364, -0.14333124458789825, -0.28577008843421936, 0.3172556161880493, 0.2478213608264923, -0.12968534231185913, -0.2597375512123108, -0.05242054536938667, 0.318518728017807, 0.42312154173851013, -0.07715071737766266, -0.20481644570827484, 0.09238076955080032, 0.13078191876411438, -0.07348649203777313, 0.0694008320569992, -0.07972947508096695, -0.43708401918411255, -0.2913399934768677, 0.30786073207855225, 0.020834431052207947, -0.21433933079242706, -0.02404138818383217, 0.038059934973716736, 0.14047962427139282, -0.03437235578894615, 0.17638476192951202, 0.0926654189825058, 0.0463755764067173, 0.35221827030181885, -0.3066442608833313, -0.03292170912027359, 0.09630143642425537, 0.6910688877105713, 0.176839679479599, -0.10925385355949402, 0.38446909189224243, 0.06219283863902092, -0.2908225655555725, -0.15182939171791077, -0.1682274043560028, -0.23745369911193848, -0.20495179295539856, 0.11359252035617828, -0.304787814617157, 0.05703827738761902, 0.12954361736774445, 0.0878923311829567, -0.0071599483489990234, 0.044558215886354446, -0.09394528716802597, -0.1312914341688156, -0.38297051191329956, -0.10608936846256256, 0.0017549693584442139, 0.05253481864929199, 0.19821622967720032, -0.05025232955813408, -0.0928945392370224, 0.17625726759433746, -0.33404847979545593, 0.061886757612228394, 0.07732702791690826, 0.15744921565055847, 0.12835058569908142, -0.13390406966209412, 0.28532764315605164, -0.19305065274238586, 0.05941168963909149, 0.07281708717346191, -0.4139115512371063, -0.2782284617424011, 0.1670396775007248, 0.09416355937719345, 0.03299872577190399, -0.12141699343919754, -0.2470843642950058, -0.22264257073402405, 0.01296208892017603, -0.5172247886657715, 0.056233879178762436, 0.30030936002731323, -0.10331611335277557, -0.061997268348932266, 0.12693673372268677, 0.05898768827319145, 0.30987870693206787, 0.1901082843542099, -0.11755160987377167, -0.008697547018527985, -0.22083765268325806, 0.2573598325252533, 0.0479162260890007, 0.13704127073287964, -0.05627243593335152, 0.03996080532670021, 0.10670413821935654, 0.1473340541124344, 0.35385146737098694, -0.34954768419265747, -0.09590603411197662, 0.17948803305625916, 0.19771988689899445, -0.06546260416507721, -0.17901644110679626, -0.0933837890625, -0.10486985743045807, 0.1833399385213852, -0.09191055595874786, -0.10308840125799179, 0.5036972165107727, 0.3170226812362671, 0.12333010137081146, 0.14068955183029175, 0.1180770993232727, -0.2553683817386627, 0.18052300810813904, 0.22579699754714966, 0.5175102353096008, -0.21569636464118958, 0.29682615399360657, 0.014034777879714966, 0.08834025263786316, 0.20303921401500702, 0.3545151650905609, 0.1806834191083908, -0.08875811845064163, 0.3053057789802551, 0.13881617784500122, 0.22445157170295715, 0.2918463349342346, 0.08283060789108276, -0.22979068756103516, -0.33086833357810974, 0.08285024017095566, 0.03153413534164429, -0.24587905406951904, 0.377828985452652, -0.10302625596523285, 0.16485823690891266, -0.23873133957386017, -0.21164189279079437, -0.2096368372440338, 0.18760071694850922, -0.3254331648349762, -0.1851075142621994, 0.25132662057876587, 0.014023758471012115, 0.2821993827819824, -0.0885624885559082, 0.027310436591506004, 0.10227957367897034, 0.48712220788002014, -0.08713385462760925, 0.15987899899482727, -0.038850851356983185, -0.41985005140304565, -0.05917271971702576, 0.5264779329299927, -0.23313231766223907, 0.35619062185287476, -0.1694318801164627, -0.052377186715602875, -0.12728095054626465, 0.2946248948574066, 0.36486902832984924, 0.23364907503128052, -0.050233107060194016, 0.241207093000412, 0.1879328191280365, -0.06433138251304626, -0.29874187707901, 0.4023095667362213, -0.15406246483325958, -0.4223712980747223, 0.13386261463165283, 0.11754423379898071, -0.104582279920578, 0.20911605656147003, -0.069880411028862, 0.30180850625038147, -0.1135064959526062, 0.11945020407438278, -0.3948717713356018, -0.18191447854042053, 0.050453849136829376, 0.08568122982978821, -0.0915619283914566, -0.07973802834749222, 0.2938600480556488, -0.10511603206396103, 0.287991464138031, -0.17609387636184692, 0.1067950427532196, -0.12202806770801544, 0.29778870940208435, 0.18544770777225494, 0.04382273927330971, -0.13899032771587372, -0.03231653571128845, -0.34742501378059387, 0.16197599470615387, -0.3173351287841797, 0.1556631624698639, -0.21746282279491425, 0.16787907481193542, -0.11324869841337204, -0.0024312101304531097, 0.28103888034820557, -0.4437096416950226, 0.1354290097951889, 0.25279903411865234, -0.2207794487476349, -0.23002518713474274, -0.21626140177249908, 0.06342745572328568, 0.2270527482032776, -0.4350835084915161, 0.3417457938194275, -0.28040611743927, 0.14635658264160156, -0.16108942031860352, 0.049328163266181946, 0.05928528681397438, 0.20931443572044373, 0.45569467544555664, 0.3434935510158539, 0.1172771081328392, 0.22266384959220886, 0.04802972823381424, -0.30162760615348816, -0.12587353587150574, 0.04261079430580139, 0.0033725574612617493, -0.18866075575351715, 0.16462725400924683, -0.5020897388458252, -0.3603519797325134, -0.22568738460540771, 0.011632886715233326, 0.21280847489833832, -0.10149990767240524, 0.07022828608751297, -0.1475331038236618, -0.13261133432388306, -0.11002497375011444, 0.06859796494245529, 0.2812516689300537, -0.261014848947525, 0.3380204737186432, -0.22172975540161133, -0.21343332529067993, 0.4488464891910553, -0.4780466854572296, -0.3460969030857086, -0.18685829639434814, 0.3811696469783783, -0.1383684277534485, -0.16568347811698914, -0.36003127694129944, -0.04661032557487488, 0.3932838439941406, 0.057171713560819626, -0.19772042334079742, 0.2492494285106659, -0.2645002007484436, 0.20715968310832977, -0.03341635689139366, 0.22385559976100922, 0.09521449357271194, 0.09804859757423401, 0.21554124355316162, -0.17455388605594635 ]
https://github.com/huggingface/datasets/issues/2322
Calls to map are not cached.
Hi ! Currently a dataset that is in memory doesn't know doesn't know in which directory it has to read/write cache files. On the other hand, a dataset that loaded from the disk (via memory mapping) uses the directory from which the dataset is located to read/write cache files. Because of that, currently in-memory datasets simply don't use caching. Maybe a Dataset object could have a `cache_dir` that is set to the directory where the arrow files are created during `load_dataset` ?
## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work.
82
Calls to map are not cached. ## Describe the bug Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed? ## Steps to reproduce the bug ```python import datasets datasets.set_caching_enabled(True) sst = datasets.load_dataset("sst") def foo(samples, i): print("executed", i[:10]) return samples # first call x = sst.map(foo, batched=True, with_indices=True, num_proc=2) print('\n'*3, "#" * 30, '\n'*3) # second call y = sst.map(foo, batched=True, with_indices=True, num_proc=2) # print version import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` ## Actual results This code prints the following output for me: ```bash No config specified, defaulting to: sst/default Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff) #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 59.85ba/s] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 60.85ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 69.32ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 70.93ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] #0: 100%|██████████| 2/2 [00:00<00:00, 63.25ba/s] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 57.69ba/s] ############################## #0: 0%| | 0/5 [00:00<?, ?ba/s] #1: 0%| | 0/5 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281] executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009] executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281] executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009] executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009] #0: 100%|██████████| 5/5 [00:00<00:00, 58.10ba/s] executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281] executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281] #1: 100%|██████████| 5/5 [00:00<00:00, 57.19ba/s] #0: 0%| | 0/1 [00:00<?, ?ba/s] #1: 0%| | 0/1 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] #0: 100%|██████████| 1/1 [00:00<00:00, 60.10ba/s] executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560] #1: 100%|██████████| 1/1 [00:00<00:00, 53.82ba/s] #0: 0%| | 0/2 [00:00<?, ?ba/s] #1: 0%| | 0/2 [00:00<?, ?ba/s] executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009] executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114] #0: 100%|██████████| 2/2 [00:00<00:00, 72.76ba/s] executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114] #1: 100%|██████████| 2/2 [00:00<00:00, 71.55ba/s] - Datasets: 1.6.1 - Python: 3.8.3 (default, May 19 2020, 18:47:26) [GCC 7.3.0] - Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10 ``` ## Expected results Caching should work. Hi ! Currently a dataset that is in memory doesn't know doesn't know in which directory it has to read/write cache files. On the other hand, a dataset that loaded from the disk (via memory mapping) uses the directory from which the dataset is located to read/write cache files. Because of that, currently in-memory datasets simply don't use caching. Maybe a Dataset object could have a `cache_dir` that is set to the directory where the arrow files are created during `load_dataset` ?
[ -0.16529929637908936, -0.39597225189208984, -0.008847633376717567, 0.14566156268119812, 0.20624274015426636, -0.10191810131072998, 0.3002684712409973, 0.12512938678264618, 0.3953082263469696, 0.020620882511138916, -0.036978669464588165, 0.2428552806377411, 0.16997145116329193, -0.2849344313144684, 0.18808673322200775, 0.25960442423820496, 0.27137747406959534, -0.03853382170200348, -0.22196584939956665, -0.17453429102897644, -0.19188164174556732, 0.17236433923244476, -0.306485652923584, -0.25734132528305054, -0.2379029393196106, 0.1117420569062233, -0.26038119196891785, -0.12303198128938675, 0.4237756133079529, -0.32121580839157104, 0.37847617268562317, -0.058065857738256454, 0.014867424964904785, 0.6959583759307861, -0.00011318772158119828, -0.1605285108089447, 0.13587559759616852, -0.13831950724124908, -0.0015477761626243591, 0.21333101391792297, -0.33895421028137207, -0.3100149929523468, -0.004519476089626551, -0.2349570393562317, -0.33073821663856506, 0.015122667886316776, -0.02393319644033909, -0.8197695016860962, 0.3728451728820801, 0.2541060149669647, 0.29510679841041565, 0.17261362075805664, -0.019022207707166672, 0.07428567111492157, 0.08660353720188141, -0.08379139006137848, -0.2725948691368103, -0.018692009150981903, 0.29952752590179443, -0.19743749499320984, -0.028206922113895416, 0.3594812750816345, -0.13195253908634186, 0.07357265800237656, 0.3317595422267914, 0.3265022337436676, 0.21804013848304749, -0.11859147250652313, 0.25679636001586914, -0.2258385717868805, 0.34444835782051086, -0.25056105852127075, -0.3402964770793915, -0.25219643115997314, -0.45128968358039856, -0.09359773248434067, 0.23053404688835144, -0.18163426220417023, -0.01751127652823925, 0.052323829382658005, -0.39514076709747314, 0.14610977470874786, 0.2768731117248535, 0.023933865129947662, 0.039148807525634766, 0.2585602402687073, -0.08576446771621704, 0.10614436864852905, 0.04407575726509094, -0.15750761330127716, 0.018533039838075638, -0.24768784642219543, -0.02332593873143196, 0.3876001238822937, -0.45780301094055176, 0.1309816539287567, 0.46486184000968933, 0.1431974470615387, -0.1110440269112587, -0.012944944202899933, 0.11935506761074066, -0.006080687046051025, 0.18636289238929749, 0.0010309703648090363, 0.06157728657126427, 0.4890258014202118, -0.010355457663536072, 0.355155885219574, -0.03754419833421707, -0.07195451110601425, -0.3230225145816803, -0.13232803344726562, 0.2659284770488739, -0.10086960345506668, 0.517533540725708, 0.16161379218101501, 0.20059219002723694, -0.1302776336669922, 0.18968361616134644, -0.0005333609879016876, -0.16335949301719666, -0.17487163841724396, 0.16171838343143463, 0.3469949960708618, 0.08699914813041687, -0.036533795297145844, -0.07700540125370026, -0.10873943567276001, -0.22075386345386505, -0.07633782178163528, -0.3961375653743744, -0.24385710060596466, -0.3070537745952606, 0.14955857396125793, 0.19743776321411133, -0.03266493231058121, 0.13559727370738983, 0.027335654944181442, -0.10057333111763, -0.335517019033432, 0.05462384968996048, -0.18763507902622223, 0.6559557318687439, 0.15888051688671112, -0.2145811915397644, 0.2533615827560425, 0.3517918586730957, 0.17983819544315338, -0.30275651812553406, 0.2812998592853546, -0.45567578077316284, -0.08744338154792786, 0.41421186923980713, 0.1292610615491867, -0.09990955144166946, -0.07479988038539886, -0.1504988968372345, 0.1253662407398224, 0.7231864333152771, -0.1573016494512558, 0.2668023109436035, -0.21290211379528046, -0.4821096658706665, -0.31872984766960144, 0.3494819402694702, 0.4953719973564148, -0.12810197472572327, -0.14054086804389954, 0.10628630965948105, 0.3853780925273895, 0.36833861470222473, 0.2536810338497162, -0.23943519592285156, 0.11122380197048187, -0.26862359046936035, 0.1886623054742813, 0.2342710793018341, -0.38494256138801575, -0.6794058680534363, -0.02503749169409275, -0.08278053998947144, 0.15952607989311218, 0.03071735054254532, -0.034351225942373276, 0.30047911405563354, -0.1870458722114563, 0.17195776104927063, -0.05722431838512421, -0.001851273700594902, 0.3272257447242737, -0.3206147253513336, -0.10737452656030655, 0.09274736046791077, -0.11547094583511353, -0.007123056799173355, 0.111723892390728, -0.030756331980228424, -0.1718791127204895, 0.022095318883657455, -0.08480116724967957, 0.0942302718758583, 0.2804452180862427, 0.18360461294651031, 0.07434556633234024, 0.14487901329994202, 0.022038422524929047, -0.3660166561603546, 0.3349866271018982, 0.053142353892326355, -0.36038875579833984, 0.06007089838385582, -0.1577848345041275, 0.02083733305335045, 0.01010659895837307, -0.09560047090053558, -0.3363131582736969, 0.10418874025344849, 0.3796643614768982, 0.4487689435482025, -0.03692418336868286, -0.025282159447669983, 0.17484718561172485, 0.41772428154945374, -0.135536789894104, -0.18360011279582977, -0.03417479246854782, -0.01376909576356411, -0.3760506212711334, -0.24279272556304932, 0.08944067358970642, 0.27498486638069153, -0.09275145828723907, -0.24926340579986572, 0.28871315717697144, 0.0752180889248848, 0.27193397283554077, -0.2303871512413025, 0.046538129448890686, -0.14502914249897003, 0.054500777274370193, 0.11245465278625488, 0.2869497537612915, 0.09865221381187439, -0.16743794083595276, -0.0972820445895195, 0.1450364589691162, 0.1807996928691864, 0.21960607171058655, -0.1466810703277588, -0.21147511899471283, -0.015951519832015038, -0.09384754300117493, 0.005285672843456268, -0.11328461766242981, 0.13613450527191162, -0.3531873822212219, 0.2921640872955322, 0.11155116558074951, 0.05682952702045441, 0.5075967907905579, 0.6477877497673035, 0.2599566876888275, 0.02535923942923546, -0.1637761890888214, -0.19480928778648376, -0.18789321184158325, 0.22201329469680786, 0.06816436350345612, 0.34806451201438904, 0.15230195224285126, 0.2674676179885864, -0.18972112238407135, 0.18178552389144897, -0.1461719125509262, 0.1767246425151825, -0.06012432277202606, -0.20661187171936035, -0.07824055105447769, 0.4010895788669586, -0.08567947894334793, -0.1126348227262497, 0.286783367395401, 0.05545096844434738, 0.014027576893568039, -0.28495243191719055, 0.2493804544210434, -0.22816906869411469, -0.019921250641345978, -0.015334525145590305, -0.011885668151080608, 0.03603607416152954, -0.2648219168186188, -0.1972469836473465, 0.21641893684864044, 0.10731299221515656, 0.27961263060569763, -0.22933334112167358, 0.08657006919384003, 0.1439073532819748, -0.30949923396110535, -0.20707988739013672, -0.1622282862663269, -0.29658129811286926, -0.021249718964099884, -0.07046828418970108, -0.4137970507144928, 0.30883368849754333, -0.10256582498550415, -0.02443692460656166, -0.1753556728363037, -0.07709596306085587, -0.10917405784130096, -0.09074398875236511, -0.15319353342056274, -0.194892019033432, -0.024498507380485535, -0.32437461614608765, 0.1080326959490776, 0.41733187437057495, -0.49498409032821655, -0.1076488196849823, -0.0787564367055893, 0.18748942017555237, -0.043140240013599396, -0.2904830276966095, -0.08769085258245468, -0.014073437079787254, -0.1836278885602951, 0.18088525533676147, -0.06433991342782974, 0.0390373133122921, 0.12682928144931793, -0.05661972612142563, 0.02361302077770233, -0.13719943165779114, -0.12450850009918213, -0.5041565299034119, -0.29039981961250305, 0.3763303756713867, -0.07810015231370926, -0.27421489357948303, 0.059222739189863205, 0.1451713591814041, 0.03413919359445572, 0.16567854583263397, -0.5678585171699524, -0.1953778862953186, -0.21569019556045532, 0.34426310658454895, 0.03333974629640579, 0.1807539314031601, 0.5501798391342163, -0.07305270433425903, -0.07682126760482788, -0.28497353196144104, -0.3120505213737488, 0.05485856905579567, 0.13226604461669922, 0.2266620695590973, 0.17392325401306152, 0.32409802079200745, 0.020418178290128708, 0.7732428908348083, 0.39368313550949097, -0.08567433059215546, 0.290810763835907, 0.0597863644361496, 0.1808587610721588, -0.3642304539680481, -0.3403160870075226, 0.03500978648662567, -0.18277406692504883, -0.12850335240364075, 0.2705574631690979, 0.3032846450805664, -0.022230440750718117, -0.10943947732448578, 0.22119975090026855, -0.19860127568244934, -0.3431117832660675, -0.030397428199648857, -0.24290227890014648, 0.29050683975219727, 0.11858651041984558, 0.2951210141181946, -0.585036039352417, -0.22024384140968323, -0.00608459860086441, -0.24780602753162384, 0.4443357288837433, 0.015836287289857864, -0.2791823744773865, 0.07557995617389679, -0.6623134613037109, 0.2993409037590027, 0.0712711289525032, 0.1914258897304535, -0.23367513716220856, -0.11590911448001862, 0.07142440229654312, -0.02687782794237137, 0.614919126033783, -0.0980299636721611, 0.21528075635433197, 0.2069246619939804, -0.0718017965555191, -0.2621387243270874, -0.13355426490306854, 0.12617357075214386, 0.40262117981910706, 0.2812734544277191, 0.2727687358856201, -0.09175754338502884, -0.059125449508428574, -0.19140063226222992, -0.0008061913540586829, 0.0033788159489631653, -0.172470822930336, -0.17902959883213043, -0.008447468280792236, 0.025712663307785988, -0.022418193519115448, 0.14632806181907654, -0.1725964993238449, -0.020340926945209503, -0.012626580893993378, 0.06038118898868561, -0.07830646634101868, -0.1084497720003128, -0.04587782546877861, 0.5428438782691956, 0.17471851408481598, 0.2683493196964264, 0.31548237800598145, -0.03907656669616699, 0.02330782823264599, 0.5417553782463074, -0.24278289079666138, -0.22251322865486145, 0.1127762645483017, -0.027603179216384888, -0.08532892912626266, 0.21515604853630066, -0.2347988337278366, -0.041710756719112396, 0.1057305708527565, 0.035225726664066315, -0.30954688787460327, -0.28571251034736633, 0.18606309592723846, 0.31175434589385986, -0.04063434153795242, -0.4116733968257904, 0.3023984432220459, 0.24737907946109772, -0.13563492894172668, 0.2800067365169525, -0.23446623980998993, -0.3694336414337158, 0.1577770859003067, -0.14955854415893555, 0.6636368632316589, -0.07869946956634521, 0.15714161098003387, -0.05205093324184418, 0.18352726101875305, 0.1946638822555542, 0.14745521545410156, 0.2649950385093689, -0.1044737696647644, 0.011988313868641853, 0.05419081449508667, -0.24875397980213165, -0.15913885831832886, 0.07498496770858765, -0.31460851430892944, 0.2809506952762604, -0.123678058385849, 0.5698893070220947, -0.0066644977778196335, -0.45520201325416565, 0.29008930921554565, -0.2605770528316498, -0.15752553939819336, 0.29719963669776917, 0.09734295308589935, 0.37260374426841736, 0.027375906705856323, 0.13371343910694122, -0.31401002407073975, -0.19547580182552338, -0.05457353591918945, 0.03662361204624176, -0.35558608174324036, 0.17640917003154755, 0.08296654373407364, -0.14333124458789825, -0.28577008843421936, 0.3172556161880493, 0.2478213608264923, -0.12968534231185913, -0.2597375512123108, -0.05242054536938667, 0.318518728017807, 0.42312154173851013, -0.07715071737766266, -0.20481644570827484, 0.09238076955080032, 0.13078191876411438, -0.07348649203777313, 0.0694008320569992, -0.07972947508096695, -0.43708401918411255, -0.2913399934768677, 0.30786073207855225, 0.020834431052207947, -0.21433933079242706, -0.02404138818383217, 0.038059934973716736, 0.14047962427139282, -0.03437235578894615, 0.17638476192951202, 0.0926654189825058, 0.0463755764067173, 0.35221827030181885, -0.3066442608833313, -0.03292170912027359, 0.09630143642425537, 0.6910688877105713, 0.176839679479599, -0.10925385355949402, 0.38446909189224243, 0.06219283863902092, -0.2908225655555725, -0.15182939171791077, -0.1682274043560028, -0.23745369911193848, -0.20495179295539856, 0.11359252035617828, -0.304787814617157, 0.05703827738761902, 0.12954361736774445, 0.0878923311829567, -0.0071599483489990234, 0.044558215886354446, -0.09394528716802597, -0.1312914341688156, -0.38297051191329956, -0.10608936846256256, 0.0017549693584442139, 0.05253481864929199, 0.19821622967720032, -0.05025232955813408, -0.0928945392370224, 0.17625726759433746, -0.33404847979545593, 0.061886757612228394, 0.07732702791690826, 0.15744921565055847, 0.12835058569908142, -0.13390406966209412, 0.28532764315605164, -0.19305065274238586, 0.05941168963909149, 0.07281708717346191, -0.4139115512371063, -0.2782284617424011, 0.1670396775007248, 0.09416355937719345, 0.03299872577190399, -0.12141699343919754, -0.2470843642950058, -0.22264257073402405, 0.01296208892017603, -0.5172247886657715, 0.056233879178762436, 0.30030936002731323, -0.10331611335277557, -0.061997268348932266, 0.12693673372268677, 0.05898768827319145, 0.30987870693206787, 0.1901082843542099, -0.11755160987377167, -0.008697547018527985, -0.22083765268325806, 0.2573598325252533, 0.0479162260890007, 0.13704127073287964, -0.05627243593335152, 0.03996080532670021, 0.10670413821935654, 0.1473340541124344, 0.35385146737098694, -0.34954768419265747, -0.09590603411197662, 0.17948803305625916, 0.19771988689899445, -0.06546260416507721, -0.17901644110679626, -0.0933837890625, -0.10486985743045807, 0.1833399385213852, -0.09191055595874786, -0.10308840125799179, 0.5036972165107727, 0.3170226812362671, 0.12333010137081146, 0.14068955183029175, 0.1180770993232727, -0.2553683817386627, 0.18052300810813904, 0.22579699754714966, 0.5175102353096008, -0.21569636464118958, 0.29682615399360657, 0.014034777879714966, 0.08834025263786316, 0.20303921401500702, 0.3545151650905609, 0.1806834191083908, -0.08875811845064163, 0.3053057789802551, 0.13881617784500122, 0.22445157170295715, 0.2918463349342346, 0.08283060789108276, -0.22979068756103516, -0.33086833357810974, 0.08285024017095566, 0.03153413534164429, -0.24587905406951904, 0.377828985452652, -0.10302625596523285, 0.16485823690891266, -0.23873133957386017, -0.21164189279079437, -0.2096368372440338, 0.18760071694850922, -0.3254331648349762, -0.1851075142621994, 0.25132662057876587, 0.014023758471012115, 0.2821993827819824, -0.0885624885559082, 0.027310436591506004, 0.10227957367897034, 0.48712220788002014, -0.08713385462760925, 0.15987899899482727, -0.038850851356983185, -0.41985005140304565, -0.05917271971702576, 0.5264779329299927, -0.23313231766223907, 0.35619062185287476, -0.1694318801164627, -0.052377186715602875, -0.12728095054626465, 0.2946248948574066, 0.36486902832984924, 0.23364907503128052, -0.050233107060194016, 0.241207093000412, 0.1879328191280365, -0.06433138251304626, -0.29874187707901, 0.4023095667362213, -0.15406246483325958, -0.4223712980747223, 0.13386261463165283, 0.11754423379898071, -0.104582279920578, 0.20911605656147003, -0.069880411028862, 0.30180850625038147, -0.1135064959526062, 0.11945020407438278, -0.3948717713356018, -0.18191447854042053, 0.050453849136829376, 0.08568122982978821, -0.0915619283914566, -0.07973802834749222, 0.2938600480556488, -0.10511603206396103, 0.287991464138031, -0.17609387636184692, 0.1067950427532196, -0.12202806770801544, 0.29778870940208435, 0.18544770777225494, 0.04382273927330971, -0.13899032771587372, -0.03231653571128845, -0.34742501378059387, 0.16197599470615387, -0.3173351287841797, 0.1556631624698639, -0.21746282279491425, 0.16787907481193542, -0.11324869841337204, -0.0024312101304531097, 0.28103888034820557, -0.4437096416950226, 0.1354290097951889, 0.25279903411865234, -0.2207794487476349, -0.23002518713474274, -0.21626140177249908, 0.06342745572328568, 0.2270527482032776, -0.4350835084915161, 0.3417457938194275, -0.28040611743927, 0.14635658264160156, -0.16108942031860352, 0.049328163266181946, 0.05928528681397438, 0.20931443572044373, 0.45569467544555664, 0.3434935510158539, 0.1172771081328392, 0.22266384959220886, 0.04802972823381424, -0.30162760615348816, -0.12587353587150574, 0.04261079430580139, 0.0033725574612617493, -0.18866075575351715, 0.16462725400924683, -0.5020897388458252, -0.3603519797325134, -0.22568738460540771, 0.011632886715233326, 0.21280847489833832, -0.10149990767240524, 0.07022828608751297, -0.1475331038236618, -0.13261133432388306, -0.11002497375011444, 0.06859796494245529, 0.2812516689300537, -0.261014848947525, 0.3380204737186432, -0.22172975540161133, -0.21343332529067993, 0.4488464891910553, -0.4780466854572296, -0.3460969030857086, -0.18685829639434814, 0.3811696469783783, -0.1383684277534485, -0.16568347811698914, -0.36003127694129944, -0.04661032557487488, 0.3932838439941406, 0.057171713560819626, -0.19772042334079742, 0.2492494285106659, -0.2645002007484436, 0.20715968310832977, -0.03341635689139366, 0.22385559976100922, 0.09521449357271194, 0.09804859757423401, 0.21554124355316162, -0.17455388605594635 ]
https://github.com/huggingface/datasets/issues/2319
UnicodeDecodeError for OSCAR (Afrikaans)
Thanks for reporting, @sgraaf. I am going to have a look at it. I guess the expected codec is "UTF-8". Normally, when no explicitly codec is passed, Python uses one which is platform-dependent. For Linux machines, the default codec is `utf_8`, which is OK. However for Windows machine, the default codec is `cp1252`, which causes the problem.
## Describe the bug When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`. ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("oscar", "unshuffled_deduplicated_af") ``` ## Expected results Anything but an error, really. ## Actual results ```python >>> from datasets import load_dataset >>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af") Downloading: 14.7kB [00:00, 4.91MB/s] Downloading: 3.07MB [00:00, 32.6MB/s] Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464... Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s] Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset builder_instance.download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare self._download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split for key, record in utils.tqdm( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__ for obj in iterable: File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples for line in f: File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined> ``` ## Versions Paste the output of the following code: ```python import datasets import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` - Datasets: 1.6.2 - Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] - Platform: Windows-10-10.0.19041-SP0
57
UnicodeDecodeError for OSCAR (Afrikaans) ## Describe the bug When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`. ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("oscar", "unshuffled_deduplicated_af") ``` ## Expected results Anything but an error, really. ## Actual results ```python >>> from datasets import load_dataset >>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af") Downloading: 14.7kB [00:00, 4.91MB/s] Downloading: 3.07MB [00:00, 32.6MB/s] Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464... Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s] Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset builder_instance.download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare self._download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split for key, record in utils.tqdm( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__ for obj in iterable: File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples for line in f: File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined> ``` ## Versions Paste the output of the following code: ```python import datasets import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` - Datasets: 1.6.2 - Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] - Platform: Windows-10-10.0.19041-SP0 Thanks for reporting, @sgraaf. I am going to have a look at it. I guess the expected codec is "UTF-8". Normally, when no explicitly codec is passed, Python uses one which is platform-dependent. For Linux machines, the default codec is `utf_8`, which is OK. However for Windows machine, the default codec is `cp1252`, which causes the problem.
[ -0.06944266706705093, -0.06897614896297455, -0.06865903735160828, 0.5462203621864319, 0.49986904859542847, 0.023580439388751984, 0.16044208407402039, 0.16006416082382202, -0.2532077431678772, 0.26161640882492065, 0.10814059525728226, 0.07456602156162262, -0.13298696279525757, -0.16212613880634308, 0.06945611536502838, -0.2411271035671234, 0.023873232305049896, -0.00958859920501709, 0.14905822277069092, -0.11387219280004501, -0.3042180836200714, 0.3047546148300171, -0.14670413732528687, 0.1465255320072174, -0.33820196986198425, 0.11707348376512527, 0.00472632609307766, 0.2575019299983978, -0.14145900309085846, -0.35236606001853943, 0.12809278070926666, 0.01631791517138481, 0.10694028437137604, 0.2742306888103485, -0.00011850486771436408, -0.054729364812374115, 0.4611515402793884, -0.13152562081813812, -0.3736705780029297, 0.04705214500427246, -0.2316296398639679, 0.16406773030757904, -0.10746590048074722, -0.06719742715358734, 0.17756476998329163, -0.28914108872413635, -0.06511958688497543, -0.5603590607643127, 0.01841602474451065, 0.32292285561561584, 0.17362447082996368, 0.11859749257564545, 0.18503804504871368, 0.05753208324313164, -0.18599209189414978, -0.10706603527069092, -0.014229487627744675, 0.09946395456790924, 0.24106673896312714, 0.16163110733032227, -0.0901435986161232, 0.1463269591331482, 0.1150418370962143, 0.08919484913349152, 0.12996402382850647, 0.07787521928548813, -0.18047690391540527, -0.24841323494911194, 0.3013787865638733, 0.15798509120941162, 0.34605294466018677, -0.4334867000579834, -0.3860435485839844, -0.3108890950679779, 0.19618654251098633, -0.5193536877632141, 0.5409898161888123, -0.02374759502708912, -0.11590300500392914, 0.23562565445899963, -0.0887800008058548, 0.0784841999411583, -0.17907191812992096, 0.2531140446662903, -0.2060510814189911, 0.04776843264698982, -0.24399828910827637, -0.006675906479358673, -0.15676264464855194, -0.10920809209346771, 0.07565764337778091, -0.3706624507904053, -0.05595659092068672, 0.34379011392593384, -0.17979365587234497, 0.14414198696613312, -0.06412481516599655, 0.16092851758003235, 0.2896225154399872, 0.2038012593984604, 0.19959832727909088, -0.005847495049238205, -0.37792104482650757, -0.04368272423744202, 0.1444806307554245, 0.35555577278137207, -0.05729065090417862, -0.03327032923698425, 0.2502485513687134, 0.3896278738975525, 0.07518364489078522, -0.003373008221387863, -0.13191530108451843, -0.20461708307266235, 0.2316858023405075, 0.0210267324000597, 0.5934264659881592, -0.2065746933221817, -0.2736482620239258, 0.29630768299102783, -0.1085711196064949, -0.13338476419448853, -0.13328206539154053, 0.10012175887823105, -0.18075309693813324, 0.20830273628234863, -0.14118506014347076, 0.2635082006454468, -0.09206200391054153, -0.3318832814693451, -0.1641351878643036, -0.2244986742734909, -0.0947449654340744, 0.10428818315267563, 0.00926940143108368, 0.002669118344783783, 0.18696165084838867, 0.043252721428871155, 0.30228251218795776, -0.0885128527879715, -0.07254577428102493, -0.17053185403347015, -0.013803631067276001, 0.01011364534497261, 0.054421793669462204, 0.24409280717372894, 0.044139713048934937, -0.4594566226005554, 0.03639791160821915, 0.09502291679382324, -0.036812588572502136, -0.2857242226600647, -0.19080646336078644, 0.14873909950256348, -0.1962006688117981, -0.05188153684139252, -0.24055451154708862, 0.27644506096839905, 0.1800580620765686, 0.05411339923739433, 0.2551347017288208, -0.016826633363962173, -0.08344312757253647, -0.13904502987861633, 0.24722421169281006, 0.5666906833648682, -0.34487101435661316, -0.04879229515790939, -0.12400905042886734, -0.20664724707603455, 0.34298473596572876, 0.2263723611831665, 0.052971214056015015, -0.0220634862780571, -0.3649470806121826, 0.1118098646402359, 0.12375202775001526, -0.24636529386043549, -0.5438917279243469, 0.18508851528167725, -0.06840711086988449, 0.506963849067688, 0.18173688650131226, -0.15870338678359985, 0.24529200792312622, -0.01069185882806778, 0.29009437561035156, 0.46723127365112305, -0.25063395500183105, -0.011268885806202888, -0.2532833516597748, -0.24511606991291046, 0.031422436237335205, 0.2176152616739273, 0.08907252550125122, 0.00023608654737472534, 0.13734710216522217, 0.20703285932540894, 0.38575440645217896, -0.10422882437705994, 0.19445432722568512, 0.12475784868001938, 0.011800792068243027, 0.3576551079750061, 0.06796436011791229, -0.22940829396247864, -0.28208640217781067, 0.2640695869922638, -0.0024936050176620483, 0.11335765570402145, -0.5008910894393921, -0.1440781056880951, -0.38416779041290283, -0.13324902951717377, -0.4603833258152008, -0.40797993540763855, 0.09587772190570831, 0.2784147262573242, 0.16993841528892517, 0.5170195698738098, -0.3551597595214844, 0.502051591873169, -0.04257398471236229, -0.0007118101930245757, -0.5245198607444763, 0.20138342678546906, 0.1213715448975563, -0.2475568950176239, -0.1367650330066681, 0.26052311062812805, -0.04194388538599014, -0.06012392416596413, -0.3732914626598358, 0.40056702494621277, -0.07182781398296356, 0.2017918825149536, 0.029642676934599876, -0.0306071937084198, 0.3568612337112427, -0.27305638790130615, -0.026399051770567894, 0.2786279618740082, 0.29033735394477844, -0.04511784017086029, 0.16480952501296997, 0.22450202703475952, 0.07797084748744965, 0.1424597203731537, 0.06972162425518036, -0.025678500533103943, 0.28910914063453674, 0.19158656895160675, -0.009791625663638115, -0.21682094037532806, 0.22168277204036713, -0.2710436284542084, 0.5030974745750427, 0.03324383124709129, -0.2335595339536667, -0.026674769818782806, 0.6612034440040588, -0.13731111586093903, 0.12679563462734222, 0.2621348202228546, -0.1895718276500702, 0.126520574092865, -0.1143815815448761, 0.19966541230678558, 0.383134126663208, -0.002865131478756666, -0.05375191196799278, 0.15426410734653473, 0.23309005796909332, -0.14166755974292755, 0.164642795920372, -0.06298533082008362, 0.2722622752189636, 0.14041320979595184, -0.10232964158058167, 0.09548468887805939, -0.43918153643608093, -0.25980639457702637, -0.15118470788002014, 0.2690090835094452, -0.30306476354599, 0.06400343030691147, -0.37966403365135193, -0.02069440297782421, -0.19044449925422668, 0.015479587949812412, -0.388627290725708, -0.18190445005893707, -0.13427996635437012, -0.02166980877518654, 0.03106103464961052, 0.11422708630561829, -0.3544093072414398, -0.00767749547958374, 0.04881101846694946, -0.11996971815824509, -0.20933648943901062, -0.10156665742397308, -0.3103105127811432, 0.043897595256567, 0.3231029212474823, -0.09265609830617905, 0.2462633103132248, -0.27653592824935913, -0.04185359552502632, -0.10760516673326492, -0.221381276845932, 0.08392790704965591, -0.04887150228023529, 0.042072080075740814, 0.004880920052528381, -0.10375313460826874, -0.12384462356567383, -0.21912109851837158, 0.24202746152877808, -0.0446108840405941, -0.27912580966949463, -0.032268423587083817, 0.22207039594650269, 0.028739264234900475, 0.08664104342460632, -0.13613730669021606, -0.28333014249801636, -0.2109612077474594, 0.19484733045101166, -0.07007895410060883, 0.006547447293996811, -0.004164234735071659, -0.1305137276649475, 0.20618556439876556, 0.05908290296792984, 0.03760869801044464, -0.31746938824653625, -0.15778113901615143, 0.4085604250431061, -0.3109961748123169, -0.35123807191848755, -0.1355368196964264, -0.08305452018976212, -0.018493618816137314, -0.05404064804315567, -0.292843222618103, -0.09805145859718323, -0.5101274847984314, 0.06375108659267426, -0.12376105785369873, -0.045739032328128815, 0.11907079815864563, -0.15750689804553986, 0.05766844004392624, -0.10939372330904007, -0.10194790363311768, -0.09936442226171494, -0.23059126734733582, 0.22410428524017334, 0.06220431998372078, 0.4960554838180542, 0.012193392962217331, 0.21265868842601776, 0.305753618478775, 0.21232128143310547, 0.5260175466537476, -0.07993346452713013, 0.1849852204322815, -0.12880662083625793, -0.18843188881874084, 0.22524000704288483, -0.08422352373600006, 0.012759063392877579, 0.27013325691223145, 0.02342294156551361, 0.051585711538791656, 0.005241859704256058, -0.04920315742492676, -0.4067458212375641, -0.2655234932899475, 0.022581977769732475, -0.2999831438064575, -0.031216107308864594, 0.030282318592071533, -0.043182406574487686, -0.042914748191833496, -0.004856894724071026, 0.05553620681166649, 0.2275542914867401, 0.11703817546367645, 0.03953448310494423, -0.013806898146867752, 0.4634617865085602, -0.4846140742301941, 0.19047880172729492, 0.21646420657634735, 0.3688199520111084, -0.18646202981472015, 0.10615736991167068, 0.16009268164634705, -0.015237906947731972, 0.5245285034179688, -0.2009747326374054, 0.045064229518175125, -0.02423468790948391, 0.021571263670921326, -0.15247268974781036, 0.005663532763719559, -0.19116394221782684, 0.08408662676811218, 0.07510392367839813, -0.05733385682106018, -0.3224108815193176, 0.12995953857898712, 0.2902527451515198, 0.1279779076576233, -0.24663662910461426, -0.05848444998264313, -0.27679383754730225, -0.6488555073738098, -0.4599301815032959, 0.044094689190387726, 0.17758332192897797, 0.6439515352249146, 0.03802298754453659, 0.036880720406770706, -0.37108659744262695, -0.11936428397893906, 0.2180916965007782, 0.22188591957092285, 0.20451685786247253, 0.052263274788856506, 0.1377333104610443, -0.030910737812519073, -0.15692880749702454, 0.13118210434913635, 0.7023576498031616, 0.15659983456134796, -0.8256701827049255, 0.012018385343253613, -0.39256808161735535, 0.2404540479183197, 0.30386245250701904, -0.3360860347747803, -0.08394236117601395, -0.08980625122785568, 0.04543513432145119, -0.2287011295557022, -0.04786510020494461, 0.30659785866737366, 0.1627945452928543, -0.3890807330608368, -0.35522329807281494, 0.30053430795669556, 0.1599298119544983, 0.1147744357585907, 0.32212576270103455, 0.6737316250801086, -0.3928648829460144, 0.3598775267601013, -0.1468220353126526, 0.8503291606903076, -0.066085085272789, 0.08335481584072113, 0.22860485315322876, -0.11413407325744629, 0.13198161125183105, 0.07750844955444336, -0.03396982699632645, -0.26988980174064636, -0.5620766282081604, -0.05720965936779976, 0.09152130782604218, 0.39200475811958313, 0.16317033767700195, 0.0972256064414978, 0.2071477472782135, 0.007596470415592194, -0.07478916645050049, 0.27386555075645447, -0.003466133028268814, -0.6421951651573181, -0.2249639928340912, -0.7355549335479736, 0.09701794385910034, -0.022478029131889343, 0.3151274621486664, -0.07143136858940125, -0.14029298722743988, -0.1581391543149948, -0.335146427154541, -0.3856024146080017, -0.015436735935509205, -0.3776579797267914, -0.09709835052490234, -0.1545855551958084, -0.11171337217092514, 0.14733350276947021, 0.4229150712490082, 0.6014970541000366, -0.06522952020168304, 0.09858426451683044, 0.19836950302124023, 0.002657674252986908, 0.044201094657182693, 0.08972139656543732, -0.05281659588217735, 0.2270963191986084, -0.15852731466293335, -0.2550155520439148, 0.11959465593099594, 0.10111803561449051, -0.1982206404209137, 0.05999977886676788, -0.009447358548641205, -0.0429215282201767, 0.00283240107819438, -0.2840367257595062, -0.36139827966690063, 0.08978164196014404, -0.11924213171005249, 0.09485761821269989, 0.12467961013317108, -0.19934117794036865, -0.0894744023680687, -0.08593213558197021, -0.2890740633010864, -0.1181161105632782, 0.3048836588859558, -0.0217159241437912, -0.26398414373397827, 0.5028190612792969, 0.1184292733669281, -0.0716889426112175, 0.005620207637548447, 0.13342413306236267, 0.38311171531677246, -0.7260900735855103, 0.10977337509393692, -0.12730847299098969, 0.15926818549633026, -0.4053402543067932, -0.07232518494129181, 0.159566730260849, -0.018026389181613922, 0.08944462239742279, -0.4488118588924408, -0.4160527288913727, 0.07441526651382446, 0.2130592167377472, 0.12939253449440002, 0.09544967859983444, -0.19234751164913177, -0.025034448131918907, -0.14229221642017365, -0.208950012922287, 0.15662595629692078, -0.03829196095466614, -0.026496469974517822, 0.1362142562866211, 0.021351415663957596, 0.3478311002254486, -0.024960899725556374, 0.12408161163330078, 0.33779972791671753, 0.14428214728832245, -0.15475326776504517, -0.24144501984119415, 0.17424827814102173, 0.003624705597758293, -0.2690988779067993, 0.12399963289499283, 0.06352529674768448, 0.057385124266147614, -0.2646684944629669, 0.35445207357406616, 0.26162710785865784, 0.07475169003009796, 0.0032805074006319046, 0.42728665471076965, 0.2713804543018341, -0.20361129939556122, 0.10371878743171692, -0.09778507053852081, 0.6526067852973938, 0.19914540648460388, 0.1095697283744812, 0.027504663914442062, 0.08971166610717773, 0.10373573750257492, -0.12805798649787903, -0.15351441502571106, 0.20417988300323486, 0.4038522243499756, -0.49516361951828003, 0.12440496683120728, 0.15537291765213013, 0.15477828681468964, 0.3628254532814026, -0.3015829920768738, -0.1846848577260971, 0.029059411957859993, 0.11142265051603317, -0.14724843204021454, -0.025015437975525856, 0.19781650602817535, -0.050647489726543427, -0.13735561072826385, 0.3244961202144623, 0.0133945532143116, 0.0463712215423584, -0.27315473556518555, 0.012783326208591461, 0.15477818250656128, 0.14349177479743958, 0.15688860416412354, 0.5182114243507385, 0.0003666318953037262, 0.1642683893442154, -0.034430600702762604, -0.014385886490345001, 0.0959053635597229, 0.6655550003051758, -0.44882500171661377, 0.39691677689552307, -0.3500705063343048, 0.17455445230007172, 0.0767894983291626, -0.4070475399494171, 0.08889889717102051, 0.10552048683166504, -0.18305662274360657, 0.3550572693347931, 0.3304253816604614, -0.0402153804898262, 0.03905826061964035, -0.024165082722902298, -0.17998382449150085, -0.003923162817955017, 0.07317287474870682, -0.06290365755558014, 0.24218657612800598, -0.0489676371216774, -0.49933043122291565, 0.04693266376852989, -0.22144460678100586, -0.0606454461812973, 0.14703132212162018, 0.14221742749214172, -0.20544980466365814, -0.45921745896339417, -0.06144159287214279, 0.09409946203231812, 0.31041091680526733, -0.14700059592723846, 0.2697259187698364, 0.5597765445709229, -0.05093088001012802, 0.0835062712430954, 0.32726582884788513, 0.3617148995399475, 0.3501303493976593, -0.09304395318031311, 0.2183515578508377, -0.17051950097084045, 0.09227250516414642, -0.04110453277826309, 0.31579792499542236, 0.033539995551109314, 0.29232004284858704, 0.17968735098838806, 0.11728718876838684, -0.061010509729385376, -0.11393210291862488, 0.1808076947927475, 0.06671872735023499, -0.16263167560100555, 0.5590110421180725, -0.24133241176605225, 0.33784225583076477, -0.43121272325515747, 0.11584829539060593, -0.42626962065696716, 0.05697048082947731, 0.10628348588943481, 0.04361567273736, 0.15222302079200745, -0.10871574282646179, 0.0243048258125782, 0.05841900035738945, 0.3454767167568207, 0.47331422567367554, -0.060936249792575836, -0.0635545402765274, -0.22807112336158752, -0.8209511041641235, 0.286754846572876, 0.07026302069425583, -0.05071993172168732, 0.007588205859065056, 0.06763157248497009, -0.15758013725280762, 0.22005972266197205, 0.18387822806835175, 0.38492119312286377, 0.05570940673351288, 0.42157724499702454, -0.2175576239824295, -0.36697807908058167, -0.03424894064664841, 0.0892869085073471, -0.15601301193237305, -0.231959730386734, 0.1906747817993164, -0.1902063637971878, 0.00891907513141632, -0.136299267411232, 0.017673268914222717, -0.39300599694252014, -0.30735263228416443, 0.2711995840072632, 0.49183645844459534, 0.3157922029495239, -0.20062720775604248, -0.10650552064180374, -0.3567884564399719, 0.051144130527973175, -0.05691712722182274, 0.7189376950263977, 0.07132992148399353, 0.3113733232021332, -0.0486295148730278, -0.30718550086021423, -0.39099299907684326, 0.6503092050552368, 0.013749007135629654, 0.001937227905727923, -0.33545058965682983, 0.2086787223815918, 0.006967514753341675, 0.1607425957918167, 0.1457739770412445, 0.28641054034233093, -0.18623435497283936, 0.3455357253551483, -0.016579128801822662, -0.5363336205482483, 0.4404788613319397, -0.38100510835647583, -0.2944442927837372, 0.040282394737005234, 0.19343702495098114, 0.38284051418304443, -0.3138975203037262, -0.5248434543609619, 0.3539696931838989, 0.2991940975189209, -0.1255299150943756, -0.1020759791135788, 0.13711266219615936, -0.049020059406757355, 0.03383030369877815, -0.14459213614463806, 0.3745255172252655, -0.0207863450050354, -0.08569539338350296, 0.5031967163085938, -0.31080520153045654 ]
https://github.com/huggingface/datasets/issues/2319
UnicodeDecodeError for OSCAR (Afrikaans)
@sgraaf, I have just merged the fix in the master branch. You can either: - install `datasets` from source code - wait until we make the next release of `datasets` - set the `utf-8` codec as your default instead of `cp1252`. This can be done by activating the Python [UTF-8 mode](https://www.python.org/dev/peps/pep-0540) either by passing the command-line option `-X utf8` or by setting the environment variable `PYTHONUTF8=1`.
## Describe the bug When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`. ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("oscar", "unshuffled_deduplicated_af") ``` ## Expected results Anything but an error, really. ## Actual results ```python >>> from datasets import load_dataset >>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af") Downloading: 14.7kB [00:00, 4.91MB/s] Downloading: 3.07MB [00:00, 32.6MB/s] Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464... Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s] Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset builder_instance.download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare self._download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split for key, record in utils.tqdm( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__ for obj in iterable: File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples for line in f: File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined> ``` ## Versions Paste the output of the following code: ```python import datasets import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` - Datasets: 1.6.2 - Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] - Platform: Windows-10-10.0.19041-SP0
66
UnicodeDecodeError for OSCAR (Afrikaans) ## Describe the bug When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`. ## Steps to reproduce the bug ```python from datasets import load_dataset dataset = load_dataset("oscar", "unshuffled_deduplicated_af") ``` ## Expected results Anything but an error, really. ## Actual results ```python >>> from datasets import load_dataset >>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af") Downloading: 14.7kB [00:00, 4.91MB/s] Downloading: 3.07MB [00:00, 32.6MB/s] Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464... Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 81.0/81.0 [00:00<00:00, 40.5kB/s] Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 66.0M/66.0M [00:18<00:00, 3.50MB/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset builder_instance.download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare self._download_and_prepare( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split for key, record in utils.tqdm( File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__ for obj in iterable: File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples for line in f: File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined> ``` ## Versions Paste the output of the following code: ```python import datasets import sys import platform print(f""" - Datasets: {datasets.__version__} - Python: {sys.version} - Platform: {platform.platform()} """) ``` - Datasets: 1.6.2 - Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] - Platform: Windows-10-10.0.19041-SP0 @sgraaf, I have just merged the fix in the master branch. You can either: - install `datasets` from source code - wait until we make the next release of `datasets` - set the `utf-8` codec as your default instead of `cp1252`. This can be done by activating the Python [UTF-8 mode](https://www.python.org/dev/peps/pep-0540) either by passing the command-line option `-X utf8` or by setting the environment variable `PYTHONUTF8=1`.
[ -0.06944266706705093, -0.06897614896297455, -0.06865903735160828, 0.5462203621864319, 0.49986904859542847, 0.023580439388751984, 0.16044208407402039, 0.16006416082382202, -0.2532077431678772, 0.26161640882492065, 0.10814059525728226, 0.07456602156162262, -0.13298696279525757, -0.16212613880634308, 0.06945611536502838, -0.2411271035671234, 0.023873232305049896, -0.00958859920501709, 0.14905822277069092, -0.11387219280004501, -0.3042180836200714, 0.3047546148300171, -0.14670413732528687, 0.1465255320072174, -0.33820196986198425, 0.11707348376512527, 0.00472632609307766, 0.2575019299983978, -0.14145900309085846, -0.35236606001853943, 0.12809278070926666, 0.01631791517138481, 0.10694028437137604, 0.2742306888103485, -0.00011850486771436408, -0.054729364812374115, 0.4611515402793884, -0.13152562081813812, -0.3736705780029297, 0.04705214500427246, -0.2316296398639679, 0.16406773030757904, -0.10746590048074722, -0.06719742715358734, 0.17756476998329163, -0.28914108872413635, -0.06511958688497543, -0.5603590607643127, 0.01841602474451065, 0.32292285561561584, 0.17362447082996368, 0.11859749257564545, 0.18503804504871368, 0.05753208324313164, -0.18599209189414978, -0.10706603527069092, -0.014229487627744675, 0.09946395456790924, 0.24106673896312714, 0.16163110733032227, -0.0901435986161232, 0.1463269591331482, 0.1150418370962143, 0.08919484913349152, 0.12996402382850647, 0.07787521928548813, -0.18047690391540527, -0.24841323494911194, 0.3013787865638733, 0.15798509120941162, 0.34605294466018677, -0.4334867000579834, -0.3860435485839844, -0.3108890950679779, 0.19618654251098633, -0.5193536877632141, 0.5409898161888123, -0.02374759502708912, -0.11590300500392914, 0.23562565445899963, -0.0887800008058548, 0.0784841999411583, -0.17907191812992096, 0.2531140446662903, -0.2060510814189911, 0.04776843264698982, -0.24399828910827637, -0.006675906479358673, -0.15676264464855194, -0.10920809209346771, 0.07565764337778091, -0.3706624507904053, -0.05595659092068672, 0.34379011392593384, -0.17979365587234497, 0.14414198696613312, -0.06412481516599655, 0.16092851758003235, 0.2896225154399872, 0.2038012593984604, 0.19959832727909088, -0.005847495049238205, -0.37792104482650757, -0.04368272423744202, 0.1444806307554245, 0.35555577278137207, -0.05729065090417862, -0.03327032923698425, 0.2502485513687134, 0.3896278738975525, 0.07518364489078522, -0.003373008221387863, -0.13191530108451843, -0.20461708307266235, 0.2316858023405075, 0.0210267324000597, 0.5934264659881592, -0.2065746933221817, -0.2736482620239258, 0.29630768299102783, -0.1085711196064949, -0.13338476419448853, -0.13328206539154053, 0.10012175887823105, -0.18075309693813324, 0.20830273628234863, -0.14118506014347076, 0.2635082006454468, -0.09206200391054153, -0.3318832814693451, -0.1641351878643036, -0.2244986742734909, -0.0947449654340744, 0.10428818315267563, 0.00926940143108368, 0.002669118344783783, 0.18696165084838867, 0.043252721428871155, 0.30228251218795776, -0.0885128527879715, -0.07254577428102493, -0.17053185403347015, -0.013803631067276001, 0.01011364534497261, 0.054421793669462204, 0.24409280717372894, 0.044139713048934937, -0.4594566226005554, 0.03639791160821915, 0.09502291679382324, -0.036812588572502136, -0.2857242226600647, -0.19080646336078644, 0.14873909950256348, -0.1962006688117981, -0.05188153684139252, -0.24055451154708862, 0.27644506096839905, 0.1800580620765686, 0.05411339923739433, 0.2551347017288208, -0.016826633363962173, -0.08344312757253647, -0.13904502987861633, 0.24722421169281006, 0.5666906833648682, -0.34487101435661316, -0.04879229515790939, -0.12400905042886734, -0.20664724707603455, 0.34298473596572876, 0.2263723611831665, 0.052971214056015015, -0.0220634862780571, -0.3649470806121826, 0.1118098646402359, 0.12375202775001526, -0.24636529386043549, -0.5438917279243469, 0.18508851528167725, -0.06840711086988449, 0.506963849067688, 0.18173688650131226, -0.15870338678359985, 0.24529200792312622, -0.01069185882806778, 0.29009437561035156, 0.46723127365112305, -0.25063395500183105, -0.011268885806202888, -0.2532833516597748, -0.24511606991291046, 0.031422436237335205, 0.2176152616739273, 0.08907252550125122, 0.00023608654737472534, 0.13734710216522217, 0.20703285932540894, 0.38575440645217896, -0.10422882437705994, 0.19445432722568512, 0.12475784868001938, 0.011800792068243027, 0.3576551079750061, 0.06796436011791229, -0.22940829396247864, -0.28208640217781067, 0.2640695869922638, -0.0024936050176620483, 0.11335765570402145, -0.5008910894393921, -0.1440781056880951, -0.38416779041290283, -0.13324902951717377, -0.4603833258152008, -0.40797993540763855, 0.09587772190570831, 0.2784147262573242, 0.16993841528892517, 0.5170195698738098, -0.3551597595214844, 0.502051591873169, -0.04257398471236229, -0.0007118101930245757, -0.5245198607444763, 0.20138342678546906, 0.1213715448975563, -0.2475568950176239, -0.1367650330066681, 0.26052311062812805, -0.04194388538599014, -0.06012392416596413, -0.3732914626598358, 0.40056702494621277, -0.07182781398296356, 0.2017918825149536, 0.029642676934599876, -0.0306071937084198, 0.3568612337112427, -0.27305638790130615, -0.026399051770567894, 0.2786279618740082, 0.29033735394477844, -0.04511784017086029, 0.16480952501296997, 0.22450202703475952, 0.07797084748744965, 0.1424597203731537, 0.06972162425518036, -0.025678500533103943, 0.28910914063453674, 0.19158656895160675, -0.009791625663638115, -0.21682094037532806, 0.22168277204036713, -0.2710436284542084, 0.5030974745750427, 0.03324383124709129, -0.2335595339536667, -0.026674769818782806, 0.6612034440040588, -0.13731111586093903, 0.12679563462734222, 0.2621348202228546, -0.1895718276500702, 0.126520574092865, -0.1143815815448761, 0.19966541230678558, 0.383134126663208, -0.002865131478756666, -0.05375191196799278, 0.15426410734653473, 0.23309005796909332, -0.14166755974292755, 0.164642795920372, -0.06298533082008362, 0.2722622752189636, 0.14041320979595184, -0.10232964158058167, 0.09548468887805939, -0.43918153643608093, -0.25980639457702637, -0.15118470788002014, 0.2690090835094452, -0.30306476354599, 0.06400343030691147, -0.37966403365135193, -0.02069440297782421, -0.19044449925422668, 0.015479587949812412, -0.388627290725708, -0.18190445005893707, -0.13427996635437012, -0.02166980877518654, 0.03106103464961052, 0.11422708630561829, -0.3544093072414398, -0.00767749547958374, 0.04881101846694946, -0.11996971815824509, -0.20933648943901062, -0.10156665742397308, -0.3103105127811432, 0.043897595256567, 0.3231029212474823, -0.09265609830617905, 0.2462633103132248, -0.27653592824935913, -0.04185359552502632, -0.10760516673326492, -0.221381276845932, 0.08392790704965591, -0.04887150228023529, 0.042072080075740814, 0.004880920052528381, -0.10375313460826874, -0.12384462356567383, -0.21912109851837158, 0.24202746152877808, -0.0446108840405941, -0.27912580966949463, -0.032268423587083817, 0.22207039594650269, 0.028739264234900475, 0.08664104342460632, -0.13613730669021606, -0.28333014249801636, -0.2109612077474594, 0.19484733045101166, -0.07007895410060883, 0.006547447293996811, -0.004164234735071659, -0.1305137276649475, 0.20618556439876556, 0.05908290296792984, 0.03760869801044464, -0.31746938824653625, -0.15778113901615143, 0.4085604250431061, -0.3109961748123169, -0.35123807191848755, -0.1355368196964264, -0.08305452018976212, -0.018493618816137314, -0.05404064804315567, -0.292843222618103, -0.09805145859718323, -0.5101274847984314, 0.06375108659267426, -0.12376105785369873, -0.045739032328128815, 0.11907079815864563, -0.15750689804553986, 0.05766844004392624, -0.10939372330904007, -0.10194790363311768, -0.09936442226171494, -0.23059126734733582, 0.22410428524017334, 0.06220431998372078, 0.4960554838180542, 0.012193392962217331, 0.21265868842601776, 0.305753618478775, 0.21232128143310547, 0.5260175466537476, -0.07993346452713013, 0.1849852204322815, -0.12880662083625793, -0.18843188881874084, 0.22524000704288483, -0.08422352373600006, 0.012759063392877579, 0.27013325691223145, 0.02342294156551361, 0.051585711538791656, 0.005241859704256058, -0.04920315742492676, -0.4067458212375641, -0.2655234932899475, 0.022581977769732475, -0.2999831438064575, -0.031216107308864594, 0.030282318592071533, -0.043182406574487686, -0.042914748191833496, -0.004856894724071026, 0.05553620681166649, 0.2275542914867401, 0.11703817546367645, 0.03953448310494423, -0.013806898146867752, 0.4634617865085602, -0.4846140742301941, 0.19047880172729492, 0.21646420657634735, 0.3688199520111084, -0.18646202981472015, 0.10615736991167068, 0.16009268164634705, -0.015237906947731972, 0.5245285034179688, -0.2009747326374054, 0.045064229518175125, -0.02423468790948391, 0.021571263670921326, -0.15247268974781036, 0.005663532763719559, -0.19116394221782684, 0.08408662676811218, 0.07510392367839813, -0.05733385682106018, -0.3224108815193176, 0.12995953857898712, 0.2902527451515198, 0.1279779076576233, -0.24663662910461426, -0.05848444998264313, -0.27679383754730225, -0.6488555073738098, -0.4599301815032959, 0.044094689190387726, 0.17758332192897797, 0.6439515352249146, 0.03802298754453659, 0.036880720406770706, -0.37108659744262695, -0.11936428397893906, 0.2180916965007782, 0.22188591957092285, 0.20451685786247253, 0.052263274788856506, 0.1377333104610443, -0.030910737812519073, -0.15692880749702454, 0.13118210434913635, 0.7023576498031616, 0.15659983456134796, -0.8256701827049255, 0.012018385343253613, -0.39256808161735535, 0.2404540479183197, 0.30386245250701904, -0.3360860347747803, -0.08394236117601395, -0.08980625122785568, 0.04543513432145119, -0.2287011295557022, -0.04786510020494461, 0.30659785866737366, 0.1627945452928543, -0.3890807330608368, -0.35522329807281494, 0.30053430795669556, 0.1599298119544983, 0.1147744357585907, 0.32212576270103455, 0.6737316250801086, -0.3928648829460144, 0.3598775267601013, -0.1468220353126526, 0.8503291606903076, -0.066085085272789, 0.08335481584072113, 0.22860485315322876, -0.11413407325744629, 0.13198161125183105, 0.07750844955444336, -0.03396982699632645, -0.26988980174064636, -0.5620766282081604, -0.05720965936779976, 0.09152130782604218, 0.39200475811958313, 0.16317033767700195, 0.0972256064414978, 0.2071477472782135, 0.007596470415592194, -0.07478916645050049, 0.27386555075645447, -0.003466133028268814, -0.6421951651573181, -0.2249639928340912, -0.7355549335479736, 0.09701794385910034, -0.022478029131889343, 0.3151274621486664, -0.07143136858940125, -0.14029298722743988, -0.1581391543149948, -0.335146427154541, -0.3856024146080017, -0.015436735935509205, -0.3776579797267914, -0.09709835052490234, -0.1545855551958084, -0.11171337217092514, 0.14733350276947021, 0.4229150712490082, 0.6014970541000366, -0.06522952020168304, 0.09858426451683044, 0.19836950302124023, 0.002657674252986908, 0.044201094657182693, 0.08972139656543732, -0.05281659588217735, 0.2270963191986084, -0.15852731466293335, -0.2550155520439148, 0.11959465593099594, 0.10111803561449051, -0.1982206404209137, 0.05999977886676788, -0.009447358548641205, -0.0429215282201767, 0.00283240107819438, -0.2840367257595062, -0.36139827966690063, 0.08978164196014404, -0.11924213171005249, 0.09485761821269989, 0.12467961013317108, -0.19934117794036865, -0.0894744023680687, -0.08593213558197021, -0.2890740633010864, -0.1181161105632782, 0.3048836588859558, -0.0217159241437912, -0.26398414373397827, 0.5028190612792969, 0.1184292733669281, -0.0716889426112175, 0.005620207637548447, 0.13342413306236267, 0.38311171531677246, -0.7260900735855103, 0.10977337509393692, -0.12730847299098969, 0.15926818549633026, -0.4053402543067932, -0.07232518494129181, 0.159566730260849, -0.018026389181613922, 0.08944462239742279, -0.4488118588924408, -0.4160527288913727, 0.07441526651382446, 0.2130592167377472, 0.12939253449440002, 0.09544967859983444, -0.19234751164913177, -0.025034448131918907, -0.14229221642017365, -0.208950012922287, 0.15662595629692078, -0.03829196095466614, -0.026496469974517822, 0.1362142562866211, 0.021351415663957596, 0.3478311002254486, -0.024960899725556374, 0.12408161163330078, 0.33779972791671753, 0.14428214728832245, -0.15475326776504517, -0.24144501984119415, 0.17424827814102173, 0.003624705597758293, -0.2690988779067993, 0.12399963289499283, 0.06352529674768448, 0.057385124266147614, -0.2646684944629669, 0.35445207357406616, 0.26162710785865784, 0.07475169003009796, 0.0032805074006319046, 0.42728665471076965, 0.2713804543018341, -0.20361129939556122, 0.10371878743171692, -0.09778507053852081, 0.6526067852973938, 0.19914540648460388, 0.1095697283744812, 0.027504663914442062, 0.08971166610717773, 0.10373573750257492, -0.12805798649787903, -0.15351441502571106, 0.20417988300323486, 0.4038522243499756, -0.49516361951828003, 0.12440496683120728, 0.15537291765213013, 0.15477828681468964, 0.3628254532814026, -0.3015829920768738, -0.1846848577260971, 0.029059411957859993, 0.11142265051603317, -0.14724843204021454, -0.025015437975525856, 0.19781650602817535, -0.050647489726543427, -0.13735561072826385, 0.3244961202144623, 0.0133945532143116, 0.0463712215423584, -0.27315473556518555, 0.012783326208591461, 0.15477818250656128, 0.14349177479743958, 0.15688860416412354, 0.5182114243507385, 0.0003666318953037262, 0.1642683893442154, -0.034430600702762604, -0.014385886490345001, 0.0959053635597229, 0.6655550003051758, -0.44882500171661377, 0.39691677689552307, -0.3500705063343048, 0.17455445230007172, 0.0767894983291626, -0.4070475399494171, 0.08889889717102051, 0.10552048683166504, -0.18305662274360657, 0.3550572693347931, 0.3304253816604614, -0.0402153804898262, 0.03905826061964035, -0.024165082722902298, -0.17998382449150085, -0.003923162817955017, 0.07317287474870682, -0.06290365755558014, 0.24218657612800598, -0.0489676371216774, -0.49933043122291565, 0.04693266376852989, -0.22144460678100586, -0.0606454461812973, 0.14703132212162018, 0.14221742749214172, -0.20544980466365814, -0.45921745896339417, -0.06144159287214279, 0.09409946203231812, 0.31041091680526733, -0.14700059592723846, 0.2697259187698364, 0.5597765445709229, -0.05093088001012802, 0.0835062712430954, 0.32726582884788513, 0.3617148995399475, 0.3501303493976593, -0.09304395318031311, 0.2183515578508377, -0.17051950097084045, 0.09227250516414642, -0.04110453277826309, 0.31579792499542236, 0.033539995551109314, 0.29232004284858704, 0.17968735098838806, 0.11728718876838684, -0.061010509729385376, -0.11393210291862488, 0.1808076947927475, 0.06671872735023499, -0.16263167560100555, 0.5590110421180725, -0.24133241176605225, 0.33784225583076477, -0.43121272325515747, 0.11584829539060593, -0.42626962065696716, 0.05697048082947731, 0.10628348588943481, 0.04361567273736, 0.15222302079200745, -0.10871574282646179, 0.0243048258125782, 0.05841900035738945, 0.3454767167568207, 0.47331422567367554, -0.060936249792575836, -0.0635545402765274, -0.22807112336158752, -0.8209511041641235, 0.286754846572876, 0.07026302069425583, -0.05071993172168732, 0.007588205859065056, 0.06763157248497009, -0.15758013725280762, 0.22005972266197205, 0.18387822806835175, 0.38492119312286377, 0.05570940673351288, 0.42157724499702454, -0.2175576239824295, -0.36697807908058167, -0.03424894064664841, 0.0892869085073471, -0.15601301193237305, -0.231959730386734, 0.1906747817993164, -0.1902063637971878, 0.00891907513141632, -0.136299267411232, 0.017673268914222717, -0.39300599694252014, -0.30735263228416443, 0.2711995840072632, 0.49183645844459534, 0.3157922029495239, -0.20062720775604248, -0.10650552064180374, -0.3567884564399719, 0.051144130527973175, -0.05691712722182274, 0.7189376950263977, 0.07132992148399353, 0.3113733232021332, -0.0486295148730278, -0.30718550086021423, -0.39099299907684326, 0.6503092050552368, 0.013749007135629654, 0.001937227905727923, -0.33545058965682983, 0.2086787223815918, 0.006967514753341675, 0.1607425957918167, 0.1457739770412445, 0.28641054034233093, -0.18623435497283936, 0.3455357253551483, -0.016579128801822662, -0.5363336205482483, 0.4404788613319397, -0.38100510835647583, -0.2944442927837372, 0.040282394737005234, 0.19343702495098114, 0.38284051418304443, -0.3138975203037262, -0.5248434543609619, 0.3539696931838989, 0.2991940975189209, -0.1255299150943756, -0.1020759791135788, 0.13711266219615936, -0.049020059406757355, 0.03383030369877815, -0.14459213614463806, 0.3745255172252655, -0.0207863450050354, -0.08569539338350296, 0.5031967163085938, -0.31080520153045654 ]
https://github.com/huggingface/datasets/issues/2318
[api request] API to obtain "dataset_module" dynamic path?
Hi @richardliaw, First, thanks for the compliments. In relation with your request, currently, the dynamic modules path is obtained this way: ```python from datasets.load import init_dynamic_modules, MODULE_NAME_FOR_DYNAMIC_MODULES dynamic_modules_path = init_dynamic_modules(MODULE_NAME_FOR_DYNAMIC_MODULES) ``` Let me know if it is OK for you this way. I could set `MODULE_NAME_FOR_DYNAMIC_MODULES` as default value, so that you could instead obtain the path with: ``` dynamic_modules_path = datasets.load.init_dynamic_modules() ```
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. This is an awesome library. It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import. I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof. **Describe the solution you'd like** A clear and concise description of what you want to happen. `datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case. By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently): https://github.com/huggingface/blog/issues/106 https://github.com/huggingface/transformers/issues/11565 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
63
[api request] API to obtain "dataset_module" dynamic path? **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. This is an awesome library. It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import. I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof. **Describe the solution you'd like** A clear and concise description of what you want to happen. `datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case. By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently): https://github.com/huggingface/blog/issues/106 https://github.com/huggingface/transformers/issues/11565 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35 Hi @richardliaw, First, thanks for the compliments. In relation with your request, currently, the dynamic modules path is obtained this way: ```python from datasets.load import init_dynamic_modules, MODULE_NAME_FOR_DYNAMIC_MODULES dynamic_modules_path = init_dynamic_modules(MODULE_NAME_FOR_DYNAMIC_MODULES) ``` Let me know if it is OK for you this way. I could set `MODULE_NAME_FOR_DYNAMIC_MODULES` as default value, so that you could instead obtain the path with: ``` dynamic_modules_path = datasets.load.init_dynamic_modules() ```
[ -0.10380283743143082, -0.27959850430488586, -0.13102859258651733, 0.05274331197142601, 0.3254470229148865, -0.2634877860546112, -0.0613955594599247, 0.156335711479187, -0.2127549946308136, 0.33938896656036377, -0.07494544237852097, 0.7778298258781433, -0.47252294421195984, 0.31665441393852234, 0.28366297483444214, -0.4223533272743225, -0.1075100228190422, 0.05030498653650284, -0.2626200318336487, 0.003611106425523758, -0.14287176728248596, 0.23162762820720673, -0.08478294312953949, 0.22677341103553772, 0.07575172930955887, -0.21094389259815216, -0.022832348942756653, 0.017517615109682083, -0.13803769648075104, -0.37461361289024353, 0.26952722668647766, 0.14970014989376068, 0.2535262405872345, 0.2199825942516327, -0.00010940770152956247, 0.06864222884178162, 0.09773357212543488, -0.06219172477722168, -0.38505440950393677, -0.5734556317329407, 0.14863258600234985, -0.13738910853862762, 0.1928839087486267, -0.28993695974349976, -0.06381715834140778, -0.27443835139274597, -0.053629353642463684, -0.76610267162323, 0.2912876605987549, 0.06330672651529312, 0.2035726010799408, 0.38369277119636536, -0.21158292889595032, 0.014116408303380013, 0.011168569326400757, 0.284567266702652, -0.13513153791427612, -0.17891259491443634, 0.1712045818567276, 0.14742648601531982, -0.006957575678825378, 0.2718312740325928, -0.08365916460752487, 0.11849354207515717, 0.5701006054878235, 0.092133529484272, -0.41811439394950867, -0.06294749677181244, 0.11640777438879013, 0.39293164014816284, 0.43417367339134216, -0.46057310700416565, -0.33858922123908997, -0.39742687344551086, -0.23871533572673798, -0.12985314428806305, 0.16842107474803925, 0.15412476658821106, -0.2948129177093506, 0.13816219568252563, 0.02806350588798523, -0.17098639905452728, -0.23884357511997223, -0.03655920922756195, 0.1353730410337448, 0.07218530774116516, 0.03380958363413811, 0.04925867170095444, 0.2138143628835678, -0.2562364339828491, 0.25304850935935974, 0.00013554468750953674, 0.16306844353675842, 0.35018056631088257, -0.13328562676906586, 0.04379451274871826, 0.2593627870082855, 0.008186444640159607, 0.09491900354623795, 0.15284141898155212, 0.08033344894647598, 0.07105782628059387, -0.13075023889541626, -0.0033430345356464386, 0.17435352504253387, -0.06883148849010468, 0.16670635342597961, 0.2662458121776581, 0.04227205365896225, 0.21005675196647644, 0.09439001977443695, -0.013966049998998642, -0.06580021232366562, 0.13379964232444763, -0.047394607216119766, -0.029538001865148544, 0.0953882485628128, 0.15124250948429108, -0.12863069772720337, -0.26749980449676514, -0.3199120759963989, -0.20023369789123535, 0.3884603679180145, 0.5135530233383179, -0.08287268877029419, 0.08631175756454468, 0.21518589556217194, -0.28000330924987793, 0.11290647834539413, 0.048619043081998825, -0.12347166240215302, 0.19003139436244965, -0.18802163004875183, 0.18269981443881989, 0.13368353247642517, -0.1558956503868103, 0.3612346351146698, -0.2448180764913559, 0.2501978576183319, -0.03754298388957977, 0.10975678265094757, 0.21152178943157196, 0.29102396965026855, 0.08668522536754608, -0.0058068037033081055, -0.014547455124557018, -0.22157175838947296, 0.11930209398269653, -0.4832940101623535, 0.04276535287499428, -0.26139211654663086, -0.497882217168808, 0.02840518020093441, 0.15068559348583221, -0.17734089493751526, -0.10171633958816528, -0.2653224468231201, 0.15636073052883148, -0.3528118431568146, 0.09600628912448883, -0.053051017224788666, 0.047422174364328384, -0.27007973194122314, -0.1650846153497696, 0.27395856380462646, 0.34995943307876587, -0.06291908025741577, -0.2511390745639801, 0.03230655565857887, 0.02007736638188362, -0.17057010531425476, -0.050362471491098404, -0.48098233342170715, 0.21720105409622192, -0.19956360757350922, 0.11189021170139313, 0.42433619499206543, -0.366273432970047, 0.19246022403240204, -0.04597482085227966, -0.05921810492873192, -0.2813168466091156, 0.09992046654224396, -0.06422586739063263, 0.08950269967317581, 0.036625105887651443, 0.19060975313186646, 0.46794557571411133, 0.2107553482055664, -0.05199386179447174, 0.06231645122170448, -0.4383769929409027, -0.13210518658161163, 0.05691385641694069, 0.0535726360976696, -0.09808734804391861, 0.04205043986439705, -0.0495755709707737, 0.5005156397819519, -0.09349720180034637, -0.04792407900094986, 0.2800541818141937, 0.28261899948120117, 0.26249486207962036, 0.21902085840702057, -0.4658498167991638, -0.1698419153690338, 0.200321763753891, -0.18068446218967438, 0.004847191274166107, -0.20051293075084686, -0.18833038210868835, 0.010718507692217827, 0.23749835789203644, 0.04301517456769943, 0.2332785427570343, 0.11274436116218567, -0.07299469411373138, -0.0062705278396606445, -0.08526603132486343, -0.4607093632221222, 0.08592671155929565, -0.2912898063659668, 0.10093164443969727, -0.2687899172306061, 0.2666114270687103, 0.16655513644218445, 0.011388272047042847, -0.0941932275891304, 0.30638784170150757, 0.08049704134464264, -0.15951532125473022, 0.0663159042596817, 0.18532755970954895, 0.13832630217075348, 0.1945548951625824, -0.0541788786649704, 0.4117593765258789, 0.13059642910957336, -0.049793899059295654, 0.12477673590183258, -0.17005451023578644, 0.06358278542757034, 0.33434075117111206, 0.2617131769657135, 0.4313473701477051, -0.3116966784000397, 0.33641791343688965, 0.2746242880821228, 0.1848139613866806, 0.23390129208564758, -0.0022997818887233734, -0.30905577540397644, -0.06686078757047653, 0.10556185245513916, 0.17880205810070038, 0.023214813321828842, -0.21779727935791016, -0.2678338289260864, 0.1311514526605606, 0.2675950527191162, 0.03701614961028099, -0.014340966939926147, -0.08250004798173904, -0.12225278466939926, 0.09929058700799942, 0.14312367141246796, 0.4640800654888153, 0.20166277885437012, 0.3723668158054352, -0.031185556203126907, 0.10351443290710449, -0.16544616222381592, 0.08274637162685394, 0.5085877180099487, 0.5266928672790527, 0.04208901897072792, -0.3552265465259552, -0.031501367688179016, 0.07654567807912827, -0.19072780013084412, -0.36461684107780457, -0.15555943548679352, -0.05878119915723801, -0.367933988571167, 0.21997056901454926, -0.454675555229187, -0.047317985445261, -0.6218681335449219, -0.5643892884254456, 0.017871957272291183, 0.13210375607013702, -0.06039583683013916, -0.399985134601593, -0.1962890923023224, 0.19784416258335114, 0.0772591233253479, 0.22251929342746735, -0.21028314530849457, -0.5583544969558716, -0.07305573672056198, -0.10398891568183899, -0.11129636317491531, -0.003900812938809395, 0.10099685192108154, 0.11626294255256653, 0.4589594304561615, -0.0660969614982605, 0.15453657507896423, -0.28303781151771545, -0.2296133041381836, 0.42073777318000793, 0.04601164162158966, 0.07392331957817078, 0.3897778391838074, 0.009835630655288696, 0.21226052939891815, -0.1580744981765747, 0.07670892030000687, -0.05473415553569794, -0.11321131139993668, -0.39929261803627014, 0.08760925382375717, 0.06435748189687729, -0.08761347830295563, -0.3364677131175995, -0.2850176692008972, -0.24045950174331665, 0.13169127702713013, 0.022004909813404083, 0.34126949310302734, 0.38664954900741577, 0.07746802270412445, 0.19769756495952606, -0.39721375703811646, 0.31309083104133606, -0.07436278462409973, -0.025256477296352386, 0.16581934690475464, -0.06371495872735977, -0.2479182928800583, 0.186742901802063, -0.13976721465587616, 0.38257983326911926, 0.22263234853744507, -0.1746671199798584, -0.5577770471572876, 0.07609961181879044, 0.37837302684783936, -0.11571764945983887, 0.15714241564273834, 0.4352737069129944, 0.3465404212474823, -0.0645098090171814, -0.0938563346862793, -0.6340898871421814, 0.37883731722831726, -0.043132491409778595, 0.1673593372106552, 0.25104811787605286, 0.346708208322525, 0.17774394154548645, 0.7528588771820068, -0.18175208568572998, -0.423645555973053, 0.031147342175245285, -0.1504567414522171, 0.19737014174461365, 0.2868959307670593, -0.21597789227962494, -0.3330320119857788, -0.23817121982574463, -0.08345083892345428, 0.0249340683221817, 0.17994150519371033, -0.0035559888929128647, -0.25610387325286865, -0.02425895631313324, -0.02540608122944832, -0.2009701430797577, -0.06101621687412262, 0.14947491884231567, 0.4692336320877075, 0.20796437561511993, 0.26383018493652344, -0.4698406457901001, 0.05715648829936981, 0.22765137255191803, 0.11292295157909393, 0.0671459287405014, 0.028981314972043037, -0.0694202184677124, -0.08377774059772491, -0.030762366950511932, 0.21286027133464813, 0.23312243819236755, 0.06382305920124054, 0.07852514088153839, -0.047477949410676956, 0.357979953289032, 0.08620037883520126, 0.3167366087436676, 0.42521780729293823, -0.15990297496318817, -0.1514628380537033, -0.24113225936889648, -0.07016903162002563, 0.044503454118967056, -0.02675766311585903, 0.03909295052289963, 0.11335998773574829, 0.3360707759857178, -0.22086873650550842, -0.4445352256298065, 0.08324816823005676, 0.18014180660247803, -0.12731467187404633, 0.043291207402944565, -0.12547138333320618, -0.6150273680686951, -0.10434424132108688, -0.1816941201686859, 0.14103423058986664, 0.27521008253097534, 0.369733989238739, -0.1323629915714264, 0.010732007212936878, -0.18002009391784668, 0.14552870392799377, -0.09181573987007141, 0.4292837977409363, 0.04626559093594551, 0.2616250216960907, 0.3307573199272156, 0.42090940475463867, -0.21784968674182892, 0.216370090842247, -0.35479769110679626, -0.04975707828998566, -0.14117777347564697, 0.23595760762691498, 0.052950337529182434, 0.45033323764801025, -0.0923171415925026, 0.5791484117507935, 0.3868657946586609, -0.08148247003555298, -0.3159944415092468, 0.06038811430335045, 0.15940327942371368, -0.08599697053432465, 0.11713624000549316, -0.8254063725471497, 0.7735912799835205, -0.056127119809389114, -0.26546546816825867, 0.4140821099281311, 0.3090516924858093, -0.433861643075943, 0.06316529214382172, 0.5055977702140808, 0.8474010229110718, 0.07518541812896729, -0.07531873881816864, 0.44539546966552734, -0.4670106768608093, 0.23780319094657898, 0.2643939256668091, 0.1760016530752182, -0.23170731961727142, 0.2607174217700958, -0.18777839839458466, -0.19118525087833405, 0.04613930732011795, -0.23411749303340912, 0.21798112988471985, 0.1462671160697937, 0.4515363574028015, 0.14330141246318817, 0.10414200276136398, 0.25372493267059326, -0.08491730690002441, -0.3625345230102539, -0.45065534114837646, 0.06464038789272308, -0.19806192815303802, 0.08239830285310745, 0.07960208505392075, -0.3622605800628662, 0.1989409327507019, -0.2618870139122009, -0.0911213755607605, -0.3854856789112091, -0.6159558892250061, 0.3089274764060974, 0.4366495609283447, -0.2593914866447449, 0.23124068975448608, 0.03099784627556801, -0.014426693320274353, 0.02178018167614937, -0.340482622385025, 0.33221814036369324, -0.14134836196899414, -0.26050788164138794, -0.10247614979743958, 0.05963288992643356, 0.27457600831985474, -0.027484804391860962, -0.03142986446619034, 0.09809698164463043, -0.10363532602787018, -0.16282111406326294, -0.19837406277656555, 0.23523464798927307, 0.43401575088500977, 0.04718570411205292, 0.2335907369852066, 0.23979222774505615, 0.40198612213134766, 0.010730348527431488, 0.11450241506099701, 0.1893703192472458, -0.1899375170469284, 0.22910988330841064, 0.2565893530845642, 0.04988023638725281, -0.08177375793457031, 0.3258645534515381, -0.03609750419855118, -0.3304721713066101, 0.4503823220729828, 0.03441782668232918, -0.1876455396413803, -0.07338544726371765, 0.08446218818426132, -0.14190173149108887, -0.3722998797893524, 0.12869851291179657, 0.13306236267089844, 0.002737283706665039, 0.02277281880378723, 0.2405538558959961, 0.12045909464359283, -0.20282435417175293, -0.4959557354450226, 0.050029367208480835, -0.09931197017431259, 0.2616819441318512, -0.48729363083839417, 0.17828522622585297, 0.04668460041284561, 0.10944962501525879, -0.1473509967327118, -0.24231144785881042, -0.33223283290863037, 0.16974976658821106, 0.07562703639268875, -0.23471182584762573, -0.009939741343259811, -0.04835135489702225, 0.10358809679746628, 0.019610712304711342, 0.020668616518378258, -0.1674187034368515, -0.3417082726955414, -0.10541732609272003, -0.2636522054672241, 0.12907405197620392, -0.2934764325618744, 0.2898745536804199, -0.2584206163883209, -0.44296038150787354, -0.31155380606651306, -0.09174003452062607, -0.16577236354351044, 0.25444096326828003, 0.016520347446203232, -0.2909928262233734, -0.10057681798934937, -0.18206831812858582, -0.18976035714149475, 0.18602930009365082, 0.06411183625459671, 0.10852829366922379, 0.3473660349845886, 0.317405104637146, -0.1919293850660324, -0.1394948959350586, 0.06713798642158508, 0.2283720076084137, 0.020500488579273224, -0.24999433755874634, 0.2506271004676819, -0.01825859397649765, -0.2987315058708191, 0.11558729410171509, 0.25331342220306396, 0.06984244287014008, -0.18621926009655, 0.024839354678988457, 0.3518092930316925, 0.14764948189258575, -0.21638552844524384, -0.13724322617053986, -0.15965276956558228, 0.027729127556085587, 0.15892933309078217, 0.47510087490081787, 0.3294624388217926, 0.044688448309898376, 0.2192893773317337, 0.15908917784690857, 0.4575742483139038, -0.08401806652545929, -0.020297061651945114, 0.2867107689380646, 0.11166124045848846, 0.09877350181341171, 0.3216606378555298, 0.4595407545566559, 0.46844545006752014, 0.37039780616760254, -0.4155920147895813, 0.6599218249320984, 0.09692184627056122, -0.10937105119228363, 0.0021115541458129883, -0.2432086169719696, 0.09895315021276474, -0.020932883024215698, 0.12559419870376587, -0.03712703287601471, -0.14755699038505554, 0.6019271612167358, -0.3544935882091522, 0.1671014428138733, -0.2633249759674072, 0.1947581022977829, 0.03362399339675903, -0.17142724990844727, -0.010801224038004875, -0.26243945956230164, -0.31314224004745483, -0.14378084242343903, 0.35064589977264404, -0.22711162269115448, 0.03827285021543503, -0.26725685596466064, 0.13633519411087036, -0.009171683341264725, -0.24296912550926208, 0.23161131143569946, 0.007791601121425629, -0.22233915328979492, -0.03140643239021301, 0.028665825724601746, -0.18289422988891602, 0.010714873671531677, -0.03490574657917023, 0.04109147936105728, 0.1311836838722229, -0.151045024394989, -0.0708308070898056, 0.01413164846599102, 0.054567329585552216, 0.019732587039470673, -0.0278933122754097, -0.15380163490772247, 0.35287606716156006, 0.3085976839065552, 0.09753375500440598, -0.11884793639183044, -0.07746890187263489, 0.03322634845972061, 0.3475913405418396, -0.30833232402801514, 0.6529908180236816, 0.061726491898298264, 0.1379266381263733, -0.16299325227737427, 0.011335000395774841, -0.33208397030830383, 0.06550901383161545, 0.24147696793079376, -0.16518047451972961, -0.09607019275426865, 0.07346781343221664, 0.06962106376886368, -0.017302438616752625, 0.23458783328533173, 0.13162802159786224, 0.29447272419929504, 0.016361158341169357, -0.09264431893825531, -0.42934778332710266, -0.2535049617290497, 0.2615568935871124, -0.16904541850090027, 0.12746475636959076, 0.05330735445022583, 0.22373628616333008, 0.0018428973853588104, 0.15082255005836487, -0.22550448775291443, 0.14243322610855103, -0.015665821731090546, -0.2573006749153137, -0.1917869597673416, 0.05972674489021301, 0.08317381143569946, 0.04799823462963104, -0.052540287375450134, -0.26359283924102783, -0.24785110354423523, -0.09970695525407791, -0.32850486040115356, 0.1265520602464676, 0.10371959209442139, -0.329054057598114, 0.2502272129058838, -0.14273032546043396, -0.007658682763576508, 0.08105451613664627, 0.14883539080619812, -0.24456971883773804, -0.04709769785404205, 0.0524006150662899, -0.298713356256485, 0.12479689717292786, 0.16304105520248413, -0.12118463218212128, -0.22238291800022125, -0.44878271222114563, 0.058084096759557724, 0.2074410766363144, 0.02704690955579281, -0.11675021797418594, 0.14393353462219238, -0.40633487701416016, 0.02888721041381359, 0.15213416516780853, 0.1841321587562561, 0.01817777380347252, 0.1298266500234604, -0.27009350061416626, -0.21299800276756287, 0.7706233263015747, -0.6101852059364319, -0.1864350438117981, -0.02916237711906433, 0.33870917558670044, 0.13100118935108185, -0.0895153284072876, -0.6234184503555298, -0.07834386080503464, 0.24261176586151123, -0.1379643976688385, 0.002424430102109909, 0.12771762907505035, -0.1117192953824997, 0.17596882581710815, -0.08842525631189346, -0.22517183423042297, 0.07193925976753235, -0.07472306489944458, -0.10609170794487, -0.1518387794494629 ]
https://github.com/huggingface/datasets/issues/2318
[api request] API to obtain "dataset_module" dynamic path?
Hi @richardliaw, the feature is on the master branch and will be included in the next release in a couple of weeks.
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. This is an awesome library. It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import. I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof. **Describe the solution you'd like** A clear and concise description of what you want to happen. `datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case. By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently): https://github.com/huggingface/blog/issues/106 https://github.com/huggingface/transformers/issues/11565 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
22
[api request] API to obtain "dataset_module" dynamic path? **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. This is an awesome library. It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import. I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof. **Describe the solution you'd like** A clear and concise description of what you want to happen. `datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case. By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently): https://github.com/huggingface/blog/issues/106 https://github.com/huggingface/transformers/issues/11565 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34 https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35 Hi @richardliaw, the feature is on the master branch and will be included in the next release in a couple of weeks.
[ -0.12703967094421387, -0.22530508041381836, -0.13680411875247955, 0.12058623135089874, 0.2940096855163574, -0.30054885149002075, -0.0833771675825119, 0.17474979162216187, -0.21367311477661133, 0.3675937354564667, -0.06890176236629486, 0.7768816947937012, -0.4621841013431549, 0.37769049406051636, 0.2999115288257599, -0.4458761513233185, -0.09753557294607162, 0.006740249693393707, -0.3226861357688904, 0.017641253769397736, -0.10135895758867264, 0.23570021986961365, -0.049480266869068146, 0.21503840386867523, -0.0331292487680912, -0.22710567712783813, -0.02159903571009636, -0.03240777552127838, -0.21541817486286163, -0.30632221698760986, 0.2938263416290283, 0.0977499783039093, 0.24194619059562683, 0.25494909286499023, -0.00010971690790029243, 0.039927609264850616, 0.0869925320148468, -0.0253265630453825, -0.38921231031417847, -0.5852146148681641, 0.08699136227369308, -0.05274410545825958, 0.22320415079593658, -0.2114183008670807, -0.05715557560324669, -0.22863632440567017, -0.03880157321691513, -0.7245184183120728, 0.3127937912940979, 0.09709719568490982, 0.18637849390506744, 0.35255107283592224, -0.24612659215927124, -0.060868918895721436, 0.026319384574890137, 0.3660181164741516, -0.17906196415424347, -0.22310565412044525, 0.24396885931491852, 0.1758078932762146, -0.09021543711423874, 0.27939313650131226, -0.014709612354636192, 0.08540916442871094, 0.575478732585907, 0.08735236525535583, -0.5218423008918762, -0.007882621139287949, 0.1398223340511322, 0.45704036951065063, 0.49785202741622925, -0.45486506819725037, -0.3124946355819702, -0.34358376264572144, -0.21025796234607697, -0.0611950159072876, 0.24329882860183716, 0.16186702251434326, -0.31920889019966125, 0.1748105138540268, 0.006441965699195862, -0.2058248221874237, -0.29678797721862793, -0.04776787757873535, 0.17248491942882538, 0.045236580073833466, 0.012845927849411964, 0.010140355676412582, 0.2376508116722107, -0.2335125058889389, 0.2568746507167816, -0.008771859109401703, 0.1329410970211029, 0.3248988091945648, -0.16874559223651886, -0.05096626281738281, 0.24470004439353943, 0.034773290157318115, 0.12263698130846024, 0.1836780607700348, 0.10958030819892883, 0.10452613234519958, -0.20027485489845276, 0.005132392048835754, 0.21680095791816711, -0.054262999445199966, 0.16836100816726685, 0.16423261165618896, 0.043715786188840866, 0.15696685016155243, 0.07528288662433624, 0.0036234408617019653, -0.026298504322767258, 0.2485630214214325, -0.16839852929115295, -0.06846091151237488, -0.053635597229003906, 0.0930318683385849, -0.09802564978599548, -0.27278974652290344, -0.22848165035247803, -0.24643751978874207, 0.4020061194896698, 0.5189787149429321, -0.010353794321417809, 0.003271818161010742, 0.13467536866664886, -0.30617809295654297, 0.1540815383195877, 0.034251634031534195, -0.1328786313533783, 0.17006845772266388, -0.19645893573760986, 0.2172747403383255, 0.12511999905109406, -0.16178274154663086, 0.37573933601379395, -0.2147461622953415, 0.20801210403442383, -0.014688726514577866, 0.14038044214248657, 0.2258152812719345, 0.3021252155303955, 0.056196343153715134, 0.0005961097776889801, -0.07953038811683655, -0.19606135785579681, 0.1319366693496704, -0.4790396988391876, 0.0572814978659153, -0.2756037414073944, -0.5086502432823181, -0.05313453823328018, 0.1233094185590744, -0.15178976953029633, -0.1602446585893631, -0.2275245189666748, 0.2502953112125397, -0.4091584384441376, 0.06682229042053223, -0.04626535624265671, 0.12058064341545105, -0.2515675127506256, -0.14176435768604279, 0.16248954832553864, 0.31916195154190063, -0.057371631264686584, -0.26679760217666626, 0.010613583028316498, 0.02054503932595253, -0.2142791450023651, 0.014971138909459114, -0.49762633442878723, 0.15955904126167297, -0.2514198124408722, 0.2069934755563736, 0.46552401781082153, -0.3496898412704468, 0.19791142642498016, -0.04963209107518196, -0.12055909633636475, -0.3511769473552704, 0.1423153579235077, -0.017861751839518547, 0.05054575949907303, 0.022112203761935234, 0.19192346930503845, 0.4152491092681885, 0.18337740004062653, -0.06524156779050827, 0.10884834825992584, -0.5048277378082275, -0.19160394370555878, 0.034743182361125946, -0.028198514133691788, -0.1110483780503273, 0.13135989010334015, -0.07483400404453278, 0.4719238877296448, -0.128628671169281, -0.06478920578956604, 0.25739288330078125, 0.2756948471069336, 0.2501278519630432, 0.16383560001850128, -0.5089278817176819, -0.1832364797592163, 0.13451170921325684, -0.2234836220741272, 0.02076202630996704, -0.12531894445419312, -0.2170516550540924, 0.05467811971902847, 0.22688892483711243, 0.10634420812129974, 0.2143794298171997, 0.08871980011463165, -0.053228989243507385, -0.019846729934215546, -0.09948858618736267, -0.5061219930648804, -0.006590249016880989, -0.3069559931755066, 0.1298152655363083, -0.2599508762359619, 0.26359009742736816, 0.19460971653461456, 0.04408658668398857, -0.04457396641373634, 0.2768550217151642, 0.03263208642601967, -0.15020854771137238, 0.06560532748699188, 0.1314009428024292, 0.1356823593378067, 0.1755422055721283, 0.08025160431861877, 0.4977862238883972, 0.14470624923706055, -0.05005350708961487, 0.16893549263477325, -0.22263333201408386, 0.01655714586377144, 0.2989404499530792, 0.16988815367221832, 0.39695870876312256, -0.2993742525577545, 0.308268278837204, 0.2743920087814331, 0.17109407484531403, 0.2389402687549591, 0.02417217567563057, -0.26816803216934204, -0.06899647414684296, 0.149483785033226, 0.14697213470935822, 0.020416047424077988, -0.18658208847045898, -0.23666270077228546, 0.15106822550296783, 0.3428981602191925, 0.0796985775232315, 0.02295050024986267, -0.015531226992607117, -0.15068122744560242, 0.06352600455284119, 0.17809803783893585, 0.4427553713321686, 0.20155549049377441, 0.38403087854385376, -0.03423565998673439, 0.0657881423830986, -0.14357401430606842, 0.04261589050292969, 0.4801454246044159, 0.48440271615982056, 0.04770287498831749, -0.3410336375236511, -0.06740327179431915, 0.06696001440286636, -0.3018413782119751, -0.3176440894603729, -0.14285075664520264, -0.051854513585567474, -0.28323617577552795, 0.14953672885894775, -0.46630170941352844, -0.08191433548927307, -0.6571822166442871, -0.4793888330459595, -0.009638890624046326, 0.14387869834899902, -0.007634267210960388, -0.40433138608932495, -0.2307155281305313, 0.17389118671417236, 0.07144303619861603, 0.3288934528827667, -0.25182411074638367, -0.5264748930931091, -0.11426632106304169, -0.08893198519945145, -0.14209017157554626, 0.008148983120918274, 0.17665664851665497, 0.11476646363735199, 0.4805985987186432, 0.013150649145245552, 0.24696435034275055, -0.3617055118083954, -0.32568830251693726, 0.454202264547348, 0.07819939404726028, 0.09404736012220383, 0.36397087574005127, -0.013456776738166809, 0.15102772414684296, -0.14865605533123016, 0.07467605173587799, -0.045493997633457184, -0.12301155924797058, -0.4061354100704193, 0.10909882932901382, 0.08520334213972092, -0.05791700258851051, -0.3914552330970764, -0.27097323536872864, -0.20694774389266968, 0.19162747263908386, -0.028917299583554268, 0.3386308550834656, 0.33398041129112244, 0.09316203743219376, 0.2643848657608032, -0.4949840009212494, 0.25379809737205505, -0.10228867083787918, -0.047817569226026535, 0.10193191468715668, -0.06081848964095116, -0.2543386220932007, 0.18368731439113617, -0.11268721520900726, 0.36603793501853943, 0.17417970299720764, -0.24804282188415527, -0.5372390747070312, 0.09461311250925064, 0.41211196780204773, -0.05866069346666336, 0.11670829355716705, 0.4918672442436218, 0.31787294149398804, -0.0698457807302475, -0.07448652386665344, -0.6162248253822327, 0.3979552090167999, -0.08524119108915329, 0.20723822712898254, 0.22337931394577026, 0.31122922897338867, 0.19015070796012878, 0.7600686550140381, -0.15962252020835876, -0.4256860017776489, 0.06012236699461937, -0.17407287657260895, 0.2207658439874649, 0.23390519618988037, -0.21579165756702423, -0.2629828453063965, -0.2709939777851105, -0.09546951949596405, 0.0814521536231041, 0.21048510074615479, 0.0039519052952528, -0.24970965087413788, -0.023826785385608673, 0.026484772562980652, -0.168685182929039, -0.0031427238136529922, 0.1982589215040207, 0.4025060534477234, 0.22803163528442383, 0.25617632269859314, -0.4469815492630005, 0.05590598285198212, 0.23703257739543915, 0.1111944168806076, 0.12084951996803284, 0.019923212006688118, -0.15645453333854675, -0.1482182741165161, -0.005032442510128021, 0.22132441401481628, 0.2344178855419159, 0.047856997698545456, -0.008419875055551529, -0.0040326789021492004, 0.35663992166519165, 0.11688969284296036, 0.3550269603729248, 0.39040812849998474, -0.2318376749753952, -0.2277093529701233, -0.2749609351158142, -0.011278888210654259, 0.12913668155670166, -0.017263364046812057, 0.06350481510162354, 0.08766639232635498, 0.4194372296333313, -0.189955472946167, -0.44520434737205505, 0.1105928122997284, 0.09969784319400787, -0.08707842975854874, 0.03658721223473549, -0.043614912778139114, -0.5624927878379822, -0.05764239281415939, -0.15273568034172058, 0.12153161317110062, 0.2176291048526764, 0.35443025827407837, -0.19247347116470337, 0.03192657232284546, -0.1500052511692047, 0.10502804070711136, -0.18432267010211945, 0.40257975459098816, 0.05085162818431854, 0.22763872146606445, 0.31493571400642395, 0.4919915497303009, -0.19027505815029144, 0.17152360081672668, -0.3597525954246521, 0.006576038897037506, -0.0965791717171669, 0.20528888702392578, 0.10156892985105515, 0.4806373715400696, -0.032594867050647736, 0.5874004364013672, 0.4865582287311554, -0.09475472569465637, -0.2769838273525238, 0.03235377371311188, 0.15814800560474396, -0.07755842804908752, 0.11043858528137207, -0.7509757876396179, 0.8524296283721924, -0.01808244362473488, -0.231294646859169, 0.4544396698474884, 0.28541475534439087, -0.3981999456882477, 0.030144985765218735, 0.5078805088996887, 0.8721261620521545, 0.12425152212381363, -0.03769193962216377, 0.4104696810245514, -0.49999624490737915, 0.30508941411972046, 0.17630071938037872, 0.18139293789863586, -0.2525947690010071, 0.20593895018100739, -0.22533118724822998, -0.23106849193572998, 0.055406875908374786, -0.21092210710048676, 0.22301775217056274, 0.0626593604683876, 0.4559394121170044, 0.2968802750110626, 0.11577696353197098, 0.2567680776119232, -0.1493416279554367, -0.3624575138092041, -0.408019483089447, 0.06960412859916687, -0.16385973989963531, 0.011641286313533783, 0.06956429779529572, -0.402948796749115, 0.18441925942897797, -0.22178146243095398, -0.12941531836986542, -0.41367173194885254, -0.637928307056427, 0.27436769008636475, 0.4318449795246124, -0.2715858817100525, 0.2260102778673172, 0.04338990896940231, -0.028639696538448334, 0.012394579127430916, -0.3978767693042755, 0.37202396988868713, -0.20663964748382568, -0.2087388038635254, -0.08218398690223694, 0.022355005145072937, 0.30026036500930786, -0.07878012955188751, -0.040841326117515564, 0.09906241297721863, -0.12577158212661743, -0.24122962355613708, -0.22552376985549927, 0.22241945564746857, 0.3901081681251526, 0.033185914158821106, 0.22926969826221466, 0.24319007992744446, 0.36903560161590576, -0.009920034557580948, 0.1020272970199585, 0.19145172834396362, -0.15806593000888824, 0.2423642873764038, 0.33570656180381775, 0.07272236049175262, -0.13128575682640076, 0.35307610034942627, -0.03325236588716507, -0.3652004897594452, 0.4034728705883026, 0.05713808164000511, -0.1780073493719101, -0.1003580242395401, 0.07972969859838486, -0.07826343178749084, -0.37991124391555786, 0.12693771719932556, 0.0823456421494484, -0.09519080817699432, 0.03669031709432602, 0.2173469215631485, 0.14551721513271332, -0.17808130383491516, -0.5291551351547241, 0.044687166810035706, -0.10420788079500198, 0.2746500074863434, -0.5229538083076477, 0.20435640215873718, 0.03940855711698532, 0.036930765956640244, -0.1375308483839035, -0.190603569149971, -0.3217543959617615, 0.1310570389032364, 0.10746476799249649, -0.23148471117019653, 0.006579466164112091, 0.01491670310497284, 0.12725915014743805, 0.05098261311650276, -0.020003125071525574, -0.07905670255422592, -0.3563220500946045, -0.0998893678188324, -0.23632821440696716, 0.13522957265377045, -0.27059587836265564, 0.3342069089412689, -0.274369478225708, -0.39260101318359375, -0.3475576937198639, -0.08009126782417297, -0.19275756180286407, 0.18030902743339539, 0.011198382824659348, -0.3118942677974701, -0.11916486918926239, -0.25439634919166565, -0.1364382803440094, 0.20739628374576569, 0.14172610640525818, 0.11690252274274826, 0.35410431027412415, 0.26190662384033203, -0.21868067979812622, -0.1539204716682434, 0.10652762651443481, 0.257984459400177, 0.01857692003250122, -0.2296203076839447, 0.22623848915100098, -0.018071651458740234, -0.3451117277145386, 0.13369008898735046, 0.2566273510456085, 0.02405860275030136, -0.14536485075950623, 0.0515606626868248, 0.3952970802783966, 0.1313834935426712, -0.17985227704048157, -0.15976674854755402, -0.11332914233207703, 0.049025602638721466, 0.11015686392784119, 0.403537392616272, 0.3108300268650055, 0.08159859478473663, 0.26508307456970215, 0.14284983277320862, 0.4174606502056122, -0.08787968009710312, 0.03253132849931717, 0.29824310541152954, 0.08013120293617249, 0.08134312927722931, 0.3302189111709595, 0.4191918969154358, 0.4734613597393036, 0.41400718688964844, -0.41550499200820923, 0.6876769661903381, 0.08329329639673233, -0.12164488434791565, 0.0012812986969947815, -0.21789902448654175, 0.08989349007606506, 0.008271604776382446, 0.13442495465278625, -0.04019834101200104, -0.13577349483966827, 0.6071442365646362, -0.31770598888397217, 0.10879071056842804, -0.3577255606651306, 0.20708055794239044, -0.02038518339395523, -0.10852214694023132, -0.07522794604301453, -0.31058913469314575, -0.21123792231082916, -0.07545037567615509, 0.33968937397003174, -0.13159708678722382, 0.06079336628317833, -0.2724490165710449, 0.13779239356517792, -0.006499767303466797, -0.19320759177207947, 0.27007025480270386, -0.04576004296541214, -0.13841773569583893, 0.020292500033974648, 0.002198547124862671, -0.15437380969524384, 0.07380323112010956, -0.009105993434786797, -0.011281866580247879, 0.10256893187761307, -0.06276300549507141, -0.08283811062574387, -0.051735516637563705, 0.0369269996881485, 0.018166866153478622, 0.012251781299710274, -0.1111307293176651, 0.2796790897846222, 0.34246739745140076, 0.07431220263242722, -0.08947815746068954, -0.024106595665216446, -0.002049073576927185, 0.38751235604286194, -0.36231109499931335, 0.5390942096710205, 0.05651062726974487, 0.09312085062265396, -0.13401569426059723, -0.04658160358667374, -0.27874547243118286, 0.07644695043563843, 0.21304206550121307, -0.20689591765403748, -0.12638476490974426, 0.05439188703894615, 0.06939863413572311, -0.03727276623249054, 0.31931737065315247, 0.12115024030208588, 0.20749622583389282, 0.02974352240562439, -0.13580100238323212, -0.42706236243247986, -0.27812066674232483, 0.3304329216480255, -0.14026175439357758, 0.0962638407945633, -0.01028736773878336, 0.21113823354244232, 0.017372582107782364, 0.1982533037662506, -0.23825179040431976, 0.2866850793361664, -0.01402726024389267, -0.30816105008125305, -0.16605649888515472, 0.09659318625926971, 0.08954433351755142, 0.05522121489048004, -0.035766828805208206, -0.22048352658748627, -0.10870007425546646, -0.1243988499045372, -0.33565717935562134, 0.10460646450519562, 0.027272187173366547, -0.34170088171958923, 0.30230557918548584, -0.09261342883110046, -0.004826590418815613, 0.07842694967985153, 0.20785650610923767, -0.23673835396766663, -0.04399377852678299, 0.03920985013246536, -0.3017900288105011, 0.12406854331493378, 0.19888083636760712, -0.1457274854183197, -0.2062162309885025, -0.4280429184436798, 0.06719869375228882, 0.19554713368415833, 0.04221711307764053, -0.11687765270471573, 0.13594666123390198, -0.4302161633968353, -0.013793883845210075, 0.22427384555339813, 0.1927511990070343, 0.06873349845409393, 0.11441607773303986, -0.22286057472229004, -0.14580337703227997, 0.7569946050643921, -0.6280460357666016, -0.1650453358888626, -0.015699375420808792, 0.29152166843414307, 0.16426697373390198, -0.16854633390903473, -0.6236010789871216, -0.11617155373096466, 0.19956783950328827, -0.10707100480794907, 0.07816492021083832, 0.16281256079673767, -0.15342476963996887, 0.19623689353466034, -0.08695913851261139, -0.17587962746620178, 0.10219133645296097, -0.10389003157615662, -0.06328877806663513, -0.13146743178367615 ]
https://github.com/huggingface/datasets/issues/2308
Add COCO evaluation metrics
Hi @NielsRogge, I'd like to contribute these metrics to datasets. Let's start with `CocoEvaluator` first? Currently how are are you sending the ground truths and predictions in coco_evaluator?
I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively). Running these in a notebook gives you nice summaries like this: ![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png) It would be great if we could import these metrics from the Datasets library, something like this: ``` import datasets metric = datasets.load_metric('coco') for model_input, gold_references in evaluation_dataset: model_predictions = model(model_inputs) metric.add_batch(predictions=model_predictions, references=gold_references) final_score = metric.compute() ``` I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier. However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
28
Add COCO evaluation metrics I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively). Running these in a notebook gives you nice summaries like this: ![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png) It would be great if we could import these metrics from the Datasets library, something like this: ``` import datasets metric = datasets.load_metric('coco') for model_input, gold_references in evaluation_dataset: model_predictions = model(model_inputs) metric.add_batch(predictions=model_predictions, references=gold_references) final_score = metric.compute() ``` I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier. However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible. Hi @NielsRogge, I'd like to contribute these metrics to datasets. Let's start with `CocoEvaluator` first? Currently how are are you sending the ground truths and predictions in coco_evaluator?
[ -0.3099652826786041, -0.21098649501800537, -0.0590808130800724, 0.036500364542007446, 0.13579489290714264, -0.12801198661327362, 0.032784223556518555, -0.14469581842422485, -0.20193010568618774, 0.1269809901714325, -0.6827292442321777, 0.12397018820047379, -0.13958041369915009, 0.12380252033472061, -0.24544692039489746, -0.09754954278469086, -0.0049182698130607605, -0.018748879432678223, -0.21751350164413452, 0.12764841318130493, 0.06371556222438812, 0.12121836096048355, 0.24701447784900665, 0.1320974975824356, -0.22283655405044556, -0.15287213027477264, -0.27800169587135315, -0.3175080716609955, -0.161235049366951, -0.32007071375846863, 0.30883339047431946, 0.45872730016708374, 0.2178373634815216, 0.3828974664211273, -0.0001260292629012838, 0.1676148772239685, 0.012011423707008362, 0.035262078046798706, -0.04867594689130783, -0.07124030590057373, 0.0626683384180069, -0.31416597962379456, 0.29672926664352417, -0.15661680698394775, 0.20115289092063904, -0.027121271938085556, -0.11513090133666992, 0.027960754930973053, 0.3960065245628357, 0.09471052885055542, 0.03079928457736969, 0.1865345686674118, -0.012999184429645538, -0.013907874003052711, -0.35672199726104736, 0.32182663679122925, -0.31417617201805115, 0.3093027174472809, 0.0804273784160614, -0.17059575021266937, -0.14049747586250305, 0.18350929021835327, 0.34680771827697754, -0.10274843871593475, 0.5674599409103394, 0.09614498913288116, 0.4028465449810028, -0.32144322991371155, -0.48001259565353394, 0.16874457895755768, 0.18189245462417603, -0.24960282444953918, -0.5749024748802185, -0.3565095365047455, -0.1467403918504715, -0.34854647517204285, -0.43689656257629395, -0.07161079347133636, -0.10843196511268616, 0.20874473452568054, -0.33747386932373047, -0.029072986915707588, -0.2903195917606354, -0.03557947278022766, -0.01365521177649498, 0.32785308361053467, 0.17913901805877686, -0.19275659322738647, 0.388685017824173, -0.08986755460500717, 0.3580985963344574, -0.2984929382801056, 0.16567382216453552, 0.05801517143845558, -0.24353574216365814, -0.23307715356349945, 0.28419044613838196, 0.13971790671348572, -0.08654129505157471, 0.026351846754550934, 0.2919549345970154, 0.09513146430253983, -0.229897603392601, 0.11960501968860626, 0.13837414979934692, 0.5930798649787903, 0.07865498960018158, 0.6068126559257507, 0.17052426934242249, 0.3567243814468384, 0.06044156476855278, 0.009807184338569641, 0.2361736297607422, 0.18679088354110718, 0.08795808255672455, 0.14990079402923584, -0.18234412372112274, -0.2842317521572113, -0.17770615220069885, 0.16989947855472565, 0.08375916630029678, -0.0746152400970459, 0.29705536365509033, 0.4641897976398468, -0.18738575279712677, 0.4703536331653595, -0.08683403581380844, -0.021121427416801453, 0.005717337131500244, 0.05149016156792641, -0.017980458214879036, 0.3525492250919342, -0.2764943540096283, 0.08433675765991211, 0.18490970134735107, 0.12025067210197449, -0.040935494005680084, -0.5112411975860596, 0.7779877185821533, -0.3419734239578247, -0.17394740879535675, -0.3053334653377533, 0.30401378870010376, 0.2109251618385315, -0.07060538977384567, -0.22788378596305847, 0.02876795083284378, -0.23514653742313385, -0.2879243791103363, -0.2090795934200287, -0.05094604194164276, -0.2891756594181061, 0.14106953144073486, 0.0335555374622345, -0.5960388779640198, 0.1051085963845253, -0.23739388585090637, 0.5540134906768799, -0.3729887008666992, 0.12485615909099579, -0.08957762271165848, -0.20572300255298615, -0.1545015573501587, -0.002638906007632613, 0.28282400965690613, 0.25457027554512024, -0.17102694511413574, -0.20352935791015625, -0.09600772708654404, -0.22748827934265137, -0.15960216522216797, 0.24088098108768463, -0.029425015673041344, 0.20133692026138306, 0.11143644154071808, 0.08619025349617004, 0.19216400384902954, -0.7362813353538513, -0.19070576131343842, 0.03912551328539848, 0.2540968060493469, 0.2841351628303528, -0.06890896707773209, 0.3182004392147064, 0.11903946846723557, -0.19146157801151276, -0.12784355878829956, 0.41853028535842896, -0.09234464168548584, -0.2677813172340393, -0.10365603864192963, 0.031385891139507294, 0.17402952909469604, 0.13571397960186005, 0.4682200849056244, -0.16630354523658752, 0.1012139618396759, 0.03682858496904373, -0.20783209800720215, -0.3178377151489258, -0.20594044029712677, -0.04504413157701492, 0.3274964988231659, -0.0367586612701416, 0.09854744374752045, -0.2202031910419464, -0.5051128268241882, 0.14820560812950134, -0.10317445546388626, 0.18906386196613312, 0.1133556216955185, -0.33047550916671753, -0.09751495718955994, 0.4347308576107025, -0.0014061331748962402, -0.14806252717971802, 0.0224587582051754, -0.15181289613246918, 0.2043619602918625, -0.026348112151026726, -0.10341021418571472, 0.1999191790819168, 0.08331740647554398, 0.28687605261802673, 0.44246143102645874, 0.33345815539360046, -0.05774658918380737, 0.14277894794940948, 0.12591882050037384, 0.45480334758758545, -0.06233005225658417, -0.023939045146107674, 0.057486578822135925, 0.3577266335487366, -0.0979786217212677, 0.2656298875808716, 0.24931204319000244, 0.5448927879333496, 0.14405524730682373, -0.3306070566177368, 0.13684460520744324, -0.018083523958921432, 0.021360795944929123, -0.05672340467572212, -0.013299532234668732, 0.742203414440155, 0.07344630360603333, 0.4684188663959503, 0.10459727048873901, -0.11958204209804535, 0.04200591892004013, 0.07618068158626556, -0.28934741020202637, -0.3267182409763336, 0.17252607643604279, -0.25517523288726807, 0.15100066363811493, -0.11801445484161377, -0.023242931813001633, -0.0939333364367485, -0.1533479243516922, -0.13650532066822052, 0.14624977111816406, 0.26746633648872375, 0.08871844410896301, -0.09203457832336426, -0.051896438002586365, -0.2346297800540924, 0.2595599293708801, 0.06960099935531616, 0.00404590368270874, 0.27685296535491943, -0.17590360343456268, 0.20660999417304993, 0.17953021824359894, 0.4463197588920593, -0.16596774756908417, 0.29438939690589905, 0.2906157970428467, -0.04039384424686432, -0.28384384512901306, -0.43414729833602905, -0.31302011013031006, -0.006429661065340042, -0.1635504961013794, 0.31497377157211304, 0.11638645827770233, -0.34251758456230164, 0.171233668923378, -0.4348500967025757, -0.22301417589187622, -0.5114439129829407, 0.10254114121198654, 0.008555978536605835, 0.08408845961093903, 0.08690530061721802, 0.016010258346796036, 0.5051108002662659, -0.27598753571510315, 0.10105618089437485, -0.09184452891349792, -0.31287890672683716, 0.12516489624977112, -0.02274440973997116, 0.2510174810886383, -0.05058284476399422, 0.21677492558956146, 0.06350351870059967, 0.3050377368927002, 0.07868555188179016, -0.5782645344734192, 0.1619759500026703, 0.012824058532714844, 0.15959413349628448, -0.009426102042198181, -0.5442691445350647, 0.14385062456130981, -0.36477893590927124, 0.138472318649292, -0.1547427922487259, -0.06823856383562088, -0.0656604915857315, -0.19594012200832367, -0.1478053480386734, -0.14255587756633759, 0.034080635756254196, -0.41643813252449036, -0.15961778163909912, 0.36619138717651367, 0.19654898345470428, -0.02225290983915329, 0.11610452830791473, 0.08197358250617981, -0.00726692657917738, 0.015481080859899521, -0.13383294641971588, 0.002330323215574026, 0.05364716425538063, 0.39826449751853943, -0.14237290620803833, -0.020068377256393433, -0.24285610020160675, -0.4220924377441406, -0.09249790012836456, -0.20598573982715607, -0.33026450872421265, -0.7189273238182068, -0.12377522885799408, 0.14070068299770355, 0.031192833557724953, -0.03489124774932861, 0.07681921869516373, -0.2370525747537613, 0.19928660988807678, -0.06133919954299927, -0.40144363045692444, 0.09082462638616562, -0.06235692650079727, -0.08399120718240738, -0.49669113755226135, 0.4393984377384186, 0.24112576246261597, 0.3800700902938843, -0.016777317970991135, -0.38290971517562866, 0.06950531899929047, 0.09003470093011856, 0.3596772849559784, 0.05289854854345322, -0.1561415046453476, 0.18846789002418518, -0.1911199986934662, -0.2710876166820526, 0.2511743903160095, 0.09507398307323456, -0.18818067014217377, -0.344268262386322, 0.04526737704873085, -0.39812299609184265, -0.24362361431121826, -0.0015471279621124268, 0.22016605734825134, 0.09940837323665619, 0.008695058524608612, -0.01660897210240364, -0.5513287782669067, -0.08582597225904465, 0.39910581707954407, 0.25452178716659546, 0.0767548605799675, -0.09487073868513107, -0.23852287232875824, -0.19009126722812653, -0.40159595012664795, 0.3356552720069885, 0.1114153265953064, 0.007292428985238075, 0.12620790302753448, -0.003176327794790268, 0.010988183319568634, -0.100644052028656, 0.1530744433403015, -0.06623847782611847, -0.009154703468084335, 0.07271708548069, -0.5084447860717773, -0.044197872281074524, -0.29635268449783325, -0.2866688370704651, -0.014786255545914173, 0.21404075622558594, 0.5403143763542175, -0.34918636083602905, 0.1352047622203827, 0.21485674381256104, 0.0536215640604496, -0.22736576199531555, -0.027194354683160782, -0.1333913952112198, 0.1154649630188942, 0.013882925733923912, -0.05466596037149429, 0.10172859579324722, 0.16578252613544464, 0.09411690384149551, 0.16948381066322327, 0.003378385677933693, -0.035575494170188904, 0.5560323596000671, 0.5890778303146362, -0.022879086434841156, 0.0049228607676923275, 0.05030885711312294, -0.07360371947288513, -0.4726637303829193, 0.22023606300354004, 0.25400692224502563, -0.02321796864271164, -0.8468321561813354, -0.08179589360952377, 0.19255073368549347, 0.3330136239528656, -0.046439528465270996, 0.07631906121969223, -0.2225627303123474, -0.21671487390995026, 0.22329488396644592, -0.3131755292415619, 0.5295407772064209, 0.09776927530765533, 0.25323325395584106, -0.20186883211135864, 0.02469632960855961, 0.3580572307109833, 0.20716549456119537, -0.17613661289215088, 0.05694279447197914, 0.08996502310037613, -0.1538897454738617, 0.31009358167648315, 0.4626713991165161, 0.7989928722381592, -0.12422218918800354, -0.13672013580799103, -0.0001977682113647461, -0.14328888058662415, 0.2762168347835541, -0.4615861773490906, -0.010800488293170929, -0.18753820657730103, -0.25337740778923035, -0.044035304337739944, -0.15223491191864014, 0.048885270953178406, -0.1845829337835312, -0.0008905306458473206, 0.16725707054138184, 0.24647293984889984, 0.1864139586687088, 0.127034530043602, 0.1973680704832077, 0.07321954518556595, -0.3102343678474426, 0.029229167848825455, 0.05332928150892258, -0.20291151106357574, 0.18164904415607452, -0.11322437971830368, 0.015574422664940357, -0.3134315311908722, 0.17821940779685974, -0.22404445707798004, -0.04744379222393036, -0.08938226103782654, 0.21758997440338135, 0.1645725518465042, -0.14934071898460388, 0.0840914249420166, 0.3634408414363861, 0.4752683639526367, -0.15080773830413818, 0.037606131285429, 0.05931641906499863, -0.30697867274284363, 0.1144075021147728, 0.055364903062582016, -0.23062577843666077, 0.25868794322013855, -0.07373932003974915, 0.34195831418037415, 0.19150571525096893, 0.4165436327457428, -0.2845357060432434, 0.17574983835220337, -0.1674327850341797, 0.17691361904144287, -0.04722270369529724, 0.33365124464035034, 0.13806898891925812, -0.11311355233192444, -0.04180603474378586, -0.026504497975111008, 0.11038567125797272, -0.2165946215391159, 0.32552894949913025, -0.04344896599650383, -0.22429516911506653, 0.024490587413311005, 0.08730310201644897, -0.06586940586566925, -0.17563359439373016, -0.038428857922554016, -0.1486484408378601, -0.20534572005271912, -0.010176341980695724, -0.21983686089515686, -0.19911977648735046, -0.2939015030860901, 0.30085718631744385, -0.2469029575586319, -0.48955047130584717, -0.20540472865104675, 0.36798858642578125, 0.4144972562789917, 0.28883808851242065, -0.22239871323108673, -0.3008732199668884, -0.32597729563713074, 0.25888121128082275, -0.21124397218227386, 0.15256109833717346, -0.22921839356422424, 0.6077914237976074, -0.14352038502693176, 0.2965238690376282, -0.18567176163196564, -0.28124329447746277, -0.23711135983467102, -0.058816879987716675, -0.44070374965667725, -0.35868561267852783, -0.05554552003741264, -0.018907511606812477, -0.10655194520950317, 0.20034004747867584, -0.22865068912506104, -0.016711827367544174, -0.24668660759925842, 0.1922568827867508, 0.04666385427117348, 0.4406832456588745, -0.1525685042142868, 0.30620497465133667, 0.06162078306078911, -0.3802710175514221, 0.08050158619880676, 0.10964933782815933, -0.06798295676708221, 0.28958451747894287, 0.2054460346698761, 0.19847148656845093, 0.09331971406936646, -0.051801808178424835, 0.32353049516677856, 0.35304737091064453, 0.4071323275566101, 0.3210070729255676, -0.31191152334213257, -0.07008597254753113, 0.1335512399673462, 0.20691093802452087, 0.13808861374855042, -0.11053257435560226, 0.4389415979385376, 0.2935256361961365, -0.05265515297651291, 0.10606154799461365, 0.35217851400375366, 0.16850998997688293, 0.09604860097169876, 0.17760062217712402, -0.16439461708068848, 0.04722193256020546, -0.06868613511323929, -0.04599127173423767, 0.26251986622810364, -0.14375971257686615, 0.2043302059173584, 0.4219450354576111, 0.3200177848339081, 0.26204851269721985, 0.16319391131401062, 0.07809348404407501, 0.2289651781320572, 0.5206677913665771, 0.20695699751377106, -0.009278427809476852, -0.011182337999343872, 0.13144342601299286, 0.47887083888053894, -0.24267560243606567, 0.47099578380584717, -0.06076885014772415, -0.20565250515937805, 0.18852324783802032, -0.4297228157520294, 0.24628481268882751, 0.3417508900165558, 0.019168008118867874, -0.17826521396636963, -0.22744449973106384, 0.3287647068500519, 0.3067309856414795, -0.03502821922302246, -0.09147331863641739, -0.024202771484851837, -0.1226973757147789, -0.35894522070884705, 0.2241218239068985, 0.16362497210502625, -0.10523556172847748, -0.14860419929027557, -0.07998469471931458, -0.19740919768810272, 0.0911482721567154, 0.03836902976036072, -0.4937092065811157, -0.13363763689994812, 0.02892250195145607, 0.01792597770690918, 0.3363610506057739, -0.19379103183746338, 0.30531781911849976, 0.7155004739761353, -0.14009921252727509, -0.11307435482740402, 0.4139334559440613, 0.029266566038131714, -0.10196177661418915, 0.35654523968696594, 0.29644039273262024, -0.13497008383274078, -0.40472903847694397, 0.24477021396160126, -0.013826970010995865, 0.019694698974490166, 0.00657748244702816, 0.116365447640419, 0.04138888418674469, 0.24307015538215637, 0.24798287451267242, 0.029896093532443047, -0.12510178983211517, 0.07288800925016403, -0.3502911329269409, 0.3562818467617035, -0.4247966408729553, 0.13568580150604248, 0.30469298362731934, 0.027333229780197144, -0.07985187321901321, 0.028121918439865112, -0.04156268388032913, -0.45939674973487854, 0.04304458945989609, -0.30006521940231323, -0.12013605237007141, -0.04005802422761917, -0.009217465296387672, -0.16539117693901062, 0.2681221663951874, 0.317399263381958, 0.2378947138786316, -0.3654511868953705, -0.1649191975593567, -0.41993099451065063, 0.0316963791847229, 0.18234533071517944, -0.36408349871635437, -0.036519311368465424, 0.23971636593341827, -0.03282233327627182, 0.5731809139251709, -0.029635503888130188, 0.30899345874786377, 0.13349448144435883, 0.09648740291595459, -0.4332214593887329, 0.19201458990573883, -0.4717693328857422, -0.09649504721164703, 0.13343824446201324, 0.05541861802339554, -0.25599730014801025, 0.037266168743371964, -0.11442369222640991, 0.12947040796279907, -0.1716090738773346, -0.08260014653205872, 0.5387231111526489, 0.3669646382331848, 0.14948730170726776, 0.41157886385917664, 0.13935911655426025, 0.13981321454048157, 0.0944695919752121, -0.23448337614536285, 0.11780878901481628, 0.07599712908267975, -0.15026693046092987, 0.35619714856147766, -0.2179720103740692, 0.08306033909320831, -0.005615562200546265, 0.24887815117835999, 0.496979296207428, -0.5032259821891785, -0.08464452624320984, -0.019921891391277313, -0.2355300784111023, 0.08057998865842819, 0.149919793009758, 0.5444474220275879, 0.196754589676857, 0.24692411720752716, 0.10933098196983337, -0.3478524684906006, 0.4284908175468445, -0.24238792061805725, 0.05583098158240318, -0.2117156982421875, 0.05368274822831154, 0.3772601783275604, -0.09496047347784042, -0.5903131365776062, -0.11760301887989044, 0.17315608263015747, -0.11321227997541428, -0.12805511057376862, 0.23380134999752045, -0.19174867868423462, 0.06294950842857361, -0.10183493047952652, 0.12467558681964874, -0.0451473593711853, 0.05266781151294708, -0.19177685678005219, -0.21764740347862244 ]
https://github.com/huggingface/datasets/issues/2308
Add COCO evaluation metrics
Great! Here's a notebook that illustrates how I'm using `CocoEvaluator`: https://drive.google.com/file/d/1VV92IlaUiuPOORXULIuAdtNbBWCTCnaj/view?usp=sharing The evaluation is near the end of the notebook.
I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively). Running these in a notebook gives you nice summaries like this: ![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png) It would be great if we could import these metrics from the Datasets library, something like this: ``` import datasets metric = datasets.load_metric('coco') for model_input, gold_references in evaluation_dataset: model_predictions = model(model_inputs) metric.add_batch(predictions=model_predictions, references=gold_references) final_score = metric.compute() ``` I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier. However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
20
Add COCO evaluation metrics I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively). Running these in a notebook gives you nice summaries like this: ![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png) It would be great if we could import these metrics from the Datasets library, something like this: ``` import datasets metric = datasets.load_metric('coco') for model_input, gold_references in evaluation_dataset: model_predictions = model(model_inputs) metric.add_batch(predictions=model_predictions, references=gold_references) final_score = metric.compute() ``` I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier. However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible. Great! Here's a notebook that illustrates how I'm using `CocoEvaluator`: https://drive.google.com/file/d/1VV92IlaUiuPOORXULIuAdtNbBWCTCnaj/view?usp=sharing The evaluation is near the end of the notebook.
[ -0.29974690079689026, -0.21730829775333405, -0.06629110872745514, 0.02016890048980713, 0.1273820996284485, -0.14389553666114807, 0.02990444004535675, -0.14437299966812134, -0.20418742299079895, 0.13451366126537323, -0.6726334095001221, 0.12211523950099945, -0.1353883445262909, 0.12914077937602997, -0.2434386909008026, -0.08637608587741852, -0.015074208378791809, -0.009731948375701904, -0.2172839343547821, 0.1266031414270401, 0.05921684205532074, 0.14364805817604065, 0.2437029927968979, 0.13831974565982819, -0.24078907072544098, -0.14551089704036713, -0.2821148931980133, -0.3128215968608856, -0.15220028162002563, -0.32359617948532104, 0.297002375125885, 0.4498107135295868, 0.1952892392873764, 0.3987876772880554, -0.00012357499508652836, 0.1599731743335724, 0.017170079052448273, 0.039153680205345154, -0.061474110931158066, -0.07549621164798737, 0.07724971324205399, -0.31733888387680054, 0.286077618598938, -0.16076290607452393, 0.18211618065834045, -0.029084090143442154, -0.10131967067718506, 0.046915218234062195, 0.40564393997192383, 0.10003199428319931, 0.05051393061876297, 0.19950023293495178, 0.0012997128069400787, -0.014534218236804008, -0.34245529770851135, 0.3313700556755066, -0.3202507197856903, 0.29816943407058716, 0.08347214758396149, -0.1853351891040802, -0.16133767366409302, 0.19920258224010468, 0.3513002097606659, -0.09313218295574188, 0.5686437487602234, 0.09720239043235779, 0.3958124816417694, -0.3362833857536316, -0.486319363117218, 0.19391101598739624, 0.16882476210594177, -0.24611276388168335, -0.5697383880615234, -0.3576293885707855, -0.1659264713525772, -0.32124558091163635, -0.4314122796058655, -0.06334850937128067, -0.14208097755908966, 0.21096931397914886, -0.33181241154670715, -0.006318802945315838, -0.2902601957321167, -0.03678465634584427, -0.017529066652059555, 0.33690667152404785, 0.16097491979599, -0.20074060559272766, 0.3905268609523773, -0.08296053856611252, 0.3388567566871643, -0.28307923674583435, 0.1836012750864029, 0.05226707085967064, -0.23573701083660126, -0.23959091305732727, 0.28339534997940063, 0.1345149278640747, -0.0850759968161583, 0.022724591195583344, 0.29967162013053894, 0.11210501194000244, -0.23440757393836975, 0.126832515001297, 0.1345115602016449, 0.5766768455505371, 0.06061685085296631, 0.5718217492103577, 0.18676303327083588, 0.35169416666030884, 0.06152782216668129, 0.006039481610059738, 0.24470466375350952, 0.19213949143886566, 0.09256663918495178, 0.13041377067565918, -0.17202846705913544, -0.26551181077957153, -0.1750134527683258, 0.1668262481689453, 0.09714827686548233, -0.06913591921329498, 0.28879472613334656, 0.4693870544433594, -0.1852559894323349, 0.4720805585384369, -0.09117735177278519, -0.05046167969703674, 0.008344011381268501, 0.052350472658872604, -0.034019533544778824, 0.32808107137680054, -0.2931898236274719, 0.07448496669530869, 0.18070395290851593, 0.14053227007389069, -0.03180578351020813, -0.5192127823829651, 0.7788993716239929, -0.3136880099773407, -0.17263765633106232, -0.28990769386291504, 0.32246673107147217, 0.2182415872812271, -0.09771202504634857, -0.23096217215061188, 0.02747815102338791, -0.24268139898777008, -0.2836833596229553, -0.20994997024536133, -0.0465669259428978, -0.2794579863548279, 0.12065492570400238, 0.05545846000313759, -0.593269407749176, 0.10082310438156128, -0.22020664811134338, 0.5729044675827026, -0.37658432126045227, 0.12036727368831635, -0.0749175176024437, -0.19595330953598022, -0.1592189520597458, -0.012403158470988274, 0.2833311855792999, 0.24634304642677307, -0.17439551651477814, -0.21321603655815125, -0.09364263713359833, -0.23622265458106995, -0.1588309109210968, 0.23936259746551514, -0.019639290869235992, 0.18048188090324402, 0.10956460237503052, 0.09240289032459259, 0.1852487176656723, -0.7222118973731995, -0.21456323564052582, 0.04890688508749008, 0.2471458464860916, 0.2894206941127777, -0.0734357014298439, 0.3351036012172699, 0.1267104148864746, -0.18934719264507294, -0.1360851675271988, 0.41520583629608154, -0.08114320039749146, -0.2573270797729492, -0.11986939609050751, 0.03541720658540726, 0.16818580031394958, 0.1451546549797058, 0.4331037700176239, -0.16659098863601685, 0.10549484193325043, 0.037104494869709015, -0.19606006145477295, -0.32030439376831055, -0.20762720704078674, -0.049650900065898895, 0.34126344323158264, -0.04033193737268448, 0.10818363726139069, -0.23083829879760742, -0.5144690871238708, 0.1474982500076294, -0.11354691535234451, 0.20285962522029877, 0.122452512383461, -0.33738118410110474, -0.0957706868648529, 0.43296048045158386, -0.0011987388134002686, -0.1656341403722763, 0.04663296043872833, -0.15200524032115936, 0.2136494368314743, -0.02427488937973976, -0.1066230833530426, 0.2016836702823639, 0.08711645007133484, 0.28985676169395447, 0.4406021237373352, 0.33097314834594727, -0.06736693531274796, 0.1346360594034195, 0.11995644867420197, 0.4655914306640625, -0.07691877335309982, -0.01632377877831459, 0.053466785699129105, 0.3662232756614685, -0.09295739233493805, 0.2508172392845154, 0.246599018573761, 0.5548978447914124, 0.14885379374027252, -0.3216005265712738, 0.13361401855945587, -0.0017460603266954422, 0.022511348128318787, -0.04740580916404724, -0.039696648716926575, 0.7304093837738037, 0.08129622042179108, 0.4636431932449341, 0.10520939528942108, -0.1008717268705368, 0.04647587984800339, 0.07164180278778076, -0.3060566484928131, -0.3219822645187378, 0.16663411259651184, -0.24919964373111725, 0.15120622515678406, -0.09325854480266571, -0.034160763025283813, -0.07348965853452682, -0.133281409740448, -0.14148186147212982, 0.15871044993400574, 0.2704223394393921, 0.06164061278104782, -0.108017198741436, -0.04604038596153259, -0.22329196333885193, 0.2471752166748047, 0.09104345738887787, -0.004394840449094772, 0.2587954103946686, -0.191644087433815, 0.19189387559890747, 0.17564983665943146, 0.44943273067474365, -0.16973136365413666, 0.27362993359565735, 0.28836363554000854, -0.03438056260347366, -0.2886705696582794, -0.4417698085308075, -0.32885411381721497, -0.014183318242430687, -0.14799776673316956, 0.3167223036289215, 0.1225953996181488, -0.3476930260658264, 0.1796487420797348, -0.4364887475967407, -0.22208014130592346, -0.5205183029174805, 0.11520030349493027, 0.01326347142457962, 0.06738142669200897, 0.08993478119373322, 0.028892863541841507, 0.5286703109741211, -0.269984632730484, 0.11070414632558823, -0.11229658126831055, -0.3123544454574585, 0.09936553239822388, 0.0015262346714735031, 0.24815575778484344, -0.0478699766099453, 0.21080905199050903, 0.06455483287572861, 0.319594144821167, 0.07073483616113663, -0.5984122157096863, 0.16390582919120789, 0.00024339556694030762, 0.1689489632844925, -0.007894091308116913, -0.5436901450157166, 0.14152438938617706, -0.35922443866729736, 0.13301753997802734, -0.18094401061534882, -0.07553885877132416, -0.062116701155900955, -0.1881651133298874, -0.14988359808921814, -0.15331889688968658, 0.021863237023353577, -0.4075072705745697, -0.18560722470283508, 0.38840723037719727, 0.20248714089393616, -0.02161051332950592, 0.12555032968521118, 0.0721985250711441, 0.008356044068932533, 0.01687132753431797, -0.13398467004299164, -0.01125846803188324, 0.05989858880639076, 0.39840301871299744, -0.1504705250263214, -0.01787695661187172, -0.24670039117336273, -0.424074649810791, -0.09421062469482422, -0.22579722106456757, -0.32181495428085327, -0.7311670780181885, -0.14325614273548126, 0.14868198335170746, 0.03861873969435692, -0.0254493597894907, 0.07056184113025665, -0.22848822176456451, 0.17289194464683533, -0.05599286034703255, -0.37899523973464966, 0.07646127790212631, -0.07584398984909058, -0.09350939840078354, -0.4966568648815155, 0.4219004511833191, 0.2515825629234314, 0.3898652195930481, -0.03418542072176933, -0.392049103975296, 0.07804228365421295, 0.07765214890241623, 0.3641144633293152, 0.049373820424079895, -0.14207348227500916, 0.19438143074512482, -0.19706031680107117, -0.25447651743888855, 0.251259446144104, 0.09431830048561096, -0.20526735484600067, -0.3252047896385193, 0.03725997731089592, -0.3865354061126709, -0.2463577389717102, 0.00486370362341404, 0.22657790780067444, 0.0744297057390213, 0.0035519711673259735, -0.016766991466283798, -0.5261821150779724, -0.09475419670343399, 0.4008868932723999, 0.2383144199848175, 0.08252865821123123, -0.09886037558317184, -0.2404688149690628, -0.16875913739204407, -0.4156929850578308, 0.3411150574684143, 0.09325078874826431, -0.012925383634865284, 0.13467782735824585, -0.03686494380235672, -0.003084346652030945, -0.09874966740608215, 0.16653262078762054, -0.06101711839437485, -0.03424791246652603, 0.061802949756383896, -0.5149242877960205, -0.06350328773260117, -0.28306588530540466, -0.29455092549324036, -0.015769604593515396, 0.21160277724266052, 0.5451017618179321, -0.33979034423828125, 0.12593920528888702, 0.23730599880218506, 0.03946701064705849, -0.22189819812774658, -0.014876722358167171, -0.14468809962272644, 0.11815733462572098, -0.002468077465891838, -0.05021931976079941, 0.09858956933021545, 0.14342214167118073, 0.08635253459215164, 0.15719597041606903, 0.015853142365813255, -0.03810964152216911, 0.5339030027389526, 0.6092330813407898, -0.023316465318202972, 0.0006789382314309478, 0.03918486461043358, -0.06178036332130432, -0.45915642380714417, 0.19902567565441132, 0.25079113245010376, -0.037793878465890884, -0.8460478782653809, -0.05524235963821411, 0.20727598667144775, 0.3129013180732727, -0.03648744523525238, 0.09032683819532394, -0.22127532958984375, -0.1981055587530136, 0.24045778810977936, -0.33235791325569153, 0.532382607460022, 0.09440276771783829, 0.24266883730888367, -0.17552411556243896, 0.020154191181063652, 0.36306482553482056, 0.19349318742752075, -0.17540328204631805, 0.05361081287264824, 0.09459337592124939, -0.14039947092533112, 0.3290588855743408, 0.456522136926651, 0.8081383109092712, -0.11724571883678436, -0.11906750500202179, -0.004075918346643448, -0.145513653755188, 0.28001993894577026, -0.467046856880188, -0.010709051042795181, -0.19260653853416443, -0.25869205594062805, -0.04416510462760925, -0.1439216583967209, 0.04023636132478714, -0.1787971705198288, -0.02126571349799633, 0.16243679821491241, 0.2555801272392273, 0.20750047266483307, 0.13385169208049774, 0.20474669337272644, 0.06428416073322296, -0.3234063684940338, 0.031704094260931015, 0.07181186228990555, -0.1916458159685135, 0.1762242466211319, -0.11238283663988113, 0.022848784923553467, -0.3125867545604706, 0.1763160675764084, -0.22267310321331024, -0.0464618057012558, -0.08625366538763046, 0.2179843634366989, 0.18127618730068207, -0.12835438549518585, 0.07084773480892181, 0.35825011134147644, 0.46919679641723633, -0.1416618824005127, 0.03182999789714813, 0.06831437349319458, -0.2951416075229645, 0.12718337774276733, 0.06671134382486343, -0.24346597492694855, 0.2872307002544403, -0.07011887431144714, 0.3233151435852051, 0.20235326886177063, 0.41582077741622925, -0.28417477011680603, 0.15604406595230103, -0.16229216754436493, 0.17036893963813782, -0.054465439170598984, 0.3462357521057129, 0.12704458832740784, -0.1362370401620865, -0.05840372294187546, -0.00492502748966217, 0.10381649434566498, -0.2249022126197815, 0.31240200996398926, -0.03461072966456413, -0.21609875559806824, 0.01637490838766098, 0.08373638987541199, -0.07031760364770889, -0.16389790177345276, -0.04177939146757126, -0.15174220502376556, -0.1967330425977707, -0.030450288206338882, -0.21862661838531494, -0.17019107937812805, -0.2886279821395874, 0.30897462368011475, -0.25547322630882263, -0.5010097026824951, -0.19715863466262817, 0.38704147934913635, 0.41797345876693726, 0.2863824665546417, -0.24210910499095917, -0.2874957323074341, -0.32819637656211853, 0.2762739062309265, -0.21039710938930511, 0.1733362078666687, -0.21548143029212952, 0.5901417136192322, -0.12720242142677307, 0.29678916931152344, -0.21523833274841309, -0.2923662066459656, -0.25110089778900146, -0.07243210822343826, -0.4433412551879883, -0.3681930899620056, -0.0441003292798996, -0.027108678594231606, -0.08541715890169144, 0.22230872511863708, -0.23094724118709564, -0.042876336723566055, -0.24319875240325928, 0.17824788391590118, 0.031459782272577286, 0.44181180000305176, -0.15871648490428925, 0.33446604013442993, 0.05519378185272217, -0.38666433095932007, 0.08410145342350006, 0.10359633713960648, -0.06375545263290405, 0.28355473279953003, 0.19968503713607788, 0.18401217460632324, 0.11395563185214996, -0.05530145764350891, 0.3162204921245575, 0.33591023087501526, 0.40489429235458374, 0.313851922750473, -0.32910189032554626, -0.07480544596910477, 0.1486322581768036, 0.22200188040733337, 0.1404712051153183, -0.10183113068342209, 0.4360094964504242, 0.2986542284488678, -0.07771278917789459, 0.09703025966882706, 0.35744306445121765, 0.15521547198295593, 0.10495983064174652, 0.16155901551246643, -0.15943783521652222, 0.0691542848944664, -0.07154490798711777, -0.05641290917992592, 0.2643130123615265, -0.15737386047840118, 0.2371169924736023, 0.41994935274124146, 0.32668402791023254, 0.274106502532959, 0.1674637645483017, 0.06668923050165176, 0.23601612448692322, 0.5075060129165649, 0.19989536702632904, -0.02341260388493538, -0.009077697992324829, 0.1328243464231491, 0.4826536774635315, -0.2623148560523987, 0.4836314916610718, -0.05748489499092102, -0.19375962018966675, 0.20430469512939453, -0.4279991090297699, 0.24657100439071655, 0.35596174001693726, 0.028988387435674667, -0.14925286173820496, -0.24268192052841187, 0.3121585249900818, 0.3237942159175873, -0.037841394543647766, -0.10723982006311417, -0.0338825024664402, -0.11823703348636627, -0.3678845167160034, 0.2005835622549057, 0.1597318798303604, -0.11203151941299438, -0.14463956654071808, -0.08823762089014053, -0.1976035237312317, 0.07712815701961517, 0.03078780509531498, -0.4916607737541199, -0.11842767894268036, 0.01303502544760704, 0.019156843423843384, 0.34706395864486694, -0.18061992526054382, 0.2940877079963684, 0.7280282974243164, -0.13683296740055084, -0.12325873225927353, 0.4176493287086487, 0.029064811766147614, -0.12329158186912537, 0.3599892556667328, 0.30293014645576477, -0.13134770095348358, -0.40979552268981934, 0.24349252879619598, -0.012655816972255707, 0.009009705856442451, -0.0021368302404880524, 0.12329810112714767, 0.03444381430745125, 0.24100077152252197, 0.25086861848831177, 0.05355573445558548, -0.14345182478427887, 0.06829843670129776, -0.34079691767692566, 0.3618967533111572, -0.4263160824775696, 0.12107759714126587, 0.3008064329624176, 0.030878804624080658, -0.08316266536712646, 0.03183341398835182, -0.058763537555933, -0.4580422639846802, 0.031064841896295547, -0.30487290024757385, -0.10862425714731216, -0.05321603640913963, 0.007626794278621674, -0.141391322016716, 0.28517967462539673, 0.3214077949523926, 0.23693323135375977, -0.348333477973938, -0.15365810692310333, -0.41945695877075195, 0.042862892150878906, 0.18304544687271118, -0.350530743598938, -0.03819568082690239, 0.25280243158340454, -0.031982727348804474, 0.5803543329238892, -0.028360724449157715, 0.30074432492256165, 0.1152481809258461, 0.0816764235496521, -0.4270048141479492, 0.19953452050685883, -0.46885567903518677, -0.10819447040557861, 0.13170106709003448, 0.04740951955318451, -0.24429620802402496, 0.05166713893413544, -0.09142263233661652, 0.12396371364593506, -0.17519047856330872, -0.05966714769601822, 0.5259096622467041, 0.3599398136138916, 0.15470843017101288, 0.3691030740737915, 0.13240879774093628, 0.12140364199876785, 0.07978818565607071, -0.23081375658512115, 0.11554853618144989, 0.056616995483636856, -0.15070928633213043, 0.3563109040260315, -0.19163371622562408, 0.05395371839404106, -0.014847948215901852, 0.2521480619907379, 0.501390814781189, -0.4979836940765381, -0.08388780802488327, -0.02990010567009449, -0.21991518139839172, 0.06488381326198578, 0.14408935606479645, 0.545538604259491, 0.19031083583831787, 0.229728564620018, 0.11608543992042542, -0.3590552508831024, 0.4119836688041687, -0.2448016256093979, 0.0657232403755188, -0.22284257411956787, 0.04721102863550186, 0.3749004006385803, -0.09424921125173569, -0.574844479560852, -0.13091230392456055, 0.1755869835615158, -0.10695219784975052, -0.132951021194458, 0.23443934321403503, -0.18824732303619385, 0.06494291126728058, -0.11239616572856903, 0.12399502098560333, -0.04508383572101593, 0.05271471291780472, -0.17986249923706055, -0.23365740478038788 ]
https://github.com/huggingface/datasets/issues/2308
Add COCO evaluation metrics
I went through the code you've [mentioned](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py) and I think there are 2 options on how we can go ahead: 1) Implement how DETR people have done this (they're relying very heavily on the official implementation and they're focussing on torch dataset here. I feel ours should be something generic instead of pytorch specific. 2) Do this [implementation](https://github.com/cocodataset/cocoapi/blob/ed842bffd41f6ff38707c4f0968d2cfd91088688/PythonAPI/pycocoEvalDemo.ipynb) where user can convert its output and ground truth annotation to pre-defined format and then feed it into our function to calculate metrics (looks very similar to you wanted above) In my opinion, 2nd option looks very clean but I'm still figuring out how's it transforming the box co-ordinates of `coco_gt` which you've passed to `CocoEvaluator` (ground truth for evaluation). Since your model output was already converted to COCO api, I faced little problems there.
I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively). Running these in a notebook gives you nice summaries like this: ![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png) It would be great if we could import these metrics from the Datasets library, something like this: ``` import datasets metric = datasets.load_metric('coco') for model_input, gold_references in evaluation_dataset: model_predictions = model(model_inputs) metric.add_batch(predictions=model_predictions, references=gold_references) final_score = metric.compute() ``` I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier. However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible.
133
Add COCO evaluation metrics I'm currently working on adding Facebook AI's DETR model (end-to-end object detection with Transformers) to HuggingFace Transformers. The model is working fine, but regarding evaluation, I'm currently relying on external `CocoEvaluator` and `PanopticEvaluator` objects which are defined in the original repository ([here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py#L22) and [here](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/panoptic_eval.py#L13) respectively). Running these in a notebook gives you nice summaries like this: ![image](https://user-images.githubusercontent.com/48327001/116878842-326f0680-ac20-11eb-9061-d6da02193694.png) It would be great if we could import these metrics from the Datasets library, something like this: ``` import datasets metric = datasets.load_metric('coco') for model_input, gold_references in evaluation_dataset: model_predictions = model(model_inputs) metric.add_batch(predictions=model_predictions, references=gold_references) final_score = metric.compute() ``` I think this would be great for object detection and semantic/panoptic segmentation in general, not just for DETR. Reproducing results of object detection papers would be way easier. However, object detection and panoptic segmentation evaluation is a bit more complex than accuracy (it's more like a summary of metrics at different thresholds rather than a single one). I'm not sure how to proceed here, but happy to help making this possible. I went through the code you've [mentioned](https://github.com/facebookresearch/detr/blob/a54b77800eb8e64e3ad0d8237789fcbf2f8350c5/datasets/coco_eval.py) and I think there are 2 options on how we can go ahead: 1) Implement how DETR people have done this (they're relying very heavily on the official implementation and they're focussing on torch dataset here. I feel ours should be something generic instead of pytorch specific. 2) Do this [implementation](https://github.com/cocodataset/cocoapi/blob/ed842bffd41f6ff38707c4f0968d2cfd91088688/PythonAPI/pycocoEvalDemo.ipynb) where user can convert its output and ground truth annotation to pre-defined format and then feed it into our function to calculate metrics (looks very similar to you wanted above) In my opinion, 2nd option looks very clean but I'm still figuring out how's it transforming the box co-ordinates of `coco_gt` which you've passed to `CocoEvaluator` (ground truth for evaluation). Since your model output was already converted to COCO api, I faced little problems there.
[ -0.27624592185020447, -0.208591490983963, -0.0654032826423645, 0.04663059860467911, 0.1744091957807541, -0.15189144015312195, 0.024648722261190414, -0.13047009706497192, -0.1931968331336975, 0.1273568570613861, -0.6784853339195251, 0.12131015211343765, -0.1210906133055687, 0.11382672935724258, -0.2690066397190094, -0.09502391517162323, -0.02527465671300888, -0.011176995933055878, -0.21471700072288513, 0.1027093380689621, 0.048520855605602264, 0.1782635748386383, 0.22755135595798492, 0.11012373864650726, -0.25453895330429077, -0.14381647109985352, -0.2657637298107147, -0.28372132778167725, -0.19232392311096191, -0.3163908123970032, 0.30752673745155334, 0.4554099142551422, 0.20248709619045258, 0.429827481508255, -0.00012231127766426653, 0.1656176745891571, 0.020898688584566116, 0.02508183754980564, -0.05174270644783974, -0.09651270508766174, 0.07081318646669388, -0.31585192680358887, 0.2736359238624573, -0.16343368589878082, 0.13220861554145813, -0.030235860496759415, -0.12485936284065247, 0.044907279312610626, 0.4284772276878357, 0.14742690324783325, 0.0711563378572464, 0.1883556842803955, 0.0393487922847271, -0.0047204820439219475, -0.3366108536720276, 0.30783963203430176, -0.31328776478767395, 0.3043532371520996, 0.05966707319021225, -0.1810676008462906, -0.15725219249725342, 0.22377793490886688, 0.3409009277820587, -0.0695618987083435, 0.576542854309082, 0.11704689264297485, 0.398559033870697, -0.34817978739738464, -0.4635711908340454, 0.15704388916492462, 0.15077994763851166, -0.23798874020576477, -0.5474993586540222, -0.34725692868232727, -0.19650210440158844, -0.35652655363082886, -0.39712828397750854, -0.09508908540010452, -0.15645378828048706, 0.18162553012371063, -0.33163127303123474, 0.012177013792097569, -0.3044276535511017, -0.0409063845872879, 0.0005169771611690521, 0.3494050204753876, 0.14878281950950623, -0.1873195469379425, 0.4057868421077728, -0.07395170629024506, 0.31959694623947144, -0.26285818219184875, 0.20784185826778412, 0.03788499906659126, -0.26273155212402344, -0.22322571277618408, 0.27513939142227173, 0.13836953043937683, -0.07271413505077362, 0.019796883687376976, 0.2769993841648102, 0.11624974012374878, -0.2116604745388031, 0.11625370383262634, 0.10573650896549225, 0.6059843301773071, 0.06287270784378052, 0.5722203254699707, 0.18133047223091125, 0.3665727376937866, 0.042106058448553085, -0.007558081299066544, 0.23695187270641327, 0.15030799806118011, 0.11279688775539398, 0.16422295570373535, -0.10798916965723038, -0.2825084924697876, -0.17272956669330597, 0.18933206796646118, 0.1075056865811348, -0.07908767461776733, 0.3042197525501251, 0.4782569110393524, -0.18115893006324768, 0.44613903760910034, -0.06555754691362381, -0.04625770449638367, -0.018244855105876923, 0.06642266362905502, -0.05749362334609032, 0.3409990966320038, -0.32722020149230957, 0.06914088875055313, 0.19387730956077576, 0.15335318446159363, -0.03133140876889229, -0.47728902101516724, 0.7549998164176941, -0.3323637843132019, -0.1679583340883255, -0.3021884262561798, 0.33941516280174255, 0.1996420919895172, -0.0972607433795929, -0.1912219077348709, 0.05454525351524353, -0.248030886054039, -0.25444164872169495, -0.20198854804039001, -0.05084693431854248, -0.26890531182289124, 0.11827369034290314, 0.07384870946407318, -0.5843091607093811, 0.10081274062395096, -0.2262391448020935, 0.5677802562713623, -0.3436725437641144, 0.1229916363954544, -0.05973174422979355, -0.20864801108837128, -0.1660017967224121, -0.012474527582526207, 0.3085114657878876, 0.2649500370025635, -0.17966148257255554, -0.18301811814308167, -0.08096744865179062, -0.23823457956314087, -0.12669411301612854, 0.22262825071811676, -0.010514501482248306, 0.2006150782108307, 0.08514797687530518, 0.108415886759758, 0.17144009470939636, -0.7114335894584656, -0.23425406217575073, 0.040434807538986206, 0.22362805902957916, 0.28316357731819153, -0.07826831191778183, 0.307807594537735, 0.11452773958444595, -0.169148251414299, -0.13074886798858643, 0.4090508818626404, -0.07406792789697647, -0.25335049629211426, -0.1601090133190155, 0.06218507140874863, 0.18036621809005737, 0.14311595261096954, 0.4445333778858185, -0.15841689705848694, 0.06577073037624359, 0.02547891065478325, -0.1756354570388794, -0.32198938727378845, -0.16985784471035004, -0.03255791217088699, 0.3594151735305786, -0.02343207597732544, 0.1073378250002861, -0.20933374762535095, -0.5224546194076538, 0.1673998236656189, -0.1160125657916069, 0.2480335533618927, 0.09718764573335648, -0.31906747817993164, -0.14317697286605835, 0.41235291957855225, -0.0491628460586071, -0.1736116111278534, 0.06981866806745529, -0.13459376990795135, 0.21216100454330444, -0.053913287818431854, -0.09226009249687195, 0.22226138412952423, 0.09087327122688293, 0.28210222721099854, 0.40277621150016785, 0.363661527633667, -0.11110175400972366, 0.12926048040390015, 0.11702734231948853, 0.43815550208091736, 0.0024808868765830994, -0.021298402920365334, 0.022312497720122337, 0.3827010691165924, -0.09474202990531921, 0.23236888647079468, 0.23790720105171204, 0.49449294805526733, 0.11890720576047897, -0.32124823331832886, 0.12849673628807068, 0.000963037833571434, 0.04217376932501793, -0.04648355394601822, -0.0077401697635650635, 0.7312794923782349, 0.062046460807323456, 0.4585791528224945, 0.09335201978683472, -0.10224919766187668, 0.05762708932161331, 0.05533117428421974, -0.27855542302131653, -0.32950153946876526, 0.1663162261247635, -0.26307153701782227, 0.12562109529972076, -0.1224566102027893, -0.024494681507349014, -0.051909349858760834, -0.12570986151695251, -0.12925921380519867, 0.13464699685573578, 0.28173738718032837, 0.08597084134817123, -0.09321620315313339, -0.03981141746044159, -0.21531087160110474, 0.2656779885292053, 0.08487293124198914, -0.010562147945165634, 0.2854544520378113, -0.18386875092983246, 0.18539470434188843, 0.174500972032547, 0.47141319513320923, -0.14562444388866425, 0.2780245542526245, 0.2813170552253723, -0.023759789764881134, -0.3009243905544281, -0.4294907748699188, -0.29316964745521545, 0.012250568717718124, -0.17633886635303497, 0.3256581425666809, 0.11418226361274719, -0.34903281927108765, 0.15679658949375153, -0.4588404595851898, -0.24338310956954956, -0.520746648311615, 0.1033492386341095, 0.019050637260079384, 0.07061637938022614, 0.12762781977653503, 0.03698637709021568, 0.5012652277946472, -0.2499656081199646, 0.09263329207897186, -0.12034393101930618, -0.29229649901390076, 0.07370571047067642, 0.012969981878995895, 0.25533199310302734, -0.023491820320487022, 0.2086300104856491, 0.073582224547863, 0.3236076235771179, 0.06383899599313736, -0.5853333473205566, 0.1565503478050232, -0.0495685338973999, 0.18759842216968536, -0.007708102464675903, -0.5228642225265503, 0.12152916193008423, -0.3543282449245453, 0.17212510108947754, -0.21014651656150818, -0.07498791813850403, -0.05300576984882355, -0.1912761777639389, -0.14623121917247772, -0.15776021778583527, 0.005371391773223877, -0.41869890689849854, -0.1929977387189865, 0.36010342836380005, 0.2147982269525528, -0.02134466916322708, 0.1497693806886673, 0.08653715252876282, 0.026094816625118256, 0.055063869804143906, -0.1355026662349701, -0.05299525335431099, 0.04069264605641365, 0.4118337035179138, -0.17697101831436157, -0.053760189563035965, -0.21540436148643494, -0.4016526937484741, -0.07027558982372284, -0.2474471777677536, -0.320371150970459, -0.7439361810684204, -0.14340469241142273, 0.12651760876178741, 0.01834271103143692, -0.016393279656767845, 0.07661719620227814, -0.2344217747449875, 0.1522073894739151, -0.06576982140541077, -0.40894678235054016, 0.119492307305336, -0.07772853970527649, -0.08904477208852768, -0.5065963864326477, 0.4495173692703247, 0.22949397563934326, 0.39335793256759644, 0.0016590394079685211, -0.3807326555252075, 0.11662548780441284, 0.09101849794387817, 0.35889294743537903, 0.035747211426496506, -0.17371580004692078, 0.21557466685771942, -0.179408997297287, -0.24320705235004425, 0.2479093074798584, 0.09340009838342667, -0.18022140860557556, -0.33380645513534546, 0.03022189810872078, -0.3992536664009094, -0.265398770570755, 0.026892436668276787, 0.22936715185642242, 0.05439509451389313, 0.003498181700706482, -0.001596834510564804, -0.547383725643158, -0.0930740162730217, 0.39016133546829224, 0.22793357074260712, 0.06087951734662056, -0.09345799684524536, -0.23302198946475983, -0.1388537585735321, -0.4689036011695862, 0.36945849657058716, 0.06994592398405075, -0.005407937802374363, 0.12339438498020172, -0.022869771346449852, 0.0018487945199012756, -0.10144191980361938, 0.21546927094459534, -0.055001966655254364, -0.012100286781787872, 0.08326059579849243, -0.49663856625556946, -0.07820888608694077, -0.28714483976364136, -0.2765395939350128, -0.0057885171845555305, 0.21869392693042755, 0.5335069894790649, -0.35276541113853455, 0.1291579306125641, 0.2480498105287552, 0.0165710486471653, -0.2094556838274002, -0.019246114417910576, -0.1649116426706314, 0.08221103996038437, -0.015065103769302368, -0.04203791171312332, 0.12709297239780426, 0.16497662663459778, 0.05912768840789795, 0.16095075011253357, 0.06613035500049591, -0.04188227653503418, 0.5437102317810059, 0.5955364108085632, 0.009381303563714027, 0.018290698528289795, 0.025468047708272934, -0.032029345631599426, -0.4661464989185333, 0.20590579509735107, 0.2957647740840912, -0.060999054461717606, -0.8166989088058472, -0.05618914216756821, 0.19405822455883026, 0.293487548828125, -0.019590899348258972, 0.07213706523180008, -0.24219489097595215, -0.18712839484214783, 0.2542265057563782, -0.32091543078422546, 0.5390099883079529, 0.08803648501634598, 0.22925181686878204, -0.18263356387615204, 0.014143453910946846, 0.3457559645175934, 0.16414974629878998, -0.1617697775363922, 0.07214084267616272, 0.1148471087217331, -0.16931496560573578, 0.33994191884994507, 0.4461803138256073, 0.8220873475074768, -0.11261112987995148, -0.15487290918827057, 0.01204724982380867, -0.13744276762008667, 0.2894870638847351, -0.45292413234710693, -0.008489102125167847, -0.18824690580368042, -0.2486753612756729, -0.04012909531593323, -0.14069950580596924, 0.026349443942308426, -0.19417886435985565, -0.059513743966817856, 0.16819347441196442, 0.24823464453220367, 0.1855226457118988, 0.12492091953754425, 0.2243403196334839, 0.0713229849934578, -0.3313353955745697, 0.002644931897521019, 0.09457676112651825, -0.2098756581544876, 0.20942990481853485, -0.11258520931005478, -0.008899727836251259, -0.3395109474658966, 0.14019018411636353, -0.2040751576423645, -0.029632722958922386, -0.12020208686590195, 0.21457624435424805, 0.16271759569644928, -0.134689599275589, 0.05993049964308739, 0.3501698076725006, 0.4952372908592224, -0.16188272833824158, 0.0012827403843402863, 0.07537251710891724, -0.27757444977760315, 0.13208061456680298, 0.06562065333127975, -0.26263120770454407, 0.29517847299575806, -0.09126067161560059, 0.30074015259742737, 0.17013806104660034, 0.4086492955684662, -0.30362188816070557, 0.15063390135765076, -0.1786525994539261, 0.17010796070098877, -0.06265955418348312, 0.3288614749908447, 0.1114547848701477, -0.1378711313009262, -0.08253161609172821, 0.014889806509017944, 0.102623850107193, -0.24906422197818756, 0.30694830417633057, -0.03357566520571709, -0.20772936940193176, 0.02397659607231617, 0.09651806950569153, -0.08184285461902618, -0.17176678776741028, -0.011889513581991196, -0.10718519240617752, -0.1967211812734604, -0.039588652551174164, -0.25629347562789917, -0.1372637003660202, -0.31698736548423767, 0.31165122985839844, -0.25147753953933716, -0.4688403010368347, -0.1731032431125641, 0.42108020186424255, 0.39398425817489624, 0.302322655916214, -0.19342462718486786, -0.3022736608982086, -0.35814327001571655, 0.23725976049900055, -0.22290848195552826, 0.16736918687820435, -0.21834781765937805, 0.6170167922973633, -0.09943299740552902, 0.3165114223957062, -0.23740331828594208, -0.27782344818115234, -0.27449163794517517, -0.06474591791629791, -0.4368363320827484, -0.39903712272644043, -0.030897585675120354, -0.018897883594036102, -0.07377732545137405, 0.22887414693832397, -0.2616606056690216, -0.06010030210018158, -0.23916573822498322, 0.16943825781345367, 0.047180887311697006, 0.40992096066474915, -0.1718665361404419, 0.3195154666900635, 0.03533107042312622, -0.3725659251213074, 0.0807260125875473, 0.11931409686803818, -0.07009083032608032, 0.2858251631259918, 0.21366742253303528, 0.16553851962089539, 0.14104247093200684, -0.10011082887649536, 0.31560516357421875, 0.3201054334640503, 0.4249010980129242, 0.2872235178947449, -0.3312378227710724, -0.08101224899291992, 0.14635640382766724, 0.2061980962753296, 0.14396333694458008, -0.08910858631134033, 0.42177316546440125, 0.253075510263443, -0.10031884908676147, 0.11754188686609268, 0.39940008521080017, 0.15515178442001343, 0.0832904651761055, 0.16190114617347717, -0.1746636927127838, 0.09059030562639236, -0.07626581192016602, -0.02857818827033043, 0.2756686806678772, -0.15712636709213257, 0.2356153428554535, 0.42698827385902405, 0.31064507365226746, 0.25693532824516296, 0.144313246011734, 0.10294648259878159, 0.25964388251304626, 0.48619377613067627, 0.21067722141742706, -0.06115717813372612, -0.057512350380420685, 0.13155482709407806, 0.5030166506767273, -0.2669907212257385, 0.4692577123641968, -0.027660571038722992, -0.1999397873878479, 0.22998443245887756, -0.43488800525665283, 0.22629812359809875, 0.32291513681411743, -0.005620468407869339, -0.14967134594917297, -0.23518693447113037, 0.2930428385734558, 0.3130591809749603, -0.04898257553577423, -0.09695415943861008, -0.04883335530757904, -0.13190320134162903, -0.3544021546840668, 0.21442663669586182, 0.13709917664527893, -0.10068908333778381, -0.1435357630252838, -0.09541582316160202, -0.2012462615966797, 0.05582961067557335, 0.05009979009628296, -0.47975802421569824, -0.1086423397064209, 0.0039204880595207214, -0.028910227119922638, 0.33975908160209656, -0.21362146735191345, 0.27994170784950256, 0.7104997038841248, -0.14394952356815338, -0.07756887376308441, 0.4368624687194824, 0.0029715895652770996, -0.11554622650146484, 0.3416866064071655, 0.31228727102279663, -0.08686487376689911, -0.41183021664619446, 0.2339441478252411, 0.011372063308954239, -0.0028075650334358215, 0.004715364426374435, 0.16326473653316498, 0.06551413983106613, 0.24627244472503662, 0.2556036412715912, 0.06603284925222397, -0.17032067477703094, 0.046255774796009064, -0.30370858311653137, 0.3906093239784241, -0.40593838691711426, 0.12439996749162674, 0.2919084429740906, 0.021463893353939056, -0.12435631453990936, 0.008758693933486938, -0.11085258424282074, -0.4503011703491211, 0.021985579282045364, -0.29586926102638245, -0.09494902193546295, -0.09228070080280304, 0.014553733170032501, -0.15071193873882294, 0.28537818789482117, 0.2920779585838318, 0.23231661319732666, -0.43318483233451843, -0.160640150308609, -0.4389684796333313, 0.04949623718857765, 0.19212006032466888, -0.3307110369205475, -0.026143498718738556, 0.2662695646286011, -0.024080082774162292, 0.5436848998069763, -0.01639413833618164, 0.2819666564464569, 0.11844886094331741, 0.07442304491996765, -0.442009299993515, 0.21704021096229553, -0.4874480962753296, -0.1042250394821167, 0.152223140001297, 0.04207158088684082, -0.21758858859539032, 0.048893798142671585, -0.07200369238853455, 0.11874561756849289, -0.18518128991127014, -0.05865972861647606, 0.5239102840423584, 0.3720208704471588, 0.1598092019557953, 0.3868491053581238, 0.1139063909649849, 0.1370791792869568, 0.037233591079711914, -0.2163698524236679, 0.08156546950340271, 0.04744758456945419, -0.13198180496692657, 0.4094470739364624, -0.18684892356395721, 0.04752814397215843, -0.060323815792798996, 0.24509640038013458, 0.48449498414993286, -0.4972524344921112, -0.07900409400463104, 0.0072271693497896194, -0.21216189861297607, 0.07281504571437836, 0.13772600889205933, 0.5201488137245178, 0.19250544905662537, 0.25577330589294434, 0.05729573965072632, -0.39003118872642517, 0.4627175033092499, -0.23698897659778595, 0.030120324343442917, -0.20287001132965088, 0.07764934748411179, 0.37794896960258484, -0.11648676544427872, -0.6244451403617859, -0.09534300863742828, 0.16032786667346954, -0.08762870728969574, -0.1636817306280136, 0.24361184239387512, -0.19679245352745056, 0.07846741378307343, -0.1009131446480751, 0.12860319018363953, -0.0290018692612648, 0.061576902866363525, -0.16327247023582458, -0.21581578254699707 ]