html_url
stringlengths 51
51
| title
stringlengths 6
280
| comments
stringlengths 63
141k
| body
stringlengths 18
58.6k
⌀ | comment_length
int64 16
10.8k
| text
stringlengths 6
280
| embeddings
listlengths 768
768
|
---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/3242
|
Adding ANERcorp-CAMeLLab dataset
|
Adding ANERcorp dataset
## Adding a Dataset
- **Name:** *ANERcorp-CAMeLLab*
- **Description:** *Since its creation in 2008, the ANERcorp dataset (Benajiba & Rosso, 2008) has been a standard reference used by Arabic named entity recognition researchers around the world. However, over time, this dataset was copied over from user to user, modified slightly here and there, and split in many different configurations that made it hard to compare fairly across papers and systems.
In 2020, a group of researchers from CAMeL Lab (Habash, Alhafni and Oudah), and Mind Lab (Antoun and Baly) met with the creator of the corpus, Yassine Benajiba, to consult with him and collectively agree on an exact split, and accepted minor corrections from the original dataset. Bashar Alhafni from CAMeL Lab working with Nizar Habash implemented the decisions provided in this release.*
- **Paper:** *(a) Benajiba, Yassine, Paolo Rosso, and José Miguel Benedí Ruiz. "Anersys: An Arabic named entity recognition system based on maximum entropy." In International Conference on Intelligent Text Processing and Computational Linguistics, pp. 143-153. Springer, Berlin, Heidelberg, 2007.
(b)Ossama Obeid, Nasser Zalmout, Salam Khalifa, Dima Taji, Mai Oudah, Bashar Alhafni, Go Inoue, Fadhl Eryani, Alexander Erdmann, and Nizar Habash. "CAMeL Tools: An Open Source Python Toolkit, for Arabic Natural Language Processing." In Proceedings of the Conference on Language Resources and Evaluation (LREC 2020), Marseille, 2020.*
- **Data:** *https://camel.abudhabi.nyu.edu/anercorp/*
- **Motivation:** This is the standard dataset for evaluating NER performance in Arabic*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| null | 248 |
Adding ANERcorp-CAMeLLab dataset
|
[
-0.4908897578716278,
0.1243492066860199,
-0.14388413727283478,
0.267351895570755,
-0.010640236549079418,
0.09781406819820404,
0.37204423546791077,
0.033977288752794266,
0.02311966009438038,
0.3427731990814209,
-0.2670290172100067,
0.25185897946357727,
-0.10003145784139633,
0.5042464733123779,
0.07305102050304413,
0.21312066912651062,
-0.10958119481801987,
0.28718650341033936,
-0.3132345974445343,
-0.07766664028167725,
-0.24853572249412537,
0.04694901779294014,
-0.11702393740415573,
-0.28222301602363586,
-0.13081437349319458,
-0.06082559749484062,
-0.1679481863975525,
0.08632271736860275,
-0.3816923499107361,
-0.397149920463562,
0.15097977221012115,
0.2351311892271042,
0.15654367208480835,
0.3077794313430786,
-0.00011255822755629197,
-0.11977574974298477,
0.024963324889540672,
-0.18589584529399872,
-0.3359401822090149,
0.08409561216831207,
-0.355906218290329,
-0.05371580645442009,
-0.01396400760859251,
-0.2512660622596741,
-0.00868211779743433,
0.0031498055905103683,
-0.023977557197213173,
-0.3347207009792328,
-0.05899043753743172,
-0.016025960445404053,
0.23129494488239288,
0.22971947491168976,
-0.09430727362632751,
-0.11589108407497406,
0.20740191638469696,
-0.32387280464172363,
-0.06495645642280579,
0.16579295694828033,
0.2910394072532654,
0.15505120158195496,
0.04202190414071083,
0.2584155797958374,
0.22625164687633514,
-0.25339582562446594,
0.13157925009727478,
-0.0628352016210556,
-0.11887122690677643,
-0.33511507511138916,
0.16245684027671814,
0.04944600909948349,
0.39003893733024597,
0.010077767074108124,
-0.3066541254520416,
0.08579911291599274,
0.2462649792432785,
-0.3832593560218811,
0.18177169561386108,
0.07579304277896881,
-0.22322851419448853,
-0.15662676095962524,
0.16075502336025238,
-0.4838859438896179,
-0.34259089827537537,
0.05180548503994942,
-0.2273748368024826,
0.5371648669242859,
-0.03709467127919197,
0.04323401302099228,
0.09741751849651337,
0.3892499804496765,
0.5070317983627319,
0.07897824794054031,
-0.02536739408969879,
0.21067091822624207,
-0.0874304547905922,
-0.08604631572961807,
-0.025504736229777336,
0.2597458064556122,
-0.11983498185873032,
-0.25394099950790405,
0.19278769195079803,
-0.1360858678817749,
-0.22229792177677155,
0.09144195169210434,
-0.017132507637143135,
-0.027413612231612206,
0.2654045522212982,
0.1740088313817978,
0.1780463606119156,
0.09298035502433777,
0.17743879556655884,
-0.1499503254890442,
-0.146696999669075,
0.1733102798461914,
-0.17757964134216309,
0.09401983767747879,
-0.22878959774971008,
-0.35723233222961426,
-0.02399437315762043,
-0.06483963131904602,
-0.002531756879761815,
-0.21424704790115356,
-0.10372047871351242,
0.1514359563589096,
0.016011813655495644,
-0.10631165653467178,
-0.1567455530166626,
0.4563235342502594,
0.13462263345718384,
-0.28314611315727234,
-0.1780804693698883,
0.044231511652469635,
-0.05892249569296837,
0.1692296415567398,
0.01769883558154106,
-0.11560217291116714,
0.13269825279712677,
-0.18449564278125763,
-0.2592703700065613,
0.5001619458198547,
0.16908857226371765,
-0.009775410406291485,
0.12613318860530853,
0.28308525681495667,
0.43997249007225037,
0.19751125574111938,
-0.17846359312534332,
-0.2130664885044098,
-0.14179541170597076,
0.15705786645412445,
0.12448037415742874,
-0.13143466413021088,
-0.403709352016449,
0.22967053949832916,
-0.20604749023914337,
-0.21193335950374603,
-0.013049979694187641,
-0.05793825536966324,
0.11632256209850311,
-0.2562412917613983,
-0.05297486111521721,
-0.017131542786955833,
0.09166345745325089,
-0.21647900342941284,
-0.2729802429676056,
0.2293504774570465,
-0.6403257846832275,
-0.1473996490240097,
-0.2265535145998001,
-0.07756137102842331,
0.22785544395446777,
0.05434359982609749,
-0.34871214628219604,
0.22529372572898865,
-0.006628529634326696,
-0.09580188244581223,
0.5131636261940002,
-0.07936599850654602,
-0.32122746109962463,
-0.12101982533931732,
0.02389425039291382,
-0.47581708431243896,
0.2639484703540802,
0.5278781652450562,
0.26652148365974426,
-0.035406071692705154,
-0.12163076549768448,
0.3077712953090668,
-0.05509383603930473,
-0.19288323819637299,
-0.23747754096984863,
-0.14715076982975006,
0.11276017129421234,
0.39669960737228394,
0.0601363405585289,
0.10844074934720993,
-0.00783385057002306,
-0.07046998292207718,
-0.026945434510707855,
-0.36948084831237793,
0.17406167089939117,
0.33977991342544556,
0.5119386911392212,
-0.09787964075803757,
-0.06899913400411606,
0.06703157722949982,
0.027355041354894638,
-0.12407852709293365,
-0.5382358431816101,
0.6741876006126404,
0.11715074628591537,
-0.11038187146186829,
-0.09735307097434998,
0.040651414543390274,
-0.057443127036094666,
-0.012917737476527691,
0.11845933645963669,
0.37094518542289734,
-0.1781691163778305,
-0.07311588525772095,
-0.1507527083158493,
0.5878536105155945,
0.3656471371650696,
0.04781254008412361,
-0.4788389205932617,
0.3821568191051483,
-0.1611284762620926,
0.015175607055425644,
0.2252158224582672,
0.2068835347890854,
0.09984627366065979,
-0.06281635165214539,
0.0621110200881958,
0.06798629462718964,
-0.2984575629234314,
0.07230690121650696,
0.4036778509616852,
0.07790441811084747,
0.1846836358308792,
0.10234346985816956,
0.18427135050296783,
-0.48134931921958923,
0.18358366191387177,
0.0024547316133975983,
-0.06892430037260056,
0.16806969046592712,
0.2360881119966507,
-0.045361291617155075,
0.010364736430346966,
-0.0548829585313797,
0.4227552115917206,
-0.0637853592634201,
-0.08334560692310333,
-0.04549505189061165,
0.03673868998885155,
0.0452568344771862,
-0.046700913459062576,
0.051148440688848495,
-0.006528302561491728,
0.056151602417230606,
0.3007065951824188,
0.0449489988386631,
-0.06584947556257248,
-0.02905518002808094,
-0.3965776264667511,
0.0077408552169799805,
0.2945689558982849,
0.3434726595878601,
0.3316006064414978,
0.425010085105896,
0.06947458535432816,
-0.08612038940191269,
-0.015059452503919601,
-0.20995958149433136,
0.33555105328559875,
0.12283919006586075,
-0.09279202669858932,
-0.03693157061934471,
0.11613112688064575,
0.1582665741443634,
-0.23609507083892822,
-0.3995002210140228,
-0.16620300710201263,
0.3855959177017212,
-0.1418711096048355,
0.0059335860423743725,
0.14787590503692627,
-0.5721111297607422,
-0.025484604761004448,
-0.14986169338226318,
-0.13497021794319153,
-0.8140481114387512,
0.2055213451385498,
0.20728084444999695,
0.12213749438524246,
0.17272837460041046,
-0.15184783935546875,
0.4749862849712372,
0.05268726870417595,
0.00042861170368269086,
0.00867773313075304,
-0.13832241296768188,
-0.09035550057888031,
0.26410970091819763,
0.04619536176323891,
-0.10869903862476349,
0.37317192554473877,
-0.00903932936489582,
0.24349439144134521,
-0.0538296177983284,
-0.30354470014572144,
0.2194831222295761,
-0.1014535054564476,
0.19594649970531464,
0.08358391374349594,
0.3720610439777374,
-0.015795813873410225,
-0.42960378527641296,
0.06547637283802032,
0.05876034498214722,
0.03021516464650631,
-0.2211109697818756,
-0.2952345907688141,
-0.246522918343544,
-0.23074141144752502,
-0.3259468376636505,
-0.22252942621707916,
-0.1554533988237381,
-0.24506130814552307,
0.28354528546333313,
0.06672168523073196,
0.07465304434299469,
-0.2516549527645111,
-0.14854392409324646,
0.0872831791639328,
-0.48849767446517944,
-0.26765376329421997,
-0.2939448058605194,
0.6423214673995972,
-0.2850777804851532,
-0.3740491271018982,
0.035647422075271606,
-0.23726315796375275,
0.8240286111831665,
-0.14780394732952118,
-0.3806827962398529,
-0.01635960303246975,
-0.0025744400918483734,
-0.13993678987026215,
0.09781278669834137,
0.3816186487674713,
0.24811573326587677,
0.07297535240650177,
-0.12768703699111938,
0.006316864863038063,
-0.26272323727607727,
0.16024644672870636,
0.3503967523574829,
0.3691313564777374,
-0.2392522096633911,
0.046236611902713776,
-0.003957898356020451,
0.4149635434150696,
-0.08522485196590424,
-0.19288167357444763,
0.3563365340232849,
-0.33281615376472473,
0.3413837254047394,
0.061133503913879395,
-0.39658281207084656,
-0.16790801286697388,
0.3724184036254883,
0.0033037092071026564,
0.05671694874763489,
0.02306174486875534,
-0.53925621509552,
-0.11646600067615509,
0.057627469301223755,
-0.3354153335094452,
-0.054245609790086746,
0.2399357706308365,
0.12951092422008514,
0.28679293394088745,
0.10973075032234192,
-0.1945025771856308,
-0.39949536323547363,
-0.4739598333835602,
-0.007838110439479351,
-0.015830207616090775,
-0.062462516129016876,
-0.2459515482187271,
-0.2440183013677597,
-0.17409098148345947,
-0.5318849682807922,
0.4036368727684021,
-0.007107016164809465,
0.04063582792878151,
-0.10031222552061081,
-0.10255726426839828,
-0.07103989273309708,
0.1489439755678177,
0.23666603863239288,
-0.4853060841560364,
-0.35571959614753723,
0.40166735649108887,
0.20866507291793823,
-0.4829247295856476,
0.2379770278930664,
-0.3656109869480133,
0.3347497284412384,
0.22641392052173615,
0.30071279406547546,
-0.12694543600082397,
0.42966923117637634,
0.4392527937889099,
0.1409858912229538,
-0.1835853010416031,
-0.09849818795919418,
-0.12617404758930206,
-0.34117335081100464,
-0.2543855905532837,
-0.07094866782426834,
-0.5770900249481201,
0.2389351725578308,
0.2139679193496704,
-0.3270218074321747,
-0.08075932413339615,
-0.11250610649585724,
0.4667394459247589,
0.3174614906311035,
-0.09378513693809509,
0.26977354288101196,
0.12883444130420685,
0.03723824396729469,
-0.13841138780117035,
0.09641848504543304,
0.26944994926452637,
-0.08760177344083786,
0.4094482362270355,
0.1739240139722824,
-0.363141268491745,
0.39734891057014465,
0.23244304955005646,
0.08601446449756622,
0.12595109641551971,
0.2376975566148758,
-0.04154267907142639,
0.2760808765888214,
0.12036703526973724,
-0.009942005388438702,
0.15471023321151733,
-0.43191635608673096,
-0.26518285274505615,
0.3127478063106537,
0.11145468056201935,
-0.13643208146095276,
0.34295743703842163,
0.0932319313287735,
-0.04379995912313461,
0.4282388389110565,
-0.17190688848495483,
1.1672719717025757,
-0.18743091821670532,
0.06755533069372177,
0.37496286630630493,
-0.055745866149663925,
0.4236760139465332,
-0.05167819932103157,
0.04930484667420387,
-0.46801450848579407,
-0.1559285968542099,
-0.026875680312514305,
-0.13419318199157715,
0.18630073964595795,
-0.12023589015007019,
-0.12018518894910812,
0.2291002720594406,
0.1435939222574234,
-0.06417779624462128,
-0.19013141095638275,
0.2352178543806076,
-0.3680635094642639,
-0.31908562779426575,
-0.06278036534786224,
0.16939032077789307,
0.004162583500146866,
0.25779905915260315,
0.07411150634288788,
-0.19123433530330658,
-0.32280465960502625,
-0.2741149365901947,
-0.03193118795752525,
-0.053136128932237625,
-0.40728768706321716,
-0.05451150983572006,
-0.0799618735909462,
-0.08594413846731186,
0.12892355024814606,
0.09797048568725586,
0.0963883250951767,
-0.06853954493999481,
0.09847372770309448,
0.1014970988035202,
-0.21133187413215637,
-0.12557145953178406,
0.2551038861274719,
-0.024797523394227028,
-0.0028280604165047407,
-0.37650641798973083,
-0.12640751898288727,
0.2898925840854645,
0.26030492782592773,
-0.36064445972442627,
0.28367021679878235,
0.18076753616333008,
0.4771551191806793,
-0.46684977412223816,
-0.22479631006717682,
0.1948184221982956,
0.036056216806173325,
-0.154102623462677,
0.12709084153175354,
0.14420092105865479,
-0.06551443040370941,
0.22238825261592865,
0.2827286124229431,
-0.17630918323993683,
-0.3230915665626526,
0.34714940190315247,
0.28513407707214355,
-0.08108171820640564,
0.2119901329278946,
-0.18382489681243896,
-0.17258453369140625,
-0.18799494206905365,
-0.06595595180988312,
0.1821368932723999,
-0.5510948300361633,
-0.3807793855667114,
-0.005576711148023605,
-0.014189627952873707,
-0.22622959315776825,
0.27215465903282166,
0.24642044305801392,
0.10649970173835754,
-0.41712629795074463,
-0.3074522018432617,
-0.18348251283168793,
0.1986887902021408,
-0.271226704120636,
0.2848898470401764,
0.2547749876976013,
0.07504770904779434,
-0.11763790249824524,
0.1718432605266571,
-0.38969022035598755,
-0.00915085431188345,
0.049781300127506256,
0.03258835896849632,
0.2533259689807892,
-0.006031215190887451,
0.2727023661136627,
-0.1727294921875,
0.20999091863632202,
-0.10187067091464996,
-0.07791109383106232,
-0.20240117609500885,
0.030738787725567818,
0.11594890058040619,
0.20821042358875275,
-0.1810043305158615,
-0.29297930002212524,
-0.27379265427589417,
0.0256041269749403,
0.13845424354076385,
-0.01930582895874977,
-0.15300795435905457,
-0.13366325199604034,
-0.0059808399528265,
-0.13050852715969086,
-0.20061811804771423,
-0.17701636254787445,
0.27743402123451233,
0.21218445897102356,
0.15682515501976013,
0.25360772013664246,
0.4042646884918213,
-0.11600365489721298,
-0.19078429043293,
0.07708832621574402,
0.2393416166305542,
0.0996020957827568,
0.23942218720912933,
0.06200379133224487,
-0.24631527066230774,
0.04393085092306137,
0.47987979650497437,
0.08857246488332748,
-0.18441741168498993,
-0.14403317868709564,
0.13090895116329193,
-0.004165587946772575,
0.12645941972732544,
-0.11403469741344452,
-0.061759110540151596,
0.0923512876033783,
-0.1878238320350647,
0.07075008749961853,
0.5240519642829895,
0.6195032596588135,
0.11472900956869125,
0.30278027057647705,
-0.18164190649986267,
0.18176209926605225,
0.44177675247192383,
0.0921136736869812,
0.19589142501354218,
-0.2688407301902771,
0.24809063971042633,
0.18995054066181183,
0.24761135876178741,
-0.12031352519989014,
0.34497660398483276,
0.29159989953041077,
0.17254239320755005,
0.36645638942718506,
-0.2471863478422165,
0.05289765074849129,
-0.33702734112739563,
0.12029602378606796,
-0.07921300083398819,
0.21673251688480377,
0.15908747911453247,
0.5085538029670715,
0.35110026597976685,
-0.10455290228128433,
-0.05205385759472847,
-0.09903500974178314,
0.20609243214130402,
-0.09514458477497101,
0.28826844692230225,
-0.16711492836475372,
-0.21799099445343018,
-0.18413008749485016,
-0.20528829097747803,
0.05194069817662239,
-0.4787711799144745,
0.05883682146668434,
-0.057700902223587036,
-0.27644607424736023,
-0.0601874478161335,
0.019876128062605858,
0.33436182141304016,
-0.11288593709468842,
0.0014388394774869084,
0.09246805310249329,
0.028624221682548523,
0.2567955553531647,
0.07390621304512024,
0.2770891785621643,
0.30550095438957214,
-0.24246662855148315,
0.22050625085830688,
0.09857165068387985,
-0.06250526756048203,
-0.22346900403499603,
-0.037563081830739975,
-0.22845128178596497,
0.08950608968734741,
0.17140275239944458,
0.23307587206363678,
0.23377202451229095,
-0.1775076687335968,
0.0871119424700737,
0.235592320561409,
0.30321434140205383,
-0.0004824640054721385,
-0.1072009801864624,
0.0931176245212555,
-0.125766783952713,
-0.2318417727947235,
-0.29786577820777893,
-0.30229854583740234,
-0.009405381977558136,
0.1485876888036728,
-0.28041601181030273,
0.1049167737364769,
-0.25234559178352356,
0.05717911943793297,
-0.08966835588216782,
0.3984537124633789,
0.5624394416809082,
0.15025973320007324,
-0.15423403680324554,
-0.33236315846443176,
-0.4725058972835541,
-0.046525195240974426,
0.03438806161284447,
-0.10020311921834946,
-0.37213996052742004,
0.05586373433470726,
0.4227459132671356,
0.2875145971775055,
0.48504504561424255,
-0.017447615042328835,
0.142275869846344,
-0.06876152008771896,
-0.2936231791973114,
-0.09952055662870407,
0.22687013447284698,
0.15730872750282288,
-0.20180347561836243,
-0.17343692481517792,
0.06905391067266464,
-0.14694872498512268,
0.23277762532234192,
-0.04001516103744507,
-0.2727316915988922,
-0.16585767269134521,
-0.05247480794787407,
0.44983237981796265,
-0.066973015666008,
0.6449007987976074,
-0.29775699973106384,
0.05464102700352669,
0.160882368683815,
0.006398146040737629,
0.09472702443599701,
-0.05827535316348076,
0.44947704672813416,
0.4981881082057953,
-0.03131948411464691,
0.04584610462188721,
-0.018138045445084572,
0.42871516942977905,
0.0049415212124586105,
0.12614138424396515,
-0.15906482934951782,
0.26562121510505676,
-0.1405555158853531,
0.05230742692947388,
0.12678596377372742,
0.05175384506583214,
0.0400066152215004,
0.051697492599487305,
-0.08805755525827408,
-0.2238580733537674,
0.36952123045921326,
-0.16720546782016754,
-0.1313377022743225,
-0.09104651212692261,
-0.09966179728507996,
0.261579692363739,
0.2871330678462982,
-0.21288201212882996,
0.18534590303897858,
0.3003653585910797,
-0.3911651372909546,
-0.032051023095846176,
0.4596622884273529,
0.024110285565257072,
0.014108517207205296,
-0.07953707128763199,
0.18888628482818604,
-0.02157970331609249,
-0.3147242069244385,
-0.25284576416015625,
-0.18066631257534027
] |
https://github.com/huggingface/datasets/issues/3240
|
Couldn't reach data file for disaster_response_messages
|
It looks like the dataset isn't available anymore on appen.com
The CSV files appear to still be available at https://www.kaggle.com/landlord/multilingual-disaster-response-messages though. It says that the data are under the CC0 license so I guess we can host the dataset elsewhere instead ?
|
## Describe the bug
Following command gives an ConnectionError.
## Steps to reproduce the bug
```python
disaster = load_dataset('disaster_response_messages')
```
## Error
```
ConnectionError: Couldn't reach https://datasets.appen.com/appen_datasets/disaster_response_data/disaster_response_messages_training.csv
```
## Expected results
It should load dataset without an error
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform: Google Colab
- Python version: 3.7
- PyArrow version:
| 42 |
Couldn't reach data file for disaster_response_messages
|
[
-0.2525918781757355,
-0.1621054708957672,
-0.281527042388916,
0.2792505621910095,
0.2708107829093933,
0.023686902597546577,
-0.11256390810012817,
0.20697928965091705,
-0.12498673051595688,
0.2507286071777344,
0.011092325672507286,
-0.07658267766237259,
-0.11097520589828491,
-0.08064360916614532,
-0.11666671186685562,
0.237426295876503,
-0.22891277074813843,
0.08852745592594147,
-0.11290429532527924,
0.09231208264827728,
0.06116180866956711,
0.13990385830402374,
0.04437882825732231,
0.2646472156047821,
-0.2693975865840912,
0.08155446499586105,
-0.11976974457502365,
0.4365517795085907,
-0.2903278172016144,
-0.20589889585971832,
0.15791404247283936,
-0.1548444628715515,
0.03259329870343208,
0.3175114095211029,
-0.00009818378021009266,
0.2617645859718323,
0.3212796747684479,
-0.14171352982521057,
-0.369939923286438,
-0.1504182070493698,
-0.1762976050376892,
-0.36266300082206726,
-0.18314002454280853,
-0.11835858225822449,
0.03531912714242935,
-0.4720231294631958,
0.09194695949554443,
-0.0007047973922453821,
0.4130265414714813,
0.6243880987167358,
0.3266233205795288,
-0.23956215381622314,
0.4357187747955322,
-0.17828784883022308,
-0.009939590469002724,
0.18210622668266296,
0.22524422407150269,
0.4592936933040619,
0.14425408840179443,
-0.040823500603437424,
0.024642234668135643,
0.21893879771232605,
0.11054869741201401,
0.04121201112866402,
-0.3328050971031189,
-0.010359315201640129,
0.3446337878704071,
-0.06879030913114548,
0.2589382529258728,
-0.08995191752910614,
0.5702260136604309,
0.14533373713493347,
0.017433911561965942,
0.11903468519449234,
-0.08239918947219849,
0.09716296941041946,
0.4538390636444092,
-0.24695266783237457,
-0.3113519549369812,
0.12240608781576157,
-0.09101201593875885,
-0.14656588435173035,
-0.32460516691207886,
0.07191026955842972,
-0.1359868347644806,
-0.06706856191158295,
-0.217649444937706,
-0.22187435626983643,
-0.24418383836746216,
0.042681287974119186,
0.19320134818553925,
0.5775288343429565,
-0.029908260330557823,
0.24530693888664246,
-0.007808773312717676,
0.10338278114795685,
-0.008041332475841045,
-0.27249667048454285,
0.09440871328115463,
-0.21359282732009888,
0.1181403174996376,
0.02717464417219162,
0.03506096452474594,
-0.18707676231861115,
0.08700176328420639,
-0.18530480563640594,
-0.16130739450454712,
0.0011330557754263282,
0.31262147426605225,
0.12746939063072205,
-0.15838442742824554,
-0.19869309663772583,
-0.14456108212471008,
-0.2549489736557007,
-0.004816684406250715,
0.33570224046707153,
0.14091216027736664,
-0.2141353338956833,
-0.007222320418804884,
0.11317798495292664,
-0.06659834831953049,
-0.017888464033603668,
-0.0891028419137001,
0.25377580523490906,
0.07313471287488937,
0.028527231886982918,
0.19795270264148712,
-0.11155138164758682,
-0.032084863632917404,
0.11313973367214203,
-0.1942257583141327,
-0.004993685055524111,
-0.3786044120788574,
0.16735193133354187,
0.29476502537727356,
0.5129108428955078,
0.24587678909301758,
-0.3415946960449219,
0.05166599527001381,
-0.13273967802524567,
-0.049086954444646835,
0.09377254545688629,
0.04590083658695221,
0.4781598746776581,
-0.14949890971183777,
0.18747994303703308,
0.031089676544070244,
0.25935786962509155,
0.15144555270671844,
-0.18490633368492126,
-0.2222631424665451,
-0.657619297504425,
0.033896416425704956,
0.38400885462760925,
0.15083102881908417,
0.20004615187644958,
0.2715804874897003,
0.03319241479039192,
0.0016356807900592685,
-0.23015224933624268,
-0.07880105078220367,
0.17189323902130127,
0.037239789962768555,
-0.0863812044262886,
0.04185223579406738,
0.3005712628364563,
-0.5676632523536682,
0.26449766755104065,
-0.06657201796770096,
-0.24976389110088348,
0.2257625162601471,
-0.11458534747362137,
-0.019853506237268448,
0.17293526232242584,
-0.3366357684135437,
0.14770619571208954,
0.11225152760744095,
0.05565663427114487,
-0.3762945532798767,
0.3637425899505615,
-0.2693673074245453,
-0.2946198582649231,
0.24161402881145477,
-0.21191252768039703,
0.021452441811561584,
0.06749977171421051,
0.5798876285552979,
-0.2288064807653427,
-0.02488434500992298,
0.007358273956924677,
-0.1214580163359642,
0.18134182691574097,
-0.45458635687828064,
-0.027459774166345596,
-0.020628325641155243,
0.10230214148759842,
0.17397470772266388,
-0.021554535254836082,
0.29763802886009216,
0.26046597957611084,
0.020574815571308136,
0.29215291142463684,
-0.17386572062969208,
0.11205031722784042,
0.02299439162015915,
-0.023584900423884392,
-0.036686234176158905,
-0.2199881225824356,
0.041573770344257355,
0.04494262859225273,
-0.31114354729652405,
0.17986582219600677,
-0.4132753312587738,
-0.05810509994626045,
0.1003345474600792,
-0.01889973320066929,
0.35327112674713135,
0.21481280028820038,
-0.027122946456074715,
0.04677020013332367,
-0.1871570497751236,
0.48328521847724915,
-0.30800241231918335,
-0.17172397673130035,
0.10886687785387039,
0.08121587336063385,
-0.3432476222515106,
-0.1938169300556183,
0.19219787418842316,
-0.27871981263160706,
-0.03957536816596985,
0.04853096604347229,
-0.034571219235658646,
0.01216871477663517,
-0.21180230379104614,
0.26442626118659973,
0.00797756016254425,
0.19120417535305023,
0.11764132976531982,
-0.04938449710607529,
0.06135168671607971,
0.13284975290298462,
-0.07754294574260712,
0.15908345580101013,
0.3501783311367035,
-0.029271775856614113,
-0.18950830399990082,
-0.041982222348451614,
0.1920633316040039,
0.10331333428621292,
0.2458597719669342,
0.13185453414916992,
0.05639011040329933,
-0.21276132762432098,
0.3848235607147217,
-0.25793901085853577,
0.03316470608115196,
-0.09346017986536026,
-0.30360281467437744,
0.06292320787906647,
0.4006863236427307,
-0.05807529017329216,
-0.02489381842315197,
-0.16882124543190002,
-0.04029885679483414,
-0.160855233669281,
0.07939419895410538,
0.16609275341033936,
0.5492501258850098,
0.1511978954076767,
0.44923636317253113,
0.055819395929574966,
0.05397536978125572,
-0.388081431388855,
0.14829714596271515,
-0.1958172619342804,
0.1075996458530426,
0.5158961415290833,
0.10599589347839355,
0.05401446297764778,
-0.15060538053512573,
-0.0957399532198906,
0.006000567227602005,
0.02068517729640007,
-0.1831749528646469,
0.10388314723968506,
-0.37549594044685364,
-0.2984786331653595,
0.11512232571840286,
-0.15791189670562744,
0.15130169689655304,
-0.2442314177751541,
0.1758088767528534,
-0.3451935350894928,
-0.14613831043243408,
-0.020528852939605713,
0.30945438146591187,
-0.06284136325120926,
0.2466583400964737,
0.1979215443134308,
-0.41227009892463684,
-0.0760907530784607,
-0.07105083018541336,
0.25496912002563477,
-0.23976042866706848,
-0.113100565969944,
-0.005228938069194555,
-0.08794088661670685,
-0.14916114509105682,
-0.18783065676689148,
-0.005473683588206768,
0.2865987718105316,
0.1337503343820572,
-0.09285694360733032,
0.35901543498039246,
0.4239761233329773,
-0.009207765571773052,
-0.057266317307949066,
0.038627270609140396,
-0.3332899808883667,
-0.3127118945121765,
-0.055008646100759506,
-0.2990049421787262,
0.13332068920135498,
-0.06796179711818695,
-0.5190277099609375,
-0.4127454161643982,
-0.4415171444416046,
-0.0384577214717865,
-0.2091519683599472,
0.13977085053920746,
-0.042375463992357254,
0.09962160885334015,
0.1809387356042862,
-0.17483989894390106,
0.2190483957529068,
-0.22093099355697632,
-0.39371901750564575,
0.24350155889987946,
-0.25094249844551086,
-0.2136298418045044,
0.14034508168697357,
0.08403725177049637,
0.2376650720834732,
0.19937343895435333,
-0.29997479915618896,
-0.30347293615341187,
-0.02185157686471939,
-0.3847581148147583,
-0.10112431645393372,
0.07318801432847977,
0.26160117983818054,
-0.10752478986978531,
-0.3182055354118347,
0.09116186201572418,
0.16234511137008667,
-0.035180725157260895,
0.0326501838862896,
0.36234623193740845,
-0.18684105575084686,
0.38780272006988525,
-0.09337698668241501,
0.4756503403186798,
-0.12190284579992294,
0.0924365445971489,
0.004019306972622871,
-0.052056584507226944,
0.16720043122768402,
0.05347239598631859,
-0.043720364570617676,
0.19333015382289886,
0.2782272398471832,
-0.11919250339269638,
0.038878340274095535,
-0.05186372995376587,
-0.09646835923194885,
-0.2197176218032837,
-0.22128745913505554,
-0.3986380696296692,
-0.04310537502169609,
-0.16729477047920227,
0.2733756899833679,
0.11675763875246048,
0.2149447798728943,
-0.08269134163856506,
-0.03534257039427757,
-0.04049910232424736,
0.10920418798923492,
0.4603840708732605,
0.05731016770005226,
0.10756081342697144,
0.08495951443910599,
-0.24537666141986847,
-0.18785908818244934,
0.34806686639785767,
0.05218157544732094,
0.24817277491092682,
-0.3343006670475006,
-0.008901873603463173,
-0.002321619773283601,
-0.0737929493188858,
0.5123380422592163,
-0.2283487617969513,
-0.011928173713386059,
0.0017108430620282888,
0.10069049894809723,
0.20986826717853546,
0.032334066927433014,
0.11070919036865234,
0.3159618675708771,
0.3673243522644043,
0.13543163239955902,
0.014954916201531887,
0.08822201937437057,
0.06820210814476013,
-0.037450093775987625,
-0.08564963936805725,
0.009186587296426296,
-0.21779756247997284,
-0.46582576632499695,
-0.11062955111265182,
0.1305033266544342,
0.08341936022043228,
0.06412313133478165,
0.06992820650339127,
-0.1813281923532486,
0.28251269459724426,
0.006014860235154629,
-0.20911870896816254,
-0.037901535630226135,
-0.016383778303861618,
-0.37541279196739197,
-0.09155721217393875,
0.3048110604286194,
0.484491229057312,
0.2807272672653198,
0.3544538915157318,
-0.11961963027715683,
-0.20774398744106293,
0.49463480710983276,
-0.25729185342788696,
0.13831466436386108,
0.3978353440761566,
-0.27211564779281616,
-0.18643993139266968,
-0.024653851985931396,
-0.019484663382172585,
-0.10659416764974594,
0.15394403040409088,
0.05948474258184433,
0.027300745248794556,
-0.24875113368034363,
-0.14347879588603973,
0.05304078757762909,
-0.029822390526533127,
-0.10039262473583221,
0.14698176085948944,
0.11991744488477707,
-0.11917433887720108,
0.25097137689590454,
-0.19119030237197876,
0.7457389831542969,
-0.22248351573944092,
0.09119222313165665,
-0.07078755646944046,
0.253648966550827,
0.3493885397911072,
-0.6052811741828918,
0.18723160028457642,
-0.03624265640974045,
-0.19276238977909088,
-0.08715563267469406,
-0.14854827523231506,
0.008332084864377975,
0.5709196925163269,
0.020076358690857887,
0.1868886500597,
0.2900533080101013,
-0.03148961812257767,
0.028132067993283272,
0.08187903463840485,
-0.1622001677751541,
0.1903315782546997,
-0.40060025453567505,
0.2522687613964081,
-0.0016160162631422281,
0.14553141593933105,
-0.13815158605575562,
0.008584629744291306,
-0.040694788098335266,
-0.2502083480358124,
-0.21003417670726776,
0.05192744359374046,
-0.23898287117481232,
-0.02874078042805195,
-0.09609733521938324,
-0.09080397337675095,
-0.23120518028736115,
0.22442017495632172,
0.312694787979126,
0.3568212687969208,
0.03695443645119667,
0.1910317838191986,
0.0754370391368866,
-0.3495205044746399,
-0.3794393241405487,
0.1733688861131668,
0.057243384420871735,
-0.08510638773441315,
-0.2417677789926529,
0.30749809741973877,
0.030354317277669907,
-0.2501746118068695,
-0.10856538265943527,
0.027753015980124474,
-0.025426367297768593,
0.11116944998502731,
0.4132269024848938,
-0.19562719762325287,
-0.20986592769622803,
-0.07218608260154724,
0.25770193338394165,
0.12594828009605408,
-0.07344062626361847,
0.018465135246515274,
0.05227429419755936,
-0.12338545173406601,
-0.03715886175632477,
0.2876279652118683,
-0.11771047115325928,
0.09033223241567612,
0.2088746279478073,
0.16237960755825043,
-0.17560537159442902,
-0.3742252290248871,
-0.369188129901886,
-0.04217579960823059,
-0.14818216860294342,
0.05629318207502365,
0.20950785279273987,
-0.01521413866430521,
0.24044370651245117,
0.0789504200220108,
0.3214099705219269,
-0.1498568058013916,
-0.1450808346271515,
-0.31901928782463074,
-0.47965577244758606,
0.11313831806182861,
-0.10695791244506836,
0.11751119047403336,
0.19285017251968384,
-0.19304805994033813,
0.006243106909096241,
-0.19005054235458374,
-0.45263710618019104,
0.14960181713104248,
-0.36519330739974976,
-0.1491372287273407,
-0.01761612854897976,
-0.21308693289756775,
0.402639240026474,
0.18736495077610016,
0.3562823235988617,
0.21980014443397522,
0.017680728808045387,
-0.3317558765411377,
0.20198199152946472,
0.06330978870391846,
-0.058097198605537415,
0.1643105149269104,
0.030798891559243202,
-0.34648722410202026,
-0.2170545756816864,
0.25339844822883606,
0.1382586807012558,
0.07370492070913315,
0.19899816811084747,
-0.11066629737615585,
-0.10964778065681458,
-0.10506079345941544,
-0.01879928447306156,
0.23300695419311523,
0.07505950331687927,
0.2464522123336792,
-0.11103510111570358,
0.017031550407409668,
-0.1255856603384018,
-0.14528125524520874,
0.20172478258609772,
0.1755003035068512,
-0.20804095268249512,
0.00031338390544988215,
0.2733445465564728,
0.03887828066945076,
-0.2553265392780304,
-0.14433202147483826,
0.22408942878246307,
0.19560353457927704,
-0.20581422746181488,
0.0928281918168068,
-0.006528141442686319,
0.23452815413475037,
0.020136376842856407,
-0.041577864438295364,
-0.13306543231010437,
-0.17046542465686798,
-0.027474889531731606,
-0.11357137560844421,
0.1968850940465927,
-0.26997774839401245,
0.23775936663150787,
0.1508496105670929,
0.07213297486305237,
0.025837551802396774,
-0.38814860582351685,
0.10064461082220078,
0.04043055325746536,
0.06233104318380356,
0.21328143775463104,
0.05776020139455795,
0.3256934583187103,
0.2945200204849243,
0.1339612752199173,
0.1134892925620079,
-0.1341429054737091,
0.14195616543293,
-0.2990270256996155,
-0.31030336022377014,
0.2930273413658142,
0.08831223845481873,
-0.3815850615501404,
0.006938553880900145,
-0.10478047281503677,
-0.05228979140520096,
-0.19104646146297455,
0.40791815519332886,
-0.22965596616268158,
-0.11465722322463989,
0.1750306934118271,
0.11416900157928467,
0.13264167308807373,
-0.32566943764686584,
-0.019326478242874146,
-0.08484409749507904,
0.014840013347566128,
0.20520934462547302,
0.052535347640514374,
-0.07564476132392883,
0.025345824658870697,
0.04341810941696167,
0.16194982826709747,
-0.05216141417622566,
-0.23890313506126404,
-0.006460093427449465,
0.057700712233781815,
-0.05700951814651489,
0.11791589111089706,
0.3289130628108978,
0.08815174549818039,
0.011223035864531994,
0.0025853144470602274,
-0.18069589138031006,
0.15506787598133087,
0.009282332845032215,
-0.2590045630931854,
-0.30633172392845154,
0.544960081577301,
0.3070248067378998,
-0.1987808346748352,
0.2239828258752823,
0.31523144245147705,
-0.2733142673969269,
-0.11535708606243134,
0.283671110868454,
0.006665878929197788,
0.45192351937294006,
-0.019437549635767937,
-0.20561371743679047,
0.09027712792158127,
-0.09095657616853714,
-0.005372485611587763,
-0.648422360420227,
-0.40127813816070557,
0.03304995223879814,
-0.1575905829668045,
0.3870926797389984,
0.14730729162693024,
0.19636677205562592,
-0.2854040265083313,
0.26181772351264954,
0.5786637663841248,
0.44921013712882996,
0.04476383328437805,
-0.2714065611362457,
-0.2940148413181305,
0.13244731724262238,
0.24259477853775024,
0.1976977437734604,
-0.22116178274154663,
0.12242402881383896,
0.18724942207336426,
-0.23000721633434296,
0.17602138221263885,
-0.09987399727106094,
-0.2155739963054657,
0.10715693235397339,
-0.1880241185426712,
-0.30688053369522095,
0.49202051758766174,
0.04548630863428116,
-0.07727226614952087,
-0.09470280259847641,
-0.14764797687530518,
0.050865139812231064,
0.25772881507873535,
-0.11916954815387726,
0.010292722843587399,
-0.08342402428388596,
0.2665131986141205,
0.24349720776081085,
-0.05962125584483147,
0.4243730902671814,
-0.1548130214214325,
-0.4250889718532562,
-0.2714342772960663,
-0.0345025435090065,
0.08460678905248642,
0.010418537072837353,
0.25851908326148987,
0.31695106625556946,
-0.17467276751995087,
-0.04993262141942978,
-0.252988338470459,
-0.24363785982131958,
-0.23355017602443695,
0.17162945866584778,
-0.1422099620103836,
0.24249668419361115,
-0.25854364037513733,
-0.03489486873149872,
-0.09519688040018082,
-0.05864851921796799,
-0.005783070344477892,
-0.055671803653240204,
-0.11058944463729858,
-0.011675586923956871,
0.3466908931732178,
0.20744505524635315,
-0.0009474363178014755,
-0.1515110731124878,
-0.05169341713190079,
-0.3025456964969635,
0.41910484433174133,
-0.3990266025066376,
0.1077454686164856,
0.3584279716014862,
-0.02043815515935421,
-0.29305005073547363,
0.06917256861925125,
-0.043736930936574936,
-0.09391263127326965,
-0.020592130720615387,
0.4577412009239197,
0.23484662175178528,
0.06473494321107864,
-0.3371386229991913,
-0.11367403715848923
] |
https://github.com/huggingface/datasets/issues/3236
|
Loading of datasets changed in #3110 returns no examples
|
Hi @eladsegal, thanks for reporting.
I am sorry, but I can't reproduce the bug:
```
In [1]: from datasets import load_dataset
In [2]: ds = load_dataset("qasper")
Downloading: 5.11kB [00:00, ?B/s]
Downloading and preparing dataset qasper/qasper (download: 9.88 MiB, generated: 35.11 MiB, post-processed: Unknown size, total: 44.99 MiB) to .cache\qasper\qasper\0.1.0\b99154d2a15aa54bfc669f82b2eda715a2e342e81023d39613b0e2920fdb3ad8...
Dataset qasper downloaded and prepared to .cache\qasper\qasper\0.1.0\b99154d2a15aa54bfc669f82b2eda715a2e342e81023d39613b0e2920fdb3ad8. Subsequent calls will reuse this data.
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<?, ?it/s]
In [3]: ds
Out[3]:
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
This makes me suspect that the origin of the problem might be the cache: I didn't have this dataset in my cache, although I guess you already had it, before the code change introduced by #3110.
@lhoestq might it be possible that the code change introduced by #3110 makes "inaccessible" all previously cached TAR-based datasets?
- Before the caching system downloaded and extracted the tar dataset
- Now it only downloads the tar dataset (no extraction is done)
|
## Describe the bug
Loading of datasets changed in https://github.com/huggingface/datasets/pull/3110 returns no examples:
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
})
```
## Steps to reproduce the bug
Load any of the datasets that were changed in https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper")
# The problem only started with the commit of #3110
load_dataset("qasper", revision="b6469baa22c174b3906c631802a7016fedea6780")
```
## Expected results
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
Which can be received when specifying revision of the commit before https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper", revision="acfe2abda1ca79f0ce5c1896aa83b4b78af76b7d")
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.2.dev0 (master)
- Python version: 3.8.10
- PyArrow version: 3.0.0
| 173 |
Loading of datasets changed in #3110 returns no examples
|
[
-0.09727028757333755,
0.34162530303001404,
-0.09711651504039764,
0.25706031918525696,
0.18149690330028534,
-0.18841047585010529,
0.5248988270759583,
0.3087003827095032,
0.23046886920928955,
0.07182158529758453,
-0.019607024267315865,
0.3447750210762024,
0.0642838329076767,
0.06272619217634201,
0.06287121027708054,
0.1376350373029709,
0.02427073009312153,
0.13156373798847198,
-0.3989175260066986,
-0.08366038650274277,
-0.17063213884830475,
0.38000190258026123,
-0.3165892958641052,
-0.058001432567834854,
-0.33932727575302124,
0.29711997509002686,
-0.11642701923847198,
0.4734252691268921,
-0.1995997279882431,
-0.2991870641708374,
0.4178197383880615,
0.2967577278614044,
0.44353002309799194,
0.29437822103500366,
-0.0001118480067816563,
0.16204772889614105,
0.309317946434021,
-0.06114984676241875,
-0.4835474193096161,
0.026973873376846313,
-0.22507429122924805,
-0.45415744185447693,
0.18450027704238892,
-0.24856366217136383,
-0.10197056084871292,
-0.3149421215057373,
-0.17763331532478333,
-0.07501622289419174,
0.34847745299339294,
0.25713467597961426,
0.22164443135261536,
0.10385532677173615,
-0.09053387492895126,
-0.5282890200614929,
0.34444281458854675,
-0.06857270747423172,
0.13608109951019287,
0.08688020706176758,
0.4566597640514374,
0.047426529228687286,
-0.0795346349477768,
0.008974921889603138,
-0.03314369171857834,
-0.02667890675365925,
-0.24036498367786407,
-0.04843739792704582,
-0.007763450033962727,
0.0265670008957386,
0.14836488664150238,
0.18567374348640442,
0.828813910484314,
0.040224432945251465,
-0.1891922652721405,
-0.14577554166316986,
-0.14543959498405457,
-0.2656192481517792,
0.13508793711662292,
-0.3048214912414551,
0.04119665175676346,
0.2261050045490265,
-0.1641673594713211,
0.05933133140206337,
-0.07026465982198715,
0.06705164909362793,
-0.32181307673454285,
0.1401013880968094,
-0.23014262318611145,
0.022486340254545212,
-0.2227959930896759,
0.04283810779452324,
0.3917543590068817,
0.04846625030040741,
0.0812288448214531,
-0.11644065380096436,
-0.1251261830329895,
0.036659564822912216,
0.4132406413555145,
0.007910660468041897,
-0.10069549828767776,
0.267147421836853,
0.5139239430427551,
0.511757493019104,
0.19446946680545807,
-0.10808371007442474,
0.08112074434757233,
0.22323763370513916,
0.18928800523281097,
-0.2864868640899658,
0.3529660999774933,
0.3061261773109436,
-0.20728525519371033,
-0.11301324516534805,
-0.3162243366241455,
-0.1412074714899063,
0.11971056461334229,
0.20996496081352234,
0.17501398921012878,
-0.37013480067253113,
-0.11705351620912552,
0.10412352532148361,
-0.10657349973917007,
-0.0910794734954834,
-0.006819129455834627,
0.314744234085083,
0.22844766080379486,
0.1251949816942215,
0.14429344236850739,
0.05077702924609184,
-0.21691085398197174,
-0.5742215514183044,
-0.33684536814689636,
-0.2037464678287506,
-0.40777158737182617,
0.032554857432842255,
0.38969942927360535,
0.41316714882850647,
0.2083001434803009,
0.01798073574900627,
-0.06346826255321503,
-0.11993652582168579,
0.2577691674232483,
0.26230180263519287,
0.3913090229034424,
0.1136624813079834,
-0.035342197865247726,
0.10483937710523605,
0.30300527811050415,
0.08288790285587311,
-0.04788205027580261,
0.18429698050022125,
-0.11683958023786545,
-0.4668154716491699,
-0.08174534142017365,
0.25150907039642334,
-0.3492949306964874,
0.008734544739127159,
0.2315167635679245,
0.30071404576301575,
-0.23072002828121185,
-0.36548474431037903,
-0.13410259783267975,
-0.1464417725801468,
-0.025409791618585587,
-0.06131760776042938,
0.24387529492378235,
0.5897389054298401,
-0.5453348755836487,
-0.077801913022995,
-0.1995145082473755,
0.05006886646151543,
0.2333182841539383,
-0.3790205717086792,
-0.30812719464302063,
0.07537975162267685,
-0.24352046847343445,
-0.03821980953216553,
0.44627755880355835,
-0.06302554160356522,
-0.31382837891578674,
0.023652607575058937,
-0.12217627465724945,
0.1869172900915146,
0.2856384515762329,
-0.07794803380966187,
0.10152807086706161,
-0.148285374045372,
-0.04918617382645607,
-0.135201558470726,
0.29649263620376587,
-0.07337428629398346,
-0.044183310121297836,
-0.012128531001508236,
0.10781245678663254,
0.043607331812381744,
0.009973877109587193,
0.39651167392730713,
0.13713040947914124,
0.018940208479762077,
0.19293464720249176,
-0.2077324539422989,
-0.014810865744948387,
0.37393566966056824,
0.2793177664279938,
0.038008593022823334,
0.16840760409832,
0.0064503587782382965,
-0.623814582824707,
0.2954273819923401,
0.027827100828289986,
0.0053639537654817104,
0.40941768884658813,
0.03529589995741844,
-0.3875856399536133,
-0.14993849396705627,
0.01746668480336666,
-0.3131874203681946,
0.17590443789958954,
0.3813210129737854,
0.17175118625164032,
-0.13049815595149994,
-0.11862510442733765,
0.3000887334346771,
-0.1737113893032074,
-0.06884478777647018,
-0.3093029260635376,
0.32375556230545044,
0.19099846482276917,
-0.3960338532924652,
-0.01723027601838112,
0.21087707579135895,
0.13636229932308197,
-0.3053993582725525,
-0.08731622993946075,
0.22073175013065338,
-0.03718393296003342,
-0.029566317796707153,
0.029325852170586586,
0.07313686609268188,
0.10836920142173767,
0.25007641315460205,
0.15327508747577667,
-0.06339238584041595,
0.06602539867162704,
0.2114717960357666,
-0.2386801838874817,
0.3168259561061859,
0.11514312028884888,
0.012849874794483185,
0.1940094381570816,
-0.26547232270240784,
0.3135959208011627,
-0.12355074286460876,
-0.1490519642829895,
-0.35909587144851685,
-0.12822507321834564,
0.04997439309954643,
0.030805930495262146,
0.2670418620109558,
-0.23138469457626343,
0.2322855293750763,
0.3105456233024597,
0.0742591992020607,
0.07649107277393341,
-0.11125079542398453,
-0.11912883818149567,
-0.3445451259613037,
0.34038612246513367,
0.10587829351425171,
0.3114326000213623,
0.3235367238521576,
0.1768924444913864,
-0.11673226952552795,
-0.04040532186627388,
-0.17052331566810608,
0.2082466334104538,
-0.13582396507263184,
-0.008392799645662308,
0.16802872717380524,
0.2558479905128479,
-0.10634630918502808,
-0.47539669275283813,
-0.032364990562200546,
0.2863807678222656,
0.05119984596967697,
-0.2574855089187622,
-0.14518117904663086,
-0.3503527045249939,
-0.22114986181259155,
-0.07504419982433319,
-0.1731756031513214,
0.2814302444458008,
-0.387009859085083,
0.04594927281141281,
0.21786026656627655,
-0.1202429011464119,
0.16657303273677826,
-0.0629144236445427,
0.37543097138404846,
-0.001097707194276154,
0.3353211283683777,
-0.30715012550354004,
-0.14008107781410217,
-0.4301212430000305,
0.09558417648077011,
-0.16930653154850006,
0.17020565271377563,
-0.03070298582315445,
-0.3143153190612793,
0.07525233179330826,
-0.38256561756134033,
-0.4188452363014221,
0.13820184767246246,
0.2945498824119568,
0.11413706839084625,
0.2306286245584488,
-0.011816597543656826,
0.02813706547021866,
-0.012435740791261196,
0.2302330583333969,
-0.297451376914978,
-0.17130891978740692,
0.12812811136245728,
-0.027100056409835815,
0.10170266777276993,
-0.1202021911740303,
-0.7662836909294128,
-0.05479046702384949,
-0.2863306999206543,
-0.1998625099658966,
0.27080652117729187,
-0.10144969820976257,
0.11210610717535019,
0.1802804321050644,
0.10271216183900833,
0.16290181875228882,
0.08249000459909439,
-0.2069161832332611,
-0.2851652204990387,
0.07225693762302399,
-0.29947030544281006,
-0.2219848334789276,
-0.11839523911476135,
-0.05405714735388756,
0.008530252613127232,
0.15892936289310455,
-0.164358988404274,
-0.36006930470466614,
-0.17283053696155548,
0.11842676252126694,
0.15595848858356476,
0.06566279381513596,
0.5145266652107239,
0.09742989391088486,
-0.2039918601512909,
-0.24561598896980286,
-0.3426271975040436,
0.19077153503894806,
0.1295401155948639,
-0.11859603226184845,
-0.2132856845855713,
0.24289244413375854,
-0.27874985337257385,
0.42248713970184326,
-0.08355449140071869,
-0.20566682517528534,
0.45002272725105286,
-0.1110968217253685,
0.38228219747543335,
-0.35944223403930664,
-0.02236168086528778,
-0.02297322452068329,
-0.13915778696537018,
0.04724422097206116,
0.35180631279945374,
-0.06896687299013138,
-0.214174285531044,
-0.030472610145807266,
0.35407477617263794,
-0.4563548266887665,
-0.2165452539920807,
-0.3153550624847412,
0.25482097268104553,
0.06095549464225769,
0.28919801115989685,
0.09401895850896835,
-0.4975683391094208,
0.03200555965304375,
0.09397780895233154,
-0.18879790604114532,
0.24549926817417145,
0.015279904007911682,
-0.4423534870147705,
0.32953840494155884,
-0.23450417816638947,
0.2399328351020813,
-0.192536860704422,
0.20745040476322174,
0.06620563566684723,
-0.5300363302230835,
0.04634935036301613,
0.06779944896697998,
0.5778389573097229,
-0.3050489127635956,
0.1927672028541565,
0.39864152669906616,
-0.4178936183452606,
-0.07079143077135086,
-0.326169490814209,
-0.359992653131485,
0.3435128331184387,
0.15782807767391205,
0.42231282591819763,
0.0013785415794700384,
-0.09131570905447006,
0.16590167582035065,
0.09633281081914902,
0.04048571735620499,
-0.14949005842208862,
-0.053423427045345306,
-0.08446349203586578,
-0.33655011653900146,
-0.2608490288257599,
-0.23210757970809937,
0.1225525438785553,
-0.5476756691932678,
-0.28917431831359863,
-0.05911494791507721,
-0.012201519683003426,
0.13847605884075165,
0.38994279503822327,
0.3020605146884918,
0.25577211380004883,
-0.003969124983996153,
0.15784867107868195,
0.4219144582748413,
0.09258107095956802,
0.4092697501182556,
-0.15716932713985443,
-0.288462370634079,
0.49389997124671936,
-0.036619726568460464,
-0.04496956989169121,
0.44182220101356506,
0.09856326133012772,
-0.2072177231311798,
-0.13589492440223694,
-0.005253997631371021,
-0.12572546303272247,
0.2366175651550293,
0.11602957546710968,
0.11547859758138657,
-0.22653451561927795,
-0.27745458483695984,
0.4466221332550049,
0.17520083487033844,
-0.31224992871284485,
0.247999370098114,
-0.088856041431427,
-0.27157333493232727,
0.09449362754821777,
0.038991838693618774,
0.47331345081329346,
-0.17220976948738098,
0.17836381494998932,
0.28499868512153625,
-0.025934137403964996,
0.43808048963546753,
-0.12034469842910767,
0.1839350163936615,
-0.4240437150001526,
-0.33179187774658203,
0.10492982715368271,
-0.06813255697488785,
0.1529407948255539,
0.34281420707702637,
-0.1286655217409134,
0.13626782596111298,
-0.18050940334796906,
0.5428348779678345,
0.0681825801730156,
-0.16029037535190582,
0.01860268972814083,
0.03936797007918358,
-0.14637531340122223,
0.16251416504383087,
0.33932551741600037,
0.11643126606941223,
-0.22575831413269043,
0.01110965944826603,
-0.1271807849407196,
0.04861321672797203,
0.23102964460849762,
0.05146605148911476,
0.03345850482583046,
0.038037657737731934,
0.27831006050109863,
-0.35260239243507385,
-0.16484211385250092,
0.30437400937080383,
0.31591224670410156,
0.11288744956254959,
-0.09143637120723724,
-0.00029415314202196896,
-0.008952467702329159,
0.12839144468307495,
0.10851965099573135,
0.011584615334868431,
0.25522980093955994,
0.1576925367116928,
-0.17671912908554077,
0.16855672001838684,
0.015104000456631184,
0.08658383786678314,
-0.1782761663198471,
0.05201711878180504,
0.07908303290605545,
-0.48968276381492615,
-0.22974041104316711,
0.13811567425727844,
0.13419422507286072,
-0.3974669575691223,
0.1492789387702942,
-0.21289853751659393,
-0.15419964492321014,
-0.10157717019319534,
0.16216355562210083,
-0.25034502148628235,
-0.11660230159759521,
0.5130330324172974,
-0.10097351670265198,
0.14716783165931702,
0.4816362261772156,
0.282260000705719,
0.16620203852653503,
-0.2588663399219513,
-0.23443223536014557,
0.5016034841537476,
-0.32583650946617126,
0.3467353880405426,
0.03050239011645317,
-0.1629420667886734,
0.39517974853515625,
0.3672280013561249,
-0.09520603716373444,
0.07708568125963211,
-0.10818910598754883,
-0.2564675807952881,
-0.23752211034297943,
0.15672321617603302,
0.09472451359033585,
0.1982932686805725,
0.054340213537216187,
-0.32853689789772034,
-0.12787629663944244,
-0.4098908007144928,
-0.385435551404953,
0.22088222205638885,
-0.06280700862407684,
-0.02865637093782425,
-0.01899196021258831,
-0.07960180938243866,
-0.3714176118373871,
-0.08502375334501266,
0.1338089555501938,
0.006857218686491251,
-0.10747700929641724,
-0.24945279955863953,
-0.011256176978349686,
0.11439111083745956,
-0.13602347671985626,
-0.11693377047777176,
0.14652913808822632,
0.004608605522662401,
-0.07844768464565277,
-0.21462644636631012,
0.27359461784362793,
0.041528213769197464,
0.0545399971306324,
0.0892954021692276,
-0.194133922457695,
0.0027048150077462196,
-0.03417610004544258,
0.28222861886024475,
-0.11379552632570267,
-0.16988825798034668,
-0.12468807399272919,
0.13487260043621063,
0.0783807784318924,
0.0013234990183264017,
0.28941839933395386,
0.13389843702316284,
-0.16323158144950867,
0.008473509922623634,
0.23661865293979645,
-0.314093679189682,
0.23476354777812958,
0.2835381031036377,
0.23949377238750458,
0.18425366282463074,
0.0050880806520581245,
-0.06578951328992844,
0.04455961659550667,
0.30157381296157837,
-0.4180750846862793,
-0.1803099662065506,
0.3167610764503479,
-0.06761904805898666,
0.18716605007648468,
0.27124860882759094,
0.38998186588287354,
-0.4173649251461029,
0.16507281363010406,
0.1375398337841034,
0.30574992299079895,
0.15337993204593658,
0.1381792277097702,
0.4883961081504822,
-0.15979236364364624,
0.06998351216316223,
0.07044725865125656,
0.24214695394039154,
-0.06841904670000076,
0.45283985137939453,
0.37408557534217834,
0.31739285588264465,
0.13889701664447784,
0.39698871970176697,
-0.21519187092781067,
-0.639504075050354,
0.2955796718597412,
0.23369139432907104,
0.024011751636862755,
0.15951301157474518,
-0.1707068830728531,
-0.020403051748871803,
-0.17655351758003235,
0.15089315176010132,
-0.4425516128540039,
0.0015908152563497424,
-0.17978717386722565,
-0.22133056819438934,
-0.15592721104621887,
-0.4336293935775757,
-0.11306227743625641,
0.09136015176773071,
-0.2759050726890564,
0.07765745371580124,
-0.021529747173190117,
-0.4004427492618561,
-0.06990839540958405,
-0.5547415018081665,
0.055282942950725555,
-0.20532162487506866,
-0.1085018515586853,
-0.07714415341615677,
0.3918743133544922,
0.057778991758823395,
-0.2127685844898224,
0.4998070001602173,
0.038612231612205505,
0.23192714154720306,
0.16641303896903992,
0.07018745690584183,
-0.011101746000349522,
0.08800696581602097,
-0.1526355743408203,
-0.3997158706188202,
0.22026240825653076,
0.18318867683410645,
-0.013457669876515865,
0.11361219733953476,
0.15494252741336823,
-0.17934024333953857,
0.0210270956158638,
0.14717569947242737,
-0.06376486271619797,
-0.24014435708522797,
0.15284204483032227,
0.04643998667597771,
-0.05199996009469032,
0.056775808334350586,
-0.09210798889398575,
-0.1295505315065384,
-0.41544511914253235,
0.23909948766231537,
0.05113114416599274,
0.1322716325521469,
0.11068201810121536,
0.13549524545669556,
-0.35895147919654846,
0.21424660086631775,
0.12155631184577942,
-0.14738014340400696,
0.036792412400245667,
-0.25508156418800354,
-0.6162773370742798,
0.1635623425245285,
0.11713168025016785,
-0.010707570239901543,
-0.001107831601984799,
0.009844101034104824,
0.2945701479911804,
-0.2557985186576843,
0.08557131141424179,
0.005112828221172094,
0.24660998582839966,
0.11574837565422058,
-0.5743597149848938,
-0.08761513978242874,
-0.1596970111131668,
0.22328713536262512,
-0.11631260067224503,
-0.10972294211387634,
0.014390796422958374,
-0.037627171725034714,
0.09940508008003235,
0.016063297167420387,
-0.09784559905529022,
0.03411196172237396,
-0.10796869546175003,
0.3288993537425995,
0.10231190174818039,
0.40846535563468933,
0.04643836244940758,
0.06973594427108765,
-0.3073202967643738,
-0.18648721277713776,
0.17287983000278473,
0.26409676671028137,
-0.19167421758174896,
-0.06515748798847198,
0.03846460580825806,
0.38014334440231323,
0.014069896191358566,
-0.16397367417812347,
0.26196417212486267,
0.45842647552490234,
-0.4377624988555908,
0.06961212307214737,
-0.23491500318050385,
-0.07129518687725067,
0.3597223162651062,
0.27140527963638306,
0.08751396834850311,
0.08177251368761063,
-0.14360135793685913,
-0.15186822414398193,
0.4795733094215393,
-0.43358179926872253,
-0.3318155109882355,
-0.5617201924324036,
0.1815306842327118,
-0.04214772582054138,
-0.14996731281280518,
-0.01909264735877514,
0.034749485552310944,
0.3282114267349243,
-0.3589740991592407,
-0.02651716023683548,
0.31577011942863464,
-0.1879299283027649,
0.06185488775372505,
-0.04521683230996132,
0.08556433767080307,
0.28595009446144104,
0.057026952505111694,
-0.3530765175819397,
-0.10605968534946442
] |
https://github.com/huggingface/datasets/issues/3236
|
Loading of datasets changed in #3110 returns no examples
|
I can't reproduce either in my environment (macos, python 3.7).
In your case it generates zero examples. This can only happen if the extraction of the TAR archive doesn't output the right filenames. Indeed if the `qasper` script can't find the right file to load, it's currently ignored and it returns zero examples. This case was not even considered when #3110 was developed since we considered the file names to be deterministic - and not depend on your environment.
Therefore here is my hypothesis:
- either the cache is corrupted somehow with an empty TAR archive
- OR I suspect that the issue comes from python 3.8
|
## Describe the bug
Loading of datasets changed in https://github.com/huggingface/datasets/pull/3110 returns no examples:
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
})
```
## Steps to reproduce the bug
Load any of the datasets that were changed in https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper")
# The problem only started with the commit of #3110
load_dataset("qasper", revision="b6469baa22c174b3906c631802a7016fedea6780")
```
## Expected results
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
Which can be received when specifying revision of the commit before https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper", revision="acfe2abda1ca79f0ce5c1896aa83b4b78af76b7d")
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.2.dev0 (master)
- Python version: 3.8.10
- PyArrow version: 3.0.0
| 107 |
Loading of datasets changed in #3110 returns no examples
|
[
-0.09727028757333755,
0.34162530303001404,
-0.09711651504039764,
0.25706031918525696,
0.18149690330028534,
-0.18841047585010529,
0.5248988270759583,
0.3087003827095032,
0.23046886920928955,
0.07182158529758453,
-0.019607024267315865,
0.3447750210762024,
0.0642838329076767,
0.06272619217634201,
0.06287121027708054,
0.1376350373029709,
0.02427073009312153,
0.13156373798847198,
-0.3989175260066986,
-0.08366038650274277,
-0.17063213884830475,
0.38000190258026123,
-0.3165892958641052,
-0.058001432567834854,
-0.33932727575302124,
0.29711997509002686,
-0.11642701923847198,
0.4734252691268921,
-0.1995997279882431,
-0.2991870641708374,
0.4178197383880615,
0.2967577278614044,
0.44353002309799194,
0.29437822103500366,
-0.0001118480067816563,
0.16204772889614105,
0.309317946434021,
-0.06114984676241875,
-0.4835474193096161,
0.026973873376846313,
-0.22507429122924805,
-0.45415744185447693,
0.18450027704238892,
-0.24856366217136383,
-0.10197056084871292,
-0.3149421215057373,
-0.17763331532478333,
-0.07501622289419174,
0.34847745299339294,
0.25713467597961426,
0.22164443135261536,
0.10385532677173615,
-0.09053387492895126,
-0.5282890200614929,
0.34444281458854675,
-0.06857270747423172,
0.13608109951019287,
0.08688020706176758,
0.4566597640514374,
0.047426529228687286,
-0.0795346349477768,
0.008974921889603138,
-0.03314369171857834,
-0.02667890675365925,
-0.24036498367786407,
-0.04843739792704582,
-0.007763450033962727,
0.0265670008957386,
0.14836488664150238,
0.18567374348640442,
0.828813910484314,
0.040224432945251465,
-0.1891922652721405,
-0.14577554166316986,
-0.14543959498405457,
-0.2656192481517792,
0.13508793711662292,
-0.3048214912414551,
0.04119665175676346,
0.2261050045490265,
-0.1641673594713211,
0.05933133140206337,
-0.07026465982198715,
0.06705164909362793,
-0.32181307673454285,
0.1401013880968094,
-0.23014262318611145,
0.022486340254545212,
-0.2227959930896759,
0.04283810779452324,
0.3917543590068817,
0.04846625030040741,
0.0812288448214531,
-0.11644065380096436,
-0.1251261830329895,
0.036659564822912216,
0.4132406413555145,
0.007910660468041897,
-0.10069549828767776,
0.267147421836853,
0.5139239430427551,
0.511757493019104,
0.19446946680545807,
-0.10808371007442474,
0.08112074434757233,
0.22323763370513916,
0.18928800523281097,
-0.2864868640899658,
0.3529660999774933,
0.3061261773109436,
-0.20728525519371033,
-0.11301324516534805,
-0.3162243366241455,
-0.1412074714899063,
0.11971056461334229,
0.20996496081352234,
0.17501398921012878,
-0.37013480067253113,
-0.11705351620912552,
0.10412352532148361,
-0.10657349973917007,
-0.0910794734954834,
-0.006819129455834627,
0.314744234085083,
0.22844766080379486,
0.1251949816942215,
0.14429344236850739,
0.05077702924609184,
-0.21691085398197174,
-0.5742215514183044,
-0.33684536814689636,
-0.2037464678287506,
-0.40777158737182617,
0.032554857432842255,
0.38969942927360535,
0.41316714882850647,
0.2083001434803009,
0.01798073574900627,
-0.06346826255321503,
-0.11993652582168579,
0.2577691674232483,
0.26230180263519287,
0.3913090229034424,
0.1136624813079834,
-0.035342197865247726,
0.10483937710523605,
0.30300527811050415,
0.08288790285587311,
-0.04788205027580261,
0.18429698050022125,
-0.11683958023786545,
-0.4668154716491699,
-0.08174534142017365,
0.25150907039642334,
-0.3492949306964874,
0.008734544739127159,
0.2315167635679245,
0.30071404576301575,
-0.23072002828121185,
-0.36548474431037903,
-0.13410259783267975,
-0.1464417725801468,
-0.025409791618585587,
-0.06131760776042938,
0.24387529492378235,
0.5897389054298401,
-0.5453348755836487,
-0.077801913022995,
-0.1995145082473755,
0.05006886646151543,
0.2333182841539383,
-0.3790205717086792,
-0.30812719464302063,
0.07537975162267685,
-0.24352046847343445,
-0.03821980953216553,
0.44627755880355835,
-0.06302554160356522,
-0.31382837891578674,
0.023652607575058937,
-0.12217627465724945,
0.1869172900915146,
0.2856384515762329,
-0.07794803380966187,
0.10152807086706161,
-0.148285374045372,
-0.04918617382645607,
-0.135201558470726,
0.29649263620376587,
-0.07337428629398346,
-0.044183310121297836,
-0.012128531001508236,
0.10781245678663254,
0.043607331812381744,
0.009973877109587193,
0.39651167392730713,
0.13713040947914124,
0.018940208479762077,
0.19293464720249176,
-0.2077324539422989,
-0.014810865744948387,
0.37393566966056824,
0.2793177664279938,
0.038008593022823334,
0.16840760409832,
0.0064503587782382965,
-0.623814582824707,
0.2954273819923401,
0.027827100828289986,
0.0053639537654817104,
0.40941768884658813,
0.03529589995741844,
-0.3875856399536133,
-0.14993849396705627,
0.01746668480336666,
-0.3131874203681946,
0.17590443789958954,
0.3813210129737854,
0.17175118625164032,
-0.13049815595149994,
-0.11862510442733765,
0.3000887334346771,
-0.1737113893032074,
-0.06884478777647018,
-0.3093029260635376,
0.32375556230545044,
0.19099846482276917,
-0.3960338532924652,
-0.01723027601838112,
0.21087707579135895,
0.13636229932308197,
-0.3053993582725525,
-0.08731622993946075,
0.22073175013065338,
-0.03718393296003342,
-0.029566317796707153,
0.029325852170586586,
0.07313686609268188,
0.10836920142173767,
0.25007641315460205,
0.15327508747577667,
-0.06339238584041595,
0.06602539867162704,
0.2114717960357666,
-0.2386801838874817,
0.3168259561061859,
0.11514312028884888,
0.012849874794483185,
0.1940094381570816,
-0.26547232270240784,
0.3135959208011627,
-0.12355074286460876,
-0.1490519642829895,
-0.35909587144851685,
-0.12822507321834564,
0.04997439309954643,
0.030805930495262146,
0.2670418620109558,
-0.23138469457626343,
0.2322855293750763,
0.3105456233024597,
0.0742591992020607,
0.07649107277393341,
-0.11125079542398453,
-0.11912883818149567,
-0.3445451259613037,
0.34038612246513367,
0.10587829351425171,
0.3114326000213623,
0.3235367238521576,
0.1768924444913864,
-0.11673226952552795,
-0.04040532186627388,
-0.17052331566810608,
0.2082466334104538,
-0.13582396507263184,
-0.008392799645662308,
0.16802872717380524,
0.2558479905128479,
-0.10634630918502808,
-0.47539669275283813,
-0.032364990562200546,
0.2863807678222656,
0.05119984596967697,
-0.2574855089187622,
-0.14518117904663086,
-0.3503527045249939,
-0.22114986181259155,
-0.07504419982433319,
-0.1731756031513214,
0.2814302444458008,
-0.387009859085083,
0.04594927281141281,
0.21786026656627655,
-0.1202429011464119,
0.16657303273677826,
-0.0629144236445427,
0.37543097138404846,
-0.001097707194276154,
0.3353211283683777,
-0.30715012550354004,
-0.14008107781410217,
-0.4301212430000305,
0.09558417648077011,
-0.16930653154850006,
0.17020565271377563,
-0.03070298582315445,
-0.3143153190612793,
0.07525233179330826,
-0.38256561756134033,
-0.4188452363014221,
0.13820184767246246,
0.2945498824119568,
0.11413706839084625,
0.2306286245584488,
-0.011816597543656826,
0.02813706547021866,
-0.012435740791261196,
0.2302330583333969,
-0.297451376914978,
-0.17130891978740692,
0.12812811136245728,
-0.027100056409835815,
0.10170266777276993,
-0.1202021911740303,
-0.7662836909294128,
-0.05479046702384949,
-0.2863306999206543,
-0.1998625099658966,
0.27080652117729187,
-0.10144969820976257,
0.11210610717535019,
0.1802804321050644,
0.10271216183900833,
0.16290181875228882,
0.08249000459909439,
-0.2069161832332611,
-0.2851652204990387,
0.07225693762302399,
-0.29947030544281006,
-0.2219848334789276,
-0.11839523911476135,
-0.05405714735388756,
0.008530252613127232,
0.15892936289310455,
-0.164358988404274,
-0.36006930470466614,
-0.17283053696155548,
0.11842676252126694,
0.15595848858356476,
0.06566279381513596,
0.5145266652107239,
0.09742989391088486,
-0.2039918601512909,
-0.24561598896980286,
-0.3426271975040436,
0.19077153503894806,
0.1295401155948639,
-0.11859603226184845,
-0.2132856845855713,
0.24289244413375854,
-0.27874985337257385,
0.42248713970184326,
-0.08355449140071869,
-0.20566682517528534,
0.45002272725105286,
-0.1110968217253685,
0.38228219747543335,
-0.35944223403930664,
-0.02236168086528778,
-0.02297322452068329,
-0.13915778696537018,
0.04724422097206116,
0.35180631279945374,
-0.06896687299013138,
-0.214174285531044,
-0.030472610145807266,
0.35407477617263794,
-0.4563548266887665,
-0.2165452539920807,
-0.3153550624847412,
0.25482097268104553,
0.06095549464225769,
0.28919801115989685,
0.09401895850896835,
-0.4975683391094208,
0.03200555965304375,
0.09397780895233154,
-0.18879790604114532,
0.24549926817417145,
0.015279904007911682,
-0.4423534870147705,
0.32953840494155884,
-0.23450417816638947,
0.2399328351020813,
-0.192536860704422,
0.20745040476322174,
0.06620563566684723,
-0.5300363302230835,
0.04634935036301613,
0.06779944896697998,
0.5778389573097229,
-0.3050489127635956,
0.1927672028541565,
0.39864152669906616,
-0.4178936183452606,
-0.07079143077135086,
-0.326169490814209,
-0.359992653131485,
0.3435128331184387,
0.15782807767391205,
0.42231282591819763,
0.0013785415794700384,
-0.09131570905447006,
0.16590167582035065,
0.09633281081914902,
0.04048571735620499,
-0.14949005842208862,
-0.053423427045345306,
-0.08446349203586578,
-0.33655011653900146,
-0.2608490288257599,
-0.23210757970809937,
0.1225525438785553,
-0.5476756691932678,
-0.28917431831359863,
-0.05911494791507721,
-0.012201519683003426,
0.13847605884075165,
0.38994279503822327,
0.3020605146884918,
0.25577211380004883,
-0.003969124983996153,
0.15784867107868195,
0.4219144582748413,
0.09258107095956802,
0.4092697501182556,
-0.15716932713985443,
-0.288462370634079,
0.49389997124671936,
-0.036619726568460464,
-0.04496956989169121,
0.44182220101356506,
0.09856326133012772,
-0.2072177231311798,
-0.13589492440223694,
-0.005253997631371021,
-0.12572546303272247,
0.2366175651550293,
0.11602957546710968,
0.11547859758138657,
-0.22653451561927795,
-0.27745458483695984,
0.4466221332550049,
0.17520083487033844,
-0.31224992871284485,
0.247999370098114,
-0.088856041431427,
-0.27157333493232727,
0.09449362754821777,
0.038991838693618774,
0.47331345081329346,
-0.17220976948738098,
0.17836381494998932,
0.28499868512153625,
-0.025934137403964996,
0.43808048963546753,
-0.12034469842910767,
0.1839350163936615,
-0.4240437150001526,
-0.33179187774658203,
0.10492982715368271,
-0.06813255697488785,
0.1529407948255539,
0.34281420707702637,
-0.1286655217409134,
0.13626782596111298,
-0.18050940334796906,
0.5428348779678345,
0.0681825801730156,
-0.16029037535190582,
0.01860268972814083,
0.03936797007918358,
-0.14637531340122223,
0.16251416504383087,
0.33932551741600037,
0.11643126606941223,
-0.22575831413269043,
0.01110965944826603,
-0.1271807849407196,
0.04861321672797203,
0.23102964460849762,
0.05146605148911476,
0.03345850482583046,
0.038037657737731934,
0.27831006050109863,
-0.35260239243507385,
-0.16484211385250092,
0.30437400937080383,
0.31591224670410156,
0.11288744956254959,
-0.09143637120723724,
-0.00029415314202196896,
-0.008952467702329159,
0.12839144468307495,
0.10851965099573135,
0.011584615334868431,
0.25522980093955994,
0.1576925367116928,
-0.17671912908554077,
0.16855672001838684,
0.015104000456631184,
0.08658383786678314,
-0.1782761663198471,
0.05201711878180504,
0.07908303290605545,
-0.48968276381492615,
-0.22974041104316711,
0.13811567425727844,
0.13419422507286072,
-0.3974669575691223,
0.1492789387702942,
-0.21289853751659393,
-0.15419964492321014,
-0.10157717019319534,
0.16216355562210083,
-0.25034502148628235,
-0.11660230159759521,
0.5130330324172974,
-0.10097351670265198,
0.14716783165931702,
0.4816362261772156,
0.282260000705719,
0.16620203852653503,
-0.2588663399219513,
-0.23443223536014557,
0.5016034841537476,
-0.32583650946617126,
0.3467353880405426,
0.03050239011645317,
-0.1629420667886734,
0.39517974853515625,
0.3672280013561249,
-0.09520603716373444,
0.07708568125963211,
-0.10818910598754883,
-0.2564675807952881,
-0.23752211034297943,
0.15672321617603302,
0.09472451359033585,
0.1982932686805725,
0.054340213537216187,
-0.32853689789772034,
-0.12787629663944244,
-0.4098908007144928,
-0.385435551404953,
0.22088222205638885,
-0.06280700862407684,
-0.02865637093782425,
-0.01899196021258831,
-0.07960180938243866,
-0.3714176118373871,
-0.08502375334501266,
0.1338089555501938,
0.006857218686491251,
-0.10747700929641724,
-0.24945279955863953,
-0.011256176978349686,
0.11439111083745956,
-0.13602347671985626,
-0.11693377047777176,
0.14652913808822632,
0.004608605522662401,
-0.07844768464565277,
-0.21462644636631012,
0.27359461784362793,
0.041528213769197464,
0.0545399971306324,
0.0892954021692276,
-0.194133922457695,
0.0027048150077462196,
-0.03417610004544258,
0.28222861886024475,
-0.11379552632570267,
-0.16988825798034668,
-0.12468807399272919,
0.13487260043621063,
0.0783807784318924,
0.0013234990183264017,
0.28941839933395386,
0.13389843702316284,
-0.16323158144950867,
0.008473509922623634,
0.23661865293979645,
-0.314093679189682,
0.23476354777812958,
0.2835381031036377,
0.23949377238750458,
0.18425366282463074,
0.0050880806520581245,
-0.06578951328992844,
0.04455961659550667,
0.30157381296157837,
-0.4180750846862793,
-0.1803099662065506,
0.3167610764503479,
-0.06761904805898666,
0.18716605007648468,
0.27124860882759094,
0.38998186588287354,
-0.4173649251461029,
0.16507281363010406,
0.1375398337841034,
0.30574992299079895,
0.15337993204593658,
0.1381792277097702,
0.4883961081504822,
-0.15979236364364624,
0.06998351216316223,
0.07044725865125656,
0.24214695394039154,
-0.06841904670000076,
0.45283985137939453,
0.37408557534217834,
0.31739285588264465,
0.13889701664447784,
0.39698871970176697,
-0.21519187092781067,
-0.639504075050354,
0.2955796718597412,
0.23369139432907104,
0.024011751636862755,
0.15951301157474518,
-0.1707068830728531,
-0.020403051748871803,
-0.17655351758003235,
0.15089315176010132,
-0.4425516128540039,
0.0015908152563497424,
-0.17978717386722565,
-0.22133056819438934,
-0.15592721104621887,
-0.4336293935775757,
-0.11306227743625641,
0.09136015176773071,
-0.2759050726890564,
0.07765745371580124,
-0.021529747173190117,
-0.4004427492618561,
-0.06990839540958405,
-0.5547415018081665,
0.055282942950725555,
-0.20532162487506866,
-0.1085018515586853,
-0.07714415341615677,
0.3918743133544922,
0.057778991758823395,
-0.2127685844898224,
0.4998070001602173,
0.038612231612205505,
0.23192714154720306,
0.16641303896903992,
0.07018745690584183,
-0.011101746000349522,
0.08800696581602097,
-0.1526355743408203,
-0.3997158706188202,
0.22026240825653076,
0.18318867683410645,
-0.013457669876515865,
0.11361219733953476,
0.15494252741336823,
-0.17934024333953857,
0.0210270956158638,
0.14717569947242737,
-0.06376486271619797,
-0.24014435708522797,
0.15284204483032227,
0.04643998667597771,
-0.05199996009469032,
0.056775808334350586,
-0.09210798889398575,
-0.1295505315065384,
-0.41544511914253235,
0.23909948766231537,
0.05113114416599274,
0.1322716325521469,
0.11068201810121536,
0.13549524545669556,
-0.35895147919654846,
0.21424660086631775,
0.12155631184577942,
-0.14738014340400696,
0.036792412400245667,
-0.25508156418800354,
-0.6162773370742798,
0.1635623425245285,
0.11713168025016785,
-0.010707570239901543,
-0.001107831601984799,
0.009844101034104824,
0.2945701479911804,
-0.2557985186576843,
0.08557131141424179,
0.005112828221172094,
0.24660998582839966,
0.11574837565422058,
-0.5743597149848938,
-0.08761513978242874,
-0.1596970111131668,
0.22328713536262512,
-0.11631260067224503,
-0.10972294211387634,
0.014390796422958374,
-0.037627171725034714,
0.09940508008003235,
0.016063297167420387,
-0.09784559905529022,
0.03411196172237396,
-0.10796869546175003,
0.3288993537425995,
0.10231190174818039,
0.40846535563468933,
0.04643836244940758,
0.06973594427108765,
-0.3073202967643738,
-0.18648721277713776,
0.17287983000278473,
0.26409676671028137,
-0.19167421758174896,
-0.06515748798847198,
0.03846460580825806,
0.38014334440231323,
0.014069896191358566,
-0.16397367417812347,
0.26196417212486267,
0.45842647552490234,
-0.4377624988555908,
0.06961212307214737,
-0.23491500318050385,
-0.07129518687725067,
0.3597223162651062,
0.27140527963638306,
0.08751396834850311,
0.08177251368761063,
-0.14360135793685913,
-0.15186822414398193,
0.4795733094215393,
-0.43358179926872253,
-0.3318155109882355,
-0.5617201924324036,
0.1815306842327118,
-0.04214772582054138,
-0.14996731281280518,
-0.01909264735877514,
0.034749485552310944,
0.3282114267349243,
-0.3589740991592407,
-0.02651716023683548,
0.31577011942863464,
-0.1879299283027649,
0.06185488775372505,
-0.04521683230996132,
0.08556433767080307,
0.28595009446144104,
0.057026952505111694,
-0.3530765175819397,
-0.10605968534946442
] |
https://github.com/huggingface/datasets/issues/3236
|
Loading of datasets changed in #3110 returns no examples
|
I just tried again on python 3.8 and I was able to reproduce the issue. Let me work on a fix
|
## Describe the bug
Loading of datasets changed in https://github.com/huggingface/datasets/pull/3110 returns no examples:
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
})
```
## Steps to reproduce the bug
Load any of the datasets that were changed in https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper")
# The problem only started with the commit of #3110
load_dataset("qasper", revision="b6469baa22c174b3906c631802a7016fedea6780")
```
## Expected results
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
Which can be received when specifying revision of the commit before https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper", revision="acfe2abda1ca79f0ce5c1896aa83b4b78af76b7d")
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.2.dev0 (master)
- Python version: 3.8.10
- PyArrow version: 3.0.0
| 21 |
Loading of datasets changed in #3110 returns no examples
|
[
-0.09727028757333755,
0.34162530303001404,
-0.09711651504039764,
0.25706031918525696,
0.18149690330028534,
-0.18841047585010529,
0.5248988270759583,
0.3087003827095032,
0.23046886920928955,
0.07182158529758453,
-0.019607024267315865,
0.3447750210762024,
0.0642838329076767,
0.06272619217634201,
0.06287121027708054,
0.1376350373029709,
0.02427073009312153,
0.13156373798847198,
-0.3989175260066986,
-0.08366038650274277,
-0.17063213884830475,
0.38000190258026123,
-0.3165892958641052,
-0.058001432567834854,
-0.33932727575302124,
0.29711997509002686,
-0.11642701923847198,
0.4734252691268921,
-0.1995997279882431,
-0.2991870641708374,
0.4178197383880615,
0.2967577278614044,
0.44353002309799194,
0.29437822103500366,
-0.0001118480067816563,
0.16204772889614105,
0.309317946434021,
-0.06114984676241875,
-0.4835474193096161,
0.026973873376846313,
-0.22507429122924805,
-0.45415744185447693,
0.18450027704238892,
-0.24856366217136383,
-0.10197056084871292,
-0.3149421215057373,
-0.17763331532478333,
-0.07501622289419174,
0.34847745299339294,
0.25713467597961426,
0.22164443135261536,
0.10385532677173615,
-0.09053387492895126,
-0.5282890200614929,
0.34444281458854675,
-0.06857270747423172,
0.13608109951019287,
0.08688020706176758,
0.4566597640514374,
0.047426529228687286,
-0.0795346349477768,
0.008974921889603138,
-0.03314369171857834,
-0.02667890675365925,
-0.24036498367786407,
-0.04843739792704582,
-0.007763450033962727,
0.0265670008957386,
0.14836488664150238,
0.18567374348640442,
0.828813910484314,
0.040224432945251465,
-0.1891922652721405,
-0.14577554166316986,
-0.14543959498405457,
-0.2656192481517792,
0.13508793711662292,
-0.3048214912414551,
0.04119665175676346,
0.2261050045490265,
-0.1641673594713211,
0.05933133140206337,
-0.07026465982198715,
0.06705164909362793,
-0.32181307673454285,
0.1401013880968094,
-0.23014262318611145,
0.022486340254545212,
-0.2227959930896759,
0.04283810779452324,
0.3917543590068817,
0.04846625030040741,
0.0812288448214531,
-0.11644065380096436,
-0.1251261830329895,
0.036659564822912216,
0.4132406413555145,
0.007910660468041897,
-0.10069549828767776,
0.267147421836853,
0.5139239430427551,
0.511757493019104,
0.19446946680545807,
-0.10808371007442474,
0.08112074434757233,
0.22323763370513916,
0.18928800523281097,
-0.2864868640899658,
0.3529660999774933,
0.3061261773109436,
-0.20728525519371033,
-0.11301324516534805,
-0.3162243366241455,
-0.1412074714899063,
0.11971056461334229,
0.20996496081352234,
0.17501398921012878,
-0.37013480067253113,
-0.11705351620912552,
0.10412352532148361,
-0.10657349973917007,
-0.0910794734954834,
-0.006819129455834627,
0.314744234085083,
0.22844766080379486,
0.1251949816942215,
0.14429344236850739,
0.05077702924609184,
-0.21691085398197174,
-0.5742215514183044,
-0.33684536814689636,
-0.2037464678287506,
-0.40777158737182617,
0.032554857432842255,
0.38969942927360535,
0.41316714882850647,
0.2083001434803009,
0.01798073574900627,
-0.06346826255321503,
-0.11993652582168579,
0.2577691674232483,
0.26230180263519287,
0.3913090229034424,
0.1136624813079834,
-0.035342197865247726,
0.10483937710523605,
0.30300527811050415,
0.08288790285587311,
-0.04788205027580261,
0.18429698050022125,
-0.11683958023786545,
-0.4668154716491699,
-0.08174534142017365,
0.25150907039642334,
-0.3492949306964874,
0.008734544739127159,
0.2315167635679245,
0.30071404576301575,
-0.23072002828121185,
-0.36548474431037903,
-0.13410259783267975,
-0.1464417725801468,
-0.025409791618585587,
-0.06131760776042938,
0.24387529492378235,
0.5897389054298401,
-0.5453348755836487,
-0.077801913022995,
-0.1995145082473755,
0.05006886646151543,
0.2333182841539383,
-0.3790205717086792,
-0.30812719464302063,
0.07537975162267685,
-0.24352046847343445,
-0.03821980953216553,
0.44627755880355835,
-0.06302554160356522,
-0.31382837891578674,
0.023652607575058937,
-0.12217627465724945,
0.1869172900915146,
0.2856384515762329,
-0.07794803380966187,
0.10152807086706161,
-0.148285374045372,
-0.04918617382645607,
-0.135201558470726,
0.29649263620376587,
-0.07337428629398346,
-0.044183310121297836,
-0.012128531001508236,
0.10781245678663254,
0.043607331812381744,
0.009973877109587193,
0.39651167392730713,
0.13713040947914124,
0.018940208479762077,
0.19293464720249176,
-0.2077324539422989,
-0.014810865744948387,
0.37393566966056824,
0.2793177664279938,
0.038008593022823334,
0.16840760409832,
0.0064503587782382965,
-0.623814582824707,
0.2954273819923401,
0.027827100828289986,
0.0053639537654817104,
0.40941768884658813,
0.03529589995741844,
-0.3875856399536133,
-0.14993849396705627,
0.01746668480336666,
-0.3131874203681946,
0.17590443789958954,
0.3813210129737854,
0.17175118625164032,
-0.13049815595149994,
-0.11862510442733765,
0.3000887334346771,
-0.1737113893032074,
-0.06884478777647018,
-0.3093029260635376,
0.32375556230545044,
0.19099846482276917,
-0.3960338532924652,
-0.01723027601838112,
0.21087707579135895,
0.13636229932308197,
-0.3053993582725525,
-0.08731622993946075,
0.22073175013065338,
-0.03718393296003342,
-0.029566317796707153,
0.029325852170586586,
0.07313686609268188,
0.10836920142173767,
0.25007641315460205,
0.15327508747577667,
-0.06339238584041595,
0.06602539867162704,
0.2114717960357666,
-0.2386801838874817,
0.3168259561061859,
0.11514312028884888,
0.012849874794483185,
0.1940094381570816,
-0.26547232270240784,
0.3135959208011627,
-0.12355074286460876,
-0.1490519642829895,
-0.35909587144851685,
-0.12822507321834564,
0.04997439309954643,
0.030805930495262146,
0.2670418620109558,
-0.23138469457626343,
0.2322855293750763,
0.3105456233024597,
0.0742591992020607,
0.07649107277393341,
-0.11125079542398453,
-0.11912883818149567,
-0.3445451259613037,
0.34038612246513367,
0.10587829351425171,
0.3114326000213623,
0.3235367238521576,
0.1768924444913864,
-0.11673226952552795,
-0.04040532186627388,
-0.17052331566810608,
0.2082466334104538,
-0.13582396507263184,
-0.008392799645662308,
0.16802872717380524,
0.2558479905128479,
-0.10634630918502808,
-0.47539669275283813,
-0.032364990562200546,
0.2863807678222656,
0.05119984596967697,
-0.2574855089187622,
-0.14518117904663086,
-0.3503527045249939,
-0.22114986181259155,
-0.07504419982433319,
-0.1731756031513214,
0.2814302444458008,
-0.387009859085083,
0.04594927281141281,
0.21786026656627655,
-0.1202429011464119,
0.16657303273677826,
-0.0629144236445427,
0.37543097138404846,
-0.001097707194276154,
0.3353211283683777,
-0.30715012550354004,
-0.14008107781410217,
-0.4301212430000305,
0.09558417648077011,
-0.16930653154850006,
0.17020565271377563,
-0.03070298582315445,
-0.3143153190612793,
0.07525233179330826,
-0.38256561756134033,
-0.4188452363014221,
0.13820184767246246,
0.2945498824119568,
0.11413706839084625,
0.2306286245584488,
-0.011816597543656826,
0.02813706547021866,
-0.012435740791261196,
0.2302330583333969,
-0.297451376914978,
-0.17130891978740692,
0.12812811136245728,
-0.027100056409835815,
0.10170266777276993,
-0.1202021911740303,
-0.7662836909294128,
-0.05479046702384949,
-0.2863306999206543,
-0.1998625099658966,
0.27080652117729187,
-0.10144969820976257,
0.11210610717535019,
0.1802804321050644,
0.10271216183900833,
0.16290181875228882,
0.08249000459909439,
-0.2069161832332611,
-0.2851652204990387,
0.07225693762302399,
-0.29947030544281006,
-0.2219848334789276,
-0.11839523911476135,
-0.05405714735388756,
0.008530252613127232,
0.15892936289310455,
-0.164358988404274,
-0.36006930470466614,
-0.17283053696155548,
0.11842676252126694,
0.15595848858356476,
0.06566279381513596,
0.5145266652107239,
0.09742989391088486,
-0.2039918601512909,
-0.24561598896980286,
-0.3426271975040436,
0.19077153503894806,
0.1295401155948639,
-0.11859603226184845,
-0.2132856845855713,
0.24289244413375854,
-0.27874985337257385,
0.42248713970184326,
-0.08355449140071869,
-0.20566682517528534,
0.45002272725105286,
-0.1110968217253685,
0.38228219747543335,
-0.35944223403930664,
-0.02236168086528778,
-0.02297322452068329,
-0.13915778696537018,
0.04724422097206116,
0.35180631279945374,
-0.06896687299013138,
-0.214174285531044,
-0.030472610145807266,
0.35407477617263794,
-0.4563548266887665,
-0.2165452539920807,
-0.3153550624847412,
0.25482097268104553,
0.06095549464225769,
0.28919801115989685,
0.09401895850896835,
-0.4975683391094208,
0.03200555965304375,
0.09397780895233154,
-0.18879790604114532,
0.24549926817417145,
0.015279904007911682,
-0.4423534870147705,
0.32953840494155884,
-0.23450417816638947,
0.2399328351020813,
-0.192536860704422,
0.20745040476322174,
0.06620563566684723,
-0.5300363302230835,
0.04634935036301613,
0.06779944896697998,
0.5778389573097229,
-0.3050489127635956,
0.1927672028541565,
0.39864152669906616,
-0.4178936183452606,
-0.07079143077135086,
-0.326169490814209,
-0.359992653131485,
0.3435128331184387,
0.15782807767391205,
0.42231282591819763,
0.0013785415794700384,
-0.09131570905447006,
0.16590167582035065,
0.09633281081914902,
0.04048571735620499,
-0.14949005842208862,
-0.053423427045345306,
-0.08446349203586578,
-0.33655011653900146,
-0.2608490288257599,
-0.23210757970809937,
0.1225525438785553,
-0.5476756691932678,
-0.28917431831359863,
-0.05911494791507721,
-0.012201519683003426,
0.13847605884075165,
0.38994279503822327,
0.3020605146884918,
0.25577211380004883,
-0.003969124983996153,
0.15784867107868195,
0.4219144582748413,
0.09258107095956802,
0.4092697501182556,
-0.15716932713985443,
-0.288462370634079,
0.49389997124671936,
-0.036619726568460464,
-0.04496956989169121,
0.44182220101356506,
0.09856326133012772,
-0.2072177231311798,
-0.13589492440223694,
-0.005253997631371021,
-0.12572546303272247,
0.2366175651550293,
0.11602957546710968,
0.11547859758138657,
-0.22653451561927795,
-0.27745458483695984,
0.4466221332550049,
0.17520083487033844,
-0.31224992871284485,
0.247999370098114,
-0.088856041431427,
-0.27157333493232727,
0.09449362754821777,
0.038991838693618774,
0.47331345081329346,
-0.17220976948738098,
0.17836381494998932,
0.28499868512153625,
-0.025934137403964996,
0.43808048963546753,
-0.12034469842910767,
0.1839350163936615,
-0.4240437150001526,
-0.33179187774658203,
0.10492982715368271,
-0.06813255697488785,
0.1529407948255539,
0.34281420707702637,
-0.1286655217409134,
0.13626782596111298,
-0.18050940334796906,
0.5428348779678345,
0.0681825801730156,
-0.16029037535190582,
0.01860268972814083,
0.03936797007918358,
-0.14637531340122223,
0.16251416504383087,
0.33932551741600037,
0.11643126606941223,
-0.22575831413269043,
0.01110965944826603,
-0.1271807849407196,
0.04861321672797203,
0.23102964460849762,
0.05146605148911476,
0.03345850482583046,
0.038037657737731934,
0.27831006050109863,
-0.35260239243507385,
-0.16484211385250092,
0.30437400937080383,
0.31591224670410156,
0.11288744956254959,
-0.09143637120723724,
-0.00029415314202196896,
-0.008952467702329159,
0.12839144468307495,
0.10851965099573135,
0.011584615334868431,
0.25522980093955994,
0.1576925367116928,
-0.17671912908554077,
0.16855672001838684,
0.015104000456631184,
0.08658383786678314,
-0.1782761663198471,
0.05201711878180504,
0.07908303290605545,
-0.48968276381492615,
-0.22974041104316711,
0.13811567425727844,
0.13419422507286072,
-0.3974669575691223,
0.1492789387702942,
-0.21289853751659393,
-0.15419964492321014,
-0.10157717019319534,
0.16216355562210083,
-0.25034502148628235,
-0.11660230159759521,
0.5130330324172974,
-0.10097351670265198,
0.14716783165931702,
0.4816362261772156,
0.282260000705719,
0.16620203852653503,
-0.2588663399219513,
-0.23443223536014557,
0.5016034841537476,
-0.32583650946617126,
0.3467353880405426,
0.03050239011645317,
-0.1629420667886734,
0.39517974853515625,
0.3672280013561249,
-0.09520603716373444,
0.07708568125963211,
-0.10818910598754883,
-0.2564675807952881,
-0.23752211034297943,
0.15672321617603302,
0.09472451359033585,
0.1982932686805725,
0.054340213537216187,
-0.32853689789772034,
-0.12787629663944244,
-0.4098908007144928,
-0.385435551404953,
0.22088222205638885,
-0.06280700862407684,
-0.02865637093782425,
-0.01899196021258831,
-0.07960180938243866,
-0.3714176118373871,
-0.08502375334501266,
0.1338089555501938,
0.006857218686491251,
-0.10747700929641724,
-0.24945279955863953,
-0.011256176978349686,
0.11439111083745956,
-0.13602347671985626,
-0.11693377047777176,
0.14652913808822632,
0.004608605522662401,
-0.07844768464565277,
-0.21462644636631012,
0.27359461784362793,
0.041528213769197464,
0.0545399971306324,
0.0892954021692276,
-0.194133922457695,
0.0027048150077462196,
-0.03417610004544258,
0.28222861886024475,
-0.11379552632570267,
-0.16988825798034668,
-0.12468807399272919,
0.13487260043621063,
0.0783807784318924,
0.0013234990183264017,
0.28941839933395386,
0.13389843702316284,
-0.16323158144950867,
0.008473509922623634,
0.23661865293979645,
-0.314093679189682,
0.23476354777812958,
0.2835381031036377,
0.23949377238750458,
0.18425366282463074,
0.0050880806520581245,
-0.06578951328992844,
0.04455961659550667,
0.30157381296157837,
-0.4180750846862793,
-0.1803099662065506,
0.3167610764503479,
-0.06761904805898666,
0.18716605007648468,
0.27124860882759094,
0.38998186588287354,
-0.4173649251461029,
0.16507281363010406,
0.1375398337841034,
0.30574992299079895,
0.15337993204593658,
0.1381792277097702,
0.4883961081504822,
-0.15979236364364624,
0.06998351216316223,
0.07044725865125656,
0.24214695394039154,
-0.06841904670000076,
0.45283985137939453,
0.37408557534217834,
0.31739285588264465,
0.13889701664447784,
0.39698871970176697,
-0.21519187092781067,
-0.639504075050354,
0.2955796718597412,
0.23369139432907104,
0.024011751636862755,
0.15951301157474518,
-0.1707068830728531,
-0.020403051748871803,
-0.17655351758003235,
0.15089315176010132,
-0.4425516128540039,
0.0015908152563497424,
-0.17978717386722565,
-0.22133056819438934,
-0.15592721104621887,
-0.4336293935775757,
-0.11306227743625641,
0.09136015176773071,
-0.2759050726890564,
0.07765745371580124,
-0.021529747173190117,
-0.4004427492618561,
-0.06990839540958405,
-0.5547415018081665,
0.055282942950725555,
-0.20532162487506866,
-0.1085018515586853,
-0.07714415341615677,
0.3918743133544922,
0.057778991758823395,
-0.2127685844898224,
0.4998070001602173,
0.038612231612205505,
0.23192714154720306,
0.16641303896903992,
0.07018745690584183,
-0.011101746000349522,
0.08800696581602097,
-0.1526355743408203,
-0.3997158706188202,
0.22026240825653076,
0.18318867683410645,
-0.013457669876515865,
0.11361219733953476,
0.15494252741336823,
-0.17934024333953857,
0.0210270956158638,
0.14717569947242737,
-0.06376486271619797,
-0.24014435708522797,
0.15284204483032227,
0.04643998667597771,
-0.05199996009469032,
0.056775808334350586,
-0.09210798889398575,
-0.1295505315065384,
-0.41544511914253235,
0.23909948766231537,
0.05113114416599274,
0.1322716325521469,
0.11068201810121536,
0.13549524545669556,
-0.35895147919654846,
0.21424660086631775,
0.12155631184577942,
-0.14738014340400696,
0.036792412400245667,
-0.25508156418800354,
-0.6162773370742798,
0.1635623425245285,
0.11713168025016785,
-0.010707570239901543,
-0.001107831601984799,
0.009844101034104824,
0.2945701479911804,
-0.2557985186576843,
0.08557131141424179,
0.005112828221172094,
0.24660998582839966,
0.11574837565422058,
-0.5743597149848938,
-0.08761513978242874,
-0.1596970111131668,
0.22328713536262512,
-0.11631260067224503,
-0.10972294211387634,
0.014390796422958374,
-0.037627171725034714,
0.09940508008003235,
0.016063297167420387,
-0.09784559905529022,
0.03411196172237396,
-0.10796869546175003,
0.3288993537425995,
0.10231190174818039,
0.40846535563468933,
0.04643836244940758,
0.06973594427108765,
-0.3073202967643738,
-0.18648721277713776,
0.17287983000278473,
0.26409676671028137,
-0.19167421758174896,
-0.06515748798847198,
0.03846460580825806,
0.38014334440231323,
0.014069896191358566,
-0.16397367417812347,
0.26196417212486267,
0.45842647552490234,
-0.4377624988555908,
0.06961212307214737,
-0.23491500318050385,
-0.07129518687725067,
0.3597223162651062,
0.27140527963638306,
0.08751396834850311,
0.08177251368761063,
-0.14360135793685913,
-0.15186822414398193,
0.4795733094215393,
-0.43358179926872253,
-0.3318155109882355,
-0.5617201924324036,
0.1815306842327118,
-0.04214772582054138,
-0.14996731281280518,
-0.01909264735877514,
0.034749485552310944,
0.3282114267349243,
-0.3589740991592407,
-0.02651716023683548,
0.31577011942863464,
-0.1879299283027649,
0.06185488775372505,
-0.04521683230996132,
0.08556433767080307,
0.28595009446144104,
0.057026952505111694,
-0.3530765175819397,
-0.10605968534946442
] |
https://github.com/huggingface/datasets/issues/3236
|
Loading of datasets changed in #3110 returns no examples
|
Ok I found the issue. It's not related to python 3.8 in itself though. This issue happens because your local installation of `datasets` is outdated compared to the changes to datasets in #3110
To fix this you just have to pull the latest changes from `master` :)
Let me know if that helps !
--------------
Here are more details about my investigation:
It's possible to reproduce this issue if you use `datasets<=1.15.1` or before b6469baa22c174b3906c631802a7016fedea6780 and if you load the dataset after revision b6469baa22c174b3906c631802a7016fedea6780. This is because `dl_manager.iter_archive` had issues at that time (and it was not used anywhere anyway).
In particular it was returning the absolute path to extracted files instead of the relative path of the file inside the archive. This was an issue because `dl_manager.iter_archive` isn't supposed to extract the TAR archive. Instead, it iterates over all the files inside the archive, without creating a directory with the extracted content.
Therefore if you want to use the datasets on `master`, make sure that you have an up-to-date local installation of `datasets` as well, or you may face incompatibilities like this.
|
## Describe the bug
Loading of datasets changed in https://github.com/huggingface/datasets/pull/3110 returns no examples:
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
})
```
## Steps to reproduce the bug
Load any of the datasets that were changed in https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper")
# The problem only started with the commit of #3110
load_dataset("qasper", revision="b6469baa22c174b3906c631802a7016fedea6780")
```
## Expected results
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
Which can be received when specifying revision of the commit before https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper", revision="acfe2abda1ca79f0ce5c1896aa83b4b78af76b7d")
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.2.dev0 (master)
- Python version: 3.8.10
- PyArrow version: 3.0.0
| 183 |
Loading of datasets changed in #3110 returns no examples
|
[
-0.09727028757333755,
0.34162530303001404,
-0.09711651504039764,
0.25706031918525696,
0.18149690330028534,
-0.18841047585010529,
0.5248988270759583,
0.3087003827095032,
0.23046886920928955,
0.07182158529758453,
-0.019607024267315865,
0.3447750210762024,
0.0642838329076767,
0.06272619217634201,
0.06287121027708054,
0.1376350373029709,
0.02427073009312153,
0.13156373798847198,
-0.3989175260066986,
-0.08366038650274277,
-0.17063213884830475,
0.38000190258026123,
-0.3165892958641052,
-0.058001432567834854,
-0.33932727575302124,
0.29711997509002686,
-0.11642701923847198,
0.4734252691268921,
-0.1995997279882431,
-0.2991870641708374,
0.4178197383880615,
0.2967577278614044,
0.44353002309799194,
0.29437822103500366,
-0.0001118480067816563,
0.16204772889614105,
0.309317946434021,
-0.06114984676241875,
-0.4835474193096161,
0.026973873376846313,
-0.22507429122924805,
-0.45415744185447693,
0.18450027704238892,
-0.24856366217136383,
-0.10197056084871292,
-0.3149421215057373,
-0.17763331532478333,
-0.07501622289419174,
0.34847745299339294,
0.25713467597961426,
0.22164443135261536,
0.10385532677173615,
-0.09053387492895126,
-0.5282890200614929,
0.34444281458854675,
-0.06857270747423172,
0.13608109951019287,
0.08688020706176758,
0.4566597640514374,
0.047426529228687286,
-0.0795346349477768,
0.008974921889603138,
-0.03314369171857834,
-0.02667890675365925,
-0.24036498367786407,
-0.04843739792704582,
-0.007763450033962727,
0.0265670008957386,
0.14836488664150238,
0.18567374348640442,
0.828813910484314,
0.040224432945251465,
-0.1891922652721405,
-0.14577554166316986,
-0.14543959498405457,
-0.2656192481517792,
0.13508793711662292,
-0.3048214912414551,
0.04119665175676346,
0.2261050045490265,
-0.1641673594713211,
0.05933133140206337,
-0.07026465982198715,
0.06705164909362793,
-0.32181307673454285,
0.1401013880968094,
-0.23014262318611145,
0.022486340254545212,
-0.2227959930896759,
0.04283810779452324,
0.3917543590068817,
0.04846625030040741,
0.0812288448214531,
-0.11644065380096436,
-0.1251261830329895,
0.036659564822912216,
0.4132406413555145,
0.007910660468041897,
-0.10069549828767776,
0.267147421836853,
0.5139239430427551,
0.511757493019104,
0.19446946680545807,
-0.10808371007442474,
0.08112074434757233,
0.22323763370513916,
0.18928800523281097,
-0.2864868640899658,
0.3529660999774933,
0.3061261773109436,
-0.20728525519371033,
-0.11301324516534805,
-0.3162243366241455,
-0.1412074714899063,
0.11971056461334229,
0.20996496081352234,
0.17501398921012878,
-0.37013480067253113,
-0.11705351620912552,
0.10412352532148361,
-0.10657349973917007,
-0.0910794734954834,
-0.006819129455834627,
0.314744234085083,
0.22844766080379486,
0.1251949816942215,
0.14429344236850739,
0.05077702924609184,
-0.21691085398197174,
-0.5742215514183044,
-0.33684536814689636,
-0.2037464678287506,
-0.40777158737182617,
0.032554857432842255,
0.38969942927360535,
0.41316714882850647,
0.2083001434803009,
0.01798073574900627,
-0.06346826255321503,
-0.11993652582168579,
0.2577691674232483,
0.26230180263519287,
0.3913090229034424,
0.1136624813079834,
-0.035342197865247726,
0.10483937710523605,
0.30300527811050415,
0.08288790285587311,
-0.04788205027580261,
0.18429698050022125,
-0.11683958023786545,
-0.4668154716491699,
-0.08174534142017365,
0.25150907039642334,
-0.3492949306964874,
0.008734544739127159,
0.2315167635679245,
0.30071404576301575,
-0.23072002828121185,
-0.36548474431037903,
-0.13410259783267975,
-0.1464417725801468,
-0.025409791618585587,
-0.06131760776042938,
0.24387529492378235,
0.5897389054298401,
-0.5453348755836487,
-0.077801913022995,
-0.1995145082473755,
0.05006886646151543,
0.2333182841539383,
-0.3790205717086792,
-0.30812719464302063,
0.07537975162267685,
-0.24352046847343445,
-0.03821980953216553,
0.44627755880355835,
-0.06302554160356522,
-0.31382837891578674,
0.023652607575058937,
-0.12217627465724945,
0.1869172900915146,
0.2856384515762329,
-0.07794803380966187,
0.10152807086706161,
-0.148285374045372,
-0.04918617382645607,
-0.135201558470726,
0.29649263620376587,
-0.07337428629398346,
-0.044183310121297836,
-0.012128531001508236,
0.10781245678663254,
0.043607331812381744,
0.009973877109587193,
0.39651167392730713,
0.13713040947914124,
0.018940208479762077,
0.19293464720249176,
-0.2077324539422989,
-0.014810865744948387,
0.37393566966056824,
0.2793177664279938,
0.038008593022823334,
0.16840760409832,
0.0064503587782382965,
-0.623814582824707,
0.2954273819923401,
0.027827100828289986,
0.0053639537654817104,
0.40941768884658813,
0.03529589995741844,
-0.3875856399536133,
-0.14993849396705627,
0.01746668480336666,
-0.3131874203681946,
0.17590443789958954,
0.3813210129737854,
0.17175118625164032,
-0.13049815595149994,
-0.11862510442733765,
0.3000887334346771,
-0.1737113893032074,
-0.06884478777647018,
-0.3093029260635376,
0.32375556230545044,
0.19099846482276917,
-0.3960338532924652,
-0.01723027601838112,
0.21087707579135895,
0.13636229932308197,
-0.3053993582725525,
-0.08731622993946075,
0.22073175013065338,
-0.03718393296003342,
-0.029566317796707153,
0.029325852170586586,
0.07313686609268188,
0.10836920142173767,
0.25007641315460205,
0.15327508747577667,
-0.06339238584041595,
0.06602539867162704,
0.2114717960357666,
-0.2386801838874817,
0.3168259561061859,
0.11514312028884888,
0.012849874794483185,
0.1940094381570816,
-0.26547232270240784,
0.3135959208011627,
-0.12355074286460876,
-0.1490519642829895,
-0.35909587144851685,
-0.12822507321834564,
0.04997439309954643,
0.030805930495262146,
0.2670418620109558,
-0.23138469457626343,
0.2322855293750763,
0.3105456233024597,
0.0742591992020607,
0.07649107277393341,
-0.11125079542398453,
-0.11912883818149567,
-0.3445451259613037,
0.34038612246513367,
0.10587829351425171,
0.3114326000213623,
0.3235367238521576,
0.1768924444913864,
-0.11673226952552795,
-0.04040532186627388,
-0.17052331566810608,
0.2082466334104538,
-0.13582396507263184,
-0.008392799645662308,
0.16802872717380524,
0.2558479905128479,
-0.10634630918502808,
-0.47539669275283813,
-0.032364990562200546,
0.2863807678222656,
0.05119984596967697,
-0.2574855089187622,
-0.14518117904663086,
-0.3503527045249939,
-0.22114986181259155,
-0.07504419982433319,
-0.1731756031513214,
0.2814302444458008,
-0.387009859085083,
0.04594927281141281,
0.21786026656627655,
-0.1202429011464119,
0.16657303273677826,
-0.0629144236445427,
0.37543097138404846,
-0.001097707194276154,
0.3353211283683777,
-0.30715012550354004,
-0.14008107781410217,
-0.4301212430000305,
0.09558417648077011,
-0.16930653154850006,
0.17020565271377563,
-0.03070298582315445,
-0.3143153190612793,
0.07525233179330826,
-0.38256561756134033,
-0.4188452363014221,
0.13820184767246246,
0.2945498824119568,
0.11413706839084625,
0.2306286245584488,
-0.011816597543656826,
0.02813706547021866,
-0.012435740791261196,
0.2302330583333969,
-0.297451376914978,
-0.17130891978740692,
0.12812811136245728,
-0.027100056409835815,
0.10170266777276993,
-0.1202021911740303,
-0.7662836909294128,
-0.05479046702384949,
-0.2863306999206543,
-0.1998625099658966,
0.27080652117729187,
-0.10144969820976257,
0.11210610717535019,
0.1802804321050644,
0.10271216183900833,
0.16290181875228882,
0.08249000459909439,
-0.2069161832332611,
-0.2851652204990387,
0.07225693762302399,
-0.29947030544281006,
-0.2219848334789276,
-0.11839523911476135,
-0.05405714735388756,
0.008530252613127232,
0.15892936289310455,
-0.164358988404274,
-0.36006930470466614,
-0.17283053696155548,
0.11842676252126694,
0.15595848858356476,
0.06566279381513596,
0.5145266652107239,
0.09742989391088486,
-0.2039918601512909,
-0.24561598896980286,
-0.3426271975040436,
0.19077153503894806,
0.1295401155948639,
-0.11859603226184845,
-0.2132856845855713,
0.24289244413375854,
-0.27874985337257385,
0.42248713970184326,
-0.08355449140071869,
-0.20566682517528534,
0.45002272725105286,
-0.1110968217253685,
0.38228219747543335,
-0.35944223403930664,
-0.02236168086528778,
-0.02297322452068329,
-0.13915778696537018,
0.04724422097206116,
0.35180631279945374,
-0.06896687299013138,
-0.214174285531044,
-0.030472610145807266,
0.35407477617263794,
-0.4563548266887665,
-0.2165452539920807,
-0.3153550624847412,
0.25482097268104553,
0.06095549464225769,
0.28919801115989685,
0.09401895850896835,
-0.4975683391094208,
0.03200555965304375,
0.09397780895233154,
-0.18879790604114532,
0.24549926817417145,
0.015279904007911682,
-0.4423534870147705,
0.32953840494155884,
-0.23450417816638947,
0.2399328351020813,
-0.192536860704422,
0.20745040476322174,
0.06620563566684723,
-0.5300363302230835,
0.04634935036301613,
0.06779944896697998,
0.5778389573097229,
-0.3050489127635956,
0.1927672028541565,
0.39864152669906616,
-0.4178936183452606,
-0.07079143077135086,
-0.326169490814209,
-0.359992653131485,
0.3435128331184387,
0.15782807767391205,
0.42231282591819763,
0.0013785415794700384,
-0.09131570905447006,
0.16590167582035065,
0.09633281081914902,
0.04048571735620499,
-0.14949005842208862,
-0.053423427045345306,
-0.08446349203586578,
-0.33655011653900146,
-0.2608490288257599,
-0.23210757970809937,
0.1225525438785553,
-0.5476756691932678,
-0.28917431831359863,
-0.05911494791507721,
-0.012201519683003426,
0.13847605884075165,
0.38994279503822327,
0.3020605146884918,
0.25577211380004883,
-0.003969124983996153,
0.15784867107868195,
0.4219144582748413,
0.09258107095956802,
0.4092697501182556,
-0.15716932713985443,
-0.288462370634079,
0.49389997124671936,
-0.036619726568460464,
-0.04496956989169121,
0.44182220101356506,
0.09856326133012772,
-0.2072177231311798,
-0.13589492440223694,
-0.005253997631371021,
-0.12572546303272247,
0.2366175651550293,
0.11602957546710968,
0.11547859758138657,
-0.22653451561927795,
-0.27745458483695984,
0.4466221332550049,
0.17520083487033844,
-0.31224992871284485,
0.247999370098114,
-0.088856041431427,
-0.27157333493232727,
0.09449362754821777,
0.038991838693618774,
0.47331345081329346,
-0.17220976948738098,
0.17836381494998932,
0.28499868512153625,
-0.025934137403964996,
0.43808048963546753,
-0.12034469842910767,
0.1839350163936615,
-0.4240437150001526,
-0.33179187774658203,
0.10492982715368271,
-0.06813255697488785,
0.1529407948255539,
0.34281420707702637,
-0.1286655217409134,
0.13626782596111298,
-0.18050940334796906,
0.5428348779678345,
0.0681825801730156,
-0.16029037535190582,
0.01860268972814083,
0.03936797007918358,
-0.14637531340122223,
0.16251416504383087,
0.33932551741600037,
0.11643126606941223,
-0.22575831413269043,
0.01110965944826603,
-0.1271807849407196,
0.04861321672797203,
0.23102964460849762,
0.05146605148911476,
0.03345850482583046,
0.038037657737731934,
0.27831006050109863,
-0.35260239243507385,
-0.16484211385250092,
0.30437400937080383,
0.31591224670410156,
0.11288744956254959,
-0.09143637120723724,
-0.00029415314202196896,
-0.008952467702329159,
0.12839144468307495,
0.10851965099573135,
0.011584615334868431,
0.25522980093955994,
0.1576925367116928,
-0.17671912908554077,
0.16855672001838684,
0.015104000456631184,
0.08658383786678314,
-0.1782761663198471,
0.05201711878180504,
0.07908303290605545,
-0.48968276381492615,
-0.22974041104316711,
0.13811567425727844,
0.13419422507286072,
-0.3974669575691223,
0.1492789387702942,
-0.21289853751659393,
-0.15419964492321014,
-0.10157717019319534,
0.16216355562210083,
-0.25034502148628235,
-0.11660230159759521,
0.5130330324172974,
-0.10097351670265198,
0.14716783165931702,
0.4816362261772156,
0.282260000705719,
0.16620203852653503,
-0.2588663399219513,
-0.23443223536014557,
0.5016034841537476,
-0.32583650946617126,
0.3467353880405426,
0.03050239011645317,
-0.1629420667886734,
0.39517974853515625,
0.3672280013561249,
-0.09520603716373444,
0.07708568125963211,
-0.10818910598754883,
-0.2564675807952881,
-0.23752211034297943,
0.15672321617603302,
0.09472451359033585,
0.1982932686805725,
0.054340213537216187,
-0.32853689789772034,
-0.12787629663944244,
-0.4098908007144928,
-0.385435551404953,
0.22088222205638885,
-0.06280700862407684,
-0.02865637093782425,
-0.01899196021258831,
-0.07960180938243866,
-0.3714176118373871,
-0.08502375334501266,
0.1338089555501938,
0.006857218686491251,
-0.10747700929641724,
-0.24945279955863953,
-0.011256176978349686,
0.11439111083745956,
-0.13602347671985626,
-0.11693377047777176,
0.14652913808822632,
0.004608605522662401,
-0.07844768464565277,
-0.21462644636631012,
0.27359461784362793,
0.041528213769197464,
0.0545399971306324,
0.0892954021692276,
-0.194133922457695,
0.0027048150077462196,
-0.03417610004544258,
0.28222861886024475,
-0.11379552632570267,
-0.16988825798034668,
-0.12468807399272919,
0.13487260043621063,
0.0783807784318924,
0.0013234990183264017,
0.28941839933395386,
0.13389843702316284,
-0.16323158144950867,
0.008473509922623634,
0.23661865293979645,
-0.314093679189682,
0.23476354777812958,
0.2835381031036377,
0.23949377238750458,
0.18425366282463074,
0.0050880806520581245,
-0.06578951328992844,
0.04455961659550667,
0.30157381296157837,
-0.4180750846862793,
-0.1803099662065506,
0.3167610764503479,
-0.06761904805898666,
0.18716605007648468,
0.27124860882759094,
0.38998186588287354,
-0.4173649251461029,
0.16507281363010406,
0.1375398337841034,
0.30574992299079895,
0.15337993204593658,
0.1381792277097702,
0.4883961081504822,
-0.15979236364364624,
0.06998351216316223,
0.07044725865125656,
0.24214695394039154,
-0.06841904670000076,
0.45283985137939453,
0.37408557534217834,
0.31739285588264465,
0.13889701664447784,
0.39698871970176697,
-0.21519187092781067,
-0.639504075050354,
0.2955796718597412,
0.23369139432907104,
0.024011751636862755,
0.15951301157474518,
-0.1707068830728531,
-0.020403051748871803,
-0.17655351758003235,
0.15089315176010132,
-0.4425516128540039,
0.0015908152563497424,
-0.17978717386722565,
-0.22133056819438934,
-0.15592721104621887,
-0.4336293935775757,
-0.11306227743625641,
0.09136015176773071,
-0.2759050726890564,
0.07765745371580124,
-0.021529747173190117,
-0.4004427492618561,
-0.06990839540958405,
-0.5547415018081665,
0.055282942950725555,
-0.20532162487506866,
-0.1085018515586853,
-0.07714415341615677,
0.3918743133544922,
0.057778991758823395,
-0.2127685844898224,
0.4998070001602173,
0.038612231612205505,
0.23192714154720306,
0.16641303896903992,
0.07018745690584183,
-0.011101746000349522,
0.08800696581602097,
-0.1526355743408203,
-0.3997158706188202,
0.22026240825653076,
0.18318867683410645,
-0.013457669876515865,
0.11361219733953476,
0.15494252741336823,
-0.17934024333953857,
0.0210270956158638,
0.14717569947242737,
-0.06376486271619797,
-0.24014435708522797,
0.15284204483032227,
0.04643998667597771,
-0.05199996009469032,
0.056775808334350586,
-0.09210798889398575,
-0.1295505315065384,
-0.41544511914253235,
0.23909948766231537,
0.05113114416599274,
0.1322716325521469,
0.11068201810121536,
0.13549524545669556,
-0.35895147919654846,
0.21424660086631775,
0.12155631184577942,
-0.14738014340400696,
0.036792412400245667,
-0.25508156418800354,
-0.6162773370742798,
0.1635623425245285,
0.11713168025016785,
-0.010707570239901543,
-0.001107831601984799,
0.009844101034104824,
0.2945701479911804,
-0.2557985186576843,
0.08557131141424179,
0.005112828221172094,
0.24660998582839966,
0.11574837565422058,
-0.5743597149848938,
-0.08761513978242874,
-0.1596970111131668,
0.22328713536262512,
-0.11631260067224503,
-0.10972294211387634,
0.014390796422958374,
-0.037627171725034714,
0.09940508008003235,
0.016063297167420387,
-0.09784559905529022,
0.03411196172237396,
-0.10796869546175003,
0.3288993537425995,
0.10231190174818039,
0.40846535563468933,
0.04643836244940758,
0.06973594427108765,
-0.3073202967643738,
-0.18648721277713776,
0.17287983000278473,
0.26409676671028137,
-0.19167421758174896,
-0.06515748798847198,
0.03846460580825806,
0.38014334440231323,
0.014069896191358566,
-0.16397367417812347,
0.26196417212486267,
0.45842647552490234,
-0.4377624988555908,
0.06961212307214737,
-0.23491500318050385,
-0.07129518687725067,
0.3597223162651062,
0.27140527963638306,
0.08751396834850311,
0.08177251368761063,
-0.14360135793685913,
-0.15186822414398193,
0.4795733094215393,
-0.43358179926872253,
-0.3318155109882355,
-0.5617201924324036,
0.1815306842327118,
-0.04214772582054138,
-0.14996731281280518,
-0.01909264735877514,
0.034749485552310944,
0.3282114267349243,
-0.3589740991592407,
-0.02651716023683548,
0.31577011942863464,
-0.1879299283027649,
0.06185488775372505,
-0.04521683230996132,
0.08556433767080307,
0.28595009446144104,
0.057026952505111694,
-0.3530765175819397,
-0.10605968534946442
] |
https://github.com/huggingface/datasets/issues/3236
|
Loading of datasets changed in #3110 returns no examples
|
Thanks!
But what about code that is already using older version of datasets?
The reason I encountered this issue was that suddenly one of my repos with version 1.12.1 started getting 0 examples.
I handled it by adding `revision` to `load_dataset`, but I guess it would still be an issue for other users who doesn't know this.
|
## Describe the bug
Loading of datasets changed in https://github.com/huggingface/datasets/pull/3110 returns no examples:
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
})
```
## Steps to reproduce the bug
Load any of the datasets that were changed in https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper")
# The problem only started with the commit of #3110
load_dataset("qasper", revision="b6469baa22c174b3906c631802a7016fedea6780")
```
## Expected results
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
Which can be received when specifying revision of the commit before https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper", revision="acfe2abda1ca79f0ce5c1896aa83b4b78af76b7d")
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.2.dev0 (master)
- Python version: 3.8.10
- PyArrow version: 3.0.0
| 57 |
Loading of datasets changed in #3110 returns no examples
|
[
-0.09727028757333755,
0.34162530303001404,
-0.09711651504039764,
0.25706031918525696,
0.18149690330028534,
-0.18841047585010529,
0.5248988270759583,
0.3087003827095032,
0.23046886920928955,
0.07182158529758453,
-0.019607024267315865,
0.3447750210762024,
0.0642838329076767,
0.06272619217634201,
0.06287121027708054,
0.1376350373029709,
0.02427073009312153,
0.13156373798847198,
-0.3989175260066986,
-0.08366038650274277,
-0.17063213884830475,
0.38000190258026123,
-0.3165892958641052,
-0.058001432567834854,
-0.33932727575302124,
0.29711997509002686,
-0.11642701923847198,
0.4734252691268921,
-0.1995997279882431,
-0.2991870641708374,
0.4178197383880615,
0.2967577278614044,
0.44353002309799194,
0.29437822103500366,
-0.0001118480067816563,
0.16204772889614105,
0.309317946434021,
-0.06114984676241875,
-0.4835474193096161,
0.026973873376846313,
-0.22507429122924805,
-0.45415744185447693,
0.18450027704238892,
-0.24856366217136383,
-0.10197056084871292,
-0.3149421215057373,
-0.17763331532478333,
-0.07501622289419174,
0.34847745299339294,
0.25713467597961426,
0.22164443135261536,
0.10385532677173615,
-0.09053387492895126,
-0.5282890200614929,
0.34444281458854675,
-0.06857270747423172,
0.13608109951019287,
0.08688020706176758,
0.4566597640514374,
0.047426529228687286,
-0.0795346349477768,
0.008974921889603138,
-0.03314369171857834,
-0.02667890675365925,
-0.24036498367786407,
-0.04843739792704582,
-0.007763450033962727,
0.0265670008957386,
0.14836488664150238,
0.18567374348640442,
0.828813910484314,
0.040224432945251465,
-0.1891922652721405,
-0.14577554166316986,
-0.14543959498405457,
-0.2656192481517792,
0.13508793711662292,
-0.3048214912414551,
0.04119665175676346,
0.2261050045490265,
-0.1641673594713211,
0.05933133140206337,
-0.07026465982198715,
0.06705164909362793,
-0.32181307673454285,
0.1401013880968094,
-0.23014262318611145,
0.022486340254545212,
-0.2227959930896759,
0.04283810779452324,
0.3917543590068817,
0.04846625030040741,
0.0812288448214531,
-0.11644065380096436,
-0.1251261830329895,
0.036659564822912216,
0.4132406413555145,
0.007910660468041897,
-0.10069549828767776,
0.267147421836853,
0.5139239430427551,
0.511757493019104,
0.19446946680545807,
-0.10808371007442474,
0.08112074434757233,
0.22323763370513916,
0.18928800523281097,
-0.2864868640899658,
0.3529660999774933,
0.3061261773109436,
-0.20728525519371033,
-0.11301324516534805,
-0.3162243366241455,
-0.1412074714899063,
0.11971056461334229,
0.20996496081352234,
0.17501398921012878,
-0.37013480067253113,
-0.11705351620912552,
0.10412352532148361,
-0.10657349973917007,
-0.0910794734954834,
-0.006819129455834627,
0.314744234085083,
0.22844766080379486,
0.1251949816942215,
0.14429344236850739,
0.05077702924609184,
-0.21691085398197174,
-0.5742215514183044,
-0.33684536814689636,
-0.2037464678287506,
-0.40777158737182617,
0.032554857432842255,
0.38969942927360535,
0.41316714882850647,
0.2083001434803009,
0.01798073574900627,
-0.06346826255321503,
-0.11993652582168579,
0.2577691674232483,
0.26230180263519287,
0.3913090229034424,
0.1136624813079834,
-0.035342197865247726,
0.10483937710523605,
0.30300527811050415,
0.08288790285587311,
-0.04788205027580261,
0.18429698050022125,
-0.11683958023786545,
-0.4668154716491699,
-0.08174534142017365,
0.25150907039642334,
-0.3492949306964874,
0.008734544739127159,
0.2315167635679245,
0.30071404576301575,
-0.23072002828121185,
-0.36548474431037903,
-0.13410259783267975,
-0.1464417725801468,
-0.025409791618585587,
-0.06131760776042938,
0.24387529492378235,
0.5897389054298401,
-0.5453348755836487,
-0.077801913022995,
-0.1995145082473755,
0.05006886646151543,
0.2333182841539383,
-0.3790205717086792,
-0.30812719464302063,
0.07537975162267685,
-0.24352046847343445,
-0.03821980953216553,
0.44627755880355835,
-0.06302554160356522,
-0.31382837891578674,
0.023652607575058937,
-0.12217627465724945,
0.1869172900915146,
0.2856384515762329,
-0.07794803380966187,
0.10152807086706161,
-0.148285374045372,
-0.04918617382645607,
-0.135201558470726,
0.29649263620376587,
-0.07337428629398346,
-0.044183310121297836,
-0.012128531001508236,
0.10781245678663254,
0.043607331812381744,
0.009973877109587193,
0.39651167392730713,
0.13713040947914124,
0.018940208479762077,
0.19293464720249176,
-0.2077324539422989,
-0.014810865744948387,
0.37393566966056824,
0.2793177664279938,
0.038008593022823334,
0.16840760409832,
0.0064503587782382965,
-0.623814582824707,
0.2954273819923401,
0.027827100828289986,
0.0053639537654817104,
0.40941768884658813,
0.03529589995741844,
-0.3875856399536133,
-0.14993849396705627,
0.01746668480336666,
-0.3131874203681946,
0.17590443789958954,
0.3813210129737854,
0.17175118625164032,
-0.13049815595149994,
-0.11862510442733765,
0.3000887334346771,
-0.1737113893032074,
-0.06884478777647018,
-0.3093029260635376,
0.32375556230545044,
0.19099846482276917,
-0.3960338532924652,
-0.01723027601838112,
0.21087707579135895,
0.13636229932308197,
-0.3053993582725525,
-0.08731622993946075,
0.22073175013065338,
-0.03718393296003342,
-0.029566317796707153,
0.029325852170586586,
0.07313686609268188,
0.10836920142173767,
0.25007641315460205,
0.15327508747577667,
-0.06339238584041595,
0.06602539867162704,
0.2114717960357666,
-0.2386801838874817,
0.3168259561061859,
0.11514312028884888,
0.012849874794483185,
0.1940094381570816,
-0.26547232270240784,
0.3135959208011627,
-0.12355074286460876,
-0.1490519642829895,
-0.35909587144851685,
-0.12822507321834564,
0.04997439309954643,
0.030805930495262146,
0.2670418620109558,
-0.23138469457626343,
0.2322855293750763,
0.3105456233024597,
0.0742591992020607,
0.07649107277393341,
-0.11125079542398453,
-0.11912883818149567,
-0.3445451259613037,
0.34038612246513367,
0.10587829351425171,
0.3114326000213623,
0.3235367238521576,
0.1768924444913864,
-0.11673226952552795,
-0.04040532186627388,
-0.17052331566810608,
0.2082466334104538,
-0.13582396507263184,
-0.008392799645662308,
0.16802872717380524,
0.2558479905128479,
-0.10634630918502808,
-0.47539669275283813,
-0.032364990562200546,
0.2863807678222656,
0.05119984596967697,
-0.2574855089187622,
-0.14518117904663086,
-0.3503527045249939,
-0.22114986181259155,
-0.07504419982433319,
-0.1731756031513214,
0.2814302444458008,
-0.387009859085083,
0.04594927281141281,
0.21786026656627655,
-0.1202429011464119,
0.16657303273677826,
-0.0629144236445427,
0.37543097138404846,
-0.001097707194276154,
0.3353211283683777,
-0.30715012550354004,
-0.14008107781410217,
-0.4301212430000305,
0.09558417648077011,
-0.16930653154850006,
0.17020565271377563,
-0.03070298582315445,
-0.3143153190612793,
0.07525233179330826,
-0.38256561756134033,
-0.4188452363014221,
0.13820184767246246,
0.2945498824119568,
0.11413706839084625,
0.2306286245584488,
-0.011816597543656826,
0.02813706547021866,
-0.012435740791261196,
0.2302330583333969,
-0.297451376914978,
-0.17130891978740692,
0.12812811136245728,
-0.027100056409835815,
0.10170266777276993,
-0.1202021911740303,
-0.7662836909294128,
-0.05479046702384949,
-0.2863306999206543,
-0.1998625099658966,
0.27080652117729187,
-0.10144969820976257,
0.11210610717535019,
0.1802804321050644,
0.10271216183900833,
0.16290181875228882,
0.08249000459909439,
-0.2069161832332611,
-0.2851652204990387,
0.07225693762302399,
-0.29947030544281006,
-0.2219848334789276,
-0.11839523911476135,
-0.05405714735388756,
0.008530252613127232,
0.15892936289310455,
-0.164358988404274,
-0.36006930470466614,
-0.17283053696155548,
0.11842676252126694,
0.15595848858356476,
0.06566279381513596,
0.5145266652107239,
0.09742989391088486,
-0.2039918601512909,
-0.24561598896980286,
-0.3426271975040436,
0.19077153503894806,
0.1295401155948639,
-0.11859603226184845,
-0.2132856845855713,
0.24289244413375854,
-0.27874985337257385,
0.42248713970184326,
-0.08355449140071869,
-0.20566682517528534,
0.45002272725105286,
-0.1110968217253685,
0.38228219747543335,
-0.35944223403930664,
-0.02236168086528778,
-0.02297322452068329,
-0.13915778696537018,
0.04724422097206116,
0.35180631279945374,
-0.06896687299013138,
-0.214174285531044,
-0.030472610145807266,
0.35407477617263794,
-0.4563548266887665,
-0.2165452539920807,
-0.3153550624847412,
0.25482097268104553,
0.06095549464225769,
0.28919801115989685,
0.09401895850896835,
-0.4975683391094208,
0.03200555965304375,
0.09397780895233154,
-0.18879790604114532,
0.24549926817417145,
0.015279904007911682,
-0.4423534870147705,
0.32953840494155884,
-0.23450417816638947,
0.2399328351020813,
-0.192536860704422,
0.20745040476322174,
0.06620563566684723,
-0.5300363302230835,
0.04634935036301613,
0.06779944896697998,
0.5778389573097229,
-0.3050489127635956,
0.1927672028541565,
0.39864152669906616,
-0.4178936183452606,
-0.07079143077135086,
-0.326169490814209,
-0.359992653131485,
0.3435128331184387,
0.15782807767391205,
0.42231282591819763,
0.0013785415794700384,
-0.09131570905447006,
0.16590167582035065,
0.09633281081914902,
0.04048571735620499,
-0.14949005842208862,
-0.053423427045345306,
-0.08446349203586578,
-0.33655011653900146,
-0.2608490288257599,
-0.23210757970809937,
0.1225525438785553,
-0.5476756691932678,
-0.28917431831359863,
-0.05911494791507721,
-0.012201519683003426,
0.13847605884075165,
0.38994279503822327,
0.3020605146884918,
0.25577211380004883,
-0.003969124983996153,
0.15784867107868195,
0.4219144582748413,
0.09258107095956802,
0.4092697501182556,
-0.15716932713985443,
-0.288462370634079,
0.49389997124671936,
-0.036619726568460464,
-0.04496956989169121,
0.44182220101356506,
0.09856326133012772,
-0.2072177231311798,
-0.13589492440223694,
-0.005253997631371021,
-0.12572546303272247,
0.2366175651550293,
0.11602957546710968,
0.11547859758138657,
-0.22653451561927795,
-0.27745458483695984,
0.4466221332550049,
0.17520083487033844,
-0.31224992871284485,
0.247999370098114,
-0.088856041431427,
-0.27157333493232727,
0.09449362754821777,
0.038991838693618774,
0.47331345081329346,
-0.17220976948738098,
0.17836381494998932,
0.28499868512153625,
-0.025934137403964996,
0.43808048963546753,
-0.12034469842910767,
0.1839350163936615,
-0.4240437150001526,
-0.33179187774658203,
0.10492982715368271,
-0.06813255697488785,
0.1529407948255539,
0.34281420707702637,
-0.1286655217409134,
0.13626782596111298,
-0.18050940334796906,
0.5428348779678345,
0.0681825801730156,
-0.16029037535190582,
0.01860268972814083,
0.03936797007918358,
-0.14637531340122223,
0.16251416504383087,
0.33932551741600037,
0.11643126606941223,
-0.22575831413269043,
0.01110965944826603,
-0.1271807849407196,
0.04861321672797203,
0.23102964460849762,
0.05146605148911476,
0.03345850482583046,
0.038037657737731934,
0.27831006050109863,
-0.35260239243507385,
-0.16484211385250092,
0.30437400937080383,
0.31591224670410156,
0.11288744956254959,
-0.09143637120723724,
-0.00029415314202196896,
-0.008952467702329159,
0.12839144468307495,
0.10851965099573135,
0.011584615334868431,
0.25522980093955994,
0.1576925367116928,
-0.17671912908554077,
0.16855672001838684,
0.015104000456631184,
0.08658383786678314,
-0.1782761663198471,
0.05201711878180504,
0.07908303290605545,
-0.48968276381492615,
-0.22974041104316711,
0.13811567425727844,
0.13419422507286072,
-0.3974669575691223,
0.1492789387702942,
-0.21289853751659393,
-0.15419964492321014,
-0.10157717019319534,
0.16216355562210083,
-0.25034502148628235,
-0.11660230159759521,
0.5130330324172974,
-0.10097351670265198,
0.14716783165931702,
0.4816362261772156,
0.282260000705719,
0.16620203852653503,
-0.2588663399219513,
-0.23443223536014557,
0.5016034841537476,
-0.32583650946617126,
0.3467353880405426,
0.03050239011645317,
-0.1629420667886734,
0.39517974853515625,
0.3672280013561249,
-0.09520603716373444,
0.07708568125963211,
-0.10818910598754883,
-0.2564675807952881,
-0.23752211034297943,
0.15672321617603302,
0.09472451359033585,
0.1982932686805725,
0.054340213537216187,
-0.32853689789772034,
-0.12787629663944244,
-0.4098908007144928,
-0.385435551404953,
0.22088222205638885,
-0.06280700862407684,
-0.02865637093782425,
-0.01899196021258831,
-0.07960180938243866,
-0.3714176118373871,
-0.08502375334501266,
0.1338089555501938,
0.006857218686491251,
-0.10747700929641724,
-0.24945279955863953,
-0.011256176978349686,
0.11439111083745956,
-0.13602347671985626,
-0.11693377047777176,
0.14652913808822632,
0.004608605522662401,
-0.07844768464565277,
-0.21462644636631012,
0.27359461784362793,
0.041528213769197464,
0.0545399971306324,
0.0892954021692276,
-0.194133922457695,
0.0027048150077462196,
-0.03417610004544258,
0.28222861886024475,
-0.11379552632570267,
-0.16988825798034668,
-0.12468807399272919,
0.13487260043621063,
0.0783807784318924,
0.0013234990183264017,
0.28941839933395386,
0.13389843702316284,
-0.16323158144950867,
0.008473509922623634,
0.23661865293979645,
-0.314093679189682,
0.23476354777812958,
0.2835381031036377,
0.23949377238750458,
0.18425366282463074,
0.0050880806520581245,
-0.06578951328992844,
0.04455961659550667,
0.30157381296157837,
-0.4180750846862793,
-0.1803099662065506,
0.3167610764503479,
-0.06761904805898666,
0.18716605007648468,
0.27124860882759094,
0.38998186588287354,
-0.4173649251461029,
0.16507281363010406,
0.1375398337841034,
0.30574992299079895,
0.15337993204593658,
0.1381792277097702,
0.4883961081504822,
-0.15979236364364624,
0.06998351216316223,
0.07044725865125656,
0.24214695394039154,
-0.06841904670000076,
0.45283985137939453,
0.37408557534217834,
0.31739285588264465,
0.13889701664447784,
0.39698871970176697,
-0.21519187092781067,
-0.639504075050354,
0.2955796718597412,
0.23369139432907104,
0.024011751636862755,
0.15951301157474518,
-0.1707068830728531,
-0.020403051748871803,
-0.17655351758003235,
0.15089315176010132,
-0.4425516128540039,
0.0015908152563497424,
-0.17978717386722565,
-0.22133056819438934,
-0.15592721104621887,
-0.4336293935775757,
-0.11306227743625641,
0.09136015176773071,
-0.2759050726890564,
0.07765745371580124,
-0.021529747173190117,
-0.4004427492618561,
-0.06990839540958405,
-0.5547415018081665,
0.055282942950725555,
-0.20532162487506866,
-0.1085018515586853,
-0.07714415341615677,
0.3918743133544922,
0.057778991758823395,
-0.2127685844898224,
0.4998070001602173,
0.038612231612205505,
0.23192714154720306,
0.16641303896903992,
0.07018745690584183,
-0.011101746000349522,
0.08800696581602097,
-0.1526355743408203,
-0.3997158706188202,
0.22026240825653076,
0.18318867683410645,
-0.013457669876515865,
0.11361219733953476,
0.15494252741336823,
-0.17934024333953857,
0.0210270956158638,
0.14717569947242737,
-0.06376486271619797,
-0.24014435708522797,
0.15284204483032227,
0.04643998667597771,
-0.05199996009469032,
0.056775808334350586,
-0.09210798889398575,
-0.1295505315065384,
-0.41544511914253235,
0.23909948766231537,
0.05113114416599274,
0.1322716325521469,
0.11068201810121536,
0.13549524545669556,
-0.35895147919654846,
0.21424660086631775,
0.12155631184577942,
-0.14738014340400696,
0.036792412400245667,
-0.25508156418800354,
-0.6162773370742798,
0.1635623425245285,
0.11713168025016785,
-0.010707570239901543,
-0.001107831601984799,
0.009844101034104824,
0.2945701479911804,
-0.2557985186576843,
0.08557131141424179,
0.005112828221172094,
0.24660998582839966,
0.11574837565422058,
-0.5743597149848938,
-0.08761513978242874,
-0.1596970111131668,
0.22328713536262512,
-0.11631260067224503,
-0.10972294211387634,
0.014390796422958374,
-0.037627171725034714,
0.09940508008003235,
0.016063297167420387,
-0.09784559905529022,
0.03411196172237396,
-0.10796869546175003,
0.3288993537425995,
0.10231190174818039,
0.40846535563468933,
0.04643836244940758,
0.06973594427108765,
-0.3073202967643738,
-0.18648721277713776,
0.17287983000278473,
0.26409676671028137,
-0.19167421758174896,
-0.06515748798847198,
0.03846460580825806,
0.38014334440231323,
0.014069896191358566,
-0.16397367417812347,
0.26196417212486267,
0.45842647552490234,
-0.4377624988555908,
0.06961212307214737,
-0.23491500318050385,
-0.07129518687725067,
0.3597223162651062,
0.27140527963638306,
0.08751396834850311,
0.08177251368761063,
-0.14360135793685913,
-0.15186822414398193,
0.4795733094215393,
-0.43358179926872253,
-0.3318155109882355,
-0.5617201924324036,
0.1815306842327118,
-0.04214772582054138,
-0.14996731281280518,
-0.01909264735877514,
0.034749485552310944,
0.3282114267349243,
-0.3589740991592407,
-0.02651716023683548,
0.31577011942863464,
-0.1879299283027649,
0.06185488775372505,
-0.04521683230996132,
0.08556433767080307,
0.28595009446144104,
0.057026952505111694,
-0.3530765175819397,
-0.10605968534946442
] |
https://github.com/huggingface/datasets/issues/3236
|
Loading of datasets changed in #3110 returns no examples
|
Hi, in 1.12.1 it uses the dataset scripts from that time, not the one on master.
It only uses the datasets from master if you installed `datasets` from source, or if the dataset isn't available in your local version (in this case it shows a warning and it loads from master).
|
## Describe the bug
Loading of datasets changed in https://github.com/huggingface/datasets/pull/3110 returns no examples:
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
})
```
## Steps to reproduce the bug
Load any of the datasets that were changed in https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper")
# The problem only started with the commit of #3110
load_dataset("qasper", revision="b6469baa22c174b3906c631802a7016fedea6780")
```
## Expected results
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
Which can be received when specifying revision of the commit before https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper", revision="acfe2abda1ca79f0ce5c1896aa83b4b78af76b7d")
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.2.dev0 (master)
- Python version: 3.8.10
- PyArrow version: 3.0.0
| 51 |
Loading of datasets changed in #3110 returns no examples
|
[
-0.09727028757333755,
0.34162530303001404,
-0.09711651504039764,
0.25706031918525696,
0.18149690330028534,
-0.18841047585010529,
0.5248988270759583,
0.3087003827095032,
0.23046886920928955,
0.07182158529758453,
-0.019607024267315865,
0.3447750210762024,
0.0642838329076767,
0.06272619217634201,
0.06287121027708054,
0.1376350373029709,
0.02427073009312153,
0.13156373798847198,
-0.3989175260066986,
-0.08366038650274277,
-0.17063213884830475,
0.38000190258026123,
-0.3165892958641052,
-0.058001432567834854,
-0.33932727575302124,
0.29711997509002686,
-0.11642701923847198,
0.4734252691268921,
-0.1995997279882431,
-0.2991870641708374,
0.4178197383880615,
0.2967577278614044,
0.44353002309799194,
0.29437822103500366,
-0.0001118480067816563,
0.16204772889614105,
0.309317946434021,
-0.06114984676241875,
-0.4835474193096161,
0.026973873376846313,
-0.22507429122924805,
-0.45415744185447693,
0.18450027704238892,
-0.24856366217136383,
-0.10197056084871292,
-0.3149421215057373,
-0.17763331532478333,
-0.07501622289419174,
0.34847745299339294,
0.25713467597961426,
0.22164443135261536,
0.10385532677173615,
-0.09053387492895126,
-0.5282890200614929,
0.34444281458854675,
-0.06857270747423172,
0.13608109951019287,
0.08688020706176758,
0.4566597640514374,
0.047426529228687286,
-0.0795346349477768,
0.008974921889603138,
-0.03314369171857834,
-0.02667890675365925,
-0.24036498367786407,
-0.04843739792704582,
-0.007763450033962727,
0.0265670008957386,
0.14836488664150238,
0.18567374348640442,
0.828813910484314,
0.040224432945251465,
-0.1891922652721405,
-0.14577554166316986,
-0.14543959498405457,
-0.2656192481517792,
0.13508793711662292,
-0.3048214912414551,
0.04119665175676346,
0.2261050045490265,
-0.1641673594713211,
0.05933133140206337,
-0.07026465982198715,
0.06705164909362793,
-0.32181307673454285,
0.1401013880968094,
-0.23014262318611145,
0.022486340254545212,
-0.2227959930896759,
0.04283810779452324,
0.3917543590068817,
0.04846625030040741,
0.0812288448214531,
-0.11644065380096436,
-0.1251261830329895,
0.036659564822912216,
0.4132406413555145,
0.007910660468041897,
-0.10069549828767776,
0.267147421836853,
0.5139239430427551,
0.511757493019104,
0.19446946680545807,
-0.10808371007442474,
0.08112074434757233,
0.22323763370513916,
0.18928800523281097,
-0.2864868640899658,
0.3529660999774933,
0.3061261773109436,
-0.20728525519371033,
-0.11301324516534805,
-0.3162243366241455,
-0.1412074714899063,
0.11971056461334229,
0.20996496081352234,
0.17501398921012878,
-0.37013480067253113,
-0.11705351620912552,
0.10412352532148361,
-0.10657349973917007,
-0.0910794734954834,
-0.006819129455834627,
0.314744234085083,
0.22844766080379486,
0.1251949816942215,
0.14429344236850739,
0.05077702924609184,
-0.21691085398197174,
-0.5742215514183044,
-0.33684536814689636,
-0.2037464678287506,
-0.40777158737182617,
0.032554857432842255,
0.38969942927360535,
0.41316714882850647,
0.2083001434803009,
0.01798073574900627,
-0.06346826255321503,
-0.11993652582168579,
0.2577691674232483,
0.26230180263519287,
0.3913090229034424,
0.1136624813079834,
-0.035342197865247726,
0.10483937710523605,
0.30300527811050415,
0.08288790285587311,
-0.04788205027580261,
0.18429698050022125,
-0.11683958023786545,
-0.4668154716491699,
-0.08174534142017365,
0.25150907039642334,
-0.3492949306964874,
0.008734544739127159,
0.2315167635679245,
0.30071404576301575,
-0.23072002828121185,
-0.36548474431037903,
-0.13410259783267975,
-0.1464417725801468,
-0.025409791618585587,
-0.06131760776042938,
0.24387529492378235,
0.5897389054298401,
-0.5453348755836487,
-0.077801913022995,
-0.1995145082473755,
0.05006886646151543,
0.2333182841539383,
-0.3790205717086792,
-0.30812719464302063,
0.07537975162267685,
-0.24352046847343445,
-0.03821980953216553,
0.44627755880355835,
-0.06302554160356522,
-0.31382837891578674,
0.023652607575058937,
-0.12217627465724945,
0.1869172900915146,
0.2856384515762329,
-0.07794803380966187,
0.10152807086706161,
-0.148285374045372,
-0.04918617382645607,
-0.135201558470726,
0.29649263620376587,
-0.07337428629398346,
-0.044183310121297836,
-0.012128531001508236,
0.10781245678663254,
0.043607331812381744,
0.009973877109587193,
0.39651167392730713,
0.13713040947914124,
0.018940208479762077,
0.19293464720249176,
-0.2077324539422989,
-0.014810865744948387,
0.37393566966056824,
0.2793177664279938,
0.038008593022823334,
0.16840760409832,
0.0064503587782382965,
-0.623814582824707,
0.2954273819923401,
0.027827100828289986,
0.0053639537654817104,
0.40941768884658813,
0.03529589995741844,
-0.3875856399536133,
-0.14993849396705627,
0.01746668480336666,
-0.3131874203681946,
0.17590443789958954,
0.3813210129737854,
0.17175118625164032,
-0.13049815595149994,
-0.11862510442733765,
0.3000887334346771,
-0.1737113893032074,
-0.06884478777647018,
-0.3093029260635376,
0.32375556230545044,
0.19099846482276917,
-0.3960338532924652,
-0.01723027601838112,
0.21087707579135895,
0.13636229932308197,
-0.3053993582725525,
-0.08731622993946075,
0.22073175013065338,
-0.03718393296003342,
-0.029566317796707153,
0.029325852170586586,
0.07313686609268188,
0.10836920142173767,
0.25007641315460205,
0.15327508747577667,
-0.06339238584041595,
0.06602539867162704,
0.2114717960357666,
-0.2386801838874817,
0.3168259561061859,
0.11514312028884888,
0.012849874794483185,
0.1940094381570816,
-0.26547232270240784,
0.3135959208011627,
-0.12355074286460876,
-0.1490519642829895,
-0.35909587144851685,
-0.12822507321834564,
0.04997439309954643,
0.030805930495262146,
0.2670418620109558,
-0.23138469457626343,
0.2322855293750763,
0.3105456233024597,
0.0742591992020607,
0.07649107277393341,
-0.11125079542398453,
-0.11912883818149567,
-0.3445451259613037,
0.34038612246513367,
0.10587829351425171,
0.3114326000213623,
0.3235367238521576,
0.1768924444913864,
-0.11673226952552795,
-0.04040532186627388,
-0.17052331566810608,
0.2082466334104538,
-0.13582396507263184,
-0.008392799645662308,
0.16802872717380524,
0.2558479905128479,
-0.10634630918502808,
-0.47539669275283813,
-0.032364990562200546,
0.2863807678222656,
0.05119984596967697,
-0.2574855089187622,
-0.14518117904663086,
-0.3503527045249939,
-0.22114986181259155,
-0.07504419982433319,
-0.1731756031513214,
0.2814302444458008,
-0.387009859085083,
0.04594927281141281,
0.21786026656627655,
-0.1202429011464119,
0.16657303273677826,
-0.0629144236445427,
0.37543097138404846,
-0.001097707194276154,
0.3353211283683777,
-0.30715012550354004,
-0.14008107781410217,
-0.4301212430000305,
0.09558417648077011,
-0.16930653154850006,
0.17020565271377563,
-0.03070298582315445,
-0.3143153190612793,
0.07525233179330826,
-0.38256561756134033,
-0.4188452363014221,
0.13820184767246246,
0.2945498824119568,
0.11413706839084625,
0.2306286245584488,
-0.011816597543656826,
0.02813706547021866,
-0.012435740791261196,
0.2302330583333969,
-0.297451376914978,
-0.17130891978740692,
0.12812811136245728,
-0.027100056409835815,
0.10170266777276993,
-0.1202021911740303,
-0.7662836909294128,
-0.05479046702384949,
-0.2863306999206543,
-0.1998625099658966,
0.27080652117729187,
-0.10144969820976257,
0.11210610717535019,
0.1802804321050644,
0.10271216183900833,
0.16290181875228882,
0.08249000459909439,
-0.2069161832332611,
-0.2851652204990387,
0.07225693762302399,
-0.29947030544281006,
-0.2219848334789276,
-0.11839523911476135,
-0.05405714735388756,
0.008530252613127232,
0.15892936289310455,
-0.164358988404274,
-0.36006930470466614,
-0.17283053696155548,
0.11842676252126694,
0.15595848858356476,
0.06566279381513596,
0.5145266652107239,
0.09742989391088486,
-0.2039918601512909,
-0.24561598896980286,
-0.3426271975040436,
0.19077153503894806,
0.1295401155948639,
-0.11859603226184845,
-0.2132856845855713,
0.24289244413375854,
-0.27874985337257385,
0.42248713970184326,
-0.08355449140071869,
-0.20566682517528534,
0.45002272725105286,
-0.1110968217253685,
0.38228219747543335,
-0.35944223403930664,
-0.02236168086528778,
-0.02297322452068329,
-0.13915778696537018,
0.04724422097206116,
0.35180631279945374,
-0.06896687299013138,
-0.214174285531044,
-0.030472610145807266,
0.35407477617263794,
-0.4563548266887665,
-0.2165452539920807,
-0.3153550624847412,
0.25482097268104553,
0.06095549464225769,
0.28919801115989685,
0.09401895850896835,
-0.4975683391094208,
0.03200555965304375,
0.09397780895233154,
-0.18879790604114532,
0.24549926817417145,
0.015279904007911682,
-0.4423534870147705,
0.32953840494155884,
-0.23450417816638947,
0.2399328351020813,
-0.192536860704422,
0.20745040476322174,
0.06620563566684723,
-0.5300363302230835,
0.04634935036301613,
0.06779944896697998,
0.5778389573097229,
-0.3050489127635956,
0.1927672028541565,
0.39864152669906616,
-0.4178936183452606,
-0.07079143077135086,
-0.326169490814209,
-0.359992653131485,
0.3435128331184387,
0.15782807767391205,
0.42231282591819763,
0.0013785415794700384,
-0.09131570905447006,
0.16590167582035065,
0.09633281081914902,
0.04048571735620499,
-0.14949005842208862,
-0.053423427045345306,
-0.08446349203586578,
-0.33655011653900146,
-0.2608490288257599,
-0.23210757970809937,
0.1225525438785553,
-0.5476756691932678,
-0.28917431831359863,
-0.05911494791507721,
-0.012201519683003426,
0.13847605884075165,
0.38994279503822327,
0.3020605146884918,
0.25577211380004883,
-0.003969124983996153,
0.15784867107868195,
0.4219144582748413,
0.09258107095956802,
0.4092697501182556,
-0.15716932713985443,
-0.288462370634079,
0.49389997124671936,
-0.036619726568460464,
-0.04496956989169121,
0.44182220101356506,
0.09856326133012772,
-0.2072177231311798,
-0.13589492440223694,
-0.005253997631371021,
-0.12572546303272247,
0.2366175651550293,
0.11602957546710968,
0.11547859758138657,
-0.22653451561927795,
-0.27745458483695984,
0.4466221332550049,
0.17520083487033844,
-0.31224992871284485,
0.247999370098114,
-0.088856041431427,
-0.27157333493232727,
0.09449362754821777,
0.038991838693618774,
0.47331345081329346,
-0.17220976948738098,
0.17836381494998932,
0.28499868512153625,
-0.025934137403964996,
0.43808048963546753,
-0.12034469842910767,
0.1839350163936615,
-0.4240437150001526,
-0.33179187774658203,
0.10492982715368271,
-0.06813255697488785,
0.1529407948255539,
0.34281420707702637,
-0.1286655217409134,
0.13626782596111298,
-0.18050940334796906,
0.5428348779678345,
0.0681825801730156,
-0.16029037535190582,
0.01860268972814083,
0.03936797007918358,
-0.14637531340122223,
0.16251416504383087,
0.33932551741600037,
0.11643126606941223,
-0.22575831413269043,
0.01110965944826603,
-0.1271807849407196,
0.04861321672797203,
0.23102964460849762,
0.05146605148911476,
0.03345850482583046,
0.038037657737731934,
0.27831006050109863,
-0.35260239243507385,
-0.16484211385250092,
0.30437400937080383,
0.31591224670410156,
0.11288744956254959,
-0.09143637120723724,
-0.00029415314202196896,
-0.008952467702329159,
0.12839144468307495,
0.10851965099573135,
0.011584615334868431,
0.25522980093955994,
0.1576925367116928,
-0.17671912908554077,
0.16855672001838684,
0.015104000456631184,
0.08658383786678314,
-0.1782761663198471,
0.05201711878180504,
0.07908303290605545,
-0.48968276381492615,
-0.22974041104316711,
0.13811567425727844,
0.13419422507286072,
-0.3974669575691223,
0.1492789387702942,
-0.21289853751659393,
-0.15419964492321014,
-0.10157717019319534,
0.16216355562210083,
-0.25034502148628235,
-0.11660230159759521,
0.5130330324172974,
-0.10097351670265198,
0.14716783165931702,
0.4816362261772156,
0.282260000705719,
0.16620203852653503,
-0.2588663399219513,
-0.23443223536014557,
0.5016034841537476,
-0.32583650946617126,
0.3467353880405426,
0.03050239011645317,
-0.1629420667886734,
0.39517974853515625,
0.3672280013561249,
-0.09520603716373444,
0.07708568125963211,
-0.10818910598754883,
-0.2564675807952881,
-0.23752211034297943,
0.15672321617603302,
0.09472451359033585,
0.1982932686805725,
0.054340213537216187,
-0.32853689789772034,
-0.12787629663944244,
-0.4098908007144928,
-0.385435551404953,
0.22088222205638885,
-0.06280700862407684,
-0.02865637093782425,
-0.01899196021258831,
-0.07960180938243866,
-0.3714176118373871,
-0.08502375334501266,
0.1338089555501938,
0.006857218686491251,
-0.10747700929641724,
-0.24945279955863953,
-0.011256176978349686,
0.11439111083745956,
-0.13602347671985626,
-0.11693377047777176,
0.14652913808822632,
0.004608605522662401,
-0.07844768464565277,
-0.21462644636631012,
0.27359461784362793,
0.041528213769197464,
0.0545399971306324,
0.0892954021692276,
-0.194133922457695,
0.0027048150077462196,
-0.03417610004544258,
0.28222861886024475,
-0.11379552632570267,
-0.16988825798034668,
-0.12468807399272919,
0.13487260043621063,
0.0783807784318924,
0.0013234990183264017,
0.28941839933395386,
0.13389843702316284,
-0.16323158144950867,
0.008473509922623634,
0.23661865293979645,
-0.314093679189682,
0.23476354777812958,
0.2835381031036377,
0.23949377238750458,
0.18425366282463074,
0.0050880806520581245,
-0.06578951328992844,
0.04455961659550667,
0.30157381296157837,
-0.4180750846862793,
-0.1803099662065506,
0.3167610764503479,
-0.06761904805898666,
0.18716605007648468,
0.27124860882759094,
0.38998186588287354,
-0.4173649251461029,
0.16507281363010406,
0.1375398337841034,
0.30574992299079895,
0.15337993204593658,
0.1381792277097702,
0.4883961081504822,
-0.15979236364364624,
0.06998351216316223,
0.07044725865125656,
0.24214695394039154,
-0.06841904670000076,
0.45283985137939453,
0.37408557534217834,
0.31739285588264465,
0.13889701664447784,
0.39698871970176697,
-0.21519187092781067,
-0.639504075050354,
0.2955796718597412,
0.23369139432907104,
0.024011751636862755,
0.15951301157474518,
-0.1707068830728531,
-0.020403051748871803,
-0.17655351758003235,
0.15089315176010132,
-0.4425516128540039,
0.0015908152563497424,
-0.17978717386722565,
-0.22133056819438934,
-0.15592721104621887,
-0.4336293935775757,
-0.11306227743625641,
0.09136015176773071,
-0.2759050726890564,
0.07765745371580124,
-0.021529747173190117,
-0.4004427492618561,
-0.06990839540958405,
-0.5547415018081665,
0.055282942950725555,
-0.20532162487506866,
-0.1085018515586853,
-0.07714415341615677,
0.3918743133544922,
0.057778991758823395,
-0.2127685844898224,
0.4998070001602173,
0.038612231612205505,
0.23192714154720306,
0.16641303896903992,
0.07018745690584183,
-0.011101746000349522,
0.08800696581602097,
-0.1526355743408203,
-0.3997158706188202,
0.22026240825653076,
0.18318867683410645,
-0.013457669876515865,
0.11361219733953476,
0.15494252741336823,
-0.17934024333953857,
0.0210270956158638,
0.14717569947242737,
-0.06376486271619797,
-0.24014435708522797,
0.15284204483032227,
0.04643998667597771,
-0.05199996009469032,
0.056775808334350586,
-0.09210798889398575,
-0.1295505315065384,
-0.41544511914253235,
0.23909948766231537,
0.05113114416599274,
0.1322716325521469,
0.11068201810121536,
0.13549524545669556,
-0.35895147919654846,
0.21424660086631775,
0.12155631184577942,
-0.14738014340400696,
0.036792412400245667,
-0.25508156418800354,
-0.6162773370742798,
0.1635623425245285,
0.11713168025016785,
-0.010707570239901543,
-0.001107831601984799,
0.009844101034104824,
0.2945701479911804,
-0.2557985186576843,
0.08557131141424179,
0.005112828221172094,
0.24660998582839966,
0.11574837565422058,
-0.5743597149848938,
-0.08761513978242874,
-0.1596970111131668,
0.22328713536262512,
-0.11631260067224503,
-0.10972294211387634,
0.014390796422958374,
-0.037627171725034714,
0.09940508008003235,
0.016063297167420387,
-0.09784559905529022,
0.03411196172237396,
-0.10796869546175003,
0.3288993537425995,
0.10231190174818039,
0.40846535563468933,
0.04643836244940758,
0.06973594427108765,
-0.3073202967643738,
-0.18648721277713776,
0.17287983000278473,
0.26409676671028137,
-0.19167421758174896,
-0.06515748798847198,
0.03846460580825806,
0.38014334440231323,
0.014069896191358566,
-0.16397367417812347,
0.26196417212486267,
0.45842647552490234,
-0.4377624988555908,
0.06961212307214737,
-0.23491500318050385,
-0.07129518687725067,
0.3597223162651062,
0.27140527963638306,
0.08751396834850311,
0.08177251368761063,
-0.14360135793685913,
-0.15186822414398193,
0.4795733094215393,
-0.43358179926872253,
-0.3318155109882355,
-0.5617201924324036,
0.1815306842327118,
-0.04214772582054138,
-0.14996731281280518,
-0.01909264735877514,
0.034749485552310944,
0.3282114267349243,
-0.3589740991592407,
-0.02651716023683548,
0.31577011942863464,
-0.1879299283027649,
0.06185488775372505,
-0.04521683230996132,
0.08556433767080307,
0.28595009446144104,
0.057026952505111694,
-0.3530765175819397,
-0.10605968534946442
] |
https://github.com/huggingface/datasets/issues/3236
|
Loading of datasets changed in #3110 returns no examples
|
OK, I understand the issue a bit better now.
I see I wasn't on 1.12.1, but on 1.12.1.dev0 and since it is a dev version it uses master.
So users that use an old dev version must specify revision or else they'll encounter this problem.
BTW, when I opened the issue I installed the latest master version with
```
pip install git+git://github.com/huggingface/datasets@master#egg=datasets
```
and also used `download_mode="force_redownload"`, and it still returned 0 examples.
Now I deleted all of the cache and ran the code again, and it worked.
I'm not sure what exactly happened here, but looks like it was due to a mix of an unofficial version and its cache.
Thanks again!
|
## Describe the bug
Loading of datasets changed in https://github.com/huggingface/datasets/pull/3110 returns no examples:
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 0
})
})
```
## Steps to reproduce the bug
Load any of the datasets that were changed in https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper")
# The problem only started with the commit of #3110
load_dataset("qasper", revision="b6469baa22c174b3906c631802a7016fedea6780")
```
## Expected results
```python
DatasetDict({
train: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 888
})
validation: Dataset({
features: ['id', 'title', 'abstract', 'full_text', 'qas'],
num_rows: 281
})
})
```
Which can be received when specifying revision of the commit before https://github.com/huggingface/datasets/pull/3110:
```python
from datasets import load_dataset
load_dataset("qasper", revision="acfe2abda1ca79f0ce5c1896aa83b4b78af76b7d")
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.2.dev0 (master)
- Python version: 3.8.10
- PyArrow version: 3.0.0
| 113 |
Loading of datasets changed in #3110 returns no examples
|
[
-0.09727028757333755,
0.34162530303001404,
-0.09711651504039764,
0.25706031918525696,
0.18149690330028534,
-0.18841047585010529,
0.5248988270759583,
0.3087003827095032,
0.23046886920928955,
0.07182158529758453,
-0.019607024267315865,
0.3447750210762024,
0.0642838329076767,
0.06272619217634201,
0.06287121027708054,
0.1376350373029709,
0.02427073009312153,
0.13156373798847198,
-0.3989175260066986,
-0.08366038650274277,
-0.17063213884830475,
0.38000190258026123,
-0.3165892958641052,
-0.058001432567834854,
-0.33932727575302124,
0.29711997509002686,
-0.11642701923847198,
0.4734252691268921,
-0.1995997279882431,
-0.2991870641708374,
0.4178197383880615,
0.2967577278614044,
0.44353002309799194,
0.29437822103500366,
-0.0001118480067816563,
0.16204772889614105,
0.309317946434021,
-0.06114984676241875,
-0.4835474193096161,
0.026973873376846313,
-0.22507429122924805,
-0.45415744185447693,
0.18450027704238892,
-0.24856366217136383,
-0.10197056084871292,
-0.3149421215057373,
-0.17763331532478333,
-0.07501622289419174,
0.34847745299339294,
0.25713467597961426,
0.22164443135261536,
0.10385532677173615,
-0.09053387492895126,
-0.5282890200614929,
0.34444281458854675,
-0.06857270747423172,
0.13608109951019287,
0.08688020706176758,
0.4566597640514374,
0.047426529228687286,
-0.0795346349477768,
0.008974921889603138,
-0.03314369171857834,
-0.02667890675365925,
-0.24036498367786407,
-0.04843739792704582,
-0.007763450033962727,
0.0265670008957386,
0.14836488664150238,
0.18567374348640442,
0.828813910484314,
0.040224432945251465,
-0.1891922652721405,
-0.14577554166316986,
-0.14543959498405457,
-0.2656192481517792,
0.13508793711662292,
-0.3048214912414551,
0.04119665175676346,
0.2261050045490265,
-0.1641673594713211,
0.05933133140206337,
-0.07026465982198715,
0.06705164909362793,
-0.32181307673454285,
0.1401013880968094,
-0.23014262318611145,
0.022486340254545212,
-0.2227959930896759,
0.04283810779452324,
0.3917543590068817,
0.04846625030040741,
0.0812288448214531,
-0.11644065380096436,
-0.1251261830329895,
0.036659564822912216,
0.4132406413555145,
0.007910660468041897,
-0.10069549828767776,
0.267147421836853,
0.5139239430427551,
0.511757493019104,
0.19446946680545807,
-0.10808371007442474,
0.08112074434757233,
0.22323763370513916,
0.18928800523281097,
-0.2864868640899658,
0.3529660999774933,
0.3061261773109436,
-0.20728525519371033,
-0.11301324516534805,
-0.3162243366241455,
-0.1412074714899063,
0.11971056461334229,
0.20996496081352234,
0.17501398921012878,
-0.37013480067253113,
-0.11705351620912552,
0.10412352532148361,
-0.10657349973917007,
-0.0910794734954834,
-0.006819129455834627,
0.314744234085083,
0.22844766080379486,
0.1251949816942215,
0.14429344236850739,
0.05077702924609184,
-0.21691085398197174,
-0.5742215514183044,
-0.33684536814689636,
-0.2037464678287506,
-0.40777158737182617,
0.032554857432842255,
0.38969942927360535,
0.41316714882850647,
0.2083001434803009,
0.01798073574900627,
-0.06346826255321503,
-0.11993652582168579,
0.2577691674232483,
0.26230180263519287,
0.3913090229034424,
0.1136624813079834,
-0.035342197865247726,
0.10483937710523605,
0.30300527811050415,
0.08288790285587311,
-0.04788205027580261,
0.18429698050022125,
-0.11683958023786545,
-0.4668154716491699,
-0.08174534142017365,
0.25150907039642334,
-0.3492949306964874,
0.008734544739127159,
0.2315167635679245,
0.30071404576301575,
-0.23072002828121185,
-0.36548474431037903,
-0.13410259783267975,
-0.1464417725801468,
-0.025409791618585587,
-0.06131760776042938,
0.24387529492378235,
0.5897389054298401,
-0.5453348755836487,
-0.077801913022995,
-0.1995145082473755,
0.05006886646151543,
0.2333182841539383,
-0.3790205717086792,
-0.30812719464302063,
0.07537975162267685,
-0.24352046847343445,
-0.03821980953216553,
0.44627755880355835,
-0.06302554160356522,
-0.31382837891578674,
0.023652607575058937,
-0.12217627465724945,
0.1869172900915146,
0.2856384515762329,
-0.07794803380966187,
0.10152807086706161,
-0.148285374045372,
-0.04918617382645607,
-0.135201558470726,
0.29649263620376587,
-0.07337428629398346,
-0.044183310121297836,
-0.012128531001508236,
0.10781245678663254,
0.043607331812381744,
0.009973877109587193,
0.39651167392730713,
0.13713040947914124,
0.018940208479762077,
0.19293464720249176,
-0.2077324539422989,
-0.014810865744948387,
0.37393566966056824,
0.2793177664279938,
0.038008593022823334,
0.16840760409832,
0.0064503587782382965,
-0.623814582824707,
0.2954273819923401,
0.027827100828289986,
0.0053639537654817104,
0.40941768884658813,
0.03529589995741844,
-0.3875856399536133,
-0.14993849396705627,
0.01746668480336666,
-0.3131874203681946,
0.17590443789958954,
0.3813210129737854,
0.17175118625164032,
-0.13049815595149994,
-0.11862510442733765,
0.3000887334346771,
-0.1737113893032074,
-0.06884478777647018,
-0.3093029260635376,
0.32375556230545044,
0.19099846482276917,
-0.3960338532924652,
-0.01723027601838112,
0.21087707579135895,
0.13636229932308197,
-0.3053993582725525,
-0.08731622993946075,
0.22073175013065338,
-0.03718393296003342,
-0.029566317796707153,
0.029325852170586586,
0.07313686609268188,
0.10836920142173767,
0.25007641315460205,
0.15327508747577667,
-0.06339238584041595,
0.06602539867162704,
0.2114717960357666,
-0.2386801838874817,
0.3168259561061859,
0.11514312028884888,
0.012849874794483185,
0.1940094381570816,
-0.26547232270240784,
0.3135959208011627,
-0.12355074286460876,
-0.1490519642829895,
-0.35909587144851685,
-0.12822507321834564,
0.04997439309954643,
0.030805930495262146,
0.2670418620109558,
-0.23138469457626343,
0.2322855293750763,
0.3105456233024597,
0.0742591992020607,
0.07649107277393341,
-0.11125079542398453,
-0.11912883818149567,
-0.3445451259613037,
0.34038612246513367,
0.10587829351425171,
0.3114326000213623,
0.3235367238521576,
0.1768924444913864,
-0.11673226952552795,
-0.04040532186627388,
-0.17052331566810608,
0.2082466334104538,
-0.13582396507263184,
-0.008392799645662308,
0.16802872717380524,
0.2558479905128479,
-0.10634630918502808,
-0.47539669275283813,
-0.032364990562200546,
0.2863807678222656,
0.05119984596967697,
-0.2574855089187622,
-0.14518117904663086,
-0.3503527045249939,
-0.22114986181259155,
-0.07504419982433319,
-0.1731756031513214,
0.2814302444458008,
-0.387009859085083,
0.04594927281141281,
0.21786026656627655,
-0.1202429011464119,
0.16657303273677826,
-0.0629144236445427,
0.37543097138404846,
-0.001097707194276154,
0.3353211283683777,
-0.30715012550354004,
-0.14008107781410217,
-0.4301212430000305,
0.09558417648077011,
-0.16930653154850006,
0.17020565271377563,
-0.03070298582315445,
-0.3143153190612793,
0.07525233179330826,
-0.38256561756134033,
-0.4188452363014221,
0.13820184767246246,
0.2945498824119568,
0.11413706839084625,
0.2306286245584488,
-0.011816597543656826,
0.02813706547021866,
-0.012435740791261196,
0.2302330583333969,
-0.297451376914978,
-0.17130891978740692,
0.12812811136245728,
-0.027100056409835815,
0.10170266777276993,
-0.1202021911740303,
-0.7662836909294128,
-0.05479046702384949,
-0.2863306999206543,
-0.1998625099658966,
0.27080652117729187,
-0.10144969820976257,
0.11210610717535019,
0.1802804321050644,
0.10271216183900833,
0.16290181875228882,
0.08249000459909439,
-0.2069161832332611,
-0.2851652204990387,
0.07225693762302399,
-0.29947030544281006,
-0.2219848334789276,
-0.11839523911476135,
-0.05405714735388756,
0.008530252613127232,
0.15892936289310455,
-0.164358988404274,
-0.36006930470466614,
-0.17283053696155548,
0.11842676252126694,
0.15595848858356476,
0.06566279381513596,
0.5145266652107239,
0.09742989391088486,
-0.2039918601512909,
-0.24561598896980286,
-0.3426271975040436,
0.19077153503894806,
0.1295401155948639,
-0.11859603226184845,
-0.2132856845855713,
0.24289244413375854,
-0.27874985337257385,
0.42248713970184326,
-0.08355449140071869,
-0.20566682517528534,
0.45002272725105286,
-0.1110968217253685,
0.38228219747543335,
-0.35944223403930664,
-0.02236168086528778,
-0.02297322452068329,
-0.13915778696537018,
0.04724422097206116,
0.35180631279945374,
-0.06896687299013138,
-0.214174285531044,
-0.030472610145807266,
0.35407477617263794,
-0.4563548266887665,
-0.2165452539920807,
-0.3153550624847412,
0.25482097268104553,
0.06095549464225769,
0.28919801115989685,
0.09401895850896835,
-0.4975683391094208,
0.03200555965304375,
0.09397780895233154,
-0.18879790604114532,
0.24549926817417145,
0.015279904007911682,
-0.4423534870147705,
0.32953840494155884,
-0.23450417816638947,
0.2399328351020813,
-0.192536860704422,
0.20745040476322174,
0.06620563566684723,
-0.5300363302230835,
0.04634935036301613,
0.06779944896697998,
0.5778389573097229,
-0.3050489127635956,
0.1927672028541565,
0.39864152669906616,
-0.4178936183452606,
-0.07079143077135086,
-0.326169490814209,
-0.359992653131485,
0.3435128331184387,
0.15782807767391205,
0.42231282591819763,
0.0013785415794700384,
-0.09131570905447006,
0.16590167582035065,
0.09633281081914902,
0.04048571735620499,
-0.14949005842208862,
-0.053423427045345306,
-0.08446349203586578,
-0.33655011653900146,
-0.2608490288257599,
-0.23210757970809937,
0.1225525438785553,
-0.5476756691932678,
-0.28917431831359863,
-0.05911494791507721,
-0.012201519683003426,
0.13847605884075165,
0.38994279503822327,
0.3020605146884918,
0.25577211380004883,
-0.003969124983996153,
0.15784867107868195,
0.4219144582748413,
0.09258107095956802,
0.4092697501182556,
-0.15716932713985443,
-0.288462370634079,
0.49389997124671936,
-0.036619726568460464,
-0.04496956989169121,
0.44182220101356506,
0.09856326133012772,
-0.2072177231311798,
-0.13589492440223694,
-0.005253997631371021,
-0.12572546303272247,
0.2366175651550293,
0.11602957546710968,
0.11547859758138657,
-0.22653451561927795,
-0.27745458483695984,
0.4466221332550049,
0.17520083487033844,
-0.31224992871284485,
0.247999370098114,
-0.088856041431427,
-0.27157333493232727,
0.09449362754821777,
0.038991838693618774,
0.47331345081329346,
-0.17220976948738098,
0.17836381494998932,
0.28499868512153625,
-0.025934137403964996,
0.43808048963546753,
-0.12034469842910767,
0.1839350163936615,
-0.4240437150001526,
-0.33179187774658203,
0.10492982715368271,
-0.06813255697488785,
0.1529407948255539,
0.34281420707702637,
-0.1286655217409134,
0.13626782596111298,
-0.18050940334796906,
0.5428348779678345,
0.0681825801730156,
-0.16029037535190582,
0.01860268972814083,
0.03936797007918358,
-0.14637531340122223,
0.16251416504383087,
0.33932551741600037,
0.11643126606941223,
-0.22575831413269043,
0.01110965944826603,
-0.1271807849407196,
0.04861321672797203,
0.23102964460849762,
0.05146605148911476,
0.03345850482583046,
0.038037657737731934,
0.27831006050109863,
-0.35260239243507385,
-0.16484211385250092,
0.30437400937080383,
0.31591224670410156,
0.11288744956254959,
-0.09143637120723724,
-0.00029415314202196896,
-0.008952467702329159,
0.12839144468307495,
0.10851965099573135,
0.011584615334868431,
0.25522980093955994,
0.1576925367116928,
-0.17671912908554077,
0.16855672001838684,
0.015104000456631184,
0.08658383786678314,
-0.1782761663198471,
0.05201711878180504,
0.07908303290605545,
-0.48968276381492615,
-0.22974041104316711,
0.13811567425727844,
0.13419422507286072,
-0.3974669575691223,
0.1492789387702942,
-0.21289853751659393,
-0.15419964492321014,
-0.10157717019319534,
0.16216355562210083,
-0.25034502148628235,
-0.11660230159759521,
0.5130330324172974,
-0.10097351670265198,
0.14716783165931702,
0.4816362261772156,
0.282260000705719,
0.16620203852653503,
-0.2588663399219513,
-0.23443223536014557,
0.5016034841537476,
-0.32583650946617126,
0.3467353880405426,
0.03050239011645317,
-0.1629420667886734,
0.39517974853515625,
0.3672280013561249,
-0.09520603716373444,
0.07708568125963211,
-0.10818910598754883,
-0.2564675807952881,
-0.23752211034297943,
0.15672321617603302,
0.09472451359033585,
0.1982932686805725,
0.054340213537216187,
-0.32853689789772034,
-0.12787629663944244,
-0.4098908007144928,
-0.385435551404953,
0.22088222205638885,
-0.06280700862407684,
-0.02865637093782425,
-0.01899196021258831,
-0.07960180938243866,
-0.3714176118373871,
-0.08502375334501266,
0.1338089555501938,
0.006857218686491251,
-0.10747700929641724,
-0.24945279955863953,
-0.011256176978349686,
0.11439111083745956,
-0.13602347671985626,
-0.11693377047777176,
0.14652913808822632,
0.004608605522662401,
-0.07844768464565277,
-0.21462644636631012,
0.27359461784362793,
0.041528213769197464,
0.0545399971306324,
0.0892954021692276,
-0.194133922457695,
0.0027048150077462196,
-0.03417610004544258,
0.28222861886024475,
-0.11379552632570267,
-0.16988825798034668,
-0.12468807399272919,
0.13487260043621063,
0.0783807784318924,
0.0013234990183264017,
0.28941839933395386,
0.13389843702316284,
-0.16323158144950867,
0.008473509922623634,
0.23661865293979645,
-0.314093679189682,
0.23476354777812958,
0.2835381031036377,
0.23949377238750458,
0.18425366282463074,
0.0050880806520581245,
-0.06578951328992844,
0.04455961659550667,
0.30157381296157837,
-0.4180750846862793,
-0.1803099662065506,
0.3167610764503479,
-0.06761904805898666,
0.18716605007648468,
0.27124860882759094,
0.38998186588287354,
-0.4173649251461029,
0.16507281363010406,
0.1375398337841034,
0.30574992299079895,
0.15337993204593658,
0.1381792277097702,
0.4883961081504822,
-0.15979236364364624,
0.06998351216316223,
0.07044725865125656,
0.24214695394039154,
-0.06841904670000076,
0.45283985137939453,
0.37408557534217834,
0.31739285588264465,
0.13889701664447784,
0.39698871970176697,
-0.21519187092781067,
-0.639504075050354,
0.2955796718597412,
0.23369139432907104,
0.024011751636862755,
0.15951301157474518,
-0.1707068830728531,
-0.020403051748871803,
-0.17655351758003235,
0.15089315176010132,
-0.4425516128540039,
0.0015908152563497424,
-0.17978717386722565,
-0.22133056819438934,
-0.15592721104621887,
-0.4336293935775757,
-0.11306227743625641,
0.09136015176773071,
-0.2759050726890564,
0.07765745371580124,
-0.021529747173190117,
-0.4004427492618561,
-0.06990839540958405,
-0.5547415018081665,
0.055282942950725555,
-0.20532162487506866,
-0.1085018515586853,
-0.07714415341615677,
0.3918743133544922,
0.057778991758823395,
-0.2127685844898224,
0.4998070001602173,
0.038612231612205505,
0.23192714154720306,
0.16641303896903992,
0.07018745690584183,
-0.011101746000349522,
0.08800696581602097,
-0.1526355743408203,
-0.3997158706188202,
0.22026240825653076,
0.18318867683410645,
-0.013457669876515865,
0.11361219733953476,
0.15494252741336823,
-0.17934024333953857,
0.0210270956158638,
0.14717569947242737,
-0.06376486271619797,
-0.24014435708522797,
0.15284204483032227,
0.04643998667597771,
-0.05199996009469032,
0.056775808334350586,
-0.09210798889398575,
-0.1295505315065384,
-0.41544511914253235,
0.23909948766231537,
0.05113114416599274,
0.1322716325521469,
0.11068201810121536,
0.13549524545669556,
-0.35895147919654846,
0.21424660086631775,
0.12155631184577942,
-0.14738014340400696,
0.036792412400245667,
-0.25508156418800354,
-0.6162773370742798,
0.1635623425245285,
0.11713168025016785,
-0.010707570239901543,
-0.001107831601984799,
0.009844101034104824,
0.2945701479911804,
-0.2557985186576843,
0.08557131141424179,
0.005112828221172094,
0.24660998582839966,
0.11574837565422058,
-0.5743597149848938,
-0.08761513978242874,
-0.1596970111131668,
0.22328713536262512,
-0.11631260067224503,
-0.10972294211387634,
0.014390796422958374,
-0.037627171725034714,
0.09940508008003235,
0.016063297167420387,
-0.09784559905529022,
0.03411196172237396,
-0.10796869546175003,
0.3288993537425995,
0.10231190174818039,
0.40846535563468933,
0.04643836244940758,
0.06973594427108765,
-0.3073202967643738,
-0.18648721277713776,
0.17287983000278473,
0.26409676671028137,
-0.19167421758174896,
-0.06515748798847198,
0.03846460580825806,
0.38014334440231323,
0.014069896191358566,
-0.16397367417812347,
0.26196417212486267,
0.45842647552490234,
-0.4377624988555908,
0.06961212307214737,
-0.23491500318050385,
-0.07129518687725067,
0.3597223162651062,
0.27140527963638306,
0.08751396834850311,
0.08177251368761063,
-0.14360135793685913,
-0.15186822414398193,
0.4795733094215393,
-0.43358179926872253,
-0.3318155109882355,
-0.5617201924324036,
0.1815306842327118,
-0.04214772582054138,
-0.14996731281280518,
-0.01909264735877514,
0.034749485552310944,
0.3282114267349243,
-0.3589740991592407,
-0.02651716023683548,
0.31577011942863464,
-0.1879299283027649,
0.06185488775372505,
-0.04521683230996132,
0.08556433767080307,
0.28595009446144104,
0.057026952505111694,
-0.3530765175819397,
-0.10605968534946442
] |
https://github.com/huggingface/datasets/issues/3232
|
The Xsum datasets seems not able to download.
|
> Hi ! On my side the URL is working fine, could you try again ?
I try it again and cannot download the file (might because of my location). Could you please provide another download link(such as google drive)? :>
|
## Describe the bug
The download Link of the Xsum dataset provided in the repository is [Link](http://bollin.inf.ed.ac.uk/public/direct/XSUM-EMNLP18-Summary-Data-Original.tar.gz). It seems not able to download.
## Steps to reproduce the bug
```python
load_dataset('xsum')
```
## Actual results
``` python
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach http://bollin.inf.ed.ac.uk/public/direct/XSUM-EMNLP18-Summary-Data-Original.tar.gz
```
| 41 |
The Xsum datasets seems not able to download.
|
[
-0.525749921798706,
-0.2230057269334793,
-0.26274535059928894,
0.1574327051639557,
0.29367944598197937,
0.11491893231868744,
-0.05903983116149902,
0.21556800603866577,
0.22213438153266907,
0.3314623534679413,
-0.3971518576145172,
0.0788753405213356,
0.09712206572294235,
0.30476126074790955,
0.08084429800510406,
0.12240581959486008,
-0.027120279148221016,
0.1258808970451355,
-0.43621277809143066,
-0.2509799003601074,
0.016396068036556244,
0.10553774237632751,
-0.07544644176959991,
-0.17783454060554504,
-0.2761306166648865,
-0.08192742615938187,
-0.0022251259069889784,
0.09585030376911163,
-0.3681545555591583,
-0.14335988461971283,
0.2602016031742096,
0.3164702355861664,
0.004292714409530163,
0.27239739894866943,
-0.00009855785174295306,
-0.01302430685609579,
0.16798868775367737,
-0.0036695885937660933,
-0.12047132849693298,
0.14743570983409882,
-0.2904537320137024,
0.20664983987808228,
-0.13929131627082825,
-0.20835065841674805,
0.03854221850633621,
0.06163254752755165,
0.1232784241437912,
-0.24395588040351868,
0.06565802544355392,
0.1231243833899498,
0.36283737421035767,
0.36973321437835693,
0.11577682197093964,
-0.4157242774963379,
0.09506973624229431,
-0.31120648980140686,
-0.08354567736387253,
0.2048390507698059,
0.47241756319999695,
0.2940998673439026,
0.16403894126415253,
0.1367150843143463,
-0.06642188131809235,
0.023488689213991165,
-0.16283279657363892,
-0.15808437764644623,
0.504119336605072,
-0.21099348366260529,
0.1903279572725296,
0.36342787742614746,
0.775042712688446,
0.09228561073541641,
-0.18149691820144653,
0.17623285949230194,
0.07097813487052917,
-0.0941535085439682,
0.2687393128871918,
0.21318091452121735,
-0.012438377365469933,
0.07125444710254669,
-0.1366974413394928,
-0.047510113567113876,
-0.09071981906890869,
0.12385383993387222,
-0.12240195274353027,
0.02880355902016163,
-0.1891688108444214,
-0.11252211034297943,
-0.020043157041072845,
-0.05768253654241562,
0.2711358964443207,
0.18051765859127045,
-0.013010525144636631,
-0.05833195149898529,
-0.1996428668498993,
0.019647331908345222,
-0.08267121016979218,
0.06873165816068649,
0.179373636841774,
-0.007105800788849592,
0.12303068488836288,
0.13994506001472473,
-0.3068573474884033,
0.011801128275692463,
0.02698824740946293,
0.0005728506366722286,
0.30043458938598633,
-0.41030603647232056,
0.2936764061450958,
0.014634892344474792,
0.12868934869766235,
0.06035132333636284,
-0.2914280295372009,
0.04164848104119301,
-0.3541231155395508,
0.07703100144863129,
-0.1343158632516861,
-0.3974483609199524,
-0.3900683522224426,
-0.03147604316473007,
0.3420722484588623,
0.010085145942866802,
-0.023402487859129906,
0.12209776043891907,
-0.0345504991710186,
0.10262789577245712,
-0.1725350171327591,
0.17829838395118713,
-0.27468907833099365,
-0.36003124713897705,
-0.39849573373794556,
0.2021998018026352,
-0.018562082201242447,
-0.12679116427898407,
0.197335347533226,
-0.18921473622322083,
0.41948068141937256,
-0.2951031029224396,
0.14866435527801514,
0.0008666592184454203,
-0.21072064340114594,
0.12007074803113937,
-0.3012036979198456,
0.4957025647163391,
0.2614300847053528,
0.1042545959353447,
-0.15191423892974854,
0.07744958996772766,
-0.01828019879758358,
0.060307253152132034,
-0.23543593287467957,
-0.1585245430469513,
0.014977498911321163,
0.3407428562641144,
-0.15094652771949768,
-0.3594968020915985,
-0.093607097864151,
-0.04601527377963066,
-0.09030501544475555,
0.11572496592998505,
-0.17995838820934296,
0.007908822037279606,
0.11664015054702759,
-0.12624980509281158,
0.1033148542046547,
0.06078949570655823,
-0.4815242886543274,
0.003928906749933958,
-0.0321798212826252,
-0.40365180373191833,
0.12375949323177338,
-0.02086051180958748,
0.00491355312988162,
0.08617603033781052,
-0.1103779524564743,
0.233822301030159,
-0.007281489670276642,
-0.4567619264125824,
-0.5424535870552063,
-0.24950410425662994,
-0.0628829374909401,
-0.34366920590400696,
0.1939174234867096,
0.19907642900943756,
0.09251490980386734,
-0.0634201392531395,
0.05481863394379616,
0.10534040629863739,
0.17465750873088837,
-0.24844670295715332,
-0.07368984073400497,
-0.27407562732696533,
-0.14591722190380096,
0.1666727364063263,
0.2971656024456024,
0.1072196364402771,
0.1978294849395752,
0.4174236059188843,
0.20191332697868347,
0.10857270658016205,
-0.12978263199329376,
0.2503230571746826,
0.27525901794433594,
-0.18862947821617126,
-0.05521081015467644,
-0.3241277039051056,
0.03132590651512146,
0.1045055240392685,
-0.00441439263522625,
0.07794816046953201,
0.38832351565361023,
-0.09973207116127014,
-0.4348517954349518,
-0.10897688567638397,
-0.06769299507141113,
0.015790142118930817,
0.26232802867889404,
0.0074177999049425125,
0.18374069035053253,
0.2127142697572708,
0.014768820255994797,
0.09690304100513458,
-0.3862099349498749,
-0.02877037227153778,
-0.2212098389863968,
0.17164641618728638,
-0.09548383951187134,
-0.031623221933841705,
0.27647656202316284,
-0.07547533512115479,
-0.026220563799142838,
-0.19670838117599487,
-0.06525237113237381,
0.43126732110977173,
-0.10909535735845566,
0.21681533753871918,
0.15278401970863342,
0.01936245895922184,
0.2711122930049896,
-0.37323352694511414,
0.04684240743517876,
-0.014993146993219852,
-0.03194798529148102,
0.16285642981529236,
-0.24286746978759766,
0.016750961542129517,
-0.020075516775250435,
-0.33339783549308777,
0.006514889188110828,
0.30650225281715393,
0.39017337560653687,
-0.01647457852959633,
0.1370619833469391,
-0.18203496932983398,
0.30000099539756775,
0.2873590886592865,
-0.12213743478059769,
-0.17860445380210876,
-0.06828184425830841,
0.18408672511577606,
0.23722577095031738,
-0.1459849774837494,
0.15284308791160583,
-0.19307640194892883,
-0.2229391187429428,
0.10946889966726303,
0.2067096084356308,
0.1275934875011444,
0.14657926559448242,
0.26694005727767944,
0.28666040301322937,
-0.13923826813697815,
-0.01755802147090435,
-0.3609708547592163,
-0.018008988350629807,
0.08698796480894089,
-0.061885904520750046,
0.10880818217992783,
-0.15097002685070038,
-0.09858251363039017,
-0.43414461612701416,
0.050603289157152176,
0.163438618183136,
0.09075136482715607,
-0.0912451222538948,
-0.48488500714302063,
-0.4680953621864319,
-0.27843984961509705,
0.2972492575645447,
0.16484491527080536,
0.143280029296875,
-0.4647088944911957,
0.2671385109424591,
0.3225805461406708,
0.017371108755469322,
0.1622926890850067,
-0.452440470457077,
0.23731976747512817,
0.20090973377227783,
0.048267289996147156,
-0.07098469883203506,
0.028763780370354652,
-0.004633099306374788,
0.2833496928215027,
-0.00859017577022314,
0.03808441385626793,
0.3172626495361328,
-0.2988784909248352,
0.2570110857486725,
-0.3558006286621094,
-0.2892584502696991,
0.22863233089447021,
0.07110178470611572,
-0.04411176219582558,
-0.08568601310253143,
0.135113924741745,
0.007966360077261925,
-0.012732748873531818,
0.09123475104570389,
-0.36364156007766724,
-0.11913259327411652,
-0.007636972237378359,
-0.05783383920788765,
-0.41422149538993835,
-0.1436578780412674,
-0.44922947883605957,
-0.2350849211215973,
-0.17135372757911682,
-0.09125103801488876,
0.2065986543893814,
0.08068589866161346,
-0.015054494142532349,
-0.10162584483623505,
0.13089755177497864,
0.00790263619273901,
-0.12729671597480774,
-0.3427191376686096,
-0.6485680937767029,
0.4185170531272888,
-0.17725922167301178,
-0.5927565693855286,
0.15618357062339783,
0.2033456563949585,
0.32218071818351746,
0.21193470060825348,
-0.39981576800346375,
-0.06343307346105576,
-0.10717930644750595,
0.025502022355794907,
0.4218766391277313,
0.12700845301151276,
0.16015709936618805,
-0.24883748590946198,
-0.2774847447872162,
-0.22380247712135315,
0.19637618958950043,
0.04603143781423569,
0.05402417853474617,
0.21174462139606476,
-0.24056708812713623,
-0.11993633955717087,
0.15525873005390167,
-0.0647764801979065,
-0.008451409637928009,
0.0640023872256279,
0.3036978244781494,
-0.14174792170524597,
0.2801530361175537,
0.0023857031483203173,
-0.1568954437971115,
0.3406967222690582,
-0.022857876494526863,
0.27558788657188416,
0.02451457269489765,
0.09576301276683807,
0.02110099606215954,
-0.12082600593566895,
0.028705710545182228,
-0.25452929735183716,
-0.12688617408275604,
-0.4803984463214874,
0.10118812322616577,
-0.07981137186288834,
0.1765141487121582,
0.13423678278923035,
-0.013762724585831165,
-0.13304583728313446,
0.15336498618125916,
0.19977812469005585,
-0.05301433801651001,
0.0996258333325386,
-0.585501492023468,
0.19746704399585724,
-0.33502331376075745,
0.3559013605117798,
-0.30338212847709656,
0.2180970311164856,
-0.31151142716407776,
0.09093263745307922,
0.18692412972450256,
-0.07076911628246307,
0.22298584878444672,
-0.2893142104148865,
0.15448997914791107,
0.14791905879974365,
-0.07089190930128098,
-0.21299365162849426,
0.04467214271426201,
-0.34430044889450073,
0.20429708063602448,
0.4097074270248413,
0.2015787810087204,
-0.21911385655403137,
0.16613757610321045,
0.2651592493057251,
0.07780860364437103,
-0.1793329417705536,
-0.02548489160835743,
-0.04353613033890724,
-0.2605612874031067,
-0.27849146723747253,
-0.22538964450359344,
-0.16423611342906952,
0.1826811283826828,
-0.09916958957910538,
-0.26680952310562134,
-0.24498650431632996,
-0.19101519882678986,
0.2915264964103699,
-0.011668466962873936,
0.17086786031723022,
0.06528955698013306,
0.22240954637527466,
0.19087453186511993,
-0.028363490477204323,
0.11936724931001663,
0.3375770151615143,
-0.04250888153910637,
0.0763581395149231,
0.2846345901489258,
-0.44787487387657166,
0.010898405686020851,
0.14191940426826477,
-0.16761845350265503,
-0.18284939229488373,
-0.037586115300655365,
-0.028708186000585556,
-0.010448488406836987,
0.3250168561935425,
0.20736540853977203,
0.016967101022601128,
-0.17242786288261414,
-0.24355408549308777,
0.35371696949005127,
0.16876457631587982,
0.04690460488200188,
0.5383304357528687,
0.2226855605840683,
0.17294128239154816,
-0.48659610748291016,
0.1573198139667511,
0.8075466156005859,
-0.17316029965877533,
-0.09362400323152542,
0.09504479914903641,
0.3492876887321472,
0.3182266354560852,
-0.32652905583381653,
0.11431525647640228,
0.03454478830099106,
-0.330720454454422,
-0.09460662305355072,
0.03339068219065666,
0.14888760447502136,
0.012785851955413818,
-0.08097661286592484,
0.13731689751148224,
0.05180554836988449,
0.003773700911551714,
0.15873460471630096,
0.08279737830162048,
-0.44455480575561523,
-0.06686469912528992,
0.17319175601005554,
0.31054794788360596,
0.10993100702762604,
0.3616698086261749,
0.034468941390514374,
-0.03856542333960533,
-0.04454531520605087,
-0.10998334735631943,
-0.14822514355182648,
0.28474554419517517,
0.23815186321735382,
0.2575335204601288,
-0.23946772515773773,
-0.19518840312957764,
-0.17963911592960358,
0.16144298017024994,
0.06354807317256927,
0.21434304118156433,
-0.33479824662208557,
0.2669498026371002,
-0.35145851969718933,
-0.4366728961467743,
0.14546141028404236,
0.13154184818267822,
0.14233043789863586,
-0.2733491361141205,
-0.2167760580778122,
0.20787224173545837,
0.21429845690727234,
-0.03574207052588463,
-0.1305091232061386,
-0.13196872174739838,
-0.030426811426877975,
-0.06270993500947952,
0.008857511915266514,
0.01972726359963417,
-0.03191781044006348,
-0.2605521082878113,
0.2533598244190216,
0.06802530586719513,
0.13315945863723755,
0.24862602353096008,
0.03544066101312637,
-0.17077645659446716,
-0.2624519169330597,
0.4128343462944031,
0.2623577117919922,
-0.11477937549352646,
0.22019077837467194,
-0.06453793495893478,
-0.1704961210489273,
-0.44652387499809265,
-0.22265739738941193,
0.04470561444759369,
-0.29705896973609924,
0.08069705218076706,
-0.3813954293727875,
-0.05132076516747475,
-0.014342526905238628,
0.237042635679245,
0.1474052220582962,
-0.25702694058418274,
0.0525532029569149,
-0.43072354793548584,
-0.19481249153614044,
0.13031302392482758,
0.0038843669462949038,
0.23779423534870148,
-0.10246063768863678,
0.06069169566035271,
0.14417794346809387,
-0.05826692655682564,
-0.46207383275032043,
0.04666738212108612,
-0.12777036428451538,
-0.30777838826179504,
0.19677139818668365,
0.08667755126953125,
0.20679128170013428,
-0.03578304126858711,
0.27418163418769836,
0.08217142522335052,
-0.10684826970100403,
-0.3040529489517212,
-0.06651747226715088,
0.0362815335392952,
0.1808212846517563,
-0.06168961152434349,
0.27513039112091064,
-0.1915154606103897,
-0.3736155927181244,
0.13720522820949554,
0.05680115520954132,
0.014181884005665779,
0.047179486602544785,
0.09500506520271301,
0.13794657588005066,
0.14169055223464966,
0.04128820449113846,
0.27680981159210205,
0.1648300141096115,
0.29582300782203674,
-0.1342681348323822,
0.08681224286556244,
0.11167065799236298,
-0.10797224193811417,
-0.4023881256580353,
-0.14384883642196655,
0.20497620105743408,
0.028943398967385292,
0.22679433226585388,
-0.12789970636367798,
0.26240313053131104,
0.09721671789884567,
0.240853950381279,
0.2408931404352188,
-0.09514842182397842,
0.09563815593719482,
0.09923698753118515,
0.3556007444858551,
-0.39969536662101746,
-0.2307218462228775,
0.008256088942289352,
0.2746630311012268,
0.008278648369014263,
-0.028453689068555832,
0.376816064119339,
-0.030816329643130302,
0.45596903562545776,
0.024832826107740402,
0.3777484595775604,
0.040441568940877914,
0.13950037956237793,
0.44643282890319824,
0.13601259887218475,
0.14573705196380615,
0.15290072560310364,
0.08694268018007278,
-0.1479819416999817,
0.5788336992263794,
-0.10751328617334366,
0.3067339062690735,
-0.007745516486465931,
0.06578388810157776,
0.051219355314970016,
-0.23482689261436462,
0.07128981500864029,
0.22621941566467285,
0.029542189091444016,
0.2049228996038437,
0.04275127872824669,
0.33760184049606323,
-0.34400704503059387,
0.22660696506500244,
-0.6715393662452698,
0.1515365093946457,
0.00875801220536232,
-0.07492461800575256,
-0.21059127151966095,
-0.24332107603549957,
0.14794859290122986,
0.09031583368778229,
0.07164540886878967,
-0.1622725874185562,
0.1700197160243988,
-0.041362419724464417,
-0.15951234102249146,
-0.5964983105659485,
0.03812528774142265,
0.1012030839920044,
-0.014509848318994045,
-0.051590725779533386,
0.10985702276229858,
0.21236836910247803,
0.1301274299621582,
0.18458303809165955,
0.44151797890663147,
0.101789690554142,
-0.05506562069058418,
0.11576466262340546,
-0.019065769389271736,
0.1011626198887825,
-0.1927109956741333,
-0.12491413205862045,
0.2931036949157715,
0.17108383774757385,
0.030177561566233635,
0.31682974100112915,
0.32963699102401733,
-0.30206331610679626,
-0.006116912234574556,
0.09733082354068756,
0.14952537417411804,
0.12977290153503418,
-0.13361917436122894,
-0.01959185115993023,
0.025299541652202606,
-0.10926266759634018,
-0.2314813733100891,
-0.3812354803085327,
0.06384585052728653,
0.05683648958802223,
-0.00963882077485323,
0.12873494625091553,
-0.1789563000202179,
0.1579931378364563,
-0.2067253142595291,
0.3389972448348999,
0.21538753807544708,
0.21635515987873077,
0.005721011199057102,
-0.3281818628311157,
-0.6047636270523071,
0.2472039759159088,
0.04056752845644951,
-0.42151206731796265,
-0.025977933779358864,
0.16689659655094147,
0.13207696378231049,
0.1900966763496399,
0.26390066742897034,
-0.10219826549291611,
0.0568685419857502,
0.04085559770464897,
-0.38684868812561035,
-0.007207645568996668,
0.27365100383758545,
0.12567661702632904,
-0.017088891938328743,
-0.16610458493232727,
0.24134749174118042,
0.07302529364824295,
0.15139177441596985,
-0.06962727755308151,
0.09472761303186417,
-0.11467428505420685,
0.06251159310340881,
0.3655823767185211,
-0.09637376666069031,
0.41899731755256653,
-0.21972039341926575,
0.012498714961111546,
-0.3019128143787384,
-0.23230984807014465,
-0.03192104771733284,
-0.14966686069965363,
0.32196280360221863,
-0.11540845036506653,
-0.19012285768985748,
0.17351134121418,
0.1224801167845726,
0.38183242082595825,
-0.0016143086832016706,
0.004409831017255783,
-0.3482213318347931,
0.11383286863565445,
-0.22073152661323547,
0.0729823186993599,
0.31875666975975037,
0.08364880084991455,
-0.09014671295881271,
-0.07112250477075577,
-0.12785044312477112,
-0.3159099221229553,
0.14186173677444458,
0.03349807485938072,
0.010894129984080791,
-0.3103409707546234,
0.052060943096876144,
0.3552204370498657,
0.06186196208000183,
-0.09868733584880829,
0.3148471415042877,
0.2756868004798889,
-0.13331441581249237,
-0.10549931973218918,
0.3337898254394531,
0.07609948515892029,
-0.11252900213003159,
-0.10495461523532867,
0.28618478775024414,
0.04294176399707794,
-0.30530452728271484,
0.08446977287530899,
-0.06264060735702515
] |
https://github.com/huggingface/datasets/issues/3232
|
The Xsum datasets seems not able to download.
|
I don't know other download links - this is the one provided by the authors of the dataset. Maybe you can try downloading from another location ? There are several solutions: a VPN, a remote VM or Google Colab for example.
|
## Describe the bug
The download Link of the Xsum dataset provided in the repository is [Link](http://bollin.inf.ed.ac.uk/public/direct/XSUM-EMNLP18-Summary-Data-Original.tar.gz). It seems not able to download.
## Steps to reproduce the bug
```python
load_dataset('xsum')
```
## Actual results
``` python
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach http://bollin.inf.ed.ac.uk/public/direct/XSUM-EMNLP18-Summary-Data-Original.tar.gz
```
| 41 |
The Xsum datasets seems not able to download.
|
[
-0.525749921798706,
-0.2230057269334793,
-0.26274535059928894,
0.1574327051639557,
0.29367944598197937,
0.11491893231868744,
-0.05903983116149902,
0.21556800603866577,
0.22213438153266907,
0.3314623534679413,
-0.3971518576145172,
0.0788753405213356,
0.09712206572294235,
0.30476126074790955,
0.08084429800510406,
0.12240581959486008,
-0.027120279148221016,
0.1258808970451355,
-0.43621277809143066,
-0.2509799003601074,
0.016396068036556244,
0.10553774237632751,
-0.07544644176959991,
-0.17783454060554504,
-0.2761306166648865,
-0.08192742615938187,
-0.0022251259069889784,
0.09585030376911163,
-0.3681545555591583,
-0.14335988461971283,
0.2602016031742096,
0.3164702355861664,
0.004292714409530163,
0.27239739894866943,
-0.00009855785174295306,
-0.01302430685609579,
0.16798868775367737,
-0.0036695885937660933,
-0.12047132849693298,
0.14743570983409882,
-0.2904537320137024,
0.20664983987808228,
-0.13929131627082825,
-0.20835065841674805,
0.03854221850633621,
0.06163254752755165,
0.1232784241437912,
-0.24395588040351868,
0.06565802544355392,
0.1231243833899498,
0.36283737421035767,
0.36973321437835693,
0.11577682197093964,
-0.4157242774963379,
0.09506973624229431,
-0.31120648980140686,
-0.08354567736387253,
0.2048390507698059,
0.47241756319999695,
0.2940998673439026,
0.16403894126415253,
0.1367150843143463,
-0.06642188131809235,
0.023488689213991165,
-0.16283279657363892,
-0.15808437764644623,
0.504119336605072,
-0.21099348366260529,
0.1903279572725296,
0.36342787742614746,
0.775042712688446,
0.09228561073541641,
-0.18149691820144653,
0.17623285949230194,
0.07097813487052917,
-0.0941535085439682,
0.2687393128871918,
0.21318091452121735,
-0.012438377365469933,
0.07125444710254669,
-0.1366974413394928,
-0.047510113567113876,
-0.09071981906890869,
0.12385383993387222,
-0.12240195274353027,
0.02880355902016163,
-0.1891688108444214,
-0.11252211034297943,
-0.020043157041072845,
-0.05768253654241562,
0.2711358964443207,
0.18051765859127045,
-0.013010525144636631,
-0.05833195149898529,
-0.1996428668498993,
0.019647331908345222,
-0.08267121016979218,
0.06873165816068649,
0.179373636841774,
-0.007105800788849592,
0.12303068488836288,
0.13994506001472473,
-0.3068573474884033,
0.011801128275692463,
0.02698824740946293,
0.0005728506366722286,
0.30043458938598633,
-0.41030603647232056,
0.2936764061450958,
0.014634892344474792,
0.12868934869766235,
0.06035132333636284,
-0.2914280295372009,
0.04164848104119301,
-0.3541231155395508,
0.07703100144863129,
-0.1343158632516861,
-0.3974483609199524,
-0.3900683522224426,
-0.03147604316473007,
0.3420722484588623,
0.010085145942866802,
-0.023402487859129906,
0.12209776043891907,
-0.0345504991710186,
0.10262789577245712,
-0.1725350171327591,
0.17829838395118713,
-0.27468907833099365,
-0.36003124713897705,
-0.39849573373794556,
0.2021998018026352,
-0.018562082201242447,
-0.12679116427898407,
0.197335347533226,
-0.18921473622322083,
0.41948068141937256,
-0.2951031029224396,
0.14866435527801514,
0.0008666592184454203,
-0.21072064340114594,
0.12007074803113937,
-0.3012036979198456,
0.4957025647163391,
0.2614300847053528,
0.1042545959353447,
-0.15191423892974854,
0.07744958996772766,
-0.01828019879758358,
0.060307253152132034,
-0.23543593287467957,
-0.1585245430469513,
0.014977498911321163,
0.3407428562641144,
-0.15094652771949768,
-0.3594968020915985,
-0.093607097864151,
-0.04601527377963066,
-0.09030501544475555,
0.11572496592998505,
-0.17995838820934296,
0.007908822037279606,
0.11664015054702759,
-0.12624980509281158,
0.1033148542046547,
0.06078949570655823,
-0.4815242886543274,
0.003928906749933958,
-0.0321798212826252,
-0.40365180373191833,
0.12375949323177338,
-0.02086051180958748,
0.00491355312988162,
0.08617603033781052,
-0.1103779524564743,
0.233822301030159,
-0.007281489670276642,
-0.4567619264125824,
-0.5424535870552063,
-0.24950410425662994,
-0.0628829374909401,
-0.34366920590400696,
0.1939174234867096,
0.19907642900943756,
0.09251490980386734,
-0.0634201392531395,
0.05481863394379616,
0.10534040629863739,
0.17465750873088837,
-0.24844670295715332,
-0.07368984073400497,
-0.27407562732696533,
-0.14591722190380096,
0.1666727364063263,
0.2971656024456024,
0.1072196364402771,
0.1978294849395752,
0.4174236059188843,
0.20191332697868347,
0.10857270658016205,
-0.12978263199329376,
0.2503230571746826,
0.27525901794433594,
-0.18862947821617126,
-0.05521081015467644,
-0.3241277039051056,
0.03132590651512146,
0.1045055240392685,
-0.00441439263522625,
0.07794816046953201,
0.38832351565361023,
-0.09973207116127014,
-0.4348517954349518,
-0.10897688567638397,
-0.06769299507141113,
0.015790142118930817,
0.26232802867889404,
0.0074177999049425125,
0.18374069035053253,
0.2127142697572708,
0.014768820255994797,
0.09690304100513458,
-0.3862099349498749,
-0.02877037227153778,
-0.2212098389863968,
0.17164641618728638,
-0.09548383951187134,
-0.031623221933841705,
0.27647656202316284,
-0.07547533512115479,
-0.026220563799142838,
-0.19670838117599487,
-0.06525237113237381,
0.43126732110977173,
-0.10909535735845566,
0.21681533753871918,
0.15278401970863342,
0.01936245895922184,
0.2711122930049896,
-0.37323352694511414,
0.04684240743517876,
-0.014993146993219852,
-0.03194798529148102,
0.16285642981529236,
-0.24286746978759766,
0.016750961542129517,
-0.020075516775250435,
-0.33339783549308777,
0.006514889188110828,
0.30650225281715393,
0.39017337560653687,
-0.01647457852959633,
0.1370619833469391,
-0.18203496932983398,
0.30000099539756775,
0.2873590886592865,
-0.12213743478059769,
-0.17860445380210876,
-0.06828184425830841,
0.18408672511577606,
0.23722577095031738,
-0.1459849774837494,
0.15284308791160583,
-0.19307640194892883,
-0.2229391187429428,
0.10946889966726303,
0.2067096084356308,
0.1275934875011444,
0.14657926559448242,
0.26694005727767944,
0.28666040301322937,
-0.13923826813697815,
-0.01755802147090435,
-0.3609708547592163,
-0.018008988350629807,
0.08698796480894089,
-0.061885904520750046,
0.10880818217992783,
-0.15097002685070038,
-0.09858251363039017,
-0.43414461612701416,
0.050603289157152176,
0.163438618183136,
0.09075136482715607,
-0.0912451222538948,
-0.48488500714302063,
-0.4680953621864319,
-0.27843984961509705,
0.2972492575645447,
0.16484491527080536,
0.143280029296875,
-0.4647088944911957,
0.2671385109424591,
0.3225805461406708,
0.017371108755469322,
0.1622926890850067,
-0.452440470457077,
0.23731976747512817,
0.20090973377227783,
0.048267289996147156,
-0.07098469883203506,
0.028763780370354652,
-0.004633099306374788,
0.2833496928215027,
-0.00859017577022314,
0.03808441385626793,
0.3172626495361328,
-0.2988784909248352,
0.2570110857486725,
-0.3558006286621094,
-0.2892584502696991,
0.22863233089447021,
0.07110178470611572,
-0.04411176219582558,
-0.08568601310253143,
0.135113924741745,
0.007966360077261925,
-0.012732748873531818,
0.09123475104570389,
-0.36364156007766724,
-0.11913259327411652,
-0.007636972237378359,
-0.05783383920788765,
-0.41422149538993835,
-0.1436578780412674,
-0.44922947883605957,
-0.2350849211215973,
-0.17135372757911682,
-0.09125103801488876,
0.2065986543893814,
0.08068589866161346,
-0.015054494142532349,
-0.10162584483623505,
0.13089755177497864,
0.00790263619273901,
-0.12729671597480774,
-0.3427191376686096,
-0.6485680937767029,
0.4185170531272888,
-0.17725922167301178,
-0.5927565693855286,
0.15618357062339783,
0.2033456563949585,
0.32218071818351746,
0.21193470060825348,
-0.39981576800346375,
-0.06343307346105576,
-0.10717930644750595,
0.025502022355794907,
0.4218766391277313,
0.12700845301151276,
0.16015709936618805,
-0.24883748590946198,
-0.2774847447872162,
-0.22380247712135315,
0.19637618958950043,
0.04603143781423569,
0.05402417853474617,
0.21174462139606476,
-0.24056708812713623,
-0.11993633955717087,
0.15525873005390167,
-0.0647764801979065,
-0.008451409637928009,
0.0640023872256279,
0.3036978244781494,
-0.14174792170524597,
0.2801530361175537,
0.0023857031483203173,
-0.1568954437971115,
0.3406967222690582,
-0.022857876494526863,
0.27558788657188416,
0.02451457269489765,
0.09576301276683807,
0.02110099606215954,
-0.12082600593566895,
0.028705710545182228,
-0.25452929735183716,
-0.12688617408275604,
-0.4803984463214874,
0.10118812322616577,
-0.07981137186288834,
0.1765141487121582,
0.13423678278923035,
-0.013762724585831165,
-0.13304583728313446,
0.15336498618125916,
0.19977812469005585,
-0.05301433801651001,
0.0996258333325386,
-0.585501492023468,
0.19746704399585724,
-0.33502331376075745,
0.3559013605117798,
-0.30338212847709656,
0.2180970311164856,
-0.31151142716407776,
0.09093263745307922,
0.18692412972450256,
-0.07076911628246307,
0.22298584878444672,
-0.2893142104148865,
0.15448997914791107,
0.14791905879974365,
-0.07089190930128098,
-0.21299365162849426,
0.04467214271426201,
-0.34430044889450073,
0.20429708063602448,
0.4097074270248413,
0.2015787810087204,
-0.21911385655403137,
0.16613757610321045,
0.2651592493057251,
0.07780860364437103,
-0.1793329417705536,
-0.02548489160835743,
-0.04353613033890724,
-0.2605612874031067,
-0.27849146723747253,
-0.22538964450359344,
-0.16423611342906952,
0.1826811283826828,
-0.09916958957910538,
-0.26680952310562134,
-0.24498650431632996,
-0.19101519882678986,
0.2915264964103699,
-0.011668466962873936,
0.17086786031723022,
0.06528955698013306,
0.22240954637527466,
0.19087453186511993,
-0.028363490477204323,
0.11936724931001663,
0.3375770151615143,
-0.04250888153910637,
0.0763581395149231,
0.2846345901489258,
-0.44787487387657166,
0.010898405686020851,
0.14191940426826477,
-0.16761845350265503,
-0.18284939229488373,
-0.037586115300655365,
-0.028708186000585556,
-0.010448488406836987,
0.3250168561935425,
0.20736540853977203,
0.016967101022601128,
-0.17242786288261414,
-0.24355408549308777,
0.35371696949005127,
0.16876457631587982,
0.04690460488200188,
0.5383304357528687,
0.2226855605840683,
0.17294128239154816,
-0.48659610748291016,
0.1573198139667511,
0.8075466156005859,
-0.17316029965877533,
-0.09362400323152542,
0.09504479914903641,
0.3492876887321472,
0.3182266354560852,
-0.32652905583381653,
0.11431525647640228,
0.03454478830099106,
-0.330720454454422,
-0.09460662305355072,
0.03339068219065666,
0.14888760447502136,
0.012785851955413818,
-0.08097661286592484,
0.13731689751148224,
0.05180554836988449,
0.003773700911551714,
0.15873460471630096,
0.08279737830162048,
-0.44455480575561523,
-0.06686469912528992,
0.17319175601005554,
0.31054794788360596,
0.10993100702762604,
0.3616698086261749,
0.034468941390514374,
-0.03856542333960533,
-0.04454531520605087,
-0.10998334735631943,
-0.14822514355182648,
0.28474554419517517,
0.23815186321735382,
0.2575335204601288,
-0.23946772515773773,
-0.19518840312957764,
-0.17963911592960358,
0.16144298017024994,
0.06354807317256927,
0.21434304118156433,
-0.33479824662208557,
0.2669498026371002,
-0.35145851969718933,
-0.4366728961467743,
0.14546141028404236,
0.13154184818267822,
0.14233043789863586,
-0.2733491361141205,
-0.2167760580778122,
0.20787224173545837,
0.21429845690727234,
-0.03574207052588463,
-0.1305091232061386,
-0.13196872174739838,
-0.030426811426877975,
-0.06270993500947952,
0.008857511915266514,
0.01972726359963417,
-0.03191781044006348,
-0.2605521082878113,
0.2533598244190216,
0.06802530586719513,
0.13315945863723755,
0.24862602353096008,
0.03544066101312637,
-0.17077645659446716,
-0.2624519169330597,
0.4128343462944031,
0.2623577117919922,
-0.11477937549352646,
0.22019077837467194,
-0.06453793495893478,
-0.1704961210489273,
-0.44652387499809265,
-0.22265739738941193,
0.04470561444759369,
-0.29705896973609924,
0.08069705218076706,
-0.3813954293727875,
-0.05132076516747475,
-0.014342526905238628,
0.237042635679245,
0.1474052220582962,
-0.25702694058418274,
0.0525532029569149,
-0.43072354793548584,
-0.19481249153614044,
0.13031302392482758,
0.0038843669462949038,
0.23779423534870148,
-0.10246063768863678,
0.06069169566035271,
0.14417794346809387,
-0.05826692655682564,
-0.46207383275032043,
0.04666738212108612,
-0.12777036428451538,
-0.30777838826179504,
0.19677139818668365,
0.08667755126953125,
0.20679128170013428,
-0.03578304126858711,
0.27418163418769836,
0.08217142522335052,
-0.10684826970100403,
-0.3040529489517212,
-0.06651747226715088,
0.0362815335392952,
0.1808212846517563,
-0.06168961152434349,
0.27513039112091064,
-0.1915154606103897,
-0.3736155927181244,
0.13720522820949554,
0.05680115520954132,
0.014181884005665779,
0.047179486602544785,
0.09500506520271301,
0.13794657588005066,
0.14169055223464966,
0.04128820449113846,
0.27680981159210205,
0.1648300141096115,
0.29582300782203674,
-0.1342681348323822,
0.08681224286556244,
0.11167065799236298,
-0.10797224193811417,
-0.4023881256580353,
-0.14384883642196655,
0.20497620105743408,
0.028943398967385292,
0.22679433226585388,
-0.12789970636367798,
0.26240313053131104,
0.09721671789884567,
0.240853950381279,
0.2408931404352188,
-0.09514842182397842,
0.09563815593719482,
0.09923698753118515,
0.3556007444858551,
-0.39969536662101746,
-0.2307218462228775,
0.008256088942289352,
0.2746630311012268,
0.008278648369014263,
-0.028453689068555832,
0.376816064119339,
-0.030816329643130302,
0.45596903562545776,
0.024832826107740402,
0.3777484595775604,
0.040441568940877914,
0.13950037956237793,
0.44643282890319824,
0.13601259887218475,
0.14573705196380615,
0.15290072560310364,
0.08694268018007278,
-0.1479819416999817,
0.5788336992263794,
-0.10751328617334366,
0.3067339062690735,
-0.007745516486465931,
0.06578388810157776,
0.051219355314970016,
-0.23482689261436462,
0.07128981500864029,
0.22621941566467285,
0.029542189091444016,
0.2049228996038437,
0.04275127872824669,
0.33760184049606323,
-0.34400704503059387,
0.22660696506500244,
-0.6715393662452698,
0.1515365093946457,
0.00875801220536232,
-0.07492461800575256,
-0.21059127151966095,
-0.24332107603549957,
0.14794859290122986,
0.09031583368778229,
0.07164540886878967,
-0.1622725874185562,
0.1700197160243988,
-0.041362419724464417,
-0.15951234102249146,
-0.5964983105659485,
0.03812528774142265,
0.1012030839920044,
-0.014509848318994045,
-0.051590725779533386,
0.10985702276229858,
0.21236836910247803,
0.1301274299621582,
0.18458303809165955,
0.44151797890663147,
0.101789690554142,
-0.05506562069058418,
0.11576466262340546,
-0.019065769389271736,
0.1011626198887825,
-0.1927109956741333,
-0.12491413205862045,
0.2931036949157715,
0.17108383774757385,
0.030177561566233635,
0.31682974100112915,
0.32963699102401733,
-0.30206331610679626,
-0.006116912234574556,
0.09733082354068756,
0.14952537417411804,
0.12977290153503418,
-0.13361917436122894,
-0.01959185115993023,
0.025299541652202606,
-0.10926266759634018,
-0.2314813733100891,
-0.3812354803085327,
0.06384585052728653,
0.05683648958802223,
-0.00963882077485323,
0.12873494625091553,
-0.1789563000202179,
0.1579931378364563,
-0.2067253142595291,
0.3389972448348999,
0.21538753807544708,
0.21635515987873077,
0.005721011199057102,
-0.3281818628311157,
-0.6047636270523071,
0.2472039759159088,
0.04056752845644951,
-0.42151206731796265,
-0.025977933779358864,
0.16689659655094147,
0.13207696378231049,
0.1900966763496399,
0.26390066742897034,
-0.10219826549291611,
0.0568685419857502,
0.04085559770464897,
-0.38684868812561035,
-0.007207645568996668,
0.27365100383758545,
0.12567661702632904,
-0.017088891938328743,
-0.16610458493232727,
0.24134749174118042,
0.07302529364824295,
0.15139177441596985,
-0.06962727755308151,
0.09472761303186417,
-0.11467428505420685,
0.06251159310340881,
0.3655823767185211,
-0.09637376666069031,
0.41899731755256653,
-0.21972039341926575,
0.012498714961111546,
-0.3019128143787384,
-0.23230984807014465,
-0.03192104771733284,
-0.14966686069965363,
0.32196280360221863,
-0.11540845036506653,
-0.19012285768985748,
0.17351134121418,
0.1224801167845726,
0.38183242082595825,
-0.0016143086832016706,
0.004409831017255783,
-0.3482213318347931,
0.11383286863565445,
-0.22073152661323547,
0.0729823186993599,
0.31875666975975037,
0.08364880084991455,
-0.09014671295881271,
-0.07112250477075577,
-0.12785044312477112,
-0.3159099221229553,
0.14186173677444458,
0.03349807485938072,
0.010894129984080791,
-0.3103409707546234,
0.052060943096876144,
0.3552204370498657,
0.06186196208000183,
-0.09868733584880829,
0.3148471415042877,
0.2756868004798889,
-0.13331441581249237,
-0.10549931973218918,
0.3337898254394531,
0.07609948515892029,
-0.11252900213003159,
-0.10495461523532867,
0.28618478775024414,
0.04294176399707794,
-0.30530452728271484,
0.08446977287530899,
-0.06264060735702515
] |
https://github.com/huggingface/datasets/issues/3232
|
The Xsum datasets seems not able to download.
|
> I don't know other download links - this is the one provided by the authors of the dataset. Maybe you can try downloading from another location ? There are several solutions: a VPN, a remote VM or Google Colab for example.
:> ok. Thanks for your reply.
|
## Describe the bug
The download Link of the Xsum dataset provided in the repository is [Link](http://bollin.inf.ed.ac.uk/public/direct/XSUM-EMNLP18-Summary-Data-Original.tar.gz). It seems not able to download.
## Steps to reproduce the bug
```python
load_dataset('xsum')
```
## Actual results
``` python
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach http://bollin.inf.ed.ac.uk/public/direct/XSUM-EMNLP18-Summary-Data-Original.tar.gz
```
| 48 |
The Xsum datasets seems not able to download.
|
[
-0.525749921798706,
-0.2230057269334793,
-0.26274535059928894,
0.1574327051639557,
0.29367944598197937,
0.11491893231868744,
-0.05903983116149902,
0.21556800603866577,
0.22213438153266907,
0.3314623534679413,
-0.3971518576145172,
0.0788753405213356,
0.09712206572294235,
0.30476126074790955,
0.08084429800510406,
0.12240581959486008,
-0.027120279148221016,
0.1258808970451355,
-0.43621277809143066,
-0.2509799003601074,
0.016396068036556244,
0.10553774237632751,
-0.07544644176959991,
-0.17783454060554504,
-0.2761306166648865,
-0.08192742615938187,
-0.0022251259069889784,
0.09585030376911163,
-0.3681545555591583,
-0.14335988461971283,
0.2602016031742096,
0.3164702355861664,
0.004292714409530163,
0.27239739894866943,
-0.00009855785174295306,
-0.01302430685609579,
0.16798868775367737,
-0.0036695885937660933,
-0.12047132849693298,
0.14743570983409882,
-0.2904537320137024,
0.20664983987808228,
-0.13929131627082825,
-0.20835065841674805,
0.03854221850633621,
0.06163254752755165,
0.1232784241437912,
-0.24395588040351868,
0.06565802544355392,
0.1231243833899498,
0.36283737421035767,
0.36973321437835693,
0.11577682197093964,
-0.4157242774963379,
0.09506973624229431,
-0.31120648980140686,
-0.08354567736387253,
0.2048390507698059,
0.47241756319999695,
0.2940998673439026,
0.16403894126415253,
0.1367150843143463,
-0.06642188131809235,
0.023488689213991165,
-0.16283279657363892,
-0.15808437764644623,
0.504119336605072,
-0.21099348366260529,
0.1903279572725296,
0.36342787742614746,
0.775042712688446,
0.09228561073541641,
-0.18149691820144653,
0.17623285949230194,
0.07097813487052917,
-0.0941535085439682,
0.2687393128871918,
0.21318091452121735,
-0.012438377365469933,
0.07125444710254669,
-0.1366974413394928,
-0.047510113567113876,
-0.09071981906890869,
0.12385383993387222,
-0.12240195274353027,
0.02880355902016163,
-0.1891688108444214,
-0.11252211034297943,
-0.020043157041072845,
-0.05768253654241562,
0.2711358964443207,
0.18051765859127045,
-0.013010525144636631,
-0.05833195149898529,
-0.1996428668498993,
0.019647331908345222,
-0.08267121016979218,
0.06873165816068649,
0.179373636841774,
-0.007105800788849592,
0.12303068488836288,
0.13994506001472473,
-0.3068573474884033,
0.011801128275692463,
0.02698824740946293,
0.0005728506366722286,
0.30043458938598633,
-0.41030603647232056,
0.2936764061450958,
0.014634892344474792,
0.12868934869766235,
0.06035132333636284,
-0.2914280295372009,
0.04164848104119301,
-0.3541231155395508,
0.07703100144863129,
-0.1343158632516861,
-0.3974483609199524,
-0.3900683522224426,
-0.03147604316473007,
0.3420722484588623,
0.010085145942866802,
-0.023402487859129906,
0.12209776043891907,
-0.0345504991710186,
0.10262789577245712,
-0.1725350171327591,
0.17829838395118713,
-0.27468907833099365,
-0.36003124713897705,
-0.39849573373794556,
0.2021998018026352,
-0.018562082201242447,
-0.12679116427898407,
0.197335347533226,
-0.18921473622322083,
0.41948068141937256,
-0.2951031029224396,
0.14866435527801514,
0.0008666592184454203,
-0.21072064340114594,
0.12007074803113937,
-0.3012036979198456,
0.4957025647163391,
0.2614300847053528,
0.1042545959353447,
-0.15191423892974854,
0.07744958996772766,
-0.01828019879758358,
0.060307253152132034,
-0.23543593287467957,
-0.1585245430469513,
0.014977498911321163,
0.3407428562641144,
-0.15094652771949768,
-0.3594968020915985,
-0.093607097864151,
-0.04601527377963066,
-0.09030501544475555,
0.11572496592998505,
-0.17995838820934296,
0.007908822037279606,
0.11664015054702759,
-0.12624980509281158,
0.1033148542046547,
0.06078949570655823,
-0.4815242886543274,
0.003928906749933958,
-0.0321798212826252,
-0.40365180373191833,
0.12375949323177338,
-0.02086051180958748,
0.00491355312988162,
0.08617603033781052,
-0.1103779524564743,
0.233822301030159,
-0.007281489670276642,
-0.4567619264125824,
-0.5424535870552063,
-0.24950410425662994,
-0.0628829374909401,
-0.34366920590400696,
0.1939174234867096,
0.19907642900943756,
0.09251490980386734,
-0.0634201392531395,
0.05481863394379616,
0.10534040629863739,
0.17465750873088837,
-0.24844670295715332,
-0.07368984073400497,
-0.27407562732696533,
-0.14591722190380096,
0.1666727364063263,
0.2971656024456024,
0.1072196364402771,
0.1978294849395752,
0.4174236059188843,
0.20191332697868347,
0.10857270658016205,
-0.12978263199329376,
0.2503230571746826,
0.27525901794433594,
-0.18862947821617126,
-0.05521081015467644,
-0.3241277039051056,
0.03132590651512146,
0.1045055240392685,
-0.00441439263522625,
0.07794816046953201,
0.38832351565361023,
-0.09973207116127014,
-0.4348517954349518,
-0.10897688567638397,
-0.06769299507141113,
0.015790142118930817,
0.26232802867889404,
0.0074177999049425125,
0.18374069035053253,
0.2127142697572708,
0.014768820255994797,
0.09690304100513458,
-0.3862099349498749,
-0.02877037227153778,
-0.2212098389863968,
0.17164641618728638,
-0.09548383951187134,
-0.031623221933841705,
0.27647656202316284,
-0.07547533512115479,
-0.026220563799142838,
-0.19670838117599487,
-0.06525237113237381,
0.43126732110977173,
-0.10909535735845566,
0.21681533753871918,
0.15278401970863342,
0.01936245895922184,
0.2711122930049896,
-0.37323352694511414,
0.04684240743517876,
-0.014993146993219852,
-0.03194798529148102,
0.16285642981529236,
-0.24286746978759766,
0.016750961542129517,
-0.020075516775250435,
-0.33339783549308777,
0.006514889188110828,
0.30650225281715393,
0.39017337560653687,
-0.01647457852959633,
0.1370619833469391,
-0.18203496932983398,
0.30000099539756775,
0.2873590886592865,
-0.12213743478059769,
-0.17860445380210876,
-0.06828184425830841,
0.18408672511577606,
0.23722577095031738,
-0.1459849774837494,
0.15284308791160583,
-0.19307640194892883,
-0.2229391187429428,
0.10946889966726303,
0.2067096084356308,
0.1275934875011444,
0.14657926559448242,
0.26694005727767944,
0.28666040301322937,
-0.13923826813697815,
-0.01755802147090435,
-0.3609708547592163,
-0.018008988350629807,
0.08698796480894089,
-0.061885904520750046,
0.10880818217992783,
-0.15097002685070038,
-0.09858251363039017,
-0.43414461612701416,
0.050603289157152176,
0.163438618183136,
0.09075136482715607,
-0.0912451222538948,
-0.48488500714302063,
-0.4680953621864319,
-0.27843984961509705,
0.2972492575645447,
0.16484491527080536,
0.143280029296875,
-0.4647088944911957,
0.2671385109424591,
0.3225805461406708,
0.017371108755469322,
0.1622926890850067,
-0.452440470457077,
0.23731976747512817,
0.20090973377227783,
0.048267289996147156,
-0.07098469883203506,
0.028763780370354652,
-0.004633099306374788,
0.2833496928215027,
-0.00859017577022314,
0.03808441385626793,
0.3172626495361328,
-0.2988784909248352,
0.2570110857486725,
-0.3558006286621094,
-0.2892584502696991,
0.22863233089447021,
0.07110178470611572,
-0.04411176219582558,
-0.08568601310253143,
0.135113924741745,
0.007966360077261925,
-0.012732748873531818,
0.09123475104570389,
-0.36364156007766724,
-0.11913259327411652,
-0.007636972237378359,
-0.05783383920788765,
-0.41422149538993835,
-0.1436578780412674,
-0.44922947883605957,
-0.2350849211215973,
-0.17135372757911682,
-0.09125103801488876,
0.2065986543893814,
0.08068589866161346,
-0.015054494142532349,
-0.10162584483623505,
0.13089755177497864,
0.00790263619273901,
-0.12729671597480774,
-0.3427191376686096,
-0.6485680937767029,
0.4185170531272888,
-0.17725922167301178,
-0.5927565693855286,
0.15618357062339783,
0.2033456563949585,
0.32218071818351746,
0.21193470060825348,
-0.39981576800346375,
-0.06343307346105576,
-0.10717930644750595,
0.025502022355794907,
0.4218766391277313,
0.12700845301151276,
0.16015709936618805,
-0.24883748590946198,
-0.2774847447872162,
-0.22380247712135315,
0.19637618958950043,
0.04603143781423569,
0.05402417853474617,
0.21174462139606476,
-0.24056708812713623,
-0.11993633955717087,
0.15525873005390167,
-0.0647764801979065,
-0.008451409637928009,
0.0640023872256279,
0.3036978244781494,
-0.14174792170524597,
0.2801530361175537,
0.0023857031483203173,
-0.1568954437971115,
0.3406967222690582,
-0.022857876494526863,
0.27558788657188416,
0.02451457269489765,
0.09576301276683807,
0.02110099606215954,
-0.12082600593566895,
0.028705710545182228,
-0.25452929735183716,
-0.12688617408275604,
-0.4803984463214874,
0.10118812322616577,
-0.07981137186288834,
0.1765141487121582,
0.13423678278923035,
-0.013762724585831165,
-0.13304583728313446,
0.15336498618125916,
0.19977812469005585,
-0.05301433801651001,
0.0996258333325386,
-0.585501492023468,
0.19746704399585724,
-0.33502331376075745,
0.3559013605117798,
-0.30338212847709656,
0.2180970311164856,
-0.31151142716407776,
0.09093263745307922,
0.18692412972450256,
-0.07076911628246307,
0.22298584878444672,
-0.2893142104148865,
0.15448997914791107,
0.14791905879974365,
-0.07089190930128098,
-0.21299365162849426,
0.04467214271426201,
-0.34430044889450073,
0.20429708063602448,
0.4097074270248413,
0.2015787810087204,
-0.21911385655403137,
0.16613757610321045,
0.2651592493057251,
0.07780860364437103,
-0.1793329417705536,
-0.02548489160835743,
-0.04353613033890724,
-0.2605612874031067,
-0.27849146723747253,
-0.22538964450359344,
-0.16423611342906952,
0.1826811283826828,
-0.09916958957910538,
-0.26680952310562134,
-0.24498650431632996,
-0.19101519882678986,
0.2915264964103699,
-0.011668466962873936,
0.17086786031723022,
0.06528955698013306,
0.22240954637527466,
0.19087453186511993,
-0.028363490477204323,
0.11936724931001663,
0.3375770151615143,
-0.04250888153910637,
0.0763581395149231,
0.2846345901489258,
-0.44787487387657166,
0.010898405686020851,
0.14191940426826477,
-0.16761845350265503,
-0.18284939229488373,
-0.037586115300655365,
-0.028708186000585556,
-0.010448488406836987,
0.3250168561935425,
0.20736540853977203,
0.016967101022601128,
-0.17242786288261414,
-0.24355408549308777,
0.35371696949005127,
0.16876457631587982,
0.04690460488200188,
0.5383304357528687,
0.2226855605840683,
0.17294128239154816,
-0.48659610748291016,
0.1573198139667511,
0.8075466156005859,
-0.17316029965877533,
-0.09362400323152542,
0.09504479914903641,
0.3492876887321472,
0.3182266354560852,
-0.32652905583381653,
0.11431525647640228,
0.03454478830099106,
-0.330720454454422,
-0.09460662305355072,
0.03339068219065666,
0.14888760447502136,
0.012785851955413818,
-0.08097661286592484,
0.13731689751148224,
0.05180554836988449,
0.003773700911551714,
0.15873460471630096,
0.08279737830162048,
-0.44455480575561523,
-0.06686469912528992,
0.17319175601005554,
0.31054794788360596,
0.10993100702762604,
0.3616698086261749,
0.034468941390514374,
-0.03856542333960533,
-0.04454531520605087,
-0.10998334735631943,
-0.14822514355182648,
0.28474554419517517,
0.23815186321735382,
0.2575335204601288,
-0.23946772515773773,
-0.19518840312957764,
-0.17963911592960358,
0.16144298017024994,
0.06354807317256927,
0.21434304118156433,
-0.33479824662208557,
0.2669498026371002,
-0.35145851969718933,
-0.4366728961467743,
0.14546141028404236,
0.13154184818267822,
0.14233043789863586,
-0.2733491361141205,
-0.2167760580778122,
0.20787224173545837,
0.21429845690727234,
-0.03574207052588463,
-0.1305091232061386,
-0.13196872174739838,
-0.030426811426877975,
-0.06270993500947952,
0.008857511915266514,
0.01972726359963417,
-0.03191781044006348,
-0.2605521082878113,
0.2533598244190216,
0.06802530586719513,
0.13315945863723755,
0.24862602353096008,
0.03544066101312637,
-0.17077645659446716,
-0.2624519169330597,
0.4128343462944031,
0.2623577117919922,
-0.11477937549352646,
0.22019077837467194,
-0.06453793495893478,
-0.1704961210489273,
-0.44652387499809265,
-0.22265739738941193,
0.04470561444759369,
-0.29705896973609924,
0.08069705218076706,
-0.3813954293727875,
-0.05132076516747475,
-0.014342526905238628,
0.237042635679245,
0.1474052220582962,
-0.25702694058418274,
0.0525532029569149,
-0.43072354793548584,
-0.19481249153614044,
0.13031302392482758,
0.0038843669462949038,
0.23779423534870148,
-0.10246063768863678,
0.06069169566035271,
0.14417794346809387,
-0.05826692655682564,
-0.46207383275032043,
0.04666738212108612,
-0.12777036428451538,
-0.30777838826179504,
0.19677139818668365,
0.08667755126953125,
0.20679128170013428,
-0.03578304126858711,
0.27418163418769836,
0.08217142522335052,
-0.10684826970100403,
-0.3040529489517212,
-0.06651747226715088,
0.0362815335392952,
0.1808212846517563,
-0.06168961152434349,
0.27513039112091064,
-0.1915154606103897,
-0.3736155927181244,
0.13720522820949554,
0.05680115520954132,
0.014181884005665779,
0.047179486602544785,
0.09500506520271301,
0.13794657588005066,
0.14169055223464966,
0.04128820449113846,
0.27680981159210205,
0.1648300141096115,
0.29582300782203674,
-0.1342681348323822,
0.08681224286556244,
0.11167065799236298,
-0.10797224193811417,
-0.4023881256580353,
-0.14384883642196655,
0.20497620105743408,
0.028943398967385292,
0.22679433226585388,
-0.12789970636367798,
0.26240313053131104,
0.09721671789884567,
0.240853950381279,
0.2408931404352188,
-0.09514842182397842,
0.09563815593719482,
0.09923698753118515,
0.3556007444858551,
-0.39969536662101746,
-0.2307218462228775,
0.008256088942289352,
0.2746630311012268,
0.008278648369014263,
-0.028453689068555832,
0.376816064119339,
-0.030816329643130302,
0.45596903562545776,
0.024832826107740402,
0.3777484595775604,
0.040441568940877914,
0.13950037956237793,
0.44643282890319824,
0.13601259887218475,
0.14573705196380615,
0.15290072560310364,
0.08694268018007278,
-0.1479819416999817,
0.5788336992263794,
-0.10751328617334366,
0.3067339062690735,
-0.007745516486465931,
0.06578388810157776,
0.051219355314970016,
-0.23482689261436462,
0.07128981500864029,
0.22621941566467285,
0.029542189091444016,
0.2049228996038437,
0.04275127872824669,
0.33760184049606323,
-0.34400704503059387,
0.22660696506500244,
-0.6715393662452698,
0.1515365093946457,
0.00875801220536232,
-0.07492461800575256,
-0.21059127151966095,
-0.24332107603549957,
0.14794859290122986,
0.09031583368778229,
0.07164540886878967,
-0.1622725874185562,
0.1700197160243988,
-0.041362419724464417,
-0.15951234102249146,
-0.5964983105659485,
0.03812528774142265,
0.1012030839920044,
-0.014509848318994045,
-0.051590725779533386,
0.10985702276229858,
0.21236836910247803,
0.1301274299621582,
0.18458303809165955,
0.44151797890663147,
0.101789690554142,
-0.05506562069058418,
0.11576466262340546,
-0.019065769389271736,
0.1011626198887825,
-0.1927109956741333,
-0.12491413205862045,
0.2931036949157715,
0.17108383774757385,
0.030177561566233635,
0.31682974100112915,
0.32963699102401733,
-0.30206331610679626,
-0.006116912234574556,
0.09733082354068756,
0.14952537417411804,
0.12977290153503418,
-0.13361917436122894,
-0.01959185115993023,
0.025299541652202606,
-0.10926266759634018,
-0.2314813733100891,
-0.3812354803085327,
0.06384585052728653,
0.05683648958802223,
-0.00963882077485323,
0.12873494625091553,
-0.1789563000202179,
0.1579931378364563,
-0.2067253142595291,
0.3389972448348999,
0.21538753807544708,
0.21635515987873077,
0.005721011199057102,
-0.3281818628311157,
-0.6047636270523071,
0.2472039759159088,
0.04056752845644951,
-0.42151206731796265,
-0.025977933779358864,
0.16689659655094147,
0.13207696378231049,
0.1900966763496399,
0.26390066742897034,
-0.10219826549291611,
0.0568685419857502,
0.04085559770464897,
-0.38684868812561035,
-0.007207645568996668,
0.27365100383758545,
0.12567661702632904,
-0.017088891938328743,
-0.16610458493232727,
0.24134749174118042,
0.07302529364824295,
0.15139177441596985,
-0.06962727755308151,
0.09472761303186417,
-0.11467428505420685,
0.06251159310340881,
0.3655823767185211,
-0.09637376666069031,
0.41899731755256653,
-0.21972039341926575,
0.012498714961111546,
-0.3019128143787384,
-0.23230984807014465,
-0.03192104771733284,
-0.14966686069965363,
0.32196280360221863,
-0.11540845036506653,
-0.19012285768985748,
0.17351134121418,
0.1224801167845726,
0.38183242082595825,
-0.0016143086832016706,
0.004409831017255783,
-0.3482213318347931,
0.11383286863565445,
-0.22073152661323547,
0.0729823186993599,
0.31875666975975037,
0.08364880084991455,
-0.09014671295881271,
-0.07112250477075577,
-0.12785044312477112,
-0.3159099221229553,
0.14186173677444458,
0.03349807485938072,
0.010894129984080791,
-0.3103409707546234,
0.052060943096876144,
0.3552204370498657,
0.06186196208000183,
-0.09868733584880829,
0.3148471415042877,
0.2756868004798889,
-0.13331441581249237,
-0.10549931973218918,
0.3337898254394531,
0.07609948515892029,
-0.11252900213003159,
-0.10495461523532867,
0.28618478775024414,
0.04294176399707794,
-0.30530452728271484,
0.08446977287530899,
-0.06264060735702515
] |
https://github.com/huggingface/datasets/issues/3227
|
Error in `Json(datasets.ArrowBasedBuilder)` class
|
I have additionally identified the source of the error, being that [this condition](https://github.com/huggingface/datasets/blob/fc46bba66ba4f432cc10501c16a677112e13984c/src/datasets/packaged_modules/json/json.py#L124-L126) in the file
`python3.8/site-packages/datasets/packaged_modules/json/json.py` is not being entered correctly:
```python
if (
isinstance(e, pa.ArrowInvalid)
and "straddling" not in str(e)
or block_size > len(batch)
):
```
From what I can tell, in my case the block_size simply needs to be increased, but the error message does not contain "straddling" so the condition does trigger correctly and we fail to reach [the line to increase block_size](https://github.com/huggingface/datasets/blob/fc46bba66ba4f432cc10501c16a677112e13984c/src/datasets/packaged_modules/json/json.py#L135).
Changing the condition above to simply
```python
if (
block_size > len(batch)
):
```
Fixes the error for me. I'm happy to create a PR containing this fix if the developers deem the other conditions unnecessary.
|
## Describe the bug
When a json file contains a `text` field that is larger than the block_size, the JSON dataset builder fails.
## Steps to reproduce the bug
Create a folder that contains the following:
```
.
├── testdata
│ └── mydata.json
└── test.py
```
Please download [this file](https://github.com/huggingface/datasets/files/7491797/mydata.txt) as `mydata.json`. (The error does not occur in JSON files with shorter text, but it is reproducible when the text is long as in the file I provide)
:exclamation: :exclamation: GitHub doesn't allow me to upload JSON so this file is a TXT, and you should rename it to `.json`!
`test.py` simply contains:
```python
from datasets import load_dataset
my_dataset = load_dataset("testdata")
```
To reproduce the error, simply run
```
python test.py
```
## Expected results
The data should load correctly without error.
## Actual results
The dataset builder fails with:
```
Using custom data configuration testdata-d490389b8ab4fd82
Downloading and preparing dataset json/testdata to /home/junshern.chan/.cache/huggingface/datasets/json/testdata-d490389b8ab4fd82/0.0.0/3333a8af0db9764dfcff43a42ff26228f0f2e267f0d8a0a294452d188beadb34...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2264.74it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 447.01it/s]
Failed to read file '/home/junshern.chan/hf-json-bug/testdata/mydata.json' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Missing a name for object member. in row 0
Traceback (most recent call last):
File "test.py", line 28, in <module>
my_dataset = load_dataset("testdata")
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/load.py", line 1632, in load_dataset
builder_instance.download_and_prepare(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 607, in download_and_prepare
self._download_and_prepare(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 1156, in _prepare_split
for key, table in utils.tqdm(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/tqdm/std.py", line 1168, in __iter__
for obj in iterable:
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(
ValueError: Not able to read records in the JSON file at /home/junshern.chan/hf-json-bug/testdata/mydata.json. You should probably indicate the field of the JSON file containing your records. This JSON file contain the following fields: ['text']. Select the correct one and provide it as `field='XXX'` to the dataset loading method.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.1
- Platform: Linux-5.8.0-63-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 6.0.0
| 113 |
Error in `Json(datasets.ArrowBasedBuilder)` class
|
[
-0.3248344361782074,
0.4674932062625885,
-0.2777981162071228,
0.17640066146850586,
0.029702555388212204,
0.1621495485305786,
0.057088710367679596,
0.49873653054237366,
-0.05062548816204071,
-0.020655076950788498,
0.2135094553232193,
0.5520004034042358,
-0.027363363653421402,
-0.13406044244766235,
-0.18297074735164642,
-0.04805346205830574,
-0.0038970510940998793,
0.3275459408760071,
-0.13081377744674683,
-0.038842782378196716,
-0.19679565727710724,
0.3334130346775055,
-0.18270020186901093,
0.3406955301761627,
-0.16177687048912048,
-0.33625921607017517,
0.24993811547756195,
-0.037667106837034225,
-0.35811474919319153,
-0.4949508011341095,
0.3251485228538513,
-0.13185687363147736,
-0.08815760910511017,
0.27442389726638794,
-0.00010058836051030084,
0.1559455245733261,
0.35352611541748047,
0.20214027166366577,
-0.359828919172287,
0.10329999029636383,
-0.14247554540634155,
-0.0020581597927957773,
0.349152147769928,
-0.18285368382930756,
0.0875234454870224,
-0.7308921217918396,
-0.014570685103535652,
-0.2875713109970093,
0.3363379240036011,
0.20259615778923035,
0.34266164898872375,
-0.152143195271492,
0.21077774465084076,
-0.16481193900108337,
0.29559412598609924,
-0.0004483666562009603,
-0.13498736917972565,
0.2691802382469177,
0.07679864019155502,
0.35574233531951904,
-0.21636703610420227,
0.3583313226699829,
0.07720106840133667,
0.20038801431655884,
0.10018358379602432,
-0.027276596054434776,
0.05031640827655792,
0.09671071916818619,
0.22729697823524475,
-0.17222827672958374,
0.6491596102714539,
-0.3391755223274231,
-0.18421810865402222,
0.16838723421096802,
0.08424830436706543,
0.029129138216376305,
0.1384863704442978,
-0.03371872007846832,
0.12520228326320648,
0.0931515321135521,
-0.1267695426940918,
-0.2723194360733032,
-0.17715609073638916,
0.10173200815916061,
0.10924612730741501,
0.035461895167827606,
-0.26280590891838074,
0.141599640250206,
0.04820093512535095,
-0.19299134612083435,
0.3687663972377777,
0.04955265671014786,
-0.4941267669200897,
-0.024177467450499535,
-0.027710720896720886,
-0.13023433089256287,
-0.000014188000932335854,
-0.13952292501926422,
0.07403923571109772,
0.2904617488384247,
0.2534521520137787,
0.0785076841711998,
0.03192627802491188,
0.13164865970611572,
0.29548904299736023,
-0.0856257975101471,
0.2693692445755005,
0.1777883768081665,
0.2702212333679199,
0.11695221811532974,
-0.14294999837875366,
-0.011436942964792252,
-0.009727486409246922,
-0.2947547137737274,
0.21807727217674255,
-0.09760668873786926,
0.2538984715938568,
-0.16091850399971008,
-0.08163277059793472,
0.18022912740707397,
-0.25965216755867004,
-0.04151913523674011,
0.10949613898992538,
0.22621886432170868,
0.19964803755283356,
-0.23550786077976227,
0.2557620406150818,
0.22176799178123474,
0.18088291585445404,
-0.2884542942047119,
-0.26674291491508484,
0.0226154588162899,
-0.11455776542425156,
-0.22537575662136078,
0.07089997828006744,
0.0816756933927536,
0.23148997128009796,
0.03340161219239235,
-0.17639166116714478,
-0.07764297723770142,
0.31098684668540955,
-0.01976054161787033,
-0.06421558558940887,
0.18091264367103577,
-0.1537180095911026,
0.03958806395530701,
0.1355947107076645,
-0.15719549357891083,
-0.021064631640911102,
0.007600837387144566,
-0.13498888909816742,
-0.16365885734558105,
-0.25746673345565796,
0.2913666367530823,
0.29164716601371765,
0.0935591533780098,
-0.4442603588104248,
0.06929367780685425,
-0.026681749150156975,
-0.2903725802898407,
0.16141360998153687,
-0.04371919482946396,
0.3830164968967438,
-0.1337488889694214,
-0.19126145541667938,
-0.10053732991218567,
-0.4254503846168518,
-0.0534319207072258,
-0.2222243994474411,
-0.20570911467075348,
0.06689929962158203,
0.07448042184114456,
-0.36364254355430603,
0.3776884973049164,
-0.13231684267520905,
0.2640363276004791,
0.550847053527832,
-0.08170288801193237,
-0.39256271719932556,
0.2355983555316925,
0.05102820321917534,
-0.4176904559135437,
-0.2053692489862442,
0.02559865638613701,
0.018748722970485687,
0.19181139767169952,
0.06349750608205795,
0.07231096923351288,
0.13749295473098755,
0.009645952843129635,
-0.08251418173313141,
-0.13453763723373413,
-0.07620793581008911,
0.24824324250221252,
-0.153598815202713,
-0.14212539792060852,
0.2768632173538208,
-0.011490117758512497,
-0.034632086753845215,
-0.22244592010974884,
0.12534935772418976,
0.3411702513694763,
0.13124015927314758,
-0.2985304892063141,
-0.04114321619272232,
-0.024186182767152786,
-0.5173112750053406,
-0.13255372643470764,
-0.12731914222240448,
-0.11634818464517593,
-0.3534455895423889,
0.0667419284582138,
-0.08311282098293304,
0.2138918787240982,
-0.11510465294122696,
0.1121380403637886,
0.34430843591690063,
0.09087491035461426,
-0.035880256444215775,
-0.04576960206031799,
-0.16419370472431183,
-0.034028638154268265,
-0.17838838696479797,
0.15298977494239807,
-0.20370809733867645,
0.11258526146411896,
-0.12328343093395233,
-0.2831367254257202,
0.08416463434696198,
-0.21187226474285126,
0.06471587717533112,
-0.2124875783920288,
-0.28912368416786194,
0.29114434123039246,
0.0638640895485878,
-0.23176832497119904,
0.38582631945610046,
-0.0474197119474411,
-0.1937069296836853,
-0.257472962141037,
0.15020301938056946,
0.09543557465076447,
0.05839749053120613,
-0.012051180005073547,
0.1359717845916748,
0.24893103539943695,
0.06967104971408844,
0.013896939344704151,
-0.16495880484580994,
0.06449718773365021,
0.396019846200943,
0.17138579487800598,
-0.13256454467773438,
-0.20354461669921875,
-0.041832949966192245,
-0.24760757386684418,
0.203890860080719,
-0.07762321829795837,
-0.15917228162288666,
-0.10673972219228745,
0.4014250338077545,
0.09659388661384583,
0.26957055926322937,
0.021344583481550217,
-0.09099666774272919,
-0.06053776293992996,
0.22546258568763733,
0.3803284168243408,
0.2624932527542114,
0.11730720847845078,
-0.13301841914653778,
-0.07443651556968689,
0.07349822670221329,
-0.07776937633752823,
0.27091360092163086,
-0.11364970356225967,
0.4400603175163269,
0.053828466683626175,
0.045770466327667236,
-0.22883184254169464,
-0.4138503670692444,
-0.24776655435562134,
0.08662548661231995,
0.1809406727552414,
0.008275048807263374,
0.050117138773202896,
-0.30776548385620117,
0.09859821945428848,
0.20573966205120087,
-0.3104127049446106,
0.007757596671581268,
-0.21409481763839722,
0.04441121593117714,
-0.018686996772885323,
-0.31777286529541016,
0.19535070657730103,
-0.24532781541347504,
0.19867560267448425,
0.1521114856004715,
-0.0025221321266144514,
-0.17215558886528015,
-0.14496897161006927,
-0.2342109978199005,
0.16748812794685364,
0.14296987652778625,
-0.04179917648434639,
0.0750807598233223,
-0.04922671616077423,
0.25294652581214905,
-0.42804497480392456,
-0.149799644947052,
0.13749711215496063,
0.005751837510615587,
0.05562513321638107,
0.4510669708251953,
-0.06505350768566132,
-0.4572056531906128,
-0.345281720161438,
0.21429142355918884,
-0.282162070274353,
-0.30011066794395447,
0.08988359570503235,
-0.01721280813217163,
-0.12985725700855255,
-0.006242769304662943,
-0.2325015813112259,
0.051220040768384933,
-0.21494010090827942,
0.35468876361846924,
0.10059623420238495,
0.09410087019205093,
-0.04875094071030617,
0.1893634796142578,
0.3669365346431732,
-0.04073375090956688,
0.08333652466535568,
-0.19875368475914001,
-0.09307993203401566,
0.1895703822374344,
-0.18805336952209473,
-0.17030274868011475,
0.2242516726255417,
-0.16269725561141968,
0.5384225249290466,
-0.1152225062251091,
-0.47727537155151367,
0.17414143681526184,
0.0393962599337101,
0.12838377058506012,
-0.2053370475769043,
-0.1403885781764984,
0.1117609441280365,
0.24124281108379364,
-0.25658226013183594,
-0.12291089445352554,
-0.24686846137046814,
0.1725936084985733,
-0.1835329830646515,
0.1128554418683052,
-0.19228054583072662,
0.4350614547729492,
-0.29041168093681335,
0.3461341857910156,
-0.06763306260108948,
-0.1386774182319641,
0.20357735455036163,
0.1110202744603157,
0.13250137865543365,
-0.14908839762210846,
-0.025784188881516457,
-0.1930268555879593,
0.05201798677444458,
-0.17422184348106384,
-0.05308394879102707,
-0.2350718379020691,
-0.3374306559562683,
0.08926358819007874,
-0.05435843765735626,
-0.30474144220352173,
-0.1647709608078003,
-0.05276080220937729,
-0.20263731479644775,
-0.12170945107936859,
-0.03192811459302902,
-0.011818724684417248,
-0.07319695502519608,
0.26138296723365784,
0.111932672560215,
-0.19593848288059235,
-0.137691929936409,
-0.0739903450012207,
-0.2896983027458191,
-0.1605159044265747,
-0.1944829672574997,
0.33767178654670715,
-0.3008013963699341,
0.2525731325149536,
0.02493765950202942,
0.2188539206981659,
0.12147966027259827,
-0.14194868505001068,
0.2653430104255676,
-0.14926673471927643,
-0.03738651052117348,
0.11025425046682358,
0.011904729530215263,
-0.1400964856147766,
-0.01456280704587698,
-0.20803824067115784,
0.4753952622413635,
0.008645143359899521,
0.09046845883131027,
-0.35623225569725037,
-0.10659798979759216,
0.17071616649627686,
-0.3211759328842163,
0.034760069102048874,
0.0884830504655838,
0.00948722381144762,
-0.23570451140403748,
-0.24511441588401794,
0.031865380704402924,
0.2873135507106781,
0.1231369599699974,
0.2814062535762787,
-0.27309292554855347,
-0.3361704647541046,
0.11156615614891052,
-0.210563063621521,
0.029795369133353233,
0.3274141550064087,
-0.10941620171070099,
-0.08096415549516678,
-0.11179359257221222,
0.19953064620494843,
0.5230335593223572,
0.5319032073020935,
0.33186981081962585,
-0.19043198227882385,
0.28743425011634827,
-0.07693593204021454,
0.18949823081493378,
0.02415279857814312,
-0.18830838799476624,
0.03943287581205368,
0.07083237916231155,
0.0942324697971344,
0.29353511333465576,
-0.13361810147762299,
0.42058977484703064,
-0.025619300082325935,
-0.0562271773815155,
-0.1311006397008896,
0.47439974546432495,
0.01992511935532093,
0.014032910577952862,
0.4163001477718353,
0.28513219952583313,
-0.17136992514133453,
0.28690680861473083,
0.3132723271846771,
0.5328684449195862,
0.28600654006004333,
-0.020405767485499382,
0.23699387907981873,
-0.41759589314460754,
0.2832029163837433,
-0.260934978723526,
0.06212214007973671,
-0.3225612938404083,
0.06094959005713463,
-0.010106060653924942,
-0.20240415632724762,
0.19497650861740112,
0.42169705033302307,
-0.1412174552679062,
-0.12770681083202362,
-0.04310745745897293,
0.02823452651500702,
-0.23202136158943176,
0.06772308796644211,
-0.12274976819753647,
-0.13795106112957,
-0.32352539896965027,
0.3260352313518524,
-0.21258562803268433,
-0.24620677530765533,
-0.1804663985967636,
-0.19478489458560944,
-0.09331951290369034,
-0.27242276072502136,
-0.15524424612522125,
0.19282719492912292,
-0.05005411058664322,
0.44654035568237305,
0.38273802399635315,
0.016503194347023964,
0.17828696966171265,
-0.13370797038078308,
0.06766923516988754,
-0.07705777883529663,
-0.04004645720124245,
0.170305535197258,
-0.09585248678922653,
-0.06844709813594818,
-0.20258112251758575,
0.08066608756780624,
0.30437183380126953,
-0.14959141612052917,
-0.1074114665389061,
0.16196396946907043,
-0.1972346007823944,
-0.3836766481399536,
0.40915706753730774,
0.15781627595424652,
-0.25987786054611206,
-0.3281537890434265,
-0.2318144142627716,
-0.02567426674067974,
-0.15762683749198914,
-0.16804514825344086,
0.26415637135505676,
0.11740624904632568,
-0.1579713225364685,
-0.05613274872303009,
0.3540249168872833,
-0.20343928039073944,
0.05976910516619682,
0.19130760431289673,
0.10465210676193237,
0.17657586932182312,
0.6203182339668274,
-0.038904979825019836,
-0.13542301952838898,
-0.39868244528770447,
-0.0302854236215353,
0.7630382776260376,
-0.538061261177063,
0.41907382011413574,
-0.16347560286521912,
-0.16848081350326538,
0.21060582995414734,
0.2069593071937561,
0.22799940407276154,
0.28726062178611755,
-0.10607364773750305,
-0.05242395028471947,
-0.3762548267841339,
0.4132158160209656,
-0.10215197503566742,
0.15830956399440765,
0.01316530629992485,
-0.22268329560756683,
0.02375653386116028,
-0.05135342851281166,
-0.41627997159957886,
0.09918981790542603,
-0.3120327293872833,
-0.05576115474104881,
-0.4229070842266083,
0.024329479783773422,
-0.07624474912881851,
0.18243485689163208,
0.20604738593101501,
0.07665681093931198,
-0.33717969059944153,
-0.32477501034736633,
0.0993572324514389,
0.02902534417808056,
0.26322269439697266,
-0.006053259130567312,
-0.0669264867901802,
-0.192812979221344,
-0.2138662189245224,
0.10132130235433578,
-0.05935993045568466,
-0.19502824544906616,
0.15941856801509857,
0.03378383815288544,
0.33053895831108093,
-0.10781488567590714,
-0.003314363304525614,
-0.13133545219898224,
0.06567476689815521,
0.16227319836616516,
-0.1319914162158966,
0.018533075228333473,
0.08875222504138947,
-0.11108333617448807,
0.13342852890491486,
0.1578034907579422,
-0.1176018938422203,
0.2429000288248062,
0.2548682391643524,
-0.5540682077407837,
-0.11678355932235718,
0.17269204556941986,
0.21868431568145752,
0.21094225347042084,
-0.2732580602169037,
-0.21263916790485382,
-0.17615841329097748,
0.32615920901298523,
-0.2338826209306717,
-0.2679815888404846,
0.18323032557964325,
0.023048754781484604,
-0.12580296397209167,
-0.13288989663124084,
0.03751249238848686,
-0.06378821283578873,
-0.05073873698711395,
0.1748397797346115,
0.04795826971530914,
-0.18349948525428772,
0.154278963804245,
0.4500064551830292,
-0.19803890585899353,
-0.009128794074058533,
0.5984700322151184,
0.39249423146247864,
0.3464128375053406,
0.3567618429660797,
-0.2054257094860077,
0.1348450630903244,
0.37838467955589294,
0.021855801343917847,
0.052506543695926666,
-0.086479052901268,
0.11632919311523438,
0.19236430525779724,
0.23622506856918335,
-0.025618569925427437,
0.26087307929992676,
0.1376238465309143,
0.0260635893791914,
-0.16678212583065033,
-0.29161810874938965,
0.014225751161575317,
-0.21156422793865204,
0.07058178633451462,
-0.33083605766296387,
-0.0592808723449707,
-0.14573922753334045,
-0.05431520938873291,
-0.32553812861442566,
0.1366245001554489,
0.05496137589216232,
-0.12621822953224182,
-0.037721969187259674,
-0.3942912518978119,
0.3736429810523987,
0.007271815091371536,
-0.04525897279381752,
-0.08960384875535965,
0.2221170961856842,
0.06919203698635101,
-0.06098375469446182,
-0.009235942736268044,
0.49979013204574585,
0.2638121545314789,
0.14508536458015442,
-0.016273947432637215,
-0.11723678559064865,
-0.07092239707708359,
-0.24605301022529602,
-0.020714906975626945,
0.2721758782863617,
0.30108678340911865,
-0.19723771512508392,
0.16810527443885803,
0.2901592254638672,
-0.17556998133659363,
0.12586376070976257,
0.06661691516637802,
0.2633209228515625,
0.3124672770500183,
0.05729258805513382,
-0.18984098732471466,
-0.08579716831445694,
-0.1587362140417099,
0.017504585906863213,
-0.1776157170534134,
-0.29484111070632935,
0.22763897478580475,
-0.21397186815738678,
-0.04229333996772766,
-0.22519418597221375,
0.15971645712852478,
-0.14027927815914154,
0.5283666253089905,
0.2610134780406952,
0.036971207708120346,
-0.04986265301704407,
-0.3226332366466522,
-0.1636398732662201,
0.19195561110973358,
-0.11520157009363174,
0.0670309066772461,
0.23472252488136292,
0.3425343930721283,
0.19535179436206818,
-0.05995292589068413,
0.4146330654621124,
0.11556661874055862,
-0.23968859016895294,
0.05602599307894707,
-0.3202211558818817,
0.031230110675096512,
0.3492659032344818,
0.07949569821357727,
0.07222386449575424,
-0.11477334052324295,
0.14225013554096222,
0.2437829226255417,
0.1515597403049469,
-0.13136368989944458,
-0.13106049597263336,
-0.05413956195116043,
-0.23717756569385529,
0.5633244514465332,
-0.09742891788482666,
-0.03913763165473938,
-0.09831959754228592,
-0.09833437949419022,
-0.0825556144118309,
-0.46107223629951477,
-0.07453884929418564,
0.40173932909965515,
0.12738358974456787,
0.4352622628211975,
0.049666956067085266,
0.3076635003089905,
-0.11385327577590942,
-0.06293586641550064,
-0.14718957245349884,
0.2135951966047287,
-0.2992926239967346,
0.26183003187179565,
-0.2557271122932434,
0.05850488319993019,
-0.09321806579828262,
-0.13208937644958496,
0.03742131590843201,
0.13554640114307404,
-0.280945748090744,
-0.32185494899749756,
0.47264528274536133,
0.07670105993747711,
-0.21887177228927612,
0.2491440623998642,
0.10989972203969955,
0.4435168206691742,
-0.3651801347732544,
-0.31022995710372925,
0.10424011945724487,
0.1832617074251175,
-0.15231238305568695,
-0.1397077441215515,
0.05869176611304283,
-0.049844760447740555,
0.1400386244058609,
0.018894556909799576,
0.5230399966239929,
-0.08196964114904404,
-0.04417669400572777,
-0.1829564869403839,
-0.1576000452041626
] |
https://github.com/huggingface/datasets/issues/3227
|
Error in `Json(datasets.ArrowBasedBuilder)` class
|
Hi ! I think the issue comes from the fact that your JSON file is not a valid JSON Lines file.
Each example should be on one single line.
Can you try fixing the format to have one line per example and try again ?
|
## Describe the bug
When a json file contains a `text` field that is larger than the block_size, the JSON dataset builder fails.
## Steps to reproduce the bug
Create a folder that contains the following:
```
.
├── testdata
│ └── mydata.json
└── test.py
```
Please download [this file](https://github.com/huggingface/datasets/files/7491797/mydata.txt) as `mydata.json`. (The error does not occur in JSON files with shorter text, but it is reproducible when the text is long as in the file I provide)
:exclamation: :exclamation: GitHub doesn't allow me to upload JSON so this file is a TXT, and you should rename it to `.json`!
`test.py` simply contains:
```python
from datasets import load_dataset
my_dataset = load_dataset("testdata")
```
To reproduce the error, simply run
```
python test.py
```
## Expected results
The data should load correctly without error.
## Actual results
The dataset builder fails with:
```
Using custom data configuration testdata-d490389b8ab4fd82
Downloading and preparing dataset json/testdata to /home/junshern.chan/.cache/huggingface/datasets/json/testdata-d490389b8ab4fd82/0.0.0/3333a8af0db9764dfcff43a42ff26228f0f2e267f0d8a0a294452d188beadb34...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2264.74it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 447.01it/s]
Failed to read file '/home/junshern.chan/hf-json-bug/testdata/mydata.json' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Missing a name for object member. in row 0
Traceback (most recent call last):
File "test.py", line 28, in <module>
my_dataset = load_dataset("testdata")
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/load.py", line 1632, in load_dataset
builder_instance.download_and_prepare(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 607, in download_and_prepare
self._download_and_prepare(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 1156, in _prepare_split
for key, table in utils.tqdm(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/tqdm/std.py", line 1168, in __iter__
for obj in iterable:
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(
ValueError: Not able to read records in the JSON file at /home/junshern.chan/hf-json-bug/testdata/mydata.json. You should probably indicate the field of the JSON file containing your records. This JSON file contain the following fields: ['text']. Select the correct one and provide it as `field='XXX'` to the dataset loading method.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.1
- Platform: Linux-5.8.0-63-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 6.0.0
| 45 |
Error in `Json(datasets.ArrowBasedBuilder)` class
|
[
-0.3248344361782074,
0.4674932062625885,
-0.2777981162071228,
0.17640066146850586,
0.029702555388212204,
0.1621495485305786,
0.057088710367679596,
0.49873653054237366,
-0.05062548816204071,
-0.020655076950788498,
0.2135094553232193,
0.5520004034042358,
-0.027363363653421402,
-0.13406044244766235,
-0.18297074735164642,
-0.04805346205830574,
-0.0038970510940998793,
0.3275459408760071,
-0.13081377744674683,
-0.038842782378196716,
-0.19679565727710724,
0.3334130346775055,
-0.18270020186901093,
0.3406955301761627,
-0.16177687048912048,
-0.33625921607017517,
0.24993811547756195,
-0.037667106837034225,
-0.35811474919319153,
-0.4949508011341095,
0.3251485228538513,
-0.13185687363147736,
-0.08815760910511017,
0.27442389726638794,
-0.00010058836051030084,
0.1559455245733261,
0.35352611541748047,
0.20214027166366577,
-0.359828919172287,
0.10329999029636383,
-0.14247554540634155,
-0.0020581597927957773,
0.349152147769928,
-0.18285368382930756,
0.0875234454870224,
-0.7308921217918396,
-0.014570685103535652,
-0.2875713109970093,
0.3363379240036011,
0.20259615778923035,
0.34266164898872375,
-0.152143195271492,
0.21077774465084076,
-0.16481193900108337,
0.29559412598609924,
-0.0004483666562009603,
-0.13498736917972565,
0.2691802382469177,
0.07679864019155502,
0.35574233531951904,
-0.21636703610420227,
0.3583313226699829,
0.07720106840133667,
0.20038801431655884,
0.10018358379602432,
-0.027276596054434776,
0.05031640827655792,
0.09671071916818619,
0.22729697823524475,
-0.17222827672958374,
0.6491596102714539,
-0.3391755223274231,
-0.18421810865402222,
0.16838723421096802,
0.08424830436706543,
0.029129138216376305,
0.1384863704442978,
-0.03371872007846832,
0.12520228326320648,
0.0931515321135521,
-0.1267695426940918,
-0.2723194360733032,
-0.17715609073638916,
0.10173200815916061,
0.10924612730741501,
0.035461895167827606,
-0.26280590891838074,
0.141599640250206,
0.04820093512535095,
-0.19299134612083435,
0.3687663972377777,
0.04955265671014786,
-0.4941267669200897,
-0.024177467450499535,
-0.027710720896720886,
-0.13023433089256287,
-0.000014188000932335854,
-0.13952292501926422,
0.07403923571109772,
0.2904617488384247,
0.2534521520137787,
0.0785076841711998,
0.03192627802491188,
0.13164865970611572,
0.29548904299736023,
-0.0856257975101471,
0.2693692445755005,
0.1777883768081665,
0.2702212333679199,
0.11695221811532974,
-0.14294999837875366,
-0.011436942964792252,
-0.009727486409246922,
-0.2947547137737274,
0.21807727217674255,
-0.09760668873786926,
0.2538984715938568,
-0.16091850399971008,
-0.08163277059793472,
0.18022912740707397,
-0.25965216755867004,
-0.04151913523674011,
0.10949613898992538,
0.22621886432170868,
0.19964803755283356,
-0.23550786077976227,
0.2557620406150818,
0.22176799178123474,
0.18088291585445404,
-0.2884542942047119,
-0.26674291491508484,
0.0226154588162899,
-0.11455776542425156,
-0.22537575662136078,
0.07089997828006744,
0.0816756933927536,
0.23148997128009796,
0.03340161219239235,
-0.17639166116714478,
-0.07764297723770142,
0.31098684668540955,
-0.01976054161787033,
-0.06421558558940887,
0.18091264367103577,
-0.1537180095911026,
0.03958806395530701,
0.1355947107076645,
-0.15719549357891083,
-0.021064631640911102,
0.007600837387144566,
-0.13498888909816742,
-0.16365885734558105,
-0.25746673345565796,
0.2913666367530823,
0.29164716601371765,
0.0935591533780098,
-0.4442603588104248,
0.06929367780685425,
-0.026681749150156975,
-0.2903725802898407,
0.16141360998153687,
-0.04371919482946396,
0.3830164968967438,
-0.1337488889694214,
-0.19126145541667938,
-0.10053732991218567,
-0.4254503846168518,
-0.0534319207072258,
-0.2222243994474411,
-0.20570911467075348,
0.06689929962158203,
0.07448042184114456,
-0.36364254355430603,
0.3776884973049164,
-0.13231684267520905,
0.2640363276004791,
0.550847053527832,
-0.08170288801193237,
-0.39256271719932556,
0.2355983555316925,
0.05102820321917534,
-0.4176904559135437,
-0.2053692489862442,
0.02559865638613701,
0.018748722970485687,
0.19181139767169952,
0.06349750608205795,
0.07231096923351288,
0.13749295473098755,
0.009645952843129635,
-0.08251418173313141,
-0.13453763723373413,
-0.07620793581008911,
0.24824324250221252,
-0.153598815202713,
-0.14212539792060852,
0.2768632173538208,
-0.011490117758512497,
-0.034632086753845215,
-0.22244592010974884,
0.12534935772418976,
0.3411702513694763,
0.13124015927314758,
-0.2985304892063141,
-0.04114321619272232,
-0.024186182767152786,
-0.5173112750053406,
-0.13255372643470764,
-0.12731914222240448,
-0.11634818464517593,
-0.3534455895423889,
0.0667419284582138,
-0.08311282098293304,
0.2138918787240982,
-0.11510465294122696,
0.1121380403637886,
0.34430843591690063,
0.09087491035461426,
-0.035880256444215775,
-0.04576960206031799,
-0.16419370472431183,
-0.034028638154268265,
-0.17838838696479797,
0.15298977494239807,
-0.20370809733867645,
0.11258526146411896,
-0.12328343093395233,
-0.2831367254257202,
0.08416463434696198,
-0.21187226474285126,
0.06471587717533112,
-0.2124875783920288,
-0.28912368416786194,
0.29114434123039246,
0.0638640895485878,
-0.23176832497119904,
0.38582631945610046,
-0.0474197119474411,
-0.1937069296836853,
-0.257472962141037,
0.15020301938056946,
0.09543557465076447,
0.05839749053120613,
-0.012051180005073547,
0.1359717845916748,
0.24893103539943695,
0.06967104971408844,
0.013896939344704151,
-0.16495880484580994,
0.06449718773365021,
0.396019846200943,
0.17138579487800598,
-0.13256454467773438,
-0.20354461669921875,
-0.041832949966192245,
-0.24760757386684418,
0.203890860080719,
-0.07762321829795837,
-0.15917228162288666,
-0.10673972219228745,
0.4014250338077545,
0.09659388661384583,
0.26957055926322937,
0.021344583481550217,
-0.09099666774272919,
-0.06053776293992996,
0.22546258568763733,
0.3803284168243408,
0.2624932527542114,
0.11730720847845078,
-0.13301841914653778,
-0.07443651556968689,
0.07349822670221329,
-0.07776937633752823,
0.27091360092163086,
-0.11364970356225967,
0.4400603175163269,
0.053828466683626175,
0.045770466327667236,
-0.22883184254169464,
-0.4138503670692444,
-0.24776655435562134,
0.08662548661231995,
0.1809406727552414,
0.008275048807263374,
0.050117138773202896,
-0.30776548385620117,
0.09859821945428848,
0.20573966205120087,
-0.3104127049446106,
0.007757596671581268,
-0.21409481763839722,
0.04441121593117714,
-0.018686996772885323,
-0.31777286529541016,
0.19535070657730103,
-0.24532781541347504,
0.19867560267448425,
0.1521114856004715,
-0.0025221321266144514,
-0.17215558886528015,
-0.14496897161006927,
-0.2342109978199005,
0.16748812794685364,
0.14296987652778625,
-0.04179917648434639,
0.0750807598233223,
-0.04922671616077423,
0.25294652581214905,
-0.42804497480392456,
-0.149799644947052,
0.13749711215496063,
0.005751837510615587,
0.05562513321638107,
0.4510669708251953,
-0.06505350768566132,
-0.4572056531906128,
-0.345281720161438,
0.21429142355918884,
-0.282162070274353,
-0.30011066794395447,
0.08988359570503235,
-0.01721280813217163,
-0.12985725700855255,
-0.006242769304662943,
-0.2325015813112259,
0.051220040768384933,
-0.21494010090827942,
0.35468876361846924,
0.10059623420238495,
0.09410087019205093,
-0.04875094071030617,
0.1893634796142578,
0.3669365346431732,
-0.04073375090956688,
0.08333652466535568,
-0.19875368475914001,
-0.09307993203401566,
0.1895703822374344,
-0.18805336952209473,
-0.17030274868011475,
0.2242516726255417,
-0.16269725561141968,
0.5384225249290466,
-0.1152225062251091,
-0.47727537155151367,
0.17414143681526184,
0.0393962599337101,
0.12838377058506012,
-0.2053370475769043,
-0.1403885781764984,
0.1117609441280365,
0.24124281108379364,
-0.25658226013183594,
-0.12291089445352554,
-0.24686846137046814,
0.1725936084985733,
-0.1835329830646515,
0.1128554418683052,
-0.19228054583072662,
0.4350614547729492,
-0.29041168093681335,
0.3461341857910156,
-0.06763306260108948,
-0.1386774182319641,
0.20357735455036163,
0.1110202744603157,
0.13250137865543365,
-0.14908839762210846,
-0.025784188881516457,
-0.1930268555879593,
0.05201798677444458,
-0.17422184348106384,
-0.05308394879102707,
-0.2350718379020691,
-0.3374306559562683,
0.08926358819007874,
-0.05435843765735626,
-0.30474144220352173,
-0.1647709608078003,
-0.05276080220937729,
-0.20263731479644775,
-0.12170945107936859,
-0.03192811459302902,
-0.011818724684417248,
-0.07319695502519608,
0.26138296723365784,
0.111932672560215,
-0.19593848288059235,
-0.137691929936409,
-0.0739903450012207,
-0.2896983027458191,
-0.1605159044265747,
-0.1944829672574997,
0.33767178654670715,
-0.3008013963699341,
0.2525731325149536,
0.02493765950202942,
0.2188539206981659,
0.12147966027259827,
-0.14194868505001068,
0.2653430104255676,
-0.14926673471927643,
-0.03738651052117348,
0.11025425046682358,
0.011904729530215263,
-0.1400964856147766,
-0.01456280704587698,
-0.20803824067115784,
0.4753952622413635,
0.008645143359899521,
0.09046845883131027,
-0.35623225569725037,
-0.10659798979759216,
0.17071616649627686,
-0.3211759328842163,
0.034760069102048874,
0.0884830504655838,
0.00948722381144762,
-0.23570451140403748,
-0.24511441588401794,
0.031865380704402924,
0.2873135507106781,
0.1231369599699974,
0.2814062535762787,
-0.27309292554855347,
-0.3361704647541046,
0.11156615614891052,
-0.210563063621521,
0.029795369133353233,
0.3274141550064087,
-0.10941620171070099,
-0.08096415549516678,
-0.11179359257221222,
0.19953064620494843,
0.5230335593223572,
0.5319032073020935,
0.33186981081962585,
-0.19043198227882385,
0.28743425011634827,
-0.07693593204021454,
0.18949823081493378,
0.02415279857814312,
-0.18830838799476624,
0.03943287581205368,
0.07083237916231155,
0.0942324697971344,
0.29353511333465576,
-0.13361810147762299,
0.42058977484703064,
-0.025619300082325935,
-0.0562271773815155,
-0.1311006397008896,
0.47439974546432495,
0.01992511935532093,
0.014032910577952862,
0.4163001477718353,
0.28513219952583313,
-0.17136992514133453,
0.28690680861473083,
0.3132723271846771,
0.5328684449195862,
0.28600654006004333,
-0.020405767485499382,
0.23699387907981873,
-0.41759589314460754,
0.2832029163837433,
-0.260934978723526,
0.06212214007973671,
-0.3225612938404083,
0.06094959005713463,
-0.010106060653924942,
-0.20240415632724762,
0.19497650861740112,
0.42169705033302307,
-0.1412174552679062,
-0.12770681083202362,
-0.04310745745897293,
0.02823452651500702,
-0.23202136158943176,
0.06772308796644211,
-0.12274976819753647,
-0.13795106112957,
-0.32352539896965027,
0.3260352313518524,
-0.21258562803268433,
-0.24620677530765533,
-0.1804663985967636,
-0.19478489458560944,
-0.09331951290369034,
-0.27242276072502136,
-0.15524424612522125,
0.19282719492912292,
-0.05005411058664322,
0.44654035568237305,
0.38273802399635315,
0.016503194347023964,
0.17828696966171265,
-0.13370797038078308,
0.06766923516988754,
-0.07705777883529663,
-0.04004645720124245,
0.170305535197258,
-0.09585248678922653,
-0.06844709813594818,
-0.20258112251758575,
0.08066608756780624,
0.30437183380126953,
-0.14959141612052917,
-0.1074114665389061,
0.16196396946907043,
-0.1972346007823944,
-0.3836766481399536,
0.40915706753730774,
0.15781627595424652,
-0.25987786054611206,
-0.3281537890434265,
-0.2318144142627716,
-0.02567426674067974,
-0.15762683749198914,
-0.16804514825344086,
0.26415637135505676,
0.11740624904632568,
-0.1579713225364685,
-0.05613274872303009,
0.3540249168872833,
-0.20343928039073944,
0.05976910516619682,
0.19130760431289673,
0.10465210676193237,
0.17657586932182312,
0.6203182339668274,
-0.038904979825019836,
-0.13542301952838898,
-0.39868244528770447,
-0.0302854236215353,
0.7630382776260376,
-0.538061261177063,
0.41907382011413574,
-0.16347560286521912,
-0.16848081350326538,
0.21060582995414734,
0.2069593071937561,
0.22799940407276154,
0.28726062178611755,
-0.10607364773750305,
-0.05242395028471947,
-0.3762548267841339,
0.4132158160209656,
-0.10215197503566742,
0.15830956399440765,
0.01316530629992485,
-0.22268329560756683,
0.02375653386116028,
-0.05135342851281166,
-0.41627997159957886,
0.09918981790542603,
-0.3120327293872833,
-0.05576115474104881,
-0.4229070842266083,
0.024329479783773422,
-0.07624474912881851,
0.18243485689163208,
0.20604738593101501,
0.07665681093931198,
-0.33717969059944153,
-0.32477501034736633,
0.0993572324514389,
0.02902534417808056,
0.26322269439697266,
-0.006053259130567312,
-0.0669264867901802,
-0.192812979221344,
-0.2138662189245224,
0.10132130235433578,
-0.05935993045568466,
-0.19502824544906616,
0.15941856801509857,
0.03378383815288544,
0.33053895831108093,
-0.10781488567590714,
-0.003314363304525614,
-0.13133545219898224,
0.06567476689815521,
0.16227319836616516,
-0.1319914162158966,
0.018533075228333473,
0.08875222504138947,
-0.11108333617448807,
0.13342852890491486,
0.1578034907579422,
-0.1176018938422203,
0.2429000288248062,
0.2548682391643524,
-0.5540682077407837,
-0.11678355932235718,
0.17269204556941986,
0.21868431568145752,
0.21094225347042084,
-0.2732580602169037,
-0.21263916790485382,
-0.17615841329097748,
0.32615920901298523,
-0.2338826209306717,
-0.2679815888404846,
0.18323032557964325,
0.023048754781484604,
-0.12580296397209167,
-0.13288989663124084,
0.03751249238848686,
-0.06378821283578873,
-0.05073873698711395,
0.1748397797346115,
0.04795826971530914,
-0.18349948525428772,
0.154278963804245,
0.4500064551830292,
-0.19803890585899353,
-0.009128794074058533,
0.5984700322151184,
0.39249423146247864,
0.3464128375053406,
0.3567618429660797,
-0.2054257094860077,
0.1348450630903244,
0.37838467955589294,
0.021855801343917847,
0.052506543695926666,
-0.086479052901268,
0.11632919311523438,
0.19236430525779724,
0.23622506856918335,
-0.025618569925427437,
0.26087307929992676,
0.1376238465309143,
0.0260635893791914,
-0.16678212583065033,
-0.29161810874938965,
0.014225751161575317,
-0.21156422793865204,
0.07058178633451462,
-0.33083605766296387,
-0.0592808723449707,
-0.14573922753334045,
-0.05431520938873291,
-0.32553812861442566,
0.1366245001554489,
0.05496137589216232,
-0.12621822953224182,
-0.037721969187259674,
-0.3942912518978119,
0.3736429810523987,
0.007271815091371536,
-0.04525897279381752,
-0.08960384875535965,
0.2221170961856842,
0.06919203698635101,
-0.06098375469446182,
-0.009235942736268044,
0.49979013204574585,
0.2638121545314789,
0.14508536458015442,
-0.016273947432637215,
-0.11723678559064865,
-0.07092239707708359,
-0.24605301022529602,
-0.020714906975626945,
0.2721758782863617,
0.30108678340911865,
-0.19723771512508392,
0.16810527443885803,
0.2901592254638672,
-0.17556998133659363,
0.12586376070976257,
0.06661691516637802,
0.2633209228515625,
0.3124672770500183,
0.05729258805513382,
-0.18984098732471466,
-0.08579716831445694,
-0.1587362140417099,
0.017504585906863213,
-0.1776157170534134,
-0.29484111070632935,
0.22763897478580475,
-0.21397186815738678,
-0.04229333996772766,
-0.22519418597221375,
0.15971645712852478,
-0.14027927815914154,
0.5283666253089905,
0.2610134780406952,
0.036971207708120346,
-0.04986265301704407,
-0.3226332366466522,
-0.1636398732662201,
0.19195561110973358,
-0.11520157009363174,
0.0670309066772461,
0.23472252488136292,
0.3425343930721283,
0.19535179436206818,
-0.05995292589068413,
0.4146330654621124,
0.11556661874055862,
-0.23968859016895294,
0.05602599307894707,
-0.3202211558818817,
0.031230110675096512,
0.3492659032344818,
0.07949569821357727,
0.07222386449575424,
-0.11477334052324295,
0.14225013554096222,
0.2437829226255417,
0.1515597403049469,
-0.13136368989944458,
-0.13106049597263336,
-0.05413956195116043,
-0.23717756569385529,
0.5633244514465332,
-0.09742891788482666,
-0.03913763165473938,
-0.09831959754228592,
-0.09833437949419022,
-0.0825556144118309,
-0.46107223629951477,
-0.07453884929418564,
0.40173932909965515,
0.12738358974456787,
0.4352622628211975,
0.049666956067085266,
0.3076635003089905,
-0.11385327577590942,
-0.06293586641550064,
-0.14718957245349884,
0.2135951966047287,
-0.2992926239967346,
0.26183003187179565,
-0.2557271122932434,
0.05850488319993019,
-0.09321806579828262,
-0.13208937644958496,
0.03742131590843201,
0.13554640114307404,
-0.280945748090744,
-0.32185494899749756,
0.47264528274536133,
0.07670105993747711,
-0.21887177228927612,
0.2491440623998642,
0.10989972203969955,
0.4435168206691742,
-0.3651801347732544,
-0.31022995710372925,
0.10424011945724487,
0.1832617074251175,
-0.15231238305568695,
-0.1397077441215515,
0.05869176611304283,
-0.049844760447740555,
0.1400386244058609,
0.018894556909799576,
0.5230399966239929,
-0.08196964114904404,
-0.04417669400572777,
-0.1829564869403839,
-0.1576000452041626
] |
https://github.com/huggingface/datasets/issues/3227
|
Error in `Json(datasets.ArrowBasedBuilder)` class
|
:open_mouth: you're right, that did it! I just put everything on a single line (my file only has a single example) and that fixed the error. Thank you so much!
|
## Describe the bug
When a json file contains a `text` field that is larger than the block_size, the JSON dataset builder fails.
## Steps to reproduce the bug
Create a folder that contains the following:
```
.
├── testdata
│ └── mydata.json
└── test.py
```
Please download [this file](https://github.com/huggingface/datasets/files/7491797/mydata.txt) as `mydata.json`. (The error does not occur in JSON files with shorter text, but it is reproducible when the text is long as in the file I provide)
:exclamation: :exclamation: GitHub doesn't allow me to upload JSON so this file is a TXT, and you should rename it to `.json`!
`test.py` simply contains:
```python
from datasets import load_dataset
my_dataset = load_dataset("testdata")
```
To reproduce the error, simply run
```
python test.py
```
## Expected results
The data should load correctly without error.
## Actual results
The dataset builder fails with:
```
Using custom data configuration testdata-d490389b8ab4fd82
Downloading and preparing dataset json/testdata to /home/junshern.chan/.cache/huggingface/datasets/json/testdata-d490389b8ab4fd82/0.0.0/3333a8af0db9764dfcff43a42ff26228f0f2e267f0d8a0a294452d188beadb34...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 2264.74it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 447.01it/s]
Failed to read file '/home/junshern.chan/hf-json-bug/testdata/mydata.json' with error <class 'pyarrow.lib.ArrowInvalid'>: JSON parse error: Missing a name for object member. in row 0
Traceback (most recent call last):
File "test.py", line 28, in <module>
my_dataset = load_dataset("testdata")
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/load.py", line 1632, in load_dataset
builder_instance.download_and_prepare(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 607, in download_and_prepare
self._download_and_prepare(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 697, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/builder.py", line 1156, in _prepare_split
for key, table in utils.tqdm(
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/tqdm/std.py", line 1168, in __iter__
for obj in iterable:
File "/home/junshern.chan/.casio/miniconda/envs/hf-json-bug/lib/python3.8/site-packages/datasets/packaged_modules/json/json.py", line 146, in _generate_tables
raise ValueError(
ValueError: Not able to read records in the JSON file at /home/junshern.chan/hf-json-bug/testdata/mydata.json. You should probably indicate the field of the JSON file containing your records. This JSON file contain the following fields: ['text']. Select the correct one and provide it as `field='XXX'` to the dataset loading method.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.15.1
- Platform: Linux-5.8.0-63-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyArrow version: 6.0.0
| 30 |
Error in `Json(datasets.ArrowBasedBuilder)` class
|
[
-0.3248344361782074,
0.4674932062625885,
-0.2777981162071228,
0.17640066146850586,
0.029702555388212204,
0.1621495485305786,
0.057088710367679596,
0.49873653054237366,
-0.05062548816204071,
-0.020655076950788498,
0.2135094553232193,
0.5520004034042358,
-0.027363363653421402,
-0.13406044244766235,
-0.18297074735164642,
-0.04805346205830574,
-0.0038970510940998793,
0.3275459408760071,
-0.13081377744674683,
-0.038842782378196716,
-0.19679565727710724,
0.3334130346775055,
-0.18270020186901093,
0.3406955301761627,
-0.16177687048912048,
-0.33625921607017517,
0.24993811547756195,
-0.037667106837034225,
-0.35811474919319153,
-0.4949508011341095,
0.3251485228538513,
-0.13185687363147736,
-0.08815760910511017,
0.27442389726638794,
-0.00010058836051030084,
0.1559455245733261,
0.35352611541748047,
0.20214027166366577,
-0.359828919172287,
0.10329999029636383,
-0.14247554540634155,
-0.0020581597927957773,
0.349152147769928,
-0.18285368382930756,
0.0875234454870224,
-0.7308921217918396,
-0.014570685103535652,
-0.2875713109970093,
0.3363379240036011,
0.20259615778923035,
0.34266164898872375,
-0.152143195271492,
0.21077774465084076,
-0.16481193900108337,
0.29559412598609924,
-0.0004483666562009603,
-0.13498736917972565,
0.2691802382469177,
0.07679864019155502,
0.35574233531951904,
-0.21636703610420227,
0.3583313226699829,
0.07720106840133667,
0.20038801431655884,
0.10018358379602432,
-0.027276596054434776,
0.05031640827655792,
0.09671071916818619,
0.22729697823524475,
-0.17222827672958374,
0.6491596102714539,
-0.3391755223274231,
-0.18421810865402222,
0.16838723421096802,
0.08424830436706543,
0.029129138216376305,
0.1384863704442978,
-0.03371872007846832,
0.12520228326320648,
0.0931515321135521,
-0.1267695426940918,
-0.2723194360733032,
-0.17715609073638916,
0.10173200815916061,
0.10924612730741501,
0.035461895167827606,
-0.26280590891838074,
0.141599640250206,
0.04820093512535095,
-0.19299134612083435,
0.3687663972377777,
0.04955265671014786,
-0.4941267669200897,
-0.024177467450499535,
-0.027710720896720886,
-0.13023433089256287,
-0.000014188000932335854,
-0.13952292501926422,
0.07403923571109772,
0.2904617488384247,
0.2534521520137787,
0.0785076841711998,
0.03192627802491188,
0.13164865970611572,
0.29548904299736023,
-0.0856257975101471,
0.2693692445755005,
0.1777883768081665,
0.2702212333679199,
0.11695221811532974,
-0.14294999837875366,
-0.011436942964792252,
-0.009727486409246922,
-0.2947547137737274,
0.21807727217674255,
-0.09760668873786926,
0.2538984715938568,
-0.16091850399971008,
-0.08163277059793472,
0.18022912740707397,
-0.25965216755867004,
-0.04151913523674011,
0.10949613898992538,
0.22621886432170868,
0.19964803755283356,
-0.23550786077976227,
0.2557620406150818,
0.22176799178123474,
0.18088291585445404,
-0.2884542942047119,
-0.26674291491508484,
0.0226154588162899,
-0.11455776542425156,
-0.22537575662136078,
0.07089997828006744,
0.0816756933927536,
0.23148997128009796,
0.03340161219239235,
-0.17639166116714478,
-0.07764297723770142,
0.31098684668540955,
-0.01976054161787033,
-0.06421558558940887,
0.18091264367103577,
-0.1537180095911026,
0.03958806395530701,
0.1355947107076645,
-0.15719549357891083,
-0.021064631640911102,
0.007600837387144566,
-0.13498888909816742,
-0.16365885734558105,
-0.25746673345565796,
0.2913666367530823,
0.29164716601371765,
0.0935591533780098,
-0.4442603588104248,
0.06929367780685425,
-0.026681749150156975,
-0.2903725802898407,
0.16141360998153687,
-0.04371919482946396,
0.3830164968967438,
-0.1337488889694214,
-0.19126145541667938,
-0.10053732991218567,
-0.4254503846168518,
-0.0534319207072258,
-0.2222243994474411,
-0.20570911467075348,
0.06689929962158203,
0.07448042184114456,
-0.36364254355430603,
0.3776884973049164,
-0.13231684267520905,
0.2640363276004791,
0.550847053527832,
-0.08170288801193237,
-0.39256271719932556,
0.2355983555316925,
0.05102820321917534,
-0.4176904559135437,
-0.2053692489862442,
0.02559865638613701,
0.018748722970485687,
0.19181139767169952,
0.06349750608205795,
0.07231096923351288,
0.13749295473098755,
0.009645952843129635,
-0.08251418173313141,
-0.13453763723373413,
-0.07620793581008911,
0.24824324250221252,
-0.153598815202713,
-0.14212539792060852,
0.2768632173538208,
-0.011490117758512497,
-0.034632086753845215,
-0.22244592010974884,
0.12534935772418976,
0.3411702513694763,
0.13124015927314758,
-0.2985304892063141,
-0.04114321619272232,
-0.024186182767152786,
-0.5173112750053406,
-0.13255372643470764,
-0.12731914222240448,
-0.11634818464517593,
-0.3534455895423889,
0.0667419284582138,
-0.08311282098293304,
0.2138918787240982,
-0.11510465294122696,
0.1121380403637886,
0.34430843591690063,
0.09087491035461426,
-0.035880256444215775,
-0.04576960206031799,
-0.16419370472431183,
-0.034028638154268265,
-0.17838838696479797,
0.15298977494239807,
-0.20370809733867645,
0.11258526146411896,
-0.12328343093395233,
-0.2831367254257202,
0.08416463434696198,
-0.21187226474285126,
0.06471587717533112,
-0.2124875783920288,
-0.28912368416786194,
0.29114434123039246,
0.0638640895485878,
-0.23176832497119904,
0.38582631945610046,
-0.0474197119474411,
-0.1937069296836853,
-0.257472962141037,
0.15020301938056946,
0.09543557465076447,
0.05839749053120613,
-0.012051180005073547,
0.1359717845916748,
0.24893103539943695,
0.06967104971408844,
0.013896939344704151,
-0.16495880484580994,
0.06449718773365021,
0.396019846200943,
0.17138579487800598,
-0.13256454467773438,
-0.20354461669921875,
-0.041832949966192245,
-0.24760757386684418,
0.203890860080719,
-0.07762321829795837,
-0.15917228162288666,
-0.10673972219228745,
0.4014250338077545,
0.09659388661384583,
0.26957055926322937,
0.021344583481550217,
-0.09099666774272919,
-0.06053776293992996,
0.22546258568763733,
0.3803284168243408,
0.2624932527542114,
0.11730720847845078,
-0.13301841914653778,
-0.07443651556968689,
0.07349822670221329,
-0.07776937633752823,
0.27091360092163086,
-0.11364970356225967,
0.4400603175163269,
0.053828466683626175,
0.045770466327667236,
-0.22883184254169464,
-0.4138503670692444,
-0.24776655435562134,
0.08662548661231995,
0.1809406727552414,
0.008275048807263374,
0.050117138773202896,
-0.30776548385620117,
0.09859821945428848,
0.20573966205120087,
-0.3104127049446106,
0.007757596671581268,
-0.21409481763839722,
0.04441121593117714,
-0.018686996772885323,
-0.31777286529541016,
0.19535070657730103,
-0.24532781541347504,
0.19867560267448425,
0.1521114856004715,
-0.0025221321266144514,
-0.17215558886528015,
-0.14496897161006927,
-0.2342109978199005,
0.16748812794685364,
0.14296987652778625,
-0.04179917648434639,
0.0750807598233223,
-0.04922671616077423,
0.25294652581214905,
-0.42804497480392456,
-0.149799644947052,
0.13749711215496063,
0.005751837510615587,
0.05562513321638107,
0.4510669708251953,
-0.06505350768566132,
-0.4572056531906128,
-0.345281720161438,
0.21429142355918884,
-0.282162070274353,
-0.30011066794395447,
0.08988359570503235,
-0.01721280813217163,
-0.12985725700855255,
-0.006242769304662943,
-0.2325015813112259,
0.051220040768384933,
-0.21494010090827942,
0.35468876361846924,
0.10059623420238495,
0.09410087019205093,
-0.04875094071030617,
0.1893634796142578,
0.3669365346431732,
-0.04073375090956688,
0.08333652466535568,
-0.19875368475914001,
-0.09307993203401566,
0.1895703822374344,
-0.18805336952209473,
-0.17030274868011475,
0.2242516726255417,
-0.16269725561141968,
0.5384225249290466,
-0.1152225062251091,
-0.47727537155151367,
0.17414143681526184,
0.0393962599337101,
0.12838377058506012,
-0.2053370475769043,
-0.1403885781764984,
0.1117609441280365,
0.24124281108379364,
-0.25658226013183594,
-0.12291089445352554,
-0.24686846137046814,
0.1725936084985733,
-0.1835329830646515,
0.1128554418683052,
-0.19228054583072662,
0.4350614547729492,
-0.29041168093681335,
0.3461341857910156,
-0.06763306260108948,
-0.1386774182319641,
0.20357735455036163,
0.1110202744603157,
0.13250137865543365,
-0.14908839762210846,
-0.025784188881516457,
-0.1930268555879593,
0.05201798677444458,
-0.17422184348106384,
-0.05308394879102707,
-0.2350718379020691,
-0.3374306559562683,
0.08926358819007874,
-0.05435843765735626,
-0.30474144220352173,
-0.1647709608078003,
-0.05276080220937729,
-0.20263731479644775,
-0.12170945107936859,
-0.03192811459302902,
-0.011818724684417248,
-0.07319695502519608,
0.26138296723365784,
0.111932672560215,
-0.19593848288059235,
-0.137691929936409,
-0.0739903450012207,
-0.2896983027458191,
-0.1605159044265747,
-0.1944829672574997,
0.33767178654670715,
-0.3008013963699341,
0.2525731325149536,
0.02493765950202942,
0.2188539206981659,
0.12147966027259827,
-0.14194868505001068,
0.2653430104255676,
-0.14926673471927643,
-0.03738651052117348,
0.11025425046682358,
0.011904729530215263,
-0.1400964856147766,
-0.01456280704587698,
-0.20803824067115784,
0.4753952622413635,
0.008645143359899521,
0.09046845883131027,
-0.35623225569725037,
-0.10659798979759216,
0.17071616649627686,
-0.3211759328842163,
0.034760069102048874,
0.0884830504655838,
0.00948722381144762,
-0.23570451140403748,
-0.24511441588401794,
0.031865380704402924,
0.2873135507106781,
0.1231369599699974,
0.2814062535762787,
-0.27309292554855347,
-0.3361704647541046,
0.11156615614891052,
-0.210563063621521,
0.029795369133353233,
0.3274141550064087,
-0.10941620171070099,
-0.08096415549516678,
-0.11179359257221222,
0.19953064620494843,
0.5230335593223572,
0.5319032073020935,
0.33186981081962585,
-0.19043198227882385,
0.28743425011634827,
-0.07693593204021454,
0.18949823081493378,
0.02415279857814312,
-0.18830838799476624,
0.03943287581205368,
0.07083237916231155,
0.0942324697971344,
0.29353511333465576,
-0.13361810147762299,
0.42058977484703064,
-0.025619300082325935,
-0.0562271773815155,
-0.1311006397008896,
0.47439974546432495,
0.01992511935532093,
0.014032910577952862,
0.4163001477718353,
0.28513219952583313,
-0.17136992514133453,
0.28690680861473083,
0.3132723271846771,
0.5328684449195862,
0.28600654006004333,
-0.020405767485499382,
0.23699387907981873,
-0.41759589314460754,
0.2832029163837433,
-0.260934978723526,
0.06212214007973671,
-0.3225612938404083,
0.06094959005713463,
-0.010106060653924942,
-0.20240415632724762,
0.19497650861740112,
0.42169705033302307,
-0.1412174552679062,
-0.12770681083202362,
-0.04310745745897293,
0.02823452651500702,
-0.23202136158943176,
0.06772308796644211,
-0.12274976819753647,
-0.13795106112957,
-0.32352539896965027,
0.3260352313518524,
-0.21258562803268433,
-0.24620677530765533,
-0.1804663985967636,
-0.19478489458560944,
-0.09331951290369034,
-0.27242276072502136,
-0.15524424612522125,
0.19282719492912292,
-0.05005411058664322,
0.44654035568237305,
0.38273802399635315,
0.016503194347023964,
0.17828696966171265,
-0.13370797038078308,
0.06766923516988754,
-0.07705777883529663,
-0.04004645720124245,
0.170305535197258,
-0.09585248678922653,
-0.06844709813594818,
-0.20258112251758575,
0.08066608756780624,
0.30437183380126953,
-0.14959141612052917,
-0.1074114665389061,
0.16196396946907043,
-0.1972346007823944,
-0.3836766481399536,
0.40915706753730774,
0.15781627595424652,
-0.25987786054611206,
-0.3281537890434265,
-0.2318144142627716,
-0.02567426674067974,
-0.15762683749198914,
-0.16804514825344086,
0.26415637135505676,
0.11740624904632568,
-0.1579713225364685,
-0.05613274872303009,
0.3540249168872833,
-0.20343928039073944,
0.05976910516619682,
0.19130760431289673,
0.10465210676193237,
0.17657586932182312,
0.6203182339668274,
-0.038904979825019836,
-0.13542301952838898,
-0.39868244528770447,
-0.0302854236215353,
0.7630382776260376,
-0.538061261177063,
0.41907382011413574,
-0.16347560286521912,
-0.16848081350326538,
0.21060582995414734,
0.2069593071937561,
0.22799940407276154,
0.28726062178611755,
-0.10607364773750305,
-0.05242395028471947,
-0.3762548267841339,
0.4132158160209656,
-0.10215197503566742,
0.15830956399440765,
0.01316530629992485,
-0.22268329560756683,
0.02375653386116028,
-0.05135342851281166,
-0.41627997159957886,
0.09918981790542603,
-0.3120327293872833,
-0.05576115474104881,
-0.4229070842266083,
0.024329479783773422,
-0.07624474912881851,
0.18243485689163208,
0.20604738593101501,
0.07665681093931198,
-0.33717969059944153,
-0.32477501034736633,
0.0993572324514389,
0.02902534417808056,
0.26322269439697266,
-0.006053259130567312,
-0.0669264867901802,
-0.192812979221344,
-0.2138662189245224,
0.10132130235433578,
-0.05935993045568466,
-0.19502824544906616,
0.15941856801509857,
0.03378383815288544,
0.33053895831108093,
-0.10781488567590714,
-0.003314363304525614,
-0.13133545219898224,
0.06567476689815521,
0.16227319836616516,
-0.1319914162158966,
0.018533075228333473,
0.08875222504138947,
-0.11108333617448807,
0.13342852890491486,
0.1578034907579422,
-0.1176018938422203,
0.2429000288248062,
0.2548682391643524,
-0.5540682077407837,
-0.11678355932235718,
0.17269204556941986,
0.21868431568145752,
0.21094225347042084,
-0.2732580602169037,
-0.21263916790485382,
-0.17615841329097748,
0.32615920901298523,
-0.2338826209306717,
-0.2679815888404846,
0.18323032557964325,
0.023048754781484604,
-0.12580296397209167,
-0.13288989663124084,
0.03751249238848686,
-0.06378821283578873,
-0.05073873698711395,
0.1748397797346115,
0.04795826971530914,
-0.18349948525428772,
0.154278963804245,
0.4500064551830292,
-0.19803890585899353,
-0.009128794074058533,
0.5984700322151184,
0.39249423146247864,
0.3464128375053406,
0.3567618429660797,
-0.2054257094860077,
0.1348450630903244,
0.37838467955589294,
0.021855801343917847,
0.052506543695926666,
-0.086479052901268,
0.11632919311523438,
0.19236430525779724,
0.23622506856918335,
-0.025618569925427437,
0.26087307929992676,
0.1376238465309143,
0.0260635893791914,
-0.16678212583065033,
-0.29161810874938965,
0.014225751161575317,
-0.21156422793865204,
0.07058178633451462,
-0.33083605766296387,
-0.0592808723449707,
-0.14573922753334045,
-0.05431520938873291,
-0.32553812861442566,
0.1366245001554489,
0.05496137589216232,
-0.12621822953224182,
-0.037721969187259674,
-0.3942912518978119,
0.3736429810523987,
0.007271815091371536,
-0.04525897279381752,
-0.08960384875535965,
0.2221170961856842,
0.06919203698635101,
-0.06098375469446182,
-0.009235942736268044,
0.49979013204574585,
0.2638121545314789,
0.14508536458015442,
-0.016273947432637215,
-0.11723678559064865,
-0.07092239707708359,
-0.24605301022529602,
-0.020714906975626945,
0.2721758782863617,
0.30108678340911865,
-0.19723771512508392,
0.16810527443885803,
0.2901592254638672,
-0.17556998133659363,
0.12586376070976257,
0.06661691516637802,
0.2633209228515625,
0.3124672770500183,
0.05729258805513382,
-0.18984098732471466,
-0.08579716831445694,
-0.1587362140417099,
0.017504585906863213,
-0.1776157170534134,
-0.29484111070632935,
0.22763897478580475,
-0.21397186815738678,
-0.04229333996772766,
-0.22519418597221375,
0.15971645712852478,
-0.14027927815914154,
0.5283666253089905,
0.2610134780406952,
0.036971207708120346,
-0.04986265301704407,
-0.3226332366466522,
-0.1636398732662201,
0.19195561110973358,
-0.11520157009363174,
0.0670309066772461,
0.23472252488136292,
0.3425343930721283,
0.19535179436206818,
-0.05995292589068413,
0.4146330654621124,
0.11556661874055862,
-0.23968859016895294,
0.05602599307894707,
-0.3202211558818817,
0.031230110675096512,
0.3492659032344818,
0.07949569821357727,
0.07222386449575424,
-0.11477334052324295,
0.14225013554096222,
0.2437829226255417,
0.1515597403049469,
-0.13136368989944458,
-0.13106049597263336,
-0.05413956195116043,
-0.23717756569385529,
0.5633244514465332,
-0.09742891788482666,
-0.03913763165473938,
-0.09831959754228592,
-0.09833437949419022,
-0.0825556144118309,
-0.46107223629951477,
-0.07453884929418564,
0.40173932909965515,
0.12738358974456787,
0.4352622628211975,
0.049666956067085266,
0.3076635003089905,
-0.11385327577590942,
-0.06293586641550064,
-0.14718957245349884,
0.2135951966047287,
-0.2992926239967346,
0.26183003187179565,
-0.2557271122932434,
0.05850488319993019,
-0.09321806579828262,
-0.13208937644958496,
0.03742131590843201,
0.13554640114307404,
-0.280945748090744,
-0.32185494899749756,
0.47264528274536133,
0.07670105993747711,
-0.21887177228927612,
0.2491440623998642,
0.10989972203969955,
0.4435168206691742,
-0.3651801347732544,
-0.31022995710372925,
0.10424011945724487,
0.1832617074251175,
-0.15231238305568695,
-0.1397077441215515,
0.05869176611304283,
-0.049844760447740555,
0.1400386244058609,
0.018894556909799576,
0.5230399966239929,
-0.08196964114904404,
-0.04417669400572777,
-0.1829564869403839,
-0.1576000452041626
] |
https://github.com/huggingface/datasets/issues/3210
|
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py
|
Hi ! Do you have some kind of proxy in your browser that gives you access to internet ?
Maybe you're having this error because you don't have access to this URL from python ?
|
when I use python examples/pytorch/translation/run_translation.py --model_name_or_path examples/pytorch/translation/opus-mt-en-ro --do_train --do_eval --source_lang en --target_lang ro --dataset_name wmt16 --dataset_config_name ro-en --output_dir /tmp/tst-translation --per_device_train_batch_size=4 --per_device_eval_batch_size=4 --overwrite_output_dir --predict_with_generate to finetune translation model on huggingface, I get the issue"ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py".But I can open the https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py by using website. What should I do to solve the issue?
| 35 |
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py
|
[
-0.30111077427864075,
-0.30552875995635986,
-0.14182636141777039,
0.021805360913276672,
0.26201701164245605,
0.06282097101211548,
0.08624017238616943,
0.3189716339111328,
0.16271904110908508,
0.21773873269557953,
-0.060756221413612366,
-0.10121249407529831,
-0.042451679706573486,
0.34825506806373596,
0.22587785124778748,
0.0041006095707416534,
-0.11174130439758301,
-0.13111832737922668,
-0.48699453473091125,
0.1291566640138626,
-0.06739657372236252,
0.2337462604045868,
-0.18291302025318146,
0.20134739577770233,
-0.1369086056947708,
-0.10368667542934418,
-0.01984810084104538,
0.14383254945278168,
-0.23416246473789215,
-0.2657664716243744,
0.4192129969596863,
0.09767195582389832,
-0.14913026988506317,
0.33228498697280884,
-0.00009817691170610487,
0.16838480532169342,
0.31095296144485474,
0.03491701930761337,
-0.09185617417097092,
-0.2673933207988739,
-0.11715016514062881,
-0.1621198058128357,
0.06154106184840202,
0.13797307014465332,
-0.17410971224308014,
-0.09489482641220093,
0.17969046533107758,
-0.0794268548488617,
0.36792224645614624,
0.21860738098621368,
0.34791797399520874,
0.5236658453941345,
0.43273216485977173,
-0.21643653512001038,
0.08175724744796753,
-0.05927402153611183,
-0.02918929234147072,
0.21356657147407532,
0.014595838263630867,
-0.334922730922699,
0.06967363506555557,
0.3941176235675812,
0.11542703956365585,
0.21753017604351044,
0.18788368999958038,
-0.09922225773334503,
-0.008645856752991676,
-0.21389488875865936,
0.22193068265914917,
0.22847801446914673,
0.08726309984922409,
-0.04115476459264755,
-0.19551905989646912,
0.10697174817323685,
-0.13745693862438202,
-0.23115383088588715,
0.23791326582431793,
0.15442165732383728,
-0.23864920437335968,
0.20674611628055573,
-0.2872973382472992,
-0.13793674111366272,
-0.037500686943531036,
0.03994244337081909,
-0.08109883964061737,
0.3451942205429077,
-0.3408941328525543,
0.08464618027210236,
0.1463043987751007,
-0.2652527093887329,
-0.1824740171432495,
0.16051694750785828,
0.0033917485270649195,
0.19279567897319794,
-0.12484617531299591,
0.03602565824985504,
0.09899146109819412,
0.004942376632243395,
0.353077232837677,
0.06017957627773285,
-0.21270887553691864,
0.02547941729426384,
0.023692838847637177,
0.06638240814208984,
0.13628868758678436,
-0.08694078773260117,
-0.2751981019973755,
-0.12110892683267593,
0.3636796772480011,
0.4765174984931946,
0.055752187967300415,
-0.06097174063324928,
0.010102692991495132,
-0.41638416051864624,
-0.17019110918045044,
-0.12716349959373474,
0.42780664563179016,
0.0030737346969544888,
-0.12305241823196411,
0.1325746476650238,
0.2070797085762024,
-0.12922191619873047,
-0.15531614422798157,
0.29657864570617676,
-0.15562620759010315,
-0.14924833178520203,
0.2166900336742401,
0.11897014081478119,
-0.14818927645683289,
0.15022772550582886,
-0.30510038137435913,
-0.05761532112956047,
0.05062870681285858,
-0.12348923087120056,
0.18922701478004456,
-0.14206932485103607,
0.28135108947753906,
-0.0881119817495346,
-0.005295759066939354,
-0.04305168241262436,
-0.017147470265626907,
0.23335014283657074,
-0.022321995347738266,
0.4914246201515198,
0.06416749954223633,
0.11621038615703583,
0.2579450011253357,
0.05257216468453407,
-0.04303751885890961,
-0.157264843583107,
-0.15826916694641113,
-0.2807927429676056,
0.028185300529003143,
0.33080926537513733,
0.17435066401958466,
0.018206769600510597,
-0.08021312206983566,
-0.1413419246673584,
-0.13206347823143005,
0.18500395119190216,
-0.22453998029232025,
-0.09782147407531738,
0.050339750945568085,
-0.11742670834064484,
0.4228805899620056,
0.3273794949054718,
0.0367567352950573,
-0.04764891043305397,
0.006273495499044657,
-0.26245811581611633,
0.04595053195953369,
0.4074535369873047,
-0.09023594856262207,
-0.08400429785251617,
-0.23232096433639526,
0.14749255776405334,
0.22130170464515686,
-0.22575290501117706,
-0.3184092938899994,
0.15681014955043793,
-0.22995753586292267,
-0.09480179846286774,
-0.02049356885254383,
-0.05733158811926842,
-0.10607130080461502,
-0.06801166385412216,
0.1814069151878357,
-0.017214160412549973,
-0.11949614435434341,
0.012828856706619263,
-0.03315967321395874,
-0.43800199031829834,
0.2325885146856308,
0.007347358390688896,
0.12633812427520752,
-0.10845408588647842,
0.14479681849479675,
-0.15788140892982483,
0.3194534480571747,
0.19730424880981445,
0.001421635621227324,
0.01745287887752056,
0.22070454061031342,
-0.002952014561742544,
-0.13789816200733185,
-0.07053864002227783,
-0.10299728065729141,
-0.03454906865954399,
0.15180334448814392,
0.2988409698009491,
-0.21737031638622284,
-0.04060161113739014,
-0.27610495686531067,
0.15935149788856506,
-0.14462700486183167,
-0.2841615378856659,
0.24808372557163239,
0.019933205097913742,
0.1601853221654892,
0.15917707979679108,
-0.09486200660467148,
-0.0973087027668953,
-0.08079567551612854,
0.2389329969882965,
-0.23469622433185577,
0.09417706727981567,
-0.3574168384075165,
-0.04205780103802681,
0.34123343229293823,
0.009076307527720928,
0.10220856219530106,
-0.24008195102214813,
-0.06526800245046616,
0.16707134246826172,
-0.10653766244649887,
0.34433355927467346,
0.22573880851268768,
0.21396435797214508,
0.054441507905721664,
-0.6104470491409302,
0.006539906840771437,
0.04433330148458481,
0.07722041755914688,
0.05404003709554672,
0.24305322766304016,
0.12994696199893951,
0.016486385837197304,
0.22580596804618835,
0.1720501035451889,
0.16187743842601776,
0.3490048944950104,
0.18689393997192383,
-0.10490016639232635,
0.05948567017912865,
0.10959567874670029,
-0.1364772766828537,
0.05138891190290451,
-0.3214661777019501,
-0.19736619293689728,
0.05076772719621658,
0.31250500679016113,
0.1074928417801857,
0.10856631398200989,
0.04491724073886871,
-0.04566662013530731,
-0.11378108710050583,
-0.08565494418144226,
-0.0012300236849114299,
0.10901794582605362,
0.125645250082016,
0.08714780956506729,
0.31090059876441956,
-0.1053495779633522,
-0.1774083822965622,
0.3341892957687378,
0.0189925879240036,
0.05486231669783592,
0.09320708364248276,
-0.17606951296329498,
-0.16960576176643372,
-0.25488513708114624,
0.13728593289852142,
-0.3479801416397095,
0.02377801202237606,
-0.061253003776073456,
-0.03750702738761902,
-0.2709518074989319,
-0.1231246367096901,
-0.12111274152994156,
-0.574630618095398,
-0.41101449728012085,
-0.41104215383529663,
-0.14464011788368225,
0.09594133496284485,
-0.05246251821517944,
0.2167915254831314,
0.15390543639659882,
0.08779329806566238,
0.1930285543203354,
0.43205222487449646,
-0.15168406069278717,
-0.1660889983177185,
-0.0776262953877449,
0.196465402841568,
0.12874630093574524,
-0.2520044445991516,
0.46374425292015076,
-0.2951977252960205,
-0.0028554671443998814,
-0.23906917870044708,
-0.2948739528656006,
0.05246559903025627,
-0.22583971917629242,
0.282717764377594,
0.4923957288265228,
0.5480970144271851,
0.19581973552703857,
-0.014158436097204685,
0.41424500942230225,
-0.33016231656074524,
-0.03908422589302063,
-0.28865957260131836,
-0.009910117834806442,
-0.1720256209373474,
0.002984072547405958,
-0.27280715107917786,
-0.39926040172576904,
-0.22007714211940765,
0.2136610746383667,
0.05396800488233566,
0.13093161582946777,
0.31557175517082214,
0.1316523551940918,
0.20776982605457306,
-0.0010662396671250463,
0.056444164365530014,
-0.30068495869636536,
-0.5539510250091553,
0.2293454259634018,
-0.21230362355709076,
-0.48339563608169556,
0.3916953206062317,
0.2206290364265442,
0.39505240321159363,
-0.12391767650842667,
-0.46927881240844727,
0.004025417845696211,
-0.07394656538963318,
0.07432057708501816,
0.18653590977191925,
0.25912997126579285,
0.0973840206861496,
-0.05299922078847885,
-0.2251620888710022,
-0.10659728199243546,
-0.24866458773612976,
-0.17230957746505737,
-0.2989760637283325,
0.26214516162872314,
0.012897845357656479,
0.3425942659378052,
-0.04387452080845833,
0.6244884133338928,
0.0855710357427597,
0.029187334701418877,
0.253987580537796,
-0.23507735133171082,
0.3256932497024536,
-0.017395105212926865,
-0.384688138961792,
0.17426635324954987,
0.08365610241889954,
0.18377652764320374,
0.23080787062644958,
0.10828562080860138,
0.25420448184013367,
-0.30891847610473633,
-0.155607670545578,
-0.213474303483963,
-0.27430951595306396,
-0.25412076711654663,
0.40174973011016846,
0.12475982308387756,
0.2666264474391937,
-0.05975673347711563,
-0.08090722560882568,
-0.019775288179516792,
0.09258425980806351,
0.6098867654800415,
-0.08088870346546173,
0.09573162347078323,
0.015094679780304432,
-0.1749572604894638,
-0.6158707141876221,
0.20840783417224884,
-0.12118163704872131,
0.26877361536026,
-0.19360874593257904,
-0.143662691116333,
-0.10497936606407166,
-0.15461722016334534,
0.615017831325531,
-0.0377250537276268,
0.2645438313484192,
-0.03515978902578354,
-0.1161814033985138,
-0.2412988543510437,
-0.04079018905758858,
-0.01468893326818943,
-0.04339239373803139,
0.19801205396652222,
0.24619442224502563,
-0.1209900975227356,
-0.13167059421539307,
0.3022800087928772,
-0.06155271455645561,
-0.142513707280159,
0.07761822640895844,
-0.2532494366168976,
-0.542228102684021,
-0.30702319741249084,
-0.08862606436014175,
0.02228427119553089,
0.21544192731380463,
0.018673252314329147,
-0.09382261335849762,
0.07461955398321152,
-0.11687269061803818,
0.011639153584837914,
0.10878828167915344,
-0.11586656421422958,
0.05775161460042,
0.03400571644306183,
0.22431090474128723,
0.36167389154434204,
0.15113145112991333,
0.4199778437614441,
0.006996928248554468,
-0.15426209568977356,
0.01378284115344286,
0.07989910244941711,
0.19116422533988953,
0.30322501063346863,
-0.15104660391807556,
0.12114929407835007,
0.30569830536842346,
0.39150866866111755,
-0.4185873866081238,
0.24230191111564636,
0.3855832517147064,
0.3275720179080963,
-0.17681822180747986,
-0.1881726235151291,
-0.015138647519052029,
-0.20466572046279907,
0.032567527145147324,
0.23012281954288483,
0.29818859696388245,
-0.1100538894534111,
-0.2773647606372833,
-0.09619715809822083,
0.7818527221679688,
0.06598427891731262,
0.11927036941051483,
0.12449842691421509,
-0.3122633993625641,
0.28172236680984497,
0.1716948002576828,
0.02819358929991722,
-0.17230413854122162,
-0.0829804465174675,
0.013549702242016792,
-0.14142297208309174,
0.2874418795108795,
-0.22939392924308777,
-0.06692022830247879,
0.22262518107891083,
0.18409235775470734,
0.18239228427410126,
-0.024672936648130417,
0.12722933292388916,
-0.07207882404327393,
-0.020938251167535782,
-0.3383691906929016,
0.3114464581012726,
-0.04719807207584381,
0.5170882344245911,
-0.16172711551189423,
-0.1306571513414383,
0.14902448654174805,
-0.4132908880710602,
-0.23397009074687958,
0.0613517127931118,
-0.39030465483665466,
0.12628145515918732,
0.19496288895606995,
0.1404445469379425,
0.030996447429060936,
-0.12545426189899445,
0.15100952982902527,
0.3165558874607086,
-0.27443185448646545,
-0.013184691779315472,
-0.3347678780555725,
-0.31344175338745117,
-0.20098154246807098,
0.32394275069236755,
0.008845940232276917,
-0.2679678499698639,
-0.2315482348203659,
-0.025348572060465813,
0.08754996210336685,
-0.03504602983593941,
0.10313162952661514,
-0.20187979936599731,
0.03093804232776165,
-0.07162719964981079,
0.0745166540145874,
-0.13918034732341766,
-0.1062653437256813,
-0.2917196452617645,
0.24103772640228271,
-0.004246759228408337,
-0.23319153487682343,
-0.01284879446029663,
0.28163695335388184,
-0.04940035566687584,
-0.0453479140996933,
0.4220902919769287,
-0.17937341332435608,
0.20189306139945984,
0.378615140914917,
0.36667418479919434,
-0.15399743616580963,
-0.4148986041545868,
-0.010940231382846832,
0.16676399111747742,
-0.18378351628780365,
0.1559366136789322,
0.1713070124387741,
0.08849434554576874,
-0.07422759383916855,
0.4843416213989258,
0.3286042809486389,
-0.11652243137359619,
0.061163779348134995,
-0.3480433225631714,
-0.34115874767303467,
0.10483483225107193,
-0.10044021159410477,
0.1026129499077797,
0.11210791766643524,
0.4126507043838501,
0.1495203971862793,
0.034878335893154144,
-0.4515502154827118,
0.027837365865707397,
-0.15662553906440735,
-0.17090891301631927,
0.298977255821228,
-0.33340394496917725,
0.3749367296695709,
0.12196658551692963,
0.2578326165676117,
-0.08613201975822449,
-0.6237620711326599,
-0.31889256834983826,
-0.14917075634002686,
0.03116266243159771,
-0.059043459594249725,
-0.4867159128189087,
0.2269243746995926,
-0.14978650212287903,
-0.21417434513568878,
0.11093205213546753,
0.1461804211139679,
-0.041761163622140884,
0.04139041528105736,
-0.023773537948727608,
0.01326496247202158,
-0.14567573368549347,
0.013457072898745537,
0.045011457055807114,
0.0960334986448288,
0.29466482996940613,
-0.14728793501853943,
-0.21944206953048706,
0.0015224202070385218,
-0.22348301112651825,
0.1438053995370865,
-0.010341214947402477,
0.12473456561565399,
-0.05117526277899742,
0.4108097553253174,
-0.15467867255210876,
-0.2048005759716034,
0.18440592288970947,
0.534471333026886,
0.10665527731180191,
-0.16853100061416626,
0.1865481436252594,
0.006494604051113129,
0.2583220899105072,
-0.3870145380496979,
0.022178836166858673,
-0.0465247668325901,
0.03432587534189224,
0.021938180550932884,
-0.09697510302066803,
0.0396781824529171,
0.003532314905896783,
-0.18386375904083252,
0.15226511657238007,
0.42210277915000916,
-0.2570670247077942,
0.04655168950557709,
0.08404449373483658,
-0.11327015608549118,
0.07635228335857391,
0.14247851073741913,
0.1708713173866272,
0.06613346934318542,
0.09723016619682312,
-0.3005322217941284,
0.2195793092250824,
-0.11162063479423523,
0.028088407590985298,
0.20598682761192322,
-0.2842852771282196,
0.13327857851982117,
0.13096018135547638,
-0.23940366506576538,
-0.10440373420715332,
-0.19074150919914246,
0.37635526061058044,
-0.23368145525455475,
-0.008707369677722454,
-0.18782813847064972,
0.35826563835144043,
-0.08447515219449997,
-0.32320693135261536,
-0.04957718029618263,
-0.17226751148700714,
-0.07730380445718765,
-0.12904301285743713,
0.1168355792760849,
-0.09108563512563705,
0.28014788031578064,
-0.042727164924144745,
0.048256270587444305,
-0.36377328634262085,
-0.376078337430954,
-0.05691301077604294,
0.02776232734322548,
-0.0789279043674469,
0.13923399150371552,
0.22582705318927765,
0.004305079113692045,
0.10501386970281601,
0.5006367564201355,
0.6111562848091125,
0.0845048725605011,
0.0217667855322361,
0.21254539489746094,
-0.020315835252404213,
-0.19669194519519806,
-0.1312960386276245,
0.1521037369966507,
0.08148243278265,
0.027306336909532547,
0.24542534351348877,
0.2524912357330322,
-0.22301778197288513,
0.07271440327167511,
-0.08711078763008118,
-0.0762755423784256,
-0.0048148599453270435,
0.05151704326272011,
-0.3766515851020813,
-0.028512725606560707,
-0.3466600477695465,
0.2567525804042816,
-0.3969948887825012,
0.15993112325668335,
0.39756688475608826,
-0.18577773869037628,
0.24794188141822815,
-0.3112308382987976,
0.16869670152664185,
-0.13684555888175964,
0.8152128458023071,
0.36507803201675415,
0.05258269980549812,
-0.0038022096268832684,
-0.3237020969390869,
-0.5936874151229858,
0.12173087894916534,
0.04207306727766991,
-0.21441562473773956,
-0.08776716142892838,
-0.013307388871908188,
0.05887332558631897,
0.07463353127241135,
0.23223084211349487,
-0.01195979118347168,
-0.010410167276859283,
-0.19932639598846436,
-0.003571245586499572,
-0.08665993064641953,
-0.04810318350791931,
0.01342153362929821,
0.1569957286119461,
-0.08498025685548782,
0.2650957405567169,
-0.284318745136261,
0.1477319300174713,
-0.19865979254245758,
0.4497106075286865,
-0.1738239973783493,
-0.036835283041000366,
0.05442875996232033,
0.22457271814346313,
0.22925373911857605,
-0.10356760025024414,
-0.1831914186477661,
-0.24162764847278595,
-0.25587737560272217,
-0.13802461326122284,
0.167352557182312,
0.013128033839166164,
0.19967366755008698,
0.07023701071739197,
-0.34510132670402527,
-0.27704542875289917,
0.04329952597618103,
0.062476202845573425,
0.16211971640586853,
0.03603131324052811,
0.22062307596206665,
0.007368861697614193,
-0.13313604891300201,
0.2838892638683319,
0.11139431595802307,
-0.04361366853117943,
-0.04049497842788696,
-0.14095322787761688,
-0.4159563481807709,
0.41931408643722534,
-0.23028980195522308,
-0.23739664256572723,
-0.3687727153301239,
0.12465903162956238,
-0.16531839966773987,
-0.09612423926591873,
-0.5760923624038696,
0.30115681886672974,
0.12539513409137726,
0.1041877269744873,
-0.26613396406173706,
0.37861257791519165,
-0.21468132734298706,
-0.09437588602304459,
0.020654838532209396,
0.3198646306991577,
0.13568353652954102,
-0.2223062813282013,
-0.08394253998994827,
-0.05933447182178497
] |
https://github.com/huggingface/datasets/issues/3210
|
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py
|
You don't need authentication to access those github hosted files
Please check that you can access this URL from your browser and also from your terminal
|
when I use python examples/pytorch/translation/run_translation.py --model_name_or_path examples/pytorch/translation/opus-mt-en-ro --do_train --do_eval --source_lang en --target_lang ro --dataset_name wmt16 --dataset_config_name ro-en --output_dir /tmp/tst-translation --per_device_train_batch_size=4 --per_device_eval_batch_size=4 --overwrite_output_dir --predict_with_generate to finetune translation model on huggingface, I get the issue"ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py".But I can open the https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py by using website. What should I do to solve the issue?
| 26 |
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.15.1/datasets/wmt16/wmt16.py
|
[
-0.30111077427864075,
-0.30552875995635986,
-0.14182636141777039,
0.021805360913276672,
0.26201701164245605,
0.06282097101211548,
0.08624017238616943,
0.3189716339111328,
0.16271904110908508,
0.21773873269557953,
-0.060756221413612366,
-0.10121249407529831,
-0.042451679706573486,
0.34825506806373596,
0.22587785124778748,
0.0041006095707416534,
-0.11174130439758301,
-0.13111832737922668,
-0.48699453473091125,
0.1291566640138626,
-0.06739657372236252,
0.2337462604045868,
-0.18291302025318146,
0.20134739577770233,
-0.1369086056947708,
-0.10368667542934418,
-0.01984810084104538,
0.14383254945278168,
-0.23416246473789215,
-0.2657664716243744,
0.4192129969596863,
0.09767195582389832,
-0.14913026988506317,
0.33228498697280884,
-0.00009817691170610487,
0.16838480532169342,
0.31095296144485474,
0.03491701930761337,
-0.09185617417097092,
-0.2673933207988739,
-0.11715016514062881,
-0.1621198058128357,
0.06154106184840202,
0.13797307014465332,
-0.17410971224308014,
-0.09489482641220093,
0.17969046533107758,
-0.0794268548488617,
0.36792224645614624,
0.21860738098621368,
0.34791797399520874,
0.5236658453941345,
0.43273216485977173,
-0.21643653512001038,
0.08175724744796753,
-0.05927402153611183,
-0.02918929234147072,
0.21356657147407532,
0.014595838263630867,
-0.334922730922699,
0.06967363506555557,
0.3941176235675812,
0.11542703956365585,
0.21753017604351044,
0.18788368999958038,
-0.09922225773334503,
-0.008645856752991676,
-0.21389488875865936,
0.22193068265914917,
0.22847801446914673,
0.08726309984922409,
-0.04115476459264755,
-0.19551905989646912,
0.10697174817323685,
-0.13745693862438202,
-0.23115383088588715,
0.23791326582431793,
0.15442165732383728,
-0.23864920437335968,
0.20674611628055573,
-0.2872973382472992,
-0.13793674111366272,
-0.037500686943531036,
0.03994244337081909,
-0.08109883964061737,
0.3451942205429077,
-0.3408941328525543,
0.08464618027210236,
0.1463043987751007,
-0.2652527093887329,
-0.1824740171432495,
0.16051694750785828,
0.0033917485270649195,
0.19279567897319794,
-0.12484617531299591,
0.03602565824985504,
0.09899146109819412,
0.004942376632243395,
0.353077232837677,
0.06017957627773285,
-0.21270887553691864,
0.02547941729426384,
0.023692838847637177,
0.06638240814208984,
0.13628868758678436,
-0.08694078773260117,
-0.2751981019973755,
-0.12110892683267593,
0.3636796772480011,
0.4765174984931946,
0.055752187967300415,
-0.06097174063324928,
0.010102692991495132,
-0.41638416051864624,
-0.17019110918045044,
-0.12716349959373474,
0.42780664563179016,
0.0030737346969544888,
-0.12305241823196411,
0.1325746476650238,
0.2070797085762024,
-0.12922191619873047,
-0.15531614422798157,
0.29657864570617676,
-0.15562620759010315,
-0.14924833178520203,
0.2166900336742401,
0.11897014081478119,
-0.14818927645683289,
0.15022772550582886,
-0.30510038137435913,
-0.05761532112956047,
0.05062870681285858,
-0.12348923087120056,
0.18922701478004456,
-0.14206932485103607,
0.28135108947753906,
-0.0881119817495346,
-0.005295759066939354,
-0.04305168241262436,
-0.017147470265626907,
0.23335014283657074,
-0.022321995347738266,
0.4914246201515198,
0.06416749954223633,
0.11621038615703583,
0.2579450011253357,
0.05257216468453407,
-0.04303751885890961,
-0.157264843583107,
-0.15826916694641113,
-0.2807927429676056,
0.028185300529003143,
0.33080926537513733,
0.17435066401958466,
0.018206769600510597,
-0.08021312206983566,
-0.1413419246673584,
-0.13206347823143005,
0.18500395119190216,
-0.22453998029232025,
-0.09782147407531738,
0.050339750945568085,
-0.11742670834064484,
0.4228805899620056,
0.3273794949054718,
0.0367567352950573,
-0.04764891043305397,
0.006273495499044657,
-0.26245811581611633,
0.04595053195953369,
0.4074535369873047,
-0.09023594856262207,
-0.08400429785251617,
-0.23232096433639526,
0.14749255776405334,
0.22130170464515686,
-0.22575290501117706,
-0.3184092938899994,
0.15681014955043793,
-0.22995753586292267,
-0.09480179846286774,
-0.02049356885254383,
-0.05733158811926842,
-0.10607130080461502,
-0.06801166385412216,
0.1814069151878357,
-0.017214160412549973,
-0.11949614435434341,
0.012828856706619263,
-0.03315967321395874,
-0.43800199031829834,
0.2325885146856308,
0.007347358390688896,
0.12633812427520752,
-0.10845408588647842,
0.14479681849479675,
-0.15788140892982483,
0.3194534480571747,
0.19730424880981445,
0.001421635621227324,
0.01745287887752056,
0.22070454061031342,
-0.002952014561742544,
-0.13789816200733185,
-0.07053864002227783,
-0.10299728065729141,
-0.03454906865954399,
0.15180334448814392,
0.2988409698009491,
-0.21737031638622284,
-0.04060161113739014,
-0.27610495686531067,
0.15935149788856506,
-0.14462700486183167,
-0.2841615378856659,
0.24808372557163239,
0.019933205097913742,
0.1601853221654892,
0.15917707979679108,
-0.09486200660467148,
-0.0973087027668953,
-0.08079567551612854,
0.2389329969882965,
-0.23469622433185577,
0.09417706727981567,
-0.3574168384075165,
-0.04205780103802681,
0.34123343229293823,
0.009076307527720928,
0.10220856219530106,
-0.24008195102214813,
-0.06526800245046616,
0.16707134246826172,
-0.10653766244649887,
0.34433355927467346,
0.22573880851268768,
0.21396435797214508,
0.054441507905721664,
-0.6104470491409302,
0.006539906840771437,
0.04433330148458481,
0.07722041755914688,
0.05404003709554672,
0.24305322766304016,
0.12994696199893951,
0.016486385837197304,
0.22580596804618835,
0.1720501035451889,
0.16187743842601776,
0.3490048944950104,
0.18689393997192383,
-0.10490016639232635,
0.05948567017912865,
0.10959567874670029,
-0.1364772766828537,
0.05138891190290451,
-0.3214661777019501,
-0.19736619293689728,
0.05076772719621658,
0.31250500679016113,
0.1074928417801857,
0.10856631398200989,
0.04491724073886871,
-0.04566662013530731,
-0.11378108710050583,
-0.08565494418144226,
-0.0012300236849114299,
0.10901794582605362,
0.125645250082016,
0.08714780956506729,
0.31090059876441956,
-0.1053495779633522,
-0.1774083822965622,
0.3341892957687378,
0.0189925879240036,
0.05486231669783592,
0.09320708364248276,
-0.17606951296329498,
-0.16960576176643372,
-0.25488513708114624,
0.13728593289852142,
-0.3479801416397095,
0.02377801202237606,
-0.061253003776073456,
-0.03750702738761902,
-0.2709518074989319,
-0.1231246367096901,
-0.12111274152994156,
-0.574630618095398,
-0.41101449728012085,
-0.41104215383529663,
-0.14464011788368225,
0.09594133496284485,
-0.05246251821517944,
0.2167915254831314,
0.15390543639659882,
0.08779329806566238,
0.1930285543203354,
0.43205222487449646,
-0.15168406069278717,
-0.1660889983177185,
-0.0776262953877449,
0.196465402841568,
0.12874630093574524,
-0.2520044445991516,
0.46374425292015076,
-0.2951977252960205,
-0.0028554671443998814,
-0.23906917870044708,
-0.2948739528656006,
0.05246559903025627,
-0.22583971917629242,
0.282717764377594,
0.4923957288265228,
0.5480970144271851,
0.19581973552703857,
-0.014158436097204685,
0.41424500942230225,
-0.33016231656074524,
-0.03908422589302063,
-0.28865957260131836,
-0.009910117834806442,
-0.1720256209373474,
0.002984072547405958,
-0.27280715107917786,
-0.39926040172576904,
-0.22007714211940765,
0.2136610746383667,
0.05396800488233566,
0.13093161582946777,
0.31557175517082214,
0.1316523551940918,
0.20776982605457306,
-0.0010662396671250463,
0.056444164365530014,
-0.30068495869636536,
-0.5539510250091553,
0.2293454259634018,
-0.21230362355709076,
-0.48339563608169556,
0.3916953206062317,
0.2206290364265442,
0.39505240321159363,
-0.12391767650842667,
-0.46927881240844727,
0.004025417845696211,
-0.07394656538963318,
0.07432057708501816,
0.18653590977191925,
0.25912997126579285,
0.0973840206861496,
-0.05299922078847885,
-0.2251620888710022,
-0.10659728199243546,
-0.24866458773612976,
-0.17230957746505737,
-0.2989760637283325,
0.26214516162872314,
0.012897845357656479,
0.3425942659378052,
-0.04387452080845833,
0.6244884133338928,
0.0855710357427597,
0.029187334701418877,
0.253987580537796,
-0.23507735133171082,
0.3256932497024536,
-0.017395105212926865,
-0.384688138961792,
0.17426635324954987,
0.08365610241889954,
0.18377652764320374,
0.23080787062644958,
0.10828562080860138,
0.25420448184013367,
-0.30891847610473633,
-0.155607670545578,
-0.213474303483963,
-0.27430951595306396,
-0.25412076711654663,
0.40174973011016846,
0.12475982308387756,
0.2666264474391937,
-0.05975673347711563,
-0.08090722560882568,
-0.019775288179516792,
0.09258425980806351,
0.6098867654800415,
-0.08088870346546173,
0.09573162347078323,
0.015094679780304432,
-0.1749572604894638,
-0.6158707141876221,
0.20840783417224884,
-0.12118163704872131,
0.26877361536026,
-0.19360874593257904,
-0.143662691116333,
-0.10497936606407166,
-0.15461722016334534,
0.615017831325531,
-0.0377250537276268,
0.2645438313484192,
-0.03515978902578354,
-0.1161814033985138,
-0.2412988543510437,
-0.04079018905758858,
-0.01468893326818943,
-0.04339239373803139,
0.19801205396652222,
0.24619442224502563,
-0.1209900975227356,
-0.13167059421539307,
0.3022800087928772,
-0.06155271455645561,
-0.142513707280159,
0.07761822640895844,
-0.2532494366168976,
-0.542228102684021,
-0.30702319741249084,
-0.08862606436014175,
0.02228427119553089,
0.21544192731380463,
0.018673252314329147,
-0.09382261335849762,
0.07461955398321152,
-0.11687269061803818,
0.011639153584837914,
0.10878828167915344,
-0.11586656421422958,
0.05775161460042,
0.03400571644306183,
0.22431090474128723,
0.36167389154434204,
0.15113145112991333,
0.4199778437614441,
0.006996928248554468,
-0.15426209568977356,
0.01378284115344286,
0.07989910244941711,
0.19116422533988953,
0.30322501063346863,
-0.15104660391807556,
0.12114929407835007,
0.30569830536842346,
0.39150866866111755,
-0.4185873866081238,
0.24230191111564636,
0.3855832517147064,
0.3275720179080963,
-0.17681822180747986,
-0.1881726235151291,
-0.015138647519052029,
-0.20466572046279907,
0.032567527145147324,
0.23012281954288483,
0.29818859696388245,
-0.1100538894534111,
-0.2773647606372833,
-0.09619715809822083,
0.7818527221679688,
0.06598427891731262,
0.11927036941051483,
0.12449842691421509,
-0.3122633993625641,
0.28172236680984497,
0.1716948002576828,
0.02819358929991722,
-0.17230413854122162,
-0.0829804465174675,
0.013549702242016792,
-0.14142297208309174,
0.2874418795108795,
-0.22939392924308777,
-0.06692022830247879,
0.22262518107891083,
0.18409235775470734,
0.18239228427410126,
-0.024672936648130417,
0.12722933292388916,
-0.07207882404327393,
-0.020938251167535782,
-0.3383691906929016,
0.3114464581012726,
-0.04719807207584381,
0.5170882344245911,
-0.16172711551189423,
-0.1306571513414383,
0.14902448654174805,
-0.4132908880710602,
-0.23397009074687958,
0.0613517127931118,
-0.39030465483665466,
0.12628145515918732,
0.19496288895606995,
0.1404445469379425,
0.030996447429060936,
-0.12545426189899445,
0.15100952982902527,
0.3165558874607086,
-0.27443185448646545,
-0.013184691779315472,
-0.3347678780555725,
-0.31344175338745117,
-0.20098154246807098,
0.32394275069236755,
0.008845940232276917,
-0.2679678499698639,
-0.2315482348203659,
-0.025348572060465813,
0.08754996210336685,
-0.03504602983593941,
0.10313162952661514,
-0.20187979936599731,
0.03093804232776165,
-0.07162719964981079,
0.0745166540145874,
-0.13918034732341766,
-0.1062653437256813,
-0.2917196452617645,
0.24103772640228271,
-0.004246759228408337,
-0.23319153487682343,
-0.01284879446029663,
0.28163695335388184,
-0.04940035566687584,
-0.0453479140996933,
0.4220902919769287,
-0.17937341332435608,
0.20189306139945984,
0.378615140914917,
0.36667418479919434,
-0.15399743616580963,
-0.4148986041545868,
-0.010940231382846832,
0.16676399111747742,
-0.18378351628780365,
0.1559366136789322,
0.1713070124387741,
0.08849434554576874,
-0.07422759383916855,
0.4843416213989258,
0.3286042809486389,
-0.11652243137359619,
0.061163779348134995,
-0.3480433225631714,
-0.34115874767303467,
0.10483483225107193,
-0.10044021159410477,
0.1026129499077797,
0.11210791766643524,
0.4126507043838501,
0.1495203971862793,
0.034878335893154144,
-0.4515502154827118,
0.027837365865707397,
-0.15662553906440735,
-0.17090891301631927,
0.298977255821228,
-0.33340394496917725,
0.3749367296695709,
0.12196658551692963,
0.2578326165676117,
-0.08613201975822449,
-0.6237620711326599,
-0.31889256834983826,
-0.14917075634002686,
0.03116266243159771,
-0.059043459594249725,
-0.4867159128189087,
0.2269243746995926,
-0.14978650212287903,
-0.21417434513568878,
0.11093205213546753,
0.1461804211139679,
-0.041761163622140884,
0.04139041528105736,
-0.023773537948727608,
0.01326496247202158,
-0.14567573368549347,
0.013457072898745537,
0.045011457055807114,
0.0960334986448288,
0.29466482996940613,
-0.14728793501853943,
-0.21944206953048706,
0.0015224202070385218,
-0.22348301112651825,
0.1438053995370865,
-0.010341214947402477,
0.12473456561565399,
-0.05117526277899742,
0.4108097553253174,
-0.15467867255210876,
-0.2048005759716034,
0.18440592288970947,
0.534471333026886,
0.10665527731180191,
-0.16853100061416626,
0.1865481436252594,
0.006494604051113129,
0.2583220899105072,
-0.3870145380496979,
0.022178836166858673,
-0.0465247668325901,
0.03432587534189224,
0.021938180550932884,
-0.09697510302066803,
0.0396781824529171,
0.003532314905896783,
-0.18386375904083252,
0.15226511657238007,
0.42210277915000916,
-0.2570670247077942,
0.04655168950557709,
0.08404449373483658,
-0.11327015608549118,
0.07635228335857391,
0.14247851073741913,
0.1708713173866272,
0.06613346934318542,
0.09723016619682312,
-0.3005322217941284,
0.2195793092250824,
-0.11162063479423523,
0.028088407590985298,
0.20598682761192322,
-0.2842852771282196,
0.13327857851982117,
0.13096018135547638,
-0.23940366506576538,
-0.10440373420715332,
-0.19074150919914246,
0.37635526061058044,
-0.23368145525455475,
-0.008707369677722454,
-0.18782813847064972,
0.35826563835144043,
-0.08447515219449997,
-0.32320693135261536,
-0.04957718029618263,
-0.17226751148700714,
-0.07730380445718765,
-0.12904301285743713,
0.1168355792760849,
-0.09108563512563705,
0.28014788031578064,
-0.042727164924144745,
0.048256270587444305,
-0.36377328634262085,
-0.376078337430954,
-0.05691301077604294,
0.02776232734322548,
-0.0789279043674469,
0.13923399150371552,
0.22582705318927765,
0.004305079113692045,
0.10501386970281601,
0.5006367564201355,
0.6111562848091125,
0.0845048725605011,
0.0217667855322361,
0.21254539489746094,
-0.020315835252404213,
-0.19669194519519806,
-0.1312960386276245,
0.1521037369966507,
0.08148243278265,
0.027306336909532547,
0.24542534351348877,
0.2524912357330322,
-0.22301778197288513,
0.07271440327167511,
-0.08711078763008118,
-0.0762755423784256,
-0.0048148599453270435,
0.05151704326272011,
-0.3766515851020813,
-0.028512725606560707,
-0.3466600477695465,
0.2567525804042816,
-0.3969948887825012,
0.15993112325668335,
0.39756688475608826,
-0.18577773869037628,
0.24794188141822815,
-0.3112308382987976,
0.16869670152664185,
-0.13684555888175964,
0.8152128458023071,
0.36507803201675415,
0.05258269980549812,
-0.0038022096268832684,
-0.3237020969390869,
-0.5936874151229858,
0.12173087894916534,
0.04207306727766991,
-0.21441562473773956,
-0.08776716142892838,
-0.013307388871908188,
0.05887332558631897,
0.07463353127241135,
0.23223084211349487,
-0.01195979118347168,
-0.010410167276859283,
-0.19932639598846436,
-0.003571245586499572,
-0.08665993064641953,
-0.04810318350791931,
0.01342153362929821,
0.1569957286119461,
-0.08498025685548782,
0.2650957405567169,
-0.284318745136261,
0.1477319300174713,
-0.19865979254245758,
0.4497106075286865,
-0.1738239973783493,
-0.036835283041000366,
0.05442875996232033,
0.22457271814346313,
0.22925373911857605,
-0.10356760025024414,
-0.1831914186477661,
-0.24162764847278595,
-0.25587737560272217,
-0.13802461326122284,
0.167352557182312,
0.013128033839166164,
0.19967366755008698,
0.07023701071739197,
-0.34510132670402527,
-0.27704542875289917,
0.04329952597618103,
0.062476202845573425,
0.16211971640586853,
0.03603131324052811,
0.22062307596206665,
0.007368861697614193,
-0.13313604891300201,
0.2838892638683319,
0.11139431595802307,
-0.04361366853117943,
-0.04049497842788696,
-0.14095322787761688,
-0.4159563481807709,
0.41931408643722534,
-0.23028980195522308,
-0.23739664256572723,
-0.3687727153301239,
0.12465903162956238,
-0.16531839966773987,
-0.09612423926591873,
-0.5760923624038696,
0.30115681886672974,
0.12539513409137726,
0.1041877269744873,
-0.26613396406173706,
0.37861257791519165,
-0.21468132734298706,
-0.09437588602304459,
0.020654838532209396,
0.3198646306991577,
0.13568353652954102,
-0.2223062813282013,
-0.08394253998994827,
-0.05933447182178497
] |
https://github.com/huggingface/datasets/issues/3204
|
FileNotFoundError for TupleIE dataste
|
@mariosasko @lhoestq Could you give me an update on how to load the dataset after the fix?
Thanks.
|
Hi,
`dataset = datasets.load_dataset('tuple_ie', 'all')`
returns a FileNotFound error. Is the data not available?
Many thanks.
| 18 |
FileNotFoundError for TupleIE dataste
|
[
-0.1317325383424759,
0.038278356194496155,
-0.037130266427993774,
0.3781873881816864,
0.3069759011268616,
-0.03658738732337952,
0.1669267863035202,
0.33660629391670227,
0.39044925570487976,
0.19038954377174377,
0.11514583975076675,
-0.03092474304139614,
-0.2771509289741516,
0.14593884348869324,
-0.3940041661262512,
0.06999173015356064,
-0.07704290002584457,
0.3399006724357605,
0.06971296668052673,
-0.07652641087770462,
-0.339733749628067,
0.29256656765937805,
-0.2071744203567505,
0.13109779357910156,
-0.35052838921546936,
0.0995057001709938,
-0.07353289425373077,
0.6167556047439575,
-0.36867812275886536,
0.01597118191421032,
0.3691911995410919,
-0.14978259801864624,
0.1300634890794754,
0.4662332236766815,
-0.000108004838693887,
0.15101221203804016,
0.1867775171995163,
-0.2240552455186844,
-0.14408917725086212,
-0.17184996604919434,
-0.06961089372634888,
0.12080111354589462,
-0.02231518365442753,
-0.4241224527359009,
-0.25702744722366333,
0.1786910891532898,
-0.050322990864515305,
0.15444710850715637,
0.40201810002326965,
0.2549823820590973,
0.2277677208185196,
-0.08229584991931915,
0.1284763067960739,
-0.18190215528011322,
0.47561898827552795,
0.29854345321655273,
-0.023631341755390167,
-0.21768830716609955,
0.23094013333320618,
-0.47532978653907776,
0.21501374244689941,
0.14027827978134155,
-0.21069754660129547,
-0.06405924260616302,
-0.38702520728111267,
-0.06920813024044037,
0.11407801508903503,
0.05205797404050827,
0.07396126538515091,
0.23620864748954773,
0.4701908230781555,
-0.05953212082386017,
-0.4252593219280243,
0.3346397876739502,
-0.2763095498085022,
-0.24218912422657013,
0.40425917506217957,
-0.06441149860620499,
0.022049782797694206,
0.07890001684427261,
0.5724350214004517,
-0.040933579206466675,
-0.2542653977870941,
0.2961480915546417,
-0.20582038164138794,
0.1797083616256714,
0.014691131189465523,
-0.1828828752040863,
0.1545606106519699,
-0.2657097280025482,
-0.34073320031166077,
0.20513756573200226,
0.007192988879978657,
0.021485820412635803,
0.08240389078855515,
-0.36965668201446533,
0.16953887045383453,
-0.27887198328971863,
0.2050030380487442,
0.04494069889187813,
0.040697477757930756,
0.047274183481931686,
-0.3853408992290497,
0.08296871185302734,
0.1506829559803009,
0.03806617856025696,
-0.01894029602408409,
-0.02588219754397869,
0.3743728995323181,
0.053141187876462936,
-0.18618839979171753,
-0.08356891572475433,
0.12776045501232147,
-0.22629298269748688,
-0.12568572163581848,
-0.017056623473763466,
0.6016514897346497,
-0.2878650426864624,
-0.32187730073928833,
0.02463109977543354,
0.05435769259929657,
0.04031036049127579,
0.23809504508972168,
0.22312922775745392,
0.05117315053939819,
-0.15881189703941345,
0.011949857696890831,
0.2453252673149109,
-0.2601814270019531,
-0.05516520142555237,
-0.2866177558898926,
0.22416885197162628,
0.010775111615657806,
-0.0729447677731514,
0.11598735302686691,
0.10358144342899323,
0.21101659536361694,
0.10467851907014847,
-0.15575852990150452,
-0.0770697072148323,
0.11116886883974075,
-0.3518446683883667,
-0.17259949445724487,
0.22962109744548798,
-0.27970626950263977,
-0.01888997107744217,
0.4374960660934448,
-0.6315734386444092,
0.08307226747274399,
0.30047839879989624,
-0.5104413628578186,
-0.35001859068870544,
-0.3650027811527252,
0.22209669649600983,
-0.04346539452672005,
0.08901891112327576,
0.16807201504707336,
-0.12362771481275558,
0.05088702589273453,
-0.354927122592926,
-0.011343128979206085,
0.0013714932138100266,
0.15018269419670105,
-0.3020781874656677,
-0.01726539060473442,
0.9147707223892212,
-0.38207563757896423,
0.20931009948253632,
-0.02402666211128235,
-0.32637766003608704,
0.4994802474975586,
0.37823134660720825,
0.07658348977565765,
0.03696602210402489,
-0.3227229714393616,
0.40825900435447693,
0.5506460070610046,
-0.19651846587657928,
-0.28725600242614746,
0.15507422387599945,
0.014861117117106915,
-0.10719064623117447,
0.25113821029663086,
0.08347953110933304,
-0.17725501954555511,
-0.12690383195877075,
0.3045150339603424,
-0.3108431398868561,
0.04154229536652565,
-0.014215671457350254,
-0.35293516516685486,
0.11796394735574722,
-0.034134216606616974,
0.23481248319149017,
-0.12794192135334015,
0.11167632043361664,
0.17102767527103424,
0.12245004624128342,
0.09649988263845444,
-0.18146762251853943,
-0.1256347894668579,
0.10387024283409119,
0.5328997373580933,
0.3617733418941498,
-0.1718624383211136,
0.04999137669801712,
-0.20582878589630127,
-0.03579000011086464,
0.09442553669214249,
-0.12244347482919693,
-0.2751989960670471,
-0.19253525137901306,
0.14026698470115662,
-0.07264048606157303,
-0.13697537779808044,
-0.15733873844146729,
0.2275150567293167,
0.000344754516845569,
0.11182723939418793,
-0.053252916783094406,
-0.291015088558197,
-0.03505678102374077,
-0.16490304470062256,
0.09595639258623123,
-0.004835091531276703,
0.2484649270772934,
-0.13989026844501495,
-0.36451753973960876,
0.080078125,
0.11259220540523529,
0.10817032307386398,
-0.3261339068412781,
-0.17557518184185028,
0.32121458649635315,
0.6691648960113525,
-0.16754990816116333,
0.2891448736190796,
-0.13850194215774536,
0.09456640481948853,
0.09196663647890091,
0.01509806141257286,
0.3940386474132538,
0.039927560836076736,
-0.031997859477996826,
-0.10072419792413712,
0.2602282166481018,
-0.25380808115005493,
-0.3193921148777008,
0.15971282124519348,
-0.042344022542238235,
0.40062451362609863,
-0.12747390568256378,
0.02493579313158989,
-0.32465019822120667,
0.3596617877483368,
0.20474153757095337,
-0.06292997300624847,
-0.04189246520400047,
-0.5242629647254944,
-0.15643277764320374,
0.48524293303489685,
0.21667100489139557,
0.1427297443151474,
-0.10396939516067505,
-0.1478658765554428,
0.1755760759115219,
-0.10866344720125198,
0.1965014934539795,
0.6316912174224854,
0.2096455693244934,
-0.08469724655151367,
-0.0798892080783844,
0.006650111638009548,
-0.32579678297042847,
-0.012084495276212692,
-0.1497662365436554,
-0.04086257517337799,
0.2626378536224365,
-0.201869398355484,
0.06747877597808838,
-0.43509000539779663,
-0.132753387093544,
-0.17206741869449615,
0.15535244345664978,
-0.11601987481117249,
-0.2095680981874466,
-0.31142616271972656,
-0.5156847834587097,
0.35172516107559204,
-0.029898738488554955,
0.044211018830537796,
0.016720080748200417,
0.2807709574699402,
0.2108973115682602,
-0.3520973026752472,
-0.01472766138613224,
0.04511672258377075,
0.03838891535997391,
0.15812738239765167,
-0.37627291679382324,
-0.08859331160783768,
-0.19323958456516266,
0.08461850136518478,
0.13854309916496277,
0.24273434281349182,
-0.41998621821403503,
0.15852202475070953,
-0.2606131434440613,
-0.06145055592060089,
-0.31264182925224304,
-0.3156374394893646,
-0.030180905014276505,
0.04897237569093704,
0.061615485697984695,
0.22403621673583984,
0.4153180718421936,
-0.08749844878911972,
0.02026689238846302,
0.4289032220840454,
0.023188944905996323,
-0.22164657711982727,
0.28634050488471985,
0.16860219836235046,
0.055776383727788925,
-0.24296081066131592,
-0.4176177978515625,
-0.19820724427700043,
-0.21106784045696259,
0.1941959261894226,
0.2559155523777008,
0.24593262374401093,
0.050647541880607605,
0.13474002480506897,
-0.022271940484642982,
0.2071620523929596,
-0.1178319901227951,
-0.17028209567070007,
-0.1495143324136734,
0.33073338866233826,
-0.2547847032546997,
-0.33274272084236145,
0.30714794993400574,
0.025352124124765396,
0.1832580268383026,
0.09496594965457916,
-0.2894572913646698,
-0.43736010789871216,
0.12874282896518707,
-0.08083131164312363,
-0.11733858287334442,
-0.1277046650648117,
0.5763106346130371,
0.04132743179798126,
-0.21213705837726593,
-0.14037014544010162,
0.0630330741405487,
0.15738284587860107,
0.0797940343618393,
0.2786743640899658,
-0.3184188902378082,
0.3341217339038849,
-0.2010243535041809,
0.15044274926185608,
0.16504013538360596,
0.1707826554775238,
0.47819769382476807,
-0.21895328164100647,
0.1201993077993393,
-0.05470804125070572,
-0.055982429534196854,
-0.2209564745426178,
0.37098369002342224,
-0.2195921689271927,
0.09888742864131927,
-0.01384462509304285,
0.13477052748203278,
-0.3465387225151062,
0.24071431159973145,
-0.3876204192638397,
-0.11032772809267044,
-0.11108896136283875,
0.29559195041656494,
-0.020897040143609047,
-0.05377369746565819,
-0.05406945198774338,
0.05410065874457359,
0.011032848618924618,
-0.020706139504909515,
0.7203758358955383,
0.11661053448915482,
-0.11868809163570404,
0.21674589812755585,
-0.12039266526699066,
0.07453883439302444,
0.3405556380748749,
-0.14502787590026855,
-0.14943349361419678,
-0.224394753575325,
-0.4531257450580597,
-0.1796521693468094,
-0.1301988661289215,
0.4190951883792877,
-0.05322779715061188,
-0.10466795414686203,
-0.005034180358052254,
-0.2219073474407196,
0.09739701449871063,
-0.12151535600423813,
-0.22223630547523499,
0.4555123448371887,
-0.01706616021692753,
0.8264551758766174,
-0.2936059832572937,
-0.0018074960680678487,
0.13426682353019714,
0.0010820821626111865,
-0.07121186703443527,
-0.10713191330432892,
-0.24267564713954926,
-0.3749575614929199,
-0.09801707416772842,
0.01406191848218441,
-0.18470005691051483,
0.013825521804392338,
0.13087742030620575,
-0.18136951327323914,
-0.2336966097354889,
-0.08231674134731293,
0.06856401264667511,
0.04127184674143791,
0.4353126585483551,
-0.4450201392173767,
0.03158195689320564,
-0.4096194803714752,
0.3158757984638214,
0.49723029136657715,
0.5291272401809692,
0.12179385870695114,
0.09011239558458328,
0.02132946066558361,
-0.21044990420341492,
0.1162150502204895,
-0.02928340435028076,
-0.16603994369506836,
0.10155653953552246,
-0.4414491355419159,
0.011732016690075397,
-0.1297820508480072,
-0.16090205311775208,
0.4916609227657318,
-0.04980132728815079,
-0.12886038422584534,
-0.074397973716259,
0.030975980684161186,
0.14586274325847626,
0.16996388137340546,
0.008844590745866299,
0.06219489499926567,
0.11095231026411057,
0.12425775825977325,
-0.20233966410160065,
0.8482871651649475,
-0.12531882524490356,
0.1026916652917862,
0.207521453499794,
0.30720841884613037,
0.6294142603874207,
-0.06386823207139969,
0.11236339062452316,
-0.23349812626838684,
-0.27931031584739685,
-0.09419476240873337,
-0.06493206322193146,
0.1628035604953766,
0.207980215549469,
-0.2979590892791748,
0.20744788646697998,
0.21810422837734222,
0.12946447730064392,
-0.14870503544807434,
-0.05600995942950249,
0.11752153187990189,
0.14092960953712463,
-0.19524282217025757,
0.13263392448425293,
0.11675070971250534,
0.4041544795036316,
-0.19356031715869904,
-0.2291712909936905,
-0.08776257932186127,
-0.2221348136663437,
0.08042038977146149,
0.1573011577129364,
-0.528657078742981,
0.2356593757867813,
-0.22750593721866608,
-0.40892618894577026,
-0.34678614139556885,
0.1778479516506195,
-0.004153854679316282,
0.08473853766918182,
-0.04761485010385513,
-0.1117498129606247,
0.06404285132884979,
-0.39017343521118164,
-0.4925832450389862,
0.21841095387935638,
0.48513203859329224,
-0.1522623896598816,
-0.012080240063369274,
0.06413812935352325,
-0.155884250998497,
-0.23809844255447388,
-0.019142594188451767,
-0.1596202403306961,
-0.28722795844078064,
-0.2571273744106293,
-0.30855414271354675,
-0.028174979612231255,
-0.33028340339660645,
-0.14285053312778473,
0.17841269075870514,
0.2789239287376404,
-0.06055864691734314,
0.09752695262432098,
-0.10361407697200775,
-0.386551171541214,
-0.10799351334571838,
0.17807957530021667,
0.13515305519104004,
0.19950591027736664,
0.5242392420768738,
0.04066303372383118,
0.1123761311173439,
-0.4127471148967743,
-0.15735836327075958,
-0.32802844047546387,
-0.0698261708021164,
0.1418730616569519,
0.1446262001991272,
0.28803759813308716,
0.3875505328178406,
-0.07094141840934753,
0.34133070707321167,
0.2639431059360504,
-0.04538828879594803,
-0.3352801203727722,
-0.5123893618583679,
0.17144323885440826,
0.19266901910305023,
0.1247531995177269,
-0.06397585570812225,
0.13789810240268707,
0.043948616832494736,
-0.153736874461174,
-0.3508923053741455,
0.09612065553665161,
-0.20283406972885132,
-0.0406859889626503,
0.42112627625465393,
0.19683048129081726,
0.4494459629058838,
0.10559144616127014,
0.24505510926246643,
0.00568044139072299,
0.02677840180695057,
-0.32551664113998413,
0.1454479694366455,
0.11377241462469101,
0.2700650095939636,
0.11459691822528839,
-0.14043515920639038,
-0.24271316826343536,
0.09137948602437973,
0.14014217257499695,
0.04785633832216263,
0.02748996950685978,
-0.1621348261833191,
0.34169769287109375,
0.025649521499872208,
0.1266721785068512,
-0.24340179562568665,
0.1705341935157776,
0.12360557913780212,
0.45333993434906006,
-0.3124879002571106,
-0.05942932516336441,
-0.10902754962444305,
-0.17117241024971008,
-0.1661943644285202,
-0.054013486951589584,
-0.19972321391105652,
0.12755391001701355,
0.02810336835682392,
-0.22109776735305786,
-0.1940828561782837,
-0.19126705825328827,
0.1221233606338501,
0.22347331047058105,
-0.114687979221344,
0.10085684061050415,
0.15296345949172974,
0.22420372068881989,
-0.32223770022392273,
0.24223127961158752,
0.0029819239862263203,
-0.17344582080841064,
0.11464247107505798,
0.24915842711925507,
-0.3091631531715393,
0.20698155462741852,
0.11222554743289948,
0.1295558661222458,
0.08585043996572495,
-0.21777787804603577,
0.11229335516691208,
0.473482608795166,
-0.2298983484506607,
0.14045685529708862,
-0.17889760434627533,
0.17930729687213898,
0.01126833725720644,
0.4641377925872803,
-0.06451746821403503,
0.08398307859897614,
-0.2795015871524811,
-0.22774247825145721,
-0.19611088931560516,
-0.20883215963840485,
-0.20470279455184937,
0.44456371665000916,
0.017133861780166626,
0.047348760068416595,
-0.0039059717673808336,
0.16993431746959686,
-0.43950656056404114,
0.1908244490623474,
-0.191942036151886,
0.022595060989260674,
-0.1980036497116089,
0.1277921348810196,
0.035007596015930176,
-0.40800008177757263,
-0.06780435889959335,
-0.1134861633181572,
0.04760872200131416,
0.6358321905136108,
0.010487130843102932,
0.1323423981666565,
0.024952130392193794,
0.07424800843000412,
0.09261114150285721,
0.15972121059894562,
0.0502200648188591,
-0.11390030384063721,
0.06243466958403587,
0.16273808479309082,
0.1486920863389969,
-0.034343961626291275,
0.4393308460712433,
0.31150174140930176,
0.24576693773269653,
-0.06308776140213013,
-0.01410162914544344,
-0.27047306299209595,
-0.2560565173625946,
-0.04519766569137573,
0.08484411239624023,
-0.08505580574274063,
-0.267708957195282,
0.28148746490478516,
0.25492173433303833,
-0.18135857582092285,
0.41002368927001953,
0.07387623190879822,
-0.05460371822118759,
-0.11954368650913239,
0.13365337252616882,
0.019489705562591553,
-0.19255003333091736,
-0.12800677120685577,
-0.1448460817337036,
-0.36203527450561523,
-0.40858733654022217,
0.06476932764053345,
0.1984640508890152,
0.21340018510818481,
0.21355417370796204,
0.12240259349346161,
0.04440157115459442,
0.1343904286623001,
0.3640216290950775,
0.08957894891500473,
-0.1485442817211151,
-0.2353888303041458,
-0.5180363059043884,
0.12270604074001312,
-0.16546772420406342,
-0.10342146456241608,
-0.4279889166355133,
0.18587253987789154,
0.09278500080108643,
-0.019003553315997124,
0.07605253905057907,
-0.043960701674222946,
0.12991224229335785,
0.009347268380224705,
-0.3026033341884613,
-0.17181211709976196,
0.2535218298435211,
-0.059983137995004654,
0.11626406013965607,
-0.2779553532600403,
-0.02723693661391735,
0.11032605916261673,
0.1837742179632187,
-0.23165835440158844,
0.26098859310150146,
-0.2463587522506714,
0.5276353359222412,
0.310806006193161,
0.049524739384651184,
0.21054565906524658,
-0.2567351460456848,
-0.1078455001115799,
0.16951298713684082,
-0.20156952738761902,
-0.0353667214512825,
0.23722121119499207,
0.2720410227775574,
0.13808493316173553,
0.002700240584090352,
-0.07572265714406967,
-0.28299006819725037,
0.2347852885723114,
-0.18361280858516693,
-0.13343104720115662,
-0.03789631277322769,
0.10495471209287643,
0.1318158209323883,
-0.2425260990858078,
0.10548645257949829,
0.24241827428340912,
-0.13621863722801208,
0.029737284407019615,
-0.355314701795578,
-0.265269935131073,
0.19541814923286438,
0.051698409020900726,
0.14609917998313904,
-0.028483111411333084,
0.306331604719162,
-0.10910587757825851,
0.24162940680980682,
-0.08337073773145676,
0.30614760518074036,
0.27532482147216797,
0.02793661132454872,
-0.33524182438850403,
0.19333972036838531,
0.007617374416440725,
-0.10904421657323837,
0.027295369654893875,
0.6256055235862732,
0.1338026225566864,
-0.1511380821466446,
0.27622634172439575,
0.0902845561504364
] |
https://github.com/huggingface/datasets/issues/3204
|
FileNotFoundError for TupleIE dataste
|
Hi @arda-vianai,
first, you can try:
```python
import datasets
dataset = datasets.load_dataset('tuple_ie', 'all', revision="master")
```
If this doesn't work, your version of `datasets` is missing some features that are required to run the dataset script, so install the master version with the following command:
```
pip install git+https://github.com/huggingface/datasets.git
```
and then:
```python
import datasets
dataset = datasets.load_dataset('tuple_ie', 'all')
```
should work (even without `revision`).
|
Hi,
`dataset = datasets.load_dataset('tuple_ie', 'all')`
returns a FileNotFound error. Is the data not available?
Many thanks.
| 64 |
FileNotFoundError for TupleIE dataste
|
[
-0.1317325383424759,
0.038278356194496155,
-0.037130266427993774,
0.3781873881816864,
0.3069759011268616,
-0.03658738732337952,
0.1669267863035202,
0.33660629391670227,
0.39044925570487976,
0.19038954377174377,
0.11514583975076675,
-0.03092474304139614,
-0.2771509289741516,
0.14593884348869324,
-0.3940041661262512,
0.06999173015356064,
-0.07704290002584457,
0.3399006724357605,
0.06971296668052673,
-0.07652641087770462,
-0.339733749628067,
0.29256656765937805,
-0.2071744203567505,
0.13109779357910156,
-0.35052838921546936,
0.0995057001709938,
-0.07353289425373077,
0.6167556047439575,
-0.36867812275886536,
0.01597118191421032,
0.3691911995410919,
-0.14978259801864624,
0.1300634890794754,
0.4662332236766815,
-0.000108004838693887,
0.15101221203804016,
0.1867775171995163,
-0.2240552455186844,
-0.14408917725086212,
-0.17184996604919434,
-0.06961089372634888,
0.12080111354589462,
-0.02231518365442753,
-0.4241224527359009,
-0.25702744722366333,
0.1786910891532898,
-0.050322990864515305,
0.15444710850715637,
0.40201810002326965,
0.2549823820590973,
0.2277677208185196,
-0.08229584991931915,
0.1284763067960739,
-0.18190215528011322,
0.47561898827552795,
0.29854345321655273,
-0.023631341755390167,
-0.21768830716609955,
0.23094013333320618,
-0.47532978653907776,
0.21501374244689941,
0.14027827978134155,
-0.21069754660129547,
-0.06405924260616302,
-0.38702520728111267,
-0.06920813024044037,
0.11407801508903503,
0.05205797404050827,
0.07396126538515091,
0.23620864748954773,
0.4701908230781555,
-0.05953212082386017,
-0.4252593219280243,
0.3346397876739502,
-0.2763095498085022,
-0.24218912422657013,
0.40425917506217957,
-0.06441149860620499,
0.022049782797694206,
0.07890001684427261,
0.5724350214004517,
-0.040933579206466675,
-0.2542653977870941,
0.2961480915546417,
-0.20582038164138794,
0.1797083616256714,
0.014691131189465523,
-0.1828828752040863,
0.1545606106519699,
-0.2657097280025482,
-0.34073320031166077,
0.20513756573200226,
0.007192988879978657,
0.021485820412635803,
0.08240389078855515,
-0.36965668201446533,
0.16953887045383453,
-0.27887198328971863,
0.2050030380487442,
0.04494069889187813,
0.040697477757930756,
0.047274183481931686,
-0.3853408992290497,
0.08296871185302734,
0.1506829559803009,
0.03806617856025696,
-0.01894029602408409,
-0.02588219754397869,
0.3743728995323181,
0.053141187876462936,
-0.18618839979171753,
-0.08356891572475433,
0.12776045501232147,
-0.22629298269748688,
-0.12568572163581848,
-0.017056623473763466,
0.6016514897346497,
-0.2878650426864624,
-0.32187730073928833,
0.02463109977543354,
0.05435769259929657,
0.04031036049127579,
0.23809504508972168,
0.22312922775745392,
0.05117315053939819,
-0.15881189703941345,
0.011949857696890831,
0.2453252673149109,
-0.2601814270019531,
-0.05516520142555237,
-0.2866177558898926,
0.22416885197162628,
0.010775111615657806,
-0.0729447677731514,
0.11598735302686691,
0.10358144342899323,
0.21101659536361694,
0.10467851907014847,
-0.15575852990150452,
-0.0770697072148323,
0.11116886883974075,
-0.3518446683883667,
-0.17259949445724487,
0.22962109744548798,
-0.27970626950263977,
-0.01888997107744217,
0.4374960660934448,
-0.6315734386444092,
0.08307226747274399,
0.30047839879989624,
-0.5104413628578186,
-0.35001859068870544,
-0.3650027811527252,
0.22209669649600983,
-0.04346539452672005,
0.08901891112327576,
0.16807201504707336,
-0.12362771481275558,
0.05088702589273453,
-0.354927122592926,
-0.011343128979206085,
0.0013714932138100266,
0.15018269419670105,
-0.3020781874656677,
-0.01726539060473442,
0.9147707223892212,
-0.38207563757896423,
0.20931009948253632,
-0.02402666211128235,
-0.32637766003608704,
0.4994802474975586,
0.37823134660720825,
0.07658348977565765,
0.03696602210402489,
-0.3227229714393616,
0.40825900435447693,
0.5506460070610046,
-0.19651846587657928,
-0.28725600242614746,
0.15507422387599945,
0.014861117117106915,
-0.10719064623117447,
0.25113821029663086,
0.08347953110933304,
-0.17725501954555511,
-0.12690383195877075,
0.3045150339603424,
-0.3108431398868561,
0.04154229536652565,
-0.014215671457350254,
-0.35293516516685486,
0.11796394735574722,
-0.034134216606616974,
0.23481248319149017,
-0.12794192135334015,
0.11167632043361664,
0.17102767527103424,
0.12245004624128342,
0.09649988263845444,
-0.18146762251853943,
-0.1256347894668579,
0.10387024283409119,
0.5328997373580933,
0.3617733418941498,
-0.1718624383211136,
0.04999137669801712,
-0.20582878589630127,
-0.03579000011086464,
0.09442553669214249,
-0.12244347482919693,
-0.2751989960670471,
-0.19253525137901306,
0.14026698470115662,
-0.07264048606157303,
-0.13697537779808044,
-0.15733873844146729,
0.2275150567293167,
0.000344754516845569,
0.11182723939418793,
-0.053252916783094406,
-0.291015088558197,
-0.03505678102374077,
-0.16490304470062256,
0.09595639258623123,
-0.004835091531276703,
0.2484649270772934,
-0.13989026844501495,
-0.36451753973960876,
0.080078125,
0.11259220540523529,
0.10817032307386398,
-0.3261339068412781,
-0.17557518184185028,
0.32121458649635315,
0.6691648960113525,
-0.16754990816116333,
0.2891448736190796,
-0.13850194215774536,
0.09456640481948853,
0.09196663647890091,
0.01509806141257286,
0.3940386474132538,
0.039927560836076736,
-0.031997859477996826,
-0.10072419792413712,
0.2602282166481018,
-0.25380808115005493,
-0.3193921148777008,
0.15971282124519348,
-0.042344022542238235,
0.40062451362609863,
-0.12747390568256378,
0.02493579313158989,
-0.32465019822120667,
0.3596617877483368,
0.20474153757095337,
-0.06292997300624847,
-0.04189246520400047,
-0.5242629647254944,
-0.15643277764320374,
0.48524293303489685,
0.21667100489139557,
0.1427297443151474,
-0.10396939516067505,
-0.1478658765554428,
0.1755760759115219,
-0.10866344720125198,
0.1965014934539795,
0.6316912174224854,
0.2096455693244934,
-0.08469724655151367,
-0.0798892080783844,
0.006650111638009548,
-0.32579678297042847,
-0.012084495276212692,
-0.1497662365436554,
-0.04086257517337799,
0.2626378536224365,
-0.201869398355484,
0.06747877597808838,
-0.43509000539779663,
-0.132753387093544,
-0.17206741869449615,
0.15535244345664978,
-0.11601987481117249,
-0.2095680981874466,
-0.31142616271972656,
-0.5156847834587097,
0.35172516107559204,
-0.029898738488554955,
0.044211018830537796,
0.016720080748200417,
0.2807709574699402,
0.2108973115682602,
-0.3520973026752472,
-0.01472766138613224,
0.04511672258377075,
0.03838891535997391,
0.15812738239765167,
-0.37627291679382324,
-0.08859331160783768,
-0.19323958456516266,
0.08461850136518478,
0.13854309916496277,
0.24273434281349182,
-0.41998621821403503,
0.15852202475070953,
-0.2606131434440613,
-0.06145055592060089,
-0.31264182925224304,
-0.3156374394893646,
-0.030180905014276505,
0.04897237569093704,
0.061615485697984695,
0.22403621673583984,
0.4153180718421936,
-0.08749844878911972,
0.02026689238846302,
0.4289032220840454,
0.023188944905996323,
-0.22164657711982727,
0.28634050488471985,
0.16860219836235046,
0.055776383727788925,
-0.24296081066131592,
-0.4176177978515625,
-0.19820724427700043,
-0.21106784045696259,
0.1941959261894226,
0.2559155523777008,
0.24593262374401093,
0.050647541880607605,
0.13474002480506897,
-0.022271940484642982,
0.2071620523929596,
-0.1178319901227951,
-0.17028209567070007,
-0.1495143324136734,
0.33073338866233826,
-0.2547847032546997,
-0.33274272084236145,
0.30714794993400574,
0.025352124124765396,
0.1832580268383026,
0.09496594965457916,
-0.2894572913646698,
-0.43736010789871216,
0.12874282896518707,
-0.08083131164312363,
-0.11733858287334442,
-0.1277046650648117,
0.5763106346130371,
0.04132743179798126,
-0.21213705837726593,
-0.14037014544010162,
0.0630330741405487,
0.15738284587860107,
0.0797940343618393,
0.2786743640899658,
-0.3184188902378082,
0.3341217339038849,
-0.2010243535041809,
0.15044274926185608,
0.16504013538360596,
0.1707826554775238,
0.47819769382476807,
-0.21895328164100647,
0.1201993077993393,
-0.05470804125070572,
-0.055982429534196854,
-0.2209564745426178,
0.37098369002342224,
-0.2195921689271927,
0.09888742864131927,
-0.01384462509304285,
0.13477052748203278,
-0.3465387225151062,
0.24071431159973145,
-0.3876204192638397,
-0.11032772809267044,
-0.11108896136283875,
0.29559195041656494,
-0.020897040143609047,
-0.05377369746565819,
-0.05406945198774338,
0.05410065874457359,
0.011032848618924618,
-0.020706139504909515,
0.7203758358955383,
0.11661053448915482,
-0.11868809163570404,
0.21674589812755585,
-0.12039266526699066,
0.07453883439302444,
0.3405556380748749,
-0.14502787590026855,
-0.14943349361419678,
-0.224394753575325,
-0.4531257450580597,
-0.1796521693468094,
-0.1301988661289215,
0.4190951883792877,
-0.05322779715061188,
-0.10466795414686203,
-0.005034180358052254,
-0.2219073474407196,
0.09739701449871063,
-0.12151535600423813,
-0.22223630547523499,
0.4555123448371887,
-0.01706616021692753,
0.8264551758766174,
-0.2936059832572937,
-0.0018074960680678487,
0.13426682353019714,
0.0010820821626111865,
-0.07121186703443527,
-0.10713191330432892,
-0.24267564713954926,
-0.3749575614929199,
-0.09801707416772842,
0.01406191848218441,
-0.18470005691051483,
0.013825521804392338,
0.13087742030620575,
-0.18136951327323914,
-0.2336966097354889,
-0.08231674134731293,
0.06856401264667511,
0.04127184674143791,
0.4353126585483551,
-0.4450201392173767,
0.03158195689320564,
-0.4096194803714752,
0.3158757984638214,
0.49723029136657715,
0.5291272401809692,
0.12179385870695114,
0.09011239558458328,
0.02132946066558361,
-0.21044990420341492,
0.1162150502204895,
-0.02928340435028076,
-0.16603994369506836,
0.10155653953552246,
-0.4414491355419159,
0.011732016690075397,
-0.1297820508480072,
-0.16090205311775208,
0.4916609227657318,
-0.04980132728815079,
-0.12886038422584534,
-0.074397973716259,
0.030975980684161186,
0.14586274325847626,
0.16996388137340546,
0.008844590745866299,
0.06219489499926567,
0.11095231026411057,
0.12425775825977325,
-0.20233966410160065,
0.8482871651649475,
-0.12531882524490356,
0.1026916652917862,
0.207521453499794,
0.30720841884613037,
0.6294142603874207,
-0.06386823207139969,
0.11236339062452316,
-0.23349812626838684,
-0.27931031584739685,
-0.09419476240873337,
-0.06493206322193146,
0.1628035604953766,
0.207980215549469,
-0.2979590892791748,
0.20744788646697998,
0.21810422837734222,
0.12946447730064392,
-0.14870503544807434,
-0.05600995942950249,
0.11752153187990189,
0.14092960953712463,
-0.19524282217025757,
0.13263392448425293,
0.11675070971250534,
0.4041544795036316,
-0.19356031715869904,
-0.2291712909936905,
-0.08776257932186127,
-0.2221348136663437,
0.08042038977146149,
0.1573011577129364,
-0.528657078742981,
0.2356593757867813,
-0.22750593721866608,
-0.40892618894577026,
-0.34678614139556885,
0.1778479516506195,
-0.004153854679316282,
0.08473853766918182,
-0.04761485010385513,
-0.1117498129606247,
0.06404285132884979,
-0.39017343521118164,
-0.4925832450389862,
0.21841095387935638,
0.48513203859329224,
-0.1522623896598816,
-0.012080240063369274,
0.06413812935352325,
-0.155884250998497,
-0.23809844255447388,
-0.019142594188451767,
-0.1596202403306961,
-0.28722795844078064,
-0.2571273744106293,
-0.30855414271354675,
-0.028174979612231255,
-0.33028340339660645,
-0.14285053312778473,
0.17841269075870514,
0.2789239287376404,
-0.06055864691734314,
0.09752695262432098,
-0.10361407697200775,
-0.386551171541214,
-0.10799351334571838,
0.17807957530021667,
0.13515305519104004,
0.19950591027736664,
0.5242392420768738,
0.04066303372383118,
0.1123761311173439,
-0.4127471148967743,
-0.15735836327075958,
-0.32802844047546387,
-0.0698261708021164,
0.1418730616569519,
0.1446262001991272,
0.28803759813308716,
0.3875505328178406,
-0.07094141840934753,
0.34133070707321167,
0.2639431059360504,
-0.04538828879594803,
-0.3352801203727722,
-0.5123893618583679,
0.17144323885440826,
0.19266901910305023,
0.1247531995177269,
-0.06397585570812225,
0.13789810240268707,
0.043948616832494736,
-0.153736874461174,
-0.3508923053741455,
0.09612065553665161,
-0.20283406972885132,
-0.0406859889626503,
0.42112627625465393,
0.19683048129081726,
0.4494459629058838,
0.10559144616127014,
0.24505510926246643,
0.00568044139072299,
0.02677840180695057,
-0.32551664113998413,
0.1454479694366455,
0.11377241462469101,
0.2700650095939636,
0.11459691822528839,
-0.14043515920639038,
-0.24271316826343536,
0.09137948602437973,
0.14014217257499695,
0.04785633832216263,
0.02748996950685978,
-0.1621348261833191,
0.34169769287109375,
0.025649521499872208,
0.1266721785068512,
-0.24340179562568665,
0.1705341935157776,
0.12360557913780212,
0.45333993434906006,
-0.3124879002571106,
-0.05942932516336441,
-0.10902754962444305,
-0.17117241024971008,
-0.1661943644285202,
-0.054013486951589584,
-0.19972321391105652,
0.12755391001701355,
0.02810336835682392,
-0.22109776735305786,
-0.1940828561782837,
-0.19126705825328827,
0.1221233606338501,
0.22347331047058105,
-0.114687979221344,
0.10085684061050415,
0.15296345949172974,
0.22420372068881989,
-0.32223770022392273,
0.24223127961158752,
0.0029819239862263203,
-0.17344582080841064,
0.11464247107505798,
0.24915842711925507,
-0.3091631531715393,
0.20698155462741852,
0.11222554743289948,
0.1295558661222458,
0.08585043996572495,
-0.21777787804603577,
0.11229335516691208,
0.473482608795166,
-0.2298983484506607,
0.14045685529708862,
-0.17889760434627533,
0.17930729687213898,
0.01126833725720644,
0.4641377925872803,
-0.06451746821403503,
0.08398307859897614,
-0.2795015871524811,
-0.22774247825145721,
-0.19611088931560516,
-0.20883215963840485,
-0.20470279455184937,
0.44456371665000916,
0.017133861780166626,
0.047348760068416595,
-0.0039059717673808336,
0.16993431746959686,
-0.43950656056404114,
0.1908244490623474,
-0.191942036151886,
0.022595060989260674,
-0.1980036497116089,
0.1277921348810196,
0.035007596015930176,
-0.40800008177757263,
-0.06780435889959335,
-0.1134861633181572,
0.04760872200131416,
0.6358321905136108,
0.010487130843102932,
0.1323423981666565,
0.024952130392193794,
0.07424800843000412,
0.09261114150285721,
0.15972121059894562,
0.0502200648188591,
-0.11390030384063721,
0.06243466958403587,
0.16273808479309082,
0.1486920863389969,
-0.034343961626291275,
0.4393308460712433,
0.31150174140930176,
0.24576693773269653,
-0.06308776140213013,
-0.01410162914544344,
-0.27047306299209595,
-0.2560565173625946,
-0.04519766569137573,
0.08484411239624023,
-0.08505580574274063,
-0.267708957195282,
0.28148746490478516,
0.25492173433303833,
-0.18135857582092285,
0.41002368927001953,
0.07387623190879822,
-0.05460371822118759,
-0.11954368650913239,
0.13365337252616882,
0.019489705562591553,
-0.19255003333091736,
-0.12800677120685577,
-0.1448460817337036,
-0.36203527450561523,
-0.40858733654022217,
0.06476932764053345,
0.1984640508890152,
0.21340018510818481,
0.21355417370796204,
0.12240259349346161,
0.04440157115459442,
0.1343904286623001,
0.3640216290950775,
0.08957894891500473,
-0.1485442817211151,
-0.2353888303041458,
-0.5180363059043884,
0.12270604074001312,
-0.16546772420406342,
-0.10342146456241608,
-0.4279889166355133,
0.18587253987789154,
0.09278500080108643,
-0.019003553315997124,
0.07605253905057907,
-0.043960701674222946,
0.12991224229335785,
0.009347268380224705,
-0.3026033341884613,
-0.17181211709976196,
0.2535218298435211,
-0.059983137995004654,
0.11626406013965607,
-0.2779553532600403,
-0.02723693661391735,
0.11032605916261673,
0.1837742179632187,
-0.23165835440158844,
0.26098859310150146,
-0.2463587522506714,
0.5276353359222412,
0.310806006193161,
0.049524739384651184,
0.21054565906524658,
-0.2567351460456848,
-0.1078455001115799,
0.16951298713684082,
-0.20156952738761902,
-0.0353667214512825,
0.23722121119499207,
0.2720410227775574,
0.13808493316173553,
0.002700240584090352,
-0.07572265714406967,
-0.28299006819725037,
0.2347852885723114,
-0.18361280858516693,
-0.13343104720115662,
-0.03789631277322769,
0.10495471209287643,
0.1318158209323883,
-0.2425260990858078,
0.10548645257949829,
0.24241827428340912,
-0.13621863722801208,
0.029737284407019615,
-0.355314701795578,
-0.265269935131073,
0.19541814923286438,
0.051698409020900726,
0.14609917998313904,
-0.028483111411333084,
0.306331604719162,
-0.10910587757825851,
0.24162940680980682,
-0.08337073773145676,
0.30614760518074036,
0.27532482147216797,
0.02793661132454872,
-0.33524182438850403,
0.19333972036838531,
0.007617374416440725,
-0.10904421657323837,
0.027295369654893875,
0.6256055235862732,
0.1338026225566864,
-0.1511380821466446,
0.27622634172439575,
0.0902845561504364
] |
https://github.com/huggingface/datasets/issues/3204
|
FileNotFoundError for TupleIE dataste
|
@mariosasko
Thanks, it is working now. I actually did that before but I didn't restart the kernel. I restarted it and it works now. My bad!!!
Many thanks and great job!
-arda
|
Hi,
`dataset = datasets.load_dataset('tuple_ie', 'all')`
returns a FileNotFound error. Is the data not available?
Many thanks.
| 32 |
FileNotFoundError for TupleIE dataste
|
[
-0.1317325383424759,
0.038278356194496155,
-0.037130266427993774,
0.3781873881816864,
0.3069759011268616,
-0.03658738732337952,
0.1669267863035202,
0.33660629391670227,
0.39044925570487976,
0.19038954377174377,
0.11514583975076675,
-0.03092474304139614,
-0.2771509289741516,
0.14593884348869324,
-0.3940041661262512,
0.06999173015356064,
-0.07704290002584457,
0.3399006724357605,
0.06971296668052673,
-0.07652641087770462,
-0.339733749628067,
0.29256656765937805,
-0.2071744203567505,
0.13109779357910156,
-0.35052838921546936,
0.0995057001709938,
-0.07353289425373077,
0.6167556047439575,
-0.36867812275886536,
0.01597118191421032,
0.3691911995410919,
-0.14978259801864624,
0.1300634890794754,
0.4662332236766815,
-0.000108004838693887,
0.15101221203804016,
0.1867775171995163,
-0.2240552455186844,
-0.14408917725086212,
-0.17184996604919434,
-0.06961089372634888,
0.12080111354589462,
-0.02231518365442753,
-0.4241224527359009,
-0.25702744722366333,
0.1786910891532898,
-0.050322990864515305,
0.15444710850715637,
0.40201810002326965,
0.2549823820590973,
0.2277677208185196,
-0.08229584991931915,
0.1284763067960739,
-0.18190215528011322,
0.47561898827552795,
0.29854345321655273,
-0.023631341755390167,
-0.21768830716609955,
0.23094013333320618,
-0.47532978653907776,
0.21501374244689941,
0.14027827978134155,
-0.21069754660129547,
-0.06405924260616302,
-0.38702520728111267,
-0.06920813024044037,
0.11407801508903503,
0.05205797404050827,
0.07396126538515091,
0.23620864748954773,
0.4701908230781555,
-0.05953212082386017,
-0.4252593219280243,
0.3346397876739502,
-0.2763095498085022,
-0.24218912422657013,
0.40425917506217957,
-0.06441149860620499,
0.022049782797694206,
0.07890001684427261,
0.5724350214004517,
-0.040933579206466675,
-0.2542653977870941,
0.2961480915546417,
-0.20582038164138794,
0.1797083616256714,
0.014691131189465523,
-0.1828828752040863,
0.1545606106519699,
-0.2657097280025482,
-0.34073320031166077,
0.20513756573200226,
0.007192988879978657,
0.021485820412635803,
0.08240389078855515,
-0.36965668201446533,
0.16953887045383453,
-0.27887198328971863,
0.2050030380487442,
0.04494069889187813,
0.040697477757930756,
0.047274183481931686,
-0.3853408992290497,
0.08296871185302734,
0.1506829559803009,
0.03806617856025696,
-0.01894029602408409,
-0.02588219754397869,
0.3743728995323181,
0.053141187876462936,
-0.18618839979171753,
-0.08356891572475433,
0.12776045501232147,
-0.22629298269748688,
-0.12568572163581848,
-0.017056623473763466,
0.6016514897346497,
-0.2878650426864624,
-0.32187730073928833,
0.02463109977543354,
0.05435769259929657,
0.04031036049127579,
0.23809504508972168,
0.22312922775745392,
0.05117315053939819,
-0.15881189703941345,
0.011949857696890831,
0.2453252673149109,
-0.2601814270019531,
-0.05516520142555237,
-0.2866177558898926,
0.22416885197162628,
0.010775111615657806,
-0.0729447677731514,
0.11598735302686691,
0.10358144342899323,
0.21101659536361694,
0.10467851907014847,
-0.15575852990150452,
-0.0770697072148323,
0.11116886883974075,
-0.3518446683883667,
-0.17259949445724487,
0.22962109744548798,
-0.27970626950263977,
-0.01888997107744217,
0.4374960660934448,
-0.6315734386444092,
0.08307226747274399,
0.30047839879989624,
-0.5104413628578186,
-0.35001859068870544,
-0.3650027811527252,
0.22209669649600983,
-0.04346539452672005,
0.08901891112327576,
0.16807201504707336,
-0.12362771481275558,
0.05088702589273453,
-0.354927122592926,
-0.011343128979206085,
0.0013714932138100266,
0.15018269419670105,
-0.3020781874656677,
-0.01726539060473442,
0.9147707223892212,
-0.38207563757896423,
0.20931009948253632,
-0.02402666211128235,
-0.32637766003608704,
0.4994802474975586,
0.37823134660720825,
0.07658348977565765,
0.03696602210402489,
-0.3227229714393616,
0.40825900435447693,
0.5506460070610046,
-0.19651846587657928,
-0.28725600242614746,
0.15507422387599945,
0.014861117117106915,
-0.10719064623117447,
0.25113821029663086,
0.08347953110933304,
-0.17725501954555511,
-0.12690383195877075,
0.3045150339603424,
-0.3108431398868561,
0.04154229536652565,
-0.014215671457350254,
-0.35293516516685486,
0.11796394735574722,
-0.034134216606616974,
0.23481248319149017,
-0.12794192135334015,
0.11167632043361664,
0.17102767527103424,
0.12245004624128342,
0.09649988263845444,
-0.18146762251853943,
-0.1256347894668579,
0.10387024283409119,
0.5328997373580933,
0.3617733418941498,
-0.1718624383211136,
0.04999137669801712,
-0.20582878589630127,
-0.03579000011086464,
0.09442553669214249,
-0.12244347482919693,
-0.2751989960670471,
-0.19253525137901306,
0.14026698470115662,
-0.07264048606157303,
-0.13697537779808044,
-0.15733873844146729,
0.2275150567293167,
0.000344754516845569,
0.11182723939418793,
-0.053252916783094406,
-0.291015088558197,
-0.03505678102374077,
-0.16490304470062256,
0.09595639258623123,
-0.004835091531276703,
0.2484649270772934,
-0.13989026844501495,
-0.36451753973960876,
0.080078125,
0.11259220540523529,
0.10817032307386398,
-0.3261339068412781,
-0.17557518184185028,
0.32121458649635315,
0.6691648960113525,
-0.16754990816116333,
0.2891448736190796,
-0.13850194215774536,
0.09456640481948853,
0.09196663647890091,
0.01509806141257286,
0.3940386474132538,
0.039927560836076736,
-0.031997859477996826,
-0.10072419792413712,
0.2602282166481018,
-0.25380808115005493,
-0.3193921148777008,
0.15971282124519348,
-0.042344022542238235,
0.40062451362609863,
-0.12747390568256378,
0.02493579313158989,
-0.32465019822120667,
0.3596617877483368,
0.20474153757095337,
-0.06292997300624847,
-0.04189246520400047,
-0.5242629647254944,
-0.15643277764320374,
0.48524293303489685,
0.21667100489139557,
0.1427297443151474,
-0.10396939516067505,
-0.1478658765554428,
0.1755760759115219,
-0.10866344720125198,
0.1965014934539795,
0.6316912174224854,
0.2096455693244934,
-0.08469724655151367,
-0.0798892080783844,
0.006650111638009548,
-0.32579678297042847,
-0.012084495276212692,
-0.1497662365436554,
-0.04086257517337799,
0.2626378536224365,
-0.201869398355484,
0.06747877597808838,
-0.43509000539779663,
-0.132753387093544,
-0.17206741869449615,
0.15535244345664978,
-0.11601987481117249,
-0.2095680981874466,
-0.31142616271972656,
-0.5156847834587097,
0.35172516107559204,
-0.029898738488554955,
0.044211018830537796,
0.016720080748200417,
0.2807709574699402,
0.2108973115682602,
-0.3520973026752472,
-0.01472766138613224,
0.04511672258377075,
0.03838891535997391,
0.15812738239765167,
-0.37627291679382324,
-0.08859331160783768,
-0.19323958456516266,
0.08461850136518478,
0.13854309916496277,
0.24273434281349182,
-0.41998621821403503,
0.15852202475070953,
-0.2606131434440613,
-0.06145055592060089,
-0.31264182925224304,
-0.3156374394893646,
-0.030180905014276505,
0.04897237569093704,
0.061615485697984695,
0.22403621673583984,
0.4153180718421936,
-0.08749844878911972,
0.02026689238846302,
0.4289032220840454,
0.023188944905996323,
-0.22164657711982727,
0.28634050488471985,
0.16860219836235046,
0.055776383727788925,
-0.24296081066131592,
-0.4176177978515625,
-0.19820724427700043,
-0.21106784045696259,
0.1941959261894226,
0.2559155523777008,
0.24593262374401093,
0.050647541880607605,
0.13474002480506897,
-0.022271940484642982,
0.2071620523929596,
-0.1178319901227951,
-0.17028209567070007,
-0.1495143324136734,
0.33073338866233826,
-0.2547847032546997,
-0.33274272084236145,
0.30714794993400574,
0.025352124124765396,
0.1832580268383026,
0.09496594965457916,
-0.2894572913646698,
-0.43736010789871216,
0.12874282896518707,
-0.08083131164312363,
-0.11733858287334442,
-0.1277046650648117,
0.5763106346130371,
0.04132743179798126,
-0.21213705837726593,
-0.14037014544010162,
0.0630330741405487,
0.15738284587860107,
0.0797940343618393,
0.2786743640899658,
-0.3184188902378082,
0.3341217339038849,
-0.2010243535041809,
0.15044274926185608,
0.16504013538360596,
0.1707826554775238,
0.47819769382476807,
-0.21895328164100647,
0.1201993077993393,
-0.05470804125070572,
-0.055982429534196854,
-0.2209564745426178,
0.37098369002342224,
-0.2195921689271927,
0.09888742864131927,
-0.01384462509304285,
0.13477052748203278,
-0.3465387225151062,
0.24071431159973145,
-0.3876204192638397,
-0.11032772809267044,
-0.11108896136283875,
0.29559195041656494,
-0.020897040143609047,
-0.05377369746565819,
-0.05406945198774338,
0.05410065874457359,
0.011032848618924618,
-0.020706139504909515,
0.7203758358955383,
0.11661053448915482,
-0.11868809163570404,
0.21674589812755585,
-0.12039266526699066,
0.07453883439302444,
0.3405556380748749,
-0.14502787590026855,
-0.14943349361419678,
-0.224394753575325,
-0.4531257450580597,
-0.1796521693468094,
-0.1301988661289215,
0.4190951883792877,
-0.05322779715061188,
-0.10466795414686203,
-0.005034180358052254,
-0.2219073474407196,
0.09739701449871063,
-0.12151535600423813,
-0.22223630547523499,
0.4555123448371887,
-0.01706616021692753,
0.8264551758766174,
-0.2936059832572937,
-0.0018074960680678487,
0.13426682353019714,
0.0010820821626111865,
-0.07121186703443527,
-0.10713191330432892,
-0.24267564713954926,
-0.3749575614929199,
-0.09801707416772842,
0.01406191848218441,
-0.18470005691051483,
0.013825521804392338,
0.13087742030620575,
-0.18136951327323914,
-0.2336966097354889,
-0.08231674134731293,
0.06856401264667511,
0.04127184674143791,
0.4353126585483551,
-0.4450201392173767,
0.03158195689320564,
-0.4096194803714752,
0.3158757984638214,
0.49723029136657715,
0.5291272401809692,
0.12179385870695114,
0.09011239558458328,
0.02132946066558361,
-0.21044990420341492,
0.1162150502204895,
-0.02928340435028076,
-0.16603994369506836,
0.10155653953552246,
-0.4414491355419159,
0.011732016690075397,
-0.1297820508480072,
-0.16090205311775208,
0.4916609227657318,
-0.04980132728815079,
-0.12886038422584534,
-0.074397973716259,
0.030975980684161186,
0.14586274325847626,
0.16996388137340546,
0.008844590745866299,
0.06219489499926567,
0.11095231026411057,
0.12425775825977325,
-0.20233966410160065,
0.8482871651649475,
-0.12531882524490356,
0.1026916652917862,
0.207521453499794,
0.30720841884613037,
0.6294142603874207,
-0.06386823207139969,
0.11236339062452316,
-0.23349812626838684,
-0.27931031584739685,
-0.09419476240873337,
-0.06493206322193146,
0.1628035604953766,
0.207980215549469,
-0.2979590892791748,
0.20744788646697998,
0.21810422837734222,
0.12946447730064392,
-0.14870503544807434,
-0.05600995942950249,
0.11752153187990189,
0.14092960953712463,
-0.19524282217025757,
0.13263392448425293,
0.11675070971250534,
0.4041544795036316,
-0.19356031715869904,
-0.2291712909936905,
-0.08776257932186127,
-0.2221348136663437,
0.08042038977146149,
0.1573011577129364,
-0.528657078742981,
0.2356593757867813,
-0.22750593721866608,
-0.40892618894577026,
-0.34678614139556885,
0.1778479516506195,
-0.004153854679316282,
0.08473853766918182,
-0.04761485010385513,
-0.1117498129606247,
0.06404285132884979,
-0.39017343521118164,
-0.4925832450389862,
0.21841095387935638,
0.48513203859329224,
-0.1522623896598816,
-0.012080240063369274,
0.06413812935352325,
-0.155884250998497,
-0.23809844255447388,
-0.019142594188451767,
-0.1596202403306961,
-0.28722795844078064,
-0.2571273744106293,
-0.30855414271354675,
-0.028174979612231255,
-0.33028340339660645,
-0.14285053312778473,
0.17841269075870514,
0.2789239287376404,
-0.06055864691734314,
0.09752695262432098,
-0.10361407697200775,
-0.386551171541214,
-0.10799351334571838,
0.17807957530021667,
0.13515305519104004,
0.19950591027736664,
0.5242392420768738,
0.04066303372383118,
0.1123761311173439,
-0.4127471148967743,
-0.15735836327075958,
-0.32802844047546387,
-0.0698261708021164,
0.1418730616569519,
0.1446262001991272,
0.28803759813308716,
0.3875505328178406,
-0.07094141840934753,
0.34133070707321167,
0.2639431059360504,
-0.04538828879594803,
-0.3352801203727722,
-0.5123893618583679,
0.17144323885440826,
0.19266901910305023,
0.1247531995177269,
-0.06397585570812225,
0.13789810240268707,
0.043948616832494736,
-0.153736874461174,
-0.3508923053741455,
0.09612065553665161,
-0.20283406972885132,
-0.0406859889626503,
0.42112627625465393,
0.19683048129081726,
0.4494459629058838,
0.10559144616127014,
0.24505510926246643,
0.00568044139072299,
0.02677840180695057,
-0.32551664113998413,
0.1454479694366455,
0.11377241462469101,
0.2700650095939636,
0.11459691822528839,
-0.14043515920639038,
-0.24271316826343536,
0.09137948602437973,
0.14014217257499695,
0.04785633832216263,
0.02748996950685978,
-0.1621348261833191,
0.34169769287109375,
0.025649521499872208,
0.1266721785068512,
-0.24340179562568665,
0.1705341935157776,
0.12360557913780212,
0.45333993434906006,
-0.3124879002571106,
-0.05942932516336441,
-0.10902754962444305,
-0.17117241024971008,
-0.1661943644285202,
-0.054013486951589584,
-0.19972321391105652,
0.12755391001701355,
0.02810336835682392,
-0.22109776735305786,
-0.1940828561782837,
-0.19126705825328827,
0.1221233606338501,
0.22347331047058105,
-0.114687979221344,
0.10085684061050415,
0.15296345949172974,
0.22420372068881989,
-0.32223770022392273,
0.24223127961158752,
0.0029819239862263203,
-0.17344582080841064,
0.11464247107505798,
0.24915842711925507,
-0.3091631531715393,
0.20698155462741852,
0.11222554743289948,
0.1295558661222458,
0.08585043996572495,
-0.21777787804603577,
0.11229335516691208,
0.473482608795166,
-0.2298983484506607,
0.14045685529708862,
-0.17889760434627533,
0.17930729687213898,
0.01126833725720644,
0.4641377925872803,
-0.06451746821403503,
0.08398307859897614,
-0.2795015871524811,
-0.22774247825145721,
-0.19611088931560516,
-0.20883215963840485,
-0.20470279455184937,
0.44456371665000916,
0.017133861780166626,
0.047348760068416595,
-0.0039059717673808336,
0.16993431746959686,
-0.43950656056404114,
0.1908244490623474,
-0.191942036151886,
0.022595060989260674,
-0.1980036497116089,
0.1277921348810196,
0.035007596015930176,
-0.40800008177757263,
-0.06780435889959335,
-0.1134861633181572,
0.04760872200131416,
0.6358321905136108,
0.010487130843102932,
0.1323423981666565,
0.024952130392193794,
0.07424800843000412,
0.09261114150285721,
0.15972121059894562,
0.0502200648188591,
-0.11390030384063721,
0.06243466958403587,
0.16273808479309082,
0.1486920863389969,
-0.034343961626291275,
0.4393308460712433,
0.31150174140930176,
0.24576693773269653,
-0.06308776140213013,
-0.01410162914544344,
-0.27047306299209595,
-0.2560565173625946,
-0.04519766569137573,
0.08484411239624023,
-0.08505580574274063,
-0.267708957195282,
0.28148746490478516,
0.25492173433303833,
-0.18135857582092285,
0.41002368927001953,
0.07387623190879822,
-0.05460371822118759,
-0.11954368650913239,
0.13365337252616882,
0.019489705562591553,
-0.19255003333091736,
-0.12800677120685577,
-0.1448460817337036,
-0.36203527450561523,
-0.40858733654022217,
0.06476932764053345,
0.1984640508890152,
0.21340018510818481,
0.21355417370796204,
0.12240259349346161,
0.04440157115459442,
0.1343904286623001,
0.3640216290950775,
0.08957894891500473,
-0.1485442817211151,
-0.2353888303041458,
-0.5180363059043884,
0.12270604074001312,
-0.16546772420406342,
-0.10342146456241608,
-0.4279889166355133,
0.18587253987789154,
0.09278500080108643,
-0.019003553315997124,
0.07605253905057907,
-0.043960701674222946,
0.12991224229335785,
0.009347268380224705,
-0.3026033341884613,
-0.17181211709976196,
0.2535218298435211,
-0.059983137995004654,
0.11626406013965607,
-0.2779553532600403,
-0.02723693661391735,
0.11032605916261673,
0.1837742179632187,
-0.23165835440158844,
0.26098859310150146,
-0.2463587522506714,
0.5276353359222412,
0.310806006193161,
0.049524739384651184,
0.21054565906524658,
-0.2567351460456848,
-0.1078455001115799,
0.16951298713684082,
-0.20156952738761902,
-0.0353667214512825,
0.23722121119499207,
0.2720410227775574,
0.13808493316173553,
0.002700240584090352,
-0.07572265714406967,
-0.28299006819725037,
0.2347852885723114,
-0.18361280858516693,
-0.13343104720115662,
-0.03789631277322769,
0.10495471209287643,
0.1318158209323883,
-0.2425260990858078,
0.10548645257949829,
0.24241827428340912,
-0.13621863722801208,
0.029737284407019615,
-0.355314701795578,
-0.265269935131073,
0.19541814923286438,
0.051698409020900726,
0.14609917998313904,
-0.028483111411333084,
0.306331604719162,
-0.10910587757825851,
0.24162940680980682,
-0.08337073773145676,
0.30614760518074036,
0.27532482147216797,
0.02793661132454872,
-0.33524182438850403,
0.19333972036838531,
0.007617374416440725,
-0.10904421657323837,
0.027295369654893875,
0.6256055235862732,
0.1338026225566864,
-0.1511380821466446,
0.27622634172439575,
0.0902845561504364
] |
https://github.com/huggingface/datasets/issues/3191
|
Dataset viewer issue for '*compguesswhat*'
|
```python
>>> import datasets
>>> dataset = datasets.load_dataset('compguesswhat', name='compguesswhat-original',split='train', streaming=True)
>>> next(iter(dataset))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 497, in __iter__
for key, example in self._iter():
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 494, in _iter
yield from ex_iterable
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 87, in __iter__
yield from self.generate_examples_fn(**self.kwargs)
File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/compguesswhat/4d08b9e0a8d1cf036c9626c93be4a759fdd9fcce050ea503ea14b075e830c799/compguesswhat.py", line 251, in _generate_examples
with gzip.open(filepath) as in_file:
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/gzip.py", line 58, in open
binary_file = GzipFile(filename, gz_mode, compresslevel)
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/gzip.py", line 173, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'zip://compguesswhat-original/0.2.0/compguesswhat.train.jsonl.gz::https://www.dropbox.com/s/l0nc13udml6vs0w/compguesswhat-original.zip?dl=1'
```
It's an issue with the streaming mode. Note that normal mode is used by the dataset viewer when streaming is failing, but only for the smallest datasets. This dataset is above the limit, hence the error.
Same case as https://github.com/huggingface/datasets/issues/3186#issuecomment-1096549774.
|
## Dataset viewer issue for '*compguesswhat*'
**Link:** https://huggingface.co/datasets/compguesswhat
File not found
Am I the one who added this dataset ? No
| 137 |
Dataset viewer issue for '*compguesswhat*'
|
[
-0.6610029935836792,
0.06969834119081497,
-0.10578896850347519,
0.13595958054065704,
0.264024943113327,
0.07526308298110962,
0.22572849690914154,
0.4700658917427063,
-0.10039098560810089,
0.13800552487373352,
0.1495674103498459,
0.2777789831161499,
0.06310800462961197,
-0.11051693558692932,
0.23154012858867645,
0.2524172365665436,
0.08842847496271133,
0.40723633766174316,
-0.3565823435783386,
0.11106511205434799,
-0.30079028010368347,
0.10268224775791168,
-0.2785644829273224,
0.3008403182029724,
-0.14919421076774597,
-0.3947482109069824,
0.10964217036962509,
0.2545787990093231,
-0.24306727945804596,
-0.2869032323360443,
0.14210662245750427,
0.336468905210495,
0.039226826280355453,
0.42263105511665344,
-0.00010915487655438483,
0.1218952089548111,
0.3227384388446808,
0.05569607764482498,
-0.35759174823760986,
0.08838987350463867,
-0.3821086883544922,
-0.205793559551239,
0.23229444026947021,
-0.13248835504055023,
-0.11336461454629898,
-0.1801815629005432,
0.09108112752437592,
-0.509253740310669,
0.16484706103801727,
0.1288442313671112,
0.2613045871257782,
0.11316240578889847,
-0.18633325397968292,
-0.16053561866283417,
0.06257978081703186,
0.13264502584934235,
-0.220082089304924,
-0.003671986749395728,
0.3709832727909088,
0.23951701819896698,
-0.026895174756646156,
0.388992041349411,
-0.012320163659751415,
0.10704612731933594,
0.034925371408462524,
-0.1680053472518921,
0.3707232177257538,
0.0472482368350029,
0.3921118676662445,
0.01646493561565876,
0.567506730556488,
-0.4977988302707672,
0.19158074259757996,
-0.12711118161678314,
-0.16769123077392578,
-0.23115003108978271,
0.12081930786371231,
0.10629117488861084,
-0.14463664591312408,
0.2733250856399536,
-0.06219424679875374,
0.200285866856575,
-0.23432710766792297,
-0.009236999787390232,
-0.22400377690792084,
0.025751497596502304,
-0.28995734453201294,
0.20512057840824127,
0.2619636058807373,
-0.06515377759933472,
0.6493079662322998,
0.02702159434556961,
-0.28875693678855896,
-0.05519506335258484,
-0.32019683718681335,
-0.028979428112506866,
0.375614732503891,
0.1670013666152954,
0.0961158499121666,
-0.19578741490840912,
0.2086106240749359,
0.4609546959400177,
0.33594948053359985,
0.2408490926027298,
0.4771369695663452,
-0.09592307358980179,
0.20015405118465424,
0.19988399744033813,
0.4424835741519928,
0.10227229446172714,
-0.02125653252005577,
0.054956793785095215,
-0.06471658498048782,
-0.3730333149433136,
0.007399341557174921,
-0.17485924065113068,
0.29689908027648926,
-0.21422968804836273,
-0.458684504032135,
0.12560610473155975,
0.24777933955192566,
0.0963926687836647,
0.3266398012638092,
0.28737789392471313,
0.12538601458072662,
-0.047081440687179565,
0.14504528045654297,
0.07238370925188065,
-0.01914769597351551,
-0.20524460077285767,
-0.3761182427406311,
-0.20060864090919495,
-0.0649188980460167,
-0.17863431572914124,
0.07893732935190201,
0.02625313028693199,
-0.210503950715065,
-0.09263917803764343,
-0.021211043000221252,
-0.26017647981643677,
-0.017859235405921936,
0.07636663317680359,
-0.09614764153957367,
0.26685261726379395,
-0.048976484686136246,
-0.043502651154994965,
0.10770338773727417,
-0.32365307211875916,
0.0029137691017240286,
0.4049767255783081,
-0.10041067749261856,
-0.292047917842865,
-0.21666356921195984,
0.23166683316230774,
-0.14965489506721497,
0.169653981924057,
0.0663754865527153,
0.3318871259689331,
-0.19552795588970184,
-0.29233115911483765,
-0.10399913787841797,
-0.046823181211948395,
0.13328012824058533,
-0.10508965700864792,
0.09436917304992676,
0.3415173590183258,
-0.8402068018913269,
0.11644788086414337,
-0.08582340180873871,
-0.3981165587902069,
0.025796134024858475,
-0.004637915641069412,
-0.21037626266479492,
-0.14388178288936615,
-0.3739621937274933,
0.03063168376684189,
0.7755122184753418,
0.11555778235197067,
-0.4090282917022705,
0.2778453826904297,
-0.02328621782362461,
-0.12324786186218262,
0.14885196089744568,
0.02272789180278778,
-0.20562337338924408,
-0.09155154973268509,
-0.3174801766872406,
-0.10541768372058868,
0.10938109457492828,
-0.020454347133636475,
-0.13762694597244263,
-0.1607951819896698,
0.2177189439535141,
0.022209011018276215,
0.12445098161697388,
-0.10584130883216858,
0.31676992774009705,
-0.2853275537490845,
0.3418298065662384,
-0.20138493180274963,
-0.07121104001998901,
-0.12486419826745987,
0.15843065083026886,
0.04958130046725273,
0.11020656675100327,
-0.251763254404068,
-0.24186314642429352,
-0.03161463141441345,
-0.013679489493370056,
-0.18494056165218353,
-0.18661969900131226,
-0.14029976725578308,
-0.04608330875635147,
0.26589787006378174,
-0.07530154287815094,
0.15539856255054474,
0.21552923321723938,
0.17178836464881897,
-0.22916752099990845,
0.14994113147258759,
0.11838765442371368,
0.30467402935028076,
0.10445692390203476,
-0.003021842800080776,
0.14216643571853638,
0.05199181288480759,
-0.1860419511795044,
-0.18192234635353088,
-0.11672504991292953,
0.21447914838790894,
0.23302778601646423,
-0.18489445745944977,
-0.16994158923625946,
0.3817799985408783,
0.09008191525936127,
0.13341407477855682,
-0.13946230709552765,
-0.12518082559108734,
0.049375955015420914,
-0.23717562854290009,
0.21129333972930908,
-0.050055284053087234,
0.15703469514846802,
-0.147693932056427,
-0.2943222224712372,
-0.03895408287644386,
0.026407187804579735,
-0.12326798588037491,
0.08368121832609177,
0.11277368664741516,
0.3626207411289215,
0.022098934277892113,
0.08321824669837952,
-0.05948254093527794,
0.0032927007414400578,
0.16998730599880219,
0.09491860121488571,
0.16663382947444916,
-0.5522723197937012,
0.27102959156036377,
0.24026931822299957,
-0.11384940147399902,
0.21768125891685486,
-0.14542321860790253,
-0.20213036239147186,
0.003127848729491234,
0.041727110743522644,
0.17637589573860168,
0.14291912317276,
0.21214623749256134,
-0.07010873407125473,
0.09836923331022263,
-0.09907671064138412,
-0.2511634826660156,
0.15763431787490845,
0.17311204969882965,
0.1259116381406784,
-0.041771598160266876,
-0.030970918014645576,
-0.2624898850917816,
-0.3150445222854614,
0.26035645604133606,
-0.017989978194236755,
0.09701786935329437,
-0.3158562481403351,
0.09409092366695404,
-0.4552209675312042,
-0.6258158087730408,
-0.15137240290641785,
0.2536259591579437,
0.09397121518850327,
-0.23656783998012543,
0.11774002760648727,
0.12634776532649994,
-0.27761968970298767,
0.33609652519226074,
-0.5154037475585938,
0.362260639667511,
-0.07425439357757568,
0.22057393193244934,
-0.08866170048713684,
-0.2109585702419281,
-0.34025803208351135,
0.05703020468354225,
0.3286125957965851,
0.2606745958328247,
0.19993893802165985,
-0.16119153797626495,
0.2818720042705536,
-0.3387317657470703,
-0.358254075050354,
0.20659442245960236,
-0.0035091196186840534,
0.30672019720077515,
0.2004881650209427,
-0.10600670427083969,
-0.307728111743927,
-0.23908419907093048,
0.14460791647434235,
-0.14874346554279327,
0.10738490521907806,
0.13620488345623016,
0.09296343475580215,
-0.4453088641166687,
-0.09123720228672028,
-0.15994611382484436,
-0.24542532861232758,
-0.33827656507492065,
0.0807628408074379,
0.07043025642633438,
0.15629881620407104,
0.2784423232078552,
0.09809251129627228,
-0.01748121902346611,
0.35304877161979675,
-0.08145831525325775,
-0.3987736701965332,
-0.32402175664901733,
0.29053443670272827,
-0.19342489540576935,
-0.4728669226169586,
0.15193967521190643,
0.032463911920785904,
0.04953248053789139,
0.09018272906541824,
-0.33450770378112793,
0.18175239861011505,
0.05240413919091225,
0.1625111699104309,
0.31316041946411133,
-0.20911750197410583,
0.37418878078460693,
0.1386580914258957,
-0.07202523201704025,
-0.33784377574920654,
-0.6819807291030884,
0.23725862801074982,
-0.02298738807439804,
0.09795565903186798,
-0.004221366252750158,
0.10200881958007812,
-0.09036342054605484,
0.504042387008667,
-0.34117332100868225,
-0.13761308789253235,
0.11872804164886475,
-0.24752023816108704,
0.61668860912323,
0.07093129307031631,
-0.29746103286743164,
0.14132215082645416,
-0.07455917447805405,
0.04059711471199989,
0.35288169980049133,
-0.12269355356693268,
-0.45406046509742737,
-0.027816042304039,
0.1331857144832611,
-0.3583487272262573,
-0.28460240364074707,
-0.06959988921880722,
-0.10256931930780411,
-0.05840631574392319,
0.30852535367012024,
0.12361805886030197,
-0.23642335832118988,
-0.11928962171077728,
-0.16192330420017242,
0.2277166098356247,
-0.1155410185456276,
0.0880143940448761,
0.0438588447868824,
0.309180349111557,
-0.06981848925352097,
0.44100871682167053,
-0.1733645796775818,
0.033352337777614594,
-0.13281483948230743,
-0.31487664580345154,
0.15937580168247223,
-0.05843140557408333,
0.3383976221084595,
-0.044172849506139755,
0.0712968185544014,
0.2669932246208191,
0.04787227883934975,
-0.049024902284145355,
-0.11387708783149719,
-0.03625306859612465,
0.10351395606994629,
0.3667334318161011,
-0.07306321710348129,
-0.09897719323635101,
-0.1153789758682251,
0.34677654504776,
-0.07721284031867981,
-0.14244449138641357,
-0.14713811874389648,
-0.12435876578092575,
-0.2311641424894333,
-0.05370176583528519,
0.015690673142671585,
0.025205139070749283,
0.11116356402635574,
0.05136551335453987,
-0.25371378660202026,
-0.2635737657546997,
-0.17813532054424286,
0.02748033031821251,
0.4303220212459564,
0.30131345987319946,
-0.14576241374015808,
0.18682749569416046,
0.29194897413253784,
0.796881377696991,
0.25931695103645325,
0.42901721596717834,
0.30251064896583557,
-0.33509594202041626,
0.2513904273509979,
-0.33412081003189087,
0.4422161877155304,
0.15344782173633575,
-0.4189564883708954,
-0.17680202424526215,
0.1442674994468689,
0.17230547964572906,
-0.259074866771698,
0.09550677984952927,
0.408853679895401,
0.18800438940525055,
-0.38458237051963806,
-0.1746746301651001,
0.13170044124126434,
0.14751653373241425,
-0.3239622414112091,
-0.014094896614551544,
0.019760368391871452,
-0.12806789577007294,
-0.1564992517232895,
-0.08496832847595215,
0.8986042141914368,
-0.06410686671733856,
-0.2444247454404831,
0.18541228771209717,
-0.3170611262321472,
0.5394100546836853,
-0.19902412593364716,
0.34688320755958557,
-0.42627382278442383,
-0.39626067876815796,
-0.1013321653008461,
-0.18466128408908844,
0.567245602607727,
0.03874845430254936,
-0.23193375766277313,
0.028827251866459846,
0.18801991641521454,
-0.02614375203847885,
-0.009032306261360645,
-0.09612041711807251,
0.08370668441057205,
0.01566847786307335,
0.2581979036331177,
0.17792683839797974,
-0.1784503012895584,
-0.14255334436893463,
-0.037389714270830154,
-0.14595036208629608,
-0.04885460436344147,
-0.3435634970664978,
-0.3119540214538574,
0.11872228980064392,
-0.28266656398773193,
0.16757580637931824,
0.04861143231391907,
-0.5230929851531982,
0.3698974549770355,
-0.10076388716697693,
-0.10639075189828873,
0.13027657568454742,
-0.14195333421230316,
0.31797847151756287,
-0.039522022008895874,
0.03937438875436783,
-0.1462584137916565,
0.18126431107521057,
0.31479254364967346,
-0.0860198512673378,
-0.1927672028541565,
-0.10615196079015732,
0.11334701627492905,
-0.26364627480506897,
-0.19686932861804962,
0.10670849680900574,
0.20225372910499573,
-0.1856667399406433,
-0.17450451850891113,
-0.14601600170135498,
0.22933071851730347,
-0.2847104072570801,
0.1881701648235321,
0.08274994045495987,
-0.09681960940361023,
0.26334601640701294,
-0.06607422232627869,
-0.2317584604024887,
-0.0858447328209877,
0.0373758003115654,
0.04602997377514839,
-0.13304732739925385,
0.2577918767929077,
0.14449608325958252,
-0.3279416859149933,
-0.38865798711776733,
-0.18971562385559082,
0.07248765230178833,
-0.21436265110969543,
0.08228189498186111,
0.06431522965431213,
-0.3536561131477356,
-0.048160869628190994,
0.09715510904788971,
0.05639052391052246,
0.05537205561995506,
-0.3708004355430603,
-0.22813472151756287,
-0.2173808068037033,
-0.21756602823734283,
-0.008064795285463333,
0.37713998556137085,
0.18376514315605164,
0.11035552620887756,
0.16330859065055847,
0.15828457474708557,
-0.36671629548072815,
-0.029938235878944397,
0.07259541004896164,
-0.0313401035964489,
-0.07203108817338943,
0.13822339475154877,
-0.27681151032447815,
-0.20910334587097168,
0.21859827637672424,
0.06793298572301865,
-0.094357930123806,
-0.2694564759731293,
-0.044442515820264816,
0.11202462017536163,
0.03708871454000473,
-0.29393741488456726,
-0.07771491259336472,
-0.01646304316818714,
-0.08198513090610504,
0.050689004361629486,
-0.005299780052155256,
-0.11610741168260574,
-0.07755337655544281,
-0.048138562589883804,
-0.05661648511886597,
-0.16741381585597992,
0.17744167149066925,
0.11853058636188507,
0.16671612858772278,
0.5295378565788269,
-0.24317331612110138,
0.20536446571350098,
-0.14539779722690582,
-0.06735273450613022,
0.2755507230758667,
0.1677943915128708,
0.15819628536701202,
0.17194347083568573,
0.25689712166786194,
-0.39091819524765015,
-0.10870730876922607,
0.2136964201927185,
0.4143398702144623,
0.34608006477355957,
-0.09100429713726044,
-0.12233955413103104,
0.29163554310798645,
0.16034089028835297,
-0.5317882895469666,
-0.16416768729686737,
0.5125315189361572,
0.002552238292992115,
0.09784939140081406,
0.06375005096197128,
0.2702946662902832,
0.007765140850096941,
0.17973439395427704,
-0.03104151226580143,
0.6909258365631104,
-0.038666125386953354,
0.17060486972332,
0.5756002068519592,
-0.14739616215229034,
0.010247042402625084,
0.2550542950630188,
0.43773767352104187,
0.20158369839191437,
0.4846218228340149,
-0.3800742030143738,
-0.3458035886287689,
0.06411993503570557,
0.008908500894904137,
0.024823244661092758,
-0.3158615529537201,
0.309224009513855,
0.16392911970615387,
-0.36572638154029846,
-0.11955258995294571,
-0.04136942699551582,
0.25747451186180115,
-0.18333779275417328,
0.07056882232427597,
-0.27956637740135193,
0.0873616486787796,
-0.2795363664627075,
0.16717885434627533,
0.009211486205458641,
-0.19676275551319122,
-0.1334889829158783,
-0.14267072081565857,
-0.025318045169115067,
-0.027684196829795837,
0.14888325333595276,
-0.2542767822742462,
-0.15229450166225433,
-0.11993668973445892,
0.24008141458034515,
-0.17924264073371887,
-0.10914506763219833,
-0.06389346718788147,
0.3011995255947113,
0.01969304494559765,
0.19940850138664246,
0.28992143273353577,
0.5922736525535583,
0.4071856141090393,
0.3374166488647461,
-0.10249786823987961,
-0.10639090090990067,
-0.13398145139217377,
-0.20040254294872284,
-0.33855894207954407,
0.20606300234794617,
-0.026114119216799736,
-0.0055581736378371716,
0.3370569348335266,
0.20056933164596558,
-0.06126895919442177,
0.16448991000652313,
0.18138429522514343,
0.0494057796895504,
-0.04845927655696869,
0.030292805284261703,
-0.18907935917377472,
-0.1215374544262886,
0.046605754643678665,
-0.29781559109687805,
-0.1072859987616539,
0.06093065068125725,
0.534936249256134,
-0.17627938091754913,
0.1857469081878662,
-0.24422818422317505,
0.10142985731363297,
0.17087243497371674,
0.5315305590629578,
-0.05291853845119476,
0.3594288229942322,
0.045651067048311234,
-0.14928804337978363,
-0.7031377553939819,
0.2738777697086334,
0.16141925752162933,
-0.27189475297927856,
0.12307418882846832,
0.08668549358844757,
0.294578492641449,
-0.09267722070217133,
0.42935895919799805,
0.3750097155570984,
-0.040444839745759964,
-0.17357684671878815,
-0.1671784222126007,
0.06207675114274025,
0.1989537626504898,
-0.1152232438325882,
0.024473048746585846,
-0.18035359680652618,
0.34886711835861206,
0.2561112642288208,
0.09678557515144348,
-0.18894420564174652,
0.3700208365917206,
-0.3842475116252899,
-0.35606780648231506,
0.3387148678302765,
0.12177629768848419,
0.513359546661377,
-0.06441599875688553,
0.49023163318634033,
-0.1458175629377365,
-0.20821267366409302,
-0.18810956180095673,
0.4146796762943268,
0.4246925115585327,
-0.017662683501839638,
-0.15060783922672272,
-0.2321484535932541,
0.05314946919679642,
-0.14504869282245636,
0.1598944216966629,
0.27717965841293335,
-0.024440325796604156,
0.03320997208356857,
-0.3839484751224518,
0.17456316947937012,
0.31301242113113403,
-0.18030419945716858,
-0.09786760061979294,
0.11133109033107758,
-0.03183994069695473,
-0.3611419200897217,
0.21972040832042694,
-0.12170901894569397,
-0.4349278211593628,
-0.18434131145477295,
0.1454024463891983,
0.180952787399292,
0.054652824997901917,
-0.1809079498052597,
0.0788663774728775,
0.35342147946357727,
-0.09456589072942734,
0.14157722890377045,
0.09979640692472458,
-0.3537027835845947,
-0.11862640827894211,
0.030678316950798035,
0.3376207649707794,
0.3364779055118561,
-0.09395726025104523,
-0.04348040372133255,
-0.22172115743160248
] |
https://github.com/huggingface/datasets/issues/3191
|
Dataset viewer issue for '*compguesswhat*'
|
There is an issue with the URLs of their data files: https://www.dropbox.com/s/l0nc13udml6vs0w/compguesswhat-original.zip?dl=1
> Dropbox Error: That didn't work for some reason
Error reported to their repo:
- https://github.com/CompGuessWhat/compguesswhat.github.io/issues/1
|
## Dataset viewer issue for '*compguesswhat*'
**Link:** https://huggingface.co/datasets/compguesswhat
File not found
Am I the one who added this dataset ? No
| 28 |
Dataset viewer issue for '*compguesswhat*'
|
[
-0.6610029935836792,
0.06969834119081497,
-0.10578896850347519,
0.13595958054065704,
0.264024943113327,
0.07526308298110962,
0.22572849690914154,
0.4700658917427063,
-0.10039098560810089,
0.13800552487373352,
0.1495674103498459,
0.2777789831161499,
0.06310800462961197,
-0.11051693558692932,
0.23154012858867645,
0.2524172365665436,
0.08842847496271133,
0.40723633766174316,
-0.3565823435783386,
0.11106511205434799,
-0.30079028010368347,
0.10268224775791168,
-0.2785644829273224,
0.3008403182029724,
-0.14919421076774597,
-0.3947482109069824,
0.10964217036962509,
0.2545787990093231,
-0.24306727945804596,
-0.2869032323360443,
0.14210662245750427,
0.336468905210495,
0.039226826280355453,
0.42263105511665344,
-0.00010915487655438483,
0.1218952089548111,
0.3227384388446808,
0.05569607764482498,
-0.35759174823760986,
0.08838987350463867,
-0.3821086883544922,
-0.205793559551239,
0.23229444026947021,
-0.13248835504055023,
-0.11336461454629898,
-0.1801815629005432,
0.09108112752437592,
-0.509253740310669,
0.16484706103801727,
0.1288442313671112,
0.2613045871257782,
0.11316240578889847,
-0.18633325397968292,
-0.16053561866283417,
0.06257978081703186,
0.13264502584934235,
-0.220082089304924,
-0.003671986749395728,
0.3709832727909088,
0.23951701819896698,
-0.026895174756646156,
0.388992041349411,
-0.012320163659751415,
0.10704612731933594,
0.034925371408462524,
-0.1680053472518921,
0.3707232177257538,
0.0472482368350029,
0.3921118676662445,
0.01646493561565876,
0.567506730556488,
-0.4977988302707672,
0.19158074259757996,
-0.12711118161678314,
-0.16769123077392578,
-0.23115003108978271,
0.12081930786371231,
0.10629117488861084,
-0.14463664591312408,
0.2733250856399536,
-0.06219424679875374,
0.200285866856575,
-0.23432710766792297,
-0.009236999787390232,
-0.22400377690792084,
0.025751497596502304,
-0.28995734453201294,
0.20512057840824127,
0.2619636058807373,
-0.06515377759933472,
0.6493079662322998,
0.02702159434556961,
-0.28875693678855896,
-0.05519506335258484,
-0.32019683718681335,
-0.028979428112506866,
0.375614732503891,
0.1670013666152954,
0.0961158499121666,
-0.19578741490840912,
0.2086106240749359,
0.4609546959400177,
0.33594948053359985,
0.2408490926027298,
0.4771369695663452,
-0.09592307358980179,
0.20015405118465424,
0.19988399744033813,
0.4424835741519928,
0.10227229446172714,
-0.02125653252005577,
0.054956793785095215,
-0.06471658498048782,
-0.3730333149433136,
0.007399341557174921,
-0.17485924065113068,
0.29689908027648926,
-0.21422968804836273,
-0.458684504032135,
0.12560610473155975,
0.24777933955192566,
0.0963926687836647,
0.3266398012638092,
0.28737789392471313,
0.12538601458072662,
-0.047081440687179565,
0.14504528045654297,
0.07238370925188065,
-0.01914769597351551,
-0.20524460077285767,
-0.3761182427406311,
-0.20060864090919495,
-0.0649188980460167,
-0.17863431572914124,
0.07893732935190201,
0.02625313028693199,
-0.210503950715065,
-0.09263917803764343,
-0.021211043000221252,
-0.26017647981643677,
-0.017859235405921936,
0.07636663317680359,
-0.09614764153957367,
0.26685261726379395,
-0.048976484686136246,
-0.043502651154994965,
0.10770338773727417,
-0.32365307211875916,
0.0029137691017240286,
0.4049767255783081,
-0.10041067749261856,
-0.292047917842865,
-0.21666356921195984,
0.23166683316230774,
-0.14965489506721497,
0.169653981924057,
0.0663754865527153,
0.3318871259689331,
-0.19552795588970184,
-0.29233115911483765,
-0.10399913787841797,
-0.046823181211948395,
0.13328012824058533,
-0.10508965700864792,
0.09436917304992676,
0.3415173590183258,
-0.8402068018913269,
0.11644788086414337,
-0.08582340180873871,
-0.3981165587902069,
0.025796134024858475,
-0.004637915641069412,
-0.21037626266479492,
-0.14388178288936615,
-0.3739621937274933,
0.03063168376684189,
0.7755122184753418,
0.11555778235197067,
-0.4090282917022705,
0.2778453826904297,
-0.02328621782362461,
-0.12324786186218262,
0.14885196089744568,
0.02272789180278778,
-0.20562337338924408,
-0.09155154973268509,
-0.3174801766872406,
-0.10541768372058868,
0.10938109457492828,
-0.020454347133636475,
-0.13762694597244263,
-0.1607951819896698,
0.2177189439535141,
0.022209011018276215,
0.12445098161697388,
-0.10584130883216858,
0.31676992774009705,
-0.2853275537490845,
0.3418298065662384,
-0.20138493180274963,
-0.07121104001998901,
-0.12486419826745987,
0.15843065083026886,
0.04958130046725273,
0.11020656675100327,
-0.251763254404068,
-0.24186314642429352,
-0.03161463141441345,
-0.013679489493370056,
-0.18494056165218353,
-0.18661969900131226,
-0.14029976725578308,
-0.04608330875635147,
0.26589787006378174,
-0.07530154287815094,
0.15539856255054474,
0.21552923321723938,
0.17178836464881897,
-0.22916752099990845,
0.14994113147258759,
0.11838765442371368,
0.30467402935028076,
0.10445692390203476,
-0.003021842800080776,
0.14216643571853638,
0.05199181288480759,
-0.1860419511795044,
-0.18192234635353088,
-0.11672504991292953,
0.21447914838790894,
0.23302778601646423,
-0.18489445745944977,
-0.16994158923625946,
0.3817799985408783,
0.09008191525936127,
0.13341407477855682,
-0.13946230709552765,
-0.12518082559108734,
0.049375955015420914,
-0.23717562854290009,
0.21129333972930908,
-0.050055284053087234,
0.15703469514846802,
-0.147693932056427,
-0.2943222224712372,
-0.03895408287644386,
0.026407187804579735,
-0.12326798588037491,
0.08368121832609177,
0.11277368664741516,
0.3626207411289215,
0.022098934277892113,
0.08321824669837952,
-0.05948254093527794,
0.0032927007414400578,
0.16998730599880219,
0.09491860121488571,
0.16663382947444916,
-0.5522723197937012,
0.27102959156036377,
0.24026931822299957,
-0.11384940147399902,
0.21768125891685486,
-0.14542321860790253,
-0.20213036239147186,
0.003127848729491234,
0.041727110743522644,
0.17637589573860168,
0.14291912317276,
0.21214623749256134,
-0.07010873407125473,
0.09836923331022263,
-0.09907671064138412,
-0.2511634826660156,
0.15763431787490845,
0.17311204969882965,
0.1259116381406784,
-0.041771598160266876,
-0.030970918014645576,
-0.2624898850917816,
-0.3150445222854614,
0.26035645604133606,
-0.017989978194236755,
0.09701786935329437,
-0.3158562481403351,
0.09409092366695404,
-0.4552209675312042,
-0.6258158087730408,
-0.15137240290641785,
0.2536259591579437,
0.09397121518850327,
-0.23656783998012543,
0.11774002760648727,
0.12634776532649994,
-0.27761968970298767,
0.33609652519226074,
-0.5154037475585938,
0.362260639667511,
-0.07425439357757568,
0.22057393193244934,
-0.08866170048713684,
-0.2109585702419281,
-0.34025803208351135,
0.05703020468354225,
0.3286125957965851,
0.2606745958328247,
0.19993893802165985,
-0.16119153797626495,
0.2818720042705536,
-0.3387317657470703,
-0.358254075050354,
0.20659442245960236,
-0.0035091196186840534,
0.30672019720077515,
0.2004881650209427,
-0.10600670427083969,
-0.307728111743927,
-0.23908419907093048,
0.14460791647434235,
-0.14874346554279327,
0.10738490521907806,
0.13620488345623016,
0.09296343475580215,
-0.4453088641166687,
-0.09123720228672028,
-0.15994611382484436,
-0.24542532861232758,
-0.33827656507492065,
0.0807628408074379,
0.07043025642633438,
0.15629881620407104,
0.2784423232078552,
0.09809251129627228,
-0.01748121902346611,
0.35304877161979675,
-0.08145831525325775,
-0.3987736701965332,
-0.32402175664901733,
0.29053443670272827,
-0.19342489540576935,
-0.4728669226169586,
0.15193967521190643,
0.032463911920785904,
0.04953248053789139,
0.09018272906541824,
-0.33450770378112793,
0.18175239861011505,
0.05240413919091225,
0.1625111699104309,
0.31316041946411133,
-0.20911750197410583,
0.37418878078460693,
0.1386580914258957,
-0.07202523201704025,
-0.33784377574920654,
-0.6819807291030884,
0.23725862801074982,
-0.02298738807439804,
0.09795565903186798,
-0.004221366252750158,
0.10200881958007812,
-0.09036342054605484,
0.504042387008667,
-0.34117332100868225,
-0.13761308789253235,
0.11872804164886475,
-0.24752023816108704,
0.61668860912323,
0.07093129307031631,
-0.29746103286743164,
0.14132215082645416,
-0.07455917447805405,
0.04059711471199989,
0.35288169980049133,
-0.12269355356693268,
-0.45406046509742737,
-0.027816042304039,
0.1331857144832611,
-0.3583487272262573,
-0.28460240364074707,
-0.06959988921880722,
-0.10256931930780411,
-0.05840631574392319,
0.30852535367012024,
0.12361805886030197,
-0.23642335832118988,
-0.11928962171077728,
-0.16192330420017242,
0.2277166098356247,
-0.1155410185456276,
0.0880143940448761,
0.0438588447868824,
0.309180349111557,
-0.06981848925352097,
0.44100871682167053,
-0.1733645796775818,
0.033352337777614594,
-0.13281483948230743,
-0.31487664580345154,
0.15937580168247223,
-0.05843140557408333,
0.3383976221084595,
-0.044172849506139755,
0.0712968185544014,
0.2669932246208191,
0.04787227883934975,
-0.049024902284145355,
-0.11387708783149719,
-0.03625306859612465,
0.10351395606994629,
0.3667334318161011,
-0.07306321710348129,
-0.09897719323635101,
-0.1153789758682251,
0.34677654504776,
-0.07721284031867981,
-0.14244449138641357,
-0.14713811874389648,
-0.12435876578092575,
-0.2311641424894333,
-0.05370176583528519,
0.015690673142671585,
0.025205139070749283,
0.11116356402635574,
0.05136551335453987,
-0.25371378660202026,
-0.2635737657546997,
-0.17813532054424286,
0.02748033031821251,
0.4303220212459564,
0.30131345987319946,
-0.14576241374015808,
0.18682749569416046,
0.29194897413253784,
0.796881377696991,
0.25931695103645325,
0.42901721596717834,
0.30251064896583557,
-0.33509594202041626,
0.2513904273509979,
-0.33412081003189087,
0.4422161877155304,
0.15344782173633575,
-0.4189564883708954,
-0.17680202424526215,
0.1442674994468689,
0.17230547964572906,
-0.259074866771698,
0.09550677984952927,
0.408853679895401,
0.18800438940525055,
-0.38458237051963806,
-0.1746746301651001,
0.13170044124126434,
0.14751653373241425,
-0.3239622414112091,
-0.014094896614551544,
0.019760368391871452,
-0.12806789577007294,
-0.1564992517232895,
-0.08496832847595215,
0.8986042141914368,
-0.06410686671733856,
-0.2444247454404831,
0.18541228771209717,
-0.3170611262321472,
0.5394100546836853,
-0.19902412593364716,
0.34688320755958557,
-0.42627382278442383,
-0.39626067876815796,
-0.1013321653008461,
-0.18466128408908844,
0.567245602607727,
0.03874845430254936,
-0.23193375766277313,
0.028827251866459846,
0.18801991641521454,
-0.02614375203847885,
-0.009032306261360645,
-0.09612041711807251,
0.08370668441057205,
0.01566847786307335,
0.2581979036331177,
0.17792683839797974,
-0.1784503012895584,
-0.14255334436893463,
-0.037389714270830154,
-0.14595036208629608,
-0.04885460436344147,
-0.3435634970664978,
-0.3119540214538574,
0.11872228980064392,
-0.28266656398773193,
0.16757580637931824,
0.04861143231391907,
-0.5230929851531982,
0.3698974549770355,
-0.10076388716697693,
-0.10639075189828873,
0.13027657568454742,
-0.14195333421230316,
0.31797847151756287,
-0.039522022008895874,
0.03937438875436783,
-0.1462584137916565,
0.18126431107521057,
0.31479254364967346,
-0.0860198512673378,
-0.1927672028541565,
-0.10615196079015732,
0.11334701627492905,
-0.26364627480506897,
-0.19686932861804962,
0.10670849680900574,
0.20225372910499573,
-0.1856667399406433,
-0.17450451850891113,
-0.14601600170135498,
0.22933071851730347,
-0.2847104072570801,
0.1881701648235321,
0.08274994045495987,
-0.09681960940361023,
0.26334601640701294,
-0.06607422232627869,
-0.2317584604024887,
-0.0858447328209877,
0.0373758003115654,
0.04602997377514839,
-0.13304732739925385,
0.2577918767929077,
0.14449608325958252,
-0.3279416859149933,
-0.38865798711776733,
-0.18971562385559082,
0.07248765230178833,
-0.21436265110969543,
0.08228189498186111,
0.06431522965431213,
-0.3536561131477356,
-0.048160869628190994,
0.09715510904788971,
0.05639052391052246,
0.05537205561995506,
-0.3708004355430603,
-0.22813472151756287,
-0.2173808068037033,
-0.21756602823734283,
-0.008064795285463333,
0.37713998556137085,
0.18376514315605164,
0.11035552620887756,
0.16330859065055847,
0.15828457474708557,
-0.36671629548072815,
-0.029938235878944397,
0.07259541004896164,
-0.0313401035964489,
-0.07203108817338943,
0.13822339475154877,
-0.27681151032447815,
-0.20910334587097168,
0.21859827637672424,
0.06793298572301865,
-0.094357930123806,
-0.2694564759731293,
-0.044442515820264816,
0.11202462017536163,
0.03708871454000473,
-0.29393741488456726,
-0.07771491259336472,
-0.01646304316818714,
-0.08198513090610504,
0.050689004361629486,
-0.005299780052155256,
-0.11610741168260574,
-0.07755337655544281,
-0.048138562589883804,
-0.05661648511886597,
-0.16741381585597992,
0.17744167149066925,
0.11853058636188507,
0.16671612858772278,
0.5295378565788269,
-0.24317331612110138,
0.20536446571350098,
-0.14539779722690582,
-0.06735273450613022,
0.2755507230758667,
0.1677943915128708,
0.15819628536701202,
0.17194347083568573,
0.25689712166786194,
-0.39091819524765015,
-0.10870730876922607,
0.2136964201927185,
0.4143398702144623,
0.34608006477355957,
-0.09100429713726044,
-0.12233955413103104,
0.29163554310798645,
0.16034089028835297,
-0.5317882895469666,
-0.16416768729686737,
0.5125315189361572,
0.002552238292992115,
0.09784939140081406,
0.06375005096197128,
0.2702946662902832,
0.007765140850096941,
0.17973439395427704,
-0.03104151226580143,
0.6909258365631104,
-0.038666125386953354,
0.17060486972332,
0.5756002068519592,
-0.14739616215229034,
0.010247042402625084,
0.2550542950630188,
0.43773767352104187,
0.20158369839191437,
0.4846218228340149,
-0.3800742030143738,
-0.3458035886287689,
0.06411993503570557,
0.008908500894904137,
0.024823244661092758,
-0.3158615529537201,
0.309224009513855,
0.16392911970615387,
-0.36572638154029846,
-0.11955258995294571,
-0.04136942699551582,
0.25747451186180115,
-0.18333779275417328,
0.07056882232427597,
-0.27956637740135193,
0.0873616486787796,
-0.2795363664627075,
0.16717885434627533,
0.009211486205458641,
-0.19676275551319122,
-0.1334889829158783,
-0.14267072081565857,
-0.025318045169115067,
-0.027684196829795837,
0.14888325333595276,
-0.2542767822742462,
-0.15229450166225433,
-0.11993668973445892,
0.24008141458034515,
-0.17924264073371887,
-0.10914506763219833,
-0.06389346718788147,
0.3011995255947113,
0.01969304494559765,
0.19940850138664246,
0.28992143273353577,
0.5922736525535583,
0.4071856141090393,
0.3374166488647461,
-0.10249786823987961,
-0.10639090090990067,
-0.13398145139217377,
-0.20040254294872284,
-0.33855894207954407,
0.20606300234794617,
-0.026114119216799736,
-0.0055581736378371716,
0.3370569348335266,
0.20056933164596558,
-0.06126895919442177,
0.16448991000652313,
0.18138429522514343,
0.0494057796895504,
-0.04845927655696869,
0.030292805284261703,
-0.18907935917377472,
-0.1215374544262886,
0.046605754643678665,
-0.29781559109687805,
-0.1072859987616539,
0.06093065068125725,
0.534936249256134,
-0.17627938091754913,
0.1857469081878662,
-0.24422818422317505,
0.10142985731363297,
0.17087243497371674,
0.5315305590629578,
-0.05291853845119476,
0.3594288229942322,
0.045651067048311234,
-0.14928804337978363,
-0.7031377553939819,
0.2738777697086334,
0.16141925752162933,
-0.27189475297927856,
0.12307418882846832,
0.08668549358844757,
0.294578492641449,
-0.09267722070217133,
0.42935895919799805,
0.3750097155570984,
-0.040444839745759964,
-0.17357684671878815,
-0.1671784222126007,
0.06207675114274025,
0.1989537626504898,
-0.1152232438325882,
0.024473048746585846,
-0.18035359680652618,
0.34886711835861206,
0.2561112642288208,
0.09678557515144348,
-0.18894420564174652,
0.3700208365917206,
-0.3842475116252899,
-0.35606780648231506,
0.3387148678302765,
0.12177629768848419,
0.513359546661377,
-0.06441599875688553,
0.49023163318634033,
-0.1458175629377365,
-0.20821267366409302,
-0.18810956180095673,
0.4146796762943268,
0.4246925115585327,
-0.017662683501839638,
-0.15060783922672272,
-0.2321484535932541,
0.05314946919679642,
-0.14504869282245636,
0.1598944216966629,
0.27717965841293335,
-0.024440325796604156,
0.03320997208356857,
-0.3839484751224518,
0.17456316947937012,
0.31301242113113403,
-0.18030419945716858,
-0.09786760061979294,
0.11133109033107758,
-0.03183994069695473,
-0.3611419200897217,
0.21972040832042694,
-0.12170901894569397,
-0.4349278211593628,
-0.18434131145477295,
0.1454024463891983,
0.180952787399292,
0.054652824997901917,
-0.1809079498052597,
0.0788663774728775,
0.35342147946357727,
-0.09456589072942734,
0.14157722890377045,
0.09979640692472458,
-0.3537027835845947,
-0.11862640827894211,
0.030678316950798035,
0.3376207649707794,
0.3364779055118561,
-0.09395726025104523,
-0.04348040372133255,
-0.22172115743160248
] |
https://github.com/huggingface/datasets/issues/3190
|
combination of shuffle and filter results in a bug
|
Hi ! There was a regression in `datasets` 1.12 that introduced this bug. It has been fixed in #3019 in 1.13
Can you try to update `datasets` and try again ?
|
## Describe the bug
Hi,
I would like to shuffle a dataset, then filter it based on each existing label. however, the combination of `filter`, `shuffle` seems to results in a bug. In the minimal example below, as you see in the filtered results, the filtered labels are not unique, meaning filter has not worked. Any suggestions as a temporary fix is appreciated @lhoestq.
Thanks.
Best regards
Rabeeh
## Steps to reproduce the bug
```python
import numpy as np
import datasets
datasets = datasets.load_dataset('super_glue', 'rte', script_version="master")
shuffled_data = datasets["train"].shuffle(seed=42)
for label in range(2):
print("label ", label)
data = shuffled_data.filter(lambda example: int(example['label']) == label)
print("length ", len(data), np.unique(data['label']))
```
## Expected results
Filtering per label, should only return the data with that specific label.
## Actual results
As you can see, filtered data per label, has still two labels of [0, 1]
```
label 0
length 1249 [0 1]
label 1
length 1241 [0 1]
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.12.1
- Platform: linux
- Python version: 3.7.11
- PyArrow version: 5.0.0
| 31 |
combination of shuffle and filter results in a bug
|
[
0.11228880286216736,
-0.29637348651885986,
-0.17401430010795593,
0.11374923586845398,
-0.014052934013307095,
-0.23644116520881653,
0.1384873390197754,
0.03744511678814888,
0.06737861782312393,
0.5344244241714478,
-0.07823815941810608,
0.2575269341468811,
-0.1816639006137848,
0.0912473052740097,
-0.30387669801712036,
0.1333831250667572,
0.22690507769584656,
-0.08768171072006226,
0.09570519626140594,
-0.21965676546096802,
-0.06836085021495819,
0.01344184298068285,
-0.2578239142894745,
-0.211167573928833,
-0.03505357727408409,
0.14812125265598297,
0.1258459836244583,
0.1794615238904953,
-0.15541395545005798,
0.42909708619117737,
-0.2649429440498352,
0.6066694855690002,
-0.482883483171463,
0.5072206854820251,
-0.00010326391202397645,
-0.17507629096508026,
-0.020571639761328697,
-0.08193261176347733,
0.05389411747455597,
-0.07954509556293488,
-0.17187625169754028,
0.561032235622406,
-0.37593933939933777,
-0.008611636236310005,
0.0063517228700220585,
0.04483885318040848,
-0.17063969373703003,
-0.07348330318927765,
0.13704128563404083,
-0.017056535929441452,
0.32732731103897095,
-0.17489154636859894,
-0.2633560001850128,
0.0791093111038208,
0.7674677968025208,
0.06849201023578644,
0.10429529845714569,
0.051381610333919525,
0.239096999168396,
-0.2251911461353302,
0.07469215989112854,
0.24583643674850464,
-0.0701112300157547,
-0.12305165082216263,
0.2366286665201187,
-0.027205685153603554,
0.12379410862922668,
-0.11483529955148697,
0.28811126947402954,
0.022450780496001244,
-0.27186837792396545,
0.058099742978811264,
-0.043878573924303055,
-0.09245919436216354,
-0.16850951313972473,
0.05616016313433647,
0.08163560181856155,
-0.09345099329948425,
-0.04103222116827965,
-0.1783953607082367,
-0.22811754047870636,
0.2520134747028351,
0.25016582012176514,
-0.016009630635380745,
0.09840264916419983,
0.5461111664772034,
0.07006064802408218,
0.03507509455084801,
0.306089848279953,
-0.10285517573356628,
0.3640500605106354,
-0.3593443036079407,
-0.08973418176174164,
0.0875537246465683,
0.05421241372823715,
-0.07287722080945969,
0.2724129557609558,
0.25214511156082153,
0.03431687131524086,
-0.1657501608133316,
0.20280177891254425,
0.26268357038497925,
0.2541455924510956,
0.19352319836616516,
0.18427030742168427,
-0.13410724699497223,
0.0818348154425621,
0.10738124698400497,
-0.009088784456253052,
0.17432168126106262,
0.01511615701019764,
0.01742430031299591,
0.3827531933784485,
0.06971201300621033,
-0.17203955352306366,
-0.2144409865140915,
-0.2503507435321808,
-0.1382405161857605,
-0.2223910540342331,
-0.02826295793056488,
-0.19453375041484833,
-0.12658020853996277,
0.1176278367638588,
0.1913810819387436,
0.03403250873088837,
0.038055893033742905,
-0.037000276148319244,
0.09942550957202911,
-0.13863946497440338,
0.27285704016685486,
-0.3516184389591217,
0.06991994380950928,
-0.2090519815683365,
-0.13485394418239594,
-0.04919761046767235,
-0.09675281494855881,
0.05463370308279991,
0.3317098021507263,
0.07091563194990158,
-0.14796215295791626,
0.027003591880202293,
0.030950598418712616,
0.21751880645751953,
0.03944728523492813,
0.22017735242843628,
0.017313921824097633,
0.023204857483506203,
-0.07312362641096115,
0.07569031417369843,
0.25021663308143616,
-0.1631244421005249,
0.049387671053409576,
0.3298857808113098,
0.37290382385253906,
0.03760446608066559,
0.2282811850309372,
0.008802021853625774,
0.34427258372306824,
0.11058661341667175,
-0.3138316571712494,
-0.083530493080616,
-0.2029847502708435,
-0.21827328205108643,
-0.09766625612974167,
-0.034041985869407654,
-0.03405257314443588,
-0.09062270820140839,
-0.2458961308002472,
-0.19295190274715424,
-0.20015394687652588,
0.5274409055709839,
0.23155342042446136,
-0.14918407797813416,
-0.11326185613870621,
-0.11986476182937622,
-0.07225314527750015,
0.21295152604579926,
0.25943243503570557,
-0.40389925241470337,
-0.39090853929519653,
-0.24887427687644958,
0.43162691593170166,
0.02127193659543991,
-0.0630602017045021,
0.0441322922706604,
-0.13336268067359924,
0.6529737710952759,
0.0842343270778656,
-0.19311170279979706,
0.14159561693668365,
-0.30800044536590576,
0.21223993599414825,
0.18603289127349854,
-0.03689777851104736,
-0.03244869038462639,
0.1814405918121338,
0.17215970158576965,
-0.1326950341463089,
0.268959105014801,
0.026217803359031677,
-0.10315665602684021,
-0.2786595821380615,
0.19392748177051544,
0.3646438717842102,
0.020719723775982857,
-0.18921688199043274,
0.3101155459880829,
-0.11330520361661911,
0.14800408482551575,
-0.09301167726516724,
0.22920581698417664,
-0.08312701433897018,
-0.14386609196662903,
-0.28322190046310425,
-0.08950740844011307,
-0.022269228473305702,
0.25844892859458923,
0.2244805246591568,
-0.05892479792237282,
-0.31526023149490356,
0.11935950815677643,
-0.05491917207837105,
-0.2057839035987854,
-0.2512601912021637,
-0.15975312888622284,
0.34761860966682434,
-0.1457943618297577,
-0.2518628239631653,
-0.10714311897754669,
0.12184587121009827,
0.09081394225358963,
0.14486216008663177,
0.044176917523145676,
0.23654888570308685,
0.0387236587703228,
-0.24078452587127686,
-0.27928128838539124,
0.15183217823505402,
-0.08461475372314453,
0.1330997347831726,
-0.12661917507648468,
-0.021411526948213577,
0.30253681540489197,
-0.06973191350698471,
0.02985209971666336,
0.47271278500556946,
-0.2987484335899353,
0.07266227900981903,
0.10607864707708359,
-0.1138344258069992,
0.10323622822761536,
0.24438653886318207,
0.10538195818662643,
-0.14318446815013885,
0.22237174212932587,
0.07303734868764877,
-0.35862720012664795,
0.08978758752346039,
-0.22616255283355713,
0.18770058453083038,
0.2573888599872589,
0.062172308564186096,
-0.06241989508271217,
-0.031103795394301414,
0.21147920191287994,
-0.06536269932985306,
-0.24205105006694794,
0.25251898169517517,
0.2107725739479065,
0.3453816771507263,
-0.12465740740299225,
-0.07283511757850647,
-0.00314795202575624,
-0.2061380296945572,
0.023287450894713402,
0.1098259836435318,
-0.20056281983852386,
0.20831376314163208,
0.2887521982192993,
-0.06263457238674164,
-0.2973506450653076,
-0.19081728160381317,
0.015121321193873882,
0.07339302450418472,
-0.1604493260383606,
0.16233675181865692,
-0.06251353025436401,
-0.2210771143436432,
0.017399130389094353,
-0.11390459537506104,
0.07215474545955658,
-0.17677436769008636,
0.440877765417099,
0.684847891330719,
-0.39729955792427063,
-0.07417178153991699,
0.361877977848053,
0.2787591516971588,
-0.03678072243928909,
0.22558635473251343,
-0.011611731722950935,
-0.003561121877282858,
-0.23564304411411285,
0.25641921162605286,
0.02880442887544632,
0.05685114115476608,
0.15744338929653168,
-0.039821967482566833,
-0.45227229595184326,
0.0140867680311203,
-0.1807505190372467,
0.02200457826256752,
-0.15724028646945953,
0.19256022572517395,
-0.21134574711322784,
-0.12005438655614853,
-0.1739204078912735,
-0.43425098061561584,
0.14993838965892792,
-0.009910847060382366,
-0.14862480759620667,
0.2925104796886444,
0.2190110683441162,
-0.011383798904716969,
-0.3560851514339447,
-0.10001818090677261,
0.10369322448968887,
-0.14006935060024261,
-0.23802965879440308,
-0.17905274033546448,
0.13247106969356537,
0.08266328275203705,
0.027737347409129143,
-0.41714295744895935,
-0.38262856006622314,
-0.05326085165143013,
-0.4345089793205261,
-0.2022174894809723,
0.027836645022034645,
-0.03571295738220215,
-0.246516153216362,
-0.2586275637149811,
-0.11136571317911148,
-0.3797605633735657,
0.5641879439353943,
0.16958989202976227,
0.13898861408233643,
-0.013988099992275238,
-0.31093448400497437,
0.11917254328727722,
0.10530420392751694,
0.2178056389093399,
-0.11791027337312698,
-0.14330290257930756,
-0.29152390360832214,
-0.17119859158992767,
0.11914227157831192,
0.09603390097618103,
0.35374224185943604,
-0.1608932763338089,
0.18655246496200562,
-0.010914037004113197,
0.5306201577186584,
-0.3099479079246521,
0.2962982952594757,
0.14169323444366455,
0.12107870727777481,
0.19429804384708405,
-0.18458518385887146,
-0.09905774891376495,
0.2004975825548172,
0.3379574716091156,
-0.1364472657442093,
0.3268958330154419,
0.028380699455738068,
-0.26613298058509827,
-0.052828796207904816,
0.1652492731809616,
0.0019218453671783209,
-0.14565491676330566,
0.08168903738260269,
0.3579241931438446,
-0.17298531532287598,
0.2264624834060669,
0.02012903243303299,
0.0758398026227951,
0.026963086798787117,
-0.300205260515213,
0.016564099118113518,
0.08312251418828964,
-0.0145116513594985,
-0.4713379442691803,
-0.37375232577323914,
0.06288879364728928,
-0.14076963067054749,
0.20113353431224823,
0.2613823115825653,
-0.09314778447151184,
-0.26497313380241394,
0.09458167850971222,
0.12316156923770905,
0.7735589742660522,
-0.03413745388388634,
0.1870519518852234,
0.16327175498008728,
0.10432865470647812,
0.027624597772955894,
-0.2238202542066574,
-0.332103967666626,
-0.07514140754938126,
0.21887081861495972,
0.20769143104553223,
-0.06038397550582886,
0.4007849097251892,
-0.27596813440322876,
-0.05475877970457077,
0.09707839041948318,
-0.11391482502222061,
-0.18358920514583588,
-0.2142796665430069,
-0.13538886606693268,
0.12579652667045593,
0.1710626631975174,
0.19777430593967438,
-0.16656021773815155,
-0.10468563437461853,
0.3676479756832123,
-0.22705619037151337,
-0.032814621925354004,
0.02555597946047783,
0.2803117036819458,
0.10179164260625839,
-0.022813554853200912,
0.15099602937698364,
-0.16360914707183838,
-0.041409771889448166,
-0.12411779165267944,
0.25945597887039185,
0.20119789242744446,
0.1425517201423645,
-0.4082866609096527,
-0.17230278253555298,
0.3343924880027771,
-0.005731925368309021,
0.28514546155929565,
-0.03237748518586159,
0.1179804727435112,
0.32397547364234924,
-0.10528984665870667,
0.029790198430418968,
-0.1270475834608078,
-0.009247067384421825,
-0.44891396164894104,
-0.07932082563638687,
0.004103899002075195,
-0.25842711329460144,
0.5383225679397583,
-0.06897943466901779,
-0.23131467401981354,
0.3203286826610565,
-0.28645744919776917,
0.8834888339042664,
0.20971672236919403,
-0.002691055415198207,
0.18937630951404572,
-0.1549326777458191,
0.0742064118385315,
0.18754689395427704,
0.25219425559043884,
-0.07367490977048874,
-0.4503103196620941,
0.13656315207481384,
-0.08556763082742691,
-0.1958857625722885,
-0.004536335822194815,
-0.0023918820079416037,
0.203019380569458,
-0.46036723256111145,
0.08468654006719589,
0.07122950255870819,
-0.45399367809295654,
-0.13962875306606293,
0.07217207551002502,
-0.13638059794902802,
0.184583842754364,
0.3320050537586212,
0.11629531532526016,
-0.12616904079914093,
0.04388473182916641,
-0.2971518933773041,
-0.14141784608364105,
-0.02957315556704998,
0.1149468943476677,
-0.02042684331536293,
-0.1846684366464615,
-0.026338160037994385,
0.05043007433414459,
-0.2397315502166748,
-0.419334352016449,
-0.2438698559999466,
0.32961684465408325,
0.10905738919973373,
0.1415162831544876,
0.5350627303123474,
0.41830551624298096,
-0.02809864841401577,
-0.08272477984428406,
0.019911451265215874,
-0.13033078610897064,
-0.057446446269750595,
-0.15161901712417603,
0.15535973012447357,
-0.291781485080719,
-0.48799872398376465,
0.04880552738904953,
0.30494454503059387,
0.13155187666416168,
-0.17177344858646393,
0.19874531030654907,
0.10137646645307541,
-0.2249729037284851,
0.30683305859565735,
-0.2580839693546295,
-0.03937482461333275,
0.18282873928546906,
-0.15533195436000824,
0.08295837044715881,
-0.19879794120788574,
0.30118346214294434,
0.20284172892570496,
0.07785037904977798,
-0.025465501472353935,
-0.06867806613445282,
-0.20298151671886444,
-0.1342906504869461,
-0.33531829714775085,
0.05184527114033699,
0.08849901705980301,
0.28892961144447327,
-0.35087424516677856,
-0.45518428087234497,
0.003364436561241746,
0.14593349397182465,
0.026966892182826996,
0.3909960985183716,
0.05463800206780434,
-0.298105388879776,
0.08188013732433319,
0.04443378001451492,
0.26933056116104126,
-0.05605428293347359,
-0.07076889276504517,
0.20052166283130646,
-0.1667601317167282,
-0.06233496591448784,
-0.4516705274581909,
-0.26322221755981445,
0.18153762817382812,
0.3031909167766571,
-0.3165712356567383,
0.09694661945104599,
-0.2613562047481537,
-0.047619037330150604,
0.2766018211841583,
0.23482316732406616,
-0.1445726603269577,
-0.4228242039680481,
0.0742575153708458,
0.06132194399833679,
0.08027824014425278,
-0.1047988012433052,
0.12644198536872864,
-0.07903409004211426,
-0.2118123471736908,
-0.06566806137561798,
0.14313802123069763,
0.20924460887908936,
0.010561585426330566,
-0.3827194273471832,
0.345464289188385,
-0.0754685029387474,
0.3428836166858673,
0.1267920732498169,
-0.263009637594223,
-0.3976571261882782,
0.009761994704604149,
-0.14647176861763,
0.06494581699371338,
-0.047214359045028687,
-0.15519361197948456,
-0.12855902314186096,
-0.30881330370903015,
0.19773778319358826,
0.16054248809814453,
-0.16515345871448517,
-0.049140751361846924,
0.29519981145858765,
0.1739894449710846,
0.3659578859806061,
-0.1883191019296646,
-0.3557678461074829,
0.13923409581184387,
0.34743624925613403,
-0.13115641474723816,
-0.18059687316417694,
-0.05995110794901848,
0.3512392044067383,
0.1293642520904541,
0.0872078537940979,
-0.3335331976413727,
-0.45323771238327026,
-0.1494867503643036,
0.2278129905462265,
-0.03413455933332443,
-0.18941694498062134,
0.20994387567043304,
0.07037127763032913,
0.038787685334682465,
0.14328455924987793,
0.02221483364701271,
-0.2687821090221405,
-0.21168889105319977,
0.4500662386417389,
0.3426755964756012,
0.19467130303382874,
0.2708006799221039,
0.005507500842213631,
-0.14504685997962952,
-0.331152081489563,
0.06155421584844589,
0.7074870467185974,
-0.1932893544435501,
0.3021613657474518,
0.4540083408355713,
-0.3239860236644745,
0.08668716996908188,
0.1191561371088028,
0.2218923270702362,
-0.053093116730451584,
-0.13802921772003174,
0.12282732129096985,
-0.14486739039421082,
-0.5385035276412964,
-0.32377004623413086,
0.030215594917535782,
0.11226019263267517,
0.22134734690189362,
0.09935251623392105,
-0.1284375637769699,
-0.21438995003700256,
-0.33299553394317627,
-0.16598954796791077,
0.006648607552051544,
0.17125584185123444,
-0.22524499893188477,
0.0009249555878341198,
0.04768739640712738,
-0.1974511742591858,
0.6538872718811035,
-0.16951102018356323,
-0.10445022583007812,
0.19043172895908356,
0.28076717257499695,
-0.11691799759864807,
-0.0658116564154625,
-0.15941576659679413,
-0.14720602333545685,
0.19178451597690582,
0.5130259990692139,
-0.010474338196218014,
-0.09827523678541183,
0.2724567651748657,
-0.4052983522415161,
-0.036763448268175125,
0.43516305088996887,
0.19144247472286224,
-0.06926362216472626,
0.1294696033000946,
-0.07214933633804321,
0.15822751820087433,
0.030898530036211014,
-0.016157109290361404,
-0.2447328120470047,
-0.12610864639282227,
-0.36538946628570557,
0.21092885732650757,
0.1854112446308136,
0.13908308744430542,
0.14867836236953735,
0.193192258477211,
0.08818003535270691,
-0.16968567669391632,
-0.24418319761753082,
0.11452782154083252,
-0.27441802620887756,
-0.25099626183509827,
0.07779502868652344,
0.04876847565174103,
0.41002964973449707,
-0.15281802415847778,
0.2895676791667938,
0.061309412121772766,
0.11475051939487457,
0.039153795689344406,
0.13191978633403778,
-0.013116746209561825,
0.14859247207641602,
-0.1759873628616333,
-0.08406668901443481,
-0.117274709045887,
0.009470741264522076,
0.10221973061561584,
-0.11116451025009155,
0.29453611373901367,
-0.29298830032348633,
0.35706040263175964,
0.10080070048570633,
-0.17673617601394653,
-0.20294904708862305,
0.017248954623937607,
-0.30370551347732544,
0.2166396677494049,
0.2271973192691803,
-0.22980862855911255,
0.26204997301101685,
-0.05911124497652054,
-0.06074514240026474,
-0.23853537440299988,
-0.17788434028625488,
0.10003110021352768,
0.40051594376564026,
-0.023439062759280205,
-0.043301504105329514,
0.004248547833412886,
0.42226409912109375,
0.012546468526124954,
0.12004432827234268,
-0.3604221045970917,
0.2914992570877075,
0.11129454523324966,
0.2459098845720291,
-0.5162466764450073,
0.014782573096454144,
-0.008781623095273972,
-0.013567552901804447,
-0.1530916392803192,
-0.20424063503742218,
0.4910770356655121,
-0.20474666357040405,
-0.42346376180648804,
-0.3780559003353119,
0.2694172263145447,
0.08530834317207336,
-0.1009480357170105,
0.36484599113464355,
-0.11971355974674225,
0.031009148806333542,
-0.08076160401105881,
0.13381338119506836,
0.1779884397983551,
-0.3204153776168823,
-0.04068392887711525,
0.04834901914000511,
-0.1565411537885666,
0.2043350487947464,
-0.31579869985580444,
0.4667260944843292,
-0.26152291893959045
] |
https://github.com/huggingface/datasets/issues/3189
|
conll2003 incorrect label explanation
|
Hi @BramVanroy,
since these fields are of type `ClassLabel` (you can check this with `dset.features`), you can inspect the possible values with:
```python
dset.features[field_name].feature.names # .feature because it's a sequence of labels
```
and to find the mapping between names and integers, use:
```python
dset.features[field_name].feature.int2str(value_or_values_list) # map integer value to string value
# or
dset.features[field_name].feature.str2int(value_or_values_list) # map string value to integer value
```
|
In the [conll2003](https://huggingface.co/datasets/conll2003#data-fields) README, the labels are described as follows
> - `id`: a `string` feature.
> - `tokens`: a `list` of `string` features.
> - `pos_tags`: a `list` of classification labels, with possible values including `"` (0), `''` (1), `#` (2), `$` (3), `(` (4).
> - `chunk_tags`: a `list` of classification labels, with possible values including `O` (0), `B-ADJP` (1), `I-ADJP` (2), `B-ADVP` (3), `I-ADVP` (4).
> - `ner_tags`: a `list` of classification labels, with possible values including `O` (0), `B-PER` (1), `I-PER` (2), `B-ORG` (3), `I-ORG` (4) `B-LOC` (5), `I-LOC` (6) `B-MISC` (7), `I-MISC` (8).
First of all, it would be great if we can get a list of ALL possible pos_tags.
Second, the chunk tags labels cannot be correct. The description says the values go from 0 to 4 whereas the data shows values from at least 11 to 21 and 0.
EDIT: not really a bug, sorry for mistagging.
| 63 |
conll2003 incorrect label explanation
|
[
0.3663707673549652,
-0.3790366053581238,
-0.15575627982616425,
0.3438970446586609,
-0.16245658695697784,
-0.05756727233529091,
0.5023835897445679,
-0.3674129843711853,
-0.4356887936592102,
0.13353846967220306,
-0.10902432352304459,
0.1294194906949997,
0.23351188004016876,
0.3875156044960022,
-0.30754292011260986,
0.2630458176136017,
0.08978533744812012,
0.18031953275203705,
0.14862026274204254,
-0.267814040184021,
-0.41027456521987915,
0.197899729013443,
-0.5426192283630371,
0.2519564926624298,
-0.4660046398639679,
0.058797966688871384,
0.35363879799842834,
-0.03165242448449135,
-0.3515245318412781,
-0.2659606337547302,
0.2106720507144928,
0.06851720064878464,
-0.08709359169006348,
0.04438168555498123,
-0.00010560244118096307,
-0.18109345436096191,
0.35746991634368896,
-0.16478154063224792,
-0.1678982824087143,
0.41985955834388733,
-0.34806790947914124,
0.34433385729789734,
-0.03271019458770752,
-0.2725929617881775,
0.13164980709552765,
0.24059458076953888,
-0.2432689070701599,
0.4135368764400482,
-0.29667928814888,
-0.15389582514762878,
0.2729836702346802,
-0.30641087889671326,
-0.019762182608246803,
-0.17122171819210052,
0.389165997505188,
-0.23993031680583954,
-0.09579567611217499,
0.20844842493534088,
0.05601958557963371,
-0.08554086834192276,
0.020260369405150414,
0.3607660233974457,
0.20174045860767365,
0.0638769194483757,
0.13120321929454803,
-0.04078572988510132,
0.07369675487279892,
-0.32825279235839844,
0.18512332439422607,
0.13052624464035034,
0.5948314070701599,
0.07540884613990784,
-0.04681673273444176,
0.09618169814348221,
-0.14893576502799988,
-0.48844945430755615,
0.0015360784018412232,
-0.23027831315994263,
0.10599928349256516,
-0.15384484827518463,
-0.076630137860775,
-0.0382329486310482,
-0.13610121607780457,
-0.043193697929382324,
-0.5600252747535706,
0.9801169037818909,
-0.2021775096654892,
0.17705261707305908,
0.0852750837802887,
0.11230476945638657,
0.47424376010894775,
0.37420812249183655,
0.20367498695850372,
-0.008718018420040607,
-0.007249530404806137,
0.06550818681716919,
0.12455558031797409,
0.13660947978496552,
-0.19744093716144562,
-0.07899818569421768,
-0.38356083631515503,
-0.2386784851551056,
-0.00322569883428514,
0.08095847815275192,
-0.14288514852523804,
0.13467873632907867,
0.3906760811805725,
0.10115072876214981,
-0.08602291345596313,
-0.08906036615371704,
0.10601343959569931,
-0.1266794353723526,
-0.23919203877449036,
-0.1841508001089096,
-0.18681029975414276,
0.01457339245826006,
-0.18858811259269714,
-0.2330714911222458,
-0.5505936741828918,
0.07488791644573212,
-0.20223833620548248,
-0.0976598933339119,
0.09989084303379059,
0.201130673289299,
0.13233791291713715,
0.2466825246810913,
0.05684734508395195,
-0.04594698175787926,
0.06441504508256912,
-0.34190163016319275,
-0.17567183077335358,
-0.10358274728059769,
-0.32280099391937256,
-0.29472652077674866,
-0.14582611620426178,
0.09553198516368866,
0.16229771077632904,
-0.013979366980493069,
0.15945616364479065,
-0.15584538877010345,
-0.21894115209579468,
0.1268594115972519,
0.2741639316082001,
0.03648519888520241,
-0.194521963596344,
-0.008795824833214283,
0.16709835827350616,
-0.12991641461849213,
-0.06466925889253616,
0.004762428347021341,
-0.22706446051597595,
-0.1439467966556549,
-0.32555702328681946,
0.25015321373939514,
0.22321569919586182,
-0.14930135011672974,
0.6429173946380615,
-0.2688111364841461,
0.1295497566461563,
0.021082034334540367,
0.16261671483516693,
-0.06429269164800644,
-0.25822916626930237,
-0.09582321345806122,
-0.047994788736104965,
0.061046116054058075,
-0.5062113404273987,
-0.0061302329413592815,
0.07354559749364853,
-0.11818847805261612,
0.32375988364219666,
-0.12339816987514496,
-0.0489526130259037,
0.11181008815765381,
-0.0734751969575882,
-0.15703733265399933,
0.07613398134708405,
-0.5069539546966553,
-0.15991657972335815,
0.0008616172708570957,
0.012073767371475697,
-0.18114040791988373,
-0.07732805609703064,
-0.09414547681808472,
0.09118209779262543,
0.08830038458108902,
0.44392427802085876,
-0.2744119465351105,
0.27793192863464355,
-0.2556482255458832,
-0.2323293536901474,
0.09249100834131241,
0.019307941198349,
-0.10127247869968414,
-0.09501916170120239,
0.2550569176673889,
-0.07087837159633636,
0.017587510868906975,
0.2572510838508606,
0.2224835306406021,
0.10950176417827606,
0.3469504117965698,
0.2756173610687256,
0.061384864151477814,
0.030594725161790848,
0.4820858836174011,
-0.34647276997566223,
-0.13669022917747498,
0.09150941669940948,
0.3714582324028015,
0.5001623630523682,
0.03454945236444473,
-0.4485439956188202,
-0.1645846664905548,
-0.05896991118788719,
-0.18518778681755066,
0.30877357721328735,
0.17053931951522827,
-0.12450480461120605,
-0.3147289752960205,
0.01982508972287178,
0.2874831259250641,
0.10288877040147781,
-0.13929539918899536,
0.19776856899261475,
-0.4719264805316925,
-0.18586008250713348,
0.17692820727825165,
-0.1375562995672226,
0.15307796001434326,
0.40558865666389465,
0.054147280752658844,
-0.011286522261798382,
0.1255175620317459,
0.1215650662779808,
-0.3284018337726593,
-0.07956863939762115,
0.11533897370100021,
-0.16321194171905518,
0.03630485758185387,
-0.0698964074254036,
-0.39972004294395447,
-0.044300250709056854,
0.04398573562502861,
0.29799729585647583,
0.08925783634185791,
0.3533175587654114,
-0.0072107682935893536,
-0.22494670748710632,
0.08429709821939468,
0.1641233265399933,
-0.10528485476970673,
0.026903284713625908,
-0.40825527906417847,
-0.037529900670051575,
0.2356734573841095,
0.29472845792770386,
0.28188836574554443,
-0.27765050530433655,
0.29743650555610657,
0.2540223002433777,
0.07449460029602051,
-0.18225693702697754,
0.019025258719921112,
-0.07796679437160492,
0.1369508057832718,
-0.04841560870409012,
0.45482686161994934,
0.012040806002914906,
0.2206772118806839,
0.037428099662065506,
0.04416722431778908,
-0.2621704041957855,
-0.17936007678508759,
0.12663285434246063,
0.046928226947784424,
0.39218196272850037,
-0.017395250499248505,
-0.127732515335083,
-0.12511877715587616,
0.2230130434036255,
-0.32294583320617676,
0.19308441877365112,
0.15026073157787323,
-0.3446686267852783,
-0.034408193081617355,
-0.11690060049295425,
-0.19320601224899292,
-0.004968880210071802,
-0.35524168610572815,
-0.4294147789478302,
-0.44807007908821106,
0.09258630871772766,
0.03964812681078911,
-0.04291754215955734,
0.0843997523188591,
-0.3672037124633789,
0.172312930226326,
0.06007380411028862,
0.2587275803089142,
-0.0684586688876152,
-0.18851929903030396,
-0.3731641173362732,
0.1610821634531021,
-0.44531145691871643,
-0.36071833968162537,
0.05287306010723114,
-0.6572170853614807,
-0.030825991183519363,
0.2786107361316681,
-0.23143425583839417,
0.5774632692337036,
-0.17282842099666595,
-0.26857367157936096,
0.22315947711467743,
-0.08822360634803772,
-0.2441331148147583,
-0.06232599541544914,
-0.036293428391218185,
0.06689286231994629,
-0.1155392974615097,
-0.16862240433692932,
-0.09430725127458572,
-0.16233523190021515,
-0.3295167088508606,
-0.24358133971691132,
0.06128615140914917,
-0.08212868124246597,
-0.05897834151983261,
-0.022139444947242737,
0.22979892790317535,
0.3763248026371002,
-0.2844811975955963,
-0.021725928410887718,
0.03205022215843201,
0.1932341754436493,
-0.46132200956344604,
-0.2314336597919464,
0.05018210411071777,
-0.19054041802883148,
0.07066332548856735,
0.004705482628196478,
0.02540118433535099,
0.22093848884105682,
-0.1880492866039276,
-0.028412355110049248,
-0.1340986043214798,
0.10013135522603989,
-0.014114296063780785,
-0.0969678983092308,
-0.09913422912359238,
0.09740973263978958,
0.07988487929105759,
-0.18608349561691284,
-0.43651264905929565,
-0.5023272633552551,
0.38053035736083984,
-0.03608201816678047,
0.36773183941841125,
-0.07881366461515427,
-0.17840787768363953,
-0.07504522055387497,
0.19163432717323303,
-0.12855035066604614,
-0.05161357671022415,
0.17964722216129303,
-0.031784988939762115,
0.1678730845451355,
0.17158250510692596,
0.1934804916381836,
0.216136634349823,
0.11896450817584991,
-0.18082410097122192,
0.2691745162010193,
-0.2407631129026413,
-0.05260908231139183,
0.041508980095386505,
0.2661760151386261,
-0.27624091506004333,
0.04909772798418999,
-0.3274199664592743,
0.2826082110404968,
0.11325652152299881,
-0.05689742788672447,
0.050689946860075,
0.10995272547006607,
0.10827751457691193,
-0.05137597769498825,
-0.10384053736925125,
0.16495555639266968,
-0.06413736194372177,
-0.09952472895383835,
0.12657663226127625,
-0.1934734433889389,
0.032040394842624664,
0.01557114627212286,
0.26062753796577454,
0.0637311190366745,
-0.09619493037462234,
0.16805532574653625,
0.311462938785553,
0.6385675668716431,
-0.15384598076343536,
0.005509603302925825,
0.2407989799976349,
0.5038577318191528,
-0.11364582180976868,
-0.18861664831638336,
-0.23853053152561188,
-0.12048179656267166,
0.7072829008102417,
0.2004811018705368,
-0.10913152247667313,
-0.1458158940076828,
0.09339912980794907,
-0.17850971221923828,
-0.2222597450017929,
-0.0882134810090065,
-0.39910921454429626,
-0.3064756989479065,
-0.04098263010382652,
0.01148275751620531,
0.21386079490184784,
0.0933256670832634,
0.001833431189879775,
0.23858097195625305,
0.40113115310668945,
0.01464852411299944,
-0.07075925916433334,
0.464874267578125,
0.34004396200180054,
0.07106616348028183,
-0.22215372323989868,
-0.07979996502399445,
0.5350813865661621,
0.04698627069592476,
0.29882240295410156,
-0.24494370818138123,
-0.12144386023283005,
0.4624283015727997,
-0.26874226331710815,
0.3021341562271118,
0.11968284845352173,
0.2042069137096405,
0.030138719826936722,
-0.36305123567581177,
0.08145570755004883,
0.10458244383335114,
0.06940282881259918,
0.19236502051353455,
-0.10174966603517532,
-0.28183692693710327,
-0.018688106909394264,
0.24568210542201996,
-0.11426610499620438,
-0.3135968744754791,
0.054826583713293076,
0.22149045765399933,
-0.10257719457149506,
-0.14281605184078217,
0.2266545444726944,
0.9770746827125549,
0.16589683294296265,
0.004225186072289944,
-0.07629597932100296,
-0.5121548175811768,
0.14355486631393433,
0.10855243355035782,
0.07605695724487305,
-0.3386230766773224,
-0.2582727074623108,
-0.009826334193348885,
-0.08777368813753128,
-0.4538668692111969,
0.06428658217191696,
-0.24770314991474152,
0.21447207033634186,
-0.3757937252521515,
-0.19158047437667847,
0.1817508488893509,
-0.13848410546779633,
0.2928251326084137,
0.06378213316202164,
0.48593875765800476,
0.1548907607793808,
0.2898944020271301,
0.44581037759780884,
-0.20190350711345673,
0.12400656193494797,
-0.23063942790031433,
-0.15511858463287354,
-0.0962049663066864,
0.15316635370254517,
-0.11338639259338379,
-0.16983065009117126,
0.26817575097084045,
0.09559024125337601,
-0.18678982555866241,
-0.025220828130841255,
0.34741052985191345,
-0.079722560942173,
-0.02172899805009365,
0.0910937711596489,
0.7133564352989197,
0.06079435348510742,
0.03984384983778,
0.00562738161534071,
0.18358460068702698,
-0.14886163175106049,
-0.3728054165840149,
0.054268691688776016,
-0.03853040561079979,
-0.2507579028606415,
-0.14923712611198425,
0.32219818234443665,
-0.10088671743869781,
-0.10773885250091553,
-0.028274910524487495,
0.2627977132797241,
0.15473134815692902,
-0.10366257280111313,
0.25074148178100586,
-0.1403883397579193,
-0.03696287423372269,
-0.14417807757854462,
-0.03983428701758385,
-0.6324834823608398,
-0.12945742905139923,
-0.1412792205810547,
-0.08019523322582245,
0.43340587615966797,
0.02974848262965679,
-0.17500817775726318,
-0.2581513822078705,
-0.11688472330570221,
-0.1472044289112091,
-0.13224846124649048,
-0.2542823851108551,
-0.11168497800827026,
0.0718698501586914,
-0.37224194407463074,
-0.09768282622098923,
0.36529606580734253,
0.15682151913642883,
0.5198375582695007,
-0.35726767778396606,
-0.056462958455085754,
-0.011071545071899891,
0.09092915058135986,
-0.3192913830280304,
0.0681617483496666,
0.17152884602546692,
0.5900455713272095,
0.3590545356273651,
-0.18260960280895233,
-0.43268775939941406,
-0.07856940478086472,
-0.21604080498218536,
0.15055963397026062,
-0.02956443466246128,
-0.10925381630659103,
0.037392519414424896,
0.14808420836925507,
0.17766796052455902,
0.14520269632339478,
0.07216747105121613,
-0.26019158959388733,
-0.13045352697372437,
0.1078062355518341,
0.2270551472902298,
-0.28982558846473694,
-0.1256101429462433,
0.14105017483234406,
-0.11451110988855362,
0.24929919838905334,
-0.19890455901622772,
0.21581655740737915,
0.23812004923820496,
0.5327708721160889,
-0.5020040273666382,
0.2611124813556671,
0.052672870457172394,
-0.025151027366518974,
0.32379794120788574,
0.28699642419815063,
0.14722250401973724,
0.19776198267936707,
-0.21397654712200165,
0.17298321425914764,
0.013478410430252552,
0.1597737967967987,
-0.36413609981536865,
-0.07598385959863663,
-0.03003631718456745,
-0.07894404232501984,
0.18955600261688232,
0.06512045860290527,
0.0957489088177681,
0.052232369780540466,
-0.09663154184818268,
-0.46214574575424194,
0.3360614776611328,
0.3504282236099243,
-0.20155739784240723,
-0.2097949981689453,
-0.28154850006103516,
0.07858263701200485,
0.1726616472005844,
0.26555776596069336,
0.1578110158443451,
-0.2520957887172699,
0.1473955661058426,
-0.027178561314940453,
0.13514575362205505,
0.12407555431127548,
-0.06635628640651703,
0.034563057124614716,
-0.11428920924663544,
0.3705829381942749,
0.6297544240951538,
-0.10138552635908127,
0.02793261595070362,
0.12863309681415558,
0.6428237557411194,
-0.16235733032226562,
-0.07139895111322403,
0.1718091070652008,
0.05486392602324486,
0.13656942546367645,
0.3073351979255676,
0.36646410822868347,
-0.027618873864412308,
0.14893867075443268,
0.0697859451174736,
-0.11355959624052048,
-0.20448078215122223,
-0.026448475196957588,
-0.2382531315088272,
0.0594937726855278,
-0.09855905920267105,
-0.22990018129348755,
-0.09488415718078613,
-0.2596098780632019,
0.10110234469175339,
0.15978527069091797,
0.0035568794701248407,
-0.18258598446846008,
0.23441675305366516,
-0.24440094828605652,
-0.037526413798332214,
-0.13564284145832062,
-0.09923352301120758,
0.21551986038684845,
0.18358950316905975,
-0.1672174483537674,
0.30349335074424744,
0.06549783051013947,
0.038377195596694946,
0.26019665598869324,
0.2687811553478241,
0.1891092211008072,
0.27081310749053955,
0.43280476331710815,
-0.47571802139282227,
0.2098163664340973,
-0.07018475234508514,
-0.1497090458869934,
-0.21498461067676544,
0.2840948700904846,
-0.14160782098770142,
0.3496650755405426,
0.21588675677776337,
-0.2501213848590851,
0.04639149084687233,
0.27607065439224243,
0.24029959738254547,
0.2385755479335785,
-0.1939188838005066,
-0.10123269259929657,
-0.08781388401985168,
-0.038656216114759445,
0.3179366886615753,
-0.23882248997688293,
0.26228955388069153,
0.11248323321342468,
-0.04061705246567726,
0.3030146658420563,
0.03808531537652016,
0.1650659143924713,
0.03153619170188904,
0.1797971874475479,
0.17022962868213654,
0.24905693531036377,
-0.0761491060256958,
-0.3054201006889343,
-0.08279615640640259,
0.35335254669189453,
-0.17928917706012726,
-0.1924259066581726,
0.05901653319597244,
0.012140566483139992,
0.04409492388367653,
-0.2536467909812927,
0.2566400170326233,
-0.09339053183794022,
0.030326711013913155,
0.019881095737218857,
-0.2720485329627991,
0.07968969643115997,
0.3444465398788452,
0.02874937653541565,
0.08213691413402557,
-0.1392734944820404,
0.0031442465260624886,
0.05495242029428482,
0.2288466840982437,
-0.15524142980575562,
0.12340367585420609,
0.2450084388256073,
0.4663940966129303,
0.24873386323451996,
0.04695041477680206,
0.5362544059753418,
-0.3660544455051422,
-0.2380104660987854,
0.09722765535116196,
-0.02688511647284031,
-0.31890055537223816,
-0.10320109874010086,
-0.007842732593417168,
-0.43341389298439026,
0.12932614982128143,
0.07002203166484833,
-0.09437818825244904,
0.4104682207107544,
0.2311161756515503,
0.25241485238075256,
-0.3393365442752838,
0.16447295248508453,
-0.10028818994760513,
-0.26882925629615784,
0.07294686883687973,
0.04721798375248909,
0.2066866010427475,
-0.11363843828439713,
-0.04575657844543457,
-0.39663392305374146,
0.27831369638442993,
0.21691377460956573,
-0.22237242758274078,
0.11970274150371552,
0.12800489366054535,
0.28952035307884216,
0.0762983039021492,
-0.24131621420383453,
-0.021754737943410873,
0.3535107374191284,
0.035202592611312866,
-0.3172409236431122,
0.16895505785942078,
-0.07559923827648163,
-0.25107112526893616,
-0.03682328388094902,
0.38102781772613525,
0.24283026158809662,
-0.6151529550552368,
-0.11645607650279999,
-0.004032795317471027
] |
https://github.com/huggingface/datasets/issues/3188
|
conll2002 issues
|
Hi ! Thanks for reporting :)
This is related to https://github.com/huggingface/datasets/issues/2742, I'm working on it. It should fix the viewer for around 80 datasets.
|
**Link:** https://huggingface.co/datasets/conll2002
The dataset viewer throws a server error when trying to preview the dataset.
```
Message: Extraction protocol 'train' for file at 'https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.train' is not implemented yet
```
In addition, the "point of contact" has encoding issues and does not work when clicked.
Am I the one who added this dataset ? No, @lhoestq did
| 24 |
conll2002 issues
|
[
0.14909440279006958,
0.051701199263334274,
-0.1934945434331894,
0.26596948504447937,
-0.052112091332674026,
-0.1279047578573227,
0.15769004821777344,
-0.003843128914013505,
-0.7022949457168579,
0.10756874084472656,
0.012664762325584888,
0.010639496147632599,
0.0029819344636052847,
0.3641648292541504,
-0.316121369600296,
0.26337218284606934,
-0.06922148913145065,
0.11667517572641373,
-0.1335851103067398,
-0.19801662862300873,
-0.37563836574554443,
0.07956161350011826,
-0.4990624487400055,
0.050126831978559494,
-0.9567663669586182,
0.04240038990974426,
0.2935943603515625,
0.41599246859550476,
-0.13139107823371887,
-0.17458418011665344,
0.21492114663124084,
0.0990833193063736,
0.19424791634082794,
0.04056834802031517,
-0.00010486787505215034,
-0.12190687656402588,
0.3182514011859894,
-0.03204014524817467,
-0.3011527359485626,
0.5479766726493835,
0.10106067359447479,
0.38561564683914185,
-0.10218586027622223,
-0.15980540215969086,
0.030295688658952713,
0.2233097404241562,
-0.350098192691803,
0.426347553730011,
0.3579164445400238,
0.0015065761981531978,
0.2845360040664673,
-0.18689770996570587,
0.28340253233909607,
-0.12679068744182587,
0.18828345835208893,
-0.23631995916366577,
-0.1570456475019455,
-0.0694238469004631,
0.12276959419250488,
-0.3317202925682068,
0.21105995774269104,
0.018086114898324013,
0.0229788888245821,
-0.169887974858284,
-0.17374764382839203,
-0.11421216279268265,
-0.06267889589071274,
-0.07096131891012192,
0.2824835777282715,
-0.013739013113081455,
0.21473103761672974,
0.15173740684986115,
0.15971256792545319,
0.2480611801147461,
0.029548898339271545,
-0.30391725897789,
0.3925389051437378,
-0.38686445355415344,
0.018092887476086617,
0.2479429394006729,
-0.09257721900939941,
-0.41607749462127686,
-0.20185963809490204,
0.03746052458882332,
-0.6366838216781616,
0.7047892808914185,
-0.10174828767776489,
0.04480146989226341,
0.06804665923118591,
-0.026689937338232994,
0.4432498514652252,
0.1805426925420761,
-0.056366607546806335,
0.0414947010576725,
-0.039019808173179626,
-0.0005894512869417667,
0.15115438401699066,
0.02574656531214714,
-0.04987744614481926,
-0.047134894877672195,
-0.2908027768135071,
0.11966757476329803,
-0.06085159257054329,
-0.14472807943820953,
-0.22760610282421112,
0.022419128566980362,
0.02081291191279888,
0.32280880212783813,
0.4568217098712921,
-0.3246569335460663,
-0.1000412255525589,
-0.04170376807451248,
-0.35379916429519653,
-0.17527693510055542,
-0.2682346701622009,
0.028486626222729683,
-0.01489306055009365,
-0.4744938611984253,
-0.20351965725421906,
0.2550268769264221,
-0.2972857654094696,
-0.05018026754260063,
0.30957892537117004,
0.22452987730503082,
0.009791669435799122,
0.18896925449371338,
0.25111037492752075,
0.08387161046266556,
0.03696407750248909,
-0.447913259267807,
-0.12356472760438919,
-0.3698060214519501,
-0.3219865560531616,
-0.049253709614276886,
0.10835923999547958,
0.08364982157945633,
-0.021428903564810753,
0.11191728711128235,
0.14643870294094086,
-0.0910446047782898,
0.040883976966142654,
0.1322668343782425,
-0.036570072174072266,
-0.042963333427906036,
-0.3256857991218567,
0.007007570471614599,
-0.09403222054243088,
-0.031252600252628326,
0.18311142921447754,
-0.03239988908171654,
-0.030204644426703453,
-0.1781618893146515,
-0.19477884471416473,
0.25239935517311096,
0.20989911258220673,
0.12189225107431412,
0.8915740251541138,
-0.231608584523201,
0.07706143707036972,
-0.1517525464296341,
-0.10333016514778137,
0.11164572089910507,
-0.24160762131214142,
-0.08810211718082428,
0.2007337063550949,
0.23832370340824127,
-0.3911828100681305,
0.06618408113718033,
0.185078963637352,
-0.2738301455974579,
0.2209703028202057,
-0.15375547111034393,
-0.03762200474739075,
0.1157928928732872,
-0.20714762806892395,
-0.33229249715805054,
0.09802216291427612,
-0.2925816476345062,
-0.28082895278930664,
0.09487560391426086,
-0.06930235028266907,
-0.2127247005701065,
0.04055096209049225,
-0.0999840572476387,
0.28589412569999695,
-0.0002204632037319243,
0.26775723695755005,
-0.029569951817393303,
0.23661434650421143,
-0.28254395723342896,
-0.39956942200660706,
0.06787890195846558,
0.07082933187484741,
0.011264517903327942,
-0.032299239188432693,
0.3388563096523285,
-0.07093283534049988,
-0.06704790145158768,
0.05125212296843529,
0.06747864186763763,
0.059638213366270065,
0.06733181327581406,
0.3576129972934723,
-0.005412652622908354,
0.013913951814174652,
0.418870747089386,
-0.4066775441169739,
-0.1945270299911499,
0.09237711131572723,
0.09886284917593002,
0.5376573801040649,
0.23947551846504211,
-0.1789059340953827,
-0.10284282267093658,
0.02415870875120163,
0.027745530009269714,
0.21399253606796265,
0.09593139588832855,
0.1228017657995224,
-0.0434260331094265,
-0.1373920738697052,
0.7797608971595764,
0.051097571849823,
-0.02802211605012417,
0.38240984082221985,
0.13984271883964539,
-0.09704127162694931,
-0.35154733061790466,
0.05366972088813782,
0.23514826595783234,
0.36243167519569397,
-0.06131795421242714,
-0.10845383256673813,
0.26001566648483276,
-0.048103831708431244,
-0.07794065773487091,
0.06549392640590668,
0.08605626225471497,
0.17745241522789001,
-0.05536419153213501,
-0.05323959141969681,
-0.019078552722930908,
-0.1485709547996521,
-0.16749677062034607,
0.3980715274810791,
0.15126951038837433,
0.4017053246498108,
0.07987149059772491,
-0.19342637062072754,
0.3134059011936188,
0.08874893188476562,
-0.246823251247406,
0.07810064405202866,
-0.15685568749904633,
0.032769180834293365,
0.16719502210617065,
0.1326758712530136,
0.23792052268981934,
-0.44317853450775146,
0.03398071229457855,
-0.11934805661439896,
0.12472059577703476,
0.031973786652088165,
0.0006907967035658658,
0.08967709541320801,
0.2922669053077698,
0.03438883274793625,
0.39479443430900574,
0.1695026308298111,
0.19582006335258484,
-0.1520308405160904,
0.1537659615278244,
-0.4198475480079651,
-0.3025365173816681,
0.04605289176106453,
-0.2025177776813507,
0.19707807898521423,
0.130330428481102,
-0.03556337207555771,
-0.0024247444234788418,
0.18674933910369873,
-0.03630523383617401,
-0.0012674827594310045,
0.0981980487704277,
-0.35109275579452515,
-0.3336101174354553,
-0.2884538769721985,
-0.14275451004505157,
0.20168019831180573,
0.2278217226266861,
-0.1005634292960167,
-0.061283670365810394,
0.15440669655799866,
0.08910177648067474,
-0.044649019837379456,
0.04014178737998009,
-0.545295238494873,
0.5058879256248474,
-0.12230954319238663,
0.3110937476158142,
-0.2061731517314911,
-0.2639003098011017,
-0.4219926595687866,
0.16046394407749176,
0.09114555269479752,
-0.22215576469898224,
0.023508936166763306,
-0.2150406688451767,
-0.01151427160948515,
0.4254997968673706,
-0.15454480051994324,
0.3037033975124359,
0.19744011759757996,
-0.1352885514497757,
-0.09905331581830978,
-0.0003195664321538061,
-0.1799265593290329,
-0.16035719215869904,
0.23932398855686188,
0.21137197315692902,
-0.10490947216749191,
0.11220812052488327,
0.03756525367498398,
-0.23996184766292572,
-0.3335975110530853,
-0.2088579684495926,
0.19141744077205658,
-0.26694774627685547,
-0.1396941989660263,
-0.06816122680902481,
0.03470679000020027,
0.06116693094372749,
0.02986566722393036,
-0.09950460493564606,
-0.04456635192036629,
0.1295362263917923,
-0.21994547545909882,
-0.07641696184873581,
0.3830227851867676,
-0.26186439394950867,
-0.09783868491649628,
0.0048501803539693356,
0.006247444078326225,
-0.0957053005695343,
0.03652683645486832,
-0.28907740116119385,
0.011215366423130035,
0.023745693266391754,
0.009218837134540081,
-0.23158684372901917,
-0.05691329762339592,
-0.02502547577023506,
0.20985135436058044,
-0.15323495864868164,
-0.31656530499458313,
-0.28315269947052,
0.3482292592525482,
-0.005293759051710367,
0.4796050190925598,
-0.12555988132953644,
-0.04573667049407959,
-0.24318520724773407,
0.07380585372447968,
-0.050813984125852585,
-0.13572558760643005,
0.3140370547771454,
0.030084028840065002,
0.09702752530574799,
0.12151729315519333,
-0.1436268538236618,
0.37699007987976074,
0.2776804268360138,
-0.12122078239917755,
0.07384511083364487,
0.060083430260419846,
-0.1918756067752838,
-0.2852288484573364,
0.07657558470964432,
-0.06678318977355957,
-0.16059957444667816,
-0.3860108256340027,
0.42273277044296265,
0.3191768229007721,
-0.09973606467247009,
0.06129031255841255,
0.3142312169075012,
0.08774451166391373,
0.14298388361930847,
-0.2016863375902176,
0.17844992876052856,
-0.44089189171791077,
-0.381594717502594,
0.17575214803218842,
0.20610620081424713,
0.2872547507286072,
-0.20280860364437103,
0.26227062940597534,
-0.23789790272712708,
-0.3017711639404297,
0.09161952137947083,
0.06628552824258804,
0.6801882386207581,
0.10943794995546341,
-0.21405039727687836,
0.19261333346366882,
0.2755899429321289,
0.13226908445358276,
-0.19318881630897522,
-0.06784301996231079,
-0.02721022255718708,
0.7563167214393616,
0.16232571005821228,
-0.11348547041416168,
-0.07732710987329483,
0.17906935513019562,
-0.15993013978004456,
-0.18011581897735596,
-0.10615099221467972,
-0.17859885096549988,
-0.1414571851491928,
0.005744546186178923,
0.03586159646511078,
-0.3634740710258484,
0.16995719075202942,
0.0304745864123106,
-0.35720229148864746,
0.22211426496505737,
-0.39679545164108276,
0.05571957677602768,
0.3455079197883606,
0.3892799913883209,
0.03265433385968208,
0.18581365048885345,
0.13185136020183563,
0.4463540017604828,
0.3468484580516815,
-0.19057615101337433,
0.08250851929187775,
0.2540454566478729,
0.3760298192501068,
-0.2470787763595581,
0.4702657461166382,
0.32607585191726685,
-0.03545562922954559,
-0.16204650700092316,
-0.4744691550731659,
0.005021769553422928,
-0.05507670342922211,
-0.07307709008455276,
0.21841669082641602,
-0.12652410566806793,
-0.28103289008140564,
0.07925108820199966,
-0.00797436386346817,
-0.030329629778862,
-0.20094610750675201,
0.06815021485090256,
-0.2849983274936676,
0.022561129182577133,
0.00041637945105321705,
0.07392654567956924,
1.2306760549545288,
0.07410857081413269,
-0.3189525008201599,
0.02107229083776474,
-0.47871822118759155,
-0.03995652496814728,
-0.17452850937843323,
0.0011890691239386797,
-0.13316349685192108,
0.2547316253185272,
0.19051942229270935,
-0.09625789523124695,
-0.03454023599624634,
-0.08961474150419235,
-0.2936961054801941,
-0.03791538253426552,
-0.6161008477210999,
-0.44108518958091736,
0.03279704973101616,
0.007391662336885929,
0.08375207334756851,
0.13905571401119232,
0.41054362058639526,
0.24547797441482544,
0.2283870279788971,
0.23635651171207428,
-0.14310163259506226,
-0.12449240684509277,
-0.15457488596439362,
-0.2017202526330948,
-0.16926711797714233,
0.08535341173410416,
-0.3277837634086609,
-0.11095700412988663,
0.5546746253967285,
-0.16565203666687012,
-0.13069166243076324,
-0.007245780900120735,
0.30065420269966125,
0.11909215152263641,
-0.14975479245185852,
-0.06480427831411362,
0.4472813904285431,
-0.13659316301345825,
-0.01860196329653263,
0.24917006492614746,
-0.12123695760965347,
-0.20258557796478271,
-0.41864457726478577,
0.24433371424674988,
-0.017320984974503517,
0.003454612335190177,
-0.22205469012260437,
0.10094218701124191,
0.05005593225359917,
-0.18656191229820251,
0.14225542545318604,
0.2571384012699127,
0.03980540111660957,
-0.1763814240694046,
0.34541717171669006,
-0.09406562149524689,
-0.06327833235263824,
0.2519571781158447,
0.1664305478334427,
-0.23552711308002472,
-0.1294226050376892,
-0.040584746748209,
-0.16793152689933777,
0.23555058240890503,
0.29099801182746887,
0.049327950924634933,
-0.09089042246341705,
-0.2553888261318207,
0.09582504630088806,
-0.31175512075424194,
0.08018336445093155,
0.04521862044930458,
0.3484537899494171,
-0.318439781665802,
-0.22346314787864685,
0.3956742584705353,
0.0003718203806784004,
0.28933367133140564,
-0.19936993718147278,
0.106844961643219,
-0.2977605164051056,
0.17276106774806976,
0.0037144036032259464,
0.17417077720165253,
-0.40397515892982483,
0.6368594765663147,
-0.000056413035053992644,
-0.1647847443819046,
-0.44866320490837097,
-0.2616828382015228,
-0.21158578991889954,
0.008569592610001564,
-0.009301595389842987,
-0.15492212772369385,
-0.2624916732311249,
-0.00484604574739933,
0.31551438570022583,
0.091452457010746,
0.02895394153892994,
-0.3337326943874359,
-0.09206437319517136,
0.09242961555719376,
0.10092050582170486,
-0.4008978009223938,
-0.3004191219806671,
-0.045340508222579956,
-0.12168002128601074,
0.20971918106079102,
-0.24550101161003113,
0.10289929062128067,
0.0538606122136116,
0.13306033611297607,
-0.26306936144828796,
0.05963551998138428,
-0.014116525650024414,
0.21963466703891754,
0.12229815125465393,
0.3202184736728668,
0.11890241503715515,
0.17208287119865417,
-0.141504168510437,
-0.07057905942201614,
0.13960927724838257,
-0.031473465263843536,
-0.4428631067276001,
-0.23550812900066376,
0.15196140110492706,
-0.007636174559593201,
-0.03465454280376434,
0.3208007514476776,
-0.1454331874847412,
0.43876317143440247,
-0.09586792439222336,
-0.002792252693325281,
0.38308781385421753,
0.33426737785339355,
-0.19152384996414185,
0.1073022335767746,
0.17741337418556213,
0.04885784536600113,
-0.06685934960842133,
0.12799130380153656,
-0.03533647209405899,
-0.4691190719604492,
0.23272153735160828,
0.02434266358613968,
-0.04399397596716881,
0.22182397544384003,
-0.06692535430192947,
0.06172887980937958,
0.1322505921125412,
0.14782661199569702,
0.04149620234966278,
-0.11874811351299286,
-0.1822776049375534,
-0.12973925471305847,
0.30563580989837646,
-0.5371294617652893,
-0.1407739520072937,
0.4450540244579315,
0.21683847904205322,
-0.2148347645998001,
0.22187846899032593,
0.2959693670272827,
-0.10385777056217194,
-0.09522105008363724,
-0.10152565687894821,
0.29341965913772583,
0.10321380943059921,
-0.2572941184043884,
-0.39241793751716614,
0.17393501102924347,
-0.019101521000266075,
0.036987680941820145,
-0.23762598633766174,
-0.3877533972263336,
0.0034871099051088095,
0.1293415129184723,
0.08906123787164688,
0.19567278027534485,
0.09653814882040024,
0.18665917217731476,
-0.15961939096450806,
-0.2640625238418579,
0.17158524692058563,
0.03616397827863693,
0.12446130067110062,
0.08131244778633118,
0.3344704508781433,
-0.022805197164416313,
0.13355818390846252,
0.173297718167305,
0.45679572224617004,
0.2064657062292099,
0.4332933723926544,
0.06677041202783585,
-0.20214137434959412,
0.0885377824306488,
0.012826316989958286,
-0.2830733358860016,
0.2903846204280853,
0.26912572979927063,
-0.13075248897075653,
-0.05720779299736023,
0.21258607506752014,
-0.22056721150875092,
-0.2008567452430725,
-0.15780030190944672,
-0.15560641884803772,
0.12327904999256134,
-0.05042271688580513,
0.023931043222546577,
-0.13928082585334778,
-0.09144032001495361,
-0.08646533638238907,
-0.19339437782764435,
0.29399365186691284,
0.25622937083244324,
-0.11924511939287186,
0.12266182899475098,
0.17007902264595032,
0.11685872822999954,
-0.20548371970653534,
0.1084802970290184,
0.16936741769313812,
0.42852509021759033,
-0.09816274791955948,
-0.5904810428619385,
-0.10317891091108322,
0.30561792850494385,
-0.04794999957084656,
0.16944241523742676,
-0.12443563342094421,
0.14308813214302063,
0.027998020872473717,
-0.015726670622825623,
0.27368152141571045,
-0.34299930930137634,
-0.03162034600973129,
0.10491634905338287,
-0.34581202268600464,
0.43971696496009827,
0.38370269536972046,
0.06441765278577805,
-0.00016296267858706415,
-0.17677855491638184,
0.17874735593795776,
0.15768863260746002,
0.24773478507995605,
-0.004607388284057379,
0.006685141008347273,
-0.22989366948604584,
0.2685803771018982,
0.4904120862483978,
0.05753973498940468,
0.46809160709381104,
-0.11785481870174408,
0.024535469710826874,
-0.09669501334428787,
-0.16657783091068268,
0.3176109790802002,
-0.3798266351222992,
0.12414281070232391,
-0.5154222249984741,
-0.19576774537563324,
0.07748176902532578,
0.02700694464147091,
0.4536295235157013,
0.10373199731111526,
0.09177340567111969,
-0.10140351206064224,
-0.19157788157463074,
-0.2328091710805893,
-0.30398842692375183,
0.08364543318748474,
0.18821574747562408,
-0.0662326067686081,
-0.14229755103588104,
-0.11128100752830505,
-0.1923973113298416,
0.2946580946445465,
0.28296366333961487,
0.006158472970128059,
-0.03977305814623833,
0.2676088511943817,
0.1785222589969635,
0.08113782107830048,
-0.16345344483852386,
-0.3055427074432373,
0.2563675045967102,
-0.13271120190620422,
0.031158780679106712,
0.3104704022407532,
0.33920130133628845,
-0.3165164887905121,
0.037090152502059937,
0.1706981658935547,
0.09665243327617645,
-0.2626790404319763,
-0.013865973800420761,
0.26270151138305664
] |
https://github.com/huggingface/datasets/issues/3188
|
conll2002 issues
|
Ah, hadn't seen that sorry.
The scrambled "point of contact" is a separate issue though, I think.
|
**Link:** https://huggingface.co/datasets/conll2002
The dataset viewer throws a server error when trying to preview the dataset.
```
Message: Extraction protocol 'train' for file at 'https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.train' is not implemented yet
```
In addition, the "point of contact" has encoding issues and does not work when clicked.
Am I the one who added this dataset ? No, @lhoestq did
| 17 |
conll2002 issues
|
[
0.14909440279006958,
0.051701199263334274,
-0.1934945434331894,
0.26596948504447937,
-0.052112091332674026,
-0.1279047578573227,
0.15769004821777344,
-0.003843128914013505,
-0.7022949457168579,
0.10756874084472656,
0.012664762325584888,
0.010639496147632599,
0.0029819344636052847,
0.3641648292541504,
-0.316121369600296,
0.26337218284606934,
-0.06922148913145065,
0.11667517572641373,
-0.1335851103067398,
-0.19801662862300873,
-0.37563836574554443,
0.07956161350011826,
-0.4990624487400055,
0.050126831978559494,
-0.9567663669586182,
0.04240038990974426,
0.2935943603515625,
0.41599246859550476,
-0.13139107823371887,
-0.17458418011665344,
0.21492114663124084,
0.0990833193063736,
0.19424791634082794,
0.04056834802031517,
-0.00010486787505215034,
-0.12190687656402588,
0.3182514011859894,
-0.03204014524817467,
-0.3011527359485626,
0.5479766726493835,
0.10106067359447479,
0.38561564683914185,
-0.10218586027622223,
-0.15980540215969086,
0.030295688658952713,
0.2233097404241562,
-0.350098192691803,
0.426347553730011,
0.3579164445400238,
0.0015065761981531978,
0.2845360040664673,
-0.18689770996570587,
0.28340253233909607,
-0.12679068744182587,
0.18828345835208893,
-0.23631995916366577,
-0.1570456475019455,
-0.0694238469004631,
0.12276959419250488,
-0.3317202925682068,
0.21105995774269104,
0.018086114898324013,
0.0229788888245821,
-0.169887974858284,
-0.17374764382839203,
-0.11421216279268265,
-0.06267889589071274,
-0.07096131891012192,
0.2824835777282715,
-0.013739013113081455,
0.21473103761672974,
0.15173740684986115,
0.15971256792545319,
0.2480611801147461,
0.029548898339271545,
-0.30391725897789,
0.3925389051437378,
-0.38686445355415344,
0.018092887476086617,
0.2479429394006729,
-0.09257721900939941,
-0.41607749462127686,
-0.20185963809490204,
0.03746052458882332,
-0.6366838216781616,
0.7047892808914185,
-0.10174828767776489,
0.04480146989226341,
0.06804665923118591,
-0.026689937338232994,
0.4432498514652252,
0.1805426925420761,
-0.056366607546806335,
0.0414947010576725,
-0.039019808173179626,
-0.0005894512869417667,
0.15115438401699066,
0.02574656531214714,
-0.04987744614481926,
-0.047134894877672195,
-0.2908027768135071,
0.11966757476329803,
-0.06085159257054329,
-0.14472807943820953,
-0.22760610282421112,
0.022419128566980362,
0.02081291191279888,
0.32280880212783813,
0.4568217098712921,
-0.3246569335460663,
-0.1000412255525589,
-0.04170376807451248,
-0.35379916429519653,
-0.17527693510055542,
-0.2682346701622009,
0.028486626222729683,
-0.01489306055009365,
-0.4744938611984253,
-0.20351965725421906,
0.2550268769264221,
-0.2972857654094696,
-0.05018026754260063,
0.30957892537117004,
0.22452987730503082,
0.009791669435799122,
0.18896925449371338,
0.25111037492752075,
0.08387161046266556,
0.03696407750248909,
-0.447913259267807,
-0.12356472760438919,
-0.3698060214519501,
-0.3219865560531616,
-0.049253709614276886,
0.10835923999547958,
0.08364982157945633,
-0.021428903564810753,
0.11191728711128235,
0.14643870294094086,
-0.0910446047782898,
0.040883976966142654,
0.1322668343782425,
-0.036570072174072266,
-0.042963333427906036,
-0.3256857991218567,
0.007007570471614599,
-0.09403222054243088,
-0.031252600252628326,
0.18311142921447754,
-0.03239988908171654,
-0.030204644426703453,
-0.1781618893146515,
-0.19477884471416473,
0.25239935517311096,
0.20989911258220673,
0.12189225107431412,
0.8915740251541138,
-0.231608584523201,
0.07706143707036972,
-0.1517525464296341,
-0.10333016514778137,
0.11164572089910507,
-0.24160762131214142,
-0.08810211718082428,
0.2007337063550949,
0.23832370340824127,
-0.3911828100681305,
0.06618408113718033,
0.185078963637352,
-0.2738301455974579,
0.2209703028202057,
-0.15375547111034393,
-0.03762200474739075,
0.1157928928732872,
-0.20714762806892395,
-0.33229249715805054,
0.09802216291427612,
-0.2925816476345062,
-0.28082895278930664,
0.09487560391426086,
-0.06930235028266907,
-0.2127247005701065,
0.04055096209049225,
-0.0999840572476387,
0.28589412569999695,
-0.0002204632037319243,
0.26775723695755005,
-0.029569951817393303,
0.23661434650421143,
-0.28254395723342896,
-0.39956942200660706,
0.06787890195846558,
0.07082933187484741,
0.011264517903327942,
-0.032299239188432693,
0.3388563096523285,
-0.07093283534049988,
-0.06704790145158768,
0.05125212296843529,
0.06747864186763763,
0.059638213366270065,
0.06733181327581406,
0.3576129972934723,
-0.005412652622908354,
0.013913951814174652,
0.418870747089386,
-0.4066775441169739,
-0.1945270299911499,
0.09237711131572723,
0.09886284917593002,
0.5376573801040649,
0.23947551846504211,
-0.1789059340953827,
-0.10284282267093658,
0.02415870875120163,
0.027745530009269714,
0.21399253606796265,
0.09593139588832855,
0.1228017657995224,
-0.0434260331094265,
-0.1373920738697052,
0.7797608971595764,
0.051097571849823,
-0.02802211605012417,
0.38240984082221985,
0.13984271883964539,
-0.09704127162694931,
-0.35154733061790466,
0.05366972088813782,
0.23514826595783234,
0.36243167519569397,
-0.06131795421242714,
-0.10845383256673813,
0.26001566648483276,
-0.048103831708431244,
-0.07794065773487091,
0.06549392640590668,
0.08605626225471497,
0.17745241522789001,
-0.05536419153213501,
-0.05323959141969681,
-0.019078552722930908,
-0.1485709547996521,
-0.16749677062034607,
0.3980715274810791,
0.15126951038837433,
0.4017053246498108,
0.07987149059772491,
-0.19342637062072754,
0.3134059011936188,
0.08874893188476562,
-0.246823251247406,
0.07810064405202866,
-0.15685568749904633,
0.032769180834293365,
0.16719502210617065,
0.1326758712530136,
0.23792052268981934,
-0.44317853450775146,
0.03398071229457855,
-0.11934805661439896,
0.12472059577703476,
0.031973786652088165,
0.0006907967035658658,
0.08967709541320801,
0.2922669053077698,
0.03438883274793625,
0.39479443430900574,
0.1695026308298111,
0.19582006335258484,
-0.1520308405160904,
0.1537659615278244,
-0.4198475480079651,
-0.3025365173816681,
0.04605289176106453,
-0.2025177776813507,
0.19707807898521423,
0.130330428481102,
-0.03556337207555771,
-0.0024247444234788418,
0.18674933910369873,
-0.03630523383617401,
-0.0012674827594310045,
0.0981980487704277,
-0.35109275579452515,
-0.3336101174354553,
-0.2884538769721985,
-0.14275451004505157,
0.20168019831180573,
0.2278217226266861,
-0.1005634292960167,
-0.061283670365810394,
0.15440669655799866,
0.08910177648067474,
-0.044649019837379456,
0.04014178737998009,
-0.545295238494873,
0.5058879256248474,
-0.12230954319238663,
0.3110937476158142,
-0.2061731517314911,
-0.2639003098011017,
-0.4219926595687866,
0.16046394407749176,
0.09114555269479752,
-0.22215576469898224,
0.023508936166763306,
-0.2150406688451767,
-0.01151427160948515,
0.4254997968673706,
-0.15454480051994324,
0.3037033975124359,
0.19744011759757996,
-0.1352885514497757,
-0.09905331581830978,
-0.0003195664321538061,
-0.1799265593290329,
-0.16035719215869904,
0.23932398855686188,
0.21137197315692902,
-0.10490947216749191,
0.11220812052488327,
0.03756525367498398,
-0.23996184766292572,
-0.3335975110530853,
-0.2088579684495926,
0.19141744077205658,
-0.26694774627685547,
-0.1396941989660263,
-0.06816122680902481,
0.03470679000020027,
0.06116693094372749,
0.02986566722393036,
-0.09950460493564606,
-0.04456635192036629,
0.1295362263917923,
-0.21994547545909882,
-0.07641696184873581,
0.3830227851867676,
-0.26186439394950867,
-0.09783868491649628,
0.0048501803539693356,
0.006247444078326225,
-0.0957053005695343,
0.03652683645486832,
-0.28907740116119385,
0.011215366423130035,
0.023745693266391754,
0.009218837134540081,
-0.23158684372901917,
-0.05691329762339592,
-0.02502547577023506,
0.20985135436058044,
-0.15323495864868164,
-0.31656530499458313,
-0.28315269947052,
0.3482292592525482,
-0.005293759051710367,
0.4796050190925598,
-0.12555988132953644,
-0.04573667049407959,
-0.24318520724773407,
0.07380585372447968,
-0.050813984125852585,
-0.13572558760643005,
0.3140370547771454,
0.030084028840065002,
0.09702752530574799,
0.12151729315519333,
-0.1436268538236618,
0.37699007987976074,
0.2776804268360138,
-0.12122078239917755,
0.07384511083364487,
0.060083430260419846,
-0.1918756067752838,
-0.2852288484573364,
0.07657558470964432,
-0.06678318977355957,
-0.16059957444667816,
-0.3860108256340027,
0.42273277044296265,
0.3191768229007721,
-0.09973606467247009,
0.06129031255841255,
0.3142312169075012,
0.08774451166391373,
0.14298388361930847,
-0.2016863375902176,
0.17844992876052856,
-0.44089189171791077,
-0.381594717502594,
0.17575214803218842,
0.20610620081424713,
0.2872547507286072,
-0.20280860364437103,
0.26227062940597534,
-0.23789790272712708,
-0.3017711639404297,
0.09161952137947083,
0.06628552824258804,
0.6801882386207581,
0.10943794995546341,
-0.21405039727687836,
0.19261333346366882,
0.2755899429321289,
0.13226908445358276,
-0.19318881630897522,
-0.06784301996231079,
-0.02721022255718708,
0.7563167214393616,
0.16232571005821228,
-0.11348547041416168,
-0.07732710987329483,
0.17906935513019562,
-0.15993013978004456,
-0.18011581897735596,
-0.10615099221467972,
-0.17859885096549988,
-0.1414571851491928,
0.005744546186178923,
0.03586159646511078,
-0.3634740710258484,
0.16995719075202942,
0.0304745864123106,
-0.35720229148864746,
0.22211426496505737,
-0.39679545164108276,
0.05571957677602768,
0.3455079197883606,
0.3892799913883209,
0.03265433385968208,
0.18581365048885345,
0.13185136020183563,
0.4463540017604828,
0.3468484580516815,
-0.19057615101337433,
0.08250851929187775,
0.2540454566478729,
0.3760298192501068,
-0.2470787763595581,
0.4702657461166382,
0.32607585191726685,
-0.03545562922954559,
-0.16204650700092316,
-0.4744691550731659,
0.005021769553422928,
-0.05507670342922211,
-0.07307709008455276,
0.21841669082641602,
-0.12652410566806793,
-0.28103289008140564,
0.07925108820199966,
-0.00797436386346817,
-0.030329629778862,
-0.20094610750675201,
0.06815021485090256,
-0.2849983274936676,
0.022561129182577133,
0.00041637945105321705,
0.07392654567956924,
1.2306760549545288,
0.07410857081413269,
-0.3189525008201599,
0.02107229083776474,
-0.47871822118759155,
-0.03995652496814728,
-0.17452850937843323,
0.0011890691239386797,
-0.13316349685192108,
0.2547316253185272,
0.19051942229270935,
-0.09625789523124695,
-0.03454023599624634,
-0.08961474150419235,
-0.2936961054801941,
-0.03791538253426552,
-0.6161008477210999,
-0.44108518958091736,
0.03279704973101616,
0.007391662336885929,
0.08375207334756851,
0.13905571401119232,
0.41054362058639526,
0.24547797441482544,
0.2283870279788971,
0.23635651171207428,
-0.14310163259506226,
-0.12449240684509277,
-0.15457488596439362,
-0.2017202526330948,
-0.16926711797714233,
0.08535341173410416,
-0.3277837634086609,
-0.11095700412988663,
0.5546746253967285,
-0.16565203666687012,
-0.13069166243076324,
-0.007245780900120735,
0.30065420269966125,
0.11909215152263641,
-0.14975479245185852,
-0.06480427831411362,
0.4472813904285431,
-0.13659316301345825,
-0.01860196329653263,
0.24917006492614746,
-0.12123695760965347,
-0.20258557796478271,
-0.41864457726478577,
0.24433371424674988,
-0.017320984974503517,
0.003454612335190177,
-0.22205469012260437,
0.10094218701124191,
0.05005593225359917,
-0.18656191229820251,
0.14225542545318604,
0.2571384012699127,
0.03980540111660957,
-0.1763814240694046,
0.34541717171669006,
-0.09406562149524689,
-0.06327833235263824,
0.2519571781158447,
0.1664305478334427,
-0.23552711308002472,
-0.1294226050376892,
-0.040584746748209,
-0.16793152689933777,
0.23555058240890503,
0.29099801182746887,
0.049327950924634933,
-0.09089042246341705,
-0.2553888261318207,
0.09582504630088806,
-0.31175512075424194,
0.08018336445093155,
0.04521862044930458,
0.3484537899494171,
-0.318439781665802,
-0.22346314787864685,
0.3956742584705353,
0.0003718203806784004,
0.28933367133140564,
-0.19936993718147278,
0.106844961643219,
-0.2977605164051056,
0.17276106774806976,
0.0037144036032259464,
0.17417077720165253,
-0.40397515892982483,
0.6368594765663147,
-0.000056413035053992644,
-0.1647847443819046,
-0.44866320490837097,
-0.2616828382015228,
-0.21158578991889954,
0.008569592610001564,
-0.009301595389842987,
-0.15492212772369385,
-0.2624916732311249,
-0.00484604574739933,
0.31551438570022583,
0.091452457010746,
0.02895394153892994,
-0.3337326943874359,
-0.09206437319517136,
0.09242961555719376,
0.10092050582170486,
-0.4008978009223938,
-0.3004191219806671,
-0.045340508222579956,
-0.12168002128601074,
0.20971918106079102,
-0.24550101161003113,
0.10289929062128067,
0.0538606122136116,
0.13306033611297607,
-0.26306936144828796,
0.05963551998138428,
-0.014116525650024414,
0.21963466703891754,
0.12229815125465393,
0.3202184736728668,
0.11890241503715515,
0.17208287119865417,
-0.141504168510437,
-0.07057905942201614,
0.13960927724838257,
-0.031473465263843536,
-0.4428631067276001,
-0.23550812900066376,
0.15196140110492706,
-0.007636174559593201,
-0.03465454280376434,
0.3208007514476776,
-0.1454331874847412,
0.43876317143440247,
-0.09586792439222336,
-0.002792252693325281,
0.38308781385421753,
0.33426737785339355,
-0.19152384996414185,
0.1073022335767746,
0.17741337418556213,
0.04885784536600113,
-0.06685934960842133,
0.12799130380153656,
-0.03533647209405899,
-0.4691190719604492,
0.23272153735160828,
0.02434266358613968,
-0.04399397596716881,
0.22182397544384003,
-0.06692535430192947,
0.06172887980937958,
0.1322505921125412,
0.14782661199569702,
0.04149620234966278,
-0.11874811351299286,
-0.1822776049375534,
-0.12973925471305847,
0.30563580989837646,
-0.5371294617652893,
-0.1407739520072937,
0.4450540244579315,
0.21683847904205322,
-0.2148347645998001,
0.22187846899032593,
0.2959693670272827,
-0.10385777056217194,
-0.09522105008363724,
-0.10152565687894821,
0.29341965913772583,
0.10321380943059921,
-0.2572941184043884,
-0.39241793751716614,
0.17393501102924347,
-0.019101521000266075,
0.036987680941820145,
-0.23762598633766174,
-0.3877533972263336,
0.0034871099051088095,
0.1293415129184723,
0.08906123787164688,
0.19567278027534485,
0.09653814882040024,
0.18665917217731476,
-0.15961939096450806,
-0.2640625238418579,
0.17158524692058563,
0.03616397827863693,
0.12446130067110062,
0.08131244778633118,
0.3344704508781433,
-0.022805197164416313,
0.13355818390846252,
0.173297718167305,
0.45679572224617004,
0.2064657062292099,
0.4332933723926544,
0.06677041202783585,
-0.20214137434959412,
0.0885377824306488,
0.012826316989958286,
-0.2830733358860016,
0.2903846204280853,
0.26912572979927063,
-0.13075248897075653,
-0.05720779299736023,
0.21258607506752014,
-0.22056721150875092,
-0.2008567452430725,
-0.15780030190944672,
-0.15560641884803772,
0.12327904999256134,
-0.05042271688580513,
0.023931043222546577,
-0.13928082585334778,
-0.09144032001495361,
-0.08646533638238907,
-0.19339437782764435,
0.29399365186691284,
0.25622937083244324,
-0.11924511939287186,
0.12266182899475098,
0.17007902264595032,
0.11685872822999954,
-0.20548371970653534,
0.1084802970290184,
0.16936741769313812,
0.42852509021759033,
-0.09816274791955948,
-0.5904810428619385,
-0.10317891091108322,
0.30561792850494385,
-0.04794999957084656,
0.16944241523742676,
-0.12443563342094421,
0.14308813214302063,
0.027998020872473717,
-0.015726670622825623,
0.27368152141571045,
-0.34299930930137634,
-0.03162034600973129,
0.10491634905338287,
-0.34581202268600464,
0.43971696496009827,
0.38370269536972046,
0.06441765278577805,
-0.00016296267858706415,
-0.17677855491638184,
0.17874735593795776,
0.15768863260746002,
0.24773478507995605,
-0.004607388284057379,
0.006685141008347273,
-0.22989366948604584,
0.2685803771018982,
0.4904120862483978,
0.05753973498940468,
0.46809160709381104,
-0.11785481870174408,
0.024535469710826874,
-0.09669501334428787,
-0.16657783091068268,
0.3176109790802002,
-0.3798266351222992,
0.12414281070232391,
-0.5154222249984741,
-0.19576774537563324,
0.07748176902532578,
0.02700694464147091,
0.4536295235157013,
0.10373199731111526,
0.09177340567111969,
-0.10140351206064224,
-0.19157788157463074,
-0.2328091710805893,
-0.30398842692375183,
0.08364543318748474,
0.18821574747562408,
-0.0662326067686081,
-0.14229755103588104,
-0.11128100752830505,
-0.1923973113298416,
0.2946580946445465,
0.28296366333961487,
0.006158472970128059,
-0.03977305814623833,
0.2676088511943817,
0.1785222589969635,
0.08113782107830048,
-0.16345344483852386,
-0.3055427074432373,
0.2563675045967102,
-0.13271120190620422,
0.031158780679106712,
0.3104704022407532,
0.33920130133628845,
-0.3165164887905121,
0.037090152502059937,
0.1706981658935547,
0.09665243327617645,
-0.2626790404319763,
-0.013865973800420761,
0.26270151138305664
] |
https://github.com/huggingface/datasets/issues/3186
|
Dataset viewer for nli_tr
|
It's an issue with the streaming mode:
```python
>>> import datasets
>>> dataset = datasets.load_dataset('nli_tr', name='snli_tr',split='test', streaming=True)
>>> next(iter(dataset))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 497, in __iter__
for key, example in self._iter():
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 494, in _iter
yield from ex_iterable
File "/home/slesage/hf/datasets-preview-backend/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 87, in __iter__
yield from self.generate_examples_fn(**self.kwargs)
File "/home/slesage/.cache/huggingface/modules/datasets_modules/datasets/nli_tr/c2ddd0c0a70caddac6a81c2dae5ca7939f00060d517d08f1983927818dba6521/nli_tr.py", line 155, in _generate_examples
with codecs.open(filepath, encoding="utf-8") as f:
File "/home/slesage/.pyenv/versions/3.9.6/lib/python3.9/codecs.py", line 905, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'zip://snli_tr_1.0_test.jsonl::https://tabilab.cmpe.boun.edu.tr/datasets/nli_datasets/snli_tr_1.0.zip'
```
Note that normal mode is used by the dataset viewer when streaming is failing, but only for the smallest datasets. `nli_tr` is above the limit, hence the error.
|
## Dataset viewer issue for '*nli_tr*'
**Link:** https://huggingface.co/datasets/nli_tr
Hello,
Thank you for the new dataset preview feature that will help the users to view the datasets online.
We just noticed that the dataset viewer widget in the `nli_tr` dataset shows the error below. The error must be due to a temporary problem that may have blocked access to the dataset through the dataset viewer. But the dataset is currently accessible through the link in the error message. May we kindly ask if it would be possible to rerun the job so that it can access the dataset for the dataset viewer function?
Thank you.
Emrah
------------------------------------------
Server Error
Status code: 404
Exception: FileNotFoundError
Message: [Errno 2] No such file or directory: 'zip://snli_tr_1.0_train.jsonl::https://tabilab.cmpe.boun.edu.tr/datasets/nli_datasets/snli_tr_1.0.zip
------------------------------------------
Am I the one who added this dataset ? Yes
| 119 |
Dataset viewer for nli_tr
|
[
-0.5377970337867737,
-0.04181884601712227,
-0.10882502049207687,
0.3195287883281708,
-0.013944737613201141,
0.040661416947841644,
0.16296851634979248,
0.39518967270851135,
-0.17110058665275574,
0.13351479172706604,
-0.24302801489830017,
0.4669746160507202,
-0.29185494780540466,
0.20772838592529297,
0.27851611375808716,
-0.06476873904466629,
0.007807649206370115,
0.5077264904975891,
-0.28553086519241333,
0.10530491918325424,
-0.050740644335746765,
0.04798218980431557,
-0.08247663080692291,
0.12993298470973969,
-0.056524619460105896,
-0.19151371717453003,
-0.05403765290975571,
0.0040560015477240086,
-0.4531390368938446,
-0.3478643000125885,
-0.00106332590803504,
0.2866811454296112,
0.4443065822124481,
0.08084488660097122,
-0.00010770340304588899,
0.16010969877243042,
0.14487570524215698,
-0.12110807001590729,
-0.27711331844329834,
0.2360096275806427,
-0.4658656418323517,
-0.09481912851333618,
0.3358832597732544,
-0.28964516520500183,
-0.10091152042150497,
-0.29357248544692993,
0.3000747263431549,
-0.23000116646289825,
0.08624513447284698,
0.04559703916311264,
0.23166365921497345,
0.43380582332611084,
-0.1983126550912857,
0.2231980264186859,
-0.0891517847776413,
0.1654827743768692,
-0.24234843254089355,
-0.14200668036937714,
-0.05662701651453972,
0.025552036240696907,
-0.37183114886283875,
0.40958723425865173,
-0.07453089952468872,
-0.22323478758335114,
0.18211466073989868,
-0.12630173563957214,
0.08211727440357208,
-0.05885268375277519,
0.09747251868247986,
0.2857271134853363,
0.5934404730796814,
-0.2583634555339813,
-0.06711554527282715,
0.2538265585899353,
-0.06329597532749176,
-0.14637607336044312,
-0.010024919174611568,
0.17745427787303925,
-0.25157430768013,
0.21938426792621613,
-0.23767675459384918,
0.02813483029603958,
-0.535624623298645,
0.02873246930539608,
-0.39619284868240356,
0.38188254833221436,
-0.05687260627746582,
-0.0656518042087555,
0.2652755081653595,
-0.24171152710914612,
0.6792605519294739,
0.2126052975654602,
-0.04160785675048828,
0.1803167164325714,
-0.1935529112815857,
-0.33068111538887024,
0.5152836441993713,
0.24864733219146729,
-0.22348952293395996,
0.2577165961265564,
0.363853394985199,
0.2887420654296875,
-0.24383287131786346,
-0.028602223843336105,
0.2070426344871521,
-0.22436471283435822,
0.05912336707115173,
0.3402726948261261,
0.3285958468914032,
-0.1748497188091278,
0.07694239169359207,
0.013745795004069805,
-0.1392974555492401,
-0.013077987357974052,
-0.20135816931724548,
-0.10762687027454376,
-0.04289931058883667,
-0.0883040726184845,
-0.1741882711648941,
-0.15080437064170837,
-0.09038382768630981,
-0.048269327729940414,
0.25981828570365906,
0.2514471709728241,
0.0034217145293951035,
-0.05343327671289444,
-0.042788125574588776,
0.019053205847740173,
-0.2224387228488922,
-0.2687849998474121,
-0.2453128546476364,
-0.11362574994564056,
0.0033576174173504114,
-0.3038771152496338,
0.20768395066261292,
0.03954074904322624,
0.08335090428590775,
-0.3260119557380676,
-0.340822696685791,
0.10664356499910355,
0.199396550655365,
-0.060811594128608704,
0.2009614109992981,
0.11488914489746094,
0.11864124238491058,
-0.2932867407798767,
-0.06344925612211227,
-0.3667667806148529,
-0.004335557576268911,
0.16248679161071777,
0.2747265100479126,
-0.34295761585235596,
-0.280394047498703,
0.20115342736244202,
-0.10701742768287659,
-0.3121678829193115,
0.5044227242469788,
0.2599102854728699,
-0.2301436811685562,
-0.2839844524860382,
-0.14623691141605377,
-0.10277426242828369,
-0.17766262590885162,
-0.09522556513547897,
0.2919274568557739,
0.32056936621665955,
-0.38243746757507324,
0.06657133996486664,
-0.21179810166358948,
-0.4191228449344635,
-0.11576465517282486,
0.0978991910815239,
-0.013492925092577934,
-0.029135996475815773,
-0.16289383172988892,
0.13280239701271057,
0.9622718095779419,
-0.24892956018447876,
-0.2824777364730835,
0.2416340708732605,
-0.07806511968374252,
-0.34702399373054504,
0.33634430170059204,
0.5233315825462341,
0.10630649328231812,
-0.2383914589881897,
-0.012435326352715492,
0.22173544764518738,
-0.042150434106588364,
0.023905910551548004,
-0.06790560483932495,
-0.004100860096514225,
0.49112868309020996,
0.2995443642139435,
0.016901811584830284,
-0.036557793617248535,
0.044946182519197464,
0.1004285141825676,
0.6832816004753113,
-0.05446147546172142,
-0.01580558717250824,
-0.21558043360710144,
0.07270565629005432,
-0.14329758286476135,
-0.06158978492021561,
-0.2721869945526123,
-0.15410250425338745,
-0.3005102276802063,
-0.004894252400845289,
0.223943829536438,
-0.10192307829856873,
-0.1529807597398758,
-0.0790853276848793,
0.08901207894086838,
-0.22921481728553772,
0.17325666546821594,
0.2778950035572052,
0.05247783288359642,
0.04560406506061554,
0.32169124484062195,
-0.1512461155653,
-0.19896402955055237,
-0.2826247215270996,
-0.016301274299621582,
0.0713798925280571,
0.25882309675216675,
0.07678984850645065,
0.1886717528104782,
0.1990978717803955,
0.36204054951667786,
-0.07041534036397934,
-0.034998826682567596,
-0.005825028754770756,
0.012251077219843864,
-0.00831118319183588,
0.15560024976730347,
0.13595564663410187,
0.2420242577791214,
-0.020883211866021156,
-0.49132221937179565,
0.40686360001564026,
-0.00034448024234734476,
-0.057787880301475525,
0.07720977067947388,
-0.7090044617652893,
0.0816681832075119,
-0.13113100826740265,
-0.041515108197927475,
0.16693435609340668,
0.1138087660074234,
0.26023948192596436,
-0.025594843551516533,
-0.1322397142648697,
-0.3144124150276184,
0.051074881106615067,
0.13962912559509277,
0.008782589808106422,
0.06140555813908577,
-0.6114163398742676,
0.3603317439556122,
0.45986273884773254,
-0.02505122683942318,
0.008579554967582226,
-0.14597457647323608,
-0.18480145931243896,
0.014578636735677719,
0.14154140651226044,
0.5186902284622192,
0.0665803998708725,
0.23917131125926971,
0.22733019292354584,
0.038522642105817795,
-0.2376338541507721,
-0.22179095447063446,
0.13196885585784912,
-0.016128774732351303,
-0.06172693148255348,
0.18334342539310455,
0.04737567529082298,
-0.23147141933441162,
-0.5097488164901733,
-0.12846209108829498,
-0.09759826213121414,
0.2648729383945465,
0.0018405067967250943,
-0.0061431583017110825,
-0.29548412561416626,
-1.0087864398956299,
-0.1719362884759903,
0.12472737580537796,
0.08338544517755508,
-0.3777739703655243,
0.24754303693771362,
-0.0020449927542358637,
0.038078125566244125,
0.07143835723400116,
-0.46986791491508484,
0.18870092928409576,
0.0350123755633831,
0.3216375410556793,
-0.17099381983280182,
-0.32030773162841797,
-0.2273118644952774,
0.21777953207492828,
0.40062931180000305,
0.30290359258651733,
0.285236120223999,
-0.29296210408210754,
0.5623453855514526,
-0.2813093960285187,
-0.41522493958473206,
0.0779503732919693,
0.21080529689788818,
-0.2594259977340698,
0.02764006331562996,
0.08514894545078278,
-0.10546979308128357,
0.10795846581459045,
-0.01690177246928215,
0.006833707448095083,
-0.052298396825790405,
0.10107789188623428,
-0.014999429695308208,
-0.020612159743905067,
0.041546531021595,
-0.3211619555950165,
-0.35500457882881165,
-0.4197494089603424,
0.06790224462747574,
0.14573884010314941,
0.24049726128578186,
0.2177734524011612,
-0.05006488040089607,
0.06427836418151855,
0.13341489434242249,
0.10545249283313751,
0.021338924765586853,
0.15748633444309235,
0.1579507291316986,
-0.33657610416412354,
-0.34254351258277893,
-0.0412006750702858,
0.05538351833820343,
0.20477809011936188,
0.18291613459587097,
-0.616008460521698,
0.17967264354228973,
0.09009859710931778,
-0.07821851223707199,
0.1309317648410797,
-0.08909207582473755,
0.268354207277298,
0.3108116388320923,
0.009814505465328693,
-0.006897302344441414,
-0.025648083537817,
-0.026047205552458763,
-0.18833735585212708,
0.02028854750096798,
-0.004110264126211405,
0.44339650869369507,
0.029752911999821663,
0.09550309926271439,
0.21300269663333893,
-0.21997509896755219,
0.13369622826576233,
-0.375640869140625,
0.5139334797859192,
0.10648046433925629,
0.07441432029008865,
0.01315309014171362,
0.28143247961997986,
-0.0773930773139,
0.2487219125032425,
0.07653298228979111,
-0.4020431339740753,
-0.02467898651957512,
0.2570069134235382,
0.08728697150945663,
-0.20857113599777222,
0.019390402361750603,
-0.08305224031209946,
0.20487527549266815,
0.17634031176567078,
0.06741438060998917,
-0.313208669424057,
-0.44238555431365967,
-0.19390754401683807,
0.15213657915592194,
0.030132822692394257,
-0.04407289996743202,
-0.26878103613853455,
-0.16488215327262878,
-0.36909136176109314,
-0.05619113892316818,
0.004248485900461674,
0.23586849868297577,
0.0792980045080185,
-0.29893964529037476,
0.09816087782382965,
0.06924548745155334,
0.4236551821231842,
-0.4249267578125,
0.15939299762248993,
0.21296489238739014,
0.24467727541923523,
-0.23136407136917114,
0.2541826367378235,
-0.17935992777347565,
0.47117555141448975,
0.10473903268575668,
0.43724167346954346,
0.1511000096797943,
-0.23774632811546326,
0.6846885681152344,
0.07193690538406372,
-0.3373769521713257,
-0.45203346014022827,
-0.02659771777689457,
0.02450542338192463,
0.11694081127643585,
-0.06341994553804398,
-0.09055396914482117,
0.022719603031873703,
0.1799100637435913,
-0.14107437431812286,
-0.40086016058921814,
-0.19653315842151642,
0.0914110541343689,
0.6171839237213135,
0.13901907205581665,
0.21735255420207977,
0.1344597488641739,
0.047044213861227036,
0.341179758310318,
-0.11865383386611938,
0.38928425312042236,
-0.15217390656471252,
0.024892114102840424,
0.2513938844203949,
-0.20638056099414825,
0.38307681679725647,
0.04692068323493004,
0.09323181211948395,
0.005439163651317358,
0.036070216447114944,
0.0741230919957161,
-0.21207979321479797,
0.09298767149448395,
0.07807701826095581,
0.11527217924594879,
-0.4578164219856262,
-0.4340081214904785,
0.48434144258499146,
0.19771809875965118,
-0.16379298269748688,
0.052221257239580154,
-0.006668008863925934,
0.010903215035796165,
0.11410556733608246,
-0.042763788253068924,
0.8920227289199829,
-0.010647931136190891,
0.12148190289735794,
0.3457815945148468,
-0.19009087979793549,
0.3738570213317871,
-0.5357744097709656,
0.19184064865112305,
-0.5254162549972534,
-0.30243393778800964,
-0.0953650027513504,
-0.006931176874786615,
-0.2008134424686432,
0.19379423558712006,
-0.04543561488389969,
-0.15379950404167175,
0.3362388014793396,
-0.12008588761091232,
0.050878752022981644,
0.13049183785915375,
0.11866868287324905,
-0.006361148785799742,
-0.4313637912273407,
0.1407407969236374,
0.14195042848587036,
-0.3373495638370514,
-0.08385179936885834,
-0.05874042585492134,
0.2201240211725235,
0.07420455664396286,
-0.1448047161102295,
-0.022306961938738823,
0.0548369437456131,
0.11842034012079239,
-0.03660013526678085,
-0.3705537021160126,
0.048654183745384216,
0.38190510869026184,
-0.13436496257781982,
0.05288179963827133,
0.01937098614871502,
-0.079473115503788,
-0.14410802721977234,
0.08981285989284515,
0.1492205411195755,
0.33331406116485596,
0.39968523383140564,
-0.13230572640895844,
-0.0019239264074712992,
0.3348599672317505,
0.1596515029668808,
-0.04543336480855942,
-0.10035061091184616,
-0.02032151073217392,
0.07155441492795944,
-0.13615965843200684,
0.15141461789608002,
0.07231608778238297,
0.028633994981646538,
0.03112630918622017,
0.16586163640022278,
0.04882904887199402,
0.0822368785738945,
0.27990904450416565,
0.18611742556095123,
-0.11943128705024719,
0.0843677669763565,
0.15167367458343506,
0.2239636927843094,
0.02948651649057865,
0.13850846886634827,
0.18868760764598846,
-0.13347481191158295,
-0.3703886866569519,
0.18942943215370178,
-0.21597334742546082,
-0.22371076047420502,
0.04457246884703636,
-0.049663785845041275,
-0.06132412701845169,
0.29721686244010925,
0.004164615646004677,
-0.014351596124470234,
0.0714174285531044,
-0.3277422785758972,
-0.31520721316337585,
-0.42706072330474854,
0.01311413198709488,
-0.009216764010488987,
0.40673771500587463,
0.026483362540602684,
-0.04771639406681061,
-0.1719469577074051,
-0.15041528642177582,
-0.3740178942680359,
-0.25936228036880493,
-0.04233524948358536,
0.0052070533856749535,
-0.21675613522529602,
0.12159566581249237,
-0.20937220752239227,
0.050598423928022385,
0.15650683641433716,
-0.05207530036568642,
-0.2590884864330292,
-0.20261293649673462,
-0.08882889151573181,
0.1296793669462204,
0.1815401315689087,
-0.17582090198993683,
-0.06157945841550827,
-0.13780786097049713,
-0.31203246116638184,
0.11177918314933777,
-0.1936579793691635,
-0.3870154917240143,
-0.07495301961898804,
0.06047048792243004,
-0.28092461824417114,
-0.1610359102487564,
0.08020182698965073,
0.075218066573143,
0.2701864540576935,
0.32265743613243103,
0.044693637639284134,
0.24960219860076904,
-0.0066657643765211105,
-0.10932514071464539,
0.01027013175189495,
0.20263145864009857,
0.08683238923549652,
-0.29264572262763977,
0.10410001873970032,
-0.07529065757989883,
0.19852639734745026,
-0.1871177852153778,
0.4081389009952545,
0.2553587555885315,
-0.0025483383797109127,
-0.08470505475997925,
0.36938679218292236,
0.24935857951641083,
-0.31948530673980713,
0.035349246114492416,
0.28592923283576965,
-0.14091016352176666,
0.2051682025194168,
0.04141414910554886,
-0.2288970947265625,
0.0002497345849405974,
0.4164622128009796,
-0.04819376766681671,
0.16559980809688568,
-0.44292718172073364,
0.07048404961824417,
0.2857668697834015,
-0.32597437500953674,
-0.031907837837934494,
0.16832491755485535,
0.35991036891937256,
0.29886287450790405,
0.7665947675704956,
-0.055162638425827026,
0.10014167428016663,
-0.14815150201320648,
0.015415295027196407,
-0.05577175319194794,
-0.021539563313126564,
-0.18114733695983887,
0.13501165807247162,
-0.2848283648490906,
0.06772693246603012,
0.11551528424024582,
0.1680193990468979,
0.08632799983024597,
0.07048175483942032,
-0.4535359740257263,
0.18640010058879852,
-0.09990757703781128,
-0.04018150642514229,
-0.4143790006637573,
-0.2859737277030945,
-0.0343613401055336,
0.13397270441055298,
-0.21045003831386566,
0.11698757112026215,
-0.3556322157382965,
0.1303723305463791,
0.27545157074928284,
-0.23847337067127228,
0.1823250949382782,
0.06387010216712952,
0.1404828131198883,
-0.2863651514053345,
0.08936187624931335,
0.24652433395385742,
0.12090360373258591,
0.04996611177921295,
0.18830929696559906,
0.11439170688390732,
0.12061302363872528,
0.12357022613286972,
-0.08134070783853531,
-0.1744111031293869,
-0.19189850986003876,
-0.2826624810695648,
0.033452168107032776,
0.3265140652656555,
-0.0883408710360527,
0.3169950246810913,
0.12614814937114716,
-0.09387969970703125,
0.3831624388694763,
0.1165720596909523,
0.1696804016828537,
-0.0403042770922184,
-0.0027291812002658844,
0.03124646469950676,
-0.14662453532218933,
0.04779151827096939,
-0.33387625217437744,
-0.26402273774147034,
0.010969428345561028,
0.416288286447525,
-0.0042786747217178345,
0.1832575500011444,
-0.20661593973636627,
0.10697561502456665,
0.18587836623191833,
0.49998727440834045,
0.23717370629310608,
0.19661933183670044,
0.25413304567337036,
-0.5844305157661438,
-0.4856134355068207,
0.03839443624019623,
0.18258163332939148,
-0.45319026708602905,
-0.1657804250717163,
0.17319825291633606,
0.05823527276515961,
0.1399102807044983,
0.19454066455364227,
0.4271455407142639,
0.14715245366096497,
0.026013780385255814,
-0.14844577014446259,
-0.18154576420783997,
-0.007899519987404346,
0.20410898327827454,
-0.19209712743759155,
-0.10236989706754684,
-0.02766350470483303,
-0.2376452088356018,
0.16815553605556488,
-0.3729294240474701,
0.4197744131088257,
-0.19294781982898712,
0.38724005222320557,
0.03636416047811508,
-0.040460165590047836,
0.5734239220619202,
0.07321909070014954,
0.1258220225572586,
-0.26294124126434326,
-0.13727425038814545,
-0.31082120537757874,
0.14172430336475372,
0.3383477032184601,
0.12541866302490234,
-0.1507769078016281,
0.022779101505875587,
0.23334267735481262,
-0.3040620684623718,
-0.015787499025464058,
0.2649933993816376,
0.03480519354343414,
0.10959307104349136,
-0.14538906514644623,
0.02051473967730999,
0.304952472448349,
0.1733381301164627,
0.01960846595466137,
-0.009721252135932446,
0.15086953341960907,
-0.18434233963489532,
-0.03284211829304695,
-0.49666842818260193,
-0.11239168047904968,
0.16709870100021362,
-0.16845718026161194,
-0.2608024477958679,
0.07934962958097458,
-0.24109041690826416,
0.0772465243935585,
0.322997123003006,
-0.26153361797332764,
0.24173641204833984,
0.5637663006782532,
0.06809122860431671,
-0.023836497217416763,
-0.08800811320543289,
0.04110643267631531,
0.27114611864089966,
-0.364897221326828,
-0.13327349722385406,
-0.1511785238981247
] |
https://github.com/huggingface/datasets/issues/3186
|
Dataset viewer for nli_tr
|
Apparently there is an issue with the data source URLs: Server Not Found
- https://tabilab.cmpe.boun.edu.tr/datasets/nli_datasets/snli_tr_1.0.zip
We are contacting the authors to ask them:
@e-budur you are one of the authors: are you aware of the issue with the URLs of your data ?
|
## Dataset viewer issue for '*nli_tr*'
**Link:** https://huggingface.co/datasets/nli_tr
Hello,
Thank you for the new dataset preview feature that will help the users to view the datasets online.
We just noticed that the dataset viewer widget in the `nli_tr` dataset shows the error below. The error must be due to a temporary problem that may have blocked access to the dataset through the dataset viewer. But the dataset is currently accessible through the link in the error message. May we kindly ask if it would be possible to rerun the job so that it can access the dataset for the dataset viewer function?
Thank you.
Emrah
------------------------------------------
Server Error
Status code: 404
Exception: FileNotFoundError
Message: [Errno 2] No such file or directory: 'zip://snli_tr_1.0_train.jsonl::https://tabilab.cmpe.boun.edu.tr/datasets/nli_datasets/snli_tr_1.0.zip
------------------------------------------
Am I the one who added this dataset ? Yes
| 43 |
Dataset viewer for nli_tr
|
[
-0.5377970337867737,
-0.04181884601712227,
-0.10882502049207687,
0.3195287883281708,
-0.013944737613201141,
0.040661416947841644,
0.16296851634979248,
0.39518967270851135,
-0.17110058665275574,
0.13351479172706604,
-0.24302801489830017,
0.4669746160507202,
-0.29185494780540466,
0.20772838592529297,
0.27851611375808716,
-0.06476873904466629,
0.007807649206370115,
0.5077264904975891,
-0.28553086519241333,
0.10530491918325424,
-0.050740644335746765,
0.04798218980431557,
-0.08247663080692291,
0.12993298470973969,
-0.056524619460105896,
-0.19151371717453003,
-0.05403765290975571,
0.0040560015477240086,
-0.4531390368938446,
-0.3478643000125885,
-0.00106332590803504,
0.2866811454296112,
0.4443065822124481,
0.08084488660097122,
-0.00010770340304588899,
0.16010969877243042,
0.14487570524215698,
-0.12110807001590729,
-0.27711331844329834,
0.2360096275806427,
-0.4658656418323517,
-0.09481912851333618,
0.3358832597732544,
-0.28964516520500183,
-0.10091152042150497,
-0.29357248544692993,
0.3000747263431549,
-0.23000116646289825,
0.08624513447284698,
0.04559703916311264,
0.23166365921497345,
0.43380582332611084,
-0.1983126550912857,
0.2231980264186859,
-0.0891517847776413,
0.1654827743768692,
-0.24234843254089355,
-0.14200668036937714,
-0.05662701651453972,
0.025552036240696907,
-0.37183114886283875,
0.40958723425865173,
-0.07453089952468872,
-0.22323478758335114,
0.18211466073989868,
-0.12630173563957214,
0.08211727440357208,
-0.05885268375277519,
0.09747251868247986,
0.2857271134853363,
0.5934404730796814,
-0.2583634555339813,
-0.06711554527282715,
0.2538265585899353,
-0.06329597532749176,
-0.14637607336044312,
-0.010024919174611568,
0.17745427787303925,
-0.25157430768013,
0.21938426792621613,
-0.23767675459384918,
0.02813483029603958,
-0.535624623298645,
0.02873246930539608,
-0.39619284868240356,
0.38188254833221436,
-0.05687260627746582,
-0.0656518042087555,
0.2652755081653595,
-0.24171152710914612,
0.6792605519294739,
0.2126052975654602,
-0.04160785675048828,
0.1803167164325714,
-0.1935529112815857,
-0.33068111538887024,
0.5152836441993713,
0.24864733219146729,
-0.22348952293395996,
0.2577165961265564,
0.363853394985199,
0.2887420654296875,
-0.24383287131786346,
-0.028602223843336105,
0.2070426344871521,
-0.22436471283435822,
0.05912336707115173,
0.3402726948261261,
0.3285958468914032,
-0.1748497188091278,
0.07694239169359207,
0.013745795004069805,
-0.1392974555492401,
-0.013077987357974052,
-0.20135816931724548,
-0.10762687027454376,
-0.04289931058883667,
-0.0883040726184845,
-0.1741882711648941,
-0.15080437064170837,
-0.09038382768630981,
-0.048269327729940414,
0.25981828570365906,
0.2514471709728241,
0.0034217145293951035,
-0.05343327671289444,
-0.042788125574588776,
0.019053205847740173,
-0.2224387228488922,
-0.2687849998474121,
-0.2453128546476364,
-0.11362574994564056,
0.0033576174173504114,
-0.3038771152496338,
0.20768395066261292,
0.03954074904322624,
0.08335090428590775,
-0.3260119557380676,
-0.340822696685791,
0.10664356499910355,
0.199396550655365,
-0.060811594128608704,
0.2009614109992981,
0.11488914489746094,
0.11864124238491058,
-0.2932867407798767,
-0.06344925612211227,
-0.3667667806148529,
-0.004335557576268911,
0.16248679161071777,
0.2747265100479126,
-0.34295761585235596,
-0.280394047498703,
0.20115342736244202,
-0.10701742768287659,
-0.3121678829193115,
0.5044227242469788,
0.2599102854728699,
-0.2301436811685562,
-0.2839844524860382,
-0.14623691141605377,
-0.10277426242828369,
-0.17766262590885162,
-0.09522556513547897,
0.2919274568557739,
0.32056936621665955,
-0.38243746757507324,
0.06657133996486664,
-0.21179810166358948,
-0.4191228449344635,
-0.11576465517282486,
0.0978991910815239,
-0.013492925092577934,
-0.029135996475815773,
-0.16289383172988892,
0.13280239701271057,
0.9622718095779419,
-0.24892956018447876,
-0.2824777364730835,
0.2416340708732605,
-0.07806511968374252,
-0.34702399373054504,
0.33634430170059204,
0.5233315825462341,
0.10630649328231812,
-0.2383914589881897,
-0.012435326352715492,
0.22173544764518738,
-0.042150434106588364,
0.023905910551548004,
-0.06790560483932495,
-0.004100860096514225,
0.49112868309020996,
0.2995443642139435,
0.016901811584830284,
-0.036557793617248535,
0.044946182519197464,
0.1004285141825676,
0.6832816004753113,
-0.05446147546172142,
-0.01580558717250824,
-0.21558043360710144,
0.07270565629005432,
-0.14329758286476135,
-0.06158978492021561,
-0.2721869945526123,
-0.15410250425338745,
-0.3005102276802063,
-0.004894252400845289,
0.223943829536438,
-0.10192307829856873,
-0.1529807597398758,
-0.0790853276848793,
0.08901207894086838,
-0.22921481728553772,
0.17325666546821594,
0.2778950035572052,
0.05247783288359642,
0.04560406506061554,
0.32169124484062195,
-0.1512461155653,
-0.19896402955055237,
-0.2826247215270996,
-0.016301274299621582,
0.0713798925280571,
0.25882309675216675,
0.07678984850645065,
0.1886717528104782,
0.1990978717803955,
0.36204054951667786,
-0.07041534036397934,
-0.034998826682567596,
-0.005825028754770756,
0.012251077219843864,
-0.00831118319183588,
0.15560024976730347,
0.13595564663410187,
0.2420242577791214,
-0.020883211866021156,
-0.49132221937179565,
0.40686360001564026,
-0.00034448024234734476,
-0.057787880301475525,
0.07720977067947388,
-0.7090044617652893,
0.0816681832075119,
-0.13113100826740265,
-0.041515108197927475,
0.16693435609340668,
0.1138087660074234,
0.26023948192596436,
-0.025594843551516533,
-0.1322397142648697,
-0.3144124150276184,
0.051074881106615067,
0.13962912559509277,
0.008782589808106422,
0.06140555813908577,
-0.6114163398742676,
0.3603317439556122,
0.45986273884773254,
-0.02505122683942318,
0.008579554967582226,
-0.14597457647323608,
-0.18480145931243896,
0.014578636735677719,
0.14154140651226044,
0.5186902284622192,
0.0665803998708725,
0.23917131125926971,
0.22733019292354584,
0.038522642105817795,
-0.2376338541507721,
-0.22179095447063446,
0.13196885585784912,
-0.016128774732351303,
-0.06172693148255348,
0.18334342539310455,
0.04737567529082298,
-0.23147141933441162,
-0.5097488164901733,
-0.12846209108829498,
-0.09759826213121414,
0.2648729383945465,
0.0018405067967250943,
-0.0061431583017110825,
-0.29548412561416626,
-1.0087864398956299,
-0.1719362884759903,
0.12472737580537796,
0.08338544517755508,
-0.3777739703655243,
0.24754303693771362,
-0.0020449927542358637,
0.038078125566244125,
0.07143835723400116,
-0.46986791491508484,
0.18870092928409576,
0.0350123755633831,
0.3216375410556793,
-0.17099381983280182,
-0.32030773162841797,
-0.2273118644952774,
0.21777953207492828,
0.40062931180000305,
0.30290359258651733,
0.285236120223999,
-0.29296210408210754,
0.5623453855514526,
-0.2813093960285187,
-0.41522493958473206,
0.0779503732919693,
0.21080529689788818,
-0.2594259977340698,
0.02764006331562996,
0.08514894545078278,
-0.10546979308128357,
0.10795846581459045,
-0.01690177246928215,
0.006833707448095083,
-0.052298396825790405,
0.10107789188623428,
-0.014999429695308208,
-0.020612159743905067,
0.041546531021595,
-0.3211619555950165,
-0.35500457882881165,
-0.4197494089603424,
0.06790224462747574,
0.14573884010314941,
0.24049726128578186,
0.2177734524011612,
-0.05006488040089607,
0.06427836418151855,
0.13341489434242249,
0.10545249283313751,
0.021338924765586853,
0.15748633444309235,
0.1579507291316986,
-0.33657610416412354,
-0.34254351258277893,
-0.0412006750702858,
0.05538351833820343,
0.20477809011936188,
0.18291613459587097,
-0.616008460521698,
0.17967264354228973,
0.09009859710931778,
-0.07821851223707199,
0.1309317648410797,
-0.08909207582473755,
0.268354207277298,
0.3108116388320923,
0.009814505465328693,
-0.006897302344441414,
-0.025648083537817,
-0.026047205552458763,
-0.18833735585212708,
0.02028854750096798,
-0.004110264126211405,
0.44339650869369507,
0.029752911999821663,
0.09550309926271439,
0.21300269663333893,
-0.21997509896755219,
0.13369622826576233,
-0.375640869140625,
0.5139334797859192,
0.10648046433925629,
0.07441432029008865,
0.01315309014171362,
0.28143247961997986,
-0.0773930773139,
0.2487219125032425,
0.07653298228979111,
-0.4020431339740753,
-0.02467898651957512,
0.2570069134235382,
0.08728697150945663,
-0.20857113599777222,
0.019390402361750603,
-0.08305224031209946,
0.20487527549266815,
0.17634031176567078,
0.06741438060998917,
-0.313208669424057,
-0.44238555431365967,
-0.19390754401683807,
0.15213657915592194,
0.030132822692394257,
-0.04407289996743202,
-0.26878103613853455,
-0.16488215327262878,
-0.36909136176109314,
-0.05619113892316818,
0.004248485900461674,
0.23586849868297577,
0.0792980045080185,
-0.29893964529037476,
0.09816087782382965,
0.06924548745155334,
0.4236551821231842,
-0.4249267578125,
0.15939299762248993,
0.21296489238739014,
0.24467727541923523,
-0.23136407136917114,
0.2541826367378235,
-0.17935992777347565,
0.47117555141448975,
0.10473903268575668,
0.43724167346954346,
0.1511000096797943,
-0.23774632811546326,
0.6846885681152344,
0.07193690538406372,
-0.3373769521713257,
-0.45203346014022827,
-0.02659771777689457,
0.02450542338192463,
0.11694081127643585,
-0.06341994553804398,
-0.09055396914482117,
0.022719603031873703,
0.1799100637435913,
-0.14107437431812286,
-0.40086016058921814,
-0.19653315842151642,
0.0914110541343689,
0.6171839237213135,
0.13901907205581665,
0.21735255420207977,
0.1344597488641739,
0.047044213861227036,
0.341179758310318,
-0.11865383386611938,
0.38928425312042236,
-0.15217390656471252,
0.024892114102840424,
0.2513938844203949,
-0.20638056099414825,
0.38307681679725647,
0.04692068323493004,
0.09323181211948395,
0.005439163651317358,
0.036070216447114944,
0.0741230919957161,
-0.21207979321479797,
0.09298767149448395,
0.07807701826095581,
0.11527217924594879,
-0.4578164219856262,
-0.4340081214904785,
0.48434144258499146,
0.19771809875965118,
-0.16379298269748688,
0.052221257239580154,
-0.006668008863925934,
0.010903215035796165,
0.11410556733608246,
-0.042763788253068924,
0.8920227289199829,
-0.010647931136190891,
0.12148190289735794,
0.3457815945148468,
-0.19009087979793549,
0.3738570213317871,
-0.5357744097709656,
0.19184064865112305,
-0.5254162549972534,
-0.30243393778800964,
-0.0953650027513504,
-0.006931176874786615,
-0.2008134424686432,
0.19379423558712006,
-0.04543561488389969,
-0.15379950404167175,
0.3362388014793396,
-0.12008588761091232,
0.050878752022981644,
0.13049183785915375,
0.11866868287324905,
-0.006361148785799742,
-0.4313637912273407,
0.1407407969236374,
0.14195042848587036,
-0.3373495638370514,
-0.08385179936885834,
-0.05874042585492134,
0.2201240211725235,
0.07420455664396286,
-0.1448047161102295,
-0.022306961938738823,
0.0548369437456131,
0.11842034012079239,
-0.03660013526678085,
-0.3705537021160126,
0.048654183745384216,
0.38190510869026184,
-0.13436496257781982,
0.05288179963827133,
0.01937098614871502,
-0.079473115503788,
-0.14410802721977234,
0.08981285989284515,
0.1492205411195755,
0.33331406116485596,
0.39968523383140564,
-0.13230572640895844,
-0.0019239264074712992,
0.3348599672317505,
0.1596515029668808,
-0.04543336480855942,
-0.10035061091184616,
-0.02032151073217392,
0.07155441492795944,
-0.13615965843200684,
0.15141461789608002,
0.07231608778238297,
0.028633994981646538,
0.03112630918622017,
0.16586163640022278,
0.04882904887199402,
0.0822368785738945,
0.27990904450416565,
0.18611742556095123,
-0.11943128705024719,
0.0843677669763565,
0.15167367458343506,
0.2239636927843094,
0.02948651649057865,
0.13850846886634827,
0.18868760764598846,
-0.13347481191158295,
-0.3703886866569519,
0.18942943215370178,
-0.21597334742546082,
-0.22371076047420502,
0.04457246884703636,
-0.049663785845041275,
-0.06132412701845169,
0.29721686244010925,
0.004164615646004677,
-0.014351596124470234,
0.0714174285531044,
-0.3277422785758972,
-0.31520721316337585,
-0.42706072330474854,
0.01311413198709488,
-0.009216764010488987,
0.40673771500587463,
0.026483362540602684,
-0.04771639406681061,
-0.1719469577074051,
-0.15041528642177582,
-0.3740178942680359,
-0.25936228036880493,
-0.04233524948358536,
0.0052070533856749535,
-0.21675613522529602,
0.12159566581249237,
-0.20937220752239227,
0.050598423928022385,
0.15650683641433716,
-0.05207530036568642,
-0.2590884864330292,
-0.20261293649673462,
-0.08882889151573181,
0.1296793669462204,
0.1815401315689087,
-0.17582090198993683,
-0.06157945841550827,
-0.13780786097049713,
-0.31203246116638184,
0.11177918314933777,
-0.1936579793691635,
-0.3870154917240143,
-0.07495301961898804,
0.06047048792243004,
-0.28092461824417114,
-0.1610359102487564,
0.08020182698965073,
0.075218066573143,
0.2701864540576935,
0.32265743613243103,
0.044693637639284134,
0.24960219860076904,
-0.0066657643765211105,
-0.10932514071464539,
0.01027013175189495,
0.20263145864009857,
0.08683238923549652,
-0.29264572262763977,
0.10410001873970032,
-0.07529065757989883,
0.19852639734745026,
-0.1871177852153778,
0.4081389009952545,
0.2553587555885315,
-0.0025483383797109127,
-0.08470505475997925,
0.36938679218292236,
0.24935857951641083,
-0.31948530673980713,
0.035349246114492416,
0.28592923283576965,
-0.14091016352176666,
0.2051682025194168,
0.04141414910554886,
-0.2288970947265625,
0.0002497345849405974,
0.4164622128009796,
-0.04819376766681671,
0.16559980809688568,
-0.44292718172073364,
0.07048404961824417,
0.2857668697834015,
-0.32597437500953674,
-0.031907837837934494,
0.16832491755485535,
0.35991036891937256,
0.29886287450790405,
0.7665947675704956,
-0.055162638425827026,
0.10014167428016663,
-0.14815150201320648,
0.015415295027196407,
-0.05577175319194794,
-0.021539563313126564,
-0.18114733695983887,
0.13501165807247162,
-0.2848283648490906,
0.06772693246603012,
0.11551528424024582,
0.1680193990468979,
0.08632799983024597,
0.07048175483942032,
-0.4535359740257263,
0.18640010058879852,
-0.09990757703781128,
-0.04018150642514229,
-0.4143790006637573,
-0.2859737277030945,
-0.0343613401055336,
0.13397270441055298,
-0.21045003831386566,
0.11698757112026215,
-0.3556322157382965,
0.1303723305463791,
0.27545157074928284,
-0.23847337067127228,
0.1823250949382782,
0.06387010216712952,
0.1404828131198883,
-0.2863651514053345,
0.08936187624931335,
0.24652433395385742,
0.12090360373258591,
0.04996611177921295,
0.18830929696559906,
0.11439170688390732,
0.12061302363872528,
0.12357022613286972,
-0.08134070783853531,
-0.1744111031293869,
-0.19189850986003876,
-0.2826624810695648,
0.033452168107032776,
0.3265140652656555,
-0.0883408710360527,
0.3169950246810913,
0.12614814937114716,
-0.09387969970703125,
0.3831624388694763,
0.1165720596909523,
0.1696804016828537,
-0.0403042770922184,
-0.0027291812002658844,
0.03124646469950676,
-0.14662453532218933,
0.04779151827096939,
-0.33387625217437744,
-0.26402273774147034,
0.010969428345561028,
0.416288286447525,
-0.0042786747217178345,
0.1832575500011444,
-0.20661593973636627,
0.10697561502456665,
0.18587836623191833,
0.49998727440834045,
0.23717370629310608,
0.19661933183670044,
0.25413304567337036,
-0.5844305157661438,
-0.4856134355068207,
0.03839443624019623,
0.18258163332939148,
-0.45319026708602905,
-0.1657804250717163,
0.17319825291633606,
0.05823527276515961,
0.1399102807044983,
0.19454066455364227,
0.4271455407142639,
0.14715245366096497,
0.026013780385255814,
-0.14844577014446259,
-0.18154576420783997,
-0.007899519987404346,
0.20410898327827454,
-0.19209712743759155,
-0.10236989706754684,
-0.02766350470483303,
-0.2376452088356018,
0.16815553605556488,
-0.3729294240474701,
0.4197744131088257,
-0.19294781982898712,
0.38724005222320557,
0.03636416047811508,
-0.040460165590047836,
0.5734239220619202,
0.07321909070014954,
0.1258220225572586,
-0.26294124126434326,
-0.13727425038814545,
-0.31082120537757874,
0.14172430336475372,
0.3383477032184601,
0.12541866302490234,
-0.1507769078016281,
0.022779101505875587,
0.23334267735481262,
-0.3040620684623718,
-0.015787499025464058,
0.2649933993816376,
0.03480519354343414,
0.10959307104349136,
-0.14538906514644623,
0.02051473967730999,
0.304952472448349,
0.1733381301164627,
0.01960846595466137,
-0.009721252135932446,
0.15086953341960907,
-0.18434233963489532,
-0.03284211829304695,
-0.49666842818260193,
-0.11239168047904968,
0.16709870100021362,
-0.16845718026161194,
-0.2608024477958679,
0.07934962958097458,
-0.24109041690826416,
0.0772465243935585,
0.322997123003006,
-0.26153361797332764,
0.24173641204833984,
0.5637663006782532,
0.06809122860431671,
-0.023836497217416763,
-0.08800811320543289,
0.04110643267631531,
0.27114611864089966,
-0.364897221326828,
-0.13327349722385406,
-0.1511785238981247
] |
https://github.com/huggingface/datasets/issues/3185
|
7z dataset preview not implemented?
|
It's a bug in the dataset viewer: the dataset cannot be downloaded in streaming mode, but since the dataset is relatively small, the dataset viewer should have fallback to normal mode. Working on a fix.
|
## Dataset viewer issue for dataset 'samsum'
**Link:** https://huggingface.co/datasets/samsum
Server Error
Status code: 400
Exception: NotImplementedError
Message: Extraction protocol '7z' for file at 'https://arxiv.org/src/1911.12237v2/anc/corpus.7z' is not implemented yet
| 35 |
7z dataset preview not implemented?
|
[
-0.6916327476501465,
-0.2632673382759094,
-0.11541757732629776,
-0.03356178104877472,
-0.19399061799049377,
-0.04668846353888512,
0.4967784285545349,
0.37725794315338135,
0.2710930109024048,
0.18274877965450287,
-0.1343313753604889,
0.36949726939201355,
-0.1334027498960495,
0.14981956779956818,
-0.15853552520275116,
0.04013058543205261,
0.13040000200271606,
0.48772376775741577,
-0.2188226580619812,
0.04626277834177017,
-0.21101398766040802,
0.08292589336633682,
-0.49968263506889343,
-0.10869526863098145,
0.03223298117518425,
-0.1339942216873169,
-0.17725540697574615,
0.04036443680524826,
-0.3788902163505554,
-0.08998722583055496,
-0.035550396889448166,
0.36725080013275146,
0.296774685382843,
0.16854731738567352,
-0.00011310722038615495,
0.0894603356719017,
0.37427589297294617,
0.07744938135147095,
-0.04360872507095337,
0.22950877249240875,
-0.25497549772262573,
-0.290696382522583,
0.02009166032075882,
-0.2009212225675583,
-0.09970997273921967,
-0.2878541648387909,
0.037385862320661545,
-0.1969430297613144,
0.40949034690856934,
0.04491139575839043,
0.23941409587860107,
0.1987147331237793,
-0.24584439396858215,
-0.2519274055957794,
0.0691147893667221,
0.12336180359125137,
-0.44864991307258606,
-0.20832207798957825,
0.2944490909576416,
0.19879375398159027,
-0.32256844639778137,
0.3177216649055481,
0.3562319278717041,
-0.07310060411691666,
-0.22733540832996368,
0.09334588795900345,
0.3826373815536499,
-0.2171742022037506,
0.03125283494591713,
0.050856899470090866,
0.6491489410400391,
0.06655596196651459,
-0.34969815611839294,
0.051391467452049255,
-0.129293754696846,
-0.1510736495256424,
-0.1720135658979416,
0.05950474366545677,
-0.23359785974025726,
0.24286116659641266,
-0.47135430574417114,
-0.244219571352005,
-0.013220417313277721,
0.09138798713684082,
-0.08936892449855804,
0.5334832072257996,
-0.2608698904514313,
-0.011090866290032864,
-0.0233776718378067,
0.14695559442043304,
0.5935202240943909,
-0.17801761627197266,
-0.23488347232341766,
-0.05916357785463333,
0.0574338398873806,
-0.23421208560466766,
0.0932106226682663,
-0.08297356963157654,
0.07847527414560318,
0.11079131811857224,
0.3233182430267334,
0.5328024625778198,
0.03763526305556297,
-0.05619433894753456,
0.2282329797744751,
0.23001761734485626,
0.256693571805954,
0.10518170893192291,
0.3619341552257538,
0.35630300641059875,
0.4414713680744171,
0.026465917006134987,
-0.2140403687953949,
0.04572314769029617,
-0.046212922781705856,
-0.23828710615634918,
-0.009537910111248493,
-0.028072571381926537,
-0.1725234091281891,
-0.16974422335624695,
0.10180943459272385,
0.044163260608911514,
0.008202055469155312,
0.2937421500682831,
-0.2738207280635834,
-0.33488455414772034,
-0.1823796182870865,
0.26879453659057617,
-0.08898138999938965,
-0.28056061267852783,
-0.3129889965057373,
-0.034788355231285095,
-0.3015376329421997,
0.14071300625801086,
0.12283249944448471,
0.30679792165756226,
0.2538212239742279,
-0.03138686344027519,
-0.007565029431134462,
0.12479070574045181,
-0.013676788657903671,
0.08595262467861176,
0.17899230122566223,
0.2947154641151428,
-0.005670152138918638,
0.0888000875711441,
0.08346609026193619,
0.18542452156543732,
-0.14537383615970612,
0.25632524490356445,
0.04296248033642769,
-0.16164781153202057,
-0.34531211853027344,
0.11935178935527802,
-0.32576072216033936,
-0.036580272018909454,
-0.07734394073486328,
0.21954737603664398,
-0.010324489325284958,
-0.12965916097164154,
-0.08146996051073074,
0.011778973042964935,
-0.28710776567459106,
0.022658400237560272,
0.2996782958507538,
0.15613752603530884,
-0.412600576877594,
0.04239305853843689,
-0.693046510219574,
-0.18021661043167114,
0.579203724861145,
-0.12196937948465347,
-0.09085725992918015,
-0.07659304887056351,
-0.43771544098854065,
0.2161988615989685,
0.6502823233604431,
-0.09392829984426498,
-0.5020539164543152,
0.057471320033073425,
0.06711100041866302,
0.11587906628847122,
-0.030127065256237984,
0.10245194286108017,
0.050534456968307495,
-0.021975252777338028,
-0.1364748626947403,
-0.27439746260643005,
0.12027101963758469,
-0.03730890899896622,
-0.1546657532453537,
-0.2454947978258133,
0.26243481040000916,
0.2837219536304474,
0.34345635771751404,
0.2351391464471817,
0.3679039478302002,
-0.03125491365790367,
0.3339247405529022,
0.25133639574050903,
0.1682346761226654,
-0.05134422332048416,
0.18904556334018707,
-0.01562686264514923,
-0.0072793737053871155,
0.05965714529156685,
-0.04513852670788765,
0.0863337442278862,
-0.032452844083309174,
0.0016945898532867432,
0.021452609449625015,
-0.16686949133872986,
-0.12547080218791962,
0.10578127205371857,
-0.28655001521110535,
-0.4173092842102051,
0.2269076555967331,
0.19521811604499817,
-0.062235865741968155,
-0.24131286144256592,
-0.08279231190681458,
0.1732761561870575,
-0.185762420296669,
-0.19621165096759796,
-0.07513133436441422,
0.13509197533130646,
-0.137984499335289,
-0.22161807119846344,
0.04695037007331848,
0.07275959849357605,
-0.058421239256858826,
-0.2530671954154968,
0.16498839855194092,
0.19329851865768433,
0.1512434333562851,
-0.36448878049850464,
0.20955204963684082,
-0.04722939804196358,
-0.028608787804841995,
-0.16027042269706726,
0.4418850541114807,
-0.2403619885444641,
-0.06249977648258209,
0.14015771448612213,
-0.2479792684316635,
0.27685409784317017,
0.15102292597293854,
-0.19481819868087769,
-0.06299252063035965,
0.014660883694887161,
0.2949499189853668,
0.17212440073490143,
-0.19909238815307617,
-0.4581284523010254,
-0.30993732810020447,
-0.17271196842193604,
-0.4544076919555664,
-0.09048982709646225,
-0.19868990778923035,
0.2629619538784027,
0.6367974877357483,
0.18835696578025818,
0.1943005919456482,
-0.05486566945910454,
-0.08605363219976425,
-0.3575303852558136,
0.3566613495349884,
-0.043579742312431335,
0.31785517930984497,
0.1812717318534851,
0.30786794424057007,
-0.03231021389365196,
-0.0011455059284344316,
0.0036634118296205997,
-0.09439355880022049,
0.10282152146100998,
0.1676570326089859,
0.09998290240764618,
0.018222367390990257,
-0.19281385838985443,
-0.1748710572719574,
-0.04377454146742821,
0.2645585834980011,
-0.07487654685974121,
-0.07439638674259186,
-0.13881458342075348,
-0.4419011175632477,
-0.2559661567211151,
0.16954194009304047,
0.11271072924137115,
0.14108645915985107,
-0.4113490879535675,
0.12497523427009583,
0.2502365708351135,
0.12426715344190598,
0.3605233430862427,
-0.4524785578250885,
0.38613682985305786,
0.03558286651968956,
0.24070386588573456,
-0.12783680856227875,
0.10297044366598129,
0.028600264340639114,
0.16123917698860168,
-0.22421851754188538,
0.042765062302351,
0.18188217282295227,
-0.049585528671741486,
0.11547093838453293,
-0.5881227254867554,
-0.27100908756256104,
0.33590152859687805,
0.10412009060382843,
0.25238853693008423,
-0.021346749737858772,
0.004170169588178396,
-0.023701367899775505,
0.022357191890478134,
0.03973720967769623,
-0.03228167071938515,
-0.3216334283351898,
-0.059212226420640945,
-0.15350642800331116,
-0.2488347440958023,
-0.0794987827539444,
-0.14098046720027924,
-0.24196098744869232,
-0.4645701050758362,
-0.09451750665903091,
0.08386017382144928,
0.049150049686431885,
0.2773115634918213,
0.06165042147040367,
-0.1331702172756195,
-0.12375171482563019,
0.004779485985636711,
-0.176637664437294,
-0.2577248811721802,
0.419475793838501,
-0.5784074664115906,
-0.45256516337394714,
0.07003124803304672,
-0.15788039565086365,
0.29326754808425903,
0.2831299602985382,
-0.237877756357193,
0.07098758220672607,
-0.18352775275707245,
0.4360063970088959,
0.15943710505962372,
-0.11397040635347366,
0.5773671865463257,
-0.0011559294071048498,
-0.19861313700675964,
-0.24671286344528198,
0.12287279963493347,
0.008444728329777718,
-0.21192306280136108,
0.3418242633342743,
-0.025049827992916107,
-0.03543524444103241,
-0.016661690548062325,
0.7565621733665466,
0.30309799313545227,
-0.12361960858106613,
0.41229093074798584,
-0.19195903837680817,
0.4392630457878113,
-0.31510356068611145,
-0.026319144293665886,
-0.11110465228557587,
-0.055450644344091415,
0.36678460240364075,
0.43219298124313354,
-0.06335660070180893,
-0.5125698447227478,
-0.14169374108314514,
0.1036565899848938,
-0.5694624185562134,
-0.1395130753517151,
-0.17851294577121735,
-0.11731021851301193,
0.01987611874938011,
0.1716562956571579,
0.23411522805690765,
-0.15839512646198273,
-0.14601275324821472,
-0.012269764207303524,
0.23697201907634735,
0.08639641106128693,
-0.032113127410411835,
-0.052905190736055374,
0.11456602811813354,
-0.17548628151416779,
0.04653124138712883,
-0.01600562036037445,
0.4662327170372009,
-0.1594512164592743,
-0.3608539402484894,
0.028715111315250397,
-0.11547292768955231,
0.6129409670829773,
-0.39407822489738464,
0.06454433500766754,
0.10764423757791519,
-0.28151756525039673,
-0.0455934964120388,
-0.19870974123477936,
-0.2219109833240509,
0.4133930802345276,
-0.12073224037885666,
0.6917073130607605,
0.28841185569763184,
-0.057485707104206085,
0.36632752418518066,
-0.1549973487854004,
-0.09918058663606644,
-0.10673680901527405,
-0.02057277411222458,
0.09109074622392654,
0.08298667520284653,
-0.3087798058986664,
0.028885571286082268,
-0.02020280808210373,
-0.2674289047718048,
-0.34480544924736023,
-0.09791398048400879,
-0.3235970437526703,
-0.2648218870162964,
0.3898208737373352,
0.035103946924209595,
-0.002909323200583458,
0.3300320506095886,
0.20544959604740143,
-0.04456231743097305,
0.11932837218046188,
0.3385259807109833,
0.3734419047832489,
-0.14621032774448395,
0.49657171964645386,
-0.364467054605484,
0.11461598426103592,
0.19074249267578125,
-0.057428617030382156,
-0.1362917423248291,
-0.14471232891082764,
0.09393148124217987,
-0.33257144689559937,
0.14523983001708984,
0.3396417796611786,
-0.13248898088932037,
-0.28557834029197693,
-0.1543935239315033,
0.16902421414852142,
-0.019512571394443512,
-0.2329782396554947,
0.5171517133712769,
0.007728727534413338,
0.004293630365282297,
-0.14788462221622467,
0.029820863157510757,
0.6230141520500183,
0.06844376027584076,
-0.08937682211399078,
0.07985543459653854,
0.2692738473415375,
0.28878292441368103,
-0.20649239420890808,
0.27275824546813965,
-0.15222181379795074,
-0.725271463394165,
-0.03720468655228615,
-0.0572672076523304,
0.32291969656944275,
0.0815991759300232,
-0.12187457084655762,
-0.07776700705289841,
0.12537819147109985,
-0.1209363266825676,
-0.08360854536294937,
-0.23577289283275604,
-0.13865035772323608,
-0.011157716624438763,
0.16693279147148132,
0.21524164080619812,
0.13604341447353363,
0.20473052561283112,
-0.05772597715258598,
0.06871381402015686,
-0.35086914896965027,
0.08675149828195572,
-0.24237915873527527,
0.22114409506320953,
0.47369876503944397,
0.23172731697559357,
0.025067321956157684,
-0.02539435587823391,
0.13285712897777557,
0.021523479372262955,
0.02787141129374504,
0.19158165156841278,
-0.1367371380329132,
0.09527574479579926,
0.0673488900065422,
-0.1939455270767212,
-0.16847264766693115,
0.2745334506034851,
0.18428921699523926,
-0.1882808953523636,
-0.2882176339626312,
-0.005644623190164566,
-0.01968071237206459,
-0.1568111777305603,
-0.011127260513603687,
-0.27677375078201294,
0.30259469151496887,
0.004641345702111721,
0.2334287464618683,
0.04183541238307953,
0.20792493224143982,
-0.22760939598083496,
0.1400635689496994,
-0.057587504386901855,
-0.03539819270372391,
0.24407482147216797,
0.18018391728401184,
-0.17983239889144897,
-0.11851789057254791,
0.42859962582588196,
-0.08520159125328064,
0.13006332516670227,
0.11788039654493332,
0.2116331309080124,
-0.3072725236415863,
-0.3113139271736145,
0.024489574134349823,
0.2817344069480896,
-0.08134233206510544,
-0.015117825008928776,
-0.33422866463661194,
-0.14499272406101227,
0.08938702195882797,
0.7605264186859131,
-0.037836991250514984,
-0.316557914018631,
-0.31508976221084595,
-0.35129547119140625,
-0.2995545268058777,
0.0504462793469429,
-0.38208329677581787,
0.4343014061450958,
-0.1076093539595604,
-0.3340058922767639,
0.16877435147762299,
-0.026060182601213455,
-0.3356862962245941,
-0.3506450653076172,
-0.09155653417110443,
0.11874473839998245,
-0.046879854053258896,
0.12901514768600464,
0.07959267497062683,
0.05864753574132919,
0.14829088747501373,
0.08804167807102203,
-0.253505140542984,
-0.23232634365558624,
-0.03815654665231705,
0.14966556429862976,
0.10716826468706131,
-0.07158791273832321,
0.22254803776741028,
0.0603412501513958,
-0.5000618100166321,
-0.07930303364992142,
0.21985946595668793,
0.03300604596734047,
0.03039543889462948,
0.10965168476104736,
0.43227264285087585,
-0.30447259545326233,
0.056228626519441605,
-0.01807442493736744,
0.28058958053588867,
0.48152488470077515,
-0.2594611942768097,
0.13604485988616943,
0.0710151419043541,
-0.15494367480278015,
0.05407901480793953,
0.07684049010276794,
-0.05018943175673485,
0.020157590508461,
0.2821119427680969,
-0.16545429825782776,
0.4769971966743469,
-0.11482173949480057,
0.4483434855937958,
0.14039292931556702,
0.07943835109472275,
-0.178914412856102,
0.19572238624095917,
0.15149764716625214,
-0.45569467544555664,
-0.15476234257221222,
0.0178549624979496,
0.11483762413263321,
0.14313775300979614,
0.34197041392326355,
-0.07345657795667648,
0.256519079208374,
0.30570659041404724,
0.00871207844465971,
0.4705502390861511,
-0.15841242671012878,
0.08240357786417007,
0.44900262355804443,
-0.18984757363796234,
0.24243564903736115,
0.28458142280578613,
0.2495039850473404,
0.0019301001448184252,
0.76968914270401,
0.09235011041164398,
0.26785165071487427,
0.13715723156929016,
0.26785391569137573,
-0.01806013472378254,
-0.48218750953674316,
0.2928592264652252,
-0.0076244911178946495,
0.20541316270828247,
0.26044565439224243,
0.02519654855132103,
0.19951608777046204,
-0.025991084054112434,
0.14731477200984955,
-0.37179118394851685,
-0.011358010582625866,
-0.06382369250059128,
0.06692962348461151,
-0.286636620759964,
-0.24892759323120117,
-0.3069506883621216,
0.023224271833896637,
0.09930156171321869,
0.20905667543411255,
0.08830523490905762,
-0.1550874263048172,
-0.13365976512432098,
-0.14702430367469788,
0.3348330855369568,
-0.16197168827056885,
0.001701841247268021,
-0.17383630573749542,
0.0800374299287796,
-0.005405772943049669,
0.1858496516942978,
0.2303081899881363,
0.28840696811676025,
0.1124643087387085,
0.041883423924446106,
0.14858941733837128,
-0.17194610834121704,
0.14653117954730988,
-0.3517211377620697,
-0.2408033311367035,
0.23661457002162933,
0.5456628799438477,
0.07566665858030319,
0.15001413226127625,
0.16069810092449188,
-0.18648120760917664,
0.493764728307724,
0.2653464376926422,
0.13564179837703705,
0.11099829524755478,
0.39098867774009705,
-0.16747239232063293,
-0.2287229597568512,
0.19435898959636688,
-0.14007312059402466,
-0.024970857426524162,
-0.030229071155190468,
-0.06086798757314682,
-0.2764545977115631,
0.03640046343207359,
-0.20426927506923676,
0.10043111443519592,
-0.10104671865701675,
0.3054666221141815,
0.020130278542637825,
0.24051320552825928,
0.2568906545639038,
-0.2070886492729187,
-0.17149145901203156,
0.13723908364772797,
0.1709662824869156,
0.06932768225669861,
-0.006463505327701569,
0.11437708139419556,
0.09141623228788376,
0.40615469217300415,
0.1374792605638504,
-0.03232438117265701,
0.22951997816562653,
0.350498229265213,
-0.254672646522522,
-0.1555602252483368,
0.2719332277774811,
0.0648060142993927,
0.033765602856874466,
-0.4232293963432312,
0.14699658751487732,
-0.4260372519493103,
0.09182030707597733,
0.04299286752939224,
-0.21413005888462067,
0.055051252245903015,
-0.4019949436187744,
0.5552434921264648,
-0.11588342487812042,
0.5018259286880493,
-0.29815956950187683,
-0.06320419162511826,
-0.45122551918029785,
-0.09655163437128067,
-0.05169307440519333,
-0.12910029292106628,
0.2517048418521881,
0.3217266798019409,
-0.19564233720302582,
0.14862282574176788,
-0.1049635112285614,
-0.10815493762493134,
0.1147620677947998,
0.28742390871047974,
-0.24398188292980194,
0.1574089676141739,
-0.2502482533454895,
-0.18195058405399323,
0.5292103886604309,
-0.16445930302143097,
-0.10331219434738159,
-0.24383531510829926,
-0.132664754986763,
-0.2171155959367752,
0.13380055129528046,
-0.20522309839725494,
-0.19236072897911072,
-0.24767091870307922,
-0.20415906608104706,
-0.2703624665737152,
-0.38027873635292053,
-0.26820674538612366,
-0.008072298020124435,
0.3163202106952667,
-0.1515653282403946,
0.2623620331287384,
0.20958617329597473,
0.09095026552677155,
-0.30638450384140015,
-0.09746788442134857,
0.688585638999939,
-0.18679650127887726,
0.08099149912595749,
-0.1910201460123062,
-0.10541988164186478
] |
https://github.com/huggingface/datasets/issues/3181
|
`None` converted to `"None"` when loading a dataset
|
Hi @eladsegal, thanks for reporting.
@mariosasko I saw you are already working on this, but maybe my comment will be useful to you.
All values are casted to their corresponding feature type (including `None` values). For example if the feature type is `Value("bool")`, `None` is casted to `False`.
It is true that strings were an exception, but this was recently fixed by @lhoestq (see #3158).
|
## Describe the bug
When loading a dataset `None` values of the type `NoneType` are converted to `'None'` of the type `str`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
qasper = load_dataset("qasper", split="train", download_mode="reuse_cache_if_exists")
print(qasper[60]["full_text"]["section_name"])
```
When installing version 1.1.40, the output is
`[None, 'Introduction', 'Benchmark Datasets', ...]`
When installing from the master branch, the output is
`['None', 'Introduction', 'Benchmark Datasets', ...]`
Notice how the first element was changed from `NoneType` to `str`.
## Expected results
`None` should stay as is.
## Actual results
`None` is converted to a string.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 65 |
`None` converted to `"None"` when loading a dataset
|
[
-0.14572231471538544,
-0.06071746349334717,
-0.12706436216831207,
0.2379978448152542,
0.45005345344543457,
-0.020587459206581116,
0.3967016935348511,
0.1279798150062561,
0.2153172641992569,
0.39944177865982056,
-0.03723686933517456,
0.23139357566833496,
0.040836937725543976,
-0.022819308564066887,
-0.11691629886627197,
0.27749744057655334,
-0.06977861374616623,
0.40380752086639404,
-0.16806818544864655,
-0.11282296478748322,
-0.26461800932884216,
0.15586617588996887,
-0.17404843866825104,
-0.052364032715559006,
-0.36333468556404114,
-0.19442316889762878,
-0.0013637467054650187,
0.29135286808013916,
-0.13847310841083527,
-0.388823926448822,
-0.05577998235821724,
0.06800840049982071,
-0.24867506325244904,
0.23745258152484894,
-0.00010781394666992128,
0.1294008195400238,
0.4741247892379761,
-0.02634090930223465,
-0.4123633801937103,
-0.14446471631526947,
-0.2568211555480957,
-0.1780059039592743,
0.21548742055892944,
-0.14659959077835083,
-0.06843695044517517,
-0.12822061777114868,
-0.011337964795529842,
-0.4811622202396393,
-0.012041096575558186,
0.1929161101579666,
0.3149226903915405,
0.32473814487457275,
-0.467852920293808,
-0.1568366438150406,
0.1432521492242813,
0.23013004660606384,
0.0833171084523201,
0.17341095209121704,
0.13318267464637756,
0.03007073886692524,
-0.18742673099040985,
0.24318276345729828,
-0.21110378205776215,
-0.09236381202936172,
0.06361837685108185,
0.08838377147912979,
0.1521110087633133,
-0.020678957924246788,
0.35703128576278687,
0.2708452641963959,
0.48937317728996277,
-0.014112192206084728,
-0.1398695707321167,
0.011656315997242928,
0.4708491265773773,
-0.25865936279296875,
0.06987026333808899,
0.022974463179707527,
-0.009338853880763054,
-0.0253897812217474,
-0.020127132534980774,
-0.29835978150367737,
-0.03875968977808952,
-0.0013431595871225,
-0.6383301019668579,
0.24242840707302094,
-0.2169038951396942,
-0.05217284709215164,
-0.017194820567965508,
-0.22095303237438202,
0.07460156828165054,
-0.12407982349395752,
-0.11844397336244583,
0.03943682089447975,
0.05347679182887077,
0.16674572229385376,
0.1309518814086914,
0.1662619709968567,
0.03563511744141579,
-0.1803179532289505,
0.25045257806777954,
0.10087334364652634,
-0.040896859019994736,
-0.0059815156273543835,
0.11601803451776505,
0.05672783404588699,
0.31797388195991516,
-0.13393418490886688,
0.1912810206413269,
-0.04089704155921936,
-0.06535790860652924,
0.08853143453598022,
-0.023346414789557457,
0.017174210399389267,
0.04240603744983673,
-0.05303718522191048,
0.5128752589225769,
-0.1747819483280182,
-0.4069445729255676,
-0.004964436404407024,
-0.0010588011937215924,
0.09628447145223618,
-0.011053456924855709,
0.2086036205291748,
0.16691555082798004,
0.2003917694091797,
0.2185734659433365,
0.10115235298871994,
-0.36846640706062317,
-0.2676713764667511,
-0.4703409671783447,
-0.04474152624607086,
-0.17256657779216766,
-0.24931791424751282,
0.15551631152629852,
0.07392982393503189,
-0.03372955322265625,
0.15318173170089722,
-0.18794719874858856,
-0.08280668407678604,
-0.0939440131187439,
-0.10034456849098206,
0.11720866709947586,
0.3600369691848755,
-0.04968268796801567,
0.12473704665899277,
0.3757419288158417,
-0.24890317022800446,
0.05523523688316345,
0.6049396395683289,
-0.3829843997955322,
-0.040893856436014175,
-0.19790425896644592,
0.2764374315738678,
-0.22491887211799622,
0.05451219528913498,
0.02427361160516739,
0.3279806077480316,
-0.14477314054965973,
-0.14345622062683105,
-0.17856591939926147,
-0.13786691427230835,
-0.18023988604545593,
-0.0039051969069987535,
-0.016635296866297722,
0.7633919715881348,
-0.6208245754241943,
-0.25836992263793945,
-0.23743422329425812,
-0.4261711537837982,
0.16800248622894287,
-0.0038421417120844126,
-0.15362167358398438,
0.07206691056489944,
-0.20306991040706635,
0.27323874831199646,
0.37996557354927063,
-0.029268216341733932,
-0.23096908628940582,
0.3364275097846985,
-0.36026930809020996,
-0.05692020058631897,
-0.05839439854025841,
-0.07072371244430542,
-0.028582211583852768,
0.08732481300830841,
0.23076269030570984,
-0.14722852408885956,
0.25161758065223694,
0.015407244674861431,
-0.2662528455257416,
-0.1615317314863205,
0.464404821395874,
0.010476406663656235,
0.08537336438894272,
0.25054216384887695,
0.02152985706925392,
-0.04157109931111336,
0.052331190556287766,
-0.13321447372436523,
0.10164019465446472,
0.4124312400817871,
-0.06535398215055466,
0.036835893988609314,
-0.05410539358854294,
-0.054721493273973465,
-0.5389366745948792,
-0.08535265177488327,
-0.07396075129508972,
0.14947937428951263,
-0.2632220983505249,
-0.20222575962543488,
-0.06714341789484024,
-0.004485103767365217,
0.04136303812265396,
0.2686007618904114,
0.2915503978729248,
0.22586150467395782,
-0.5724323987960815,
-0.03751889243721962,
-0.09783875197172165,
0.10153253376483917,
-0.04453454166650772,
-0.0070673152804374695,
-0.3165827989578247,
0.14960364997386932,
0.10603941231966019,
-0.23077984154224396,
-0.13869740068912506,
0.3174286186695099,
0.17788375914096832,
0.08686251193284988,
-0.15760229527950287,
0.2754370868206024,
-0.20632560551166534,
0.0713106095790863,
-0.050811417400836945,
-0.20304307341575623,
0.17197878658771515,
-0.05651307478547096,
0.25298011302948,
0.14506188035011292,
0.26568570733070374,
-0.03117593191564083,
-0.12919308245182037,
0.28688764572143555,
-0.23786959052085876,
0.15842367708683014,
-0.19466379284858704,
-0.09548235684633255,
0.2850043475627899,
-0.02437630668282509,
-0.10211632400751114,
-0.594786524772644,
-0.0021061173174530268,
0.42859384417533875,
0.18013150990009308,
0.39207565784454346,
-0.2117932289838791,
0.13989077508449554,
0.18024374544620514,
-0.2609306573867798,
0.17533859610557556,
0.03232106938958168,
-0.18462638556957245,
-0.24712695181369781,
0.012630704790353775,
0.17650792002677917,
0.5517866015434265,
0.35408467054367065,
0.15797504782676697,
-0.03424583375453949,
-0.015119836665689945,
-0.2279174029827118,
0.26298943161964417,
0.0064216842874884605,
0.20875652134418488,
0.36169329285621643,
0.15422271192073822,
-0.21814586222171783,
-0.48874524235725403,
-0.06440835446119308,
0.2759544551372528,
0.2875237464904785,
-0.5602508783340454,
-0.07110437005758286,
-0.5575052499771118,
-0.018793240189552307,
0.14506961405277252,
0.1026512011885643,
-0.13102011382579803,
-0.4136364758014679,
0.07006560266017914,
-0.14995455741882324,
-0.08320670574903488,
0.06127552315592766,
-0.2765856683254242,
0.13345791399478912,
-0.11022046208381653,
0.15059617161750793,
-0.24059297144412994,
-0.13939499855041504,
-0.18983101844787598,
0.12886466085910797,
0.11166568100452423,
0.2503335773944855,
0.03420916572213173,
-0.04667811468243599,
-0.13801570236682892,
-0.0779416412115097,
-0.03176882863044739,
-0.007465094793587923,
-0.11120162904262543,
0.09182105213403702,
0.24196700751781464,
0.43990764021873474,
-0.04996929317712784,
0.04466579109430313,
0.2082061916589737,
-0.05259361118078232,
-0.10543662309646606,
0.16391532123088837,
-0.3327575623989105,
0.10028081387281418,
-0.2981746792793274,
-0.3231912851333618,
-0.20988111197948456,
-0.15669657289981842,
-0.2624693512916565,
0.060080964118242264,
0.06678356975317001,
0.2969803214073181,
0.19874732196331024,
0.2179003655910492,
0.09983153641223907,
0.05157362297177315,
-0.38550496101379395,
-0.19070418179035187,
0.3083955645561218,
-0.05219573900103569,
-0.18056580424308777,
0.1915716826915741,
-0.10054799169301987,
0.09584292024374008,
0.23603315651416779,
-0.1726546287536621,
0.00938024278730154,
0.15070977807044983,
-0.018565019592642784,
-0.2289866954088211,
-0.11289255321025848,
0.4029140770435333,
0.2969072461128235,
-0.25622913241386414,
-0.10403446108102798,
-0.07035420089960098,
0.0494794100522995,
-0.16051097214221954,
0.03530395030975342,
-0.1469345986843109,
0.21108800172805786,
-0.1983698457479477,
0.25647398829460144,
-0.16973939538002014,
-0.15939535200595856,
0.15468257665634155,
-0.29230907559394836,
0.6088869571685791,
-0.08875023573637009,
-0.08371104300022125,
-0.20529794692993164,
0.2810591757297516,
0.12798692286014557,
0.24435830116271973,
-0.2146635502576828,
-0.2042313665151596,
0.10112634301185608,
-0.05030641332268715,
-0.6612595915794373,
-0.14544826745986938,
0.10729409754276276,
-0.34210169315338135,
-0.037022665143013,
0.08342364430427551,
0.15194736421108246,
-0.22390411794185638,
-0.08705635368824005,
-0.02014331705868244,
-0.006090950220823288,
0.07924466580152512,
-0.242628812789917,
-0.4244078993797302,
0.2047254741191864,
-0.3244014084339142,
0.36549460887908936,
-0.08826979994773865,
-0.031137285754084587,
-0.1270904392004013,
-0.23052361607551575,
0.27500513195991516,
-0.05541275814175606,
0.6925384402275085,
-0.17908775806427002,
0.14168649911880493,
0.4672732651233673,
0.1425250768661499,
-0.3662782311439514,
-0.002299061045050621,
-0.36846834421157837,
0.23620569705963135,
-0.02889367565512657,
0.27852755784988403,
-0.22805455327033997,
-0.22302012145519257,
0.16069309413433075,
0.045940838754177094,
-0.07421504706144333,
-0.00012325207353569567,
-0.3742159307003021,
-0.23711711168289185,
0.024721626192331314,
-0.11552847921848297,
-0.3413068950176239,
0.33265140652656555,
-0.26121440529823303,
-0.2434411197900772,
-0.36126455664634705,
0.2488858550786972,
0.06879548728466034,
0.05651475489139557,
0.5541006326675415,
0.21984510123729706,
-0.23305830359458923,
0.19618742167949677,
0.18643945455551147,
0.20843088626861572,
0.35766276717185974,
-0.11696568876504898,
-0.1894855946302414,
0.37078505754470825,
-0.12612290680408478,
0.045504819601774216,
0.32293692231178284,
0.060861486941576004,
0.1504034847021103,
0.15265081822872162,
0.04583302512764931,
-0.07808246463537216,
0.10904104262590408,
0.2638658583164215,
-0.15170688927173615,
-0.26286306977272034,
-0.159279465675354,
0.2791357934474945,
0.03386804088950157,
0.03283635526895523,
0.1709965318441391,
0.26578256487846375,
-0.2759476602077484,
0.260355681180954,
0.0742357149720192,
0.7768946886062622,
-0.23958037793636322,
0.11408136039972305,
0.32812097668647766,
0.05374189838767052,
0.4346497654914856,
0.04348861798644066,
0.15716485679149628,
-0.3723917007446289,
-0.1937270313501358,
-0.07488787174224854,
0.11303960531949997,
0.3295864760875702,
0.25531205534935,
-0.07783504575490952,
0.0635724887251854,
-0.19738835096359253,
0.10248159617185593,
-0.031882643699645996,
-0.0904393345117569,
-0.046385619789361954,
-0.16465139389038086,
-0.12089904397726059,
0.20548401772975922,
-0.23719175159931183,
-0.006219238042831421,
-0.08693154901266098,
0.11282317340373993,
0.008213697001338005,
0.0054315864108502865,
0.21170805394649506,
0.20363479852676392,
-0.06266537308692932,
-0.00973571091890335,
0.07047240436077118,
-0.370612233877182,
-0.26450538635253906,
0.3550116717815399,
-0.09365619719028473,
0.1750405877828598,
-0.21980570256710052,
0.2275969237089157,
-0.012030906975269318,
0.34092214703559875,
-0.0396481528878212,
0.06231513246893883,
0.20495013892650604,
0.1819179505109787,
-0.37089115381240845,
-0.041015625,
-0.18367817997932434,
0.05226605013012886,
0.2578769326210022,
0.07053175568580627,
-0.07345429807901382,
-0.1813298761844635,
-0.1740647703409195,
0.2162877321243286,
0.5732864141464233,
-0.17365886270999908,
0.20712685585021973,
0.036021023988723755,
-0.07700499147176743,
-0.06914662569761276,
0.17171649634838104,
-0.4382975995540619,
0.03635134547948837,
0.5808656811714172,
0.28187334537506104,
0.01859680749475956,
0.5702983140945435,
-0.1667618751525879,
-0.29552021622657776,
-0.39428117871284485,
0.16752023994922638,
0.21116943657398224,
-0.18576449155807495,
0.2873871624469757,
0.26733851432800293,
-0.022609630599617958,
0.21547484397888184,
0.1839441955089569,
-0.20950360596179962,
0.26036766171455383,
-0.25474798679351807,
-0.1035543903708458,
-0.3544381856918335,
0.17789150774478912,
0.008164573460817337,
0.2380920648574829,
0.447313129901886,
-0.1777174472808838,
0.15183545649051666,
-0.2293003797531128,
-0.41385290026664734,
0.17096395790576935,
-0.09408263117074966,
0.12326280027627945,
0.0771709457039833,
0.024608241394162178,
0.07021206617355347,
-0.02850376069545746,
0.3732283413410187,
-0.13187119364738464,
0.04368411749601364,
-0.31290680170059204,
-0.08693370223045349,
0.11108490079641342,
-0.1484403908252716,
0.12093963474035263,
0.1645793318748474,
-0.20570255815982819,
-0.017234448343515396,
-0.1350507140159607,
0.27275413274765015,
0.32028520107269287,
-0.01970355212688446,
0.05760951712727547,
0.14492082595825195,
0.24733507633209229,
-0.1819557100534439,
0.002997202333062887,
-0.01639270968735218,
-0.16266480088233948,
0.024119718000292778,
0.07951401174068451,
0.012282067909836769,
-0.05899569019675255,
-0.00245481263846159,
0.13762901723384857,
0.023325946182012558,
0.2721766233444214,
0.16064845025539398,
-0.3519974946975708,
-0.07325419783592224,
0.10602053254842758,
0.1569841057062149,
0.05480889230966568,
-0.17384657263755798,
-0.13678961992263794,
-0.12122703343629837,
0.2659430503845215,
-0.3304692804813385,
-0.08334765583276749,
0.0950533077120781,
-0.03359527513384819,
0.22904856503009796,
0.0038330291863530874,
-0.03625354543328285,
-0.07021375745534897,
0.09507712721824646,
-0.05214054882526398,
0.20724427700042725,
-0.32453083992004395,
0.1212557777762413,
0.4626903533935547,
-0.17411790788173676,
-0.09268161654472351,
0.27863815426826477,
-0.029920661821961403,
-0.18218038976192474,
0.5160154104232788,
0.11307669430971146,
0.3492172360420227,
-0.08382593095302582,
0.13972976803779602,
-0.5744352340698242,
-0.7401204705238342,
0.23743116855621338,
0.3691050708293915,
-0.32650068402290344,
0.028951719403266907,
0.22775115072727203,
0.03393688052892685,
-0.2250555455684662,
-0.26198166608810425,
-0.06998630613088608,
0.19040971994400024,
-0.42436492443084717,
-0.266136109828949,
-0.3892296850681305,
-0.09980019927024841,
-0.16103054583072662,
0.019040759652853012,
-0.024043671786785126,
-0.0523248054087162,
0.13510170578956604,
0.04981834441423416,
-0.09829936921596527,
-0.27202725410461426,
0.29811233282089233,
-0.03511426970362663,
-0.1397881805896759,
-0.061878591775894165,
0.356950968503952,
0.045455802232027054,
0.23463526368141174,
0.4361940920352936,
0.3473842740058899,
0.277849942445755,
0.042488694190979004,
0.270010769367218,
-0.01236470602452755,
0.19865651428699493,
-0.34118279814720154,
-0.009855047799646854,
0.030057065188884735,
0.23118111491203308,
0.462973415851593,
0.1925268918275833,
0.27864697575569153,
-0.2350122481584549,
0.09000010043382645,
0.3599746525287628,
0.0032372118439525366,
-0.05565575137734413,
0.292670875787735,
0.15612192451953888,
-0.10507247596979141,
-0.33093011379241943,
-0.19511651992797852,
-0.5435897707939148,
-0.08840402215719223,
0.2666378617286682,
-0.06248822808265686,
0.10395903140306473,
0.039279740303754807,
0.1592906266450882,
0.1645132452249527,
0.29188936948776245,
0.01334324013441801,
-0.15855595469474792,
-0.24015317857265472,
0.03848201408982277,
-0.783525288105011,
0.38711950182914734,
0.13196291029453278,
0.18361426889896393,
-0.191962331533432,
0.05476083979010582,
0.0029396889731287956,
-0.23149478435516357,
0.08111878484487534,
-0.020941192284226418,
0.4347730875015259,
-0.09827631711959839,
-0.27455824613571167,
0.14307540655136108,
0.12130900472402573,
-0.204488143324852,
-0.2658034861087799,
-0.2532459497451782,
0.07420582324266434,
0.03574527055025101,
0.17284823954105377,
0.10996066778898239,
-0.1343659907579422,
-0.13882389664649963,
0.22958147525787354,
0.3340460956096649,
-0.03706800192594528,
0.4089738130569458,
-0.12281012535095215,
0.07247599214315414,
-0.30761873722076416,
-0.10771525651216507,
-0.08644238114356995,
0.36518216133117676,
0.38931068778038025,
0.21159504354000092,
-0.006245812401175499,
0.29810577630996704,
0.126640185713768,
-0.12427633255720139,
-0.0014022374525666237,
0.3446885347366333,
-0.6421847343444824,
0.3993760645389557,
-0.11592202633619308,
-0.08905976265668869,
-0.015157569199800491,
-0.035892587155103683,
0.24204614758491516,
0.19116155803203583,
-0.15957920253276825,
-0.04399764910340309,
0.3200947940349579,
-0.006930308882147074,
-0.2567274570465088,
-0.17787443101406097,
0.27806100249290466,
0.03745044395327568,
-0.17338059842586517,
-0.31666722893714905,
0.0442185178399086,
0.4314008057117462,
-0.3411630392074585,
-0.24618445336818695,
0.34634900093078613,
-0.30456605553627014,
0.03302578628063202,
-0.33299896121025085,
0.09535352885723114,
0.2598247528076172,
-0.05960148945450783,
-0.08454739302396774,
-0.2150353640317917
] |
https://github.com/huggingface/datasets/issues/3181
|
`None` converted to `"None"` when loading a dataset
|
Thanks for reporting.
This is actually a breaking change that I think can cause issues when users preprocess their data. String columns used to be nullable. Maybe we can correct https://github.com/huggingface/datasets/pull/3158 to keep the None values and avoid this breaking change ?
EDIT: the other types (bool, int, etc) can also become nullable IMO
|
## Describe the bug
When loading a dataset `None` values of the type `NoneType` are converted to `'None'` of the type `str`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
qasper = load_dataset("qasper", split="train", download_mode="reuse_cache_if_exists")
print(qasper[60]["full_text"]["section_name"])
```
When installing version 1.1.40, the output is
`[None, 'Introduction', 'Benchmark Datasets', ...]`
When installing from the master branch, the output is
`['None', 'Introduction', 'Benchmark Datasets', ...]`
Notice how the first element was changed from `NoneType` to `str`.
## Expected results
`None` should stay as is.
## Actual results
`None` is converted to a string.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 54 |
`None` converted to `"None"` when loading a dataset
|
[
-0.14572231471538544,
-0.06071746349334717,
-0.12706436216831207,
0.2379978448152542,
0.45005345344543457,
-0.020587459206581116,
0.3967016935348511,
0.1279798150062561,
0.2153172641992569,
0.39944177865982056,
-0.03723686933517456,
0.23139357566833496,
0.040836937725543976,
-0.022819308564066887,
-0.11691629886627197,
0.27749744057655334,
-0.06977861374616623,
0.40380752086639404,
-0.16806818544864655,
-0.11282296478748322,
-0.26461800932884216,
0.15586617588996887,
-0.17404843866825104,
-0.052364032715559006,
-0.36333468556404114,
-0.19442316889762878,
-0.0013637467054650187,
0.29135286808013916,
-0.13847310841083527,
-0.388823926448822,
-0.05577998235821724,
0.06800840049982071,
-0.24867506325244904,
0.23745258152484894,
-0.00010781394666992128,
0.1294008195400238,
0.4741247892379761,
-0.02634090930223465,
-0.4123633801937103,
-0.14446471631526947,
-0.2568211555480957,
-0.1780059039592743,
0.21548742055892944,
-0.14659959077835083,
-0.06843695044517517,
-0.12822061777114868,
-0.011337964795529842,
-0.4811622202396393,
-0.012041096575558186,
0.1929161101579666,
0.3149226903915405,
0.32473814487457275,
-0.467852920293808,
-0.1568366438150406,
0.1432521492242813,
0.23013004660606384,
0.0833171084523201,
0.17341095209121704,
0.13318267464637756,
0.03007073886692524,
-0.18742673099040985,
0.24318276345729828,
-0.21110378205776215,
-0.09236381202936172,
0.06361837685108185,
0.08838377147912979,
0.1521110087633133,
-0.020678957924246788,
0.35703128576278687,
0.2708452641963959,
0.48937317728996277,
-0.014112192206084728,
-0.1398695707321167,
0.011656315997242928,
0.4708491265773773,
-0.25865936279296875,
0.06987026333808899,
0.022974463179707527,
-0.009338853880763054,
-0.0253897812217474,
-0.020127132534980774,
-0.29835978150367737,
-0.03875968977808952,
-0.0013431595871225,
-0.6383301019668579,
0.24242840707302094,
-0.2169038951396942,
-0.05217284709215164,
-0.017194820567965508,
-0.22095303237438202,
0.07460156828165054,
-0.12407982349395752,
-0.11844397336244583,
0.03943682089447975,
0.05347679182887077,
0.16674572229385376,
0.1309518814086914,
0.1662619709968567,
0.03563511744141579,
-0.1803179532289505,
0.25045257806777954,
0.10087334364652634,
-0.040896859019994736,
-0.0059815156273543835,
0.11601803451776505,
0.05672783404588699,
0.31797388195991516,
-0.13393418490886688,
0.1912810206413269,
-0.04089704155921936,
-0.06535790860652924,
0.08853143453598022,
-0.023346414789557457,
0.017174210399389267,
0.04240603744983673,
-0.05303718522191048,
0.5128752589225769,
-0.1747819483280182,
-0.4069445729255676,
-0.004964436404407024,
-0.0010588011937215924,
0.09628447145223618,
-0.011053456924855709,
0.2086036205291748,
0.16691555082798004,
0.2003917694091797,
0.2185734659433365,
0.10115235298871994,
-0.36846640706062317,
-0.2676713764667511,
-0.4703409671783447,
-0.04474152624607086,
-0.17256657779216766,
-0.24931791424751282,
0.15551631152629852,
0.07392982393503189,
-0.03372955322265625,
0.15318173170089722,
-0.18794719874858856,
-0.08280668407678604,
-0.0939440131187439,
-0.10034456849098206,
0.11720866709947586,
0.3600369691848755,
-0.04968268796801567,
0.12473704665899277,
0.3757419288158417,
-0.24890317022800446,
0.05523523688316345,
0.6049396395683289,
-0.3829843997955322,
-0.040893856436014175,
-0.19790425896644592,
0.2764374315738678,
-0.22491887211799622,
0.05451219528913498,
0.02427361160516739,
0.3279806077480316,
-0.14477314054965973,
-0.14345622062683105,
-0.17856591939926147,
-0.13786691427230835,
-0.18023988604545593,
-0.0039051969069987535,
-0.016635296866297722,
0.7633919715881348,
-0.6208245754241943,
-0.25836992263793945,
-0.23743422329425812,
-0.4261711537837982,
0.16800248622894287,
-0.0038421417120844126,
-0.15362167358398438,
0.07206691056489944,
-0.20306991040706635,
0.27323874831199646,
0.37996557354927063,
-0.029268216341733932,
-0.23096908628940582,
0.3364275097846985,
-0.36026930809020996,
-0.05692020058631897,
-0.05839439854025841,
-0.07072371244430542,
-0.028582211583852768,
0.08732481300830841,
0.23076269030570984,
-0.14722852408885956,
0.25161758065223694,
0.015407244674861431,
-0.2662528455257416,
-0.1615317314863205,
0.464404821395874,
0.010476406663656235,
0.08537336438894272,
0.25054216384887695,
0.02152985706925392,
-0.04157109931111336,
0.052331190556287766,
-0.13321447372436523,
0.10164019465446472,
0.4124312400817871,
-0.06535398215055466,
0.036835893988609314,
-0.05410539358854294,
-0.054721493273973465,
-0.5389366745948792,
-0.08535265177488327,
-0.07396075129508972,
0.14947937428951263,
-0.2632220983505249,
-0.20222575962543488,
-0.06714341789484024,
-0.004485103767365217,
0.04136303812265396,
0.2686007618904114,
0.2915503978729248,
0.22586150467395782,
-0.5724323987960815,
-0.03751889243721962,
-0.09783875197172165,
0.10153253376483917,
-0.04453454166650772,
-0.0070673152804374695,
-0.3165827989578247,
0.14960364997386932,
0.10603941231966019,
-0.23077984154224396,
-0.13869740068912506,
0.3174286186695099,
0.17788375914096832,
0.08686251193284988,
-0.15760229527950287,
0.2754370868206024,
-0.20632560551166534,
0.0713106095790863,
-0.050811417400836945,
-0.20304307341575623,
0.17197878658771515,
-0.05651307478547096,
0.25298011302948,
0.14506188035011292,
0.26568570733070374,
-0.03117593191564083,
-0.12919308245182037,
0.28688764572143555,
-0.23786959052085876,
0.15842367708683014,
-0.19466379284858704,
-0.09548235684633255,
0.2850043475627899,
-0.02437630668282509,
-0.10211632400751114,
-0.594786524772644,
-0.0021061173174530268,
0.42859384417533875,
0.18013150990009308,
0.39207565784454346,
-0.2117932289838791,
0.13989077508449554,
0.18024374544620514,
-0.2609306573867798,
0.17533859610557556,
0.03232106938958168,
-0.18462638556957245,
-0.24712695181369781,
0.012630704790353775,
0.17650792002677917,
0.5517866015434265,
0.35408467054367065,
0.15797504782676697,
-0.03424583375453949,
-0.015119836665689945,
-0.2279174029827118,
0.26298943161964417,
0.0064216842874884605,
0.20875652134418488,
0.36169329285621643,
0.15422271192073822,
-0.21814586222171783,
-0.48874524235725403,
-0.06440835446119308,
0.2759544551372528,
0.2875237464904785,
-0.5602508783340454,
-0.07110437005758286,
-0.5575052499771118,
-0.018793240189552307,
0.14506961405277252,
0.1026512011885643,
-0.13102011382579803,
-0.4136364758014679,
0.07006560266017914,
-0.14995455741882324,
-0.08320670574903488,
0.06127552315592766,
-0.2765856683254242,
0.13345791399478912,
-0.11022046208381653,
0.15059617161750793,
-0.24059297144412994,
-0.13939499855041504,
-0.18983101844787598,
0.12886466085910797,
0.11166568100452423,
0.2503335773944855,
0.03420916572213173,
-0.04667811468243599,
-0.13801570236682892,
-0.0779416412115097,
-0.03176882863044739,
-0.007465094793587923,
-0.11120162904262543,
0.09182105213403702,
0.24196700751781464,
0.43990764021873474,
-0.04996929317712784,
0.04466579109430313,
0.2082061916589737,
-0.05259361118078232,
-0.10543662309646606,
0.16391532123088837,
-0.3327575623989105,
0.10028081387281418,
-0.2981746792793274,
-0.3231912851333618,
-0.20988111197948456,
-0.15669657289981842,
-0.2624693512916565,
0.060080964118242264,
0.06678356975317001,
0.2969803214073181,
0.19874732196331024,
0.2179003655910492,
0.09983153641223907,
0.05157362297177315,
-0.38550496101379395,
-0.19070418179035187,
0.3083955645561218,
-0.05219573900103569,
-0.18056580424308777,
0.1915716826915741,
-0.10054799169301987,
0.09584292024374008,
0.23603315651416779,
-0.1726546287536621,
0.00938024278730154,
0.15070977807044983,
-0.018565019592642784,
-0.2289866954088211,
-0.11289255321025848,
0.4029140770435333,
0.2969072461128235,
-0.25622913241386414,
-0.10403446108102798,
-0.07035420089960098,
0.0494794100522995,
-0.16051097214221954,
0.03530395030975342,
-0.1469345986843109,
0.21108800172805786,
-0.1983698457479477,
0.25647398829460144,
-0.16973939538002014,
-0.15939535200595856,
0.15468257665634155,
-0.29230907559394836,
0.6088869571685791,
-0.08875023573637009,
-0.08371104300022125,
-0.20529794692993164,
0.2810591757297516,
0.12798692286014557,
0.24435830116271973,
-0.2146635502576828,
-0.2042313665151596,
0.10112634301185608,
-0.05030641332268715,
-0.6612595915794373,
-0.14544826745986938,
0.10729409754276276,
-0.34210169315338135,
-0.037022665143013,
0.08342364430427551,
0.15194736421108246,
-0.22390411794185638,
-0.08705635368824005,
-0.02014331705868244,
-0.006090950220823288,
0.07924466580152512,
-0.242628812789917,
-0.4244078993797302,
0.2047254741191864,
-0.3244014084339142,
0.36549460887908936,
-0.08826979994773865,
-0.031137285754084587,
-0.1270904392004013,
-0.23052361607551575,
0.27500513195991516,
-0.05541275814175606,
0.6925384402275085,
-0.17908775806427002,
0.14168649911880493,
0.4672732651233673,
0.1425250768661499,
-0.3662782311439514,
-0.002299061045050621,
-0.36846834421157837,
0.23620569705963135,
-0.02889367565512657,
0.27852755784988403,
-0.22805455327033997,
-0.22302012145519257,
0.16069309413433075,
0.045940838754177094,
-0.07421504706144333,
-0.00012325207353569567,
-0.3742159307003021,
-0.23711711168289185,
0.024721626192331314,
-0.11552847921848297,
-0.3413068950176239,
0.33265140652656555,
-0.26121440529823303,
-0.2434411197900772,
-0.36126455664634705,
0.2488858550786972,
0.06879548728466034,
0.05651475489139557,
0.5541006326675415,
0.21984510123729706,
-0.23305830359458923,
0.19618742167949677,
0.18643945455551147,
0.20843088626861572,
0.35766276717185974,
-0.11696568876504898,
-0.1894855946302414,
0.37078505754470825,
-0.12612290680408478,
0.045504819601774216,
0.32293692231178284,
0.060861486941576004,
0.1504034847021103,
0.15265081822872162,
0.04583302512764931,
-0.07808246463537216,
0.10904104262590408,
0.2638658583164215,
-0.15170688927173615,
-0.26286306977272034,
-0.159279465675354,
0.2791357934474945,
0.03386804088950157,
0.03283635526895523,
0.1709965318441391,
0.26578256487846375,
-0.2759476602077484,
0.260355681180954,
0.0742357149720192,
0.7768946886062622,
-0.23958037793636322,
0.11408136039972305,
0.32812097668647766,
0.05374189838767052,
0.4346497654914856,
0.04348861798644066,
0.15716485679149628,
-0.3723917007446289,
-0.1937270313501358,
-0.07488787174224854,
0.11303960531949997,
0.3295864760875702,
0.25531205534935,
-0.07783504575490952,
0.0635724887251854,
-0.19738835096359253,
0.10248159617185593,
-0.031882643699645996,
-0.0904393345117569,
-0.046385619789361954,
-0.16465139389038086,
-0.12089904397726059,
0.20548401772975922,
-0.23719175159931183,
-0.006219238042831421,
-0.08693154901266098,
0.11282317340373993,
0.008213697001338005,
0.0054315864108502865,
0.21170805394649506,
0.20363479852676392,
-0.06266537308692932,
-0.00973571091890335,
0.07047240436077118,
-0.370612233877182,
-0.26450538635253906,
0.3550116717815399,
-0.09365619719028473,
0.1750405877828598,
-0.21980570256710052,
0.2275969237089157,
-0.012030906975269318,
0.34092214703559875,
-0.0396481528878212,
0.06231513246893883,
0.20495013892650604,
0.1819179505109787,
-0.37089115381240845,
-0.041015625,
-0.18367817997932434,
0.05226605013012886,
0.2578769326210022,
0.07053175568580627,
-0.07345429807901382,
-0.1813298761844635,
-0.1740647703409195,
0.2162877321243286,
0.5732864141464233,
-0.17365886270999908,
0.20712685585021973,
0.036021023988723755,
-0.07700499147176743,
-0.06914662569761276,
0.17171649634838104,
-0.4382975995540619,
0.03635134547948837,
0.5808656811714172,
0.28187334537506104,
0.01859680749475956,
0.5702983140945435,
-0.1667618751525879,
-0.29552021622657776,
-0.39428117871284485,
0.16752023994922638,
0.21116943657398224,
-0.18576449155807495,
0.2873871624469757,
0.26733851432800293,
-0.022609630599617958,
0.21547484397888184,
0.1839441955089569,
-0.20950360596179962,
0.26036766171455383,
-0.25474798679351807,
-0.1035543903708458,
-0.3544381856918335,
0.17789150774478912,
0.008164573460817337,
0.2380920648574829,
0.447313129901886,
-0.1777174472808838,
0.15183545649051666,
-0.2293003797531128,
-0.41385290026664734,
0.17096395790576935,
-0.09408263117074966,
0.12326280027627945,
0.0771709457039833,
0.024608241394162178,
0.07021206617355347,
-0.02850376069545746,
0.3732283413410187,
-0.13187119364738464,
0.04368411749601364,
-0.31290680170059204,
-0.08693370223045349,
0.11108490079641342,
-0.1484403908252716,
0.12093963474035263,
0.1645793318748474,
-0.20570255815982819,
-0.017234448343515396,
-0.1350507140159607,
0.27275413274765015,
0.32028520107269287,
-0.01970355212688446,
0.05760951712727547,
0.14492082595825195,
0.24733507633209229,
-0.1819557100534439,
0.002997202333062887,
-0.01639270968735218,
-0.16266480088233948,
0.024119718000292778,
0.07951401174068451,
0.012282067909836769,
-0.05899569019675255,
-0.00245481263846159,
0.13762901723384857,
0.023325946182012558,
0.2721766233444214,
0.16064845025539398,
-0.3519974946975708,
-0.07325419783592224,
0.10602053254842758,
0.1569841057062149,
0.05480889230966568,
-0.17384657263755798,
-0.13678961992263794,
-0.12122703343629837,
0.2659430503845215,
-0.3304692804813385,
-0.08334765583276749,
0.0950533077120781,
-0.03359527513384819,
0.22904856503009796,
0.0038330291863530874,
-0.03625354543328285,
-0.07021375745534897,
0.09507712721824646,
-0.05214054882526398,
0.20724427700042725,
-0.32453083992004395,
0.1212557777762413,
0.4626903533935547,
-0.17411790788173676,
-0.09268161654472351,
0.27863815426826477,
-0.029920661821961403,
-0.18218038976192474,
0.5160154104232788,
0.11307669430971146,
0.3492172360420227,
-0.08382593095302582,
0.13972976803779602,
-0.5744352340698242,
-0.7401204705238342,
0.23743116855621338,
0.3691050708293915,
-0.32650068402290344,
0.028951719403266907,
0.22775115072727203,
0.03393688052892685,
-0.2250555455684662,
-0.26198166608810425,
-0.06998630613088608,
0.19040971994400024,
-0.42436492443084717,
-0.266136109828949,
-0.3892296850681305,
-0.09980019927024841,
-0.16103054583072662,
0.019040759652853012,
-0.024043671786785126,
-0.0523248054087162,
0.13510170578956604,
0.04981834441423416,
-0.09829936921596527,
-0.27202725410461426,
0.29811233282089233,
-0.03511426970362663,
-0.1397881805896759,
-0.061878591775894165,
0.356950968503952,
0.045455802232027054,
0.23463526368141174,
0.4361940920352936,
0.3473842740058899,
0.277849942445755,
0.042488694190979004,
0.270010769367218,
-0.01236470602452755,
0.19865651428699493,
-0.34118279814720154,
-0.009855047799646854,
0.030057065188884735,
0.23118111491203308,
0.462973415851593,
0.1925268918275833,
0.27864697575569153,
-0.2350122481584549,
0.09000010043382645,
0.3599746525287628,
0.0032372118439525366,
-0.05565575137734413,
0.292670875787735,
0.15612192451953888,
-0.10507247596979141,
-0.33093011379241943,
-0.19511651992797852,
-0.5435897707939148,
-0.08840402215719223,
0.2666378617286682,
-0.06248822808265686,
0.10395903140306473,
0.039279740303754807,
0.1592906266450882,
0.1645132452249527,
0.29188936948776245,
0.01334324013441801,
-0.15855595469474792,
-0.24015317857265472,
0.03848201408982277,
-0.783525288105011,
0.38711950182914734,
0.13196291029453278,
0.18361426889896393,
-0.191962331533432,
0.05476083979010582,
0.0029396889731287956,
-0.23149478435516357,
0.08111878484487534,
-0.020941192284226418,
0.4347730875015259,
-0.09827631711959839,
-0.27455824613571167,
0.14307540655136108,
0.12130900472402573,
-0.204488143324852,
-0.2658034861087799,
-0.2532459497451782,
0.07420582324266434,
0.03574527055025101,
0.17284823954105377,
0.10996066778898239,
-0.1343659907579422,
-0.13882389664649963,
0.22958147525787354,
0.3340460956096649,
-0.03706800192594528,
0.4089738130569458,
-0.12281012535095215,
0.07247599214315414,
-0.30761873722076416,
-0.10771525651216507,
-0.08644238114356995,
0.36518216133117676,
0.38931068778038025,
0.21159504354000092,
-0.006245812401175499,
0.29810577630996704,
0.126640185713768,
-0.12427633255720139,
-0.0014022374525666237,
0.3446885347366333,
-0.6421847343444824,
0.3993760645389557,
-0.11592202633619308,
-0.08905976265668869,
-0.015157569199800491,
-0.035892587155103683,
0.24204614758491516,
0.19116155803203583,
-0.15957920253276825,
-0.04399764910340309,
0.3200947940349579,
-0.006930308882147074,
-0.2567274570465088,
-0.17787443101406097,
0.27806100249290466,
0.03745044395327568,
-0.17338059842586517,
-0.31666722893714905,
0.0442185178399086,
0.4314008057117462,
-0.3411630392074585,
-0.24618445336818695,
0.34634900093078613,
-0.30456605553627014,
0.03302578628063202,
-0.33299896121025085,
0.09535352885723114,
0.2598247528076172,
-0.05960148945450783,
-0.08454739302396774,
-0.2150353640317917
] |
https://github.com/huggingface/datasets/issues/3181
|
`None` converted to `"None"` when loading a dataset
|
So what would be the best way to handle a feature that can have a null value in some of the instances? So far I used `None`.
Using the empty string won't be a good option, as it can be an actual value in the data and is not the same as not having a value at all.
|
## Describe the bug
When loading a dataset `None` values of the type `NoneType` are converted to `'None'` of the type `str`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
qasper = load_dataset("qasper", split="train", download_mode="reuse_cache_if_exists")
print(qasper[60]["full_text"]["section_name"])
```
When installing version 1.1.40, the output is
`[None, 'Introduction', 'Benchmark Datasets', ...]`
When installing from the master branch, the output is
`['None', 'Introduction', 'Benchmark Datasets', ...]`
Notice how the first element was changed from `NoneType` to `str`.
## Expected results
`None` should stay as is.
## Actual results
`None` is converted to a string.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 58 |
`None` converted to `"None"` when loading a dataset
|
[
-0.14572231471538544,
-0.06071746349334717,
-0.12706436216831207,
0.2379978448152542,
0.45005345344543457,
-0.020587459206581116,
0.3967016935348511,
0.1279798150062561,
0.2153172641992569,
0.39944177865982056,
-0.03723686933517456,
0.23139357566833496,
0.040836937725543976,
-0.022819308564066887,
-0.11691629886627197,
0.27749744057655334,
-0.06977861374616623,
0.40380752086639404,
-0.16806818544864655,
-0.11282296478748322,
-0.26461800932884216,
0.15586617588996887,
-0.17404843866825104,
-0.052364032715559006,
-0.36333468556404114,
-0.19442316889762878,
-0.0013637467054650187,
0.29135286808013916,
-0.13847310841083527,
-0.388823926448822,
-0.05577998235821724,
0.06800840049982071,
-0.24867506325244904,
0.23745258152484894,
-0.00010781394666992128,
0.1294008195400238,
0.4741247892379761,
-0.02634090930223465,
-0.4123633801937103,
-0.14446471631526947,
-0.2568211555480957,
-0.1780059039592743,
0.21548742055892944,
-0.14659959077835083,
-0.06843695044517517,
-0.12822061777114868,
-0.011337964795529842,
-0.4811622202396393,
-0.012041096575558186,
0.1929161101579666,
0.3149226903915405,
0.32473814487457275,
-0.467852920293808,
-0.1568366438150406,
0.1432521492242813,
0.23013004660606384,
0.0833171084523201,
0.17341095209121704,
0.13318267464637756,
0.03007073886692524,
-0.18742673099040985,
0.24318276345729828,
-0.21110378205776215,
-0.09236381202936172,
0.06361837685108185,
0.08838377147912979,
0.1521110087633133,
-0.020678957924246788,
0.35703128576278687,
0.2708452641963959,
0.48937317728996277,
-0.014112192206084728,
-0.1398695707321167,
0.011656315997242928,
0.4708491265773773,
-0.25865936279296875,
0.06987026333808899,
0.022974463179707527,
-0.009338853880763054,
-0.0253897812217474,
-0.020127132534980774,
-0.29835978150367737,
-0.03875968977808952,
-0.0013431595871225,
-0.6383301019668579,
0.24242840707302094,
-0.2169038951396942,
-0.05217284709215164,
-0.017194820567965508,
-0.22095303237438202,
0.07460156828165054,
-0.12407982349395752,
-0.11844397336244583,
0.03943682089447975,
0.05347679182887077,
0.16674572229385376,
0.1309518814086914,
0.1662619709968567,
0.03563511744141579,
-0.1803179532289505,
0.25045257806777954,
0.10087334364652634,
-0.040896859019994736,
-0.0059815156273543835,
0.11601803451776505,
0.05672783404588699,
0.31797388195991516,
-0.13393418490886688,
0.1912810206413269,
-0.04089704155921936,
-0.06535790860652924,
0.08853143453598022,
-0.023346414789557457,
0.017174210399389267,
0.04240603744983673,
-0.05303718522191048,
0.5128752589225769,
-0.1747819483280182,
-0.4069445729255676,
-0.004964436404407024,
-0.0010588011937215924,
0.09628447145223618,
-0.011053456924855709,
0.2086036205291748,
0.16691555082798004,
0.2003917694091797,
0.2185734659433365,
0.10115235298871994,
-0.36846640706062317,
-0.2676713764667511,
-0.4703409671783447,
-0.04474152624607086,
-0.17256657779216766,
-0.24931791424751282,
0.15551631152629852,
0.07392982393503189,
-0.03372955322265625,
0.15318173170089722,
-0.18794719874858856,
-0.08280668407678604,
-0.0939440131187439,
-0.10034456849098206,
0.11720866709947586,
0.3600369691848755,
-0.04968268796801567,
0.12473704665899277,
0.3757419288158417,
-0.24890317022800446,
0.05523523688316345,
0.6049396395683289,
-0.3829843997955322,
-0.040893856436014175,
-0.19790425896644592,
0.2764374315738678,
-0.22491887211799622,
0.05451219528913498,
0.02427361160516739,
0.3279806077480316,
-0.14477314054965973,
-0.14345622062683105,
-0.17856591939926147,
-0.13786691427230835,
-0.18023988604545593,
-0.0039051969069987535,
-0.016635296866297722,
0.7633919715881348,
-0.6208245754241943,
-0.25836992263793945,
-0.23743422329425812,
-0.4261711537837982,
0.16800248622894287,
-0.0038421417120844126,
-0.15362167358398438,
0.07206691056489944,
-0.20306991040706635,
0.27323874831199646,
0.37996557354927063,
-0.029268216341733932,
-0.23096908628940582,
0.3364275097846985,
-0.36026930809020996,
-0.05692020058631897,
-0.05839439854025841,
-0.07072371244430542,
-0.028582211583852768,
0.08732481300830841,
0.23076269030570984,
-0.14722852408885956,
0.25161758065223694,
0.015407244674861431,
-0.2662528455257416,
-0.1615317314863205,
0.464404821395874,
0.010476406663656235,
0.08537336438894272,
0.25054216384887695,
0.02152985706925392,
-0.04157109931111336,
0.052331190556287766,
-0.13321447372436523,
0.10164019465446472,
0.4124312400817871,
-0.06535398215055466,
0.036835893988609314,
-0.05410539358854294,
-0.054721493273973465,
-0.5389366745948792,
-0.08535265177488327,
-0.07396075129508972,
0.14947937428951263,
-0.2632220983505249,
-0.20222575962543488,
-0.06714341789484024,
-0.004485103767365217,
0.04136303812265396,
0.2686007618904114,
0.2915503978729248,
0.22586150467395782,
-0.5724323987960815,
-0.03751889243721962,
-0.09783875197172165,
0.10153253376483917,
-0.04453454166650772,
-0.0070673152804374695,
-0.3165827989578247,
0.14960364997386932,
0.10603941231966019,
-0.23077984154224396,
-0.13869740068912506,
0.3174286186695099,
0.17788375914096832,
0.08686251193284988,
-0.15760229527950287,
0.2754370868206024,
-0.20632560551166534,
0.0713106095790863,
-0.050811417400836945,
-0.20304307341575623,
0.17197878658771515,
-0.05651307478547096,
0.25298011302948,
0.14506188035011292,
0.26568570733070374,
-0.03117593191564083,
-0.12919308245182037,
0.28688764572143555,
-0.23786959052085876,
0.15842367708683014,
-0.19466379284858704,
-0.09548235684633255,
0.2850043475627899,
-0.02437630668282509,
-0.10211632400751114,
-0.594786524772644,
-0.0021061173174530268,
0.42859384417533875,
0.18013150990009308,
0.39207565784454346,
-0.2117932289838791,
0.13989077508449554,
0.18024374544620514,
-0.2609306573867798,
0.17533859610557556,
0.03232106938958168,
-0.18462638556957245,
-0.24712695181369781,
0.012630704790353775,
0.17650792002677917,
0.5517866015434265,
0.35408467054367065,
0.15797504782676697,
-0.03424583375453949,
-0.015119836665689945,
-0.2279174029827118,
0.26298943161964417,
0.0064216842874884605,
0.20875652134418488,
0.36169329285621643,
0.15422271192073822,
-0.21814586222171783,
-0.48874524235725403,
-0.06440835446119308,
0.2759544551372528,
0.2875237464904785,
-0.5602508783340454,
-0.07110437005758286,
-0.5575052499771118,
-0.018793240189552307,
0.14506961405277252,
0.1026512011885643,
-0.13102011382579803,
-0.4136364758014679,
0.07006560266017914,
-0.14995455741882324,
-0.08320670574903488,
0.06127552315592766,
-0.2765856683254242,
0.13345791399478912,
-0.11022046208381653,
0.15059617161750793,
-0.24059297144412994,
-0.13939499855041504,
-0.18983101844787598,
0.12886466085910797,
0.11166568100452423,
0.2503335773944855,
0.03420916572213173,
-0.04667811468243599,
-0.13801570236682892,
-0.0779416412115097,
-0.03176882863044739,
-0.007465094793587923,
-0.11120162904262543,
0.09182105213403702,
0.24196700751781464,
0.43990764021873474,
-0.04996929317712784,
0.04466579109430313,
0.2082061916589737,
-0.05259361118078232,
-0.10543662309646606,
0.16391532123088837,
-0.3327575623989105,
0.10028081387281418,
-0.2981746792793274,
-0.3231912851333618,
-0.20988111197948456,
-0.15669657289981842,
-0.2624693512916565,
0.060080964118242264,
0.06678356975317001,
0.2969803214073181,
0.19874732196331024,
0.2179003655910492,
0.09983153641223907,
0.05157362297177315,
-0.38550496101379395,
-0.19070418179035187,
0.3083955645561218,
-0.05219573900103569,
-0.18056580424308777,
0.1915716826915741,
-0.10054799169301987,
0.09584292024374008,
0.23603315651416779,
-0.1726546287536621,
0.00938024278730154,
0.15070977807044983,
-0.018565019592642784,
-0.2289866954088211,
-0.11289255321025848,
0.4029140770435333,
0.2969072461128235,
-0.25622913241386414,
-0.10403446108102798,
-0.07035420089960098,
0.0494794100522995,
-0.16051097214221954,
0.03530395030975342,
-0.1469345986843109,
0.21108800172805786,
-0.1983698457479477,
0.25647398829460144,
-0.16973939538002014,
-0.15939535200595856,
0.15468257665634155,
-0.29230907559394836,
0.6088869571685791,
-0.08875023573637009,
-0.08371104300022125,
-0.20529794692993164,
0.2810591757297516,
0.12798692286014557,
0.24435830116271973,
-0.2146635502576828,
-0.2042313665151596,
0.10112634301185608,
-0.05030641332268715,
-0.6612595915794373,
-0.14544826745986938,
0.10729409754276276,
-0.34210169315338135,
-0.037022665143013,
0.08342364430427551,
0.15194736421108246,
-0.22390411794185638,
-0.08705635368824005,
-0.02014331705868244,
-0.006090950220823288,
0.07924466580152512,
-0.242628812789917,
-0.4244078993797302,
0.2047254741191864,
-0.3244014084339142,
0.36549460887908936,
-0.08826979994773865,
-0.031137285754084587,
-0.1270904392004013,
-0.23052361607551575,
0.27500513195991516,
-0.05541275814175606,
0.6925384402275085,
-0.17908775806427002,
0.14168649911880493,
0.4672732651233673,
0.1425250768661499,
-0.3662782311439514,
-0.002299061045050621,
-0.36846834421157837,
0.23620569705963135,
-0.02889367565512657,
0.27852755784988403,
-0.22805455327033997,
-0.22302012145519257,
0.16069309413433075,
0.045940838754177094,
-0.07421504706144333,
-0.00012325207353569567,
-0.3742159307003021,
-0.23711711168289185,
0.024721626192331314,
-0.11552847921848297,
-0.3413068950176239,
0.33265140652656555,
-0.26121440529823303,
-0.2434411197900772,
-0.36126455664634705,
0.2488858550786972,
0.06879548728466034,
0.05651475489139557,
0.5541006326675415,
0.21984510123729706,
-0.23305830359458923,
0.19618742167949677,
0.18643945455551147,
0.20843088626861572,
0.35766276717185974,
-0.11696568876504898,
-0.1894855946302414,
0.37078505754470825,
-0.12612290680408478,
0.045504819601774216,
0.32293692231178284,
0.060861486941576004,
0.1504034847021103,
0.15265081822872162,
0.04583302512764931,
-0.07808246463537216,
0.10904104262590408,
0.2638658583164215,
-0.15170688927173615,
-0.26286306977272034,
-0.159279465675354,
0.2791357934474945,
0.03386804088950157,
0.03283635526895523,
0.1709965318441391,
0.26578256487846375,
-0.2759476602077484,
0.260355681180954,
0.0742357149720192,
0.7768946886062622,
-0.23958037793636322,
0.11408136039972305,
0.32812097668647766,
0.05374189838767052,
0.4346497654914856,
0.04348861798644066,
0.15716485679149628,
-0.3723917007446289,
-0.1937270313501358,
-0.07488787174224854,
0.11303960531949997,
0.3295864760875702,
0.25531205534935,
-0.07783504575490952,
0.0635724887251854,
-0.19738835096359253,
0.10248159617185593,
-0.031882643699645996,
-0.0904393345117569,
-0.046385619789361954,
-0.16465139389038086,
-0.12089904397726059,
0.20548401772975922,
-0.23719175159931183,
-0.006219238042831421,
-0.08693154901266098,
0.11282317340373993,
0.008213697001338005,
0.0054315864108502865,
0.21170805394649506,
0.20363479852676392,
-0.06266537308692932,
-0.00973571091890335,
0.07047240436077118,
-0.370612233877182,
-0.26450538635253906,
0.3550116717815399,
-0.09365619719028473,
0.1750405877828598,
-0.21980570256710052,
0.2275969237089157,
-0.012030906975269318,
0.34092214703559875,
-0.0396481528878212,
0.06231513246893883,
0.20495013892650604,
0.1819179505109787,
-0.37089115381240845,
-0.041015625,
-0.18367817997932434,
0.05226605013012886,
0.2578769326210022,
0.07053175568580627,
-0.07345429807901382,
-0.1813298761844635,
-0.1740647703409195,
0.2162877321243286,
0.5732864141464233,
-0.17365886270999908,
0.20712685585021973,
0.036021023988723755,
-0.07700499147176743,
-0.06914662569761276,
0.17171649634838104,
-0.4382975995540619,
0.03635134547948837,
0.5808656811714172,
0.28187334537506104,
0.01859680749475956,
0.5702983140945435,
-0.1667618751525879,
-0.29552021622657776,
-0.39428117871284485,
0.16752023994922638,
0.21116943657398224,
-0.18576449155807495,
0.2873871624469757,
0.26733851432800293,
-0.022609630599617958,
0.21547484397888184,
0.1839441955089569,
-0.20950360596179962,
0.26036766171455383,
-0.25474798679351807,
-0.1035543903708458,
-0.3544381856918335,
0.17789150774478912,
0.008164573460817337,
0.2380920648574829,
0.447313129901886,
-0.1777174472808838,
0.15183545649051666,
-0.2293003797531128,
-0.41385290026664734,
0.17096395790576935,
-0.09408263117074966,
0.12326280027627945,
0.0771709457039833,
0.024608241394162178,
0.07021206617355347,
-0.02850376069545746,
0.3732283413410187,
-0.13187119364738464,
0.04368411749601364,
-0.31290680170059204,
-0.08693370223045349,
0.11108490079641342,
-0.1484403908252716,
0.12093963474035263,
0.1645793318748474,
-0.20570255815982819,
-0.017234448343515396,
-0.1350507140159607,
0.27275413274765015,
0.32028520107269287,
-0.01970355212688446,
0.05760951712727547,
0.14492082595825195,
0.24733507633209229,
-0.1819557100534439,
0.002997202333062887,
-0.01639270968735218,
-0.16266480088233948,
0.024119718000292778,
0.07951401174068451,
0.012282067909836769,
-0.05899569019675255,
-0.00245481263846159,
0.13762901723384857,
0.023325946182012558,
0.2721766233444214,
0.16064845025539398,
-0.3519974946975708,
-0.07325419783592224,
0.10602053254842758,
0.1569841057062149,
0.05480889230966568,
-0.17384657263755798,
-0.13678961992263794,
-0.12122703343629837,
0.2659430503845215,
-0.3304692804813385,
-0.08334765583276749,
0.0950533077120781,
-0.03359527513384819,
0.22904856503009796,
0.0038330291863530874,
-0.03625354543328285,
-0.07021375745534897,
0.09507712721824646,
-0.05214054882526398,
0.20724427700042725,
-0.32453083992004395,
0.1212557777762413,
0.4626903533935547,
-0.17411790788173676,
-0.09268161654472351,
0.27863815426826477,
-0.029920661821961403,
-0.18218038976192474,
0.5160154104232788,
0.11307669430971146,
0.3492172360420227,
-0.08382593095302582,
0.13972976803779602,
-0.5744352340698242,
-0.7401204705238342,
0.23743116855621338,
0.3691050708293915,
-0.32650068402290344,
0.028951719403266907,
0.22775115072727203,
0.03393688052892685,
-0.2250555455684662,
-0.26198166608810425,
-0.06998630613088608,
0.19040971994400024,
-0.42436492443084717,
-0.266136109828949,
-0.3892296850681305,
-0.09980019927024841,
-0.16103054583072662,
0.019040759652853012,
-0.024043671786785126,
-0.0523248054087162,
0.13510170578956604,
0.04981834441423416,
-0.09829936921596527,
-0.27202725410461426,
0.29811233282089233,
-0.03511426970362663,
-0.1397881805896759,
-0.061878591775894165,
0.356950968503952,
0.045455802232027054,
0.23463526368141174,
0.4361940920352936,
0.3473842740058899,
0.277849942445755,
0.042488694190979004,
0.270010769367218,
-0.01236470602452755,
0.19865651428699493,
-0.34118279814720154,
-0.009855047799646854,
0.030057065188884735,
0.23118111491203308,
0.462973415851593,
0.1925268918275833,
0.27864697575569153,
-0.2350122481584549,
0.09000010043382645,
0.3599746525287628,
0.0032372118439525366,
-0.05565575137734413,
0.292670875787735,
0.15612192451953888,
-0.10507247596979141,
-0.33093011379241943,
-0.19511651992797852,
-0.5435897707939148,
-0.08840402215719223,
0.2666378617286682,
-0.06248822808265686,
0.10395903140306473,
0.039279740303754807,
0.1592906266450882,
0.1645132452249527,
0.29188936948776245,
0.01334324013441801,
-0.15855595469474792,
-0.24015317857265472,
0.03848201408982277,
-0.783525288105011,
0.38711950182914734,
0.13196291029453278,
0.18361426889896393,
-0.191962331533432,
0.05476083979010582,
0.0029396889731287956,
-0.23149478435516357,
0.08111878484487534,
-0.020941192284226418,
0.4347730875015259,
-0.09827631711959839,
-0.27455824613571167,
0.14307540655136108,
0.12130900472402573,
-0.204488143324852,
-0.2658034861087799,
-0.2532459497451782,
0.07420582324266434,
0.03574527055025101,
0.17284823954105377,
0.10996066778898239,
-0.1343659907579422,
-0.13882389664649963,
0.22958147525787354,
0.3340460956096649,
-0.03706800192594528,
0.4089738130569458,
-0.12281012535095215,
0.07247599214315414,
-0.30761873722076416,
-0.10771525651216507,
-0.08644238114356995,
0.36518216133117676,
0.38931068778038025,
0.21159504354000092,
-0.006245812401175499,
0.29810577630996704,
0.126640185713768,
-0.12427633255720139,
-0.0014022374525666237,
0.3446885347366333,
-0.6421847343444824,
0.3993760645389557,
-0.11592202633619308,
-0.08905976265668869,
-0.015157569199800491,
-0.035892587155103683,
0.24204614758491516,
0.19116155803203583,
-0.15957920253276825,
-0.04399764910340309,
0.3200947940349579,
-0.006930308882147074,
-0.2567274570465088,
-0.17787443101406097,
0.27806100249290466,
0.03745044395327568,
-0.17338059842586517,
-0.31666722893714905,
0.0442185178399086,
0.4314008057117462,
-0.3411630392074585,
-0.24618445336818695,
0.34634900093078613,
-0.30456605553627014,
0.03302578628063202,
-0.33299896121025085,
0.09535352885723114,
0.2598247528076172,
-0.05960148945450783,
-0.08454739302396774,
-0.2150353640317917
] |
https://github.com/huggingface/datasets/issues/3181
|
`None` converted to `"None"` when loading a dataset
|
Hi @eladsegal,
Use `None`. As @albertvillanova correctly pointed out, this change in conversion was introduced (by mistake) in #3158. To avoid it, install the earlier revision with:
```
pip install git+https://github.com/huggingface/datasets.git@8107844ec0e7add005db0585c772ee20adc01a5e
```
I'm making all the feature types nullable as we speak, and the fix will be merged probably early next week.
|
## Describe the bug
When loading a dataset `None` values of the type `NoneType` are converted to `'None'` of the type `str`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
qasper = load_dataset("qasper", split="train", download_mode="reuse_cache_if_exists")
print(qasper[60]["full_text"]["section_name"])
```
When installing version 1.1.40, the output is
`[None, 'Introduction', 'Benchmark Datasets', ...]`
When installing from the master branch, the output is
`['None', 'Introduction', 'Benchmark Datasets', ...]`
Notice how the first element was changed from `NoneType` to `str`.
## Expected results
`None` should stay as is.
## Actual results
`None` is converted to a string.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 52 |
`None` converted to `"None"` when loading a dataset
|
[
-0.14572231471538544,
-0.06071746349334717,
-0.12706436216831207,
0.2379978448152542,
0.45005345344543457,
-0.020587459206581116,
0.3967016935348511,
0.1279798150062561,
0.2153172641992569,
0.39944177865982056,
-0.03723686933517456,
0.23139357566833496,
0.040836937725543976,
-0.022819308564066887,
-0.11691629886627197,
0.27749744057655334,
-0.06977861374616623,
0.40380752086639404,
-0.16806818544864655,
-0.11282296478748322,
-0.26461800932884216,
0.15586617588996887,
-0.17404843866825104,
-0.052364032715559006,
-0.36333468556404114,
-0.19442316889762878,
-0.0013637467054650187,
0.29135286808013916,
-0.13847310841083527,
-0.388823926448822,
-0.05577998235821724,
0.06800840049982071,
-0.24867506325244904,
0.23745258152484894,
-0.00010781394666992128,
0.1294008195400238,
0.4741247892379761,
-0.02634090930223465,
-0.4123633801937103,
-0.14446471631526947,
-0.2568211555480957,
-0.1780059039592743,
0.21548742055892944,
-0.14659959077835083,
-0.06843695044517517,
-0.12822061777114868,
-0.011337964795529842,
-0.4811622202396393,
-0.012041096575558186,
0.1929161101579666,
0.3149226903915405,
0.32473814487457275,
-0.467852920293808,
-0.1568366438150406,
0.1432521492242813,
0.23013004660606384,
0.0833171084523201,
0.17341095209121704,
0.13318267464637756,
0.03007073886692524,
-0.18742673099040985,
0.24318276345729828,
-0.21110378205776215,
-0.09236381202936172,
0.06361837685108185,
0.08838377147912979,
0.1521110087633133,
-0.020678957924246788,
0.35703128576278687,
0.2708452641963959,
0.48937317728996277,
-0.014112192206084728,
-0.1398695707321167,
0.011656315997242928,
0.4708491265773773,
-0.25865936279296875,
0.06987026333808899,
0.022974463179707527,
-0.009338853880763054,
-0.0253897812217474,
-0.020127132534980774,
-0.29835978150367737,
-0.03875968977808952,
-0.0013431595871225,
-0.6383301019668579,
0.24242840707302094,
-0.2169038951396942,
-0.05217284709215164,
-0.017194820567965508,
-0.22095303237438202,
0.07460156828165054,
-0.12407982349395752,
-0.11844397336244583,
0.03943682089447975,
0.05347679182887077,
0.16674572229385376,
0.1309518814086914,
0.1662619709968567,
0.03563511744141579,
-0.1803179532289505,
0.25045257806777954,
0.10087334364652634,
-0.040896859019994736,
-0.0059815156273543835,
0.11601803451776505,
0.05672783404588699,
0.31797388195991516,
-0.13393418490886688,
0.1912810206413269,
-0.04089704155921936,
-0.06535790860652924,
0.08853143453598022,
-0.023346414789557457,
0.017174210399389267,
0.04240603744983673,
-0.05303718522191048,
0.5128752589225769,
-0.1747819483280182,
-0.4069445729255676,
-0.004964436404407024,
-0.0010588011937215924,
0.09628447145223618,
-0.011053456924855709,
0.2086036205291748,
0.16691555082798004,
0.2003917694091797,
0.2185734659433365,
0.10115235298871994,
-0.36846640706062317,
-0.2676713764667511,
-0.4703409671783447,
-0.04474152624607086,
-0.17256657779216766,
-0.24931791424751282,
0.15551631152629852,
0.07392982393503189,
-0.03372955322265625,
0.15318173170089722,
-0.18794719874858856,
-0.08280668407678604,
-0.0939440131187439,
-0.10034456849098206,
0.11720866709947586,
0.3600369691848755,
-0.04968268796801567,
0.12473704665899277,
0.3757419288158417,
-0.24890317022800446,
0.05523523688316345,
0.6049396395683289,
-0.3829843997955322,
-0.040893856436014175,
-0.19790425896644592,
0.2764374315738678,
-0.22491887211799622,
0.05451219528913498,
0.02427361160516739,
0.3279806077480316,
-0.14477314054965973,
-0.14345622062683105,
-0.17856591939926147,
-0.13786691427230835,
-0.18023988604545593,
-0.0039051969069987535,
-0.016635296866297722,
0.7633919715881348,
-0.6208245754241943,
-0.25836992263793945,
-0.23743422329425812,
-0.4261711537837982,
0.16800248622894287,
-0.0038421417120844126,
-0.15362167358398438,
0.07206691056489944,
-0.20306991040706635,
0.27323874831199646,
0.37996557354927063,
-0.029268216341733932,
-0.23096908628940582,
0.3364275097846985,
-0.36026930809020996,
-0.05692020058631897,
-0.05839439854025841,
-0.07072371244430542,
-0.028582211583852768,
0.08732481300830841,
0.23076269030570984,
-0.14722852408885956,
0.25161758065223694,
0.015407244674861431,
-0.2662528455257416,
-0.1615317314863205,
0.464404821395874,
0.010476406663656235,
0.08537336438894272,
0.25054216384887695,
0.02152985706925392,
-0.04157109931111336,
0.052331190556287766,
-0.13321447372436523,
0.10164019465446472,
0.4124312400817871,
-0.06535398215055466,
0.036835893988609314,
-0.05410539358854294,
-0.054721493273973465,
-0.5389366745948792,
-0.08535265177488327,
-0.07396075129508972,
0.14947937428951263,
-0.2632220983505249,
-0.20222575962543488,
-0.06714341789484024,
-0.004485103767365217,
0.04136303812265396,
0.2686007618904114,
0.2915503978729248,
0.22586150467395782,
-0.5724323987960815,
-0.03751889243721962,
-0.09783875197172165,
0.10153253376483917,
-0.04453454166650772,
-0.0070673152804374695,
-0.3165827989578247,
0.14960364997386932,
0.10603941231966019,
-0.23077984154224396,
-0.13869740068912506,
0.3174286186695099,
0.17788375914096832,
0.08686251193284988,
-0.15760229527950287,
0.2754370868206024,
-0.20632560551166534,
0.0713106095790863,
-0.050811417400836945,
-0.20304307341575623,
0.17197878658771515,
-0.05651307478547096,
0.25298011302948,
0.14506188035011292,
0.26568570733070374,
-0.03117593191564083,
-0.12919308245182037,
0.28688764572143555,
-0.23786959052085876,
0.15842367708683014,
-0.19466379284858704,
-0.09548235684633255,
0.2850043475627899,
-0.02437630668282509,
-0.10211632400751114,
-0.594786524772644,
-0.0021061173174530268,
0.42859384417533875,
0.18013150990009308,
0.39207565784454346,
-0.2117932289838791,
0.13989077508449554,
0.18024374544620514,
-0.2609306573867798,
0.17533859610557556,
0.03232106938958168,
-0.18462638556957245,
-0.24712695181369781,
0.012630704790353775,
0.17650792002677917,
0.5517866015434265,
0.35408467054367065,
0.15797504782676697,
-0.03424583375453949,
-0.015119836665689945,
-0.2279174029827118,
0.26298943161964417,
0.0064216842874884605,
0.20875652134418488,
0.36169329285621643,
0.15422271192073822,
-0.21814586222171783,
-0.48874524235725403,
-0.06440835446119308,
0.2759544551372528,
0.2875237464904785,
-0.5602508783340454,
-0.07110437005758286,
-0.5575052499771118,
-0.018793240189552307,
0.14506961405277252,
0.1026512011885643,
-0.13102011382579803,
-0.4136364758014679,
0.07006560266017914,
-0.14995455741882324,
-0.08320670574903488,
0.06127552315592766,
-0.2765856683254242,
0.13345791399478912,
-0.11022046208381653,
0.15059617161750793,
-0.24059297144412994,
-0.13939499855041504,
-0.18983101844787598,
0.12886466085910797,
0.11166568100452423,
0.2503335773944855,
0.03420916572213173,
-0.04667811468243599,
-0.13801570236682892,
-0.0779416412115097,
-0.03176882863044739,
-0.007465094793587923,
-0.11120162904262543,
0.09182105213403702,
0.24196700751781464,
0.43990764021873474,
-0.04996929317712784,
0.04466579109430313,
0.2082061916589737,
-0.05259361118078232,
-0.10543662309646606,
0.16391532123088837,
-0.3327575623989105,
0.10028081387281418,
-0.2981746792793274,
-0.3231912851333618,
-0.20988111197948456,
-0.15669657289981842,
-0.2624693512916565,
0.060080964118242264,
0.06678356975317001,
0.2969803214073181,
0.19874732196331024,
0.2179003655910492,
0.09983153641223907,
0.05157362297177315,
-0.38550496101379395,
-0.19070418179035187,
0.3083955645561218,
-0.05219573900103569,
-0.18056580424308777,
0.1915716826915741,
-0.10054799169301987,
0.09584292024374008,
0.23603315651416779,
-0.1726546287536621,
0.00938024278730154,
0.15070977807044983,
-0.018565019592642784,
-0.2289866954088211,
-0.11289255321025848,
0.4029140770435333,
0.2969072461128235,
-0.25622913241386414,
-0.10403446108102798,
-0.07035420089960098,
0.0494794100522995,
-0.16051097214221954,
0.03530395030975342,
-0.1469345986843109,
0.21108800172805786,
-0.1983698457479477,
0.25647398829460144,
-0.16973939538002014,
-0.15939535200595856,
0.15468257665634155,
-0.29230907559394836,
0.6088869571685791,
-0.08875023573637009,
-0.08371104300022125,
-0.20529794692993164,
0.2810591757297516,
0.12798692286014557,
0.24435830116271973,
-0.2146635502576828,
-0.2042313665151596,
0.10112634301185608,
-0.05030641332268715,
-0.6612595915794373,
-0.14544826745986938,
0.10729409754276276,
-0.34210169315338135,
-0.037022665143013,
0.08342364430427551,
0.15194736421108246,
-0.22390411794185638,
-0.08705635368824005,
-0.02014331705868244,
-0.006090950220823288,
0.07924466580152512,
-0.242628812789917,
-0.4244078993797302,
0.2047254741191864,
-0.3244014084339142,
0.36549460887908936,
-0.08826979994773865,
-0.031137285754084587,
-0.1270904392004013,
-0.23052361607551575,
0.27500513195991516,
-0.05541275814175606,
0.6925384402275085,
-0.17908775806427002,
0.14168649911880493,
0.4672732651233673,
0.1425250768661499,
-0.3662782311439514,
-0.002299061045050621,
-0.36846834421157837,
0.23620569705963135,
-0.02889367565512657,
0.27852755784988403,
-0.22805455327033997,
-0.22302012145519257,
0.16069309413433075,
0.045940838754177094,
-0.07421504706144333,
-0.00012325207353569567,
-0.3742159307003021,
-0.23711711168289185,
0.024721626192331314,
-0.11552847921848297,
-0.3413068950176239,
0.33265140652656555,
-0.26121440529823303,
-0.2434411197900772,
-0.36126455664634705,
0.2488858550786972,
0.06879548728466034,
0.05651475489139557,
0.5541006326675415,
0.21984510123729706,
-0.23305830359458923,
0.19618742167949677,
0.18643945455551147,
0.20843088626861572,
0.35766276717185974,
-0.11696568876504898,
-0.1894855946302414,
0.37078505754470825,
-0.12612290680408478,
0.045504819601774216,
0.32293692231178284,
0.060861486941576004,
0.1504034847021103,
0.15265081822872162,
0.04583302512764931,
-0.07808246463537216,
0.10904104262590408,
0.2638658583164215,
-0.15170688927173615,
-0.26286306977272034,
-0.159279465675354,
0.2791357934474945,
0.03386804088950157,
0.03283635526895523,
0.1709965318441391,
0.26578256487846375,
-0.2759476602077484,
0.260355681180954,
0.0742357149720192,
0.7768946886062622,
-0.23958037793636322,
0.11408136039972305,
0.32812097668647766,
0.05374189838767052,
0.4346497654914856,
0.04348861798644066,
0.15716485679149628,
-0.3723917007446289,
-0.1937270313501358,
-0.07488787174224854,
0.11303960531949997,
0.3295864760875702,
0.25531205534935,
-0.07783504575490952,
0.0635724887251854,
-0.19738835096359253,
0.10248159617185593,
-0.031882643699645996,
-0.0904393345117569,
-0.046385619789361954,
-0.16465139389038086,
-0.12089904397726059,
0.20548401772975922,
-0.23719175159931183,
-0.006219238042831421,
-0.08693154901266098,
0.11282317340373993,
0.008213697001338005,
0.0054315864108502865,
0.21170805394649506,
0.20363479852676392,
-0.06266537308692932,
-0.00973571091890335,
0.07047240436077118,
-0.370612233877182,
-0.26450538635253906,
0.3550116717815399,
-0.09365619719028473,
0.1750405877828598,
-0.21980570256710052,
0.2275969237089157,
-0.012030906975269318,
0.34092214703559875,
-0.0396481528878212,
0.06231513246893883,
0.20495013892650604,
0.1819179505109787,
-0.37089115381240845,
-0.041015625,
-0.18367817997932434,
0.05226605013012886,
0.2578769326210022,
0.07053175568580627,
-0.07345429807901382,
-0.1813298761844635,
-0.1740647703409195,
0.2162877321243286,
0.5732864141464233,
-0.17365886270999908,
0.20712685585021973,
0.036021023988723755,
-0.07700499147176743,
-0.06914662569761276,
0.17171649634838104,
-0.4382975995540619,
0.03635134547948837,
0.5808656811714172,
0.28187334537506104,
0.01859680749475956,
0.5702983140945435,
-0.1667618751525879,
-0.29552021622657776,
-0.39428117871284485,
0.16752023994922638,
0.21116943657398224,
-0.18576449155807495,
0.2873871624469757,
0.26733851432800293,
-0.022609630599617958,
0.21547484397888184,
0.1839441955089569,
-0.20950360596179962,
0.26036766171455383,
-0.25474798679351807,
-0.1035543903708458,
-0.3544381856918335,
0.17789150774478912,
0.008164573460817337,
0.2380920648574829,
0.447313129901886,
-0.1777174472808838,
0.15183545649051666,
-0.2293003797531128,
-0.41385290026664734,
0.17096395790576935,
-0.09408263117074966,
0.12326280027627945,
0.0771709457039833,
0.024608241394162178,
0.07021206617355347,
-0.02850376069545746,
0.3732283413410187,
-0.13187119364738464,
0.04368411749601364,
-0.31290680170059204,
-0.08693370223045349,
0.11108490079641342,
-0.1484403908252716,
0.12093963474035263,
0.1645793318748474,
-0.20570255815982819,
-0.017234448343515396,
-0.1350507140159607,
0.27275413274765015,
0.32028520107269287,
-0.01970355212688446,
0.05760951712727547,
0.14492082595825195,
0.24733507633209229,
-0.1819557100534439,
0.002997202333062887,
-0.01639270968735218,
-0.16266480088233948,
0.024119718000292778,
0.07951401174068451,
0.012282067909836769,
-0.05899569019675255,
-0.00245481263846159,
0.13762901723384857,
0.023325946182012558,
0.2721766233444214,
0.16064845025539398,
-0.3519974946975708,
-0.07325419783592224,
0.10602053254842758,
0.1569841057062149,
0.05480889230966568,
-0.17384657263755798,
-0.13678961992263794,
-0.12122703343629837,
0.2659430503845215,
-0.3304692804813385,
-0.08334765583276749,
0.0950533077120781,
-0.03359527513384819,
0.22904856503009796,
0.0038330291863530874,
-0.03625354543328285,
-0.07021375745534897,
0.09507712721824646,
-0.05214054882526398,
0.20724427700042725,
-0.32453083992004395,
0.1212557777762413,
0.4626903533935547,
-0.17411790788173676,
-0.09268161654472351,
0.27863815426826477,
-0.029920661821961403,
-0.18218038976192474,
0.5160154104232788,
0.11307669430971146,
0.3492172360420227,
-0.08382593095302582,
0.13972976803779602,
-0.5744352340698242,
-0.7401204705238342,
0.23743116855621338,
0.3691050708293915,
-0.32650068402290344,
0.028951719403266907,
0.22775115072727203,
0.03393688052892685,
-0.2250555455684662,
-0.26198166608810425,
-0.06998630613088608,
0.19040971994400024,
-0.42436492443084717,
-0.266136109828949,
-0.3892296850681305,
-0.09980019927024841,
-0.16103054583072662,
0.019040759652853012,
-0.024043671786785126,
-0.0523248054087162,
0.13510170578956604,
0.04981834441423416,
-0.09829936921596527,
-0.27202725410461426,
0.29811233282089233,
-0.03511426970362663,
-0.1397881805896759,
-0.061878591775894165,
0.356950968503952,
0.045455802232027054,
0.23463526368141174,
0.4361940920352936,
0.3473842740058899,
0.277849942445755,
0.042488694190979004,
0.270010769367218,
-0.01236470602452755,
0.19865651428699493,
-0.34118279814720154,
-0.009855047799646854,
0.030057065188884735,
0.23118111491203308,
0.462973415851593,
0.1925268918275833,
0.27864697575569153,
-0.2350122481584549,
0.09000010043382645,
0.3599746525287628,
0.0032372118439525366,
-0.05565575137734413,
0.292670875787735,
0.15612192451953888,
-0.10507247596979141,
-0.33093011379241943,
-0.19511651992797852,
-0.5435897707939148,
-0.08840402215719223,
0.2666378617286682,
-0.06248822808265686,
0.10395903140306473,
0.039279740303754807,
0.1592906266450882,
0.1645132452249527,
0.29188936948776245,
0.01334324013441801,
-0.15855595469474792,
-0.24015317857265472,
0.03848201408982277,
-0.783525288105011,
0.38711950182914734,
0.13196291029453278,
0.18361426889896393,
-0.191962331533432,
0.05476083979010582,
0.0029396889731287956,
-0.23149478435516357,
0.08111878484487534,
-0.020941192284226418,
0.4347730875015259,
-0.09827631711959839,
-0.27455824613571167,
0.14307540655136108,
0.12130900472402573,
-0.204488143324852,
-0.2658034861087799,
-0.2532459497451782,
0.07420582324266434,
0.03574527055025101,
0.17284823954105377,
0.10996066778898239,
-0.1343659907579422,
-0.13882389664649963,
0.22958147525787354,
0.3340460956096649,
-0.03706800192594528,
0.4089738130569458,
-0.12281012535095215,
0.07247599214315414,
-0.30761873722076416,
-0.10771525651216507,
-0.08644238114356995,
0.36518216133117676,
0.38931068778038025,
0.21159504354000092,
-0.006245812401175499,
0.29810577630996704,
0.126640185713768,
-0.12427633255720139,
-0.0014022374525666237,
0.3446885347366333,
-0.6421847343444824,
0.3993760645389557,
-0.11592202633619308,
-0.08905976265668869,
-0.015157569199800491,
-0.035892587155103683,
0.24204614758491516,
0.19116155803203583,
-0.15957920253276825,
-0.04399764910340309,
0.3200947940349579,
-0.006930308882147074,
-0.2567274570465088,
-0.17787443101406097,
0.27806100249290466,
0.03745044395327568,
-0.17338059842586517,
-0.31666722893714905,
0.0442185178399086,
0.4314008057117462,
-0.3411630392074585,
-0.24618445336818695,
0.34634900093078613,
-0.30456605553627014,
0.03302578628063202,
-0.33299896121025085,
0.09535352885723114,
0.2598247528076172,
-0.05960148945450783,
-0.08454739302396774,
-0.2150353640317917
] |
https://github.com/huggingface/datasets/issues/3181
|
`None` converted to `"None"` when loading a dataset
|
https://github.com/huggingface/datasets/pull/3195 fixed it, we'll do a new release soon :)
For now feel free to install `datasets` from the master branch
|
## Describe the bug
When loading a dataset `None` values of the type `NoneType` are converted to `'None'` of the type `str`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
qasper = load_dataset("qasper", split="train", download_mode="reuse_cache_if_exists")
print(qasper[60]["full_text"]["section_name"])
```
When installing version 1.1.40, the output is
`[None, 'Introduction', 'Benchmark Datasets', ...]`
When installing from the master branch, the output is
`['None', 'Introduction', 'Benchmark Datasets', ...]`
Notice how the first element was changed from `NoneType` to `str`.
## Expected results
`None` should stay as is.
## Actual results
`None` is converted to a string.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 21 |
`None` converted to `"None"` when loading a dataset
|
[
-0.14572231471538544,
-0.06071746349334717,
-0.12706436216831207,
0.2379978448152542,
0.45005345344543457,
-0.020587459206581116,
0.3967016935348511,
0.1279798150062561,
0.2153172641992569,
0.39944177865982056,
-0.03723686933517456,
0.23139357566833496,
0.040836937725543976,
-0.022819308564066887,
-0.11691629886627197,
0.27749744057655334,
-0.06977861374616623,
0.40380752086639404,
-0.16806818544864655,
-0.11282296478748322,
-0.26461800932884216,
0.15586617588996887,
-0.17404843866825104,
-0.052364032715559006,
-0.36333468556404114,
-0.19442316889762878,
-0.0013637467054650187,
0.29135286808013916,
-0.13847310841083527,
-0.388823926448822,
-0.05577998235821724,
0.06800840049982071,
-0.24867506325244904,
0.23745258152484894,
-0.00010781394666992128,
0.1294008195400238,
0.4741247892379761,
-0.02634090930223465,
-0.4123633801937103,
-0.14446471631526947,
-0.2568211555480957,
-0.1780059039592743,
0.21548742055892944,
-0.14659959077835083,
-0.06843695044517517,
-0.12822061777114868,
-0.011337964795529842,
-0.4811622202396393,
-0.012041096575558186,
0.1929161101579666,
0.3149226903915405,
0.32473814487457275,
-0.467852920293808,
-0.1568366438150406,
0.1432521492242813,
0.23013004660606384,
0.0833171084523201,
0.17341095209121704,
0.13318267464637756,
0.03007073886692524,
-0.18742673099040985,
0.24318276345729828,
-0.21110378205776215,
-0.09236381202936172,
0.06361837685108185,
0.08838377147912979,
0.1521110087633133,
-0.020678957924246788,
0.35703128576278687,
0.2708452641963959,
0.48937317728996277,
-0.014112192206084728,
-0.1398695707321167,
0.011656315997242928,
0.4708491265773773,
-0.25865936279296875,
0.06987026333808899,
0.022974463179707527,
-0.009338853880763054,
-0.0253897812217474,
-0.020127132534980774,
-0.29835978150367737,
-0.03875968977808952,
-0.0013431595871225,
-0.6383301019668579,
0.24242840707302094,
-0.2169038951396942,
-0.05217284709215164,
-0.017194820567965508,
-0.22095303237438202,
0.07460156828165054,
-0.12407982349395752,
-0.11844397336244583,
0.03943682089447975,
0.05347679182887077,
0.16674572229385376,
0.1309518814086914,
0.1662619709968567,
0.03563511744141579,
-0.1803179532289505,
0.25045257806777954,
0.10087334364652634,
-0.040896859019994736,
-0.0059815156273543835,
0.11601803451776505,
0.05672783404588699,
0.31797388195991516,
-0.13393418490886688,
0.1912810206413269,
-0.04089704155921936,
-0.06535790860652924,
0.08853143453598022,
-0.023346414789557457,
0.017174210399389267,
0.04240603744983673,
-0.05303718522191048,
0.5128752589225769,
-0.1747819483280182,
-0.4069445729255676,
-0.004964436404407024,
-0.0010588011937215924,
0.09628447145223618,
-0.011053456924855709,
0.2086036205291748,
0.16691555082798004,
0.2003917694091797,
0.2185734659433365,
0.10115235298871994,
-0.36846640706062317,
-0.2676713764667511,
-0.4703409671783447,
-0.04474152624607086,
-0.17256657779216766,
-0.24931791424751282,
0.15551631152629852,
0.07392982393503189,
-0.03372955322265625,
0.15318173170089722,
-0.18794719874858856,
-0.08280668407678604,
-0.0939440131187439,
-0.10034456849098206,
0.11720866709947586,
0.3600369691848755,
-0.04968268796801567,
0.12473704665899277,
0.3757419288158417,
-0.24890317022800446,
0.05523523688316345,
0.6049396395683289,
-0.3829843997955322,
-0.040893856436014175,
-0.19790425896644592,
0.2764374315738678,
-0.22491887211799622,
0.05451219528913498,
0.02427361160516739,
0.3279806077480316,
-0.14477314054965973,
-0.14345622062683105,
-0.17856591939926147,
-0.13786691427230835,
-0.18023988604545593,
-0.0039051969069987535,
-0.016635296866297722,
0.7633919715881348,
-0.6208245754241943,
-0.25836992263793945,
-0.23743422329425812,
-0.4261711537837982,
0.16800248622894287,
-0.0038421417120844126,
-0.15362167358398438,
0.07206691056489944,
-0.20306991040706635,
0.27323874831199646,
0.37996557354927063,
-0.029268216341733932,
-0.23096908628940582,
0.3364275097846985,
-0.36026930809020996,
-0.05692020058631897,
-0.05839439854025841,
-0.07072371244430542,
-0.028582211583852768,
0.08732481300830841,
0.23076269030570984,
-0.14722852408885956,
0.25161758065223694,
0.015407244674861431,
-0.2662528455257416,
-0.1615317314863205,
0.464404821395874,
0.010476406663656235,
0.08537336438894272,
0.25054216384887695,
0.02152985706925392,
-0.04157109931111336,
0.052331190556287766,
-0.13321447372436523,
0.10164019465446472,
0.4124312400817871,
-0.06535398215055466,
0.036835893988609314,
-0.05410539358854294,
-0.054721493273973465,
-0.5389366745948792,
-0.08535265177488327,
-0.07396075129508972,
0.14947937428951263,
-0.2632220983505249,
-0.20222575962543488,
-0.06714341789484024,
-0.004485103767365217,
0.04136303812265396,
0.2686007618904114,
0.2915503978729248,
0.22586150467395782,
-0.5724323987960815,
-0.03751889243721962,
-0.09783875197172165,
0.10153253376483917,
-0.04453454166650772,
-0.0070673152804374695,
-0.3165827989578247,
0.14960364997386932,
0.10603941231966019,
-0.23077984154224396,
-0.13869740068912506,
0.3174286186695099,
0.17788375914096832,
0.08686251193284988,
-0.15760229527950287,
0.2754370868206024,
-0.20632560551166534,
0.0713106095790863,
-0.050811417400836945,
-0.20304307341575623,
0.17197878658771515,
-0.05651307478547096,
0.25298011302948,
0.14506188035011292,
0.26568570733070374,
-0.03117593191564083,
-0.12919308245182037,
0.28688764572143555,
-0.23786959052085876,
0.15842367708683014,
-0.19466379284858704,
-0.09548235684633255,
0.2850043475627899,
-0.02437630668282509,
-0.10211632400751114,
-0.594786524772644,
-0.0021061173174530268,
0.42859384417533875,
0.18013150990009308,
0.39207565784454346,
-0.2117932289838791,
0.13989077508449554,
0.18024374544620514,
-0.2609306573867798,
0.17533859610557556,
0.03232106938958168,
-0.18462638556957245,
-0.24712695181369781,
0.012630704790353775,
0.17650792002677917,
0.5517866015434265,
0.35408467054367065,
0.15797504782676697,
-0.03424583375453949,
-0.015119836665689945,
-0.2279174029827118,
0.26298943161964417,
0.0064216842874884605,
0.20875652134418488,
0.36169329285621643,
0.15422271192073822,
-0.21814586222171783,
-0.48874524235725403,
-0.06440835446119308,
0.2759544551372528,
0.2875237464904785,
-0.5602508783340454,
-0.07110437005758286,
-0.5575052499771118,
-0.018793240189552307,
0.14506961405277252,
0.1026512011885643,
-0.13102011382579803,
-0.4136364758014679,
0.07006560266017914,
-0.14995455741882324,
-0.08320670574903488,
0.06127552315592766,
-0.2765856683254242,
0.13345791399478912,
-0.11022046208381653,
0.15059617161750793,
-0.24059297144412994,
-0.13939499855041504,
-0.18983101844787598,
0.12886466085910797,
0.11166568100452423,
0.2503335773944855,
0.03420916572213173,
-0.04667811468243599,
-0.13801570236682892,
-0.0779416412115097,
-0.03176882863044739,
-0.007465094793587923,
-0.11120162904262543,
0.09182105213403702,
0.24196700751781464,
0.43990764021873474,
-0.04996929317712784,
0.04466579109430313,
0.2082061916589737,
-0.05259361118078232,
-0.10543662309646606,
0.16391532123088837,
-0.3327575623989105,
0.10028081387281418,
-0.2981746792793274,
-0.3231912851333618,
-0.20988111197948456,
-0.15669657289981842,
-0.2624693512916565,
0.060080964118242264,
0.06678356975317001,
0.2969803214073181,
0.19874732196331024,
0.2179003655910492,
0.09983153641223907,
0.05157362297177315,
-0.38550496101379395,
-0.19070418179035187,
0.3083955645561218,
-0.05219573900103569,
-0.18056580424308777,
0.1915716826915741,
-0.10054799169301987,
0.09584292024374008,
0.23603315651416779,
-0.1726546287536621,
0.00938024278730154,
0.15070977807044983,
-0.018565019592642784,
-0.2289866954088211,
-0.11289255321025848,
0.4029140770435333,
0.2969072461128235,
-0.25622913241386414,
-0.10403446108102798,
-0.07035420089960098,
0.0494794100522995,
-0.16051097214221954,
0.03530395030975342,
-0.1469345986843109,
0.21108800172805786,
-0.1983698457479477,
0.25647398829460144,
-0.16973939538002014,
-0.15939535200595856,
0.15468257665634155,
-0.29230907559394836,
0.6088869571685791,
-0.08875023573637009,
-0.08371104300022125,
-0.20529794692993164,
0.2810591757297516,
0.12798692286014557,
0.24435830116271973,
-0.2146635502576828,
-0.2042313665151596,
0.10112634301185608,
-0.05030641332268715,
-0.6612595915794373,
-0.14544826745986938,
0.10729409754276276,
-0.34210169315338135,
-0.037022665143013,
0.08342364430427551,
0.15194736421108246,
-0.22390411794185638,
-0.08705635368824005,
-0.02014331705868244,
-0.006090950220823288,
0.07924466580152512,
-0.242628812789917,
-0.4244078993797302,
0.2047254741191864,
-0.3244014084339142,
0.36549460887908936,
-0.08826979994773865,
-0.031137285754084587,
-0.1270904392004013,
-0.23052361607551575,
0.27500513195991516,
-0.05541275814175606,
0.6925384402275085,
-0.17908775806427002,
0.14168649911880493,
0.4672732651233673,
0.1425250768661499,
-0.3662782311439514,
-0.002299061045050621,
-0.36846834421157837,
0.23620569705963135,
-0.02889367565512657,
0.27852755784988403,
-0.22805455327033997,
-0.22302012145519257,
0.16069309413433075,
0.045940838754177094,
-0.07421504706144333,
-0.00012325207353569567,
-0.3742159307003021,
-0.23711711168289185,
0.024721626192331314,
-0.11552847921848297,
-0.3413068950176239,
0.33265140652656555,
-0.26121440529823303,
-0.2434411197900772,
-0.36126455664634705,
0.2488858550786972,
0.06879548728466034,
0.05651475489139557,
0.5541006326675415,
0.21984510123729706,
-0.23305830359458923,
0.19618742167949677,
0.18643945455551147,
0.20843088626861572,
0.35766276717185974,
-0.11696568876504898,
-0.1894855946302414,
0.37078505754470825,
-0.12612290680408478,
0.045504819601774216,
0.32293692231178284,
0.060861486941576004,
0.1504034847021103,
0.15265081822872162,
0.04583302512764931,
-0.07808246463537216,
0.10904104262590408,
0.2638658583164215,
-0.15170688927173615,
-0.26286306977272034,
-0.159279465675354,
0.2791357934474945,
0.03386804088950157,
0.03283635526895523,
0.1709965318441391,
0.26578256487846375,
-0.2759476602077484,
0.260355681180954,
0.0742357149720192,
0.7768946886062622,
-0.23958037793636322,
0.11408136039972305,
0.32812097668647766,
0.05374189838767052,
0.4346497654914856,
0.04348861798644066,
0.15716485679149628,
-0.3723917007446289,
-0.1937270313501358,
-0.07488787174224854,
0.11303960531949997,
0.3295864760875702,
0.25531205534935,
-0.07783504575490952,
0.0635724887251854,
-0.19738835096359253,
0.10248159617185593,
-0.031882643699645996,
-0.0904393345117569,
-0.046385619789361954,
-0.16465139389038086,
-0.12089904397726059,
0.20548401772975922,
-0.23719175159931183,
-0.006219238042831421,
-0.08693154901266098,
0.11282317340373993,
0.008213697001338005,
0.0054315864108502865,
0.21170805394649506,
0.20363479852676392,
-0.06266537308692932,
-0.00973571091890335,
0.07047240436077118,
-0.370612233877182,
-0.26450538635253906,
0.3550116717815399,
-0.09365619719028473,
0.1750405877828598,
-0.21980570256710052,
0.2275969237089157,
-0.012030906975269318,
0.34092214703559875,
-0.0396481528878212,
0.06231513246893883,
0.20495013892650604,
0.1819179505109787,
-0.37089115381240845,
-0.041015625,
-0.18367817997932434,
0.05226605013012886,
0.2578769326210022,
0.07053175568580627,
-0.07345429807901382,
-0.1813298761844635,
-0.1740647703409195,
0.2162877321243286,
0.5732864141464233,
-0.17365886270999908,
0.20712685585021973,
0.036021023988723755,
-0.07700499147176743,
-0.06914662569761276,
0.17171649634838104,
-0.4382975995540619,
0.03635134547948837,
0.5808656811714172,
0.28187334537506104,
0.01859680749475956,
0.5702983140945435,
-0.1667618751525879,
-0.29552021622657776,
-0.39428117871284485,
0.16752023994922638,
0.21116943657398224,
-0.18576449155807495,
0.2873871624469757,
0.26733851432800293,
-0.022609630599617958,
0.21547484397888184,
0.1839441955089569,
-0.20950360596179962,
0.26036766171455383,
-0.25474798679351807,
-0.1035543903708458,
-0.3544381856918335,
0.17789150774478912,
0.008164573460817337,
0.2380920648574829,
0.447313129901886,
-0.1777174472808838,
0.15183545649051666,
-0.2293003797531128,
-0.41385290026664734,
0.17096395790576935,
-0.09408263117074966,
0.12326280027627945,
0.0771709457039833,
0.024608241394162178,
0.07021206617355347,
-0.02850376069545746,
0.3732283413410187,
-0.13187119364738464,
0.04368411749601364,
-0.31290680170059204,
-0.08693370223045349,
0.11108490079641342,
-0.1484403908252716,
0.12093963474035263,
0.1645793318748474,
-0.20570255815982819,
-0.017234448343515396,
-0.1350507140159607,
0.27275413274765015,
0.32028520107269287,
-0.01970355212688446,
0.05760951712727547,
0.14492082595825195,
0.24733507633209229,
-0.1819557100534439,
0.002997202333062887,
-0.01639270968735218,
-0.16266480088233948,
0.024119718000292778,
0.07951401174068451,
0.012282067909836769,
-0.05899569019675255,
-0.00245481263846159,
0.13762901723384857,
0.023325946182012558,
0.2721766233444214,
0.16064845025539398,
-0.3519974946975708,
-0.07325419783592224,
0.10602053254842758,
0.1569841057062149,
0.05480889230966568,
-0.17384657263755798,
-0.13678961992263794,
-0.12122703343629837,
0.2659430503845215,
-0.3304692804813385,
-0.08334765583276749,
0.0950533077120781,
-0.03359527513384819,
0.22904856503009796,
0.0038330291863530874,
-0.03625354543328285,
-0.07021375745534897,
0.09507712721824646,
-0.05214054882526398,
0.20724427700042725,
-0.32453083992004395,
0.1212557777762413,
0.4626903533935547,
-0.17411790788173676,
-0.09268161654472351,
0.27863815426826477,
-0.029920661821961403,
-0.18218038976192474,
0.5160154104232788,
0.11307669430971146,
0.3492172360420227,
-0.08382593095302582,
0.13972976803779602,
-0.5744352340698242,
-0.7401204705238342,
0.23743116855621338,
0.3691050708293915,
-0.32650068402290344,
0.028951719403266907,
0.22775115072727203,
0.03393688052892685,
-0.2250555455684662,
-0.26198166608810425,
-0.06998630613088608,
0.19040971994400024,
-0.42436492443084717,
-0.266136109828949,
-0.3892296850681305,
-0.09980019927024841,
-0.16103054583072662,
0.019040759652853012,
-0.024043671786785126,
-0.0523248054087162,
0.13510170578956604,
0.04981834441423416,
-0.09829936921596527,
-0.27202725410461426,
0.29811233282089233,
-0.03511426970362663,
-0.1397881805896759,
-0.061878591775894165,
0.356950968503952,
0.045455802232027054,
0.23463526368141174,
0.4361940920352936,
0.3473842740058899,
0.277849942445755,
0.042488694190979004,
0.270010769367218,
-0.01236470602452755,
0.19865651428699493,
-0.34118279814720154,
-0.009855047799646854,
0.030057065188884735,
0.23118111491203308,
0.462973415851593,
0.1925268918275833,
0.27864697575569153,
-0.2350122481584549,
0.09000010043382645,
0.3599746525287628,
0.0032372118439525366,
-0.05565575137734413,
0.292670875787735,
0.15612192451953888,
-0.10507247596979141,
-0.33093011379241943,
-0.19511651992797852,
-0.5435897707939148,
-0.08840402215719223,
0.2666378617286682,
-0.06248822808265686,
0.10395903140306473,
0.039279740303754807,
0.1592906266450882,
0.1645132452249527,
0.29188936948776245,
0.01334324013441801,
-0.15855595469474792,
-0.24015317857265472,
0.03848201408982277,
-0.783525288105011,
0.38711950182914734,
0.13196291029453278,
0.18361426889896393,
-0.191962331533432,
0.05476083979010582,
0.0029396889731287956,
-0.23149478435516357,
0.08111878484487534,
-0.020941192284226418,
0.4347730875015259,
-0.09827631711959839,
-0.27455824613571167,
0.14307540655136108,
0.12130900472402573,
-0.204488143324852,
-0.2658034861087799,
-0.2532459497451782,
0.07420582324266434,
0.03574527055025101,
0.17284823954105377,
0.10996066778898239,
-0.1343659907579422,
-0.13882389664649963,
0.22958147525787354,
0.3340460956096649,
-0.03706800192594528,
0.4089738130569458,
-0.12281012535095215,
0.07247599214315414,
-0.30761873722076416,
-0.10771525651216507,
-0.08644238114356995,
0.36518216133117676,
0.38931068778038025,
0.21159504354000092,
-0.006245812401175499,
0.29810577630996704,
0.126640185713768,
-0.12427633255720139,
-0.0014022374525666237,
0.3446885347366333,
-0.6421847343444824,
0.3993760645389557,
-0.11592202633619308,
-0.08905976265668869,
-0.015157569199800491,
-0.035892587155103683,
0.24204614758491516,
0.19116155803203583,
-0.15957920253276825,
-0.04399764910340309,
0.3200947940349579,
-0.006930308882147074,
-0.2567274570465088,
-0.17787443101406097,
0.27806100249290466,
0.03745044395327568,
-0.17338059842586517,
-0.31666722893714905,
0.0442185178399086,
0.4314008057117462,
-0.3411630392074585,
-0.24618445336818695,
0.34634900093078613,
-0.30456605553627014,
0.03302578628063202,
-0.33299896121025085,
0.09535352885723114,
0.2598247528076172,
-0.05960148945450783,
-0.08454739302396774,
-0.2150353640317917
] |
https://github.com/huggingface/datasets/issues/3181
|
`None` converted to `"None"` when loading a dataset
|
Thanks, but unfortunately looks like it isn't fixed yet 😢
[notebook for 1.14.0](https://colab.research.google.com/drive/1SV3sFXPJMWSQgbm4pr9Y1Q8OJ4JYKcDo?usp=sharing)
[notebook for master](https://colab.research.google.com/drive/145wDpuO74MmsuI0SVLcI1IswG6aHpyhi?usp=sharing)
|
## Describe the bug
When loading a dataset `None` values of the type `NoneType` are converted to `'None'` of the type `str`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
qasper = load_dataset("qasper", split="train", download_mode="reuse_cache_if_exists")
print(qasper[60]["full_text"]["section_name"])
```
When installing version 1.1.40, the output is
`[None, 'Introduction', 'Benchmark Datasets', ...]`
When installing from the master branch, the output is
`['None', 'Introduction', 'Benchmark Datasets', ...]`
Notice how the first element was changed from `NoneType` to `str`.
## Expected results
`None` should stay as is.
## Actual results
`None` is converted to a string.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 16 |
`None` converted to `"None"` when loading a dataset
|
[
-0.14572231471538544,
-0.06071746349334717,
-0.12706436216831207,
0.2379978448152542,
0.45005345344543457,
-0.020587459206581116,
0.3967016935348511,
0.1279798150062561,
0.2153172641992569,
0.39944177865982056,
-0.03723686933517456,
0.23139357566833496,
0.040836937725543976,
-0.022819308564066887,
-0.11691629886627197,
0.27749744057655334,
-0.06977861374616623,
0.40380752086639404,
-0.16806818544864655,
-0.11282296478748322,
-0.26461800932884216,
0.15586617588996887,
-0.17404843866825104,
-0.052364032715559006,
-0.36333468556404114,
-0.19442316889762878,
-0.0013637467054650187,
0.29135286808013916,
-0.13847310841083527,
-0.388823926448822,
-0.05577998235821724,
0.06800840049982071,
-0.24867506325244904,
0.23745258152484894,
-0.00010781394666992128,
0.1294008195400238,
0.4741247892379761,
-0.02634090930223465,
-0.4123633801937103,
-0.14446471631526947,
-0.2568211555480957,
-0.1780059039592743,
0.21548742055892944,
-0.14659959077835083,
-0.06843695044517517,
-0.12822061777114868,
-0.011337964795529842,
-0.4811622202396393,
-0.012041096575558186,
0.1929161101579666,
0.3149226903915405,
0.32473814487457275,
-0.467852920293808,
-0.1568366438150406,
0.1432521492242813,
0.23013004660606384,
0.0833171084523201,
0.17341095209121704,
0.13318267464637756,
0.03007073886692524,
-0.18742673099040985,
0.24318276345729828,
-0.21110378205776215,
-0.09236381202936172,
0.06361837685108185,
0.08838377147912979,
0.1521110087633133,
-0.020678957924246788,
0.35703128576278687,
0.2708452641963959,
0.48937317728996277,
-0.014112192206084728,
-0.1398695707321167,
0.011656315997242928,
0.4708491265773773,
-0.25865936279296875,
0.06987026333808899,
0.022974463179707527,
-0.009338853880763054,
-0.0253897812217474,
-0.020127132534980774,
-0.29835978150367737,
-0.03875968977808952,
-0.0013431595871225,
-0.6383301019668579,
0.24242840707302094,
-0.2169038951396942,
-0.05217284709215164,
-0.017194820567965508,
-0.22095303237438202,
0.07460156828165054,
-0.12407982349395752,
-0.11844397336244583,
0.03943682089447975,
0.05347679182887077,
0.16674572229385376,
0.1309518814086914,
0.1662619709968567,
0.03563511744141579,
-0.1803179532289505,
0.25045257806777954,
0.10087334364652634,
-0.040896859019994736,
-0.0059815156273543835,
0.11601803451776505,
0.05672783404588699,
0.31797388195991516,
-0.13393418490886688,
0.1912810206413269,
-0.04089704155921936,
-0.06535790860652924,
0.08853143453598022,
-0.023346414789557457,
0.017174210399389267,
0.04240603744983673,
-0.05303718522191048,
0.5128752589225769,
-0.1747819483280182,
-0.4069445729255676,
-0.004964436404407024,
-0.0010588011937215924,
0.09628447145223618,
-0.011053456924855709,
0.2086036205291748,
0.16691555082798004,
0.2003917694091797,
0.2185734659433365,
0.10115235298871994,
-0.36846640706062317,
-0.2676713764667511,
-0.4703409671783447,
-0.04474152624607086,
-0.17256657779216766,
-0.24931791424751282,
0.15551631152629852,
0.07392982393503189,
-0.03372955322265625,
0.15318173170089722,
-0.18794719874858856,
-0.08280668407678604,
-0.0939440131187439,
-0.10034456849098206,
0.11720866709947586,
0.3600369691848755,
-0.04968268796801567,
0.12473704665899277,
0.3757419288158417,
-0.24890317022800446,
0.05523523688316345,
0.6049396395683289,
-0.3829843997955322,
-0.040893856436014175,
-0.19790425896644592,
0.2764374315738678,
-0.22491887211799622,
0.05451219528913498,
0.02427361160516739,
0.3279806077480316,
-0.14477314054965973,
-0.14345622062683105,
-0.17856591939926147,
-0.13786691427230835,
-0.18023988604545593,
-0.0039051969069987535,
-0.016635296866297722,
0.7633919715881348,
-0.6208245754241943,
-0.25836992263793945,
-0.23743422329425812,
-0.4261711537837982,
0.16800248622894287,
-0.0038421417120844126,
-0.15362167358398438,
0.07206691056489944,
-0.20306991040706635,
0.27323874831199646,
0.37996557354927063,
-0.029268216341733932,
-0.23096908628940582,
0.3364275097846985,
-0.36026930809020996,
-0.05692020058631897,
-0.05839439854025841,
-0.07072371244430542,
-0.028582211583852768,
0.08732481300830841,
0.23076269030570984,
-0.14722852408885956,
0.25161758065223694,
0.015407244674861431,
-0.2662528455257416,
-0.1615317314863205,
0.464404821395874,
0.010476406663656235,
0.08537336438894272,
0.25054216384887695,
0.02152985706925392,
-0.04157109931111336,
0.052331190556287766,
-0.13321447372436523,
0.10164019465446472,
0.4124312400817871,
-0.06535398215055466,
0.036835893988609314,
-0.05410539358854294,
-0.054721493273973465,
-0.5389366745948792,
-0.08535265177488327,
-0.07396075129508972,
0.14947937428951263,
-0.2632220983505249,
-0.20222575962543488,
-0.06714341789484024,
-0.004485103767365217,
0.04136303812265396,
0.2686007618904114,
0.2915503978729248,
0.22586150467395782,
-0.5724323987960815,
-0.03751889243721962,
-0.09783875197172165,
0.10153253376483917,
-0.04453454166650772,
-0.0070673152804374695,
-0.3165827989578247,
0.14960364997386932,
0.10603941231966019,
-0.23077984154224396,
-0.13869740068912506,
0.3174286186695099,
0.17788375914096832,
0.08686251193284988,
-0.15760229527950287,
0.2754370868206024,
-0.20632560551166534,
0.0713106095790863,
-0.050811417400836945,
-0.20304307341575623,
0.17197878658771515,
-0.05651307478547096,
0.25298011302948,
0.14506188035011292,
0.26568570733070374,
-0.03117593191564083,
-0.12919308245182037,
0.28688764572143555,
-0.23786959052085876,
0.15842367708683014,
-0.19466379284858704,
-0.09548235684633255,
0.2850043475627899,
-0.02437630668282509,
-0.10211632400751114,
-0.594786524772644,
-0.0021061173174530268,
0.42859384417533875,
0.18013150990009308,
0.39207565784454346,
-0.2117932289838791,
0.13989077508449554,
0.18024374544620514,
-0.2609306573867798,
0.17533859610557556,
0.03232106938958168,
-0.18462638556957245,
-0.24712695181369781,
0.012630704790353775,
0.17650792002677917,
0.5517866015434265,
0.35408467054367065,
0.15797504782676697,
-0.03424583375453949,
-0.015119836665689945,
-0.2279174029827118,
0.26298943161964417,
0.0064216842874884605,
0.20875652134418488,
0.36169329285621643,
0.15422271192073822,
-0.21814586222171783,
-0.48874524235725403,
-0.06440835446119308,
0.2759544551372528,
0.2875237464904785,
-0.5602508783340454,
-0.07110437005758286,
-0.5575052499771118,
-0.018793240189552307,
0.14506961405277252,
0.1026512011885643,
-0.13102011382579803,
-0.4136364758014679,
0.07006560266017914,
-0.14995455741882324,
-0.08320670574903488,
0.06127552315592766,
-0.2765856683254242,
0.13345791399478912,
-0.11022046208381653,
0.15059617161750793,
-0.24059297144412994,
-0.13939499855041504,
-0.18983101844787598,
0.12886466085910797,
0.11166568100452423,
0.2503335773944855,
0.03420916572213173,
-0.04667811468243599,
-0.13801570236682892,
-0.0779416412115097,
-0.03176882863044739,
-0.007465094793587923,
-0.11120162904262543,
0.09182105213403702,
0.24196700751781464,
0.43990764021873474,
-0.04996929317712784,
0.04466579109430313,
0.2082061916589737,
-0.05259361118078232,
-0.10543662309646606,
0.16391532123088837,
-0.3327575623989105,
0.10028081387281418,
-0.2981746792793274,
-0.3231912851333618,
-0.20988111197948456,
-0.15669657289981842,
-0.2624693512916565,
0.060080964118242264,
0.06678356975317001,
0.2969803214073181,
0.19874732196331024,
0.2179003655910492,
0.09983153641223907,
0.05157362297177315,
-0.38550496101379395,
-0.19070418179035187,
0.3083955645561218,
-0.05219573900103569,
-0.18056580424308777,
0.1915716826915741,
-0.10054799169301987,
0.09584292024374008,
0.23603315651416779,
-0.1726546287536621,
0.00938024278730154,
0.15070977807044983,
-0.018565019592642784,
-0.2289866954088211,
-0.11289255321025848,
0.4029140770435333,
0.2969072461128235,
-0.25622913241386414,
-0.10403446108102798,
-0.07035420089960098,
0.0494794100522995,
-0.16051097214221954,
0.03530395030975342,
-0.1469345986843109,
0.21108800172805786,
-0.1983698457479477,
0.25647398829460144,
-0.16973939538002014,
-0.15939535200595856,
0.15468257665634155,
-0.29230907559394836,
0.6088869571685791,
-0.08875023573637009,
-0.08371104300022125,
-0.20529794692993164,
0.2810591757297516,
0.12798692286014557,
0.24435830116271973,
-0.2146635502576828,
-0.2042313665151596,
0.10112634301185608,
-0.05030641332268715,
-0.6612595915794373,
-0.14544826745986938,
0.10729409754276276,
-0.34210169315338135,
-0.037022665143013,
0.08342364430427551,
0.15194736421108246,
-0.22390411794185638,
-0.08705635368824005,
-0.02014331705868244,
-0.006090950220823288,
0.07924466580152512,
-0.242628812789917,
-0.4244078993797302,
0.2047254741191864,
-0.3244014084339142,
0.36549460887908936,
-0.08826979994773865,
-0.031137285754084587,
-0.1270904392004013,
-0.23052361607551575,
0.27500513195991516,
-0.05541275814175606,
0.6925384402275085,
-0.17908775806427002,
0.14168649911880493,
0.4672732651233673,
0.1425250768661499,
-0.3662782311439514,
-0.002299061045050621,
-0.36846834421157837,
0.23620569705963135,
-0.02889367565512657,
0.27852755784988403,
-0.22805455327033997,
-0.22302012145519257,
0.16069309413433075,
0.045940838754177094,
-0.07421504706144333,
-0.00012325207353569567,
-0.3742159307003021,
-0.23711711168289185,
0.024721626192331314,
-0.11552847921848297,
-0.3413068950176239,
0.33265140652656555,
-0.26121440529823303,
-0.2434411197900772,
-0.36126455664634705,
0.2488858550786972,
0.06879548728466034,
0.05651475489139557,
0.5541006326675415,
0.21984510123729706,
-0.23305830359458923,
0.19618742167949677,
0.18643945455551147,
0.20843088626861572,
0.35766276717185974,
-0.11696568876504898,
-0.1894855946302414,
0.37078505754470825,
-0.12612290680408478,
0.045504819601774216,
0.32293692231178284,
0.060861486941576004,
0.1504034847021103,
0.15265081822872162,
0.04583302512764931,
-0.07808246463537216,
0.10904104262590408,
0.2638658583164215,
-0.15170688927173615,
-0.26286306977272034,
-0.159279465675354,
0.2791357934474945,
0.03386804088950157,
0.03283635526895523,
0.1709965318441391,
0.26578256487846375,
-0.2759476602077484,
0.260355681180954,
0.0742357149720192,
0.7768946886062622,
-0.23958037793636322,
0.11408136039972305,
0.32812097668647766,
0.05374189838767052,
0.4346497654914856,
0.04348861798644066,
0.15716485679149628,
-0.3723917007446289,
-0.1937270313501358,
-0.07488787174224854,
0.11303960531949997,
0.3295864760875702,
0.25531205534935,
-0.07783504575490952,
0.0635724887251854,
-0.19738835096359253,
0.10248159617185593,
-0.031882643699645996,
-0.0904393345117569,
-0.046385619789361954,
-0.16465139389038086,
-0.12089904397726059,
0.20548401772975922,
-0.23719175159931183,
-0.006219238042831421,
-0.08693154901266098,
0.11282317340373993,
0.008213697001338005,
0.0054315864108502865,
0.21170805394649506,
0.20363479852676392,
-0.06266537308692932,
-0.00973571091890335,
0.07047240436077118,
-0.370612233877182,
-0.26450538635253906,
0.3550116717815399,
-0.09365619719028473,
0.1750405877828598,
-0.21980570256710052,
0.2275969237089157,
-0.012030906975269318,
0.34092214703559875,
-0.0396481528878212,
0.06231513246893883,
0.20495013892650604,
0.1819179505109787,
-0.37089115381240845,
-0.041015625,
-0.18367817997932434,
0.05226605013012886,
0.2578769326210022,
0.07053175568580627,
-0.07345429807901382,
-0.1813298761844635,
-0.1740647703409195,
0.2162877321243286,
0.5732864141464233,
-0.17365886270999908,
0.20712685585021973,
0.036021023988723755,
-0.07700499147176743,
-0.06914662569761276,
0.17171649634838104,
-0.4382975995540619,
0.03635134547948837,
0.5808656811714172,
0.28187334537506104,
0.01859680749475956,
0.5702983140945435,
-0.1667618751525879,
-0.29552021622657776,
-0.39428117871284485,
0.16752023994922638,
0.21116943657398224,
-0.18576449155807495,
0.2873871624469757,
0.26733851432800293,
-0.022609630599617958,
0.21547484397888184,
0.1839441955089569,
-0.20950360596179962,
0.26036766171455383,
-0.25474798679351807,
-0.1035543903708458,
-0.3544381856918335,
0.17789150774478912,
0.008164573460817337,
0.2380920648574829,
0.447313129901886,
-0.1777174472808838,
0.15183545649051666,
-0.2293003797531128,
-0.41385290026664734,
0.17096395790576935,
-0.09408263117074966,
0.12326280027627945,
0.0771709457039833,
0.024608241394162178,
0.07021206617355347,
-0.02850376069545746,
0.3732283413410187,
-0.13187119364738464,
0.04368411749601364,
-0.31290680170059204,
-0.08693370223045349,
0.11108490079641342,
-0.1484403908252716,
0.12093963474035263,
0.1645793318748474,
-0.20570255815982819,
-0.017234448343515396,
-0.1350507140159607,
0.27275413274765015,
0.32028520107269287,
-0.01970355212688446,
0.05760951712727547,
0.14492082595825195,
0.24733507633209229,
-0.1819557100534439,
0.002997202333062887,
-0.01639270968735218,
-0.16266480088233948,
0.024119718000292778,
0.07951401174068451,
0.012282067909836769,
-0.05899569019675255,
-0.00245481263846159,
0.13762901723384857,
0.023325946182012558,
0.2721766233444214,
0.16064845025539398,
-0.3519974946975708,
-0.07325419783592224,
0.10602053254842758,
0.1569841057062149,
0.05480889230966568,
-0.17384657263755798,
-0.13678961992263794,
-0.12122703343629837,
0.2659430503845215,
-0.3304692804813385,
-0.08334765583276749,
0.0950533077120781,
-0.03359527513384819,
0.22904856503009796,
0.0038330291863530874,
-0.03625354543328285,
-0.07021375745534897,
0.09507712721824646,
-0.05214054882526398,
0.20724427700042725,
-0.32453083992004395,
0.1212557777762413,
0.4626903533935547,
-0.17411790788173676,
-0.09268161654472351,
0.27863815426826477,
-0.029920661821961403,
-0.18218038976192474,
0.5160154104232788,
0.11307669430971146,
0.3492172360420227,
-0.08382593095302582,
0.13972976803779602,
-0.5744352340698242,
-0.7401204705238342,
0.23743116855621338,
0.3691050708293915,
-0.32650068402290344,
0.028951719403266907,
0.22775115072727203,
0.03393688052892685,
-0.2250555455684662,
-0.26198166608810425,
-0.06998630613088608,
0.19040971994400024,
-0.42436492443084717,
-0.266136109828949,
-0.3892296850681305,
-0.09980019927024841,
-0.16103054583072662,
0.019040759652853012,
-0.024043671786785126,
-0.0523248054087162,
0.13510170578956604,
0.04981834441423416,
-0.09829936921596527,
-0.27202725410461426,
0.29811233282089233,
-0.03511426970362663,
-0.1397881805896759,
-0.061878591775894165,
0.356950968503952,
0.045455802232027054,
0.23463526368141174,
0.4361940920352936,
0.3473842740058899,
0.277849942445755,
0.042488694190979004,
0.270010769367218,
-0.01236470602452755,
0.19865651428699493,
-0.34118279814720154,
-0.009855047799646854,
0.030057065188884735,
0.23118111491203308,
0.462973415851593,
0.1925268918275833,
0.27864697575569153,
-0.2350122481584549,
0.09000010043382645,
0.3599746525287628,
0.0032372118439525366,
-0.05565575137734413,
0.292670875787735,
0.15612192451953888,
-0.10507247596979141,
-0.33093011379241943,
-0.19511651992797852,
-0.5435897707939148,
-0.08840402215719223,
0.2666378617286682,
-0.06248822808265686,
0.10395903140306473,
0.039279740303754807,
0.1592906266450882,
0.1645132452249527,
0.29188936948776245,
0.01334324013441801,
-0.15855595469474792,
-0.24015317857265472,
0.03848201408982277,
-0.783525288105011,
0.38711950182914734,
0.13196291029453278,
0.18361426889896393,
-0.191962331533432,
0.05476083979010582,
0.0029396889731287956,
-0.23149478435516357,
0.08111878484487534,
-0.020941192284226418,
0.4347730875015259,
-0.09827631711959839,
-0.27455824613571167,
0.14307540655136108,
0.12130900472402573,
-0.204488143324852,
-0.2658034861087799,
-0.2532459497451782,
0.07420582324266434,
0.03574527055025101,
0.17284823954105377,
0.10996066778898239,
-0.1343659907579422,
-0.13882389664649963,
0.22958147525787354,
0.3340460956096649,
-0.03706800192594528,
0.4089738130569458,
-0.12281012535095215,
0.07247599214315414,
-0.30761873722076416,
-0.10771525651216507,
-0.08644238114356995,
0.36518216133117676,
0.38931068778038025,
0.21159504354000092,
-0.006245812401175499,
0.29810577630996704,
0.126640185713768,
-0.12427633255720139,
-0.0014022374525666237,
0.3446885347366333,
-0.6421847343444824,
0.3993760645389557,
-0.11592202633619308,
-0.08905976265668869,
-0.015157569199800491,
-0.035892587155103683,
0.24204614758491516,
0.19116155803203583,
-0.15957920253276825,
-0.04399764910340309,
0.3200947940349579,
-0.006930308882147074,
-0.2567274570465088,
-0.17787443101406097,
0.27806100249290466,
0.03745044395327568,
-0.17338059842586517,
-0.31666722893714905,
0.0442185178399086,
0.4314008057117462,
-0.3411630392074585,
-0.24618445336818695,
0.34634900093078613,
-0.30456605553627014,
0.03302578628063202,
-0.33299896121025085,
0.09535352885723114,
0.2598247528076172,
-0.05960148945450783,
-0.08454739302396774,
-0.2150353640317917
] |
https://github.com/huggingface/datasets/issues/3181
|
`None` converted to `"None"` when loading a dataset
|
Oh, sorry. I deleted the fix by accident when I was resolving a merge conflict. Let me fix this real quick.
|
## Describe the bug
When loading a dataset `None` values of the type `NoneType` are converted to `'None'` of the type `str`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
qasper = load_dataset("qasper", split="train", download_mode="reuse_cache_if_exists")
print(qasper[60]["full_text"]["section_name"])
```
When installing version 1.1.40, the output is
`[None, 'Introduction', 'Benchmark Datasets', ...]`
When installing from the master branch, the output is
`['None', 'Introduction', 'Benchmark Datasets', ...]`
Notice how the first element was changed from `NoneType` to `str`.
## Expected results
`None` should stay as is.
## Actual results
`None` is converted to a string.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: master
- Platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17
- Python version: 3.8.10
- PyArrow version: 4.0.1
| 21 |
`None` converted to `"None"` when loading a dataset
|
[
-0.14572231471538544,
-0.06071746349334717,
-0.12706436216831207,
0.2379978448152542,
0.45005345344543457,
-0.020587459206581116,
0.3967016935348511,
0.1279798150062561,
0.2153172641992569,
0.39944177865982056,
-0.03723686933517456,
0.23139357566833496,
0.040836937725543976,
-0.022819308564066887,
-0.11691629886627197,
0.27749744057655334,
-0.06977861374616623,
0.40380752086639404,
-0.16806818544864655,
-0.11282296478748322,
-0.26461800932884216,
0.15586617588996887,
-0.17404843866825104,
-0.052364032715559006,
-0.36333468556404114,
-0.19442316889762878,
-0.0013637467054650187,
0.29135286808013916,
-0.13847310841083527,
-0.388823926448822,
-0.05577998235821724,
0.06800840049982071,
-0.24867506325244904,
0.23745258152484894,
-0.00010781394666992128,
0.1294008195400238,
0.4741247892379761,
-0.02634090930223465,
-0.4123633801937103,
-0.14446471631526947,
-0.2568211555480957,
-0.1780059039592743,
0.21548742055892944,
-0.14659959077835083,
-0.06843695044517517,
-0.12822061777114868,
-0.011337964795529842,
-0.4811622202396393,
-0.012041096575558186,
0.1929161101579666,
0.3149226903915405,
0.32473814487457275,
-0.467852920293808,
-0.1568366438150406,
0.1432521492242813,
0.23013004660606384,
0.0833171084523201,
0.17341095209121704,
0.13318267464637756,
0.03007073886692524,
-0.18742673099040985,
0.24318276345729828,
-0.21110378205776215,
-0.09236381202936172,
0.06361837685108185,
0.08838377147912979,
0.1521110087633133,
-0.020678957924246788,
0.35703128576278687,
0.2708452641963959,
0.48937317728996277,
-0.014112192206084728,
-0.1398695707321167,
0.011656315997242928,
0.4708491265773773,
-0.25865936279296875,
0.06987026333808899,
0.022974463179707527,
-0.009338853880763054,
-0.0253897812217474,
-0.020127132534980774,
-0.29835978150367737,
-0.03875968977808952,
-0.0013431595871225,
-0.6383301019668579,
0.24242840707302094,
-0.2169038951396942,
-0.05217284709215164,
-0.017194820567965508,
-0.22095303237438202,
0.07460156828165054,
-0.12407982349395752,
-0.11844397336244583,
0.03943682089447975,
0.05347679182887077,
0.16674572229385376,
0.1309518814086914,
0.1662619709968567,
0.03563511744141579,
-0.1803179532289505,
0.25045257806777954,
0.10087334364652634,
-0.040896859019994736,
-0.0059815156273543835,
0.11601803451776505,
0.05672783404588699,
0.31797388195991516,
-0.13393418490886688,
0.1912810206413269,
-0.04089704155921936,
-0.06535790860652924,
0.08853143453598022,
-0.023346414789557457,
0.017174210399389267,
0.04240603744983673,
-0.05303718522191048,
0.5128752589225769,
-0.1747819483280182,
-0.4069445729255676,
-0.004964436404407024,
-0.0010588011937215924,
0.09628447145223618,
-0.011053456924855709,
0.2086036205291748,
0.16691555082798004,
0.2003917694091797,
0.2185734659433365,
0.10115235298871994,
-0.36846640706062317,
-0.2676713764667511,
-0.4703409671783447,
-0.04474152624607086,
-0.17256657779216766,
-0.24931791424751282,
0.15551631152629852,
0.07392982393503189,
-0.03372955322265625,
0.15318173170089722,
-0.18794719874858856,
-0.08280668407678604,
-0.0939440131187439,
-0.10034456849098206,
0.11720866709947586,
0.3600369691848755,
-0.04968268796801567,
0.12473704665899277,
0.3757419288158417,
-0.24890317022800446,
0.05523523688316345,
0.6049396395683289,
-0.3829843997955322,
-0.040893856436014175,
-0.19790425896644592,
0.2764374315738678,
-0.22491887211799622,
0.05451219528913498,
0.02427361160516739,
0.3279806077480316,
-0.14477314054965973,
-0.14345622062683105,
-0.17856591939926147,
-0.13786691427230835,
-0.18023988604545593,
-0.0039051969069987535,
-0.016635296866297722,
0.7633919715881348,
-0.6208245754241943,
-0.25836992263793945,
-0.23743422329425812,
-0.4261711537837982,
0.16800248622894287,
-0.0038421417120844126,
-0.15362167358398438,
0.07206691056489944,
-0.20306991040706635,
0.27323874831199646,
0.37996557354927063,
-0.029268216341733932,
-0.23096908628940582,
0.3364275097846985,
-0.36026930809020996,
-0.05692020058631897,
-0.05839439854025841,
-0.07072371244430542,
-0.028582211583852768,
0.08732481300830841,
0.23076269030570984,
-0.14722852408885956,
0.25161758065223694,
0.015407244674861431,
-0.2662528455257416,
-0.1615317314863205,
0.464404821395874,
0.010476406663656235,
0.08537336438894272,
0.25054216384887695,
0.02152985706925392,
-0.04157109931111336,
0.052331190556287766,
-0.13321447372436523,
0.10164019465446472,
0.4124312400817871,
-0.06535398215055466,
0.036835893988609314,
-0.05410539358854294,
-0.054721493273973465,
-0.5389366745948792,
-0.08535265177488327,
-0.07396075129508972,
0.14947937428951263,
-0.2632220983505249,
-0.20222575962543488,
-0.06714341789484024,
-0.004485103767365217,
0.04136303812265396,
0.2686007618904114,
0.2915503978729248,
0.22586150467395782,
-0.5724323987960815,
-0.03751889243721962,
-0.09783875197172165,
0.10153253376483917,
-0.04453454166650772,
-0.0070673152804374695,
-0.3165827989578247,
0.14960364997386932,
0.10603941231966019,
-0.23077984154224396,
-0.13869740068912506,
0.3174286186695099,
0.17788375914096832,
0.08686251193284988,
-0.15760229527950287,
0.2754370868206024,
-0.20632560551166534,
0.0713106095790863,
-0.050811417400836945,
-0.20304307341575623,
0.17197878658771515,
-0.05651307478547096,
0.25298011302948,
0.14506188035011292,
0.26568570733070374,
-0.03117593191564083,
-0.12919308245182037,
0.28688764572143555,
-0.23786959052085876,
0.15842367708683014,
-0.19466379284858704,
-0.09548235684633255,
0.2850043475627899,
-0.02437630668282509,
-0.10211632400751114,
-0.594786524772644,
-0.0021061173174530268,
0.42859384417533875,
0.18013150990009308,
0.39207565784454346,
-0.2117932289838791,
0.13989077508449554,
0.18024374544620514,
-0.2609306573867798,
0.17533859610557556,
0.03232106938958168,
-0.18462638556957245,
-0.24712695181369781,
0.012630704790353775,
0.17650792002677917,
0.5517866015434265,
0.35408467054367065,
0.15797504782676697,
-0.03424583375453949,
-0.015119836665689945,
-0.2279174029827118,
0.26298943161964417,
0.0064216842874884605,
0.20875652134418488,
0.36169329285621643,
0.15422271192073822,
-0.21814586222171783,
-0.48874524235725403,
-0.06440835446119308,
0.2759544551372528,
0.2875237464904785,
-0.5602508783340454,
-0.07110437005758286,
-0.5575052499771118,
-0.018793240189552307,
0.14506961405277252,
0.1026512011885643,
-0.13102011382579803,
-0.4136364758014679,
0.07006560266017914,
-0.14995455741882324,
-0.08320670574903488,
0.06127552315592766,
-0.2765856683254242,
0.13345791399478912,
-0.11022046208381653,
0.15059617161750793,
-0.24059297144412994,
-0.13939499855041504,
-0.18983101844787598,
0.12886466085910797,
0.11166568100452423,
0.2503335773944855,
0.03420916572213173,
-0.04667811468243599,
-0.13801570236682892,
-0.0779416412115097,
-0.03176882863044739,
-0.007465094793587923,
-0.11120162904262543,
0.09182105213403702,
0.24196700751781464,
0.43990764021873474,
-0.04996929317712784,
0.04466579109430313,
0.2082061916589737,
-0.05259361118078232,
-0.10543662309646606,
0.16391532123088837,
-0.3327575623989105,
0.10028081387281418,
-0.2981746792793274,
-0.3231912851333618,
-0.20988111197948456,
-0.15669657289981842,
-0.2624693512916565,
0.060080964118242264,
0.06678356975317001,
0.2969803214073181,
0.19874732196331024,
0.2179003655910492,
0.09983153641223907,
0.05157362297177315,
-0.38550496101379395,
-0.19070418179035187,
0.3083955645561218,
-0.05219573900103569,
-0.18056580424308777,
0.1915716826915741,
-0.10054799169301987,
0.09584292024374008,
0.23603315651416779,
-0.1726546287536621,
0.00938024278730154,
0.15070977807044983,
-0.018565019592642784,
-0.2289866954088211,
-0.11289255321025848,
0.4029140770435333,
0.2969072461128235,
-0.25622913241386414,
-0.10403446108102798,
-0.07035420089960098,
0.0494794100522995,
-0.16051097214221954,
0.03530395030975342,
-0.1469345986843109,
0.21108800172805786,
-0.1983698457479477,
0.25647398829460144,
-0.16973939538002014,
-0.15939535200595856,
0.15468257665634155,
-0.29230907559394836,
0.6088869571685791,
-0.08875023573637009,
-0.08371104300022125,
-0.20529794692993164,
0.2810591757297516,
0.12798692286014557,
0.24435830116271973,
-0.2146635502576828,
-0.2042313665151596,
0.10112634301185608,
-0.05030641332268715,
-0.6612595915794373,
-0.14544826745986938,
0.10729409754276276,
-0.34210169315338135,
-0.037022665143013,
0.08342364430427551,
0.15194736421108246,
-0.22390411794185638,
-0.08705635368824005,
-0.02014331705868244,
-0.006090950220823288,
0.07924466580152512,
-0.242628812789917,
-0.4244078993797302,
0.2047254741191864,
-0.3244014084339142,
0.36549460887908936,
-0.08826979994773865,
-0.031137285754084587,
-0.1270904392004013,
-0.23052361607551575,
0.27500513195991516,
-0.05541275814175606,
0.6925384402275085,
-0.17908775806427002,
0.14168649911880493,
0.4672732651233673,
0.1425250768661499,
-0.3662782311439514,
-0.002299061045050621,
-0.36846834421157837,
0.23620569705963135,
-0.02889367565512657,
0.27852755784988403,
-0.22805455327033997,
-0.22302012145519257,
0.16069309413433075,
0.045940838754177094,
-0.07421504706144333,
-0.00012325207353569567,
-0.3742159307003021,
-0.23711711168289185,
0.024721626192331314,
-0.11552847921848297,
-0.3413068950176239,
0.33265140652656555,
-0.26121440529823303,
-0.2434411197900772,
-0.36126455664634705,
0.2488858550786972,
0.06879548728466034,
0.05651475489139557,
0.5541006326675415,
0.21984510123729706,
-0.23305830359458923,
0.19618742167949677,
0.18643945455551147,
0.20843088626861572,
0.35766276717185974,
-0.11696568876504898,
-0.1894855946302414,
0.37078505754470825,
-0.12612290680408478,
0.045504819601774216,
0.32293692231178284,
0.060861486941576004,
0.1504034847021103,
0.15265081822872162,
0.04583302512764931,
-0.07808246463537216,
0.10904104262590408,
0.2638658583164215,
-0.15170688927173615,
-0.26286306977272034,
-0.159279465675354,
0.2791357934474945,
0.03386804088950157,
0.03283635526895523,
0.1709965318441391,
0.26578256487846375,
-0.2759476602077484,
0.260355681180954,
0.0742357149720192,
0.7768946886062622,
-0.23958037793636322,
0.11408136039972305,
0.32812097668647766,
0.05374189838767052,
0.4346497654914856,
0.04348861798644066,
0.15716485679149628,
-0.3723917007446289,
-0.1937270313501358,
-0.07488787174224854,
0.11303960531949997,
0.3295864760875702,
0.25531205534935,
-0.07783504575490952,
0.0635724887251854,
-0.19738835096359253,
0.10248159617185593,
-0.031882643699645996,
-0.0904393345117569,
-0.046385619789361954,
-0.16465139389038086,
-0.12089904397726059,
0.20548401772975922,
-0.23719175159931183,
-0.006219238042831421,
-0.08693154901266098,
0.11282317340373993,
0.008213697001338005,
0.0054315864108502865,
0.21170805394649506,
0.20363479852676392,
-0.06266537308692932,
-0.00973571091890335,
0.07047240436077118,
-0.370612233877182,
-0.26450538635253906,
0.3550116717815399,
-0.09365619719028473,
0.1750405877828598,
-0.21980570256710052,
0.2275969237089157,
-0.012030906975269318,
0.34092214703559875,
-0.0396481528878212,
0.06231513246893883,
0.20495013892650604,
0.1819179505109787,
-0.37089115381240845,
-0.041015625,
-0.18367817997932434,
0.05226605013012886,
0.2578769326210022,
0.07053175568580627,
-0.07345429807901382,
-0.1813298761844635,
-0.1740647703409195,
0.2162877321243286,
0.5732864141464233,
-0.17365886270999908,
0.20712685585021973,
0.036021023988723755,
-0.07700499147176743,
-0.06914662569761276,
0.17171649634838104,
-0.4382975995540619,
0.03635134547948837,
0.5808656811714172,
0.28187334537506104,
0.01859680749475956,
0.5702983140945435,
-0.1667618751525879,
-0.29552021622657776,
-0.39428117871284485,
0.16752023994922638,
0.21116943657398224,
-0.18576449155807495,
0.2873871624469757,
0.26733851432800293,
-0.022609630599617958,
0.21547484397888184,
0.1839441955089569,
-0.20950360596179962,
0.26036766171455383,
-0.25474798679351807,
-0.1035543903708458,
-0.3544381856918335,
0.17789150774478912,
0.008164573460817337,
0.2380920648574829,
0.447313129901886,
-0.1777174472808838,
0.15183545649051666,
-0.2293003797531128,
-0.41385290026664734,
0.17096395790576935,
-0.09408263117074966,
0.12326280027627945,
0.0771709457039833,
0.024608241394162178,
0.07021206617355347,
-0.02850376069545746,
0.3732283413410187,
-0.13187119364738464,
0.04368411749601364,
-0.31290680170059204,
-0.08693370223045349,
0.11108490079641342,
-0.1484403908252716,
0.12093963474035263,
0.1645793318748474,
-0.20570255815982819,
-0.017234448343515396,
-0.1350507140159607,
0.27275413274765015,
0.32028520107269287,
-0.01970355212688446,
0.05760951712727547,
0.14492082595825195,
0.24733507633209229,
-0.1819557100534439,
0.002997202333062887,
-0.01639270968735218,
-0.16266480088233948,
0.024119718000292778,
0.07951401174068451,
0.012282067909836769,
-0.05899569019675255,
-0.00245481263846159,
0.13762901723384857,
0.023325946182012558,
0.2721766233444214,
0.16064845025539398,
-0.3519974946975708,
-0.07325419783592224,
0.10602053254842758,
0.1569841057062149,
0.05480889230966568,
-0.17384657263755798,
-0.13678961992263794,
-0.12122703343629837,
0.2659430503845215,
-0.3304692804813385,
-0.08334765583276749,
0.0950533077120781,
-0.03359527513384819,
0.22904856503009796,
0.0038330291863530874,
-0.03625354543328285,
-0.07021375745534897,
0.09507712721824646,
-0.05214054882526398,
0.20724427700042725,
-0.32453083992004395,
0.1212557777762413,
0.4626903533935547,
-0.17411790788173676,
-0.09268161654472351,
0.27863815426826477,
-0.029920661821961403,
-0.18218038976192474,
0.5160154104232788,
0.11307669430971146,
0.3492172360420227,
-0.08382593095302582,
0.13972976803779602,
-0.5744352340698242,
-0.7401204705238342,
0.23743116855621338,
0.3691050708293915,
-0.32650068402290344,
0.028951719403266907,
0.22775115072727203,
0.03393688052892685,
-0.2250555455684662,
-0.26198166608810425,
-0.06998630613088608,
0.19040971994400024,
-0.42436492443084717,
-0.266136109828949,
-0.3892296850681305,
-0.09980019927024841,
-0.16103054583072662,
0.019040759652853012,
-0.024043671786785126,
-0.0523248054087162,
0.13510170578956604,
0.04981834441423416,
-0.09829936921596527,
-0.27202725410461426,
0.29811233282089233,
-0.03511426970362663,
-0.1397881805896759,
-0.061878591775894165,
0.356950968503952,
0.045455802232027054,
0.23463526368141174,
0.4361940920352936,
0.3473842740058899,
0.277849942445755,
0.042488694190979004,
0.270010769367218,
-0.01236470602452755,
0.19865651428699493,
-0.34118279814720154,
-0.009855047799646854,
0.030057065188884735,
0.23118111491203308,
0.462973415851593,
0.1925268918275833,
0.27864697575569153,
-0.2350122481584549,
0.09000010043382645,
0.3599746525287628,
0.0032372118439525366,
-0.05565575137734413,
0.292670875787735,
0.15612192451953888,
-0.10507247596979141,
-0.33093011379241943,
-0.19511651992797852,
-0.5435897707939148,
-0.08840402215719223,
0.2666378617286682,
-0.06248822808265686,
0.10395903140306473,
0.039279740303754807,
0.1592906266450882,
0.1645132452249527,
0.29188936948776245,
0.01334324013441801,
-0.15855595469474792,
-0.24015317857265472,
0.03848201408982277,
-0.783525288105011,
0.38711950182914734,
0.13196291029453278,
0.18361426889896393,
-0.191962331533432,
0.05476083979010582,
0.0029396889731287956,
-0.23149478435516357,
0.08111878484487534,
-0.020941192284226418,
0.4347730875015259,
-0.09827631711959839,
-0.27455824613571167,
0.14307540655136108,
0.12130900472402573,
-0.204488143324852,
-0.2658034861087799,
-0.2532459497451782,
0.07420582324266434,
0.03574527055025101,
0.17284823954105377,
0.10996066778898239,
-0.1343659907579422,
-0.13882389664649963,
0.22958147525787354,
0.3340460956096649,
-0.03706800192594528,
0.4089738130569458,
-0.12281012535095215,
0.07247599214315414,
-0.30761873722076416,
-0.10771525651216507,
-0.08644238114356995,
0.36518216133117676,
0.38931068778038025,
0.21159504354000092,
-0.006245812401175499,
0.29810577630996704,
0.126640185713768,
-0.12427633255720139,
-0.0014022374525666237,
0.3446885347366333,
-0.6421847343444824,
0.3993760645389557,
-0.11592202633619308,
-0.08905976265668869,
-0.015157569199800491,
-0.035892587155103683,
0.24204614758491516,
0.19116155803203583,
-0.15957920253276825,
-0.04399764910340309,
0.3200947940349579,
-0.006930308882147074,
-0.2567274570465088,
-0.17787443101406097,
0.27806100249290466,
0.03745044395327568,
-0.17338059842586517,
-0.31666722893714905,
0.0442185178399086,
0.4314008057117462,
-0.3411630392074585,
-0.24618445336818695,
0.34634900093078613,
-0.30456605553627014,
0.03302578628063202,
-0.33299896121025085,
0.09535352885723114,
0.2598247528076172,
-0.05960148945450783,
-0.08454739302396774,
-0.2150353640317917
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
After some digging, I found that this is caused by `dill` and using `recurse=True)` when trying to dump the object. The problem also occurs without multiprocessing. I can only find [the following information](https://dill.readthedocs.io/en/latest/dill.html#dill._dill.dumps) about this:
> If recurse=True, then objects referred to in the global dictionary are recursively traced and pickled, instead of the default behavior of attempting to store the entire global dictionary. This is needed for functions defined via exec().
In the utils, this is explicitly enabled
https://github.com/huggingface/datasets/blob/df63614223bf1dd1feb267d39d741bada613352c/src/datasets/utils/py_utils.py#L327-L330
Is this really necessary? Is there a way around it? Also pinging the spaCy team in case this is easy to solve on their end. (I hope so.)
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 108 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Hi ! Thanks for reporting
Yes `recurse=True` is necessary to be able to hash all the objects that are passed to the `map` function
EDIT: hopefully this object can be serializable soon, but otherwise we can consider adding more control to the user on how to hash objects that are not serializable (as mentioned in https://github.com/huggingface/datasets/issues/3044#issuecomment-948818210)
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 56 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
I submitted a PR to spacy that should fix this issue (linked above). I'll leave this open until that PR is merged.
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 22 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
@lhoestq After some testing I find that even with the updated spaCy, no cache files are used. I do not get any warnings though, but I can see that map is run every time I run the code. Do you have thoughts about why? If you want to try the tests below, make sure to install spaCy from [here](https://github.com/BramVanroy/spaCy) and installing the base model with `python -m spacy download en_core_web_sm`.
```python
from functools import partial
from pathlib import Path
import spacy
from datasets import Dataset
import datasets
datasets.logging.set_verbosity_debug()
def tokenize(nlp, l):
return {"tok": [t.text for t in nlp(l["text"])]}
def main():
fin = r"some/file/with/many/lines"
lines = Path(fin).read_text(encoding="utf-8").splitlines()
nlp = spacy.load("en_core_web_sm")
ds = Dataset.from_dict({"text": lines, "text_id": list(range(len(lines)))})
tok = partial(tokenize, nlp)
ds = ds.map(tok, load_from_cache_file=True)
print(ds[0:2])
if __name__ == '__main__':
main()
```
... or with load_dataset (here I get the message that `load_dataset` can reuse the dataset, but still I see all samples being processed via the tqdm progressbar):
```python
from functools import partial
import spacy
from datasets import load_dataset
import datasets
datasets.logging.set_verbosity_debug()
def tokenize(nlp, sample):
return {"tok": [t.text for t in nlp(sample["text"])]}
def main():
fin = r"some/file/with/many/lines"
nlp = spacy.load("en_core_web_sm")
tok_func = partial(tokenize, nlp)
ds = load_dataset('text', data_files=fin)
ds = ds["train"].map(tok_func)
print(ds[0:2])
if __name__ == '__main__':
main()
```
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 207 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
It looks like every time you load `en_core_web_sm` you get a different python object:
```python
import spacy
from datasets.fingerprint import Hasher
nlp1 = spacy.load("en_core_web_sm")
nlp2 = spacy.load("en_core_web_sm")
Hasher.hash(nlp1), Hasher.hash(nlp2)
# ('f6196a33882fea3b', 'a4c676a071f266ff')
```
Here is a list of attributes that have different hashes for `nlp1` and `nlp2`:
- tagger
- parser
- entity
- pipeline (it's the list of the three attributes above)
I just took a look at the tagger for example and I found subtle differences (there may be other differences though):
```python
nlp1.tagger.model.tok2vec.embed.id, nlp2.tagger.model.tok2vec.embed.id
# (1721, 2243)
```
We can try to find all the differences and find the best way to hash those objects properly
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 109 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Thanks for searching! I went looking, and found that this is an implementation detail of thinc
https://github.com/explosion/thinc/blob/68691e303ae68cae4bc803299016f1fc064328bf/thinc/model.py#L96-L98
Presumably (?) exactly to distinguish between different parts in memory when multiple models are loaded. Do not think that this can be changed on their end - but I will ask what exactly it is for (I'm curious).
Do you think it is overkill to write something into the hasher explicitly to deal with spaCy models? It seems like something that is beneficial to many, but I do not know if you are open to adding third-party-specific ways to deal with this. If you are, I can have a look for this specific case how we can ignore `thinc.Model.id` from the hasher.
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 119 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
It can be even simpler to hash the bytes of the pipeline instead
```python
nlp1.to_bytes() == nlp2.to_bytes() # True
```
IMO we should integrate the custom hashing for spacy models into `datasets` (we use a custom Pickler for that).
What could be done on Spacy's side instead (if they think it's nice to have) is to implement a custom pickling for these classes using `to_bytes`/`from_bytes` to have deterministic pickle dumps.
Finally I think it would be nice in the future to add an API to let `datasets` users control this kind of things. Something like being able to define your own hashing if you use complex objects.
```python
@datasets.register_hash(spacy.language.Language)
def hash_spacy_language(nlp):
return Hasher.hash(nlp.to_bytes())
```
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 114 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
I do not quite understand what you mean. as far as I can tell, using `to_bytes` does a pickle dump behind the scene (with `srsly`), recursively using `to_bytes` on the required objects. Therefore, the result of `to_bytes` is a deterministic pickle dump AFAICT. Or do you mean that you wish that using your own pickler and running `dumps(nlp)` should also be deterministic? I guess that would require `__setstate__` and `__getstate__` methods on all the objects that have to/from_bytes. I'll have a listen over at spaCy what they think, and if that would solve the issue. I'll try this locally first, if I find the time.
I agree that having the option to use a custom hasher would be useful. I like your suggestion!
EDIT: after trying some things and reading through their API, it seems that they explicitly do not want this. https://spacy.io/usage/saving-loading#pipeline
> When serializing the pipeline, keep in mind that this will only save out the binary data for the individual components to allow spaCy to restore them – not the entire objects. This is a good thing, because it makes serialization safe. But it also means that you have to take care of storing the config, which contains the pipeline configuration and all the relevant settings.
Best way forward therefore seems to implement the ability to specify a hasher depending on the objects that are pickled, as you suggested. I can work on this if that is useful. I could use some pointers as to how you would like to implement the `register_hash` functionality though. I assume using `catalogue` over at Explosion might be a good starting point.
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 271 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Interestingly, my PR does not solve the issue discussed above. The `tokenize` function hash is different on every run, because for some reason `nlp.__call__` has a different hash every time. The issue therefore seems to run much deeper than I thought. If you have any ideas, I'm all ears.
```shell
git clone https://github.com/explosion/spaCy.git
cd spaCy/
git checkout cab9209c3dfcd1b75dfe5657f10e52c4d847a3cf
cd ..
git clone https://github.com/BramVanroy/datasets.git
cd datasets
git checkout registry
pip install -e .
pip install ../spaCy
spacy download en_core_web_sm
```
```python
import spacy
from datasets import load_dataset
from datasets.fingerprint import Hasher
from datasets.utils.registry import hashers
@hashers.register(spacy.Language)
def hash_spacy_language(nlp):
return Hasher.hash(nlp.to_bytes())
def main():
fin = r"your/large/file"
nlp = spacy.load("en_core_web_sm")
# This is now always the same yay!
print(Hasher.hash(nlp))
def tokenize(l):
return {"tok": [t.text for t in nlp(l["text"])]}
ds = load_dataset("text", data_files=fin)
# But this is not...
print(Hasher.hash(tokenize))
# ... because of this
print(Hasher.hash(nlp.__call__))
ds = ds["train"].map(tokenize)
print(ds[0:2])
if __name__ == '__main__':
main()
```
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 151 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Hi ! I just answered in your PR :) In order for your custom hashing to be used for nested objects, you must integrate it into our recursive pickler that we use for hashing.
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 34 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
I don't quite understand the design constraints of `datasets` or the script that you're running, but my usual advice is to avoid using pickle unless you _absolutely_ have to. So for instance instead of doing your `partial` over the `nlp` object itself, can you just pass the string `en_core_web_sm` in? This will mean calling `spacy.load()` inside the work function, but this is no worse than having to call `pickle.load()` on the contents of the NLP object anyway -- in fact you'll generally find `spacy.load()` faster, apart from the disk read.
If you need to pass in the bytes data and don't want to read from disk, you could do something like this:
```
msg = (nlp.lang, nlp.to_bytes())
def unpack(lang, bytes_data):
return spacy.blank(lang).from_bytes(bytes_data)
```
I think that should probably work: the Thinc `model.to_dict()` method (which is used by the `model.to_bytes()` method) doesn't pack the model's ID into the message, so the `nlp.to_bytes()` that you get shouldn't be affected by the global IDs. So you should get a clean message from `nlp.to_bytes()` that doesn't depend on the global state.
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 177 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Hi Matthew, thanks for chiming in! We are currently implementing exactly what you suggest: `to_bytes()` as a default before pickling - but we may prefer `to_dict` to avoid double dumping.
`datasets` uses pickle dumps (actually dill) to get unique representations of processing steps (a "fingerprint" or hash). So it never needs to re-load that dump - it just needs its value to create a hash. If a fingerprint is identical to a cached fingerprint, then the result can be retrieved from the on-disk cache. (@lhoestq or @mariosasko can correct me if I'm wrong.)
I was experiencing the issue that parsing with spaCy gave me a different fingerprint on every run of the script and thus it could never load the processed dataset from cache. At first I thought the reason was that spaCy Language objects were not picklable with recursive dill, but even after [adjusting for that](https://github.com/explosion/spaCy/pull/9593) the issue persisted. @lhoestq found that this is due to the changing `id`, which you discussed [here](https://github.com/explosion/spaCy/discussions/9609#discussioncomment-1661081). So yes, you are right. On the surface there simply seems to be an incompatibility between `datasets` default caching functionality as it is currently implemented and `spacy.Language`.
The [linked PR](https://github.com/huggingface/datasets/pull/3224) aims to remedy that, though. Up to now I have put some effort into making it easier to define your own "pickling" function for a given type (and optionally any of its subclasses). That allows us to tell `datasets` that instead of doing `dill.save(nlp)` (non-deterministic), to use `dill.save(nlp.to_bytes())` (deterministic). When I find some more time, the PR [will be expanded](https://github.com/huggingface/datasets/pull/3224#issuecomment-968958528) to improve the user-experience a bit and add a built-in function to pickle `spacy.Language` as one of the defaults (using `to_bytes()`).
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 275 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Is there a workaround for this? maybe by explicitly requesting datasets to cache the result of `.map()`?
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 17 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Hi ! If your function is not picklable, then the fingerprint of the resulting dataset can't be computed. The fingerprint is a hash that is used by the cache to reload previously computed datasets: the dataset file is named `cache-<fingerprint>.arrow` in your dataset's cache directory.
As a workaround you can set the fingerprint that is going to be used by the cache:
```python
result = my_dataset.map(func, new_fingerprint=new_fingerprint)
```
Any future call to `map` with the same `new_fingerprint` will reload the result from the cache.
**Be careful using this though: if you change your `func`, be sure to change the `new_fingerprint` as well.**
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 102 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
I've been having an issue that might be related to this when trying to pre-tokenize a corpus and caching it for using it later in the pre-training of a RoBERTa model. I always get the following warning:
```
Dataset text downloaded and prepared to /gpfswork/rech/project/user/.cache/hf-datasets/text/default-1850886023af0077/0.0.0/acc32f2f2ef863c93c2f30c52f7df6cc9053a1c2230b8d7da0d210404683ca08. Subsequent calls will reuse this data.
Parameter 'function'=<function encode_dataset.<locals>.<lambda> at 0x14a92157b280> of the transform datasets.arrow_dataset.Dataset.filter@2.0.1 couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
```
And when I launch the pre-training the pre-tokenized corpus is not found and it is tokenized again, which makes me waste precious GPU hours.
For me, the workaround was downgrading `dill` and `multiprocess` to the following versions:
```
dill 0.3.4
multiprocess 0.70.12.2
```
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 167 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
> Hi ! If your function is not picklable, then the fingerprint of the resulting dataset can't be computed. The fingerprint is a hash that is used by the cache to reload previously computed datasets: the dataset file is named `cache-<fingerprint>.arrow` in your dataset's cache directory.
>
> As a workaround you can set the fingerprint that is going to be used by the cache:
>
> ```python
> result = my_dataset.map(func, new_fingerprint=new_fingerprint)
> ```
>
> Any future call to `map` with the same `new_fingerprint` will reload the result from the cache.
>
> **Be careful using this though: if you change your `func`, be sure to change the `new_fingerprint` as well.**
Is the argument `new_fingerprint` available for datasetDict ? I can only use it on arrow datasets but might be useful to generalize it to DatasetDict's map as well ? @lhoestq
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 143 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
> I've been having an issue that might be related to this when trying to pre-tokenize a corpus and caching it for using it later in the pre-training of a RoBERTa model. I always get the following warning:
>
> ```
> Dataset text downloaded and prepared to /gpfswork/rech/project/user/.cache/hf-datasets/text/default-1850886023af0077/0.0.0/acc32f2f2ef863c93c2f30c52f7df6cc9053a1c2230b8d7da0d210404683ca08. Subsequent calls will reuse this data.
> Parameter 'function'=<function encode_dataset.<locals>.<lambda> at 0x14a92157b280> of the transform datasets.arrow_dataset.Dataset.filter@2.0.1 couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
> ```
>
> And when I launch the pre-training the pre-tokenized corpus is not found and it is tokenized again, which makes me waste precious GPU hours.
>
> For me, the workaround was downgrading `dill` and `multiprocess` to the following versions:
>
> ```
> dill 0.3.4
> multiprocess 0.70.12.2
> ```
This worked for me - thanks!
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 188 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
I see this has just been closed - it seems quite relevant to another tokenizer I have been trying to use, the `vinai/phobert` family of tokenizers
https://huggingface.co/vinai/phobert-base
https://huggingface.co/vinai/phobert-large
I ran into an issue where a large dataset took several hours to tokenize, the process hung, and I was unable to use the cached version of the tokenized data:
https://discuss.huggingface.co/t/cache-parallelize-long-tokenization-step/25791/3
I don't see any way to specify the hash of the tokenizer or the fingerprint of the tokenized data to use, so is the tokenized dataset basically lost at this point? Is there a good way to avoid this happening again if I retokenize the data?
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 105 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
In your case it looks like the job failed before caching the data - maybe one of the processes crashed
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 20 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Interesting. Thanks for the observation. Any suggestions on how to start tracking that down? Perhaps run it singlethreaded and see if it crashes?
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 23 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
You can monitor your RAM and disk space in case a process dies from OOM or disk full, and when it hangs you can check how many processes are running. IIRC there are other start methods for multiprocessing in python that may show an error message if a process dies.
Running on a single process can also help debugging this indeed
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 61 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
Hi @tung-msol could you open a new issue and share the error you got and the map function you used ?
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 21 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
I faced the same problem even after using these versions for python 3.10:
> dill 0.3.4
> multiprocess 0.70.12.2
However, doing `result = my_dataset.map(func, new_fingerprint=new_fingerprint)` worked!
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 26 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3178
|
"Property couldn't be hashed properly" even though fully picklable
|
You should define your fingerprint as a string that identifies your dataset. By default it's a hash computed from the data files and on the applied transformations.
|
## Describe the bug
I am trying to tokenize a dataset with spaCy. I found that no matter what I do, the spaCy language object (`nlp`) prevents `datasets` from pickling correctly - or so the warning says - even though manually pickling is no issue. It should not be an issue either, since spaCy objects are picklable.
## Steps to reproduce the bug
Here is a [colab](https://colab.research.google.com/drive/1gt75LCBIzsmBMvvipEOvWulvyZseBiA7?usp=sharing) but for some reason I cannot reproduce it there. That may have to do with logging/tqdm on Colab, or with running things in notebooks. I tried below code on Windows and Ubuntu as a Python script and getting the same issue (warning below).
```python
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10%]")
ds = ds.map(self.parse, batched=True, num_proc=6)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled!")
pr.process()
```
---
Here is a small change that includes `Hasher.hash` that shows that the hasher cannot seem to successfully pickle parts form the NLP object.
```python
from datasets.fingerprint import Hasher
import pickle
from datasets import load_dataset
import spacy
class Processor:
def __init__(self):
self.nlp = spacy.load("en_core_web_sm", disable=["tagger", "parser", "ner", "lemmatizer"])
@staticmethod
def collate(batch):
return [d["en"] for d in batch]
def parse(self, batch):
batch = batch["translation"]
return {"translation_tok": [{"en_tok": " ".join([t.text for t in doc])} for doc in self.nlp.pipe(self.collate(batch))]}
def process(self):
ds = load_dataset("wmt16", "de-en", split="train[:10]")
return ds.map(self.parse, batched=True)
if __name__ == '__main__':
pr = Processor()
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr, f)
print("Successfully pickled class instance!")
# succeeds
with open("temp.pkl", "wb") as f:
pickle.dump(pr.nlp, f)
print("Successfully pickled nlp!")
# fails
print(Hasher.hash(pr.nlp))
pr.process()
```
## Expected results
This to be picklable, working (fingerprinted), and no warning.
## Actual results
In the first snippet, I get this warning
Parameter 'function'=<function Processor.parse at 0x7f44982247a0> of the transform datasets.arrow_dataset.Dataset._map_single couldn't be hashed properly, a random hash was used instead. Make sure your transforms and parameters are serializable with pickle or dill for the dataset fingerprinting and caching to work. If you reuse this transform, the caching mechanism will consider it to be different from the previous calls and recompute everything. This warning is only showed once. Subsequent hashing failures won't be showed.
In the second, I get this traceback which directs to the `Hasher.hash` line.
```
Traceback (most recent call last):
File " \Python\Python36\lib\pickle.py", line 918, in save_global
obj2, parent = _getattribute(module, name)
File " \Python\Python36\lib\pickle.py", line 266, in _getattribute
.format(name, obj))
AttributeError: Can't get local attribute 'add_codes.<locals>.ErrorsWithCodes' on <function add_codes at 0x00000296FF606EA0>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File " scratch_4.py", line 40, in <module>
print(Hasher.hash(pr.nlp))
File " \lib\site-packages\datasets\fingerprint.py", line 191, in hash
return cls.hash_default(value)
File " \lib\site-packages\datasets\fingerprint.py", line 184, in hash_default
return cls.hash_bytes(dumps(value))
File " \lib\site-packages\datasets\utils\py_utils.py", line 345, in dumps
dump(obj, file)
File " \lib\site-packages\datasets\utils\py_utils.py", line 320, in dump
Pickler(file, recurse=True).dump(obj)
File " \lib\site-packages\dill\_dill.py", line 498, in dump
StockPickler.dump(self, obj)
File " \Python\Python36\lib\pickle.py", line 409, in dump
self.save(obj)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 781, in save_list
self._batch_appends(obj)
File " \Python\Python36\lib\pickle.py", line 805, in _batch_appends
save(x)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 634, in save_reduce
save(state)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1176, in save_instancemethod0
pickler.save_reduce(MethodType, (obj.__func__, obj.__self__), obj=obj)
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 736, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\datasets\utils\py_utils.py", line 523, in save_function
obj=obj,
File " \Python\Python36\lib\pickle.py", line 610, in save_reduce
save(args)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \Python\Python36\lib\pickle.py", line 751, in save_tuple
save(element)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 990, in save_module_dict
StockPickler.save_dict(pickler, obj)
File " \Python\Python36\lib\pickle.py", line 821, in save_dict
self._batch_setitems(obj.items())
File " \Python\Python36\lib\pickle.py", line 847, in _batch_setitems
save(v)
File " \Python\Python36\lib\pickle.py", line 521, in save
self.save_reduce(obj=obj, *rv)
File " \Python\Python36\lib\pickle.py", line 605, in save_reduce
save(cls)
File " \Python\Python36\lib\pickle.py", line 476, in save
f(self, obj) # Call unbound method with explicit self
File " \lib\site-packages\dill\_dill.py", line 1439, in save_type
StockPickler.save_global(pickler, obj, name=name)
File " \Python\Python36\lib\pickle.py", line 922, in save_global
(obj, module_name, name))
_pickle.PicklingError: Can't pickle <class 'spacy.errors.add_codes.<locals>.ErrorsWithCodes'>: it's not found as spacy.errors.add_codes.<locals>.ErrorsWithCodes
```
## Environment info
Tried on both Linux and Windows
- `datasets` version: 1.14.0
- Platform: Windows-10-10.0.19041-SP0 + Python 3.7.9; Linux-5.11.0-38-generic-x86_64-with-Ubuntu-20.04-focal + Python 3.7.12
- PyArrow version: 6.0.0
| 27 |
"Property couldn't be hashed properly" even though fully picklable
|
[
-0.1339585781097412,
0.07860727608203888,
-0.10403108596801758,
0.08249359577894211,
0.4936879873275757,
-0.06488228589296341,
0.18993115425109863,
0.21225972473621368,
0.16959133744239807,
0.23261244595050812,
0.08282696455717087,
0.58580082654953,
-0.22868704795837402,
0.29184553027153015,
-0.30915582180023193,
0.26722800731658936,
-0.13920052349567413,
0.1412930190563202,
-0.2376355081796646,
-0.21113620698451996,
-0.08474152535200119,
-0.0031146793626248837,
-0.17144393920898438,
0.014012141153216362,
-0.3661736845970154,
-0.21970251202583313,
0.28198155760765076,
0.2020302265882492,
-0.348161518573761,
-0.17482195794582367,
0.003074071602895856,
-0.26031380891799927,
-0.37349680066108704,
-0.18304376304149628,
-0.00010344963811803609,
0.10825654864311218,
0.2205439954996109,
-0.01942708157002926,
0.0455511137843132,
0.06250494718551636,
0.06553494185209274,
0.15779489278793335,
-0.17223069071769714,
0.020042583346366882,
-0.002689770422875881,
0.2823821008205414,
-0.13876469433307648,
-0.12638996541500092,
-0.036713968962430954,
-0.1452043056488037,
0.3574364483356476,
0.04391469433903694,
0.23974086344242096,
-0.09112192690372467,
0.5703725218772888,
-0.47690024971961975,
-0.29954594373703003,
0.40343376994132996,
0.12296272069215775,
0.10593116283416748,
-0.05415760353207588,
0.17262683808803558,
0.1412867307662964,
-0.05844639241695404,
0.028171593323349953,
-0.08446038514375687,
0.13194319605827332,
0.2174830585718155,
0.17952102422714233,
0.02148834615945816,
0.0042679146863520145,
0.06890548765659332,
-0.237522155046463,
-0.15672262012958527,
-0.010834836401045322,
-0.31001028418540955,
0.46753621101379395,
-0.10812177509069443,
0.18665499985218048,
-0.013662167824804783,
-0.2859490215778351,
-0.09302621334791183,
0.19642044603824615,
-0.09017269313335419,
0.4025460481643677,
0.3041520416736603,
-0.07244324684143066,
0.11719368398189545,
0.2330746054649353,
-0.08961334824562073,
0.06342483311891556,
0.05443904176354408,
-0.19847576320171356,
-0.12201657891273499,
0.3205014169216156,
0.0439387783408165,
0.1166062206029892,
0.12156810611486435,
0.16779586672782898,
-0.04743911325931549,
0.11738280951976776,
0.22946393489837646,
-0.20309509336948395,
0.04190567508339882,
0.093254953622818,
0.015517052263021469,
0.1471514254808426,
0.16179895401000977,
-0.0735836774110794,
-0.27097538113594055,
-0.3864148259162903,
0.16305279731750488,
-0.03251960873603821,
-0.1795404851436615,
-0.07198172807693481,
0.11263012886047363,
-0.04105493798851967,
-0.045015253126621246,
-0.0008020527893677354,
0.05446557700634003,
-0.13773122429847717,
-0.01260282937437296,
0.08302426338195801,
0.1681521087884903,
0.049486082047224045,
-0.43511974811553955,
-0.26203182339668274,
-0.03715452924370766,
-0.08755338937044144,
-0.1032131239771843,
-0.25918009877204895,
0.2175709754228592,
-0.23309312760829926,
-0.2705376446247101,
0.014468557201325893,
-0.29163771867752075,
0.351959764957428,
-0.07992205023765564,
0.00047628689208067954,
0.05744490027427673,
-0.12510396540164948,
0.04002312943339348,
-0.042165495455265045,
0.18098987638950348,
-0.11082673072814941,
0.16096438467502594,
0.24048012495040894,
-0.3818381130695343,
-0.11751797795295715,
-0.07473979145288467,
-0.0045725274831056595,
-0.2704866826534271,
0.10547952353954315,
0.2524651288986206,
-0.1581900715827942,
0.042813654989004135,
-0.08574286848306656,
-0.06608890742063522,
0.2389472872018814,
-0.09138596802949905,
-0.1034206971526146,
-0.1736118644475937,
0.020439065992832184,
-0.28325602412223816,
-0.06326227635145187,
0.07063694298267365,
-0.19205833971500397,
-0.0820833072066307,
0.140267014503479,
-0.042386382818222046,
0.2831721603870392,
0.17961134016513824,
-0.15695063769817352,
0.17041875422000885,
-0.06373243778944016,
0.3744368553161621,
0.187485933303833,
-0.0361451581120491,
-0.4401010572910309,
0.0873824805021286,
-0.04227570444345474,
-0.09418006241321564,
-0.16738446056842804,
-0.14397570490837097,
0.018815968185663223,
0.08670561015605927,
0.16076955199241638,
-0.049534380435943604,
0.13129940629005432,
-0.21396750211715698,
-0.4118014872074127,
-0.2334471344947815,
0.1659414917230606,
-0.2006155401468277,
0.05585828050971031,
0.1261141151189804,
0.17162908613681793,
0.15886741876602173,
0.008695073425769806,
0.07853788137435913,
0.21329636871814728,
0.0238166693598032,
0.4031314253807068,
-0.17223553359508514,
-0.21682754158973694,
-0.20882092416286469,
-0.024603188037872314,
0.2950839102268219,
-0.32721391320228577,
0.156199112534523,
0.035032082349061966,
0.044783562421798706,
-0.11739183217287064,
-0.03765534237027168,
-0.09100960940122604,
-0.13183096051216125,
0.2592279314994812,
0.23614034056663513,
-0.2976333200931549,
-0.12142033129930496,
-0.0834912583231926,
-0.33794885873794556,
-0.14722630381584167,
-0.22423847019672394,
-0.05337773263454437,
-0.17359884083271027,
-0.33293187618255615,
-0.4711378812789917,
-0.0627756342291832,
-0.025447295978665352,
0.26646679639816284,
-0.14208893477916718,
-0.24673505127429962,
0.09123583137989044,
-0.299194872379303,
-0.11513746529817581,
0.1094873920083046,
0.15919384360313416,
-0.10131390392780304,
-0.11385594308376312,
-0.08880121260881424,
-0.24693503975868225,
-0.03445178270339966,
-0.18729375302791595,
0.12183026969432831,
0.19706320762634277,
-0.09121000021696091,
0.04557327926158905,
-0.11011876165866852,
0.039046257734298706,
0.1813652515411377,
-0.05277270823717117,
0.20198236405849457,
-0.3405435383319855,
0.030451543629169464,
0.06465113908052444,
0.013883360661566257,
0.2299138456583023,
-0.05580126494169235,
0.3141233026981354,
0.6664713621139526,
0.16404010355472565,
0.2208726704120636,
-0.06791044771671295,
0.25665298104286194,
-0.056618522852659225,
0.002893367549404502,
-0.2807126045227051,
0.07649034261703491,
0.11220250278711319,
-0.018982045352458954,
0.04109850898385048,
-0.0668065994977951,
-0.061114419251680374,
0.18637879192829132,
-0.11387786269187927,
0.2670016884803772,
0.10836312919855118,
0.029567020013928413,
-0.01830574870109558,
-0.1981199085712433,
-0.1264628767967224,
0.27725711464881897,
0.18821784853935242,
-0.32951393723487854,
-0.264779269695282,
-0.503237247467041,
0.8101668357849121,
0.29188019037246704,
-0.17984570562839508,
0.022292466834187508,
-0.27112552523612976,
0.15523824095726013,
0.4266141355037689,
-0.35083162784576416,
0.1844104379415512,
-0.3956737518310547,
0.03456985205411911,
0.09888935089111328,
0.008416193537414074,
-0.015037131495773792,
-0.19233393669128418,
-0.24176757037639618,
0.16847217082977295,
0.12405631691217422,
-0.16503651440143585,
0.15225696563720703,
0.3934798836708069,
-0.1360902488231659,
-0.039590440690517426,
-0.2612089514732361,
0.06927098333835602,
-0.2541104555130005,
0.3777335584163666,
0.37264570593833923,
-0.059360794723033905,
-0.23273515701293945,
-0.011915145441889763,
0.3856983780860901,
0.07277239859104156,
-0.25634273886680603,
-0.06434835493564606,
0.05032016336917877,
-0.4669663906097412,
-0.10314924269914627,
-0.3907359838485718,
0.0764814168214798,
-0.3795430660247803,
0.28490933775901794,
0.046634186059236526,
0.04311798885464668,
0.3042304813861847,
0.17695720493793488,
0.03412717208266258,
-0.21080517768859863,
0.14903976023197174,
-0.1957724690437317,
-0.3317220211029053,
0.17401714622974396,
-0.13153859972953796,
-0.2203100472688675,
-0.04738203063607216,
0.009565234184265137,
-0.059364039450883865,
0.09302998334169388,
-0.017288019880652428,
0.33018597960472107,
-0.09558890759944916,
0.2630090117454529,
-0.008040535263717175,
-0.1719551384449005,
0.11001832783222198,
0.2747388482093811,
-0.23164981603622437,
-0.2593911290168762,
-0.24593035876750946,
0.34706220030784607,
-0.2746320068836212,
0.21250951290130615,
0.0705493614077568,
-0.053030338138341904,
0.06830353289842606,
0.7205777764320374,
0.0018966884817928076,
-0.17259661853313446,
0.29415687918663025,
-0.1654307246208191,
0.013213095255196095,
-0.20116813480854034,
-0.36713653802871704,
-0.010015996173024178,
0.051921963691711426,
0.024242565035820007,
0.05199410766363144,
-0.13596715033054352,
0.4787154495716095,
0.17917078733444214,
-0.16933003067970276,
-0.28129032254219055,
-0.17432114481925964,
0.1858334243297577,
-0.12382654845714569,
-0.19112607836723328,
0.06709177792072296,
0.11437248438596725,
0.09589181840419769,
0.12529560923576355,
0.16833095252513885,
-0.2500845789909363,
0.03944342955946922,
0.024489594623446465,
-0.04445615038275719,
-0.08356980979442596,
0.2983153164386749,
0.2002345323562622,
0.017218586057424545,
0.20550082623958588,
-0.3368981182575226,
-0.14367088675498962,
-0.1018969714641571,
-0.028835460543632507,
0.605627715587616,
-0.2837923765182495,
0.28661927580833435,
0.2784779369831085,
-0.18632008135318756,
0.37961122393608093,
-0.13604865968227386,
-0.016097046434879303,
0.3512403666973114,
0.36400172114372253,
0.09085779637098312,
-0.3153682053089142,
0.3018342852592468,
-0.03701967000961304,
-0.3128836750984192,
-0.019394446164369583,
0.03295695409178734,
-0.1615198701620102,
-0.019234133884310722,
-0.2602714002132416,
-0.05719535052776337,
0.010971549898386002,
0.2304721474647522,
0.0770237073302269,
-0.18044805526733398,
-0.09987884759902954,
-0.18338465690612793,
-0.06355182081460953,
-0.017501048743724823,
-0.024327754974365234,
-0.060527704656124115,
0.446100115776062,
-0.24953120946884155,
0.2584846019744873,
-0.0848654955625534,
0.45075809955596924,
0.14501285552978516,
0.16100548207759857,
0.017265308648347855,
-0.12391716986894608,
0.02606315352022648,
0.17091259360313416,
-0.1427180916070938,
0.23422639071941376,
0.11991043388843536,
0.008790990337729454,
0.26071426272392273,
0.00038479510112665594,
0.015823792666196823,
-0.19171355664730072,
-0.05592327564954758,
0.14586606621742249,
0.6720074415206909,
-0.3779166638851166,
-0.06557061523199081,
0.327495813369751,
0.397089421749115,
-0.32057470083236694,
0.3039725720882416,
0.13999909162521362,
1.1128580570220947,
0.004268062300980091,
-0.2825382351875305,
-0.08246760070323944,
0.12662209570407867,
0.2952817976474762,
0.3781941533088684,
-0.10804017633199692,
-0.2951045334339142,
0.13112708926200867,
0.13582433760166168,
-0.08932612091302872,
0.25436365604400635,
0.049615420401096344,
-0.012604367919266224,
0.01811184734106064,
-0.22734904289245605,
0.049088988453149796,
0.045424602925777435,
0.08315283805131912,
-0.10145727545022964,
-0.09803848713636398,
0.16083738207817078,
0.23850364983081818,
-0.008746035397052765,
0.2075621634721756,
0.0217752568423748,
-0.1645975559949875,
-0.21182259917259216,
-0.22952689230442047,
-0.3662909269332886,
0.2229708582162857,
-0.09013603627681732,
0.2348037213087082,
0.2805662751197815,
0.12314602732658386,
0.09466040879487991,
-0.6048380136489868,
0.1006842851638794,
0.2089015692472458,
-0.1817568689584732,
0.2694072127342224,
0.18806718289852142,
-0.23265968263149261,
0.008532700128853321,
0.20116542279720306,
0.297782301902771,
-0.10157554596662521,
-0.015315352007746696,
-0.0896855816245079,
-0.25438565015792847,
-0.16334007680416107,
-0.13595429062843323,
0.04172097146511078,
0.14722712337970734,
-0.30713334679603577,
-0.2829832434654236,
-0.16173489391803741,
-0.2004605382680893,
-0.35401681065559387,
0.2194003164768219,
0.007115974556654692,
0.15592505037784576,
0.0868532583117485,
0.21026836335659027,
-0.10114944726228714,
-0.07188800722360611,
0.16090252995491028,
-0.12314672768115997,
0.3415731191635132,
0.3751753270626068,
-0.1934141367673874,
-0.26090410351753235,
-0.13204127550125122,
-0.049098532646894455,
0.036169614642858505,
-0.03895789012312889,
0.09911193698644638,
-0.13166065514087677,
-0.279604434967041,
-0.06898407638072968,
0.6086581945419312,
0.33439356088638306,
0.43452689051628113,
-0.0438113659620285,
-0.10428019613027573,
-0.26298007369041443,
0.10097932815551758,
-0.08044815808534622,
0.18022207915782928,
-0.3605916202068329,
0.6065356135368347,
-0.08106449246406555,
0.22718068957328796,
-0.4257034659385681,
-0.1823538839817047,
-0.21830561757087708,
-0.003413778031244874,
0.0746951773762703,
-0.058445531874895096,
-0.1560228317975998,
-0.07860536128282547,
0.2878313958644867,
0.4385804533958435,
-0.12284325063228607,
-0.3183573782444,
-0.1705688238143921,
0.03261668235063553,
0.37882474064826965,
0.23667167127132416,
-0.2389480173587799,
-0.09870672225952148,
-0.12852244079113007,
-0.04757753387093544,
-0.14977145195007324,
0.3181082308292389,
0.21882911026477814,
-0.017043517902493477,
-0.01876155287027359,
0.08288900554180145,
0.007506676483899355,
-0.09076157957315445,
-0.2660571336746216,
0.033289212733507156,
-0.05560335889458656,
-0.17382358014583588,
-0.027124131098389626,
-0.067273810505867,
-0.15649625658988953,
-0.2114548236131668,
-0.07676254212856293,
0.16166014969348907,
0.1996781975030899,
-0.05390813574194908,
0.023412441834807396,
0.23862387239933014,
0.19929535686969757,
-0.030567141249775887,
-0.1104511097073555,
-0.29424503445625305,
0.11987356096506119,
0.298276424407959,
-0.33680444955825806,
0.0062377555295825005,
-0.40108275413513184,
0.03132157772779465,
0.08000709116458893,
-0.011974778957664967,
-0.13424614071846008,
0.08908451348543167,
-0.5773075222969055,
0.12517529726028442,
0.4118143320083618,
-0.37385326623916626,
-0.3195546865463257,
-0.11634695529937744,
-0.2900707423686981,
0.07540187239646912,
0.4116949737071991,
0.0003196783654857427,
0.12084747850894928,
0.5732976794242859,
-0.1430819034576416,
0.11558882892131805,
-0.08927758783102036,
0.09997469931840897,
-0.03516680374741554,
-0.3421660363674164,
0.3797496259212494,
0.5006890296936035,
0.2955297529697418,
0.32829055190086365,
0.1020829975605011,
0.4674818813800812,
-0.19446302950382233,
-0.13006624579429626,
0.13066145777702332,
0.4128863215446472,
-0.10291634500026703,
-0.15998636186122894,
-0.39457187056541443,
-0.12708257138729095,
-0.23955276608467102,
0.06467562168836594,
-0.09358307719230652,
0.16916045546531677,
0.5160351991653442,
-0.09860561788082123,
-0.30137205123901367,
-0.3226207494735718,
0.03241688758134842,
-0.17396023869514465,
0.2814348042011261,
-0.3598812520503998,
0.17791689932346344,
0.13465048372745514,
-0.15585418045520782,
-0.11644518375396729,
0.12604884803295135,
0.42622849345207214,
0.21798746287822723,
0.06236111372709274,
-0.07757243514060974,
-0.0074898069724440575,
-0.21792735159397125,
-0.13621553778648376,
0.5061631798744202,
0.18245185911655426,
0.15180516242980957,
0.1017058938741684,
0.2497444897890091,
-0.34171321988105774,
0.2849390506744385,
0.08357145637273788,
0.4515448808670044,
0.3744812309741974,
0.13696525990962982,
0.19006456434726715,
-0.1269700676202774,
0.10763764381408691,
0.033908747136592865,
-0.06552983075380325,
-0.338878333568573,
0.1449228674173355,
0.16088217496871948,
0.2284059226512909,
-0.15408235788345337,
0.1679406315088272,
0.24358899891376495,
0.4021444320678711,
0.17142613232135773,
-0.11876828223466873,
-0.33806270360946655,
0.5011965036392212,
-0.30271217226982117,
0.31747299432754517,
-0.2981206774711609,
-0.17247799038887024,
-0.06203794106841087,
0.23237140476703644,
0.300652414560318,
-0.17151297628879547,
-0.022081254050135612,
0.2957790791988373,
0.10783585160970688,
0.04795670509338379,
0.05574863404035568,
0.08989222347736359,
0.04968005418777466,
-0.3189076781272888,
0.2100701630115509,
-0.3212641477584839,
0.4225500822067261,
0.26137927174568176,
0.2751569449901581,
-0.22337354719638824,
-0.2780991494655609,
0.17295312881469727,
-0.025286026298999786,
0.17078013718128204,
0.11757253855466843,
0.48357757925987244,
-0.2532625198364258,
-0.16242173314094543,
-0.2731992304325104,
-0.36417096853256226,
0.14107543230056763,
0.07754199206829071,
0.13110366463661194,
0.06426720321178436,
0.10034386813640594,
0.2143123745918274,
-0.32629191875457764,
0.25779569149017334,
-0.4300229549407959,
0.31817421317100525,
-0.30333513021469116,
0.1673261821269989,
-0.08151282370090485,
0.028901297599077225,
-0.0784895271062851,
-0.0037118634209036827,
-0.1420023888349533,
-0.04802912473678589,
-0.47519904375076294,
-0.5830544829368591,
0.7177832722663879,
-0.09961400181055069,
-0.26383301615715027,
0.36125558614730835,
0.03974100574851036,
0.42430704832077026,
0.03227303549647331,
-0.5576749444007874,
-0.2767787277698517,
0.3591448664665222,
-0.03371446952223778,
-0.17948631942272186,
-0.09173077344894409,
-0.13466796278953552,
-0.011308564804494381,
-0.014441730454564095,
0.47821369767189026,
-0.11404625326395035,
-0.15819652378559113,
0.14496955275535583,
0.06133649870753288
] |
https://github.com/huggingface/datasets/issues/3177
|
More control over TQDM when using map/filter with multiple processes
|
Hi,
It's hard to provide an API that would cover all use-cases with tqdm in this project.
However, you can make it work by defining a custom decorator (a bit hacky tho) as follows:
```python
import datasets
def progress_only_on_rank_0(func):
def wrapper(*args, **kwargs):
rank = kwargs.get("rank")
disable_tqdm = kwargs.get("disable_tqdm", False)
disable_tqdm = True if rank is not None and rank > 0 else disable_tqdm
kwargs["disable_tqdm"] = disable_tqdm
return func(*args, **kwargs)
return wrapper
datasets.Dataset._map_single = progress_only_on_rank_0(datasets.Dataset._map_single)
```
EDIT: Ups, closed by accident.
Thanks for the provided links. `Trainer` requires this for training in multi-node distributed setting. However, `Dataset.map` doesn't support that yet.
Do you have an API for this in mind? `Dataset.map` is already bloated with the arguments, so IMO it's not a good idea to add a new arg there.
|
It would help with the clutter in my terminal if tqdm is only shown for rank 0 when using `num_proces>0` in the map and filter methods of datasets.
```python
dataset.map(lambda examples: tokenize(examples["text"]), batched=True, num_proc=6)
```
The above snippet leads to a lot of TQDM bars and depending on your terminal, these will not overwrite but keep pushing each other down.
```
#0: 0%| | 0/13 [00:00<?, ?ba/s]
#1: 0%| | 0/13 [00:00<?, ?ba/s]
#2: 0%| | 0/13 [00:00<?, ?ba/s]
#3: 0%| | 0/13 [00:00<?, ?ba/s]
#4: 0%| | 0/13 [00:00<?, ?ba/s]
#5: 0%| | 0/13 [00:00<?, ?ba/s]
#0: 8%| | 1/13 [00:00<?, ?ba/s]
#1: 8%| | 1/13 [00:00<?, ?ba/s]
...
```
Instead, it would be welcome if we had the option to only show the progress of rank 0.
| 129 |
More control over TQDM when using map/filter with multiple processes
|
[
-0.17955203354358673,
-0.37446457147598267,
-0.16705144941806793,
-0.16879527270793915,
0.006520557217299938,
-0.5566912889480591,
0.44626384973526,
0.16413567960262299,
0.19494646787643433,
0.30999913811683655,
-0.34144365787506104,
0.32790014147758484,
-0.1582021862268448,
0.13184715807437897,
-0.28125062584877014,
0.06289106607437134,
-0.2791036367416382,
-0.2588755488395691,
-0.29023176431655884,
0.24119000136852264,
-0.039639294147491455,
0.06521901488304138,
0.17089629173278809,
0.14408598840236664,
-0.017155040055513382,
0.0019694562070071697,
0.2240162491798401,
0.2640288472175598,
0.20519645512104034,
-0.1048649251461029,
-0.4486849009990692,
0.6087926030158997,
-0.25463488698005676,
0.34452736377716064,
-0.00011173651728313416,
0.12085230648517609,
-0.10336527973413467,
0.07034171372652054,
0.12095323950052261,
0.5262030363082886,
0.06479476392269135,
-0.15103508532047272,
0.09628869593143463,
-0.16299767792224884,
0.12437719106674194,
0.3426941931247711,
0.002932451432570815,
-0.1335555911064148,
0.455181747674942,
-0.3694421947002411,
0.15558116137981415,
0.41728469729423523,
-0.6518991589546204,
0.3354721665382385,
-0.20029355585575104,
-0.34170982241630554,
0.041374482214450836,
-0.12898655235767365,
0.9446825981140137,
-0.14988450706005096,
-0.29795554280281067,
0.5195099115371704,
-0.20562899112701416,
0.07845199853181839,
-0.015543321147561073,
0.01566041260957718,
0.7055585980415344,
-0.4777544438838959,
0.141462042927742,
0.13554581999778748,
-0.026392614468932152,
-0.06168649345636368,
-0.011782696470618248,
-0.2505282461643219,
-0.21616336703300476,
0.07815215736627579,
-0.10895216464996338,
-0.3886389136314392,
-0.16935484111309052,
0.04579954221844673,
-0.5546899437904358,
0.018273210152983665,
0.07535140961408615,
-0.14279603958129883,
-0.286529004573822,
0.17906436324119568,
0.2175692468881607,
0.029627269133925438,
0.17203611135482788,
0.10966706275939941,
0.1780809760093689,
0.052724726498126984,
0.028959831222891808,
0.09667074680328369,
-0.2030230313539505,
-0.12369602918624878,
0.3498185873031616,
-0.13526728749275208,
-0.08800195902585983,
0.0071764979511499405,
0.10224565863609314,
0.5188749432563782,
0.14961569011211395,
0.13459137082099915,
0.23796485364437103,
-0.19110864400863647,
-0.04265230894088745,
0.07214593142271042,
0.38049131631851196,
-0.4230984151363373,
-0.30598434805870056,
0.19571590423583984,
0.3295905292034149,
-0.23903293907642365,
0.02733425609767437,
0.12561047077178955,
-0.16007953882217407,
0.30378443002700806,
0.20806856453418732,
-0.034314099699258804,
0.18075865507125854,
0.03602396324276924,
0.21175959706306458,
0.2593238353729248,
0.23717565834522247,
0.34715136885643005,
-0.05001446604728699,
-0.048597872257232666,
-0.14259150624275208,
-0.17837952077388763,
-0.05918186530470848,
-0.3125755786895752,
0.18005238473415375,
-0.21672874689102173,
-0.10574883967638016,
0.18445205688476562,
-0.10121025890111923,
-0.11214917153120041,
0.3404369354248047,
0.14110207557678223,
0.3265034258365631,
-0.06017811968922615,
0.3352147340774536,
0.4506012201309204,
0.07792205363512039,
-0.033680979162454605,
0.0035964306443929672,
0.037715304642915726,
-0.20036618411540985,
-0.02681860513985157,
-0.38112878799438477,
-0.15827201306819916,
0.6519415974617004,
0.13428249955177307,
0.5013023614883423,
0.14435677230358124,
0.29022470116615295,
0.34797802567481995,
0.07692534476518631,
-0.13855700194835663,
-0.07591696083545685,
0.0885314866900444,
-0.10337633639574051,
-0.23062844574451447,
-0.11307007074356079,
0.27845922112464905,
-0.01536386739462614,
-0.13596318662166595,
-0.3685956597328186,
-0.013845247216522694,
0.14876025915145874,
0.2324436455965042,
-0.22225818037986755,
0.43051502108573914,
0.24302348494529724,
0.14858399331569672,
0.43377935886383057,
-0.4273240566253662,
-0.2783161997795105,
0.6021015048027039,
-0.3765738010406494,
0.17221835255622864,
0.16903214156627655,
0.12142831832170486,
0.38701730966567993,
-0.036771535873413086,
0.33334261178970337,
0.12251297384500504,
-0.4105496406555176,
0.49080604314804077,
0.0555935762822628,
0.1710897535085678,
-0.0868758112192154,
-0.34697964787483215,
0.30056214332580566,
0.06306754797697067,
0.20060008764266968,
-0.4306788146495819,
0.2392001897096634,
0.10036741942167282,
0.0658932626247406,
-0.14232449233531952,
0.024859804660081863,
-0.35997962951660156,
-0.20168599486351013,
-0.03652395308017731,
-0.006859134882688522,
0.0711001604795456,
-0.17219190299510956,
-0.07113902270793915,
0.14002108573913574,
-0.03144710138440132,
-0.08443450182676315,
0.11615178734064102,
0.05916914716362953,
-0.039417773485183716,
0.21949344873428345,
0.07273389399051666,
-0.43415889143943787,
-0.48941707611083984,
-0.06376513093709946,
0.15945294499397278,
0.3401239216327667,
-0.06754758954048157,
0.5447463989257812,
-0.13329988718032837,
0.07332339137792587,
-0.02695092000067234,
-0.17701227962970734,
-0.1372121423482895,
-0.06643544882535934,
0.01607145182788372,
0.21290355920791626,
0.3309600353240967,
0.1284499168395996,
0.1284991204738617,
0.32451069355010986,
0.22871118783950806,
0.21879135072231293,
0.34568652510643005,
-0.15800969302654266,
-0.0765540674328804,
-0.09364080429077148,
-0.06274691224098206,
0.3356578052043915,
0.2850082814693451,
-0.055452849715948105,
0.23357120156288147,
0.03059210814535618,
0.17132318019866943,
0.03421616926789284,
-0.13374264538288116,
-0.006174526177346706,
-0.2035660594701767,
-0.06202402338385582,
0.3429514169692993,
-0.23179464042186737,
-0.09050179272890091,
-0.2662658989429474,
0.6000077128410339,
-0.029784472659230232,
0.21032872796058655,
-0.08417262136936188,
-0.445223867893219,
0.2031603902578354,
0.28561827540397644,
-0.06893779337406158,
0.21927990019321442,
0.14887994527816772,
0.27623385190963745,
0.07412229478359222,
-0.14880318939685822,
-0.08641966432332993,
-0.0956885889172554,
-0.013327139429748058,
0.2804184854030609,
-0.14036540687084198,
0.19092290103435516,
0.12748990952968597,
-0.1593497395515442,
0.07713312655687332,
-0.2656029760837555,
0.25498485565185547,
-0.28261882066726685,
-0.17517724633216858,
-0.025586577132344246,
-0.24750138819217682,
-0.07604231685400009,
0.21556036174297333,
-0.09917215257883072,
-0.13499587774276733,
-0.34913215041160583,
0.37771543860435486,
0.13961151242256165,
-0.47774630784988403,
0.12089333683252335,
-0.0336998775601387,
0.24094487726688385,
-0.10700104385614395,
-0.0633431151509285,
0.11743974685668945,
-0.3203592896461487,
-0.03590627759695053,
0.08891479671001434,
0.1986142098903656,
-0.1069319024682045,
0.3679754137992859,
0.050662100315093994,
-0.19671742618083954,
-0.08743877708911896,
-0.20028717815876007,
0.07276847958564758,
0.0037398526910692453,
0.35699987411499023,
-0.0893753245472908,
0.04364169389009476,
-0.2737226188182831,
-0.01078339945524931,
0.11569537222385406,
-0.018125368282198906,
-0.2715141773223877,
-0.10695228725671768,
0.15553484857082367,
-0.10296660661697388,
-0.2868266999721527,
-0.01437761913985014,
0.0443890355527401,
-0.33951640129089355,
-0.07953857630491257,
-0.37609007954597473,
0.3516007363796234,
-0.0879710465669632,
-0.10122295469045639,
-0.39785483479499817,
-0.15071392059326172,
0.09420879185199738,
-0.08387986570596695,
-0.10033600777387619,
-0.02590220421552658,
-0.2735942304134369,
0.027112526819109917,
-0.13924500346183777,
0.042306214570999146,
0.0912148654460907,
0.5724222660064697,
0.1605776995420456,
-0.19284282624721527,
0.2663491368293762,
0.1337129771709442,
0.207157164812088,
0.10452155768871307,
0.23147541284561157,
0.16145583987236023,
-0.19712921977043152,
-0.03269912675023079,
-0.08957365155220032,
-0.030718067660927773,
0.238027885556221,
0.030320143327116966,
-0.10660421848297119,
0.2309030294418335,
-0.044100869446992874,
0.809952974319458,
-0.40000441670417786,
0.3598218560218811,
-0.1389261782169342,
-0.0515671968460083,
-0.002029190305620432,
0.11270610988140106,
-0.12718290090560913,
-0.051313769072294235,
0.033558350056409836,
-0.048667389899492264,
0.22349058091640472,
-0.05966712161898613,
0.04818250611424446,
0.03774329647421837,
0.07958438247442245,
-0.3224208950996399,
-0.34703123569488525,
0.10884147882461548,
0.16202329099178314,
0.4241134524345398,
0.10328883677721024,
-0.14689794182777405,
-0.1605381816625595,
0.34790048003196716,
0.12588123977184296,
0.03427254781126976,
-0.028372840955853462,
-0.23843775689601898,
-0.11752457916736603,
0.05310947448015213,
-0.18802480399608612,
0.11000817269086838,
0.06420031189918518,
-0.15485376119613647,
-0.01633240282535553,
-0.3217475712299347,
-0.008399446494877338,
0.021088065579533577,
0.4621269404888153,
-0.20892515778541565,
-0.10672436654567719,
0.019564703106880188,
-0.5763280391693115,
0.03171921521425247,
0.23699051141738892,
-0.037303049117326736,
-0.10263149440288544,
0.5784933567047119,
0.11255087703466415,
-0.20981210470199585,
-0.09030892699956894,
-0.3993047773838043,
-0.09767208248376846,
-0.2808993458747864,
-0.07462096214294434,
0.04621056094765663,
-0.12346696108579636,
-0.19037067890167236,
0.15218986570835114,
0.057365041226148605,
-0.13047100603580475,
0.11345621198415756,
-0.06039710342884064,
-0.09957452118396759,
-0.17699936032295227,
0.05203123018145561,
0.46210387349128723,
0.057410482317209244,
-0.02203870378434658,
0.040383800864219666,
0.05578413978219032,
0.16528938710689545,
-0.2559393644332886,
0.095298171043396,
-0.15986268222332,
0.27435678243637085,
0.14513427019119263,
0.049671005457639694,
0.2909265160560608,
0.5898076891899109,
0.19183582067489624,
0.17476682364940643,
0.20919963717460632,
0.07856912165880203,
0.3172011077404022,
0.26289406418800354,
-0.1370207965373993,
-0.05516425892710686,
0.2686593532562256,
0.216608926653862,
-0.1933007836341858,
0.09905648976564407,
-0.41351863741874695,
0.29379135370254517,
-0.4492120146751404,
-0.19798599183559418,
0.014200477860867977,
0.27436840534210205,
0.6137481331825256,
-0.2048763781785965,
0.07533968240022659,
-0.141486257314682,
-0.0013059714110568166,
-0.49310609698295593,
-0.3220101594924927,
0.2420388013124466,
-0.10828664898872375,
0.031027760356664658,
0.023470032960176468,
-0.03203621879220009,
0.08973817527294159,
0.15394195914268494,
0.0690217986702919,
-0.009513713419437408,
0.21029625833034515,
0.13974767923355103,
-0.13191506266593933,
-0.1104939877986908,
0.20589613914489746,
-0.4105100631713867,
-0.03880405053496361,
0.0450126938521862,
0.18865901231765747,
-0.4709801971912384,
-0.26682546734809875,
-0.2640031576156616,
0.05238757282495499,
-0.03561665862798691,
0.31427979469299316,
-0.4114638566970825,
-0.6738423109054565,
0.02132665179669857,
0.35703274607658386,
0.1240718811750412,
-0.19693531095981598,
-0.1962817907333374,
-0.2842211127281189,
0.2156277596950531,
0.12638205289840698,
0.13924621045589447,
0.5982515215873718,
0.3645815849304199,
-0.0890222117304802,
-0.2799200713634491,
0.19006994366645813,
-0.07061858475208282,
-0.04076988250017166,
0.2159065455198288,
-0.04014710336923599,
-0.35958361625671387,
-0.0652303695678711,
0.4096764326095581,
0.08508572727441788,
0.29022547602653503,
0.2059614062309265,
0.135066419839859,
-0.06698146462440491,
-0.047076232731342316,
0.10281673073768616,
0.0228766817599535,
0.09684444218873978,
0.49896448850631714,
-0.20046204328536987,
-0.1276654303073883,
-0.12329596281051636,
-0.17063218355178833,
-0.09713443368673325,
0.05135078355669975,
-0.010629226453602314,
-0.40056484937667847,
-0.09748505055904388,
-0.25706544518470764,
-0.07633110135793686,
-0.2673877775669098,
0.37344884872436523,
0.3596048653125763,
-0.12179720401763916,
-0.6918435096740723,
0.21985988318920135,
0.22744400799274445,
-0.010170530527830124,
0.1945130079984665,
-0.4340824484825134,
0.01244256179779768,
-0.39352139830589294,
0.1567596197128296,
-0.16361483931541443,
-0.01651637628674507,
-0.12775707244873047,
0.5608338713645935,
-0.1873491257429123,
0.27973389625549316,
-0.345615029335022,
-0.6173692345619202,
0.11053033173084259,
0.2414119988679886,
0.09901101142168045,
-0.007454118691384792,
0.011994924396276474,
0.04025203362107277,
0.05715765431523323,
0.28539344668388367,
-0.28749793767929077,
-0.2706542909145355,
0.07397424429655075,
0.1070452407002449,
-0.022962672635912895,
-0.14508353173732758,
0.08101550489664078,
-0.03612222895026207,
0.13809698820114136,
-0.19606098532676697,
0.1886076182126999,
-0.06117139011621475,
-0.03480948507785797,
-0.46890783309936523,
0.1327047199010849,
-0.32724425196647644,
0.22411826252937317,
0.2567785084247589,
0.23365721106529236,
-0.1914169192314148,
0.15115149319171906,
0.17713285982608795,
-0.16735614836215973,
-0.1044214516878128,
0.28004446625709534,
-0.056488409638404846,
0.21757058799266815,
-0.07835372537374496,
0.11410149931907654,
0.22376210987567902,
-0.3236871361732483,
0.3617140054702759,
0.13768088817596436,
0.15959642827510834,
-0.1673048883676529,
-0.31147637963294983,
0.1125309094786644,
0.1566513627767563,
-0.09018121659755707,
-0.09634020179510117,
0.08034401386976242,
-0.09165694564580917,
0.3425704836845398,
0.36988064646720886,
0.1661640852689743,
-0.05478864535689354,
0.08869784325361252,
0.20359386503696442,
-0.3454712927341461,
-0.5076162219047546,
-0.18168239295482635,
-0.09850464016199112,
0.04553616791963577,
0.11397037655115128,
0.4800501763820648,
-0.07629863172769547,
-0.09550899267196655,
-0.19087277352809906,
0.1802745759487152,
-0.06626135855913162,
-0.1782185286283493,
-0.21283988654613495,
-0.0013948500854894519,
-0.11663933098316193,
0.030902987346053123,
-0.22896723449230194,
-0.22053517401218414,
0.20900015532970428,
0.15863977372646332,
-0.38113266229629517,
0.35709309577941895,
-0.2606889009475708,
0.1020522341132164,
0.5551603436470032,
-0.05782978609204292,
-0.35288649797439575,
0.13562987744808197,
-0.10156574100255966,
0.21703940629959106,
-0.04739498347043991,
0.24072562158107758,
0.20668171346187592,
0.49748173356056213,
0.04390367493033409,
0.1995241940021515,
-0.21951362490653992,
-0.48884445428848267,
-0.01836344227194786,
0.18050792813301086,
-0.37792712450027466,
-0.29033756256103516,
-0.14814001321792603,
-0.0642337054014206,
0.2718213200569153,
-0.0866958349943161,
0.059265073388814926,
0.10657953470945358,
-0.2491791993379593,
-0.23073530197143555,
-0.05999224632978439,
0.07509653270244598,
-0.4892391264438629,
-0.07582300901412964,
0.08433972299098969,
-0.0016945713432505727,
0.28298017382621765,
0.09281027317047119,
-0.19513888657093048,
-0.24536938965320587,
0.13293853402137756,
0.029445260763168335,
0.1109079048037529,
0.21506372094154358,
0.31843286752700806,
0.019106708467006683,
0.23028670251369476,
0.20556187629699707,
-0.16206848621368408,
-0.2779117226600647,
0.3415006399154663,
-0.42627018690109253,
0.20778857171535492,
-0.15474490821361542,
0.08967471122741699,
0.11158737540245056,
0.3617263436317444,
-0.11542783677577972,
-0.0069126165471971035,
-0.34858042001724243,
0.029927721247076988,
-0.5454416871070862,
0.0021812880877405405,
-0.10409501194953918,
-0.21379882097244263,
-0.0030220933258533478,
0.2958897650241852,
0.20583157241344452,
0.28652384877204895,
0.2134951651096344,
-0.7866144776344299,
-0.030031384900212288,
0.0987219288945198,
-0.17052806913852692,
0.11811494082212448,
-0.26435908675193787,
0.049939852207899094,
0.2710101306438446,
-0.1275968849658966,
0.2815198600292206,
0.18221448361873627,
0.18245643377304077,
0.2164503037929535,
-0.005288966000080109,
0.3470104932785034,
0.5325679183006287,
-0.288589209318161,
-0.002026337431743741,
0.13483545184135437,
-0.2335212379693985,
0.2782858610153198,
-0.009049005806446075,
0.022501498460769653,
-0.2139330804347992,
-0.3548392951488495,
0.21658703684806824,
0.00282656098715961,
-0.21153874695301056,
-0.004279525950551033,
-0.13934345543384552,
-0.06541794538497925,
0.1901242434978485,
0.014439250342547894,
0.2042541801929474,
0.05741008371114731,
0.3246319890022278,
0.12806089222431183,
-0.1360461711883545,
0.44988274574279785,
0.23152172565460205,
0.3352545499801636,
-0.028214266523718834,
-0.3566960096359253,
0.23311257362365723,
-0.2943468391895294,
-0.32233837246894836,
-0.24890518188476562,
0.15774691104888916,
-0.2089887410402298,
0.17203298211097717,
-0.13112951815128326,
-0.3585330843925476,
0.10796986520290375,
-0.19292977452278137,
-0.12514178454875946,
0.2348155379295349,
-0.05800569802522659,
-0.27273082733154297,
-0.0838082879781723,
-0.23858040571212769,
0.10218077898025513,
-0.07901313900947571,
-0.4013023376464844,
0.15587404370307922
] |
https://github.com/huggingface/datasets/issues/3177
|
More control over TQDM when using map/filter with multiple processes
|
Inspiration may be found at `transformers`.
https://github.com/huggingface/transformers/blob/4a394cf53f05e73ab9bbb4b179a40236a5ffe45a/src/transformers/trainer.py#L1231-L1233
To get unique IDs for each worker, see https://stackoverflow.com/a/10192611/1150683
|
It would help with the clutter in my terminal if tqdm is only shown for rank 0 when using `num_proces>0` in the map and filter methods of datasets.
```python
dataset.map(lambda examples: tokenize(examples["text"]), batched=True, num_proc=6)
```
The above snippet leads to a lot of TQDM bars and depending on your terminal, these will not overwrite but keep pushing each other down.
```
#0: 0%| | 0/13 [00:00<?, ?ba/s]
#1: 0%| | 0/13 [00:00<?, ?ba/s]
#2: 0%| | 0/13 [00:00<?, ?ba/s]
#3: 0%| | 0/13 [00:00<?, ?ba/s]
#4: 0%| | 0/13 [00:00<?, ?ba/s]
#5: 0%| | 0/13 [00:00<?, ?ba/s]
#0: 8%| | 1/13 [00:00<?, ?ba/s]
#1: 8%| | 1/13 [00:00<?, ?ba/s]
...
```
Instead, it would be welcome if we had the option to only show the progress of rank 0.
| 16 |
More control over TQDM when using map/filter with multiple processes
|
[
-0.17955203354358673,
-0.37446457147598267,
-0.16705144941806793,
-0.16879527270793915,
0.006520557217299938,
-0.5566912889480591,
0.44626384973526,
0.16413567960262299,
0.19494646787643433,
0.30999913811683655,
-0.34144365787506104,
0.32790014147758484,
-0.1582021862268448,
0.13184715807437897,
-0.28125062584877014,
0.06289106607437134,
-0.2791036367416382,
-0.2588755488395691,
-0.29023176431655884,
0.24119000136852264,
-0.039639294147491455,
0.06521901488304138,
0.17089629173278809,
0.14408598840236664,
-0.017155040055513382,
0.0019694562070071697,
0.2240162491798401,
0.2640288472175598,
0.20519645512104034,
-0.1048649251461029,
-0.4486849009990692,
0.6087926030158997,
-0.25463488698005676,
0.34452736377716064,
-0.00011173651728313416,
0.12085230648517609,
-0.10336527973413467,
0.07034171372652054,
0.12095323950052261,
0.5262030363082886,
0.06479476392269135,
-0.15103508532047272,
0.09628869593143463,
-0.16299767792224884,
0.12437719106674194,
0.3426941931247711,
0.002932451432570815,
-0.1335555911064148,
0.455181747674942,
-0.3694421947002411,
0.15558116137981415,
0.41728469729423523,
-0.6518991589546204,
0.3354721665382385,
-0.20029355585575104,
-0.34170982241630554,
0.041374482214450836,
-0.12898655235767365,
0.9446825981140137,
-0.14988450706005096,
-0.29795554280281067,
0.5195099115371704,
-0.20562899112701416,
0.07845199853181839,
-0.015543321147561073,
0.01566041260957718,
0.7055585980415344,
-0.4777544438838959,
0.141462042927742,
0.13554581999778748,
-0.026392614468932152,
-0.06168649345636368,
-0.011782696470618248,
-0.2505282461643219,
-0.21616336703300476,
0.07815215736627579,
-0.10895216464996338,
-0.3886389136314392,
-0.16935484111309052,
0.04579954221844673,
-0.5546899437904358,
0.018273210152983665,
0.07535140961408615,
-0.14279603958129883,
-0.286529004573822,
0.17906436324119568,
0.2175692468881607,
0.029627269133925438,
0.17203611135482788,
0.10966706275939941,
0.1780809760093689,
0.052724726498126984,
0.028959831222891808,
0.09667074680328369,
-0.2030230313539505,
-0.12369602918624878,
0.3498185873031616,
-0.13526728749275208,
-0.08800195902585983,
0.0071764979511499405,
0.10224565863609314,
0.5188749432563782,
0.14961569011211395,
0.13459137082099915,
0.23796485364437103,
-0.19110864400863647,
-0.04265230894088745,
0.07214593142271042,
0.38049131631851196,
-0.4230984151363373,
-0.30598434805870056,
0.19571590423583984,
0.3295905292034149,
-0.23903293907642365,
0.02733425609767437,
0.12561047077178955,
-0.16007953882217407,
0.30378443002700806,
0.20806856453418732,
-0.034314099699258804,
0.18075865507125854,
0.03602396324276924,
0.21175959706306458,
0.2593238353729248,
0.23717565834522247,
0.34715136885643005,
-0.05001446604728699,
-0.048597872257232666,
-0.14259150624275208,
-0.17837952077388763,
-0.05918186530470848,
-0.3125755786895752,
0.18005238473415375,
-0.21672874689102173,
-0.10574883967638016,
0.18445205688476562,
-0.10121025890111923,
-0.11214917153120041,
0.3404369354248047,
0.14110207557678223,
0.3265034258365631,
-0.06017811968922615,
0.3352147340774536,
0.4506012201309204,
0.07792205363512039,
-0.033680979162454605,
0.0035964306443929672,
0.037715304642915726,
-0.20036618411540985,
-0.02681860513985157,
-0.38112878799438477,
-0.15827201306819916,
0.6519415974617004,
0.13428249955177307,
0.5013023614883423,
0.14435677230358124,
0.29022470116615295,
0.34797802567481995,
0.07692534476518631,
-0.13855700194835663,
-0.07591696083545685,
0.0885314866900444,
-0.10337633639574051,
-0.23062844574451447,
-0.11307007074356079,
0.27845922112464905,
-0.01536386739462614,
-0.13596318662166595,
-0.3685956597328186,
-0.013845247216522694,
0.14876025915145874,
0.2324436455965042,
-0.22225818037986755,
0.43051502108573914,
0.24302348494529724,
0.14858399331569672,
0.43377935886383057,
-0.4273240566253662,
-0.2783161997795105,
0.6021015048027039,
-0.3765738010406494,
0.17221835255622864,
0.16903214156627655,
0.12142831832170486,
0.38701730966567993,
-0.036771535873413086,
0.33334261178970337,
0.12251297384500504,
-0.4105496406555176,
0.49080604314804077,
0.0555935762822628,
0.1710897535085678,
-0.0868758112192154,
-0.34697964787483215,
0.30056214332580566,
0.06306754797697067,
0.20060008764266968,
-0.4306788146495819,
0.2392001897096634,
0.10036741942167282,
0.0658932626247406,
-0.14232449233531952,
0.024859804660081863,
-0.35997962951660156,
-0.20168599486351013,
-0.03652395308017731,
-0.006859134882688522,
0.0711001604795456,
-0.17219190299510956,
-0.07113902270793915,
0.14002108573913574,
-0.03144710138440132,
-0.08443450182676315,
0.11615178734064102,
0.05916914716362953,
-0.039417773485183716,
0.21949344873428345,
0.07273389399051666,
-0.43415889143943787,
-0.48941707611083984,
-0.06376513093709946,
0.15945294499397278,
0.3401239216327667,
-0.06754758954048157,
0.5447463989257812,
-0.13329988718032837,
0.07332339137792587,
-0.02695092000067234,
-0.17701227962970734,
-0.1372121423482895,
-0.06643544882535934,
0.01607145182788372,
0.21290355920791626,
0.3309600353240967,
0.1284499168395996,
0.1284991204738617,
0.32451069355010986,
0.22871118783950806,
0.21879135072231293,
0.34568652510643005,
-0.15800969302654266,
-0.0765540674328804,
-0.09364080429077148,
-0.06274691224098206,
0.3356578052043915,
0.2850082814693451,
-0.055452849715948105,
0.23357120156288147,
0.03059210814535618,
0.17132318019866943,
0.03421616926789284,
-0.13374264538288116,
-0.006174526177346706,
-0.2035660594701767,
-0.06202402338385582,
0.3429514169692993,
-0.23179464042186737,
-0.09050179272890091,
-0.2662658989429474,
0.6000077128410339,
-0.029784472659230232,
0.21032872796058655,
-0.08417262136936188,
-0.445223867893219,
0.2031603902578354,
0.28561827540397644,
-0.06893779337406158,
0.21927990019321442,
0.14887994527816772,
0.27623385190963745,
0.07412229478359222,
-0.14880318939685822,
-0.08641966432332993,
-0.0956885889172554,
-0.013327139429748058,
0.2804184854030609,
-0.14036540687084198,
0.19092290103435516,
0.12748990952968597,
-0.1593497395515442,
0.07713312655687332,
-0.2656029760837555,
0.25498485565185547,
-0.28261882066726685,
-0.17517724633216858,
-0.025586577132344246,
-0.24750138819217682,
-0.07604231685400009,
0.21556036174297333,
-0.09917215257883072,
-0.13499587774276733,
-0.34913215041160583,
0.37771543860435486,
0.13961151242256165,
-0.47774630784988403,
0.12089333683252335,
-0.0336998775601387,
0.24094487726688385,
-0.10700104385614395,
-0.0633431151509285,
0.11743974685668945,
-0.3203592896461487,
-0.03590627759695053,
0.08891479671001434,
0.1986142098903656,
-0.1069319024682045,
0.3679754137992859,
0.050662100315093994,
-0.19671742618083954,
-0.08743877708911896,
-0.20028717815876007,
0.07276847958564758,
0.0037398526910692453,
0.35699987411499023,
-0.0893753245472908,
0.04364169389009476,
-0.2737226188182831,
-0.01078339945524931,
0.11569537222385406,
-0.018125368282198906,
-0.2715141773223877,
-0.10695228725671768,
0.15553484857082367,
-0.10296660661697388,
-0.2868266999721527,
-0.01437761913985014,
0.0443890355527401,
-0.33951640129089355,
-0.07953857630491257,
-0.37609007954597473,
0.3516007363796234,
-0.0879710465669632,
-0.10122295469045639,
-0.39785483479499817,
-0.15071392059326172,
0.09420879185199738,
-0.08387986570596695,
-0.10033600777387619,
-0.02590220421552658,
-0.2735942304134369,
0.027112526819109917,
-0.13924500346183777,
0.042306214570999146,
0.0912148654460907,
0.5724222660064697,
0.1605776995420456,
-0.19284282624721527,
0.2663491368293762,
0.1337129771709442,
0.207157164812088,
0.10452155768871307,
0.23147541284561157,
0.16145583987236023,
-0.19712921977043152,
-0.03269912675023079,
-0.08957365155220032,
-0.030718067660927773,
0.238027885556221,
0.030320143327116966,
-0.10660421848297119,
0.2309030294418335,
-0.044100869446992874,
0.809952974319458,
-0.40000441670417786,
0.3598218560218811,
-0.1389261782169342,
-0.0515671968460083,
-0.002029190305620432,
0.11270610988140106,
-0.12718290090560913,
-0.051313769072294235,
0.033558350056409836,
-0.048667389899492264,
0.22349058091640472,
-0.05966712161898613,
0.04818250611424446,
0.03774329647421837,
0.07958438247442245,
-0.3224208950996399,
-0.34703123569488525,
0.10884147882461548,
0.16202329099178314,
0.4241134524345398,
0.10328883677721024,
-0.14689794182777405,
-0.1605381816625595,
0.34790048003196716,
0.12588123977184296,
0.03427254781126976,
-0.028372840955853462,
-0.23843775689601898,
-0.11752457916736603,
0.05310947448015213,
-0.18802480399608612,
0.11000817269086838,
0.06420031189918518,
-0.15485376119613647,
-0.01633240282535553,
-0.3217475712299347,
-0.008399446494877338,
0.021088065579533577,
0.4621269404888153,
-0.20892515778541565,
-0.10672436654567719,
0.019564703106880188,
-0.5763280391693115,
0.03171921521425247,
0.23699051141738892,
-0.037303049117326736,
-0.10263149440288544,
0.5784933567047119,
0.11255087703466415,
-0.20981210470199585,
-0.09030892699956894,
-0.3993047773838043,
-0.09767208248376846,
-0.2808993458747864,
-0.07462096214294434,
0.04621056094765663,
-0.12346696108579636,
-0.19037067890167236,
0.15218986570835114,
0.057365041226148605,
-0.13047100603580475,
0.11345621198415756,
-0.06039710342884064,
-0.09957452118396759,
-0.17699936032295227,
0.05203123018145561,
0.46210387349128723,
0.057410482317209244,
-0.02203870378434658,
0.040383800864219666,
0.05578413978219032,
0.16528938710689545,
-0.2559393644332886,
0.095298171043396,
-0.15986268222332,
0.27435678243637085,
0.14513427019119263,
0.049671005457639694,
0.2909265160560608,
0.5898076891899109,
0.19183582067489624,
0.17476682364940643,
0.20919963717460632,
0.07856912165880203,
0.3172011077404022,
0.26289406418800354,
-0.1370207965373993,
-0.05516425892710686,
0.2686593532562256,
0.216608926653862,
-0.1933007836341858,
0.09905648976564407,
-0.41351863741874695,
0.29379135370254517,
-0.4492120146751404,
-0.19798599183559418,
0.014200477860867977,
0.27436840534210205,
0.6137481331825256,
-0.2048763781785965,
0.07533968240022659,
-0.141486257314682,
-0.0013059714110568166,
-0.49310609698295593,
-0.3220101594924927,
0.2420388013124466,
-0.10828664898872375,
0.031027760356664658,
0.023470032960176468,
-0.03203621879220009,
0.08973817527294159,
0.15394195914268494,
0.0690217986702919,
-0.009513713419437408,
0.21029625833034515,
0.13974767923355103,
-0.13191506266593933,
-0.1104939877986908,
0.20589613914489746,
-0.4105100631713867,
-0.03880405053496361,
0.0450126938521862,
0.18865901231765747,
-0.4709801971912384,
-0.26682546734809875,
-0.2640031576156616,
0.05238757282495499,
-0.03561665862798691,
0.31427979469299316,
-0.4114638566970825,
-0.6738423109054565,
0.02132665179669857,
0.35703274607658386,
0.1240718811750412,
-0.19693531095981598,
-0.1962817907333374,
-0.2842211127281189,
0.2156277596950531,
0.12638205289840698,
0.13924621045589447,
0.5982515215873718,
0.3645815849304199,
-0.0890222117304802,
-0.2799200713634491,
0.19006994366645813,
-0.07061858475208282,
-0.04076988250017166,
0.2159065455198288,
-0.04014710336923599,
-0.35958361625671387,
-0.0652303695678711,
0.4096764326095581,
0.08508572727441788,
0.29022547602653503,
0.2059614062309265,
0.135066419839859,
-0.06698146462440491,
-0.047076232731342316,
0.10281673073768616,
0.0228766817599535,
0.09684444218873978,
0.49896448850631714,
-0.20046204328536987,
-0.1276654303073883,
-0.12329596281051636,
-0.17063218355178833,
-0.09713443368673325,
0.05135078355669975,
-0.010629226453602314,
-0.40056484937667847,
-0.09748505055904388,
-0.25706544518470764,
-0.07633110135793686,
-0.2673877775669098,
0.37344884872436523,
0.3596048653125763,
-0.12179720401763916,
-0.6918435096740723,
0.21985988318920135,
0.22744400799274445,
-0.010170530527830124,
0.1945130079984665,
-0.4340824484825134,
0.01244256179779768,
-0.39352139830589294,
0.1567596197128296,
-0.16361483931541443,
-0.01651637628674507,
-0.12775707244873047,
0.5608338713645935,
-0.1873491257429123,
0.27973389625549316,
-0.345615029335022,
-0.6173692345619202,
0.11053033173084259,
0.2414119988679886,
0.09901101142168045,
-0.007454118691384792,
0.011994924396276474,
0.04025203362107277,
0.05715765431523323,
0.28539344668388367,
-0.28749793767929077,
-0.2706542909145355,
0.07397424429655075,
0.1070452407002449,
-0.022962672635912895,
-0.14508353173732758,
0.08101550489664078,
-0.03612222895026207,
0.13809698820114136,
-0.19606098532676697,
0.1886076182126999,
-0.06117139011621475,
-0.03480948507785797,
-0.46890783309936523,
0.1327047199010849,
-0.32724425196647644,
0.22411826252937317,
0.2567785084247589,
0.23365721106529236,
-0.1914169192314148,
0.15115149319171906,
0.17713285982608795,
-0.16735614836215973,
-0.1044214516878128,
0.28004446625709534,
-0.056488409638404846,
0.21757058799266815,
-0.07835372537374496,
0.11410149931907654,
0.22376210987567902,
-0.3236871361732483,
0.3617140054702759,
0.13768088817596436,
0.15959642827510834,
-0.1673048883676529,
-0.31147637963294983,
0.1125309094786644,
0.1566513627767563,
-0.09018121659755707,
-0.09634020179510117,
0.08034401386976242,
-0.09165694564580917,
0.3425704836845398,
0.36988064646720886,
0.1661640852689743,
-0.05478864535689354,
0.08869784325361252,
0.20359386503696442,
-0.3454712927341461,
-0.5076162219047546,
-0.18168239295482635,
-0.09850464016199112,
0.04553616791963577,
0.11397037655115128,
0.4800501763820648,
-0.07629863172769547,
-0.09550899267196655,
-0.19087277352809906,
0.1802745759487152,
-0.06626135855913162,
-0.1782185286283493,
-0.21283988654613495,
-0.0013948500854894519,
-0.11663933098316193,
0.030902987346053123,
-0.22896723449230194,
-0.22053517401218414,
0.20900015532970428,
0.15863977372646332,
-0.38113266229629517,
0.35709309577941895,
-0.2606889009475708,
0.1020522341132164,
0.5551603436470032,
-0.05782978609204292,
-0.35288649797439575,
0.13562987744808197,
-0.10156574100255966,
0.21703940629959106,
-0.04739498347043991,
0.24072562158107758,
0.20668171346187592,
0.49748173356056213,
0.04390367493033409,
0.1995241940021515,
-0.21951362490653992,
-0.48884445428848267,
-0.01836344227194786,
0.18050792813301086,
-0.37792712450027466,
-0.29033756256103516,
-0.14814001321792603,
-0.0642337054014206,
0.2718213200569153,
-0.0866958349943161,
0.059265073388814926,
0.10657953470945358,
-0.2491791993379593,
-0.23073530197143555,
-0.05999224632978439,
0.07509653270244598,
-0.4892391264438629,
-0.07582300901412964,
0.08433972299098969,
-0.0016945713432505727,
0.28298017382621765,
0.09281027317047119,
-0.19513888657093048,
-0.24536938965320587,
0.13293853402137756,
0.029445260763168335,
0.1109079048037529,
0.21506372094154358,
0.31843286752700806,
0.019106708467006683,
0.23028670251369476,
0.20556187629699707,
-0.16206848621368408,
-0.2779117226600647,
0.3415006399154663,
-0.42627018690109253,
0.20778857171535492,
-0.15474490821361542,
0.08967471122741699,
0.11158737540245056,
0.3617263436317444,
-0.11542783677577972,
-0.0069126165471971035,
-0.34858042001724243,
0.029927721247076988,
-0.5454416871070862,
0.0021812880877405405,
-0.10409501194953918,
-0.21379882097244263,
-0.0030220933258533478,
0.2958897650241852,
0.20583157241344452,
0.28652384877204895,
0.2134951651096344,
-0.7866144776344299,
-0.030031384900212288,
0.0987219288945198,
-0.17052806913852692,
0.11811494082212448,
-0.26435908675193787,
0.049939852207899094,
0.2710101306438446,
-0.1275968849658966,
0.2815198600292206,
0.18221448361873627,
0.18245643377304077,
0.2164503037929535,
-0.005288966000080109,
0.3470104932785034,
0.5325679183006287,
-0.288589209318161,
-0.002026337431743741,
0.13483545184135437,
-0.2335212379693985,
0.2782858610153198,
-0.009049005806446075,
0.022501498460769653,
-0.2139330804347992,
-0.3548392951488495,
0.21658703684806824,
0.00282656098715961,
-0.21153874695301056,
-0.004279525950551033,
-0.13934345543384552,
-0.06541794538497925,
0.1901242434978485,
0.014439250342547894,
0.2042541801929474,
0.05741008371114731,
0.3246319890022278,
0.12806089222431183,
-0.1360461711883545,
0.44988274574279785,
0.23152172565460205,
0.3352545499801636,
-0.028214266523718834,
-0.3566960096359253,
0.23311257362365723,
-0.2943468391895294,
-0.32233837246894836,
-0.24890518188476562,
0.15774691104888916,
-0.2089887410402298,
0.17203298211097717,
-0.13112951815128326,
-0.3585330843925476,
0.10796986520290375,
-0.19292977452278137,
-0.12514178454875946,
0.2348155379295349,
-0.05800569802522659,
-0.27273082733154297,
-0.0838082879781723,
-0.23858040571212769,
0.10218077898025513,
-0.07901313900947571,
-0.4013023376464844,
0.15587404370307922
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
NB: even if the error is raised, the dataset is successfully cached. So restarting the script after every `map()` allows to ultimately run the whole preprocessing. But this prevents to realistically run the code over multiple nodes.
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 37 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
Hi,
It's not easy to debug the problem without the script. I may be wrong since I'm not very familiar with PyTorch Lightning, but shouldn't you preprocess the data in the `prepare_data` function of `LightningDataModule` and not in the `setup` function.
As you can't modify the module state in `prepare_data` (according to the docs), use the `cache_file_name` argument in `Dataset.map` there, and reload the processed data in `setup` with `Dataset.from_file(cache_file_name)`. If `num_proc>1`, check the docs on the `suffix_template` argument of `Dataset.map` to get an idea what the final `cache_file_names` are going to be.
Let me know if this helps.
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 99 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
Hi @mariosasko, thank you for the hint, that helped me to move forward with that issue.
I did a major refactoring of my project to disentangle my `LightningDataModule` and `Dataset`. Just FYI, it looks like:
```python
class Builder():
def __call__() -> DatasetDict:
# load and preprocess the data
return dataset
class DataModule(LightningDataModule):
def prepare_data():
self.builder()
def setup():
self.dataset = self.builder()
```
Unfortunately, the entanglement between `LightningDataModule` and `Dataset` was not the issue.
The culprit was `hydra` and a slight adjustment of the structure of my project solved this issue. The problematic project structure was:
```
src/
| - cli.py
| - training/
| -experiment.py
# code in experiment.py
def run_experiment(config):
# preprocess data and run
# code in cli.py
@hydra.main(...)
def run(config):
return run_experiment(config)
```
Moving `run()` from `clip.py` to `training.experiment.py` solved the issue with `SystemError 15`. No idea why.
Even if the traceback was referring to `Dataset.__del__`, the problem does not seem to be primarily related to `datasets`, so I will close this issue. Thank you for your help!
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 170 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
Please allow me to revive this discussion, as I have an extremely similar issue. Instead of an error, my datasets functions simply aren't caching properly. My setup is almost the same as yours, with hydra to configure my experiment parameters.
@vlievin Could you confirm if your code correctly loads the cache? If so, do you have any public code that I can reference for comparison?
I will post a full example with hydra that illustrates this problem in a little bit, probably on another thread.
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 85 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
Hello @mariomeissner, very sorry for the late reply, I hope you have found a solution to your problem!
I don't have public code at the moment. I have not experienced any other issue with hydra, even if I don't understand why changing the location of the definition of `run()` fixed the problem.
Overall, I don't have issue with caching anymore, even when
1. using custom fingerprints using the argument `new_fingerprint
2. when using `num_proc>1`
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 74 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
I solved my issue by turning the map callable into a class static method, like they do in `lightning-transformers`. Very strange...
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 21 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
I have this issue with datasets v2.5.2 with Python 3.8.10 on Ubuntu 20.04.4 LTS. It does not occur when num_proc=1. When num_proc>1, it intermittently occurs and will cause process to hang. As previously mentioned, it occurs even when datasets have been previously cached. I have tried wrapping logic in a static class as suggested with @mariomeissner with no improvement.
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 59 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
Can someone provide a reproducer to help us debug this (e.g., a `hydra` repo with dummy model and data)?
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 19 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3172
|
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
Hi, similarly here, is there any update for this issue? Particularly having the exact same message as in #6393, not sure this is a datasets or llm-foundry issue
|
## Describe the bug
I use `datasets.map` to preprocess some data in my application. The error `SystemError 15` is thrown at the end of the execution of `Dataset.map()` (only with `num_proc>1`. Traceback included bellow.
The exception is raised only when the code runs within a specific context. Despite ~10h spent investigating this issue, I have failed to isolate the bug, so let me describe my setup.
In my project, `Dataset` is wrapped into a `LightningDataModule` and the data is preprocessed when calling `LightningDataModule.setup()`. Calling `.setup()` in an isolated script works fine (even when wrapped with `hydra.main()`). However, when calling `.setup()` within the experiment script (depends on `pytorch_lightning`), the script crashes and `SystemError 15`.
I could avoid throwing this error by modifying ` Dataset.__del__()` (see bellow), but I believe this only moves the problem somewhere else. I am completely stuck with this issue, any hint would be welcome.
```python
class Dataset()
...
def __del__(self):
if hasattr(self, "_data"):
_ = self._data # <- ugly trick that allows avoiding the issue.
del self._data
if hasattr(self, "_indices"):
del self._indices
```
## Steps to reproduce the bug
```python
# Unfortunately I couldn't isolate the bug.
```
## Expected results
Calling `Dataset.map()` without throwing an exception. Or at least raising a more detailed exception/traceback.
## Actual results
```
Exception ignored in: <function Dataset.__del__ at 0x7f7cec179160>███████████████████████████████████████████████████| 5/5 [00:05<00:00, 1.17ba/s]
Traceback (most recent call last):
File ".../python3.8/site-packages/datasets/arrow_dataset.py", line 906, in __del__
del self._data
File ".../python3.8/site-packages/ray/worker.py", line 1033, in sigterm_handler
sys.exit(signum)
SystemExit: 15
```
## Environment info
Tested on 2 environments:
**Environment 1.**
- `datasets` version: 1.14.0
- Platform: macOS-10.16-x86_64-i386-64bit
- Python version: 3.8.8
- PyArrow version: 6.0.0
**Environment 2.**
- `datasets` version: 1.14.0
- Platform: Linux-4.18.0-305.19.1.el8_4.x86_64-x86_64-with-glibc2.28
- Python version: 3.9.7
- PyArrow version: 6.0.0
| 28 |
`SystemError 15` thrown in `Dataset.__del__` when using `Dataset.map()` with `num_proc>1`
|
[
-0.38344618678092957,
-0.013758675195276737,
-0.09100797027349472,
0.2939610481262207,
0.2264622449874878,
0.1579577624797821,
0.3159651756286621,
0.2774231731891632,
0.28045451641082764,
0.3575822412967682,
0.0500885546207428,
0.43410664796829224,
-0.27395913004875183,
0.18375451862812042,
-0.3460533916950226,
0.10022830963134766,
0.16471920907497406,
-0.012016803957521915,
-0.25819021463394165,
0.18934033811092377,
-0.3970772922039032,
0.2898721396923065,
-0.10210012644529343,
0.11049211770296097,
-0.0066777621395885944,
-0.13777948915958405,
-0.009498326107859612,
0.2941229045391083,
-0.12977948784828186,
-0.37372130155563354,
0.041093919426202774,
-0.13504540920257568,
0.1312965452671051,
0.3496159613132477,
-0.00010401043982710689,
0.05668409913778305,
0.06462445110082626,
0.057518620043992996,
-0.3000217378139496,
0.12619811296463013,
-0.39473769068717957,
0.1258840411901474,
-0.06527068465948105,
-0.0648309737443924,
0.15482197701931,
-0.03262323513627052,
0.19832326471805573,
-0.17110393941402435,
0.192964568734169,
0.48420605063438416,
0.2873801589012146,
0.25489819049835205,
0.17844264209270477,
-0.2298877090215683,
0.22424282133579254,
0.03928140550851822,
-0.03977252170443535,
0.32093390822410583,
0.08177307993173599,
-0.2333928793668747,
-0.0637403354048729,
0.08318763971328735,
0.04512602835893631,
0.1630067378282547,
0.2450980246067047,
0.00575605733320117,
0.3628219664096832,
-0.4200548827648163,
0.12093029171228409,
0.02206769585609436,
-0.06238710135221481,
-0.20442740619182587,
-0.017178328707814217,
0.08870039880275726,
-0.23939530551433563,
-0.26317331194877625,
-0.07501203566789627,
-0.028233937919139862,
-0.04528054594993591,
0.1792808622121811,
-0.012928290292620659,
-0.1589718461036682,
-0.05399863049387932,
0.17625415325164795,
-0.10357613861560822,
0.27062153816223145,
-0.04520601034164429,
0.26449689269065857,
0.09065113961696625,
-0.28207001090049744,
-0.4222586452960968,
0.20288795232772827,
0.08756809681653976,
0.10792818665504456,
-0.15136779844760895,
-0.15165884792804718,
0.2751968204975128,
-0.11515307426452637,
0.3071136772632599,
-0.4050311744213104,
0.15565961599349976,
0.13064593076705933,
0.13121381402015686,
0.3798784017562866,
0.49538934230804443,
-0.27703598141670227,
0.15175803005695343,
0.4020575284957886,
0.15053744614124298,
0.12006678432226181,
-0.01493596751242876,
0.025678234174847603,
0.21254493296146393,
-0.016692688688635826,
0.16138722002506256,
0.2045264095067978,
0.138082355260849,
-0.11619614064693451,
-0.16451317071914673,
0.31761011481285095,
0.12797679007053375,
0.22896140813827515,
0.10759952664375305,
0.29813843965530396,
0.35923200845718384,
0.0071262177079916,
-0.09744694828987122,
-0.016177061945199966,
-0.43505606055259705,
-0.060733336955308914,
-0.21859824657440186,
0.12127730250358582,
-0.1728515625,
-0.22738714516162872,
0.18068034946918488,
0.11226122826337814,
0.06341122835874557,
-0.09674681723117828,
-0.19240987300872803,
0.10914907604455948,
0.23457473516464233,
-0.29667091369628906,
0.15894290804862976,
0.37026533484458923,
-0.16520169377326965,
0.10660966485738754,
0.1503038853406906,
-0.013582073152065277,
-0.10521522164344788,
0.31807026267051697,
-0.07632610201835632,
-0.13758879899978638,
-0.15746262669563293,
0.30772897601127625,
0.23556412756443024,
0.2766842246055603,
-0.04419725015759468,
0.03140762075781822,
0.41746991872787476,
-0.419182151556015,
-0.22857411205768585,
-0.360360711812973,
-0.3429758846759796,
-0.2332834154367447,
-0.3109612762928009,
0.11913711577653885,
-0.3199733793735504,
0.10971011221408844,
-0.06339962780475616,
-0.34956321120262146,
0.11201660335063934,
0.17321069538593292,
-0.04205659031867981,
-0.11402971297502518,
-0.20172183215618134,
0.240462526679039,
0.26414239406585693,
0.0221164058893919,
-0.39275506138801575,
0.25547224283218384,
-0.27080807089805603,
-0.5047704577445984,
-0.38307660818099976,
0.13884438574314117,
0.10560600459575653,
-0.15182490646839142,
0.16897372901439667,
0.0021944292820990086,
-0.17251165211200714,
0.14489126205444336,
-0.2867870628833771,
-0.1486399918794632,
0.06930016726255417,
0.2277049422264099,
0.28530290722846985,
0.08188538998365402,
0.39831721782684326,
0.026956813409924507,
0.06403645873069763,
-0.022888336330652237,
0.17037051916122437,
0.32079464197158813,
0.07840413600206375,
-0.3505466878414154,
-0.07903634011745453,
-0.5312979221343994,
-0.16275833547115326,
0.05757744982838631,
-0.35724958777427673,
0.05375774949789047,
-0.15805503726005554,
0.01154196448624134,
-0.12092290818691254,
0.17320798337459564,
0.009674310684204102,
-0.0053171878680586815,
0.2508819103240967,
-0.03855365887284279,
-0.27920207381248474,
-0.17925767600536346,
-0.021354207769036293,
0.03641828894615173,
-0.16795732080936432,
0.03911853954195976,
-0.6511380076408386,
-0.10502959042787552,
-0.3416968286037445,
-0.3210611045360565,
-0.019672324880957603,
-0.1184513047337532,
-0.011393385007977486,
-0.023733844980597496,
-0.11115561425685883,
0.4061352610588074,
0.14289584755897522,
-0.4660498797893524,
-0.11696042120456696,
0.01976843737065792,
0.0894693061709404,
-0.11592092365026474,
-0.015069123357534409,
0.08696649968624115,
0.13514165580272675,
0.09977636486291885,
-0.2670644223690033,
0.08162102848291397,
-0.2556741237640381,
-0.041593752801418304,
0.20269669592380524,
0.12326018512248993,
0.19885726273059845,
0.2736792266368866,
0.024035681039094925,
-0.5517517924308777,
-0.07686816155910492,
0.21675823628902435,
-0.23680470883846283,
0.0786852091550827,
0.08716017007827759,
0.048981960862874985,
0.38550302386283875,
0.029190748929977417,
0.11667396128177643,
-0.05367744714021683,
0.059806838631629944,
-0.07723478227853775,
0.16256704926490784,
0.08596213161945343,
0.617161750793457,
0.18951524794101715,
0.0751514881849289,
0.07094515115022659,
-0.16818556189537048,
0.0040421802550554276,
0.12434255331754684,
0.05955909192562103,
0.2784154713153839,
0.1357651650905609,
0.28060150146484375,
-0.06881918013095856,
-0.3434910774230957,
-0.3653552532196045,
0.06202496215701103,
0.4278441071510315,
-0.22300106287002563,
-0.07165759801864624,
-0.13446447253227234,
-0.02336445264518261,
0.11576893925666809,
0.02849341183900833,
-0.1314091980457306,
-0.5487471222877502,
0.06222580745816231,
0.11759732663631439,
-0.3334663212299347,
0.09283516556024551,
0.04127209261059761,
-0.15762612223625183,
0.17120930552482605,
0.3268085718154907,
0.20277348160743713,
-0.24965867400169373,
0.0009276060154661536,
0.110899917781353,
0.12495031952857971,
0.1333613097667694,
0.29480060935020447,
0.017976602539420128,
-0.18303216993808746,
-0.21322043240070343,
-0.22201916575431824,
0.07455292344093323,
-0.020001081749796867,
0.504223644733429,
0.3697013854980469,
0.26781392097473145,
-0.2797532379627228,
-0.12772569060325623,
0.24595077335834503,
-0.4262656271457672,
-0.18145601451396942,
0.19835165143013,
0.06354296952486038,
-0.06915206462144852,
-0.4288251996040344,
-0.25934576988220215,
-0.27439430356025696,
-0.31633374094963074,
-0.11623024195432663,
0.22996118664741516,
0.26145070791244507,
0.1763526052236557,
0.20207875967025757,
0.1606781929731369,
0.241676926612854,
0.022305894643068314,
-0.35291290283203125,
-0.09163698554039001,
-0.026502076536417007,
-0.25402507185935974,
-0.24177485704421997,
0.05789788067340851,
-0.022938203066587448,
0.07906575500965118,
0.14773079752922058,
-0.2191641479730606,
-0.17649154365062714,
-0.13973544538021088,
0.26130253076553345,
0.039907634258270264,
-0.043956123292446136,
0.5052835941314697,
0.3317907750606537,
-0.15406396985054016,
-0.09014280885457993,
-0.21862655878067017,
0.21139077842235565,
0.04661265388131142,
0.00516142463311553,
-0.08288417011499405,
0.524357795715332,
0.059227459132671356,
0.5261726975440979,
0.142965629696846,
-0.16194938123226166,
0.20515789091587067,
-0.18445058166980743,
0.14262263476848602,
-0.2167881727218628,
-0.2598069906234741,
0.14373236894607544,
-0.006697684992104769,
-0.02572374790906906,
0.14482398331165314,
-0.22881542146205902,
-0.4979376494884491,
0.07464595139026642,
0.02331751398742199,
-0.20828990638256073,
-0.14193536341190338,
-0.0007612594636157155,
0.04786191135644913,
0.14050744473934174,
0.19682617485523224,
-0.15117086470127106,
-0.3569181263446808,
0.03799804672598839,
-0.18348105251789093,
-0.08666210621595383,
-0.04247453063726425,
-0.04096271097660065,
-0.25213924050331116,
-0.15107165277004242,
-0.49503713846206665,
0.22598044574260712,
0.006754714995622635,
0.5051129460334778,
-0.1926196813583374,
-0.20657949149608612,
-0.30801090598106384,
-0.2387748807668686,
0.5670338273048401,
-0.40189462900161743,
0.2723742425441742,
0.04613276943564415,
0.1412545144557953,
-0.31319162249565125,
0.02426101081073284,
-0.32158541679382324,
0.14492295682430267,
-0.08208880573511124,
0.38777661323547363,
-0.1992277055978775,
-0.10325031727552414,
0.521245002746582,
-0.03895273804664612,
-0.0587216354906559,
0.10606229305267334,
-0.4134817123413086,
-0.2835436761379242,
-0.43928688764572144,
-0.07472096383571625,
0.170895516872406,
-0.011479320004582405,
0.10261762887239456,
-0.14542879164218903,
-0.01660083420574665,
-0.1337132453918457,
0.18545860052108765,
0.11332836002111435,
-0.00592625280842185,
0.07137203216552734,
0.042518071830272675,
-0.1431279182434082,
0.26585179567337036,
0.33056336641311646,
0.1464785933494568,
-0.11466614156961441,
-0.11480922996997833,
0.45834624767303467,
-0.13764816522598267,
0.2277945876121521,
0.0659308135509491,
0.02500888891518116,
-0.2143612504005432,
-0.024864360690116882,
0.39681562781333923,
-0.010954451747238636,
0.23183448612689972,
0.04882680997252464,
-0.0763474628329277,
-0.17475487291812897,
0.018986154347658157,
0.0455852746963501,
0.31107988953590393,
-0.0649312436580658,
0.1140696331858635,
-0.29988664388656616,
-0.21670085191726685,
0.4517270624637604,
0.20920293033123016,
0.6006402969360352,
-0.3122548758983612,
-0.008121938444674015,
-0.0382777601480484,
-0.0032858061604201794,
0.16888688504695892,
0.17156216502189636,
0.24520361423492432,
-0.32775795459747314,
-0.43660882115364075,
-0.06988952308893204,
-0.11048749834299088,
0.0907285213470459,
0.1682998389005661,
-0.11253844201564789,
0.2794732451438904,
0.0824187770485878,
0.3950275480747223,
-0.10763605684041977,
0.1720966249704361,
0.07193278521299362,
-0.12020538002252579,
-0.1883092224597931,
0.2653946876525879,
0.013603702187538147,
-0.40478822588920593,
-0.23747755587100983,
0.01841086894273758,
0.15625613927841187,
-0.24453096091747284,
0.07596348226070404,
-0.11470942199230194,
-0.09740602225065231,
0.5609576106071472,
0.007809844799339771,
0.23534883558750153,
-0.302716463804245,
0.3253151774406433,
-0.03754656761884689,
0.2128867208957672,
-0.04570543020963669,
-0.22778739035129547,
-0.054248422384262085,
0.15823113918304443,
0.07278085500001907,
0.21063938736915588,
0.2988247871398926,
-0.0403742678463459,
-0.11380741745233536,
-0.10137279331684113,
-0.024047955870628357,
-0.02838749811053276,
-0.115122489631176,
0.20141147077083588,
0.04465189948678017,
-0.29749447107315063,
-0.006264599971473217,
-0.17020559310913086,
-0.5066787004470825,
-0.18979166448116302,
0.1778080314397812,
0.0907471776008606,
-0.21587595343589783,
0.21401448547840118,
0.1098097488284111,
-0.25800710916519165,
-0.1822310835123062,
0.42525985836982727,
-0.1309264898300171,
0.2969803214073181,
0.19672924280166626,
-0.018471188843250275,
-0.16280901432037354,
-0.3317907452583313,
0.1781761646270752,
0.05417774245142937,
-0.20650283992290497,
0.16656334698200226,
-0.030586255714297295,
-0.3048296272754669,
0.2549711763858795,
0.09044486284255981,
-0.007426046766340733,
0.07193256169557571,
0.12200872600078583,
-0.41620883345603943,
-0.65499347448349,
0.09790641814470291,
-0.1839713305234909,
0.22162684798240662,
-0.02701619639992714,
-0.11192842572927475,
-0.20355625450611115,
-0.11194311082363129,
-0.4121759533882141,
0.17342405021190643,
-0.30675315856933594,
0.3283088207244873,
-0.03450321406126022,
-0.09095046669244766,
-0.38651373982429504,
-0.1535634696483612,
0.2352946251630783,
0.2980462610721588,
-0.3603837490081787,
-0.3017326593399048,
0.181486114859581,
0.08080118894577026,
-0.0525815486907959,
-0.18218344449996948,
-0.04247882589697838,
0.01071076188236475,
-0.24068598449230194,
-0.10339018702507019,
0.3023565709590912,
0.16024334728717804,
-0.15049366652965546,
0.2926931381225586,
0.28871726989746094,
0.06711237132549286,
0.3788425028324127,
0.3016379475593567,
0.06106553226709366,
0.03279954567551613,
-0.20721933245658875,
0.13977305591106415,
-0.05314834788441658,
-0.11233935505151749,
0.26136910915374756,
0.17835570871829987,
0.021594256162643433,
0.08143549412488937,
0.3276509642601013,
-0.3779500722885132,
-0.0005405534757301211,
0.2289789468050003,
0.3522753417491913,
0.0900140255689621,
-0.25894686579704285,
0.04417163133621216,
-0.17456841468811035,
0.2859283983707428,
-0.2639157176017761,
-0.0703883171081543,
0.6653996706008911,
-0.011730605736374855,
0.18228459358215332,
0.3412625193595886,
0.02889915741980076,
-0.17169786989688873,
0.18798828125,
0.20755702257156372,
0.2714923918247223,
-0.279365211725235,
-0.10147161781787872,
0.4657142162322998,
-0.24977833032608032,
0.0748995840549469,
0.2658371925354004,
0.2316916435956955,
0.2003980576992035,
0.7069954872131348,
-0.0336541011929512,
0.42051616311073303,
0.057659752666950226,
0.1279035210609436,
-0.027867881581187248,
-0.39316028356552124,
0.3362313508987427,
0.5862125158309937,
-0.1693735271692276,
0.27403464913368225,
0.24909242987632751,
-0.05612989887595177,
-0.351408988237381,
-0.07353480160236359,
-0.08601249754428864,
-0.052204642444849014,
-0.46207526326179504,
-0.14184574782848358,
-0.1137523278594017,
-0.1246173232793808,
-0.10878930985927582,
-0.037111204117536545,
-0.09646051377058029,
-0.12596718966960907,
0.35434314608573914,
0.027558524161577225,
-0.15215805172920227,
-0.2381279617547989,
0.15915122628211975,
0.15828783810138702,
-0.08521613478660583,
-0.26917585730552673,
0.13289907574653625,
-0.03922922536730766,
0.24060793220996857,
0.09424138069152832,
0.02175203524529934,
0.32695475220680237,
0.19698435068130493,
-0.34047994017601013,
0.35032540559768677,
0.061138816177845,
-0.14877676963806152,
-0.1472574770450592,
0.06012195721268654,
0.04693957045674324,
0.4516201317310333,
0.2900457978248596,
0.1602587103843689,
-0.17445842921733856,
-0.0028479069005697966,
0.3093479871749878,
0.25907468795776367,
-0.025139667093753815,
-0.02554497681558132,
-0.1310431957244873,
-0.3614242672920227,
0.19828946888446808,
-0.08812765032052994,
-0.34529465436935425,
-0.12462671101093292,
0.3129945397377014,
-0.26426300406455994,
0.5616821050643921,
0.0076973531395196915,
0.16274255514144897,
-0.11748165637254715,
0.3794240355491638,
0.1379084587097168,
-0.18217281997203827,
-0.24231839179992676,
-0.028971871361136436,
-0.508406937122345,
0.10024754703044891,
0.04830101877450943,
-0.004236748442053795,
0.0778486579656601,
0.010872816666960716,
0.18599817156791687,
0.16121222078800201,
0.041680414229631424,
-0.01198236271739006,
-0.092891626060009,
0.2681884169578552,
-0.251748263835907,
-0.12441734969615936,
-0.14825250208377838,
-0.06712016463279724,
0.25441738963127136,
-0.4357006549835205,
0.22378657758235931,
-0.1789161115884781,
0.21539263427257538,
-0.14896057546138763,
-0.1727747917175293,
-0.06646524369716644,
0.15185481309890747,
0.07941744476556778,
0.4190067648887634,
0.28213363885879517,
-0.2239425778388977,
-0.04133959859609604,
-0.01210169866681099,
-0.0701923817396164,
-0.003125868272036314,
0.19154617190361023,
0.12720978260040283,
0.4114474058151245,
-0.06356911361217499,
0.021234221756458282,
-0.05120003595948219,
-0.21883749961853027,
-0.02613971382379532,
0.29781994223594666,
-0.3641006350517273,
0.3366713523864746,
0.00234225089661777,
0.047689441591501236,
-0.1920902580022812,
0.1417570561170578,
0.1198660284280777,
0.0655626654624939,
0.019563419744372368,
-0.3074161112308502,
0.3075403571128845,
0.09464670717716217,
-0.4246552288532257,
-0.2778676152229309,
0.031224515289068222,
-0.39255189895629883,
-0.2940814793109894,
-0.36572083830833435,
0.019672909751534462,
0.1731104701757431,
-0.044491495937108994,
-0.6814073324203491,
-0.003564724000170827,
-0.18316861987113953,
-0.042422063648700714,
-0.005567284766584635,
0.4424090087413788,
0.1553971916437149,
0.01924976333975792,
0.20909573137760162,
-0.15532930195331573
] |
https://github.com/huggingface/datasets/issues/3171
|
Raise exceptions instead of using assertions for control flow
|
Adding the remaining tasks for this issue to help new code contributors.
$ cd src/datasets && ack assert -lc
- [x] commands/convert.py:1
- [x] arrow_reader.py:3
- [x] load.py:7
- [x] utils/py_utils.py:2
- [x] features/features.py:9
- [x] arrow_writer.py:7
- [x] search.py:6
- [x] table.py:1
- [x] metric.py:3
- [x] tasks/image_classification.py:1
- [x] arrow_dataset.py:17
- [x] fingerprint.py:6
- [x] io/json.py:1
- [x] io/csv.py:1
|
Motivated by https://github.com/huggingface/transformers/issues/12789 in Transformers, one welcoming change would be replacing assertions with proper exceptions. The only type of assertions we should keep are those used as sanity checks.
Currently, there is a total of 87 files with the `assert` statements (located under `datasets` and `src/datasets`), so when working on this, to manage the PR size, only modify 4-5 files at most before submitting a PR.
| 61 |
Raise exceptions instead of using assertions for control flow
|
[
-0.0008899649255909026,
-0.11045878380537033,
-0.1039699912071228,
-0.08039186149835587,
-0.15737374126911163,
-0.4011605679988861,
0.12250569462776184,
-0.02667135000228882,
-0.17331381142139435,
0.35812079906463623,
0.4592781960964203,
0.03063972480595112,
-0.28336670994758606,
-0.039621543139219284,
-0.3563654124736786,
0.044997379183769226,
-0.3259962797164917,
0.08976936340332031,
0.529388964176178,
0.07099278271198273,
0.14190420508384705,
-0.3200015425682068,
-0.13871917128562927,
0.2173440158367157,
0.04648948088288307,
-0.2307775467634201,
0.19722795486450195,
0.1681385338306427,
0.17810901999473572,
-0.35288283228874207,
0.06286749988794327,
0.11755877733230591,
0.16926999390125275,
-0.09381705522537231,
-0.00010416842997074127,
0.12667952477931976,
0.2888687252998352,
0.0350482277572155,
-0.1762079894542694,
0.5473501086235046,
-0.2320917695760727,
-0.09450118243694305,
-0.375092089176178,
-0.16594715416431427,
0.18333114683628082,
-0.16692015528678894,
-0.10248693823814392,
-0.031309206038713455,
0.19192330539226532,
0.3934237062931061,
0.22424834966659546,
0.18057584762573242,
0.05443930998444557,
0.14941300451755524,
0.22953012585639954,
-0.15784721076488495,
0.1535854935646057,
0.1425345540046692,
0.6927914619445801,
-0.31329965591430664,
-0.14869683980941772,
0.041691821068525314,
-0.18847723305225372,
-0.1409541368484497,
-0.443419873714447,
-0.3488529324531555,
0.14237616956233978,
0.2524372339248657,
0.010673447512090206,
0.32301774621009827,
-0.33942291140556335,
0.062387946993112564,
-0.32830575108528137,
-0.41871148347854614,
0.15533877909183502,
-0.044777754694223404,
0.03499874472618103,
-0.08348383754491806,
-0.24984866380691528,
0.4362707734107971,
-0.027176519855856895,
-0.2370796650648117,
-0.30121734738349915,
0.032170433551073074,
-0.08045028150081635,
-0.10908377170562744,
0.023720398545265198,
0.05083779618144035,
-0.026482228189706802,
-0.0716652125120163,
0.05154693126678467,
-0.13135270774364471,
-0.2517172694206238,
-0.1660616248846054,
0.07666245102882385,
-0.26558056473731995,
0.23241503536701202,
0.03373121842741966,
0.17023108899593353,
-0.09233604371547699,
0.060637399554252625,
0.3283648192882538,
0.04285106062889099,
0.035684600472450256,
-0.12559504806995392,
0.08055279403924942,
0.13158512115478516,
0.08055722713470459,
0.3809828460216522,
0.3895416855812073,
-0.03833382576704025,
0.09304075688123703,
0.18149664998054504,
0.008056148886680603,
-0.18210355937480927,
0.4871409833431244,
0.05712505057454109,
-0.02072593756020069,
-0.17920731008052826,
0.21390342712402344,
-0.8175933957099915,
-0.07580668479204178,
0.44487255811691284,
0.013143276795744896,
0.22466374933719635,
0.2420395016670227,
0.08674469590187073,
0.19819597899913788,
-0.02080680802464485,
-0.3574385643005371,
-0.19819417595863342,
0.1517878919839859,
-0.007162103895097971,
-0.008568204939365387,
0.0558013990521431,
0.10920620709657669,
-0.08475825935602188,
-0.04250425472855568,
-0.10339568555355072,
-0.207494854927063,
0.34214016795158386,
-0.01435007806867361,
0.21848005056381226,
-0.1182079166173935,
-0.2951570451259613,
-0.27930253744125366,
-0.0017615763936191797,
-0.13364291191101074,
0.13992761075496674,
0.09903935343027115,
0.04983370006084442,
-0.3681683838367462,
0.5046535730361938,
0.219923198223114,
-0.0572529062628746,
0.20632073283195496,
0.19502419233322144,
0.2499171495437622,
-0.13155260682106018,
-0.29145655035972595,
0.2571429908275604,
0.04403570294380188,
0.44685909152030945,
0.020666074007749557,
-0.005004238337278366,
0.22703054547309875,
-0.06374268978834152,
0.10013893991708755,
-0.2556421160697937,
-0.025791503489017487,
0.03766960650682449,
-0.2027355432510376,
-0.21194146573543549,
0.5679773688316345,
-0.3205562233924866,
-0.0410173237323761,
0.07733574509620667,
-0.2835201919078827,
0.026530051603913307,
-0.20691268146038055,
-0.1270902305841446,
0.3251008093357086,
0.22737613320350647,
-0.26257213950157166,
-0.14460597932338715,
-0.04051881656050682,
0.011509908363223076,
-0.21662278473377228,
-0.2278256118297577,
0.10137955844402313,
0.027168700471520424,
0.06370352953672409,
-0.3666381239891052,
-0.16649176180362701,
0.106000617146492,
0.18663451075553894,
0.4040111005306244,
-0.21740567684173584,
0.14020603895187378,
-0.321205198764801,
-0.2089829295873642,
-0.3102972209453583,
0.14324645698070526,
-0.375178724527359,
-0.36495959758758545,
0.014989744871854782,
0.08497559279203415,
0.32034334540367126,
0.08633804321289062,
-0.00538625055924058,
0.5466997027397156,
-0.04633104428648949,
-0.11969184875488281,
0.10735651850700378,
0.4327286183834076,
-0.055243782699108124,
0.30129656195640564,
0.2914576232433319,
-0.33838018774986267,
-0.13167744874954224,
-0.08610976487398148,
0.06836353987455368,
-0.7037951946258545,
-0.018124759197235107,
0.36451685428619385,
-0.17610369622707367,
0.1772640496492386,
-0.16444943845272064,
-0.2691333293914795,
-0.08788295835256577,
-0.21776948869228363,
0.09378590434789658,
-0.1693858504295349,
0.1360083818435669,
0.039619363844394684,
0.19514594972133636,
0.10145638883113861,
0.013934167101979256,
-0.27588239312171936,
-0.06635095179080963,
-0.20056003332138062,
-0.32493889331817627,
-0.043376315385103226,
0.13935048878192902,
0.0618194118142128,
0.357778936624527,
0.40547147393226624,
0.20279712975025177,
0.21933187544345856,
0.14253635704517365,
-0.055732086300849915,
-0.03163677081465721,
-0.12401919811964035,
0.029049107804894447,
-0.051304131746292114,
-0.019701136276125908,
0.20822186768054962,
-0.26779836416244507,
-0.1747197061777115,
-0.11429601162672043,
-0.04466916248202324,
0.07152922451496124,
0.25126388669013977,
0.07299131900072098,
0.23754483461380005,
0.2571874260902405,
0.5153183341026306,
0.2794862985610962,
0.3481568694114685,
0.4741288125514984,
0.08760641515254974,
-0.08866359293460846,
0.08980704843997955,
-0.18240967392921448,
0.19784508645534515,
0.3201437294483185,
-0.3631701171398163,
0.06626832485198975,
0.11219032853841782,
-0.14700128138065338,
-0.1630832552909851,
-0.26482266187667847,
-0.2721916437149048,
-0.2592334449291229,
-0.3484431803226471,
0.12418382614850998,
-0.1272900551557541,
-0.15284448862075806,
-0.11625128239393234,
0.03518468514084816,
0.08779383450746536,
0.040598101913928986,
0.4141448736190796,
0.10970508307218552,
-0.5308440923690796,
-0.019078196957707405,
-0.051236771047115326,
0.6524832844734192,
-0.12373363226652145,
0.12244364619255066,
0.13142208755016327,
-0.025038424879312515,
-0.017722411081194878,
0.18205946683883667,
0.07740634679794312,
-0.13650566339492798,
0.3683125376701355,
-0.02663709968328476,
-0.09319477528333664,
-0.08070600032806396,
-0.19126179814338684,
0.20139439404010773,
0.0000701057942933403,
-0.02918173372745514,
0.4379759728908539,
-0.18058370053768158,
0.17338447272777557,
-0.14619454741477966,
0.045103590935468674,
-0.060517966747283936,
-0.1554638147354126,
0.06305749714374542,
0.30397480726242065,
0.22590433061122894,
-0.24014446139335632,
-0.1431237757205963,
0.2040511667728424,
-0.4116497039794922,
0.10687617212533951,
-0.17860685288906097,
-0.10633730888366699,
0.4490489065647125,
0.2816430628299713,
0.24848397076129913,
-0.0278206467628479,
0.2763483226299286,
0.351750910282135,
-0.05608605593442917,
-0.3285367786884308,
0.10506696999073029,
0.19116832315921783,
-0.26314452290534973,
-0.472608357667923,
-0.2797657549381256,
0.39632728695869446,
-0.1297776699066162,
-0.39438650012016296,
0.1091647744178772,
0.03924500197172165,
0.0827709436416626,
0.008156994357705116,
0.058696720749139786,
0.04224957525730133,
-0.30447304248809814,
-0.2156541645526886,
0.03763638064265251,
0.37157511711120605,
-0.1708250194787979,
0.016662824898958206,
0.08971257507801056,
0.18906326591968536,
0.17480617761611938,
0.3145017623901367,
-0.07133640348911285,
0.13084182143211365,
0.4064759612083435,
-0.09200464189052582,
0.19643278419971466,
0.12955385446548462,
-0.08013828098773956,
-0.028839483857154846,
0.3353656530380249,
-0.2380739152431488,
-0.013696681708097458,
-0.038226090371608734,
-0.012295855209231377,
-0.01858106255531311,
-0.35561496019363403,
0.152311772108078,
-0.5327463150024414,
0.06618215143680573,
-0.173190638422966,
0.39390885829925537,
0.012641943991184235,
-0.086209237575531,
-0.11113843321800232,
0.13289858400821686,
-0.10970468074083328,
-0.1496865451335907,
0.2763991951942444,
-0.21447689831256866,
-0.10343605279922485,
-0.042652733623981476,
-0.1291576623916626,
0.3310651481151581,
0.3931906223297119,
0.4288623332977295,
0.20040938258171082,
-0.13035941123962402,
0.0620061419904232,
-0.24782399833202362,
0.24646764993667603,
-0.2958027720451355,
-0.009168034419417381,
-0.052676115185022354,
0.14430345594882965,
0.1960221230983734,
0.053585827350616455,
-0.3238568603992462,
0.3850075900554657,
0.19502326846122742,
0.08641844242811203,
-0.08976931124925613,
-0.10742268711328506,
-0.2887786626815796,
0.18239745497703552,
0.11659669131040573,
-0.02359222061932087,
0.21174389123916626,
0.08785125613212585,
-0.4319588840007782,
0.5471481084823608,
0.23344795405864716,
-0.2423286885023117,
-0.23934024572372437,
-0.19901345670223236,
-0.22264419496059418,
0.10727124661207199,
-0.049443744122982025,
0.12715314328670502,
0.027791079133749008,
-0.3620932996273041,
-0.1744331419467926,
-0.3219802677631378,
0.10390865802764893,
0.326175332069397,
-0.0031054446008056402,
-0.03462611511349678,
0.014818565919995308,
-0.2771913707256317,
0.3060813844203949,
0.43519842624664307,
0.46364903450012207,
-0.008114702068269253,
0.09221437573432922,
0.11505954712629318,
-0.03809560462832451,
-0.06843698024749756,
0.29714223742485046,
-0.07472392171621323,
-0.014598456211388111,
0.3625445067882538,
0.3654981553554535,
-0.3453013300895691,
0.10581855475902557,
-0.20170240104198456,
0.13840344548225403,
0.5320138931274414,
-0.5904005169868469,
-0.03597191721200943,
0.14374612271785736,
0.5734213590621948,
0.31569036841392517,
-0.08269846439361572,
0.06337634474039078,
-0.11877415329217911,
0.21439163386821747,
0.06460394710302353,
0.2100958377122879,
-0.04845890775322914,
0.060244739055633545,
-0.0005235722637735307,
-0.25188934803009033,
0.06872138381004333,
0.14947806298732758,
0.0161905400454998,
0.42357760667800903,
0.020935500040650368,
-0.16548776626586914,
0.17822542786598206,
0.20591244101524353,
-0.37821513414382935,
0.11280412971973419,
-0.23147840797901154,
0.14560911059379578,
0.1223147064447403,
-0.4118790626525879,
-0.13091914355754852,
0.06937415152788162,
0.046566326171159744,
-0.6056035161018372,
0.014477241784334183,
-0.29826870560646057,
0.06203132122755051,
-0.23500283062458038,
0.11235370486974716,
-0.06048537790775299,
0.08683277666568756,
-0.23570112884044647,
0.025790058076381683,
0.3566780388355255,
0.1180013120174408,
-0.18455864489078522,
0.24810388684272766,
0.2923462390899658,
0.24337048828601837,
-0.11609543859958649,
0.30705511569976807,
0.11957474052906036,
-0.31503304839134216,
0.09297384321689606,
-0.3410588204860687,
-0.5298291444778442,
0.039285317063331604,
0.22262489795684814,
0.2405450940132141,
0.008942348882555962,
0.3346419930458069,
-0.10192738473415375,
-0.30073490738868713,
-0.15696969628334045,
0.2124779373407364,
0.11944872885942459,
0.029340488836169243,
0.23386497795581818,
0.1253492832183838,
-0.01403779722750187,
-0.03323384001851082,
-0.21384315192699432,
-0.5787500739097595,
0.43181920051574707,
0.3374694585800171,
-0.2526651918888092,
0.06117802858352661,
-0.18141008913516998,
-0.20321182906627655,
0.09020485728979111,
-0.04832659661769867,
0.2639732360839844,
-0.07629206776618958,
-0.5261842608451843,
0.08460985869169235,
0.2659361660480499,
0.1708705872297287,
0.029313530772924423,
-0.13142278790473938,
-0.1557346135377884,
-0.3064282536506653,
0.26602721214294434,
0.0063447775319218636,
0.16134871542453766,
0.07431090623140335,
0.2096501588821411,
-0.3610525131225586,
-0.24225573241710663,
-0.3978877365589142,
-0.21446596086025238,
-0.44577914476394653,
0.2537802755832672,
-0.33468255400657654,
-0.079068124294281,
-0.2924463748931885,
-0.08732828497886658,
0.1863490343093872,
0.11029700189828873,
0.17734891176223755,
-0.29054751992225647,
0.14616677165031433,
0.0694657415151596,
0.07310980558395386,
0.06616653501987457,
0.018732551485300064,
-0.41944384574890137,
0.22917397320270538,
-0.08866027742624283,
-0.07222103327512741,
-0.16221053898334503,
-0.05244171619415283,
-0.15665775537490845,
-0.0848383679986,
0.4008004069328308,
-0.08849939703941345,
0.2966126799583435,
0.06360573321580887,
-0.2916242182254791,
-0.4615725576877594,
0.1190391406416893,
-0.13791467249393463,
-0.2620185613632202,
0.3370198905467987,
0.22069494426250458,
0.15036167204380035,
0.49127721786499023,
-0.2047380656003952,
0.45173177123069763,
-0.5069355964660645,
0.050994038581848145,
-0.05297533795237541,
0.11262165009975433,
-0.014725507237017155,
0.03635266423225403,
0.31647589802742004,
0.2846754491329193,
0.025955481454730034,
0.20100441575050354,
-0.025821620598435402,
-0.38921090960502625,
0.3604552149772644,
0.5842070579528809,
-0.09656061232089996,
-0.30925774574279785,
0.161596417427063,
-0.024849385023117065,
-0.510128378868103,
0.4505001902580261,
-0.5030702352523804,
-0.1148364469408989,
-0.43880757689476013,
-0.024378350004553795,
-0.0005238744197413325,
-0.23416686058044434,
0.42067423462867737,
-0.468140572309494,
0.0227848831564188,
0.1320704072713852,
-0.12109974771738052,
0.06925380975008011,
-0.08404131978750229,
-0.20592696964740753,
0.31677013635635376,
-0.45009738206863403,
0.440346360206604,
-0.10595332831144333,
0.18195170164108276,
0.14606879651546478,
0.26837828755378723,
0.014273143373429775,
0.003979361616075039,
-0.24942073225975037,
-0.027004553005099297,
0.19198116660118103,
-0.10697322338819504,
0.006245742551982403,
0.29842787981033325,
-0.3788442313671112,
0.024852104485034943,
0.1969173699617386,
-0.213568314909935,
-0.013646712526679039,
0.3503001928329468,
-0.13131612539291382,
-0.16021648049354553,
0.13932305574417114,
0.18223412334918976,
-0.20350980758666992,
0.07316147536039352,
0.3119482696056366,
0.27202826738357544,
0.09433631598949432,
0.09739764779806137,
0.09190903604030609,
-0.005258155986666679,
-0.11650513112545013,
-0.161977618932724,
-0.04744821786880493,
0.13099879026412964,
-0.5291303992271423,
0.04239576682448387,
-0.11418095231056213,
-0.02132168971002102,
0.052640192210674286,
0.17891773581504822,
-0.2304786741733551,
-0.22877593338489532,
-0.04462182894349098,
-0.23597390949726105,
-0.5360907316207886,
0.3170982003211975,
0.5066444873809814,
-0.005882052704691887,
-0.16342194378376007,
0.017993072047829628,
0.3101942539215088,
0.3532654941082001,
-0.1069624125957489,
-0.5170671939849854,
0.00015107024228200316,
0.07670342922210693,
0.14064419269561768,
-0.20417439937591553,
-0.1491324007511139,
0.11314452439546585,
0.39463794231414795,
-0.11347992718219757,
0.1383226066827774,
-0.29404333233833313,
0.13782303035259247,
0.042811594903469086,
-0.1492096483707428,
0.0706341490149498,
-0.1672569364309311,
0.14040713012218475,
-0.08997577428817749,
0.16666541993618011,
-0.21939031779766083,
0.07578644156455994,
-0.009228687733411789,
-0.11606408655643463,
-0.18499138951301575,
0.5277266502380371,
-0.4166632890701294,
0.121951624751091,
-0.034056615084409714,
0.13217905163764954,
0.027444692328572273,
0.29145023226737976,
0.3106983006000519,
-0.03377031907439232,
0.1390790343284607,
0.017719678580760956,
0.2008284479379654,
0.09415037930011749,
0.14301086962223053,
-0.03610985726118088,
0.03125400096178055,
-0.16088271141052246,
0.011443750001490116,
-0.14383965730667114,
-0.07589587569236755,
-0.1870734840631485,
0.10406378656625748,
-0.2740885615348816,
0.05001257732510567,
0.026747843250632286,
0.10574261099100113,
0.3127865195274353,
0.015030039474368095,
-0.1303325593471527,
0.29612383246421814,
-0.4915449321269989,
0.2145833820104599,
-0.2351091355085373,
-0.014761148951947689,
0.12130001932382584,
0.18556374311447144,
-0.10584429651498795,
-0.08853500336408615,
0.26039960980415344,
0.17151254415512085,
-0.012159780599176884,
0.050126250833272934,
0.3849960267543793,
0.3584819436073303,
-0.30891746282577515,
-0.04458056390285492,
-0.3990642726421356,
0.19816415011882782,
-0.15203745663166046,
-0.11300723254680634,
-0.11585450172424316,
0.08320986479520798,
0.0027192928828299046,
0.14149567484855652,
0.09060293436050415,
0.08303844183683395,
0.25017160177230835,
0.1058616042137146,
0.01383534912019968
] |
https://github.com/huggingface/datasets/issues/3171
|
Raise exceptions instead of using assertions for control flow
|
Hi all,
I am interested in taking up `fingerprint.py`, `search.py`, `arrow_writer.py` and `metric.py`. Will raise a PR soon!
|
Motivated by https://github.com/huggingface/transformers/issues/12789 in Transformers, one welcoming change would be replacing assertions with proper exceptions. The only type of assertions we should keep are those used as sanity checks.
Currently, there is a total of 87 files with the `assert` statements (located under `datasets` and `src/datasets`), so when working on this, to manage the PR size, only modify 4-5 files at most before submitting a PR.
| 18 |
Raise exceptions instead of using assertions for control flow
|
[
-0.0008899649255909026,
-0.11045878380537033,
-0.1039699912071228,
-0.08039186149835587,
-0.15737374126911163,
-0.4011605679988861,
0.12250569462776184,
-0.02667135000228882,
-0.17331381142139435,
0.35812079906463623,
0.4592781960964203,
0.03063972480595112,
-0.28336670994758606,
-0.039621543139219284,
-0.3563654124736786,
0.044997379183769226,
-0.3259962797164917,
0.08976936340332031,
0.529388964176178,
0.07099278271198273,
0.14190420508384705,
-0.3200015425682068,
-0.13871917128562927,
0.2173440158367157,
0.04648948088288307,
-0.2307775467634201,
0.19722795486450195,
0.1681385338306427,
0.17810901999473572,
-0.35288283228874207,
0.06286749988794327,
0.11755877733230591,
0.16926999390125275,
-0.09381705522537231,
-0.00010416842997074127,
0.12667952477931976,
0.2888687252998352,
0.0350482277572155,
-0.1762079894542694,
0.5473501086235046,
-0.2320917695760727,
-0.09450118243694305,
-0.375092089176178,
-0.16594715416431427,
0.18333114683628082,
-0.16692015528678894,
-0.10248693823814392,
-0.031309206038713455,
0.19192330539226532,
0.3934237062931061,
0.22424834966659546,
0.18057584762573242,
0.05443930998444557,
0.14941300451755524,
0.22953012585639954,
-0.15784721076488495,
0.1535854935646057,
0.1425345540046692,
0.6927914619445801,
-0.31329965591430664,
-0.14869683980941772,
0.041691821068525314,
-0.18847723305225372,
-0.1409541368484497,
-0.443419873714447,
-0.3488529324531555,
0.14237616956233978,
0.2524372339248657,
0.010673447512090206,
0.32301774621009827,
-0.33942291140556335,
0.062387946993112564,
-0.32830575108528137,
-0.41871148347854614,
0.15533877909183502,
-0.044777754694223404,
0.03499874472618103,
-0.08348383754491806,
-0.24984866380691528,
0.4362707734107971,
-0.027176519855856895,
-0.2370796650648117,
-0.30121734738349915,
0.032170433551073074,
-0.08045028150081635,
-0.10908377170562744,
0.023720398545265198,
0.05083779618144035,
-0.026482228189706802,
-0.0716652125120163,
0.05154693126678467,
-0.13135270774364471,
-0.2517172694206238,
-0.1660616248846054,
0.07666245102882385,
-0.26558056473731995,
0.23241503536701202,
0.03373121842741966,
0.17023108899593353,
-0.09233604371547699,
0.060637399554252625,
0.3283648192882538,
0.04285106062889099,
0.035684600472450256,
-0.12559504806995392,
0.08055279403924942,
0.13158512115478516,
0.08055722713470459,
0.3809828460216522,
0.3895416855812073,
-0.03833382576704025,
0.09304075688123703,
0.18149664998054504,
0.008056148886680603,
-0.18210355937480927,
0.4871409833431244,
0.05712505057454109,
-0.02072593756020069,
-0.17920731008052826,
0.21390342712402344,
-0.8175933957099915,
-0.07580668479204178,
0.44487255811691284,
0.013143276795744896,
0.22466374933719635,
0.2420395016670227,
0.08674469590187073,
0.19819597899913788,
-0.02080680802464485,
-0.3574385643005371,
-0.19819417595863342,
0.1517878919839859,
-0.007162103895097971,
-0.008568204939365387,
0.0558013990521431,
0.10920620709657669,
-0.08475825935602188,
-0.04250425472855568,
-0.10339568555355072,
-0.207494854927063,
0.34214016795158386,
-0.01435007806867361,
0.21848005056381226,
-0.1182079166173935,
-0.2951570451259613,
-0.27930253744125366,
-0.0017615763936191797,
-0.13364291191101074,
0.13992761075496674,
0.09903935343027115,
0.04983370006084442,
-0.3681683838367462,
0.5046535730361938,
0.219923198223114,
-0.0572529062628746,
0.20632073283195496,
0.19502419233322144,
0.2499171495437622,
-0.13155260682106018,
-0.29145655035972595,
0.2571429908275604,
0.04403570294380188,
0.44685909152030945,
0.020666074007749557,
-0.005004238337278366,
0.22703054547309875,
-0.06374268978834152,
0.10013893991708755,
-0.2556421160697937,
-0.025791503489017487,
0.03766960650682449,
-0.2027355432510376,
-0.21194146573543549,
0.5679773688316345,
-0.3205562233924866,
-0.0410173237323761,
0.07733574509620667,
-0.2835201919078827,
0.026530051603913307,
-0.20691268146038055,
-0.1270902305841446,
0.3251008093357086,
0.22737613320350647,
-0.26257213950157166,
-0.14460597932338715,
-0.04051881656050682,
0.011509908363223076,
-0.21662278473377228,
-0.2278256118297577,
0.10137955844402313,
0.027168700471520424,
0.06370352953672409,
-0.3666381239891052,
-0.16649176180362701,
0.106000617146492,
0.18663451075553894,
0.4040111005306244,
-0.21740567684173584,
0.14020603895187378,
-0.321205198764801,
-0.2089829295873642,
-0.3102972209453583,
0.14324645698070526,
-0.375178724527359,
-0.36495959758758545,
0.014989744871854782,
0.08497559279203415,
0.32034334540367126,
0.08633804321289062,
-0.00538625055924058,
0.5466997027397156,
-0.04633104428648949,
-0.11969184875488281,
0.10735651850700378,
0.4327286183834076,
-0.055243782699108124,
0.30129656195640564,
0.2914576232433319,
-0.33838018774986267,
-0.13167744874954224,
-0.08610976487398148,
0.06836353987455368,
-0.7037951946258545,
-0.018124759197235107,
0.36451685428619385,
-0.17610369622707367,
0.1772640496492386,
-0.16444943845272064,
-0.2691333293914795,
-0.08788295835256577,
-0.21776948869228363,
0.09378590434789658,
-0.1693858504295349,
0.1360083818435669,
0.039619363844394684,
0.19514594972133636,
0.10145638883113861,
0.013934167101979256,
-0.27588239312171936,
-0.06635095179080963,
-0.20056003332138062,
-0.32493889331817627,
-0.043376315385103226,
0.13935048878192902,
0.0618194118142128,
0.357778936624527,
0.40547147393226624,
0.20279712975025177,
0.21933187544345856,
0.14253635704517365,
-0.055732086300849915,
-0.03163677081465721,
-0.12401919811964035,
0.029049107804894447,
-0.051304131746292114,
-0.019701136276125908,
0.20822186768054962,
-0.26779836416244507,
-0.1747197061777115,
-0.11429601162672043,
-0.04466916248202324,
0.07152922451496124,
0.25126388669013977,
0.07299131900072098,
0.23754483461380005,
0.2571874260902405,
0.5153183341026306,
0.2794862985610962,
0.3481568694114685,
0.4741288125514984,
0.08760641515254974,
-0.08866359293460846,
0.08980704843997955,
-0.18240967392921448,
0.19784508645534515,
0.3201437294483185,
-0.3631701171398163,
0.06626832485198975,
0.11219032853841782,
-0.14700128138065338,
-0.1630832552909851,
-0.26482266187667847,
-0.2721916437149048,
-0.2592334449291229,
-0.3484431803226471,
0.12418382614850998,
-0.1272900551557541,
-0.15284448862075806,
-0.11625128239393234,
0.03518468514084816,
0.08779383450746536,
0.040598101913928986,
0.4141448736190796,
0.10970508307218552,
-0.5308440923690796,
-0.019078196957707405,
-0.051236771047115326,
0.6524832844734192,
-0.12373363226652145,
0.12244364619255066,
0.13142208755016327,
-0.025038424879312515,
-0.017722411081194878,
0.18205946683883667,
0.07740634679794312,
-0.13650566339492798,
0.3683125376701355,
-0.02663709968328476,
-0.09319477528333664,
-0.08070600032806396,
-0.19126179814338684,
0.20139439404010773,
0.0000701057942933403,
-0.02918173372745514,
0.4379759728908539,
-0.18058370053768158,
0.17338447272777557,
-0.14619454741477966,
0.045103590935468674,
-0.060517966747283936,
-0.1554638147354126,
0.06305749714374542,
0.30397480726242065,
0.22590433061122894,
-0.24014446139335632,
-0.1431237757205963,
0.2040511667728424,
-0.4116497039794922,
0.10687617212533951,
-0.17860685288906097,
-0.10633730888366699,
0.4490489065647125,
0.2816430628299713,
0.24848397076129913,
-0.0278206467628479,
0.2763483226299286,
0.351750910282135,
-0.05608605593442917,
-0.3285367786884308,
0.10506696999073029,
0.19116832315921783,
-0.26314452290534973,
-0.472608357667923,
-0.2797657549381256,
0.39632728695869446,
-0.1297776699066162,
-0.39438650012016296,
0.1091647744178772,
0.03924500197172165,
0.0827709436416626,
0.008156994357705116,
0.058696720749139786,
0.04224957525730133,
-0.30447304248809814,
-0.2156541645526886,
0.03763638064265251,
0.37157511711120605,
-0.1708250194787979,
0.016662824898958206,
0.08971257507801056,
0.18906326591968536,
0.17480617761611938,
0.3145017623901367,
-0.07133640348911285,
0.13084182143211365,
0.4064759612083435,
-0.09200464189052582,
0.19643278419971466,
0.12955385446548462,
-0.08013828098773956,
-0.028839483857154846,
0.3353656530380249,
-0.2380739152431488,
-0.013696681708097458,
-0.038226090371608734,
-0.012295855209231377,
-0.01858106255531311,
-0.35561496019363403,
0.152311772108078,
-0.5327463150024414,
0.06618215143680573,
-0.173190638422966,
0.39390885829925537,
0.012641943991184235,
-0.086209237575531,
-0.11113843321800232,
0.13289858400821686,
-0.10970468074083328,
-0.1496865451335907,
0.2763991951942444,
-0.21447689831256866,
-0.10343605279922485,
-0.042652733623981476,
-0.1291576623916626,
0.3310651481151581,
0.3931906223297119,
0.4288623332977295,
0.20040938258171082,
-0.13035941123962402,
0.0620061419904232,
-0.24782399833202362,
0.24646764993667603,
-0.2958027720451355,
-0.009168034419417381,
-0.052676115185022354,
0.14430345594882965,
0.1960221230983734,
0.053585827350616455,
-0.3238568603992462,
0.3850075900554657,
0.19502326846122742,
0.08641844242811203,
-0.08976931124925613,
-0.10742268711328506,
-0.2887786626815796,
0.18239745497703552,
0.11659669131040573,
-0.02359222061932087,
0.21174389123916626,
0.08785125613212585,
-0.4319588840007782,
0.5471481084823608,
0.23344795405864716,
-0.2423286885023117,
-0.23934024572372437,
-0.19901345670223236,
-0.22264419496059418,
0.10727124661207199,
-0.049443744122982025,
0.12715314328670502,
0.027791079133749008,
-0.3620932996273041,
-0.1744331419467926,
-0.3219802677631378,
0.10390865802764893,
0.326175332069397,
-0.0031054446008056402,
-0.03462611511349678,
0.014818565919995308,
-0.2771913707256317,
0.3060813844203949,
0.43519842624664307,
0.46364903450012207,
-0.008114702068269253,
0.09221437573432922,
0.11505954712629318,
-0.03809560462832451,
-0.06843698024749756,
0.29714223742485046,
-0.07472392171621323,
-0.014598456211388111,
0.3625445067882538,
0.3654981553554535,
-0.3453013300895691,
0.10581855475902557,
-0.20170240104198456,
0.13840344548225403,
0.5320138931274414,
-0.5904005169868469,
-0.03597191721200943,
0.14374612271785736,
0.5734213590621948,
0.31569036841392517,
-0.08269846439361572,
0.06337634474039078,
-0.11877415329217911,
0.21439163386821747,
0.06460394710302353,
0.2100958377122879,
-0.04845890775322914,
0.060244739055633545,
-0.0005235722637735307,
-0.25188934803009033,
0.06872138381004333,
0.14947806298732758,
0.0161905400454998,
0.42357760667800903,
0.020935500040650368,
-0.16548776626586914,
0.17822542786598206,
0.20591244101524353,
-0.37821513414382935,
0.11280412971973419,
-0.23147840797901154,
0.14560911059379578,
0.1223147064447403,
-0.4118790626525879,
-0.13091914355754852,
0.06937415152788162,
0.046566326171159744,
-0.6056035161018372,
0.014477241784334183,
-0.29826870560646057,
0.06203132122755051,
-0.23500283062458038,
0.11235370486974716,
-0.06048537790775299,
0.08683277666568756,
-0.23570112884044647,
0.025790058076381683,
0.3566780388355255,
0.1180013120174408,
-0.18455864489078522,
0.24810388684272766,
0.2923462390899658,
0.24337048828601837,
-0.11609543859958649,
0.30705511569976807,
0.11957474052906036,
-0.31503304839134216,
0.09297384321689606,
-0.3410588204860687,
-0.5298291444778442,
0.039285317063331604,
0.22262489795684814,
0.2405450940132141,
0.008942348882555962,
0.3346419930458069,
-0.10192738473415375,
-0.30073490738868713,
-0.15696969628334045,
0.2124779373407364,
0.11944872885942459,
0.029340488836169243,
0.23386497795581818,
0.1253492832183838,
-0.01403779722750187,
-0.03323384001851082,
-0.21384315192699432,
-0.5787500739097595,
0.43181920051574707,
0.3374694585800171,
-0.2526651918888092,
0.06117802858352661,
-0.18141008913516998,
-0.20321182906627655,
0.09020485728979111,
-0.04832659661769867,
0.2639732360839844,
-0.07629206776618958,
-0.5261842608451843,
0.08460985869169235,
0.2659361660480499,
0.1708705872297287,
0.029313530772924423,
-0.13142278790473938,
-0.1557346135377884,
-0.3064282536506653,
0.26602721214294434,
0.0063447775319218636,
0.16134871542453766,
0.07431090623140335,
0.2096501588821411,
-0.3610525131225586,
-0.24225573241710663,
-0.3978877365589142,
-0.21446596086025238,
-0.44577914476394653,
0.2537802755832672,
-0.33468255400657654,
-0.079068124294281,
-0.2924463748931885,
-0.08732828497886658,
0.1863490343093872,
0.11029700189828873,
0.17734891176223755,
-0.29054751992225647,
0.14616677165031433,
0.0694657415151596,
0.07310980558395386,
0.06616653501987457,
0.018732551485300064,
-0.41944384574890137,
0.22917397320270538,
-0.08866027742624283,
-0.07222103327512741,
-0.16221053898334503,
-0.05244171619415283,
-0.15665775537490845,
-0.0848383679986,
0.4008004069328308,
-0.08849939703941345,
0.2966126799583435,
0.06360573321580887,
-0.2916242182254791,
-0.4615725576877594,
0.1190391406416893,
-0.13791467249393463,
-0.2620185613632202,
0.3370198905467987,
0.22069494426250458,
0.15036167204380035,
0.49127721786499023,
-0.2047380656003952,
0.45173177123069763,
-0.5069355964660645,
0.050994038581848145,
-0.05297533795237541,
0.11262165009975433,
-0.014725507237017155,
0.03635266423225403,
0.31647589802742004,
0.2846754491329193,
0.025955481454730034,
0.20100441575050354,
-0.025821620598435402,
-0.38921090960502625,
0.3604552149772644,
0.5842070579528809,
-0.09656061232089996,
-0.30925774574279785,
0.161596417427063,
-0.024849385023117065,
-0.510128378868103,
0.4505001902580261,
-0.5030702352523804,
-0.1148364469408989,
-0.43880757689476013,
-0.024378350004553795,
-0.0005238744197413325,
-0.23416686058044434,
0.42067423462867737,
-0.468140572309494,
0.0227848831564188,
0.1320704072713852,
-0.12109974771738052,
0.06925380975008011,
-0.08404131978750229,
-0.20592696964740753,
0.31677013635635376,
-0.45009738206863403,
0.440346360206604,
-0.10595332831144333,
0.18195170164108276,
0.14606879651546478,
0.26837828755378723,
0.014273143373429775,
0.003979361616075039,
-0.24942073225975037,
-0.027004553005099297,
0.19198116660118103,
-0.10697322338819504,
0.006245742551982403,
0.29842787981033325,
-0.3788442313671112,
0.024852104485034943,
0.1969173699617386,
-0.213568314909935,
-0.013646712526679039,
0.3503001928329468,
-0.13131612539291382,
-0.16021648049354553,
0.13932305574417114,
0.18223412334918976,
-0.20350980758666992,
0.07316147536039352,
0.3119482696056366,
0.27202826738357544,
0.09433631598949432,
0.09739764779806137,
0.09190903604030609,
-0.005258155986666679,
-0.11650513112545013,
-0.161977618932724,
-0.04744821786880493,
0.13099879026412964,
-0.5291303992271423,
0.04239576682448387,
-0.11418095231056213,
-0.02132168971002102,
0.052640192210674286,
0.17891773581504822,
-0.2304786741733551,
-0.22877593338489532,
-0.04462182894349098,
-0.23597390949726105,
-0.5360907316207886,
0.3170982003211975,
0.5066444873809814,
-0.005882052704691887,
-0.16342194378376007,
0.017993072047829628,
0.3101942539215088,
0.3532654941082001,
-0.1069624125957489,
-0.5170671939849854,
0.00015107024228200316,
0.07670342922210693,
0.14064419269561768,
-0.20417439937591553,
-0.1491324007511139,
0.11314452439546585,
0.39463794231414795,
-0.11347992718219757,
0.1383226066827774,
-0.29404333233833313,
0.13782303035259247,
0.042811594903469086,
-0.1492096483707428,
0.0706341490149498,
-0.1672569364309311,
0.14040713012218475,
-0.08997577428817749,
0.16666541993618011,
-0.21939031779766083,
0.07578644156455994,
-0.009228687733411789,
-0.11606408655643463,
-0.18499138951301575,
0.5277266502380371,
-0.4166632890701294,
0.121951624751091,
-0.034056615084409714,
0.13217905163764954,
0.027444692328572273,
0.29145023226737976,
0.3106983006000519,
-0.03377031907439232,
0.1390790343284607,
0.017719678580760956,
0.2008284479379654,
0.09415037930011749,
0.14301086962223053,
-0.03610985726118088,
0.03125400096178055,
-0.16088271141052246,
0.011443750001490116,
-0.14383965730667114,
-0.07589587569236755,
-0.1870734840631485,
0.10406378656625748,
-0.2740885615348816,
0.05001257732510567,
0.026747843250632286,
0.10574261099100113,
0.3127865195274353,
0.015030039474368095,
-0.1303325593471527,
0.29612383246421814,
-0.4915449321269989,
0.2145833820104599,
-0.2351091355085373,
-0.014761148951947689,
0.12130001932382584,
0.18556374311447144,
-0.10584429651498795,
-0.08853500336408615,
0.26039960980415344,
0.17151254415512085,
-0.012159780599176884,
0.050126250833272934,
0.3849960267543793,
0.3584819436073303,
-0.30891746282577515,
-0.04458056390285492,
-0.3990642726421356,
0.19816415011882782,
-0.15203745663166046,
-0.11300723254680634,
-0.11585450172424316,
0.08320986479520798,
0.0027192928828299046,
0.14149567484855652,
0.09060293436050415,
0.08303844183683395,
0.25017160177230835,
0.1058616042137146,
0.01383534912019968
] |
https://github.com/huggingface/datasets/issues/3168
|
OpenSLR/83 is empty
|
Hi @tyrius02, thanks for reporting. I see you self-assigned this issue: are you working on this?
|
## Describe the bug
As the summary says, openslr / SLR83 / train is empty.
The dataset returned after loading indicates there are **zero** rows. The correct number should be **17877**.
## Steps to reproduce the bug
```python
import datasets
datasets.load_dataset('openslr', 'SLR83')
```
## Expected results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 17877
})
})
```
## Actual results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 0
})
})
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.1.dev0 (master HEAD)
- Platform: Ubuntu 20.04
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 16 |
OpenSLR/83 is empty
|
[
-0.1044558435678482,
-0.10902660340070724,
-0.09881579875946045,
0.07646273821592331,
-0.01022629626095295,
-0.2183023989200592,
0.3371032178401947,
0.19694986939430237,
0.20544013381004333,
0.5007511377334595,
-0.28960663080215454,
0.40018928050994873,
-0.14395490288734436,
0.10470502823591232,
-0.2163384109735489,
0.2873678505420685,
-0.14295808970928192,
0.23520730435848236,
-0.1991589218378067,
-0.42493313550949097,
-0.18233780562877655,
0.27512916922569275,
-0.30961355566978455,
-0.04603414610028267,
-0.14661988615989685,
0.1049158051609993,
0.2352452129125595,
0.2493584156036377,
-0.2007409930229187,
-0.06432797014713287,
-0.0352729894220829,
-0.3649987578392029,
0.17445197701454163,
0.09319836646318436,
-0.00011327731044730172,
0.1791357696056366,
0.5988696813583374,
0.01998331770300865,
-0.2122708559036255,
-0.11860382556915283,
-0.05625298246741295,
-0.17360951006412506,
0.34065768122673035,
-0.203847736120224,
0.1685723513364792,
0.12296172976493835,
0.029107484966516495,
-0.0002451781474519521,
0.2624177932739258,
0.23771043121814728,
0.21156717836856842,
-0.08044146001338959,
0.08755005151033401,
-0.12485505640506744,
0.1511390507221222,
0.25905224680900574,
-0.06332416087388992,
-0.2921294867992401,
-0.05687039718031883,
0.22698061168193817,
0.23281343281269073,
0.30847567319869995,
0.058979861438274384,
-0.21557854115962982,
-0.07626468688249588,
0.08676408976316452,
0.5268563628196716,
-0.15031784772872925,
0.16670489311218262,
0.07624070346355438,
0.12763288617134094,
0.30305346846580505,
0.2684308886528015,
0.2422412633895874,
-0.04674305021762848,
-0.3175070881843567,
0.35606905817985535,
0.3603213131427765,
-0.16543756425380707,
0.09178908914327621,
-0.11242135614156723,
-0.1889713853597641,
-0.2747924029827118,
0.08050960302352905,
-0.4360593557357788,
0.614369809627533,
0.012966899201273918,
-0.030909819528460503,
0.1694444864988327,
0.03934863954782486,
0.2224755883216858,
0.18336759507656097,
-0.39860567450523376,
-0.004975395277142525,
-0.13521166145801544,
0.08607162535190582,
0.11145522445440292,
0.13603165745735168,
-0.12262044847011566,
0.3193141222000122,
0.13666968047618866,
0.3680417835712433,
-0.1251043826341629,
-0.1500082015991211,
-0.1626824289560318,
-0.049920704215765,
0.15967285633087158,
0.25731799006462097,
-0.10837901383638382,
0.10690543800592422,
-0.012606849893927574,
-0.06398002058267593,
-0.2954443395137787,
-0.26843535900115967,
-0.27125853300094604,
-0.10495540499687195,
0.21332871913909912,
-0.04726617410778999,
0.3253021240234375,
0.02601127326488495,
-0.32101601362228394,
-0.13980251550674438,
0.12696044147014618,
0.15164725482463837,
0.021362287923693657,
0.1716303527355194,
0.4296780526638031,
-0.07342860847711563,
0.04322797805070877,
-0.11680678278207779,
-0.20488543808460236,
-0.05944476276636124,
-0.3496517241001129,
-0.21761825680732727,
0.0641881600022316,
0.03268875181674957,
0.3034074008464813,
-0.2358720600605011,
0.13341449201107025,
-0.17133945226669312,
0.5375116467475891,
0.27534082531929016,
0.17568346858024597,
0.2804631292819977,
0.057461269199848175,
0.00044527696445584297,
0.16916139423847198,
0.07708375155925751,
0.10983036458492279,
0.38333234190940857,
-0.16363753378391266,
-0.2793411910533905,
-0.2565363943576813,
0.27799728512763977,
0.22326065599918365,
0.10431797057390213,
0.2374311238527298,
0.029116183519363403,
-0.4690462350845337,
-0.1815211921930313,
0.17057347297668457,
0.16849739849567413,
0.17769156396389008,
0.09437873959541321,
0.1826237589120865,
0.16792790591716766,
0.0565105602145195,
0.03527754545211792,
-0.2489650845527649,
-0.20393194258213043,
0.1945260912179947,
-0.4512467384338379,
-0.08969028294086456,
-0.20803828537464142,
-0.2710144519805908,
-0.18047696352005005,
0.4889328181743622,
-0.3966690003871918,
0.08145416527986526,
0.11844323575496674,
0.030615579336881638,
-0.690534770488739,
0.2689591944217682,
-0.010751985013484955,
-0.556588351726532,
0.21116401255130768,
-0.12053538858890533,
-0.02970312163233757,
0.16883982717990875,
-0.11036349833011627,
-0.3217132091522217,
-0.02501024305820465,
-0.5563442707061768,
0.11459925770759583,
0.37354689836502075,
0.10860051959753036,
-0.023083893582224846,
0.13893696665763855,
0.369764119386673,
0.0002744435041677207,
-0.010216404683887959,
0.3987356126308441,
0.36393868923187256,
0.011441581882536411,
-0.042962223291397095,
0.3369561433792114,
0.021774593740701675,
-0.279906302690506,
-0.31752505898475647,
0.12512990832328796,
0.495807021856308,
0.134942889213562,
-0.3046332597732544,
0.08976906538009644,
0.04594174399971962,
-0.04370102658867836,
0.1945772022008896,
0.3837008476257324,
-0.15855073928833008,
0.21162629127502441,
-0.21890953183174133,
-0.28332433104515076,
0.08177684247493744,
0.006530888844281435,
-0.3509924113750458,
0.16705764830112457,
-0.10691376030445099,
-0.0682012215256691,
-0.07039623707532883,
0.004593397490680218,
0.13423359394073486,
-0.02806583046913147,
0.11250089854001999,
0.009029757231473923,
0.151185542345047,
0.015209694392979145,
0.10026026517152786,
0.0051428452134132385,
0.1147150918841362,
-0.17814120650291443,
-0.1288183629512787,
0.20875506103038788,
0.0020597989205271006,
0.07778503000736237,
-0.09087871760129929,
-0.17342758178710938,
-0.3654462695121765,
0.050374045968055725,
-0.0964813381433487,
0.07883910089731216,
-0.22055049240589142,
-0.35548487305641174,
-0.0768037661910057,
-0.10403579473495483,
0.084958016872406,
0.2602372169494629,
0.03493789583444595,
0.10947071760892868,
-0.06641391664743423,
0.007908553816378117,
-0.1055682972073555,
-0.011287521570920944,
-0.054901476949453354,
-0.018232297152280807,
-0.06774721294641495,
-0.10994688421487808,
0.11119075864553452,
-0.06794460862874985,
-0.1458241194486618,
0.2932833433151245,
0.30545490980148315,
0.01049517747014761,
0.2610888183116913,
-0.3366708755493164,
0.3205259442329407,
0.26561349630355835,
0.10919270664453506,
0.14138326048851013,
0.13521969318389893,
-0.14872008562088013,
-0.007978755049407482,
-0.14445491135120392,
0.10775110870599747,
-0.05595918744802475,
0.09947914630174637,
-0.3269486725330353,
-0.22265511751174927,
0.011370654217898846,
0.1634674072265625,
-0.07189075648784637,
-0.0533236488699913,
-0.20888476073741913,
0.030513405799865723,
-0.24466891586780548,
-0.14427116513252258,
0.2540716230869293,
-0.16195116937160492,
-0.040951233357191086,
0.21960361301898956,
0.24535739421844482,
-0.15294887125492096,
-0.0203555915504694,
-0.1289595663547516,
0.06405191868543625,
-0.11351864784955978,
-0.22265206277370453,
-0.13562873005867004,
0.021729227155447006,
-0.026757195591926575,
-0.06506715714931488,
-0.2993773818016052,
0.34118136763572693,
0.2928285598754883,
-0.4674926698207855,
0.36405149102211,
-0.03580992668867111,
-0.5297796130180359,
0.10375615954399109,
0.28831732273101807,
0.17918862402439117,
-0.3330153226852417,
-0.07628228515386581,
0.13736256957054138,
0.4457567632198334,
-0.3457731604576111,
-0.23982030153274536,
0.0384848415851593,
-0.2787553668022156,
-0.11343997716903687,
0.040647201240062714,
-0.02063911035656929,
0.28023332357406616,
0.13139459490776062,
0.044404059648513794,
-0.10682828724384308,
-0.23518672585487366,
-0.08401411771774292,
-0.09773339331150055,
0.021259160712361336,
-0.18797293305397034,
-0.35255298018455505,
0.1837121695280075,
-0.19263236224651337,
0.13520753383636475,
-0.14883488416671753,
-0.5910386443138123,
-0.4669070839881897,
-0.017813919112086296,
-0.07207849621772766,
-0.29987308382987976,
0.2562519609928131,
0.513484001159668,
0.34738364815711975,
-0.33495962619781494,
-0.2619391977787018,
-0.03099897690117359,
0.22787919640541077,
-0.4249625504016876,
0.26963698863983154,
-0.2757171094417572,
0.24515977501869202,
-0.4805147349834442,
0.30138930678367615,
-0.2603015899658203,
0.14752914011478424,
0.33569538593292236,
0.01246427558362484,
0.28232434391975403,
-0.1591113954782486,
0.16882900893688202,
0.2961789071559906,
0.7336963415145874,
-0.18135812878608704,
0.4827881157398224,
0.22761423885822296,
-0.1731632649898529,
-0.3265116214752197,
-0.05523683503270149,
-0.3235335052013397,
0.03680090233683586,
-0.005347591359168291,
0.0301944762468338,
0.20009230077266693,
0.12921704351902008,
0.016486432403326035,
-0.11893068999052048,
-0.08897439390420914,
0.08161044120788574,
-0.03890157863497734,
0.36251524090766907,
-0.16915716230869293,
-0.5327692031860352,
0.003812295850366354,
-0.042476363480091095,
0.29025325179100037,
-0.33632758259773254,
-0.33341455459594727,
-0.04874623939394951,
-0.363212525844574,
0.14335879683494568,
-0.00045793032040819526,
0.076015904545784,
0.0567881315946579,
-0.20940105617046356,
0.1349378526210785,
-0.09093935787677765,
-0.24404674768447876,
-0.0030454176012426615,
-0.06039883941411972,
-0.36511197686195374,
0.25746259093284607,
0.03951794654130936,
-0.30087804794311523,
0.23868997395038605,
0.06107450649142265,
-0.05364682525396347,
-0.2343546748161316,
0.18600648641586304,
-0.38667556643486023,
-0.5275694727897644,
0.15266592800617218,
-0.2152460813522339,
-0.29949846863746643,
0.13523918390274048,
0.37732765078544617,
0.11052081733942032,
0.01519063115119934,
-0.16152998805046082,
0.007356519345194101,
-0.12506242096424103,
0.36261266469955444,
0.12565000355243683,
0.12910033762454987,
-0.18634778261184692,
0.8024652600288391,
-0.030264267697930336,
0.1990935057401657,
-0.08492029458284378,
0.10252656787633896,
0.5499791502952576,
-0.2724934220314026,
0.3819713294506073,
0.2563048005104065,
-0.007375814486294985,
-0.18704010546207428,
-0.29138320684432983,
0.005426785908639431,
0.06940294802188873,
0.2795657217502594,
-0.1660211980342865,
0.013393145985901356,
-0.16816970705986023,
-0.06716645509004593,
0.02353561669588089,
-0.25985342264175415,
-0.07489307969808578,
0.10269876569509506,
0.3665866255760193,
0.1438695788383484,
0.14731769263744354,
-0.039166226983070374,
0.933010458946228,
-0.128901407122612,
0.1011909618973732,
0.5463679432868958,
0.02790491282939911,
0.5242962837219238,
-0.0868242010474205,
0.07787266373634338,
-0.030340246856212616,
0.12882296741008759,
0.21946017444133759,
0.00512041337788105,
-0.217841237783432,
0.16543856263160706,
0.0009753525373525918,
-0.2837665379047394,
0.045069873332977295,
-0.7936960458755493,
0.09857317805290222,
0.014319037087261677,
0.1237047091126442,
0.18427637219429016,
0.032718684524297714,
0.1618633270263672,
0.1253560334444046,
0.25770869851112366,
-0.08728732913732529,
-0.049844205379486084,
-0.10388875007629395,
-0.17040051519870758,
-0.03488563746213913,
0.09304281324148178,
0.27295956015586853,
-0.00107865734025836,
0.3845215439796448,
-0.5175052881240845,
-0.3904353082180023,
0.40047627687454224,
0.3223964273929596,
0.2931654453277588,
-0.06195906177163124,
0.40045368671417236,
-0.2649886906147003,
-0.414246141910553,
-0.11464250832796097,
0.312883585691452,
-0.05329997465014458,
-0.3009721338748932,
-0.42547380924224854,
0.22695645689964294,
-0.15186263620853424,
-0.25229254364967346,
-0.304172545671463,
0.3371574282646179,
0.2655978798866272,
0.031408682465553284,
-0.03552635759115219,
0.11828732490539551,
-0.15871913731098175,
0.148545503616333,
0.14940223097801208,
-0.0035433017183095217,
-0.10593117773532867,
-0.23072057962417603,
0.3973429203033447,
-0.36596736311912537,
-0.09834008663892746,
0.055282436311244965,
-0.11557891964912415,
-0.16086231172084808,
0.6394660472869873,
0.08378347754478455,
0.27544185519218445,
-0.2339881956577301,
0.252119243144989,
0.32749882340431213,
-0.12940742075443268,
-0.07193299382925034,
0.31163209676742554,
-0.23476415872573853,
0.2394678145647049,
0.6787737607955933,
-0.0463525652885437,
0.2094297558069229,
0.1459677815437317,
0.051743265241384506,
-0.19003473222255707,
0.17207443714141846,
-0.20643141865730286,
0.03754587098956108,
-0.18569453060626984,
-0.09044542908668518,
0.17370106279850006,
-0.34136074781417847,
-0.3322838544845581,
0.1729268878698349,
-0.3554123640060425,
0.12739494442939758,
-0.30957943201065063,
-0.189002126455307,
0.023906279355287552,
0.07007492333650589,
0.23198217153549194,
-0.05436064675450325,
0.10483632981777191,
-0.2684357762336731,
-0.06575372070074081,
0.10773533582687378,
-0.11173827946186066,
-0.1411774903535843,
-0.07992403209209442,
0.08100532740354538,
-0.21478544175624847,
0.10644513368606567,
-0.2860257923603058,
0.14454631507396698,
0.032992735505104065,
0.01780889742076397,
-0.2686905264854431,
0.20504043996334076,
-0.3018803894519806,
0.02983488142490387,
0.07446102797985077,
0.29833275079727173,
-0.09945052117109299,
-0.09590177983045578,
0.23710308969020844,
-0.04556014761328697,
-0.046800512820482254,
-0.11588116735219955,
0.11196290701627731,
-0.04134441539645195,
0.4549117684364319,
-0.11305806040763855,
-0.09626542776823044,
-0.06761915236711502,
0.1494775265455246,
-0.3170185089111328,
0.0637216717004776,
0.2257438451051712,
0.04748010262846947,
0.3191731870174408,
-0.3401860296726227,
0.5257514715194702,
-0.25404226779937744,
0.2896060347557068,
0.16807709634304047,
0.20293974876403809,
-0.2130599170923233,
-0.3726028800010681,
0.2553754448890686,
0.21928410232067108,
-0.06227920949459076,
0.2908666133880615,
-0.20856228470802307,
0.01385966595262289,
-0.2916472852230072,
-0.03673586621880531,
0.14957261085510254,
-0.04931110888719559,
-0.03876116871833801,
-0.04415932297706604,
-0.10229882597923279,
0.24057933688163757,
0.08229423314332962,
0.19706545770168304,
0.15682576596736908,
-0.22493447363376617,
-0.08059658855199814,
0.09396754205226898,
0.30504515767097473,
-0.051993872970342636,
-0.23302561044692993,
0.1621362417936325,
-0.08415866643190384,
0.13044294714927673,
-0.15496903657913208,
0.23671825230121613,
-0.01668805442750454,
-0.10313272476196289,
-0.258096307516098,
-0.28159406781196594,
0.01798401027917862,
0.1750231236219406,
0.4750365912914276,
0.17195451259613037,
-0.053173236548900604,
0.3223503530025482,
-0.19106470048427582,
0.25240349769592285,
-0.1111682802438736,
0.3503051996231079,
0.04527553543448448,
0.08512771874666214,
0.2968771755695343,
0.10287409275770187,
-0.1143232211470604,
0.5362250208854675,
0.33709779381752014,
-0.04292881861329079,
-0.004763249307870865,
-0.07130268961191177,
0.22077947854995728,
0.20420324802398682,
-0.13522467017173767,
-0.5538714528083801,
0.23537226021289825,
0.6830418705940247,
0.4361433982849121,
0.015939811244606972,
0.16868066787719727,
-0.30401110649108887,
0.22451002895832062,
-0.34156590700149536,
-0.14572109282016754,
0.10102599859237671,
-0.15468312799930573,
-0.1576014757156372,
-0.30955269932746887,
-0.3871440887451172,
-0.011430799961090088,
-0.6210927963256836,
-0.05162093788385391,
-0.3488348126411438,
0.40852758288383484,
-0.009520968422293663,
-0.1916106641292572,
0.07985754311084747,
-0.2794196307659149,
-0.003180250059813261,
0.2444181740283966,
0.24809041619300842,
0.01646297238767147,
-0.6992968320846558,
-0.05207626149058342,
0.4790790379047394,
0.007513261865824461,
-0.4501379430294037,
-0.19882698357105255,
0.004328817129135132,
0.2815951704978943,
-0.12505079805850983,
0.08586468547582626,
0.04767975956201553,
-0.14145974814891815,
0.10191191732883453,
-0.4009758532047272,
0.06335149705410004,
0.4204188585281372,
0.02800455316901207,
-0.07805389165878296,
-0.15427038073539734,
0.13327893614768982,
-0.01915694959461689,
0.1848919838666916,
-0.01733226329088211,
-0.20768162608146667,
-0.2887800335884094,
1.0519698858261108,
0.2024601399898529,
0.22619839012622833,
0.255233496427536,
-0.11739284545183182,
-0.2706631124019623,
-0.08037133514881134,
-0.19211535155773163,
0.2868505120277405,
-0.1207347959280014,
0.09814818948507309,
0.013261085376143456,
-0.23818998038768768,
0.33950483798980713,
-0.036649998277425766,
0.42413467168807983,
0.03547303006052971,
-0.22226694226264954,
-0.24843959510326385,
0.006309633143246174,
-0.2963808476924896,
-0.18361617624759674,
0.3888108730316162,
0.29017531871795654,
0.19455325603485107,
-0.5578800439834595,
-0.22550994157791138,
-0.2887541949748993,
0.31612834334373474,
-0.20929019153118134,
-0.04715358093380928,
-0.12241626530885696,
-0.0028456682339310646,
0.1264408379793167,
0.23206838965415955,
-0.424051433801651,
-0.07507926225662231,
0.21182318031787872,
0.04491279646754265,
-0.028475843369960785,
-0.26303139328956604,
0.11078044772148132,
-0.0735793337225914,
-0.09178011119365692,
0.07494820654392242,
0.26044756174087524,
0.07806357741355896,
-0.2378123551607132,
0.13879628479480743
] |
https://github.com/huggingface/datasets/issues/3168
|
OpenSLR/83 is empty
|
@albertvillanova Yes. Figured I introduced the broken config, I should fix it too.
I've got it working, but I'm struggling with one of the tests. I've started a PR so I/we can work through it.
|
## Describe the bug
As the summary says, openslr / SLR83 / train is empty.
The dataset returned after loading indicates there are **zero** rows. The correct number should be **17877**.
## Steps to reproduce the bug
```python
import datasets
datasets.load_dataset('openslr', 'SLR83')
```
## Expected results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 17877
})
})
```
## Actual results
```
DatasetDict({
train: Dataset({
features: ['path', 'audio', 'sentence'],
num_rows: 0
})
})
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.1.dev0 (master HEAD)
- Platform: Ubuntu 20.04
- Python version: 3.7.10
- PyArrow version: 3.0.0
| 35 |
OpenSLR/83 is empty
|
[
-0.1044558435678482,
-0.10902660340070724,
-0.09881579875946045,
0.07646273821592331,
-0.01022629626095295,
-0.2183023989200592,
0.3371032178401947,
0.19694986939430237,
0.20544013381004333,
0.5007511377334595,
-0.28960663080215454,
0.40018928050994873,
-0.14395490288734436,
0.10470502823591232,
-0.2163384109735489,
0.2873678505420685,
-0.14295808970928192,
0.23520730435848236,
-0.1991589218378067,
-0.42493313550949097,
-0.18233780562877655,
0.27512916922569275,
-0.30961355566978455,
-0.04603414610028267,
-0.14661988615989685,
0.1049158051609993,
0.2352452129125595,
0.2493584156036377,
-0.2007409930229187,
-0.06432797014713287,
-0.0352729894220829,
-0.3649987578392029,
0.17445197701454163,
0.09319836646318436,
-0.00011327731044730172,
0.1791357696056366,
0.5988696813583374,
0.01998331770300865,
-0.2122708559036255,
-0.11860382556915283,
-0.05625298246741295,
-0.17360951006412506,
0.34065768122673035,
-0.203847736120224,
0.1685723513364792,
0.12296172976493835,
0.029107484966516495,
-0.0002451781474519521,
0.2624177932739258,
0.23771043121814728,
0.21156717836856842,
-0.08044146001338959,
0.08755005151033401,
-0.12485505640506744,
0.1511390507221222,
0.25905224680900574,
-0.06332416087388992,
-0.2921294867992401,
-0.05687039718031883,
0.22698061168193817,
0.23281343281269073,
0.30847567319869995,
0.058979861438274384,
-0.21557854115962982,
-0.07626468688249588,
0.08676408976316452,
0.5268563628196716,
-0.15031784772872925,
0.16670489311218262,
0.07624070346355438,
0.12763288617134094,
0.30305346846580505,
0.2684308886528015,
0.2422412633895874,
-0.04674305021762848,
-0.3175070881843567,
0.35606905817985535,
0.3603213131427765,
-0.16543756425380707,
0.09178908914327621,
-0.11242135614156723,
-0.1889713853597641,
-0.2747924029827118,
0.08050960302352905,
-0.4360593557357788,
0.614369809627533,
0.012966899201273918,
-0.030909819528460503,
0.1694444864988327,
0.03934863954782486,
0.2224755883216858,
0.18336759507656097,
-0.39860567450523376,
-0.004975395277142525,
-0.13521166145801544,
0.08607162535190582,
0.11145522445440292,
0.13603165745735168,
-0.12262044847011566,
0.3193141222000122,
0.13666968047618866,
0.3680417835712433,
-0.1251043826341629,
-0.1500082015991211,
-0.1626824289560318,
-0.049920704215765,
0.15967285633087158,
0.25731799006462097,
-0.10837901383638382,
0.10690543800592422,
-0.012606849893927574,
-0.06398002058267593,
-0.2954443395137787,
-0.26843535900115967,
-0.27125853300094604,
-0.10495540499687195,
0.21332871913909912,
-0.04726617410778999,
0.3253021240234375,
0.02601127326488495,
-0.32101601362228394,
-0.13980251550674438,
0.12696044147014618,
0.15164725482463837,
0.021362287923693657,
0.1716303527355194,
0.4296780526638031,
-0.07342860847711563,
0.04322797805070877,
-0.11680678278207779,
-0.20488543808460236,
-0.05944476276636124,
-0.3496517241001129,
-0.21761825680732727,
0.0641881600022316,
0.03268875181674957,
0.3034074008464813,
-0.2358720600605011,
0.13341449201107025,
-0.17133945226669312,
0.5375116467475891,
0.27534082531929016,
0.17568346858024597,
0.2804631292819977,
0.057461269199848175,
0.00044527696445584297,
0.16916139423847198,
0.07708375155925751,
0.10983036458492279,
0.38333234190940857,
-0.16363753378391266,
-0.2793411910533905,
-0.2565363943576813,
0.27799728512763977,
0.22326065599918365,
0.10431797057390213,
0.2374311238527298,
0.029116183519363403,
-0.4690462350845337,
-0.1815211921930313,
0.17057347297668457,
0.16849739849567413,
0.17769156396389008,
0.09437873959541321,
0.1826237589120865,
0.16792790591716766,
0.0565105602145195,
0.03527754545211792,
-0.2489650845527649,
-0.20393194258213043,
0.1945260912179947,
-0.4512467384338379,
-0.08969028294086456,
-0.20803828537464142,
-0.2710144519805908,
-0.18047696352005005,
0.4889328181743622,
-0.3966690003871918,
0.08145416527986526,
0.11844323575496674,
0.030615579336881638,
-0.690534770488739,
0.2689591944217682,
-0.010751985013484955,
-0.556588351726532,
0.21116401255130768,
-0.12053538858890533,
-0.02970312163233757,
0.16883982717990875,
-0.11036349833011627,
-0.3217132091522217,
-0.02501024305820465,
-0.5563442707061768,
0.11459925770759583,
0.37354689836502075,
0.10860051959753036,
-0.023083893582224846,
0.13893696665763855,
0.369764119386673,
0.0002744435041677207,
-0.010216404683887959,
0.3987356126308441,
0.36393868923187256,
0.011441581882536411,
-0.042962223291397095,
0.3369561433792114,
0.021774593740701675,
-0.279906302690506,
-0.31752505898475647,
0.12512990832328796,
0.495807021856308,
0.134942889213562,
-0.3046332597732544,
0.08976906538009644,
0.04594174399971962,
-0.04370102658867836,
0.1945772022008896,
0.3837008476257324,
-0.15855073928833008,
0.21162629127502441,
-0.21890953183174133,
-0.28332433104515076,
0.08177684247493744,
0.006530888844281435,
-0.3509924113750458,
0.16705764830112457,
-0.10691376030445099,
-0.0682012215256691,
-0.07039623707532883,
0.004593397490680218,
0.13423359394073486,
-0.02806583046913147,
0.11250089854001999,
0.009029757231473923,
0.151185542345047,
0.015209694392979145,
0.10026026517152786,
0.0051428452134132385,
0.1147150918841362,
-0.17814120650291443,
-0.1288183629512787,
0.20875506103038788,
0.0020597989205271006,
0.07778503000736237,
-0.09087871760129929,
-0.17342758178710938,
-0.3654462695121765,
0.050374045968055725,
-0.0964813381433487,
0.07883910089731216,
-0.22055049240589142,
-0.35548487305641174,
-0.0768037661910057,
-0.10403579473495483,
0.084958016872406,
0.2602372169494629,
0.03493789583444595,
0.10947071760892868,
-0.06641391664743423,
0.007908553816378117,
-0.1055682972073555,
-0.011287521570920944,
-0.054901476949453354,
-0.018232297152280807,
-0.06774721294641495,
-0.10994688421487808,
0.11119075864553452,
-0.06794460862874985,
-0.1458241194486618,
0.2932833433151245,
0.30545490980148315,
0.01049517747014761,
0.2610888183116913,
-0.3366708755493164,
0.3205259442329407,
0.26561349630355835,
0.10919270664453506,
0.14138326048851013,
0.13521969318389893,
-0.14872008562088013,
-0.007978755049407482,
-0.14445491135120392,
0.10775110870599747,
-0.05595918744802475,
0.09947914630174637,
-0.3269486725330353,
-0.22265511751174927,
0.011370654217898846,
0.1634674072265625,
-0.07189075648784637,
-0.0533236488699913,
-0.20888476073741913,
0.030513405799865723,
-0.24466891586780548,
-0.14427116513252258,
0.2540716230869293,
-0.16195116937160492,
-0.040951233357191086,
0.21960361301898956,
0.24535739421844482,
-0.15294887125492096,
-0.0203555915504694,
-0.1289595663547516,
0.06405191868543625,
-0.11351864784955978,
-0.22265206277370453,
-0.13562873005867004,
0.021729227155447006,
-0.026757195591926575,
-0.06506715714931488,
-0.2993773818016052,
0.34118136763572693,
0.2928285598754883,
-0.4674926698207855,
0.36405149102211,
-0.03580992668867111,
-0.5297796130180359,
0.10375615954399109,
0.28831732273101807,
0.17918862402439117,
-0.3330153226852417,
-0.07628228515386581,
0.13736256957054138,
0.4457567632198334,
-0.3457731604576111,
-0.23982030153274536,
0.0384848415851593,
-0.2787553668022156,
-0.11343997716903687,
0.040647201240062714,
-0.02063911035656929,
0.28023332357406616,
0.13139459490776062,
0.044404059648513794,
-0.10682828724384308,
-0.23518672585487366,
-0.08401411771774292,
-0.09773339331150055,
0.021259160712361336,
-0.18797293305397034,
-0.35255298018455505,
0.1837121695280075,
-0.19263236224651337,
0.13520753383636475,
-0.14883488416671753,
-0.5910386443138123,
-0.4669070839881897,
-0.017813919112086296,
-0.07207849621772766,
-0.29987308382987976,
0.2562519609928131,
0.513484001159668,
0.34738364815711975,
-0.33495962619781494,
-0.2619391977787018,
-0.03099897690117359,
0.22787919640541077,
-0.4249625504016876,
0.26963698863983154,
-0.2757171094417572,
0.24515977501869202,
-0.4805147349834442,
0.30138930678367615,
-0.2603015899658203,
0.14752914011478424,
0.33569538593292236,
0.01246427558362484,
0.28232434391975403,
-0.1591113954782486,
0.16882900893688202,
0.2961789071559906,
0.7336963415145874,
-0.18135812878608704,
0.4827881157398224,
0.22761423885822296,
-0.1731632649898529,
-0.3265116214752197,
-0.05523683503270149,
-0.3235335052013397,
0.03680090233683586,
-0.005347591359168291,
0.0301944762468338,
0.20009230077266693,
0.12921704351902008,
0.016486432403326035,
-0.11893068999052048,
-0.08897439390420914,
0.08161044120788574,
-0.03890157863497734,
0.36251524090766907,
-0.16915716230869293,
-0.5327692031860352,
0.003812295850366354,
-0.042476363480091095,
0.29025325179100037,
-0.33632758259773254,
-0.33341455459594727,
-0.04874623939394951,
-0.363212525844574,
0.14335879683494568,
-0.00045793032040819526,
0.076015904545784,
0.0567881315946579,
-0.20940105617046356,
0.1349378526210785,
-0.09093935787677765,
-0.24404674768447876,
-0.0030454176012426615,
-0.06039883941411972,
-0.36511197686195374,
0.25746259093284607,
0.03951794654130936,
-0.30087804794311523,
0.23868997395038605,
0.06107450649142265,
-0.05364682525396347,
-0.2343546748161316,
0.18600648641586304,
-0.38667556643486023,
-0.5275694727897644,
0.15266592800617218,
-0.2152460813522339,
-0.29949846863746643,
0.13523918390274048,
0.37732765078544617,
0.11052081733942032,
0.01519063115119934,
-0.16152998805046082,
0.007356519345194101,
-0.12506242096424103,
0.36261266469955444,
0.12565000355243683,
0.12910033762454987,
-0.18634778261184692,
0.8024652600288391,
-0.030264267697930336,
0.1990935057401657,
-0.08492029458284378,
0.10252656787633896,
0.5499791502952576,
-0.2724934220314026,
0.3819713294506073,
0.2563048005104065,
-0.007375814486294985,
-0.18704010546207428,
-0.29138320684432983,
0.005426785908639431,
0.06940294802188873,
0.2795657217502594,
-0.1660211980342865,
0.013393145985901356,
-0.16816970705986023,
-0.06716645509004593,
0.02353561669588089,
-0.25985342264175415,
-0.07489307969808578,
0.10269876569509506,
0.3665866255760193,
0.1438695788383484,
0.14731769263744354,
-0.039166226983070374,
0.933010458946228,
-0.128901407122612,
0.1011909618973732,
0.5463679432868958,
0.02790491282939911,
0.5242962837219238,
-0.0868242010474205,
0.07787266373634338,
-0.030340246856212616,
0.12882296741008759,
0.21946017444133759,
0.00512041337788105,
-0.217841237783432,
0.16543856263160706,
0.0009753525373525918,
-0.2837665379047394,
0.045069873332977295,
-0.7936960458755493,
0.09857317805290222,
0.014319037087261677,
0.1237047091126442,
0.18427637219429016,
0.032718684524297714,
0.1618633270263672,
0.1253560334444046,
0.25770869851112366,
-0.08728732913732529,
-0.049844205379486084,
-0.10388875007629395,
-0.17040051519870758,
-0.03488563746213913,
0.09304281324148178,
0.27295956015586853,
-0.00107865734025836,
0.3845215439796448,
-0.5175052881240845,
-0.3904353082180023,
0.40047627687454224,
0.3223964273929596,
0.2931654453277588,
-0.06195906177163124,
0.40045368671417236,
-0.2649886906147003,
-0.414246141910553,
-0.11464250832796097,
0.312883585691452,
-0.05329997465014458,
-0.3009721338748932,
-0.42547380924224854,
0.22695645689964294,
-0.15186263620853424,
-0.25229254364967346,
-0.304172545671463,
0.3371574282646179,
0.2655978798866272,
0.031408682465553284,
-0.03552635759115219,
0.11828732490539551,
-0.15871913731098175,
0.148545503616333,
0.14940223097801208,
-0.0035433017183095217,
-0.10593117773532867,
-0.23072057962417603,
0.3973429203033447,
-0.36596736311912537,
-0.09834008663892746,
0.055282436311244965,
-0.11557891964912415,
-0.16086231172084808,
0.6394660472869873,
0.08378347754478455,
0.27544185519218445,
-0.2339881956577301,
0.252119243144989,
0.32749882340431213,
-0.12940742075443268,
-0.07193299382925034,
0.31163209676742554,
-0.23476415872573853,
0.2394678145647049,
0.6787737607955933,
-0.0463525652885437,
0.2094297558069229,
0.1459677815437317,
0.051743265241384506,
-0.19003473222255707,
0.17207443714141846,
-0.20643141865730286,
0.03754587098956108,
-0.18569453060626984,
-0.09044542908668518,
0.17370106279850006,
-0.34136074781417847,
-0.3322838544845581,
0.1729268878698349,
-0.3554123640060425,
0.12739494442939758,
-0.30957943201065063,
-0.189002126455307,
0.023906279355287552,
0.07007492333650589,
0.23198217153549194,
-0.05436064675450325,
0.10483632981777191,
-0.2684357762336731,
-0.06575372070074081,
0.10773533582687378,
-0.11173827946186066,
-0.1411774903535843,
-0.07992403209209442,
0.08100532740354538,
-0.21478544175624847,
0.10644513368606567,
-0.2860257923603058,
0.14454631507396698,
0.032992735505104065,
0.01780889742076397,
-0.2686905264854431,
0.20504043996334076,
-0.3018803894519806,
0.02983488142490387,
0.07446102797985077,
0.29833275079727173,
-0.09945052117109299,
-0.09590177983045578,
0.23710308969020844,
-0.04556014761328697,
-0.046800512820482254,
-0.11588116735219955,
0.11196290701627731,
-0.04134441539645195,
0.4549117684364319,
-0.11305806040763855,
-0.09626542776823044,
-0.06761915236711502,
0.1494775265455246,
-0.3170185089111328,
0.0637216717004776,
0.2257438451051712,
0.04748010262846947,
0.3191731870174408,
-0.3401860296726227,
0.5257514715194702,
-0.25404226779937744,
0.2896060347557068,
0.16807709634304047,
0.20293974876403809,
-0.2130599170923233,
-0.3726028800010681,
0.2553754448890686,
0.21928410232067108,
-0.06227920949459076,
0.2908666133880615,
-0.20856228470802307,
0.01385966595262289,
-0.2916472852230072,
-0.03673586621880531,
0.14957261085510254,
-0.04931110888719559,
-0.03876116871833801,
-0.04415932297706604,
-0.10229882597923279,
0.24057933688163757,
0.08229423314332962,
0.19706545770168304,
0.15682576596736908,
-0.22493447363376617,
-0.08059658855199814,
0.09396754205226898,
0.30504515767097473,
-0.051993872970342636,
-0.23302561044692993,
0.1621362417936325,
-0.08415866643190384,
0.13044294714927673,
-0.15496903657913208,
0.23671825230121613,
-0.01668805442750454,
-0.10313272476196289,
-0.258096307516098,
-0.28159406781196594,
0.01798401027917862,
0.1750231236219406,
0.4750365912914276,
0.17195451259613037,
-0.053173236548900604,
0.3223503530025482,
-0.19106470048427582,
0.25240349769592285,
-0.1111682802438736,
0.3503051996231079,
0.04527553543448448,
0.08512771874666214,
0.2968771755695343,
0.10287409275770187,
-0.1143232211470604,
0.5362250208854675,
0.33709779381752014,
-0.04292881861329079,
-0.004763249307870865,
-0.07130268961191177,
0.22077947854995728,
0.20420324802398682,
-0.13522467017173767,
-0.5538714528083801,
0.23537226021289825,
0.6830418705940247,
0.4361433982849121,
0.015939811244606972,
0.16868066787719727,
-0.30401110649108887,
0.22451002895832062,
-0.34156590700149536,
-0.14572109282016754,
0.10102599859237671,
-0.15468312799930573,
-0.1576014757156372,
-0.30955269932746887,
-0.3871440887451172,
-0.011430799961090088,
-0.6210927963256836,
-0.05162093788385391,
-0.3488348126411438,
0.40852758288383484,
-0.009520968422293663,
-0.1916106641292572,
0.07985754311084747,
-0.2794196307659149,
-0.003180250059813261,
0.2444181740283966,
0.24809041619300842,
0.01646297238767147,
-0.6992968320846558,
-0.05207626149058342,
0.4790790379047394,
0.007513261865824461,
-0.4501379430294037,
-0.19882698357105255,
0.004328817129135132,
0.2815951704978943,
-0.12505079805850983,
0.08586468547582626,
0.04767975956201553,
-0.14145974814891815,
0.10191191732883453,
-0.4009758532047272,
0.06335149705410004,
0.4204188585281372,
0.02800455316901207,
-0.07805389165878296,
-0.15427038073539734,
0.13327893614768982,
-0.01915694959461689,
0.1848919838666916,
-0.01733226329088211,
-0.20768162608146667,
-0.2887800335884094,
1.0519698858261108,
0.2024601399898529,
0.22619839012622833,
0.255233496427536,
-0.11739284545183182,
-0.2706631124019623,
-0.08037133514881134,
-0.19211535155773163,
0.2868505120277405,
-0.1207347959280014,
0.09814818948507309,
0.013261085376143456,
-0.23818998038768768,
0.33950483798980713,
-0.036649998277425766,
0.42413467168807983,
0.03547303006052971,
-0.22226694226264954,
-0.24843959510326385,
0.006309633143246174,
-0.2963808476924896,
-0.18361617624759674,
0.3888108730316162,
0.29017531871795654,
0.19455325603485107,
-0.5578800439834595,
-0.22550994157791138,
-0.2887541949748993,
0.31612834334373474,
-0.20929019153118134,
-0.04715358093380928,
-0.12241626530885696,
-0.0028456682339310646,
0.1264408379793167,
0.23206838965415955,
-0.424051433801651,
-0.07507926225662231,
0.21182318031787872,
0.04491279646754265,
-0.028475843369960785,
-0.26303139328956604,
0.11078044772148132,
-0.0735793337225914,
-0.09178011119365692,
0.07494820654392242,
0.26044756174087524,
0.07806357741355896,
-0.2378123551607132,
0.13879628479480743
] |
https://github.com/huggingface/datasets/issues/3167
|
bookcorpusopen no longer works
|
I tried with the latest changes from #3280 on google colab and it worked fine :)
We'll do a new release soon, in the meantime you can use the updated version with:
```python
load_dataset("bookcorpusopen", revision="master")
```
|
## Describe the bug
When using the latest version of datasets (1.14.0), I cannot use the `bookcorpusopen` dataset. The process blocks always around `9924 examples [00:06, 1439.61 examples/s]` when preparing the dataset. I also noticed that after half an hour the process is automatically killed because of the RAM usage (the machine has 1TB of RAM...).
This did not happen with 1.4.1.
I tried also `rm -rf ~/.cache/huggingface` but did not help.
Changing python version between 3.7, 3.8 and 3.9 did not help too.
## Steps to reproduce the bug
```python
import datasets
d = datasets.load_dataset('bookcorpusopen')
```
## Expected results
A clear and concise description of the expected results.
## Actual results
Specify the actual results or traceback.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 1.14.0
- Platform: Linux-5.4.0-1054-aws-x86_64-with-glibc2.27
- Python version: 3.9.7
- PyArrow version: 4.0.1
| 36 |
bookcorpusopen no longer works
|
[
-0.09987454116344452,
0.09769969433546066,
-0.13574285805225372,
-0.09587617963552475,
-0.17643794417381287,
-0.25283029675483704,
0.360993355512619,
0.026390796527266502,
-0.33866357803344727,
0.03989918902516365,
-0.31808096170425415,
0.1168975904583931,
0.29148629307746887,
0.3014635443687439,
0.01372091006487608,
0.26916956901550293,
0.07505171746015549,
0.15623852610588074,
0.15661580860614777,
0.0230385921895504,
-0.34107065200805664,
0.3335014283657074,
-0.22848525643348694,
0.15303680300712585,
0.23154094815254211,
0.14881350100040436,
-0.06434108316898346,
0.12408379465341568,
-0.05212629958987236,
-0.1103401929140091,
0.48265135288238525,
0.3122454881668091,
-0.12314304709434509,
0.37232068181037903,
-0.00011346700193826109,
-0.0028207111172378063,
0.21742425858974457,
-0.04863788187503815,
-0.262957364320755,
0.21421003341674805,
-0.2313021719455719,
-0.06120022013783455,
0.08114642649888992,
-0.243315652012825,
-0.04548688232898712,
0.2811598777770996,
0.3000732958316803,
0.21045590937137604,
-0.16014230251312256,
0.14423131942749023,
0.2681618630886078,
0.2852844297885895,
0.5658171772956848,
-0.14321327209472656,
0.21581228077411652,
0.01720421575009823,
-0.40414339303970337,
0.21350201964378357,
0.7361765503883362,
-0.08759763836860657,
0.17862378060817719,
-0.08113719522953033,
-0.024687280878424644,
0.018041592091321945,
-0.02769831381738186,
-0.04574335739016533,
0.6126064658164978,
-0.0027122171595692635,
0.31931355595588684,
-0.16933673620224,
0.25893014669418335,
-0.20445780456066132,
-0.0213751420378685,
0.16493292152881622,
-0.03321482613682747,
-0.17684078216552734,
0.3238747715950012,
0.2039039582014084,
0.1888657510280609,
0.07623736560344696,
-0.0530242919921875,
-0.41644513607025146,
0.025846315547823906,
0.09627902507781982,
-0.1113547533750534,
0.5146300196647644,
-0.10466627031564713,
-0.023323066532611847,
0.49108847975730896,
0.12692704796791077,
-0.0987481102347374,
0.2910628914833069,
-0.21960175037384033,
-0.029870886355638504,
0.4965578317642212,
-0.11395623534917831,
0.1481010764837265,
0.569542646408081,
-0.3216041326522827,
-0.014283190481364727,
0.06461730599403381,
0.4082624912261963,
-0.01829461008310318,
0.059337127953767776,
0.05468384176492691,
-0.10816781967878342,
0.39410603046417236,
0.3715471923351288,
0.21234667301177979,
0.8039329648017883,
0.019236382097005844,
-0.006059003062546253,
0.005561180878430605,
-0.09780540317296982,
0.08006176352500916,
-0.3504902720451355,
0.17162500321865082,
-0.43183624744415283,
-0.014434660784900188,
0.15665499866008759,
0.08614865690469742,
-0.025115692988038063,
0.05294805392622948,
-0.07855215668678284,
-0.17744092643260956,
0.00888692494481802,
0.4299160838127136,
-0.18772853910923004,
-0.1856975555419922,
-0.03203733637928963,
-0.11249126493930817,
0.018754631280899048,
-0.34859123826026917,
0.08793863654136658,
0.19433702528476715,
-0.2141345590353012,
0.07497036457061768,
-0.09306036680936813,
-0.25150376558303833,
-0.1824759691953659,
-0.1425444781780243,
-0.0828603208065033,
-0.21548053622245789,
-0.05951939895749092,
0.06071760877966881,
-0.06371936202049255,
-0.1038324311375618,
-0.2361946552991867,
0.11782549321651459,
0.06251391768455505,
-0.22741542756557465,
-0.11729703098535538,
-0.26470473408699036,
0.23806990683078766,
0.09822232276201248,
0.044266171753406525,
0.01949121057987213,
-0.2061951607465744,
0.22613699734210968,
-0.3355056047439575,
0.17357078194618225,
-0.07676135003566742,
-0.09202371537685394,
0.2551935613155365,
-0.16210338473320007,
0.258105993270874,
-0.052167657762765884,
-0.30526983737945557,
-0.1311958134174347,
-0.26107752323150635,
0.05747352913022041,
-0.2289000004529953,
-0.19760756194591522,
-0.08577346801757812,
-0.15217325091362,
-0.2740001380443573,
0.04550163820385933,
-0.2658909857273102,
-0.5045168399810791,
0.016412733122706413,
-0.04250531271100044,
-0.07487691938877106,
-0.32921287417411804,
-0.203868567943573,
-0.2758006453514099,
-0.018186446279287338,
0.22829970717430115,
-0.28885605931282043,
0.32116830348968506,
-0.12803609669208527,
-0.2831801772117615,
-0.23257464170455933,
-0.03430706262588501,
0.28841426968574524,
0.4671954810619354,
0.009744568727910519,
-0.08834333717823029,
0.12790732085704803,
0.2532210946083069,
0.24180378019809723,
-0.004931565374135971,
0.4183441698551178,
0.4807695746421814,
0.0808766707777977,
0.07004477083683014,
0.17172037065029144,
0.4113021790981293,
0.0803794115781784,
-0.5649915933609009,
0.20600463449954987,
0.4291349947452545,
0.0854310467839241,
-0.28207188844680786,
-0.12769407033920288,
-0.14739041030406952,
-0.09050469100475311,
0.20283842086791992,
0.38772284984588623,
-0.046561677008867264,
0.13802632689476013,
0.052806783467531204,
0.09947969764471054,
0.15863418579101562,
0.13340680301189423,
-0.2621845602989197,
-0.09293510019779205,
-0.26426592469215393,
-0.3054669201374054,
-0.14664947986602783,
0.15355834364891052,
0.28800150752067566,
0.12325026094913483,
0.14314529299736023,
0.2418067455291748,
-0.3545406758785248,
-0.011804858222603798,
-0.050830379128456116,
-0.019100701436400414,
0.10552068054676056,
-0.1653171330690384,
-0.11782553046941757,
0.1984022855758667,
0.2086091935634613,
0.15005572140216827,
-0.017075425013899803,
0.29557910561561584,
0.6090545058250427,
-0.11920571327209473,
0.16371102631092072,
-0.06858537346124649,
-0.0944877341389656,
-0.3065319359302521,
-0.03366508334875107,
0.011508769355714321,
0.213018536567688,
-0.2826739549636841,
-0.11310505867004395,
0.0685921311378479,
0.0027988548390567303,
0.01650083065032959,
0.029144855216145515,
0.10382413119077682,
0.23008684813976288,
-0.06729718297719955,
-0.018810098990797997,
0.11136200278997421,
0.17193472385406494,
-0.22224728763103485,
0.1338813751935959,
0.129400834441185,
-0.12902115285396576,
0.024674925953149796,
-0.16312703490257263,
-0.34852826595306396,
0.22897017002105713,
0.08718498051166534,
-0.12685127556324005,
-0.04475099965929985,
0.2736378610134125,
-0.002167033962905407,
-0.3290162682533264,
-0.1294311285018921,
-0.2234654575586319,
-0.017954746261239052,
0.038479678332805634,
0.09385809302330017,
-0.18752095103263855,
-0.2487173229455948,
0.05226442962884903,
0.3240484893321991,
-0.0001760041923262179,
-0.24270839989185333,
0.15206994116306305,
0.6044347286224365,
0.2680899202823639,
-0.06944165378808975,
-0.18367363512516022,
0.28958168625831604,
-0.4034987688064575,
-0.04058023542165756,
0.058083366602659225,
0.17219246923923492,
-0.4256916642189026,
0.17032985389232635,
0.01761770248413086,
-0.35648348927497864,
-0.14616426825523376,
-0.5891464948654175,
-0.2621590793132782,
-0.4705197811126709,
-0.11676985770463943,
0.056624796241521835,
0.2713939845561981,
-0.12409938871860504,
-0.057939380407333374,
-0.42394664883613586,
-0.5468297004699707,
-0.13844402134418488,
0.07275117188692093,
-0.12673701345920563,
0.016792932525277138,
0.09923585504293442,
-0.050502896308898926,
-0.21845634281635284,
-0.2562657296657562,
0.08911126852035522,
0.04115886241197586,
-0.06827126443386078,
0.2438076287508011,
0.23499855399131775,
0.02360905148088932,
0.49452847242355347,
-0.14527654647827148,
0.1329590380191803,
0.35612136125564575,
0.04927521198987961,
-0.14624431729316711,
0.14630115032196045,
0.2978088855743408,
-0.027971966192126274,
-0.03510196879506111,
0.12413190305233002,
0.015242371708154678,
0.10797275602817535,
-0.07268057763576508,
-0.555813729763031,
-0.12294032424688339,
0.01631995290517807,
-0.14990834891796112,
0.03819311410188675,
0.125131756067276,
0.2694113850593567,
0.08870291709899902,
-0.2967040538787842,
0.12585417926311493,
-0.35660290718078613,
-0.03387227654457092,
0.4493791162967682,
0.41452130675315857,
-0.3097056448459625,
-0.4493827819824219,
-0.0800856426358223,
0.07877867668867111,
-0.2511211335659027,
0.11094799637794495,
0.5346106290817261,
0.09703080356121063,
0.41591960191726685,
0.021024202927947044,
-0.3457057476043701,
-0.016470152884721756,
0.007739400491118431,
0.016995031386613846,
0.17947499454021454,
0.017110159620642662,
-0.5869643092155457,
-0.2882596254348755,
-0.1464257836341858,
-0.4900512099266052,
-0.4160236120223999,
-0.37437960505485535,
0.2697232663631439,
0.29461583495140076,
0.07600566744804382,
0.24625490605831146,
0.16191573441028595,
-0.1013542115688324,
0.1276329755783081,
0.12938424944877625,
-0.16513681411743164,
-0.23014956712722778,
0.21050004661083221,
0.06248246133327484,
-0.2552196681499481,
0.26136183738708496,
-0.3353215157985687,
0.2517939805984497,
-0.4499421715736389,
-0.23231329023838043,
0.030801953747868538,
-0.31398001313209534,
0.2367042899131775,
0.13275538384914398,
0.054500773549079895,
0.3478938937187195,
-0.007680049166083336,
-0.18913018703460693,
-0.3908618092536926,
-0.05795159935951233,
0.42306995391845703,
0.1004205048084259,
0.241390198469162,
-0.09191781282424927,
0.34395796060562134,
0.280358225107193,
-0.16822075843811035,
0.08521373569965363,
0.35958579182624817,
-0.24531258642673492,
-0.5342308282852173,
-0.17209212481975555,
0.293434739112854,
-0.21455170214176178,
0.17360517382621765,
-0.09001605212688446,
-0.038493409752845764,
0.19671370089054108,
-0.16399654746055603,
0.24134881794452667,
-0.019993001595139503,
0.0830342248082161,
0.06598202139139175,
0.055414263159036636,
-0.17980337142944336,
-0.14810214936733246,
0.20278607308864594,
0.11100208014249802,
0.24565745890140533,
0.2109101414680481,
0.3940049409866333,
-0.013329795561730862,
-0.16541022062301636,
0.5924582481384277,
0.35356605052948,
0.07573805749416351,
0.19711169600486755,
0.054780054837465286,
0.3188553750514984,
-0.21657489240169525,
0.03597214072942734,
-0.19381144642829895,
-0.5037906765937805,
0.14715760946273804,
-0.2340850532054901,
-0.008894680999219418,
0.17820735275745392,
-0.11138005554676056,
0.20106719434261322,
-0.09612207114696503,
-0.14637044072151184,
-0.2829461991786957,
1.044914722442627,
0.06012575700879097,
-0.04834222048521042,
0.05343480035662651,
-0.08535922318696976,
-0.2843558192253113,
-0.29155847430229187,
0.3518860340118408,
-0.0788780152797699,
0.03891836106777191,
-0.05418917536735535,
0.16285528242588043,
0.17130126059055328,
-0.17745676636695862,
-0.3181142508983612,
0.2732383906841278,
-0.12954363226890564,
-0.1482357680797577,
0.07511600106954575,
-0.32876071333885193,
-0.6176078915596008,
0.10893286019563675,
-0.07450272887945175,
0.2600097060203552,
0.11605120450258255,
0.42709678411483765,
-0.23103874921798706,
0.057170722633600235,
0.027516460046172142,
0.05346992239356041,
-0.26083120703697205,
0.3373556435108185,
-0.0853235274553299,
-0.053196802735328674,
0.49514177441596985,
0.02191287651658058,
-0.05836282670497894,
-0.15104550123214722,
0.19482606649398804,
0.31515905261039734,
-0.29251059889793396,
0.26194530725479126,
0.12471029907464981,
-0.22819876670837402,
-0.04387590289115906,
0.11067516356706619,
-0.024986516684293747,
0.008367547765374184,
-0.21665441989898682,
-0.07703076303005219,
0.059647440910339355,
-0.16405677795410156,
0.07093853503465652,
0.30394986271858215,
0.45522332191467285,
-0.14795424044132233,
0.15588748455047607,
0.15785783529281616,
-0.14493656158447266,
-0.33500388264656067,
0.21235039830207825,
-0.16786886751651764,
0.00485969940200448,
-0.09932482987642288,
0.0371512807905674,
-0.06327248364686966,
-0.1289592832326889,
0.4583868980407715,
-0.05246759578585625,
-0.21282245218753815,
-0.041160330176353455,
0.1055709570646286,
-0.04981989786028862,
-0.30484119057655334,
-0.06799570471048355,
0.12913691997528076,
-0.16068555414676666,
0.12409313023090363,
0.03041272796690464,
-0.17507916688919067,
0.20468935370445251,
0.32398465275764465,
-0.1428673416376114,
0.14078250527381897,
-0.17520096898078918,
-0.02107609622180462,
0.04934185370802879,
0.10505528748035431,
0.1924053430557251,
0.054284095764160156,
0.5301764011383057,
-0.04584639146924019,
0.26537200808525085,
-0.2975563704967499,
-0.354114294052124,
0.33414551615715027,
-0.4259471297264099,
0.026522668078541756,
0.2022465467453003,
-0.17420406639575958,
-0.3021477162837982,
-0.29762670397758484,
0.19015271961688995,
0.36876457929611206,
0.02069811150431633,
-0.2957955300807953,
-0.09052774310112,
0.09541604667901993,
0.17247359454631805,
-0.27923956513404846,
-0.1300095170736313,
-0.1275538206100464,
-0.06700146943330765,
0.1998344361782074,
-0.27399593591690063,
0.09806185215711594,
0.10708080977201462,
-0.10244095325469971,
0.1542006880044937,
0.10650861263275146,
-0.04034927487373352,
-0.15515077114105225,
-0.06390415877103806,
0.2286982536315918,
-0.01914842799305916,
-0.07998152077198029,
-0.03149176761507988,
0.11455333232879639,
-0.15787377953529358,
0.2669861614704132,
0.17267033457756042,
0.4289240837097168,
0.23785150051116943,
-0.13203752040863037,
-0.01882166415452957,
-0.01759226992726326,
0.0013514439342543483,
0.05913158506155014,
-0.14048421382904053,
-0.19162671267986298,
0.19612781703472137,
0.26875993609428406,
-0.1347760111093521,
-0.342083215713501,
0.38273441791534424,
-0.19420601427555084,
-0.10434973239898682,
0.2260032594203949,
0.13396602869033813,
-0.17959758639335632,
0.4471926689147949,
0.48057714104652405,
-0.005602105055004358,
0.10770049691200256,
0.27064359188079834,
0.12977586686611176,
0.037119071930646896,
-0.06339845061302185,
0.13856472074985504,
-0.28522998094558716,
0.08596005290746689,
0.08982240408658981,
-0.031319085508584976,
0.0675562173128128,
0.21340548992156982,
0.6030862927436829,
0.021794086322188377,
-0.18005087971687317,
-0.04584244638681412,
-0.07033488899469376,
0.3535860776901245,
0.28065159916877747,
0.024176981300115585,
0.2976485788822174,
-0.7643008232116699,
-0.04009552672505379,
-0.4129231870174408,
0.05425190553069115,
-0.40556302666664124,
0.02316313236951828,
0.1731068193912506,
-0.3231702446937561,
-0.2485101968050003,
0.11128801852464676,
0.043519195169210434,
0.3005170226097107,
0.07331880182027817,
-0.34360960125923157,
-0.2866784632205963,
-0.34599506855010986,
0.05986255779862404,
0.11463876068592072,
0.5521101951599121,
-0.0277984868735075,
0.05567316710948944,
-0.3322710394859314,
-0.007971691899001598,
-0.3677736222743988,
0.47489237785339355,
0.06818735599517822,
-0.08076044917106628,
0.11436539888381958,
-0.20788997411727905,
0.22814129292964935,
-0.00035562549601309,
-0.20347045361995697,
0.14864219725131989,
0.32483917474746704,
0.25016337633132935,
-0.23864324390888214,
0.19867420196533203,
-0.22705423831939697,
0.3239646255970001,
-0.17358878254890442,
0.36096373200416565,
-0.07234837114810944,
-0.012370090000331402,
-0.09671051800251007,
-0.24843327701091766,
-0.1259554773569107,
-0.050177671015262604,
-0.12191744148731232,
0.1041010245680809,
0.013848881237208843,
0.10333254933357239,
0.08675969392061234,
-0.2703815698623657,
0.1007411926984787,
0.17095571756362915,
-0.02760467864573002,
0.26542606949806213,
-0.19043999910354614,
-0.03102700784802437,
-0.1876891553401947,
-0.05905800312757492,
0.28096938133239746,
0.0957401767373085,
-0.0338132344186306,
0.04572537541389465,
-0.12253668904304504,
0.03867446258664131,
0.02876749075949192,
0.13452979922294617,
-0.10665301233530045,
0.3255310356616974,
-0.24962738156318665,
-0.21260735392570496,
0.09546120464801788,
0.3373408615589142,
-0.016040746122598648,
0.08747033029794693,
-0.40370962023735046,
0.27293381094932556,
-0.1909349262714386,
0.14114312827587128,
-0.1277499794960022,
-0.681961715221405,
-0.026286154985427856,
0.043819647282361984,
0.5797747373580933,
-0.2118111401796341,
-0.3890778124332428,
-0.25169050693511963,
-0.08974409848451614,
-0.0547395721077919,
-0.0752226933836937,
0.3175245523452759,
-0.1517946422100067,
-0.09763853251934052,
0.24284498393535614,
-0.00015605210501234978,
0.307939350605011,
0.007444953545928001,
0.47126901149749756,
0.3465690612792969,
0.6422587037086487,
0.08771120756864548,
-0.06891738623380661,
-0.1587039679288864,
-0.22903503477573395,
0.004328629933297634,
0.3074928820133209,
-0.0866922065615654,
-0.17391528189182281,
-0.28262779116630554,
-0.2271193116903305,
0.05645914003252983,
0.3985993564128876,
-0.33080464601516724,
-0.1989905834197998,
0.2680402994155884,
-0.026261301711201668,
-0.21680332720279694,
-0.41584721207618713,
-0.2256106734275818,
-0.015217986889183521,
0.1294770985841751,
-0.37425389885902405,
0.06682255119085312,
-0.3589484393596649,
-0.11106868088245392,
0.007187599316239357,
0.3712320625782013,
0.08228602260351181,
-0.27334463596343994,
0.10001878440380096,
0.13767428696155548
] |
https://github.com/huggingface/datasets/issues/3164
|
Add raw data files to the Hub with GitHub LFS for canonical dataset
|
Hi @zlucia, I would actually suggest hosting the dataset as a huggingface.co-hosted dataset.
The only difference with a "canonical"/legacy dataset is that it's nested under an organization (here `stanford` or `stanfordnlp` for instance – completely up to you) but then you can upload your data using git-lfs (unlike "canonical" datasets where we don't host the data)
Let me know if this fits your use case!
cc'ing @osanseviero @lhoestq and rest of the team 🤗
|
I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks!
| 74 |
Add raw data files to the Hub with GitHub LFS for canonical dataset
|
[
-0.48958703875541687,
0.07953398674726486,
-0.16216041147708893,
-0.1511349081993103,
0.04632984846830368,
0.16339248418807983,
0.04887048527598381,
0.43567919731140137,
0.32130295038223267,
0.04065380617976189,
-0.2753499150276184,
0.19790074229240417,
-0.11198823899030685,
0.3272015452384949,
-0.03279931843280792,
0.47618821263313293,
0.03704698011279106,
0.24368223547935486,
-0.12880320847034454,
-0.3449605107307434,
-0.0154115604236722,
0.12157472968101501,
0.32542699575424194,
-0.2521155774593353,
-0.4234122931957245,
0.2633834481239319,
0.07717408984899521,
0.44734203815460205,
-0.27577078342437744,
0.0018560349708423018,
0.0776689350605011,
0.39424929022789,
0.035683032125234604,
0.2166406810283661,
-0.00010823534830706194,
0.14913906157016754,
0.2719777524471283,
-0.21213489770889282,
-0.32525357604026794,
-0.14872722327709198,
-0.1932079941034317,
-0.06934709846973419,
-0.11937396228313446,
-0.056822750717401505,
-0.33355775475502014,
-0.06638634949922562,
0.19511038064956665,
0.015551632270216942,
0.05812068283557892,
0.02492806315422058,
0.19451256096363068,
-0.038052674382925034,
0.10501178354024887,
-0.05182281509041786,
0.37558984756469727,
0.47104042768478394,
-0.042534343898296356,
0.21962760388851166,
0.2528853714466095,
0.137750506401062,
-0.16332097351551056,
0.13409583270549774,
0.37919139862060547,
-0.09099729359149933,
0.1113976389169693,
0.009115519002079964,
-0.43342146277427673,
-0.07046603411436081,
-0.027413755655288696,
0.11356217414140701,
0.2049928605556488,
-0.31474602222442627,
-0.38382601737976074,
-0.09797660261392593,
-0.09158017486333847,
-0.36859849095344543,
-0.12002280354499817,
0.40383148193359375,
-0.1028389036655426,
0.07171329110860825,
-0.1563069373369217,
-0.6794007420539856,
-0.13428162038326263,
0.029011089354753494,
0.11687400937080383,
0.29296913743019104,
0.050898175686597824,
-0.017704861238598824,
-0.15721923112869263,
0.1585189253091812,
-0.09394360333681107,
-0.18242433667182922,
-0.13224631547927856,
-0.04071184620261192,
0.19452360272407532,
-0.35640642046928406,
0.1274111419916153,
-0.005775093100965023,
0.22881802916526794,
0.0675378069281578,
0.001497529330663383,
0.14789262413978577,
-0.3272608518600464,
-0.16984078288078308,
0.1655820906162262,
-0.06548503041267395,
0.10444892197847366,
0.20475707948207855,
0.40753939747810364,
0.10197624564170837,
-0.09587354212999344,
0.08826650679111481,
-0.08654792606830597,
0.051099278032779694,
-0.7113354802131653,
0.16925305128097534,
0.10097885876893997,
-0.056889746338129044,
0.2503798305988312,
-0.10179977864027023,
0.3707951605319977,
0.19016306102275848,
-0.06496260315179825,
0.19321036338806152,
0.07295498996973038,
-0.25994929671287537,
-0.22601807117462158,
0.274126797914505,
0.08275126665830612,
-0.04249325022101402,
-0.23601077497005463,
0.2667434513568878,
0.16854523122310638,
-0.09487637877464294,
0.10774674266576767,
-0.22943629324436188,
0.32345452904701233,
-0.03657284379005432,
0.3232366740703583,
-0.06540440022945404,
0.053403280675411224,
-0.05366097390651703,
0.04262395575642586,
0.1910463124513626,
0.3657356798648834,
0.03790855035185814,
0.09553506225347519,
-0.3825410008430481,
-0.18531128764152527,
-0.02648736909031868,
-0.32854899764060974,
-0.3666478097438812,
-0.41306114196777344,
0.1371539831161499,
-0.22607271373271942,
0.1918373554944992,
-0.5411189794540405,
-0.015342318452894688,
-0.25904205441474915,
0.0743541419506073,
-0.055286601185798645,
0.10006479918956757,
0.17849084734916687,
-0.005166511982679367,
0.025285962969064713,
0.1358124017715454,
-0.059672191739082336,
0.20570741593837738,
0.18285295367240906,
0.07134803384542465,
-0.09553302079439163,
0.08907628804445267,
-0.16643735766410828,
0.32556718587875366,
-0.2719475328922272,
0.49356648325920105,
0.5352636575698853,
-0.653717577457428,
-0.25792762637138367,
0.1428338885307312,
0.11311320960521698,
-0.23642899096012115,
-0.03894784674048424,
0.25401419401168823,
0.18931573629379272,
-0.24088992178440094,
-0.014928964897990227,
0.24667903780937195,
0.03225526213645935,
0.013794908300042152,
-0.18581734597682953,
-0.28218168020248413,
-0.4722834825515747,
0.2459973841905594,
0.0926138237118721,
0.08424167335033417,
0.5566318035125732,
0.10033155232667923,
0.3443811535835266,
-0.3638673424720764,
0.2471599131822586,
0.21442222595214844,
0.3967769742012024,
-0.06896331161260605,
-0.05360760539770126,
0.18505887687206268,
-0.1593264490365982,
0.08899043500423431,
-0.031171578913927078,
0.28584176301956177,
-0.2491072118282318,
-0.2584826946258545,
-0.1670587956905365,
-0.12034331262111664,
-0.13655947148799896,
0.04878092557191849,
0.23520494997501373,
0.04870031774044037,
-0.04272396117448807,
-0.04155762121081352,
-0.021161938086152077,
0.0969562828540802,
-0.33721548318862915,
0.01594686135649681,
-0.1961226761341095,
0.543633222579956,
-0.00739901140332222,
-0.37957584857940674,
0.266194611787796,
0.0853269025683403,
-0.06320000439882278,
-0.38096827268600464,
0.06870000064373016,
0.11111950874328613,
0.05495155230164528,
0.4623626470565796,
0.778207540512085,
0.4164116382598877,
0.2530891001224518,
0.08005905151367188,
-0.1327771544456482,
0.06419326364994049,
-0.022446297109127045,
0.20654591917991638,
-0.5220535397529602,
0.3402814567089081,
-0.13734063506126404,
-0.36767879128456116,
0.025651535019278526,
-0.043036483228206635,
0.31665101647377014,
0.021991567686200142,
-0.09196575731039047,
-0.16559290885925293,
-0.01316510234028101,
0.49560219049453735,
-0.0506197065114975,
-0.16571401059627533,
0.09671650826931,
0.03805266693234444,
0.44210341572761536,
-0.02663746103644371,
0.1630079746246338,
0.13267302513122559,
-0.09473671019077301,
-0.17524948716163635,
0.45486170053482056,
0.06930545717477798,
0.07678301632404327,
0.18610858917236328,
0.22196592390537262,
0.1923317313194275,
0.036634255200624466,
-0.07403841614723206,
0.0637761726975441,
-0.306702584028244,
-0.0496358796954155,
0.3314918875694275,
0.2267780303955078,
-0.2191908061504364,
-0.44823312759399414,
-0.007805227302014828,
0.012782280333340168,
0.14194469153881073,
0.071670301258564,
-0.3867434561252594,
-0.02078944630920887,
0.2831147015094757,
0.3148377239704132,
-0.1622208207845688,
-0.04910912364721298,
-0.3215380907058716,
0.32056429982185364,
0.519679605960846,
-0.2756122946739197,
-0.026692677289247513,
0.44984614849090576,
0.14961828291416168,
0.1645585596561432,
0.08432501554489136,
-0.15178224444389343,
-0.2726712226867676,
0.18800783157348633,
0.17447689175605774,
0.09650026261806488,
-0.05098526179790497,
0.09819464385509491,
-0.2692071795463562,
0.3181174397468567,
-0.5129840970039368,
-0.09856320917606354,
0.1250234693288803,
-0.0869491770863533,
0.30326399207115173,
0.02741297148168087,
0.11302362382411957,
0.19598166644573212,
-0.008915041573345661,
-0.11537224054336548,
-0.008136780001223087,
-0.032989755272865295,
-0.3803657293319702,
-0.11388737708330154,
-0.10709778964519501,
-0.14562954008579254,
0.06525226682424545,
-0.10566575825214386,
-0.40075764060020447,
0.12775377929210663,
0.3993970453739166,
0.14706775546073914,
-0.10062526166439056,
0.14960089325904846,
-0.14895524084568024,
0.16479910910129547,
-0.3889274299144745,
-0.23564061522483826,
-0.30199170112609863,
0.37060222029685974,
-0.45452335476875305,
-0.4127686619758606,
-0.029890665784478188,
-0.07953893393278122,
0.17481468617916107,
0.215249702334404,
-0.39471858739852905,
-0.4601593315601349,
0.2511852979660034,
0.18909862637519836,
0.07696294039487839,
0.05969534069299698,
0.2687973082065582,
-0.024355677887797356,
-0.05470728129148483,
-0.1776570975780487,
0.13735632598400116,
0.09991248697042465,
0.6225721836090088,
-0.1948261857032776,
-0.19323725998401642,
-0.22323372960090637,
0.19042262434959412,
0.6167952418327332,
0.13611748814582825,
-0.0012790337204933167,
0.26502734422683716,
-0.21708965301513672,
0.330487996339798,
-0.22513234615325928,
0.27074921131134033,
0.11411550641059875,
0.07521341741085052,
0.05132288858294487,
0.5401803851127625,
0.3443281352519989,
-0.04796150326728821,
0.13554318249225616,
-0.15345562994480133,
-0.2649429738521576,
-0.28244858980178833,
-0.15181326866149902,
-0.051736146211624146,
-0.23931542038917542,
0.011249518021941185,
-0.2183775156736374,
-0.409953773021698,
-0.26660487055778503,
0.2409512996673584,
0.35228338837623596,
0.15854650735855103,
0.1140439361333847,
-0.10058426856994629,
-0.24288929998874664,
-0.17178452014923096,
0.14297063648700714,
0.18242403864860535,
-0.20906990766525269,
-0.07807638496160507,
-0.09160315245389938,
-0.11373179405927658,
-0.12215759605169296,
0.29393303394317627,
-0.41281458735466003,
0.1832922101020813,
-0.22473976016044617,
0.05922228470444679,
-0.14079564809799194,
-0.00640116585418582,
0.004989866632968187,
0.5345301032066345,
0.08326870948076248,
0.7244856357574463,
-0.15974408388137817,
0.005113341845571995,
-0.3226211667060852,
-0.06695128232240677,
-0.005045493133366108,
0.2071966975927353,
0.045454688370227814,
-0.30224066972732544,
-0.5419788956642151,
-0.20774666965007782,
0.21574866771697998,
0.021830646321177483,
-0.04429500922560692,
-0.12268999218940735,
-0.08348395675420761,
-0.11044090241193771,
-0.043467193841934204,
0.09441926330327988,
0.08436419069766998,
0.37800663709640503,
-0.23820531368255615,
-0.2517187297344208,
0.072516068816185,
-0.090412937104702,
0.4885214865207672,
0.235321044921875,
0.14895004034042358,
0.10359946638345718,
-0.5173063278198242,
-0.18280412256717682,
0.2504902780056,
0.1836112141609192,
-0.12954898178577423,
-0.5225884914398193,
-0.055845919996500015,
-0.4328092932701111,
0.47941455245018005,
-0.1642431616783142,
-0.0674779936671257,
-0.2286088615655899,
0.12491775304079056,
0.29254308342933655,
-0.2896181344985962,
-0.1287364810705185,
0.6162512898445129,
0.05830496549606323,
-0.31389370560646057,
0.3073955178260803,
0.003101895097643137,
0.4211294949054718,
0.08260001242160797,
0.23293299973011017,
0.012500705197453499,
-0.19018931686878204,
0.4063863456249237,
-0.4663470983505249,
0.017846781760454178,
-0.1549227386713028,
-0.06022350862622261,
-0.09730357676744461,
0.13460224866867065,
0.0014441254315897822,
0.1069517657160759,
0.10319606214761734,
0.030807772651314735,
0.43767982721328735,
0.20346443355083466,
-0.1855935901403427,
0.39860495924949646,
-0.028911646455526352,
-0.06798325479030609,
0.04418167099356651,
0.2103213220834732,
0.06859572231769562,
0.24763259291648865,
-0.100713811814785,
-0.17880786955356598,
-0.4453536570072174,
0.060427259653806686,
-0.017783012241125107,
-0.022406000643968582,
0.42378175258636475,
0.19278986752033234,
0.03230086341500282,
-0.2827422022819519,
-0.4780552089214325,
0.06233290582895279,
0.48758798837661743,
0.20626959204673767,
-0.3628760874271393,
0.15386097133159637,
-0.08182062953710556,
0.03237874060869217,
-0.0897984430193901,
0.09923820942640305,
-0.1414393186569214,
-0.20684951543807983,
0.14004437625408173,
0.02509966306388378,
0.1139933168888092,
-0.6057779788970947,
0.18162167072296143,
-0.32787537574768066,
-0.4243603050708771,
-0.054477740079164505,
-0.0181012824177742,
0.34432438015937805,
-0.35510942339897156,
-0.08640585839748383,
0.10172542929649353,
-0.08030787110328674,
-0.20820513367652893,
-0.045824386179447174,
0.12741808593273163,
-0.05403628945350647,
-0.12551535665988922,
0.10232998430728912,
0.14318589866161346,
0.1319703906774521,
0.1237422302365303,
-0.15117564797401428,
0.1273585855960846,
-0.14461641013622284,
-0.15213289856910706,
0.25281813740730286,
-0.4966939091682434,
0.0972476452589035,
-0.20889736711978912,
-0.3282932937145233,
-0.08344873785972595,
0.19717663526535034,
0.12489539384841919,
0.2090015560388565,
-0.02410953678190708,
-0.11765245348215103,
-0.2807423770427704,
0.14744676649570465,
-0.22394971549510956,
0.28916168212890625,
-0.029163924977183342,
0.22521497309207916,
0.021132446825504303,
0.10826363414525986,
-0.3377677798271179,
0.3337956666946411,
-0.2831733226776123,
0.07441513240337372,
-0.21035507321357727,
-0.07321040332317352,
0.08979567140340805,
-0.10700038820505142,
0.07190604507923126,
-0.36291226744651794,
-0.5030115842819214,
-0.16844013333320618,
0.025959832593798637,
0.03169859200716019,
0.1291654407978058,
0.0525774285197258,
-0.21958424150943756,
-0.03664546459913254,
-0.06964389979839325,
-0.125880628824234,
0.25473207235336304,
-0.13624617457389832,
-0.10122602432966232,
0.07498263567686081,
0.6479014754295349,
-0.08105381578207016,
-0.1453102082014084,
0.04292784258723259,
0.23619197309017181,
0.46847644448280334,
-0.19937865436077118,
0.04260990396142006,
-0.041995819658041,
0.05754543095827103,
-0.011257939040660858,
0.16749629378318787,
0.1455041617155075,
0.19910717010498047,
0.4445549547672272,
0.039548370987176895,
0.09673809260129929,
0.21373753249645233,
0.45244964957237244,
-0.2789985239505768,
-0.4047289192676544,
0.01998247019946575,
-0.09168174117803574,
0.18082766234874725,
-0.06952686607837677,
-0.28767478466033936,
0.16000579297542572,
-0.16770368814468384,
0.3110308051109314,
0.16820205748081207,
0.8249525427818298,
0.085776187479496,
0.08961822092533112,
0.14037679135799408,
0.4103836715221405,
-0.1750088930130005,
-0.09528237581253052,
-0.027683531865477562,
-0.19443674385547638,
0.17395417392253876,
-0.22120341658592224,
0.02507009729743004,
-0.17433252930641174,
0.21302282810211182,
-0.09741462767124176,
0.10781677812337875,
0.28240805864334106,
-0.22198757529258728,
0.3076532483100891,
-0.1679958999156952,
0.21520118415355682,
0.04457591101527214,
0.2729365825653076,
0.1104283407330513,
0.0428822822868824,
-0.16095007956027985,
-0.0994940921664238,
-0.09668195992708206,
-0.0008555257227271795,
0.1906568706035614,
-0.05625941976904869,
-0.16774998605251312,
-0.143371120095253,
-0.13827607035636902,
-0.2827304005622864,
0.009116134606301785,
-0.1911626011133194,
0.02053644135594368,
-0.42288535833358765,
0.00856463797390461,
-0.00637336540967226,
0.39065083861351013,
0.16521397233009338,
0.003802016843110323,
0.1769774854183197,
0.02879687398672104,
0.31983044743537903,
0.021292107179760933,
0.061969056725502014,
0.31155312061309814,
0.11626925319433212,
0.12169874459505081,
-0.04989318549633026,
-0.025067806243896484,
0.2786653935909271,
0.21286951005458832,
-0.14214977622032166,
-0.3056240379810333,
0.07145571708679199,
0.07424558699131012,
0.056922923773527145,
0.18920983374118805,
0.28479865193367004,
-0.19897332787513733,
0.2820034325122833,
-0.2577061355113983,
-0.21801155805587769,
0.09091907739639282,
0.2682267129421234,
0.1316666156053543,
-0.259867399930954,
-0.0367252454161644,
-0.03158429637551308,
-0.1974388062953949,
-0.14308427274227142,
0.29948902130126953,
-0.3627110719680786,
0.21748481690883636,
-0.029620368033647537,
0.10835324972867966,
-0.0850353017449379,
0.29380008578300476,
0.21106426417827606,
-0.10374201089143753,
-0.012424265965819359,
-0.38013792037963867,
-0.1819169670343399,
0.2621210813522339,
0.03152424842119217,
-0.13711871206760406,
-0.08416881412267685,
0.2787029445171356,
0.2756972014904022,
0.1296425461769104,
-0.19255700707435608,
-0.47022512555122375,
-0.09590540826320648,
-0.1593347042798996,
-0.10326575487852097,
-0.010243343189358711,
0.01883326843380928,
0.15115025639533997,
-0.022249413654208183,
-0.12084823846817017,
0.26170122623443604,
0.09810107946395874,
0.159562885761261,
0.2246536910533905,
0.05065031722187996,
0.16822615265846252,
-0.3406635522842407,
0.06258368492126465,
-0.08785749971866608,
-0.13764044642448425,
-0.4633200466632843,
0.021613966673612595,
-0.12122973054647446,
-0.1340838074684143,
-0.2220335304737091,
-0.301648885011673,
-0.2229277491569519,
0.35559505224227905,
-0.05262027680873871,
0.07260493189096451,
0.010255036875605583,
-0.16645176708698273,
0.011376368813216686,
0.3951810896396637,
-0.0005814433097839355,
0.1783003956079483,
-0.47217583656311035,
-0.06350080668926239,
0.2320690155029297,
0.41433313488960266,
-0.04065258428454399,
-0.00796828418970108,
-0.1008848324418068,
-0.23991848528385162,
0.3622504770755768,
-0.2076675444841385,
-0.23097294569015503,
0.0010242696152999997,
-0.0038633921649307013,
0.056553713977336884,
0.057398539036512375,
-0.08298204839229584,
0.3169921338558197,
0.18531958758831024,
-0.017880694940686226,
-0.02804533578455448,
0.24885046482086182,
0.15151852369308472,
-0.00026943418197333813,
-0.000812952988781035,
-0.087894506752491,
0.2217601090669632,
-0.20416060090065002,
-0.14080312848091125,
-0.1319884955883026
] |
https://github.com/huggingface/datasets/issues/3164
|
Add raw data files to the Hub with GitHub LFS for canonical dataset
|
Hi @zlucia,
As @julien-c pointed out, the way to store/host raw data files in our Hub is by using what we call "community" datasets:
- either at your personal namespace: `load_dataset("zlucia/casehold")`
- or at an organization namespace: for example, if you create the organization `reglab`, then `load_dataset("reglab/casehold")`
Please note that "canonical" datasets do not normally store/host their raw data at our Hub, but in a third-party server. For "canonical" datasets, we just host the "loading script", that is, a Python script that downloads the raw data from a third-party server, creates the HuggingFace dataset from it and caches it locally.
In order to create an organization namespace in our Hub, please follow this link: https://huggingface.co/organizations/new
There are already many organizations at our Hub (complete list here: https://huggingface.co/organizations), such as:
- Stanford CRFM: https://huggingface.co/stanford-crfm
- Stanford NLP: https://huggingface.co/stanfordnlp
- Stanford CS329S: Machine Learning Systems Design: https://huggingface.co/stanford-cs329s
Also note that you in your organization namespace:
- you can add any number of members
- you can store both raw datasets and models, and those can be immediately accessed using `datasets` and `transformers`
Once you have created an organization, these are the steps to upload/host a raw dataset:
- The no-code procedure: https://huggingface.co/docs/datasets/upload_dataset.html
- Using the command line (terminal): https://huggingface.co/docs/datasets/share.html#add-a-community-dataset
Please, feel free to ping me if you have any further questions or need help.
|
I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks!
| 222 |
Add raw data files to the Hub with GitHub LFS for canonical dataset
|
[
-0.48958703875541687,
0.07953398674726486,
-0.16216041147708893,
-0.1511349081993103,
0.04632984846830368,
0.16339248418807983,
0.04887048527598381,
0.43567919731140137,
0.32130295038223267,
0.04065380617976189,
-0.2753499150276184,
0.19790074229240417,
-0.11198823899030685,
0.3272015452384949,
-0.03279931843280792,
0.47618821263313293,
0.03704698011279106,
0.24368223547935486,
-0.12880320847034454,
-0.3449605107307434,
-0.0154115604236722,
0.12157472968101501,
0.32542699575424194,
-0.2521155774593353,
-0.4234122931957245,
0.2633834481239319,
0.07717408984899521,
0.44734203815460205,
-0.27577078342437744,
0.0018560349708423018,
0.0776689350605011,
0.39424929022789,
0.035683032125234604,
0.2166406810283661,
-0.00010823534830706194,
0.14913906157016754,
0.2719777524471283,
-0.21213489770889282,
-0.32525357604026794,
-0.14872722327709198,
-0.1932079941034317,
-0.06934709846973419,
-0.11937396228313446,
-0.056822750717401505,
-0.33355775475502014,
-0.06638634949922562,
0.19511038064956665,
0.015551632270216942,
0.05812068283557892,
0.02492806315422058,
0.19451256096363068,
-0.038052674382925034,
0.10501178354024887,
-0.05182281509041786,
0.37558984756469727,
0.47104042768478394,
-0.042534343898296356,
0.21962760388851166,
0.2528853714466095,
0.137750506401062,
-0.16332097351551056,
0.13409583270549774,
0.37919139862060547,
-0.09099729359149933,
0.1113976389169693,
0.009115519002079964,
-0.43342146277427673,
-0.07046603411436081,
-0.027413755655288696,
0.11356217414140701,
0.2049928605556488,
-0.31474602222442627,
-0.38382601737976074,
-0.09797660261392593,
-0.09158017486333847,
-0.36859849095344543,
-0.12002280354499817,
0.40383148193359375,
-0.1028389036655426,
0.07171329110860825,
-0.1563069373369217,
-0.6794007420539856,
-0.13428162038326263,
0.029011089354753494,
0.11687400937080383,
0.29296913743019104,
0.050898175686597824,
-0.017704861238598824,
-0.15721923112869263,
0.1585189253091812,
-0.09394360333681107,
-0.18242433667182922,
-0.13224631547927856,
-0.04071184620261192,
0.19452360272407532,
-0.35640642046928406,
0.1274111419916153,
-0.005775093100965023,
0.22881802916526794,
0.0675378069281578,
0.001497529330663383,
0.14789262413978577,
-0.3272608518600464,
-0.16984078288078308,
0.1655820906162262,
-0.06548503041267395,
0.10444892197847366,
0.20475707948207855,
0.40753939747810364,
0.10197624564170837,
-0.09587354212999344,
0.08826650679111481,
-0.08654792606830597,
0.051099278032779694,
-0.7113354802131653,
0.16925305128097534,
0.10097885876893997,
-0.056889746338129044,
0.2503798305988312,
-0.10179977864027023,
0.3707951605319977,
0.19016306102275848,
-0.06496260315179825,
0.19321036338806152,
0.07295498996973038,
-0.25994929671287537,
-0.22601807117462158,
0.274126797914505,
0.08275126665830612,
-0.04249325022101402,
-0.23601077497005463,
0.2667434513568878,
0.16854523122310638,
-0.09487637877464294,
0.10774674266576767,
-0.22943629324436188,
0.32345452904701233,
-0.03657284379005432,
0.3232366740703583,
-0.06540440022945404,
0.053403280675411224,
-0.05366097390651703,
0.04262395575642586,
0.1910463124513626,
0.3657356798648834,
0.03790855035185814,
0.09553506225347519,
-0.3825410008430481,
-0.18531128764152527,
-0.02648736909031868,
-0.32854899764060974,
-0.3666478097438812,
-0.41306114196777344,
0.1371539831161499,
-0.22607271373271942,
0.1918373554944992,
-0.5411189794540405,
-0.015342318452894688,
-0.25904205441474915,
0.0743541419506073,
-0.055286601185798645,
0.10006479918956757,
0.17849084734916687,
-0.005166511982679367,
0.025285962969064713,
0.1358124017715454,
-0.059672191739082336,
0.20570741593837738,
0.18285295367240906,
0.07134803384542465,
-0.09553302079439163,
0.08907628804445267,
-0.16643735766410828,
0.32556718587875366,
-0.2719475328922272,
0.49356648325920105,
0.5352636575698853,
-0.653717577457428,
-0.25792762637138367,
0.1428338885307312,
0.11311320960521698,
-0.23642899096012115,
-0.03894784674048424,
0.25401419401168823,
0.18931573629379272,
-0.24088992178440094,
-0.014928964897990227,
0.24667903780937195,
0.03225526213645935,
0.013794908300042152,
-0.18581734597682953,
-0.28218168020248413,
-0.4722834825515747,
0.2459973841905594,
0.0926138237118721,
0.08424167335033417,
0.5566318035125732,
0.10033155232667923,
0.3443811535835266,
-0.3638673424720764,
0.2471599131822586,
0.21442222595214844,
0.3967769742012024,
-0.06896331161260605,
-0.05360760539770126,
0.18505887687206268,
-0.1593264490365982,
0.08899043500423431,
-0.031171578913927078,
0.28584176301956177,
-0.2491072118282318,
-0.2584826946258545,
-0.1670587956905365,
-0.12034331262111664,
-0.13655947148799896,
0.04878092557191849,
0.23520494997501373,
0.04870031774044037,
-0.04272396117448807,
-0.04155762121081352,
-0.021161938086152077,
0.0969562828540802,
-0.33721548318862915,
0.01594686135649681,
-0.1961226761341095,
0.543633222579956,
-0.00739901140332222,
-0.37957584857940674,
0.266194611787796,
0.0853269025683403,
-0.06320000439882278,
-0.38096827268600464,
0.06870000064373016,
0.11111950874328613,
0.05495155230164528,
0.4623626470565796,
0.778207540512085,
0.4164116382598877,
0.2530891001224518,
0.08005905151367188,
-0.1327771544456482,
0.06419326364994049,
-0.022446297109127045,
0.20654591917991638,
-0.5220535397529602,
0.3402814567089081,
-0.13734063506126404,
-0.36767879128456116,
0.025651535019278526,
-0.043036483228206635,
0.31665101647377014,
0.021991567686200142,
-0.09196575731039047,
-0.16559290885925293,
-0.01316510234028101,
0.49560219049453735,
-0.0506197065114975,
-0.16571401059627533,
0.09671650826931,
0.03805266693234444,
0.44210341572761536,
-0.02663746103644371,
0.1630079746246338,
0.13267302513122559,
-0.09473671019077301,
-0.17524948716163635,
0.45486170053482056,
0.06930545717477798,
0.07678301632404327,
0.18610858917236328,
0.22196592390537262,
0.1923317313194275,
0.036634255200624466,
-0.07403841614723206,
0.0637761726975441,
-0.306702584028244,
-0.0496358796954155,
0.3314918875694275,
0.2267780303955078,
-0.2191908061504364,
-0.44823312759399414,
-0.007805227302014828,
0.012782280333340168,
0.14194469153881073,
0.071670301258564,
-0.3867434561252594,
-0.02078944630920887,
0.2831147015094757,
0.3148377239704132,
-0.1622208207845688,
-0.04910912364721298,
-0.3215380907058716,
0.32056429982185364,
0.519679605960846,
-0.2756122946739197,
-0.026692677289247513,
0.44984614849090576,
0.14961828291416168,
0.1645585596561432,
0.08432501554489136,
-0.15178224444389343,
-0.2726712226867676,
0.18800783157348633,
0.17447689175605774,
0.09650026261806488,
-0.05098526179790497,
0.09819464385509491,
-0.2692071795463562,
0.3181174397468567,
-0.5129840970039368,
-0.09856320917606354,
0.1250234693288803,
-0.0869491770863533,
0.30326399207115173,
0.02741297148168087,
0.11302362382411957,
0.19598166644573212,
-0.008915041573345661,
-0.11537224054336548,
-0.008136780001223087,
-0.032989755272865295,
-0.3803657293319702,
-0.11388737708330154,
-0.10709778964519501,
-0.14562954008579254,
0.06525226682424545,
-0.10566575825214386,
-0.40075764060020447,
0.12775377929210663,
0.3993970453739166,
0.14706775546073914,
-0.10062526166439056,
0.14960089325904846,
-0.14895524084568024,
0.16479910910129547,
-0.3889274299144745,
-0.23564061522483826,
-0.30199170112609863,
0.37060222029685974,
-0.45452335476875305,
-0.4127686619758606,
-0.029890665784478188,
-0.07953893393278122,
0.17481468617916107,
0.215249702334404,
-0.39471858739852905,
-0.4601593315601349,
0.2511852979660034,
0.18909862637519836,
0.07696294039487839,
0.05969534069299698,
0.2687973082065582,
-0.024355677887797356,
-0.05470728129148483,
-0.1776570975780487,
0.13735632598400116,
0.09991248697042465,
0.6225721836090088,
-0.1948261857032776,
-0.19323725998401642,
-0.22323372960090637,
0.19042262434959412,
0.6167952418327332,
0.13611748814582825,
-0.0012790337204933167,
0.26502734422683716,
-0.21708965301513672,
0.330487996339798,
-0.22513234615325928,
0.27074921131134033,
0.11411550641059875,
0.07521341741085052,
0.05132288858294487,
0.5401803851127625,
0.3443281352519989,
-0.04796150326728821,
0.13554318249225616,
-0.15345562994480133,
-0.2649429738521576,
-0.28244858980178833,
-0.15181326866149902,
-0.051736146211624146,
-0.23931542038917542,
0.011249518021941185,
-0.2183775156736374,
-0.409953773021698,
-0.26660487055778503,
0.2409512996673584,
0.35228338837623596,
0.15854650735855103,
0.1140439361333847,
-0.10058426856994629,
-0.24288929998874664,
-0.17178452014923096,
0.14297063648700714,
0.18242403864860535,
-0.20906990766525269,
-0.07807638496160507,
-0.09160315245389938,
-0.11373179405927658,
-0.12215759605169296,
0.29393303394317627,
-0.41281458735466003,
0.1832922101020813,
-0.22473976016044617,
0.05922228470444679,
-0.14079564809799194,
-0.00640116585418582,
0.004989866632968187,
0.5345301032066345,
0.08326870948076248,
0.7244856357574463,
-0.15974408388137817,
0.005113341845571995,
-0.3226211667060852,
-0.06695128232240677,
-0.005045493133366108,
0.2071966975927353,
0.045454688370227814,
-0.30224066972732544,
-0.5419788956642151,
-0.20774666965007782,
0.21574866771697998,
0.021830646321177483,
-0.04429500922560692,
-0.12268999218940735,
-0.08348395675420761,
-0.11044090241193771,
-0.043467193841934204,
0.09441926330327988,
0.08436419069766998,
0.37800663709640503,
-0.23820531368255615,
-0.2517187297344208,
0.072516068816185,
-0.090412937104702,
0.4885214865207672,
0.235321044921875,
0.14895004034042358,
0.10359946638345718,
-0.5173063278198242,
-0.18280412256717682,
0.2504902780056,
0.1836112141609192,
-0.12954898178577423,
-0.5225884914398193,
-0.055845919996500015,
-0.4328092932701111,
0.47941455245018005,
-0.1642431616783142,
-0.0674779936671257,
-0.2286088615655899,
0.12491775304079056,
0.29254308342933655,
-0.2896181344985962,
-0.1287364810705185,
0.6162512898445129,
0.05830496549606323,
-0.31389370560646057,
0.3073955178260803,
0.003101895097643137,
0.4211294949054718,
0.08260001242160797,
0.23293299973011017,
0.012500705197453499,
-0.19018931686878204,
0.4063863456249237,
-0.4663470983505249,
0.017846781760454178,
-0.1549227386713028,
-0.06022350862622261,
-0.09730357676744461,
0.13460224866867065,
0.0014441254315897822,
0.1069517657160759,
0.10319606214761734,
0.030807772651314735,
0.43767982721328735,
0.20346443355083466,
-0.1855935901403427,
0.39860495924949646,
-0.028911646455526352,
-0.06798325479030609,
0.04418167099356651,
0.2103213220834732,
0.06859572231769562,
0.24763259291648865,
-0.100713811814785,
-0.17880786955356598,
-0.4453536570072174,
0.060427259653806686,
-0.017783012241125107,
-0.022406000643968582,
0.42378175258636475,
0.19278986752033234,
0.03230086341500282,
-0.2827422022819519,
-0.4780552089214325,
0.06233290582895279,
0.48758798837661743,
0.20626959204673767,
-0.3628760874271393,
0.15386097133159637,
-0.08182062953710556,
0.03237874060869217,
-0.0897984430193901,
0.09923820942640305,
-0.1414393186569214,
-0.20684951543807983,
0.14004437625408173,
0.02509966306388378,
0.1139933168888092,
-0.6057779788970947,
0.18162167072296143,
-0.32787537574768066,
-0.4243603050708771,
-0.054477740079164505,
-0.0181012824177742,
0.34432438015937805,
-0.35510942339897156,
-0.08640585839748383,
0.10172542929649353,
-0.08030787110328674,
-0.20820513367652893,
-0.045824386179447174,
0.12741808593273163,
-0.05403628945350647,
-0.12551535665988922,
0.10232998430728912,
0.14318589866161346,
0.1319703906774521,
0.1237422302365303,
-0.15117564797401428,
0.1273585855960846,
-0.14461641013622284,
-0.15213289856910706,
0.25281813740730286,
-0.4966939091682434,
0.0972476452589035,
-0.20889736711978912,
-0.3282932937145233,
-0.08344873785972595,
0.19717663526535034,
0.12489539384841919,
0.2090015560388565,
-0.02410953678190708,
-0.11765245348215103,
-0.2807423770427704,
0.14744676649570465,
-0.22394971549510956,
0.28916168212890625,
-0.029163924977183342,
0.22521497309207916,
0.021132446825504303,
0.10826363414525986,
-0.3377677798271179,
0.3337956666946411,
-0.2831733226776123,
0.07441513240337372,
-0.21035507321357727,
-0.07321040332317352,
0.08979567140340805,
-0.10700038820505142,
0.07190604507923126,
-0.36291226744651794,
-0.5030115842819214,
-0.16844013333320618,
0.025959832593798637,
0.03169859200716019,
0.1291654407978058,
0.0525774285197258,
-0.21958424150943756,
-0.03664546459913254,
-0.06964389979839325,
-0.125880628824234,
0.25473207235336304,
-0.13624617457389832,
-0.10122602432966232,
0.07498263567686081,
0.6479014754295349,
-0.08105381578207016,
-0.1453102082014084,
0.04292784258723259,
0.23619197309017181,
0.46847644448280334,
-0.19937865436077118,
0.04260990396142006,
-0.041995819658041,
0.05754543095827103,
-0.011257939040660858,
0.16749629378318787,
0.1455041617155075,
0.19910717010498047,
0.4445549547672272,
0.039548370987176895,
0.09673809260129929,
0.21373753249645233,
0.45244964957237244,
-0.2789985239505768,
-0.4047289192676544,
0.01998247019946575,
-0.09168174117803574,
0.18082766234874725,
-0.06952686607837677,
-0.28767478466033936,
0.16000579297542572,
-0.16770368814468384,
0.3110308051109314,
0.16820205748081207,
0.8249525427818298,
0.085776187479496,
0.08961822092533112,
0.14037679135799408,
0.4103836715221405,
-0.1750088930130005,
-0.09528237581253052,
-0.027683531865477562,
-0.19443674385547638,
0.17395417392253876,
-0.22120341658592224,
0.02507009729743004,
-0.17433252930641174,
0.21302282810211182,
-0.09741462767124176,
0.10781677812337875,
0.28240805864334106,
-0.22198757529258728,
0.3076532483100891,
-0.1679958999156952,
0.21520118415355682,
0.04457591101527214,
0.2729365825653076,
0.1104283407330513,
0.0428822822868824,
-0.16095007956027985,
-0.0994940921664238,
-0.09668195992708206,
-0.0008555257227271795,
0.1906568706035614,
-0.05625941976904869,
-0.16774998605251312,
-0.143371120095253,
-0.13827607035636902,
-0.2827304005622864,
0.009116134606301785,
-0.1911626011133194,
0.02053644135594368,
-0.42288535833358765,
0.00856463797390461,
-0.00637336540967226,
0.39065083861351013,
0.16521397233009338,
0.003802016843110323,
0.1769774854183197,
0.02879687398672104,
0.31983044743537903,
0.021292107179760933,
0.061969056725502014,
0.31155312061309814,
0.11626925319433212,
0.12169874459505081,
-0.04989318549633026,
-0.025067806243896484,
0.2786653935909271,
0.21286951005458832,
-0.14214977622032166,
-0.3056240379810333,
0.07145571708679199,
0.07424558699131012,
0.056922923773527145,
0.18920983374118805,
0.28479865193367004,
-0.19897332787513733,
0.2820034325122833,
-0.2577061355113983,
-0.21801155805587769,
0.09091907739639282,
0.2682267129421234,
0.1316666156053543,
-0.259867399930954,
-0.0367252454161644,
-0.03158429637551308,
-0.1974388062953949,
-0.14308427274227142,
0.29948902130126953,
-0.3627110719680786,
0.21748481690883636,
-0.029620368033647537,
0.10835324972867966,
-0.0850353017449379,
0.29380008578300476,
0.21106426417827606,
-0.10374201089143753,
-0.012424265965819359,
-0.38013792037963867,
-0.1819169670343399,
0.2621210813522339,
0.03152424842119217,
-0.13711871206760406,
-0.08416881412267685,
0.2787029445171356,
0.2756972014904022,
0.1296425461769104,
-0.19255700707435608,
-0.47022512555122375,
-0.09590540826320648,
-0.1593347042798996,
-0.10326575487852097,
-0.010243343189358711,
0.01883326843380928,
0.15115025639533997,
-0.022249413654208183,
-0.12084823846817017,
0.26170122623443604,
0.09810107946395874,
0.159562885761261,
0.2246536910533905,
0.05065031722187996,
0.16822615265846252,
-0.3406635522842407,
0.06258368492126465,
-0.08785749971866608,
-0.13764044642448425,
-0.4633200466632843,
0.021613966673612595,
-0.12122973054647446,
-0.1340838074684143,
-0.2220335304737091,
-0.301648885011673,
-0.2229277491569519,
0.35559505224227905,
-0.05262027680873871,
0.07260493189096451,
0.010255036875605583,
-0.16645176708698273,
0.011376368813216686,
0.3951810896396637,
-0.0005814433097839355,
0.1783003956079483,
-0.47217583656311035,
-0.06350080668926239,
0.2320690155029297,
0.41433313488960266,
-0.04065258428454399,
-0.00796828418970108,
-0.1008848324418068,
-0.23991848528385162,
0.3622504770755768,
-0.2076675444841385,
-0.23097294569015503,
0.0010242696152999997,
-0.0038633921649307013,
0.056553713977336884,
0.057398539036512375,
-0.08298204839229584,
0.3169921338558197,
0.18531958758831024,
-0.017880694940686226,
-0.02804533578455448,
0.24885046482086182,
0.15151852369308472,
-0.00026943418197333813,
-0.000812952988781035,
-0.087894506752491,
0.2217601090669632,
-0.20416060090065002,
-0.14080312848091125,
-0.1319884955883026
] |
https://github.com/huggingface/datasets/issues/3164
|
Add raw data files to the Hub with GitHub LFS for canonical dataset
|
Ah I see, I think I was unclear whether there were benefits to uploading a canonical dataset vs. a community provided dataset. Thanks for clarifying. I'll see if we want to create an organization namespace and otherwise, will upload the dataset under my personal namespace.
|
I'm interested in sharing the CaseHOLD dataset (https://arxiv.org/abs/2104.08671) as a canonical dataset on the HuggingFace Hub and would like to add the raw data files to the Hub with GitHub LFS, since it seems like a more sustainable long term storage solution, compared to other storage solutions available to my team. From what I can tell, this option is not immediately supported if one follows the sharing steps detailed here: [https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset](https://huggingface.co/docs/datasets/share_dataset.html#sharing-a-canonical-dataset), since GitHub LFS is not supported for public forks. Is there a way to request this? Thanks!
| 45 |
Add raw data files to the Hub with GitHub LFS for canonical dataset
|
[
-0.48958703875541687,
0.07953398674726486,
-0.16216041147708893,
-0.1511349081993103,
0.04632984846830368,
0.16339248418807983,
0.04887048527598381,
0.43567919731140137,
0.32130295038223267,
0.04065380617976189,
-0.2753499150276184,
0.19790074229240417,
-0.11198823899030685,
0.3272015452384949,
-0.03279931843280792,
0.47618821263313293,
0.03704698011279106,
0.24368223547935486,
-0.12880320847034454,
-0.3449605107307434,
-0.0154115604236722,
0.12157472968101501,
0.32542699575424194,
-0.2521155774593353,
-0.4234122931957245,
0.2633834481239319,
0.07717408984899521,
0.44734203815460205,
-0.27577078342437744,
0.0018560349708423018,
0.0776689350605011,
0.39424929022789,
0.035683032125234604,
0.2166406810283661,
-0.00010823534830706194,
0.14913906157016754,
0.2719777524471283,
-0.21213489770889282,
-0.32525357604026794,
-0.14872722327709198,
-0.1932079941034317,
-0.06934709846973419,
-0.11937396228313446,
-0.056822750717401505,
-0.33355775475502014,
-0.06638634949922562,
0.19511038064956665,
0.015551632270216942,
0.05812068283557892,
0.02492806315422058,
0.19451256096363068,
-0.038052674382925034,
0.10501178354024887,
-0.05182281509041786,
0.37558984756469727,
0.47104042768478394,
-0.042534343898296356,
0.21962760388851166,
0.2528853714466095,
0.137750506401062,
-0.16332097351551056,
0.13409583270549774,
0.37919139862060547,
-0.09099729359149933,
0.1113976389169693,
0.009115519002079964,
-0.43342146277427673,
-0.07046603411436081,
-0.027413755655288696,
0.11356217414140701,
0.2049928605556488,
-0.31474602222442627,
-0.38382601737976074,
-0.09797660261392593,
-0.09158017486333847,
-0.36859849095344543,
-0.12002280354499817,
0.40383148193359375,
-0.1028389036655426,
0.07171329110860825,
-0.1563069373369217,
-0.6794007420539856,
-0.13428162038326263,
0.029011089354753494,
0.11687400937080383,
0.29296913743019104,
0.050898175686597824,
-0.017704861238598824,
-0.15721923112869263,
0.1585189253091812,
-0.09394360333681107,
-0.18242433667182922,
-0.13224631547927856,
-0.04071184620261192,
0.19452360272407532,
-0.35640642046928406,
0.1274111419916153,
-0.005775093100965023,
0.22881802916526794,
0.0675378069281578,
0.001497529330663383,
0.14789262413978577,
-0.3272608518600464,
-0.16984078288078308,
0.1655820906162262,
-0.06548503041267395,
0.10444892197847366,
0.20475707948207855,
0.40753939747810364,
0.10197624564170837,
-0.09587354212999344,
0.08826650679111481,
-0.08654792606830597,
0.051099278032779694,
-0.7113354802131653,
0.16925305128097534,
0.10097885876893997,
-0.056889746338129044,
0.2503798305988312,
-0.10179977864027023,
0.3707951605319977,
0.19016306102275848,
-0.06496260315179825,
0.19321036338806152,
0.07295498996973038,
-0.25994929671287537,
-0.22601807117462158,
0.274126797914505,
0.08275126665830612,
-0.04249325022101402,
-0.23601077497005463,
0.2667434513568878,
0.16854523122310638,
-0.09487637877464294,
0.10774674266576767,
-0.22943629324436188,
0.32345452904701233,
-0.03657284379005432,
0.3232366740703583,
-0.06540440022945404,
0.053403280675411224,
-0.05366097390651703,
0.04262395575642586,
0.1910463124513626,
0.3657356798648834,
0.03790855035185814,
0.09553506225347519,
-0.3825410008430481,
-0.18531128764152527,
-0.02648736909031868,
-0.32854899764060974,
-0.3666478097438812,
-0.41306114196777344,
0.1371539831161499,
-0.22607271373271942,
0.1918373554944992,
-0.5411189794540405,
-0.015342318452894688,
-0.25904205441474915,
0.0743541419506073,
-0.055286601185798645,
0.10006479918956757,
0.17849084734916687,
-0.005166511982679367,
0.025285962969064713,
0.1358124017715454,
-0.059672191739082336,
0.20570741593837738,
0.18285295367240906,
0.07134803384542465,
-0.09553302079439163,
0.08907628804445267,
-0.16643735766410828,
0.32556718587875366,
-0.2719475328922272,
0.49356648325920105,
0.5352636575698853,
-0.653717577457428,
-0.25792762637138367,
0.1428338885307312,
0.11311320960521698,
-0.23642899096012115,
-0.03894784674048424,
0.25401419401168823,
0.18931573629379272,
-0.24088992178440094,
-0.014928964897990227,
0.24667903780937195,
0.03225526213645935,
0.013794908300042152,
-0.18581734597682953,
-0.28218168020248413,
-0.4722834825515747,
0.2459973841905594,
0.0926138237118721,
0.08424167335033417,
0.5566318035125732,
0.10033155232667923,
0.3443811535835266,
-0.3638673424720764,
0.2471599131822586,
0.21442222595214844,
0.3967769742012024,
-0.06896331161260605,
-0.05360760539770126,
0.18505887687206268,
-0.1593264490365982,
0.08899043500423431,
-0.031171578913927078,
0.28584176301956177,
-0.2491072118282318,
-0.2584826946258545,
-0.1670587956905365,
-0.12034331262111664,
-0.13655947148799896,
0.04878092557191849,
0.23520494997501373,
0.04870031774044037,
-0.04272396117448807,
-0.04155762121081352,
-0.021161938086152077,
0.0969562828540802,
-0.33721548318862915,
0.01594686135649681,
-0.1961226761341095,
0.543633222579956,
-0.00739901140332222,
-0.37957584857940674,
0.266194611787796,
0.0853269025683403,
-0.06320000439882278,
-0.38096827268600464,
0.06870000064373016,
0.11111950874328613,
0.05495155230164528,
0.4623626470565796,
0.778207540512085,
0.4164116382598877,
0.2530891001224518,
0.08005905151367188,
-0.1327771544456482,
0.06419326364994049,
-0.022446297109127045,
0.20654591917991638,
-0.5220535397529602,
0.3402814567089081,
-0.13734063506126404,
-0.36767879128456116,
0.025651535019278526,
-0.043036483228206635,
0.31665101647377014,
0.021991567686200142,
-0.09196575731039047,
-0.16559290885925293,
-0.01316510234028101,
0.49560219049453735,
-0.0506197065114975,
-0.16571401059627533,
0.09671650826931,
0.03805266693234444,
0.44210341572761536,
-0.02663746103644371,
0.1630079746246338,
0.13267302513122559,
-0.09473671019077301,
-0.17524948716163635,
0.45486170053482056,
0.06930545717477798,
0.07678301632404327,
0.18610858917236328,
0.22196592390537262,
0.1923317313194275,
0.036634255200624466,
-0.07403841614723206,
0.0637761726975441,
-0.306702584028244,
-0.0496358796954155,
0.3314918875694275,
0.2267780303955078,
-0.2191908061504364,
-0.44823312759399414,
-0.007805227302014828,
0.012782280333340168,
0.14194469153881073,
0.071670301258564,
-0.3867434561252594,
-0.02078944630920887,
0.2831147015094757,
0.3148377239704132,
-0.1622208207845688,
-0.04910912364721298,
-0.3215380907058716,
0.32056429982185364,
0.519679605960846,
-0.2756122946739197,
-0.026692677289247513,
0.44984614849090576,
0.14961828291416168,
0.1645585596561432,
0.08432501554489136,
-0.15178224444389343,
-0.2726712226867676,
0.18800783157348633,
0.17447689175605774,
0.09650026261806488,
-0.05098526179790497,
0.09819464385509491,
-0.2692071795463562,
0.3181174397468567,
-0.5129840970039368,
-0.09856320917606354,
0.1250234693288803,
-0.0869491770863533,
0.30326399207115173,
0.02741297148168087,
0.11302362382411957,
0.19598166644573212,
-0.008915041573345661,
-0.11537224054336548,
-0.008136780001223087,
-0.032989755272865295,
-0.3803657293319702,
-0.11388737708330154,
-0.10709778964519501,
-0.14562954008579254,
0.06525226682424545,
-0.10566575825214386,
-0.40075764060020447,
0.12775377929210663,
0.3993970453739166,
0.14706775546073914,
-0.10062526166439056,
0.14960089325904846,
-0.14895524084568024,
0.16479910910129547,
-0.3889274299144745,
-0.23564061522483826,
-0.30199170112609863,
0.37060222029685974,
-0.45452335476875305,
-0.4127686619758606,
-0.029890665784478188,
-0.07953893393278122,
0.17481468617916107,
0.215249702334404,
-0.39471858739852905,
-0.4601593315601349,
0.2511852979660034,
0.18909862637519836,
0.07696294039487839,
0.05969534069299698,
0.2687973082065582,
-0.024355677887797356,
-0.05470728129148483,
-0.1776570975780487,
0.13735632598400116,
0.09991248697042465,
0.6225721836090088,
-0.1948261857032776,
-0.19323725998401642,
-0.22323372960090637,
0.19042262434959412,
0.6167952418327332,
0.13611748814582825,
-0.0012790337204933167,
0.26502734422683716,
-0.21708965301513672,
0.330487996339798,
-0.22513234615325928,
0.27074921131134033,
0.11411550641059875,
0.07521341741085052,
0.05132288858294487,
0.5401803851127625,
0.3443281352519989,
-0.04796150326728821,
0.13554318249225616,
-0.15345562994480133,
-0.2649429738521576,
-0.28244858980178833,
-0.15181326866149902,
-0.051736146211624146,
-0.23931542038917542,
0.011249518021941185,
-0.2183775156736374,
-0.409953773021698,
-0.26660487055778503,
0.2409512996673584,
0.35228338837623596,
0.15854650735855103,
0.1140439361333847,
-0.10058426856994629,
-0.24288929998874664,
-0.17178452014923096,
0.14297063648700714,
0.18242403864860535,
-0.20906990766525269,
-0.07807638496160507,
-0.09160315245389938,
-0.11373179405927658,
-0.12215759605169296,
0.29393303394317627,
-0.41281458735466003,
0.1832922101020813,
-0.22473976016044617,
0.05922228470444679,
-0.14079564809799194,
-0.00640116585418582,
0.004989866632968187,
0.5345301032066345,
0.08326870948076248,
0.7244856357574463,
-0.15974408388137817,
0.005113341845571995,
-0.3226211667060852,
-0.06695128232240677,
-0.005045493133366108,
0.2071966975927353,
0.045454688370227814,
-0.30224066972732544,
-0.5419788956642151,
-0.20774666965007782,
0.21574866771697998,
0.021830646321177483,
-0.04429500922560692,
-0.12268999218940735,
-0.08348395675420761,
-0.11044090241193771,
-0.043467193841934204,
0.09441926330327988,
0.08436419069766998,
0.37800663709640503,
-0.23820531368255615,
-0.2517187297344208,
0.072516068816185,
-0.090412937104702,
0.4885214865207672,
0.235321044921875,
0.14895004034042358,
0.10359946638345718,
-0.5173063278198242,
-0.18280412256717682,
0.2504902780056,
0.1836112141609192,
-0.12954898178577423,
-0.5225884914398193,
-0.055845919996500015,
-0.4328092932701111,
0.47941455245018005,
-0.1642431616783142,
-0.0674779936671257,
-0.2286088615655899,
0.12491775304079056,
0.29254308342933655,
-0.2896181344985962,
-0.1287364810705185,
0.6162512898445129,
0.05830496549606323,
-0.31389370560646057,
0.3073955178260803,
0.003101895097643137,
0.4211294949054718,
0.08260001242160797,
0.23293299973011017,
0.012500705197453499,
-0.19018931686878204,
0.4063863456249237,
-0.4663470983505249,
0.017846781760454178,
-0.1549227386713028,
-0.06022350862622261,
-0.09730357676744461,
0.13460224866867065,
0.0014441254315897822,
0.1069517657160759,
0.10319606214761734,
0.030807772651314735,
0.43767982721328735,
0.20346443355083466,
-0.1855935901403427,
0.39860495924949646,
-0.028911646455526352,
-0.06798325479030609,
0.04418167099356651,
0.2103213220834732,
0.06859572231769562,
0.24763259291648865,
-0.100713811814785,
-0.17880786955356598,
-0.4453536570072174,
0.060427259653806686,
-0.017783012241125107,
-0.022406000643968582,
0.42378175258636475,
0.19278986752033234,
0.03230086341500282,
-0.2827422022819519,
-0.4780552089214325,
0.06233290582895279,
0.48758798837661743,
0.20626959204673767,
-0.3628760874271393,
0.15386097133159637,
-0.08182062953710556,
0.03237874060869217,
-0.0897984430193901,
0.09923820942640305,
-0.1414393186569214,
-0.20684951543807983,
0.14004437625408173,
0.02509966306388378,
0.1139933168888092,
-0.6057779788970947,
0.18162167072296143,
-0.32787537574768066,
-0.4243603050708771,
-0.054477740079164505,
-0.0181012824177742,
0.34432438015937805,
-0.35510942339897156,
-0.08640585839748383,
0.10172542929649353,
-0.08030787110328674,
-0.20820513367652893,
-0.045824386179447174,
0.12741808593273163,
-0.05403628945350647,
-0.12551535665988922,
0.10232998430728912,
0.14318589866161346,
0.1319703906774521,
0.1237422302365303,
-0.15117564797401428,
0.1273585855960846,
-0.14461641013622284,
-0.15213289856910706,
0.25281813740730286,
-0.4966939091682434,
0.0972476452589035,
-0.20889736711978912,
-0.3282932937145233,
-0.08344873785972595,
0.19717663526535034,
0.12489539384841919,
0.2090015560388565,
-0.02410953678190708,
-0.11765245348215103,
-0.2807423770427704,
0.14744676649570465,
-0.22394971549510956,
0.28916168212890625,
-0.029163924977183342,
0.22521497309207916,
0.021132446825504303,
0.10826363414525986,
-0.3377677798271179,
0.3337956666946411,
-0.2831733226776123,
0.07441513240337372,
-0.21035507321357727,
-0.07321040332317352,
0.08979567140340805,
-0.10700038820505142,
0.07190604507923126,
-0.36291226744651794,
-0.5030115842819214,
-0.16844013333320618,
0.025959832593798637,
0.03169859200716019,
0.1291654407978058,
0.0525774285197258,
-0.21958424150943756,
-0.03664546459913254,
-0.06964389979839325,
-0.125880628824234,
0.25473207235336304,
-0.13624617457389832,
-0.10122602432966232,
0.07498263567686081,
0.6479014754295349,
-0.08105381578207016,
-0.1453102082014084,
0.04292784258723259,
0.23619197309017181,
0.46847644448280334,
-0.19937865436077118,
0.04260990396142006,
-0.041995819658041,
0.05754543095827103,
-0.011257939040660858,
0.16749629378318787,
0.1455041617155075,
0.19910717010498047,
0.4445549547672272,
0.039548370987176895,
0.09673809260129929,
0.21373753249645233,
0.45244964957237244,
-0.2789985239505768,
-0.4047289192676544,
0.01998247019946575,
-0.09168174117803574,
0.18082766234874725,
-0.06952686607837677,
-0.28767478466033936,
0.16000579297542572,
-0.16770368814468384,
0.3110308051109314,
0.16820205748081207,
0.8249525427818298,
0.085776187479496,
0.08961822092533112,
0.14037679135799408,
0.4103836715221405,
-0.1750088930130005,
-0.09528237581253052,
-0.027683531865477562,
-0.19443674385547638,
0.17395417392253876,
-0.22120341658592224,
0.02507009729743004,
-0.17433252930641174,
0.21302282810211182,
-0.09741462767124176,
0.10781677812337875,
0.28240805864334106,
-0.22198757529258728,
0.3076532483100891,
-0.1679958999156952,
0.21520118415355682,
0.04457591101527214,
0.2729365825653076,
0.1104283407330513,
0.0428822822868824,
-0.16095007956027985,
-0.0994940921664238,
-0.09668195992708206,
-0.0008555257227271795,
0.1906568706035614,
-0.05625941976904869,
-0.16774998605251312,
-0.143371120095253,
-0.13827607035636902,
-0.2827304005622864,
0.009116134606301785,
-0.1911626011133194,
0.02053644135594368,
-0.42288535833358765,
0.00856463797390461,
-0.00637336540967226,
0.39065083861351013,
0.16521397233009338,
0.003802016843110323,
0.1769774854183197,
0.02879687398672104,
0.31983044743537903,
0.021292107179760933,
0.061969056725502014,
0.31155312061309814,
0.11626925319433212,
0.12169874459505081,
-0.04989318549633026,
-0.025067806243896484,
0.2786653935909271,
0.21286951005458832,
-0.14214977622032166,
-0.3056240379810333,
0.07145571708679199,
0.07424558699131012,
0.056922923773527145,
0.18920983374118805,
0.28479865193367004,
-0.19897332787513733,
0.2820034325122833,
-0.2577061355113983,
-0.21801155805587769,
0.09091907739639282,
0.2682267129421234,
0.1316666156053543,
-0.259867399930954,
-0.0367252454161644,
-0.03158429637551308,
-0.1974388062953949,
-0.14308427274227142,
0.29948902130126953,
-0.3627110719680786,
0.21748481690883636,
-0.029620368033647537,
0.10835324972867966,
-0.0850353017449379,
0.29380008578300476,
0.21106426417827606,
-0.10374201089143753,
-0.012424265965819359,
-0.38013792037963867,
-0.1819169670343399,
0.2621210813522339,
0.03152424842119217,
-0.13711871206760406,
-0.08416881412267685,
0.2787029445171356,
0.2756972014904022,
0.1296425461769104,
-0.19255700707435608,
-0.47022512555122375,
-0.09590540826320648,
-0.1593347042798996,
-0.10326575487852097,
-0.010243343189358711,
0.01883326843380928,
0.15115025639533997,
-0.022249413654208183,
-0.12084823846817017,
0.26170122623443604,
0.09810107946395874,
0.159562885761261,
0.2246536910533905,
0.05065031722187996,
0.16822615265846252,
-0.3406635522842407,
0.06258368492126465,
-0.08785749971866608,
-0.13764044642448425,
-0.4633200466632843,
0.021613966673612595,
-0.12122973054647446,
-0.1340838074684143,
-0.2220335304737091,
-0.301648885011673,
-0.2229277491569519,
0.35559505224227905,
-0.05262027680873871,
0.07260493189096451,
0.010255036875605583,
-0.16645176708698273,
0.011376368813216686,
0.3951810896396637,
-0.0005814433097839355,
0.1783003956079483,
-0.47217583656311035,
-0.06350080668926239,
0.2320690155029297,
0.41433313488960266,
-0.04065258428454399,
-0.00796828418970108,
-0.1008848324418068,
-0.23991848528385162,
0.3622504770755768,
-0.2076675444841385,
-0.23097294569015503,
0.0010242696152999997,
-0.0038633921649307013,
0.056553713977336884,
0.057398539036512375,
-0.08298204839229584,
0.3169921338558197,
0.18531958758831024,
-0.017880694940686226,
-0.02804533578455448,
0.24885046482086182,
0.15151852369308472,
-0.00026943418197333813,
-0.000812952988781035,
-0.087894506752491,
0.2217601090669632,
-0.20416060090065002,
-0.14080312848091125,
-0.1319884955883026
] |
https://github.com/huggingface/datasets/issues/3162
|
`datasets-cli test` should work with datasets without scripts
|
> It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
>
> I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
why don't you try to share that info with people, so you can also save some days.
|
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 75 |
`datasets-cli test` should work with datasets without scripts
|
[
-0.7772921323776245,
0.23359768092632294,
-0.18654882907867432,
-0.24163000285625458,
0.056195858865976334,
0.18935929238796234,
0.4240715205669403,
0.40640518069267273,
0.325748473405838,
0.12547411024570465,
-0.015936708077788353,
0.11381346732378006,
-0.1479400247335434,
0.3383498191833496,
0.07243964076042175,
0.2921241223812103,
-0.08945080637931824,
0.3481610417366028,
-0.23578625917434692,
0.11913958191871643,
-0.11413634568452835,
-0.18710605800151825,
-0.05166475102305412,
0.026805605739355087,
-0.17971454560756683,
-0.14044296741485596,
-0.12915632128715515,
0.17358292639255524,
-0.10054922848939896,
-0.2694452106952667,
0.45860594511032104,
0.47313085198402405,
0.24961605668067932,
0.3371078073978424,
-0.00010490382555872202,
0.1118873655796051,
0.2948106825351715,
-0.10909148305654526,
-0.4247133731842041,
0.11112786084413528,
-0.4161779582500458,
0.05606970563530922,
0.04271436110138893,
-0.4775942265987396,
-0.1879008263349533,
-0.04096043109893799,
0.09823478758335114,
-0.7446628212928772,
-0.047700490802526474,
0.30823084712028503,
0.2686741054058075,
0.4631454646587372,
-0.4682489037513733,
-0.28667816519737244,
0.050867609679698944,
0.19743612408638,
0.016028765588998795,
-0.03358284756541252,
0.4378211498260498,
-0.243205726146698,
0.1558658927679062,
0.17621852457523346,
-0.016535215079784393,
-0.009804348461329937,
0.041229598224163055,
-0.15895968675613403,
-0.08897892385721207,
-0.16217906773090363,
0.14873814582824707,
0.24421335756778717,
0.5808706879615784,
-0.6595324277877808,
-0.24511459469795227,
0.047806911170482635,
-0.1862572431564331,
-0.019724559038877487,
0.03287104144692421,
0.19985666871070862,
-0.01584865339100361,
0.19810421764850616,
-0.4079655110836029,
-0.08350389450788498,
-0.06483347713947296,
-0.12072683870792389,
-0.04561195522546768,
0.07374938577413559,
0.02769816480576992,
0.09623593091964722,
-0.022564269602298737,
-0.1012575775384903,
0.04482045769691467,
-0.2196415811777115,
-0.42859286069869995,
0.13631562888622284,
-0.09222079068422318,
-0.36942702531814575,
0.13283900916576385,
0.15576399862766266,
0.4143785536289215,
0.35540956258773804,
0.03719406574964523,
0.27354565262794495,
-0.0840895026922226,
0.09649111330509186,
0.19681231677532196,
0.06564725190401077,
0.4494178295135498,
0.28333234786987305,
0.5198184847831726,
0.12995769083499908,
-0.0487079992890358,
-0.02980956621468067,
0.09221029281616211,
-0.20806337893009186,
-0.03626607730984688,
0.05770856514573097,
0.26208609342575073,
-0.19228701293468475,
-0.21753360331058502,
0.15352101624011993,
0.03724284842610359,
-0.13916756212711334,
0.1171426996588707,
0.4911973476409912,
0.18465501070022583,
-0.008919164538383484,
0.04743808135390282,
0.15626804530620575,
-0.03503848984837532,
-0.34214168787002563,
-0.20127929747104645,
0.21922411024570465,
0.009819157421588898,
-0.10511557012796402,
0.3351437747478485,
0.18137146532535553,
0.12406675517559052,
-0.26502230763435364,
-0.06278954446315765,
0.13172060251235962,
0.3704123795032501,
0.12154219299554825,
0.3472396731376648,
0.22189337015151978,
0.3247065246105194,
0.0028308492619544268,
0.05912631377577782,
-0.3036358058452606,
-0.21667681634426117,
0.2378084510564804,
0.019593343138694763,
-0.14026087522506714,
0.11869456619024277,
0.24397067725658417,
-0.28920769691467285,
-0.05039447173476219,
-0.11109116673469543,
-0.056517209857702255,
-0.08766777068376541,
-0.27395474910736084,
0.0820019394159317,
-0.08898304402828217,
-0.008631574921309948,
0.08748181909322739,
0.1047077551484108,
0.4276668131351471,
-0.7129131555557251,
0.11828101426362991,
0.02660965733230114,
-0.368808776140213,
-0.10773876309394836,
-0.12704430520534515,
-0.08911486715078354,
0.1354454755783081,
-0.20753151178359985,
0.03507864847779274,
0.3280167579650879,
-0.3713694214820862,
-0.01820988580584526,
0.21704138815402985,
0.2384520322084427,
-0.15973171591758728,
0.02889338694512844,
0.10084117203950882,
-0.05109557509422302,
-0.07541677355766296,
-0.4130837619304657,
0.10267297178506851,
0.0090315667912364,
0.13573625683784485,
0.11992349475622177,
-0.21976186335086823,
0.04435708373785019,
0.051003724336624146,
0.2735154628753662,
0.055759139358997345,
0.2795245349407196,
-0.11639288067817688,
0.30599743127822876,
-0.3666142225265503,
0.04281583055853844,
0.027426358312368393,
0.2363474816083908,
-0.19648320972919464,
-0.021266523748636246,
-0.37044191360473633,
-0.4293767511844635,
0.34087175130844116,
0.21867555379867554,
0.15108667314052582,
-0.13777554035186768,
-0.25209516286849976,
-0.18938817083835602,
0.23756487667560577,
-0.05025773122906685,
0.13051006197929382,
0.16158464550971985,
0.3297653794288635,
0.21354305744171143,
-0.08962245285511017,
-0.2591560482978821,
0.059330932796001434,
-0.24434684216976166,
-0.03673925995826721,
-0.04325622320175171,
0.2239866405725479,
-0.006536806467920542,
-0.06708256900310516,
-0.05709991976618767,
-0.14152757823467255,
-0.2020384520292282,
-0.2728189527988434,
0.004897084087133408,
0.4714062511920929,
0.03883348032832146,
-0.0572410449385643,
0.2966160476207733,
0.11932695657014847,
-0.05464460700750351,
-0.09463523328304291,
-0.05406773462891579,
0.03804081678390503,
0.08292826265096664,
0.14702749252319336,
-0.5560351610183716,
0.29555174708366394,
0.2068576216697693,
0.11078718304634094,
0.19198773801326752,
-0.04595693573355675,
0.23079901933670044,
-0.14571385085582733,
-0.16172629594802856,
-0.21011404693126678,
-0.022836515679955482,
0.12013876438140869,
0.34263065457344055,
-0.015398470684885979,
-0.19978837668895721,
-0.05434093996882439,
0.32568320631980896,
-0.24920465052127838,
0.30257830023765564,
-0.25614631175994873,
0.006172162480652332,
0.17537301778793335,
0.2459171712398529,
0.3020137548446655,
0.2495368868112564,
0.2298373579978943,
0.03320898488163948,
0.00009652960579842329,
0.00873175822198391,
0.009537736885249615,
0.11070167273283005,
-0.009532013908028603,
-0.0929054394364357,
-0.09954357892274857,
0.08781051635742188,
-0.3164929747581482,
-0.22590911388397217,
-0.16105391085147858,
-0.004654223565012217,
0.15792228281497955,
-0.40463972091674805,
0.031178543344140053,
-0.16689521074295044,
-0.16098670661449432,
0.1947198510169983,
0.23662729561328888,
0.08851044625043869,
-0.24439637362957,
0.11243287473917007,
-0.13993115723133087,
-0.10743025690317154,
0.17834246158599854,
-0.3176315128803253,
0.36863943934440613,
0.17743317782878876,
-0.3745800256729126,
-0.1720779538154602,
-0.1914309412240982,
-0.15785759687423706,
0.2095922976732254,
0.3081046938896179,
0.126158207654953,
0.3698248267173767,
-0.18502074480056763,
0.05226067453622818,
-0.49572625756263733,
-0.2549683153629303,
0.2927912175655365,
0.09910093247890472,
0.20934505760669708,
0.32060444355010986,
0.1460895538330078,
0.19476601481437683,
0.004293124657124281,
0.05460219457745552,
-0.21754132211208344,
-0.08381820470094681,
-0.09290437400341034,
0.11211243271827698,
-0.40325450897216797,
-0.38853758573532104,
-0.47203853726387024,
-0.11837825924158096,
-0.18976445496082306,
-0.08206181973218918,
0.2165319174528122,
0.0835459977388382,
0.06063057482242584,
0.18958595395088196,
0.04474300891160965,
-0.051138464361429214,
0.0040768831968307495,
0.14565110206604004,
-0.0983157530426979,
0.2394685298204422,
-0.24580857157707214,
-0.2983705401420593,
-0.07263977825641632,
-0.16636431217193604,
0.09540894627571106,
0.2498111128807068,
-0.13444842398166656,
-0.01199435442686081,
-0.25794604420661926,
0.2780574858188629,
0.13367366790771484,
0.13531821966171265,
0.20249207317829132,
0.09477513283491135,
-0.09557740390300751,
-0.149722158908844,
0.1883145272731781,
0.22139900922775269,
-0.25416433811187744,
-0.02331790328025818,
-0.015681089833378792,
0.38447126746177673,
-0.0703960582613945,
0.20239683985710144,
-0.1697627156972885,
-0.36621755361557007,
0.19067540764808655,
-0.5317690968513489,
0.7736567854881287,
-0.042454417794942856,
-0.042067237198352814,
-0.11637399345636368,
0.1704336404800415,
-0.24281296133995056,
0.1456599086523056,
-0.10827998071908951,
-0.10259287059307098,
-0.2546352744102478,
0.19410309195518494,
0.13003163039684296,
-0.234303280711174,
-0.08847101032733917,
-0.2278277575969696,
0.04530719295144081,
0.19936631619930267,
0.32574716210365295,
-0.19519105553627014,
0.038079634308815,
-0.052590083330869675,
0.06879917532205582,
-0.09225405007600784,
-0.07954602688550949,
-0.6976776123046875,
0.07586749643087387,
-0.3227127492427826,
0.38803115487098694,
-0.07364483922719955,
0.26461270451545715,
0.062492117285728455,
-0.23455117642879486,
-0.18200206756591797,
-0.3268337845802307,
0.2879946529865265,
-0.5302363038063049,
0.230531245470047,
0.14844614267349243,
0.3026476502418518,
-0.36501580476760864,
-0.050934087485075,
-0.5135205984115601,
0.2605781853199005,
0.12095721811056137,
0.2571867108345032,
-0.08209070563316345,
-0.16765046119689941,
0.22782832384109497,
0.017351023852825165,
-0.05769996717572212,
-0.1654740422964096,
-0.05877846106886864,
-0.1848284900188446,
-0.374530553817749,
-0.008283610455691814,
-0.0780082419514656,
-0.1565951704978943,
-0.16577237844467163,
-0.14118513464927673,
-0.24952659010887146,
0.057380031794309616,
0.24919790029525757,
0.3399280905723572,
0.07580418884754181,
0.20801599323749542,
0.2268524020910263,
-0.4340726435184479,
0.2700817883014679,
0.23010234534740448,
0.1995076835155487,
-0.27844712138175964,
-0.1666932851076126,
0.20157235860824585,
-0.15055227279663086,
0.6238096952438354,
0.03488961234688759,
-0.12694618105888367,
-0.14322541654109955,
0.019095314666628838,
0.0776793509721756,
-0.2742980122566223,
0.3394791781902313,
0.1278858631849289,
0.06524628400802612,
-0.33448269963264465,
-0.45929062366485596,
0.3172002136707306,
0.31911250948905945,
-0.0736890435218811,
0.066740483045578,
-0.006581366062164307,
-0.3373788297176361,
0.07167106866836548,
0.11426613479852676,
0.3435918986797333,
-0.16142113506793976,
0.05405055359005928,
0.15635502338409424,
0.014134779572486877,
0.41160836815834045,
-0.13895320892333984,
-0.22495025396347046,
-0.3498494327068329,
-0.32945218682289124,
-0.054701365530490875,
-0.22235986590385437,
0.2802627980709076,
0.414838045835495,
-0.12993578612804413,
0.311349481344223,
-0.11043350398540497,
0.1052524596452713,
0.09259805083274841,
0.26401641964912415,
-0.3170114755630493,
0.017545806244015694,
0.06882038712501526,
0.29529231786727905,
0.13055267930030823,
-0.030251605436205864,
-0.1394539624452591,
0.19731150567531586,
0.06333639472723007,
-0.26893454790115356,
-0.07935157418251038,
0.1975773125886917,
-0.08557906746864319,
0.02730444446206093,
-0.1352439671754837,
-0.0031084769871085882,
0.1376470923423767,
0.23125018179416656,
0.17856955528259277,
0.5076372623443604,
-0.08304227143526077,
0.21941573917865753,
-0.10951607674360275,
0.18528158962726593,
0.2472895234823227,
0.10623187571763992,
0.3181799054145813,
0.14947566390037537,
-0.31811144948005676,
0.05304447561502457,
0.024709651246666908,
-0.034365639090538025,
0.19000977277755737,
0.0159982331097126,
0.12013959139585495,
-0.29668930172920227,
-0.2574707567691803,
-0.056300465017557144,
-0.15234516561031342,
0.12655936181545258,
0.19773276150226593,
-0.14195357263088226,
-0.02482062391936779,
0.3856178820133209,
-0.1641608029603958,
-0.18231827020645142,
-0.157395139336586,
0.12431871145963669,
-0.11281241476535797,
0.03582664206624031,
0.20012177526950836,
0.12803980708122253,
0.06473685055971146,
-0.47059357166290283,
-0.05008413642644882,
0.4825170338153839,
0.021273158490657806,
0.2309105098247528,
-0.0020610063802450895,
-0.0925416424870491,
0.16393950581550598,
0.21872320771217346,
-0.06206934526562691,
0.02117175981402397,
0.043210066854953766,
-0.2011876106262207,
-0.2918996810913086,
0.08061530441045761,
0.20840239524841309,
0.4862324893474579,
0.27636808156967163,
-0.17306749522686005,
-0.15578694641590118,
-0.3157207667827606,
-0.4088647663593292,
-0.2637399733066559,
-0.055146314203739166,
0.06800314784049988,
0.374734103679657,
0.28742265701293945,
0.054192934185266495,
-0.27597615122795105,
0.23240137100219727,
-0.04178740829229355,
-0.08642907440662384,
-0.3416120707988739,
0.012850859202444553,
0.08780469745397568,
-0.054452214390039444,
0.16466227173805237,
0.11744560301303864,
-0.12728461623191833,
-0.19627289474010468,
-0.3105180263519287,
0.01871279627084732,
-0.004410388879477978,
-0.18043270707130432,
0.06273430585861206,
0.10264002531766891,
-0.20538261532783508,
-0.1898232102394104,
0.10359514504671097,
-0.03642313554883003,
0.05871064215898514,
-0.24511702358722687,
0.3784095048904419,
-0.022674521431326866,
0.0034461161121726036,
0.18901196122169495,
0.1942967176437378,
0.29515931010246277,
0.21907329559326172,
0.15803693234920502,
-0.1561623513698578,
-0.11042987555265427,
0.25392407178878784,
0.7011096477508545,
0.314361572265625,
-0.1883096843957901,
0.10402873903512955,
0.22191525995731354,
0.2800584137439728,
-0.48337653279304504,
-0.0337689034640789,
0.17552560567855835,
-0.13505063951015472,
0.38812506198883057,
0.3272504210472107,
0.1071920320391655,
-0.11446565389633179,
0.2525237500667572,
0.012538093142211437,
0.442891389131546,
-0.2176285982131958,
0.08130990713834763,
0.3822910487651825,
-0.21075928211212158,
-0.10965292155742645,
0.07730510830879211,
0.12251078337430954,
0.14056935906410217,
0.3145765960216522,
-0.15730543434619904,
0.42409461736679077,
0.26822787523269653,
0.04625224322080612,
-0.020107602700591087,
-0.26626765727996826,
0.4101414382457733,
-0.08431512117385864,
0.08039025217294693,
0.09385775029659271,
0.1706474870443344,
0.3053487539291382,
-0.23271389305591583,
0.02340805158019066,
-0.32299184799194336,
-0.0020371179562062025,
-0.004831079859286547,
-0.016628103330731392,
-0.3652363121509552,
-0.053134169429540634,
-0.052431363612413406,
0.012389128096401691,
-0.03764206916093826,
-0.014058382250368595,
-0.21547198295593262,
-0.0640343651175499,
0.19912874698638916,
-0.01258101873099804,
0.31582674384117126,
0.0014954698272049427,
0.0478644035756588,
-0.20688366889953613,
0.06937269866466522,
0.12947110831737518,
-0.026830514892935753,
0.2059977501630783,
0.2517998516559601,
0.390961617231369,
0.22901038825511932,
0.21495743095874786,
0.001205968321301043,
-0.16223633289337158,
-0.12219568341970444,
-0.2516061067581177,
0.053992774337530136,
-0.06688590347766876,
-0.11086039245128632,
0.37306955456733704,
0.3432568907737732,
-0.15773528814315796,
-0.1415846347808838,
0.09912478178739548,
0.058652713894844055,
-0.29095515608787537,
0.12961773574352264,
0.11260117590427399,
-0.11218815296888351,
-0.22277547419071198,
-0.036663126200437546,
-0.19679436087608337,
-0.1045934185385704,
0.309487909078598,
-0.056815799325704575,
0.3283396363258362,
-0.19109413027763367,
0.15087899565696716,
-0.12006606161594391,
0.3416846692562103,
0.09822716563940048,
0.03831974416971207,
0.00432982575148344,
-0.20004475116729736,
-0.6663771271705627,
-0.167014017701149,
-0.07280322909355164,
-0.2887115180492401,
-0.2612493932247162,
0.11245579272508621,
0.3623698055744171,
-0.191613107919693,
0.20906133949756622,
-0.03096849098801613,
-0.10832007229328156,
-0.09802191704511642,
-0.20789837837219238,
-0.29712486267089844,
-0.2970387041568756,
-0.07414419949054718,
0.0432845875620842,
-0.4444464445114136,
-0.08605556190013885,
-0.08617385476827621,
0.09828108549118042,
-0.010083556175231934,
0.025294359773397446,
0.22434549033641815,
-0.3001258671283722,
0.40219932794570923,
0.002045269124209881,
0.7609817385673523,
-0.16218100488185883,
0.1837928593158722,
-0.25542309880256653,
-0.06754633039236069,
-0.1470840722322464,
0.20248109102249146,
-0.09074455499649048,
-0.0804930254817009,
-0.19994719326496124,
0.029996125027537346,
-0.04083161801099777,
-0.0829157903790474,
0.23553575575351715,
0.019598938524723053,
-0.05127933248877525,
-0.18547646701335907,
-0.27705395221710205,
0.038983725011348724,
0.06743162125349045,
0.023210367187857628,
-0.1395650953054428,
0.14136427640914917,
0.08625805377960205,
-0.13643455505371094,
0.36904820799827576,
-0.07268886268138885,
-0.3552284240722656,
-0.2635592520236969,
0.1610010415315628,
-0.3480725586414337,
-0.15343035757541656,
0.009711351245641708,
0.1023525595664978,
0.2974222004413605,
-0.08505605906248093,
-0.07228382676839828,
0.24516521394252777,
0.022054165601730347,
0.20614764094352722,
-0.035788409411907196,
0.21126599609851837,
0.058817509561777115,
-0.29351481795310974,
-0.26091983914375305,
-0.13104185461997986
] |
https://github.com/huggingface/datasets/issues/3162
|
`datasets-cli test` should work with datasets without scripts
|
Hi ! You can run the command if you download the repository
```
git clone https://huggingface.co/datasets/huggingface/DataMeasurementsTest
```
and run the command
```
datasets-cli test DataMeasurementsTest/DataMeasurementsTest.py
```
(though on my side it doesn't manage to download the data since the dataset is private ^^)
|
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 43 |
`datasets-cli test` should work with datasets without scripts
|
[
-0.7772921323776245,
0.23359768092632294,
-0.18654882907867432,
-0.24163000285625458,
0.056195858865976334,
0.18935929238796234,
0.4240715205669403,
0.40640518069267273,
0.325748473405838,
0.12547411024570465,
-0.015936708077788353,
0.11381346732378006,
-0.1479400247335434,
0.3383498191833496,
0.07243964076042175,
0.2921241223812103,
-0.08945080637931824,
0.3481610417366028,
-0.23578625917434692,
0.11913958191871643,
-0.11413634568452835,
-0.18710605800151825,
-0.05166475102305412,
0.026805605739355087,
-0.17971454560756683,
-0.14044296741485596,
-0.12915632128715515,
0.17358292639255524,
-0.10054922848939896,
-0.2694452106952667,
0.45860594511032104,
0.47313085198402405,
0.24961605668067932,
0.3371078073978424,
-0.00010490382555872202,
0.1118873655796051,
0.2948106825351715,
-0.10909148305654526,
-0.4247133731842041,
0.11112786084413528,
-0.4161779582500458,
0.05606970563530922,
0.04271436110138893,
-0.4775942265987396,
-0.1879008263349533,
-0.04096043109893799,
0.09823478758335114,
-0.7446628212928772,
-0.047700490802526474,
0.30823084712028503,
0.2686741054058075,
0.4631454646587372,
-0.4682489037513733,
-0.28667816519737244,
0.050867609679698944,
0.19743612408638,
0.016028765588998795,
-0.03358284756541252,
0.4378211498260498,
-0.243205726146698,
0.1558658927679062,
0.17621852457523346,
-0.016535215079784393,
-0.009804348461329937,
0.041229598224163055,
-0.15895968675613403,
-0.08897892385721207,
-0.16217906773090363,
0.14873814582824707,
0.24421335756778717,
0.5808706879615784,
-0.6595324277877808,
-0.24511459469795227,
0.047806911170482635,
-0.1862572431564331,
-0.019724559038877487,
0.03287104144692421,
0.19985666871070862,
-0.01584865339100361,
0.19810421764850616,
-0.4079655110836029,
-0.08350389450788498,
-0.06483347713947296,
-0.12072683870792389,
-0.04561195522546768,
0.07374938577413559,
0.02769816480576992,
0.09623593091964722,
-0.022564269602298737,
-0.1012575775384903,
0.04482045769691467,
-0.2196415811777115,
-0.42859286069869995,
0.13631562888622284,
-0.09222079068422318,
-0.36942702531814575,
0.13283900916576385,
0.15576399862766266,
0.4143785536289215,
0.35540956258773804,
0.03719406574964523,
0.27354565262794495,
-0.0840895026922226,
0.09649111330509186,
0.19681231677532196,
0.06564725190401077,
0.4494178295135498,
0.28333234786987305,
0.5198184847831726,
0.12995769083499908,
-0.0487079992890358,
-0.02980956621468067,
0.09221029281616211,
-0.20806337893009186,
-0.03626607730984688,
0.05770856514573097,
0.26208609342575073,
-0.19228701293468475,
-0.21753360331058502,
0.15352101624011993,
0.03724284842610359,
-0.13916756212711334,
0.1171426996588707,
0.4911973476409912,
0.18465501070022583,
-0.008919164538383484,
0.04743808135390282,
0.15626804530620575,
-0.03503848984837532,
-0.34214168787002563,
-0.20127929747104645,
0.21922411024570465,
0.009819157421588898,
-0.10511557012796402,
0.3351437747478485,
0.18137146532535553,
0.12406675517559052,
-0.26502230763435364,
-0.06278954446315765,
0.13172060251235962,
0.3704123795032501,
0.12154219299554825,
0.3472396731376648,
0.22189337015151978,
0.3247065246105194,
0.0028308492619544268,
0.05912631377577782,
-0.3036358058452606,
-0.21667681634426117,
0.2378084510564804,
0.019593343138694763,
-0.14026087522506714,
0.11869456619024277,
0.24397067725658417,
-0.28920769691467285,
-0.05039447173476219,
-0.11109116673469543,
-0.056517209857702255,
-0.08766777068376541,
-0.27395474910736084,
0.0820019394159317,
-0.08898304402828217,
-0.008631574921309948,
0.08748181909322739,
0.1047077551484108,
0.4276668131351471,
-0.7129131555557251,
0.11828101426362991,
0.02660965733230114,
-0.368808776140213,
-0.10773876309394836,
-0.12704430520534515,
-0.08911486715078354,
0.1354454755783081,
-0.20753151178359985,
0.03507864847779274,
0.3280167579650879,
-0.3713694214820862,
-0.01820988580584526,
0.21704138815402985,
0.2384520322084427,
-0.15973171591758728,
0.02889338694512844,
0.10084117203950882,
-0.05109557509422302,
-0.07541677355766296,
-0.4130837619304657,
0.10267297178506851,
0.0090315667912364,
0.13573625683784485,
0.11992349475622177,
-0.21976186335086823,
0.04435708373785019,
0.051003724336624146,
0.2735154628753662,
0.055759139358997345,
0.2795245349407196,
-0.11639288067817688,
0.30599743127822876,
-0.3666142225265503,
0.04281583055853844,
0.027426358312368393,
0.2363474816083908,
-0.19648320972919464,
-0.021266523748636246,
-0.37044191360473633,
-0.4293767511844635,
0.34087175130844116,
0.21867555379867554,
0.15108667314052582,
-0.13777554035186768,
-0.25209516286849976,
-0.18938817083835602,
0.23756487667560577,
-0.05025773122906685,
0.13051006197929382,
0.16158464550971985,
0.3297653794288635,
0.21354305744171143,
-0.08962245285511017,
-0.2591560482978821,
0.059330932796001434,
-0.24434684216976166,
-0.03673925995826721,
-0.04325622320175171,
0.2239866405725479,
-0.006536806467920542,
-0.06708256900310516,
-0.05709991976618767,
-0.14152757823467255,
-0.2020384520292282,
-0.2728189527988434,
0.004897084087133408,
0.4714062511920929,
0.03883348032832146,
-0.0572410449385643,
0.2966160476207733,
0.11932695657014847,
-0.05464460700750351,
-0.09463523328304291,
-0.05406773462891579,
0.03804081678390503,
0.08292826265096664,
0.14702749252319336,
-0.5560351610183716,
0.29555174708366394,
0.2068576216697693,
0.11078718304634094,
0.19198773801326752,
-0.04595693573355675,
0.23079901933670044,
-0.14571385085582733,
-0.16172629594802856,
-0.21011404693126678,
-0.022836515679955482,
0.12013876438140869,
0.34263065457344055,
-0.015398470684885979,
-0.19978837668895721,
-0.05434093996882439,
0.32568320631980896,
-0.24920465052127838,
0.30257830023765564,
-0.25614631175994873,
0.006172162480652332,
0.17537301778793335,
0.2459171712398529,
0.3020137548446655,
0.2495368868112564,
0.2298373579978943,
0.03320898488163948,
0.00009652960579842329,
0.00873175822198391,
0.009537736885249615,
0.11070167273283005,
-0.009532013908028603,
-0.0929054394364357,
-0.09954357892274857,
0.08781051635742188,
-0.3164929747581482,
-0.22590911388397217,
-0.16105391085147858,
-0.004654223565012217,
0.15792228281497955,
-0.40463972091674805,
0.031178543344140053,
-0.16689521074295044,
-0.16098670661449432,
0.1947198510169983,
0.23662729561328888,
0.08851044625043869,
-0.24439637362957,
0.11243287473917007,
-0.13993115723133087,
-0.10743025690317154,
0.17834246158599854,
-0.3176315128803253,
0.36863943934440613,
0.17743317782878876,
-0.3745800256729126,
-0.1720779538154602,
-0.1914309412240982,
-0.15785759687423706,
0.2095922976732254,
0.3081046938896179,
0.126158207654953,
0.3698248267173767,
-0.18502074480056763,
0.05226067453622818,
-0.49572625756263733,
-0.2549683153629303,
0.2927912175655365,
0.09910093247890472,
0.20934505760669708,
0.32060444355010986,
0.1460895538330078,
0.19476601481437683,
0.004293124657124281,
0.05460219457745552,
-0.21754132211208344,
-0.08381820470094681,
-0.09290437400341034,
0.11211243271827698,
-0.40325450897216797,
-0.38853758573532104,
-0.47203853726387024,
-0.11837825924158096,
-0.18976445496082306,
-0.08206181973218918,
0.2165319174528122,
0.0835459977388382,
0.06063057482242584,
0.18958595395088196,
0.04474300891160965,
-0.051138464361429214,
0.0040768831968307495,
0.14565110206604004,
-0.0983157530426979,
0.2394685298204422,
-0.24580857157707214,
-0.2983705401420593,
-0.07263977825641632,
-0.16636431217193604,
0.09540894627571106,
0.2498111128807068,
-0.13444842398166656,
-0.01199435442686081,
-0.25794604420661926,
0.2780574858188629,
0.13367366790771484,
0.13531821966171265,
0.20249207317829132,
0.09477513283491135,
-0.09557740390300751,
-0.149722158908844,
0.1883145272731781,
0.22139900922775269,
-0.25416433811187744,
-0.02331790328025818,
-0.015681089833378792,
0.38447126746177673,
-0.0703960582613945,
0.20239683985710144,
-0.1697627156972885,
-0.36621755361557007,
0.19067540764808655,
-0.5317690968513489,
0.7736567854881287,
-0.042454417794942856,
-0.042067237198352814,
-0.11637399345636368,
0.1704336404800415,
-0.24281296133995056,
0.1456599086523056,
-0.10827998071908951,
-0.10259287059307098,
-0.2546352744102478,
0.19410309195518494,
0.13003163039684296,
-0.234303280711174,
-0.08847101032733917,
-0.2278277575969696,
0.04530719295144081,
0.19936631619930267,
0.32574716210365295,
-0.19519105553627014,
0.038079634308815,
-0.052590083330869675,
0.06879917532205582,
-0.09225405007600784,
-0.07954602688550949,
-0.6976776123046875,
0.07586749643087387,
-0.3227127492427826,
0.38803115487098694,
-0.07364483922719955,
0.26461270451545715,
0.062492117285728455,
-0.23455117642879486,
-0.18200206756591797,
-0.3268337845802307,
0.2879946529865265,
-0.5302363038063049,
0.230531245470047,
0.14844614267349243,
0.3026476502418518,
-0.36501580476760864,
-0.050934087485075,
-0.5135205984115601,
0.2605781853199005,
0.12095721811056137,
0.2571867108345032,
-0.08209070563316345,
-0.16765046119689941,
0.22782832384109497,
0.017351023852825165,
-0.05769996717572212,
-0.1654740422964096,
-0.05877846106886864,
-0.1848284900188446,
-0.374530553817749,
-0.008283610455691814,
-0.0780082419514656,
-0.1565951704978943,
-0.16577237844467163,
-0.14118513464927673,
-0.24952659010887146,
0.057380031794309616,
0.24919790029525757,
0.3399280905723572,
0.07580418884754181,
0.20801599323749542,
0.2268524020910263,
-0.4340726435184479,
0.2700817883014679,
0.23010234534740448,
0.1995076835155487,
-0.27844712138175964,
-0.1666932851076126,
0.20157235860824585,
-0.15055227279663086,
0.6238096952438354,
0.03488961234688759,
-0.12694618105888367,
-0.14322541654109955,
0.019095314666628838,
0.0776793509721756,
-0.2742980122566223,
0.3394791781902313,
0.1278858631849289,
0.06524628400802612,
-0.33448269963264465,
-0.45929062366485596,
0.3172002136707306,
0.31911250948905945,
-0.0736890435218811,
0.066740483045578,
-0.006581366062164307,
-0.3373788297176361,
0.07167106866836548,
0.11426613479852676,
0.3435918986797333,
-0.16142113506793976,
0.05405055359005928,
0.15635502338409424,
0.014134779572486877,
0.41160836815834045,
-0.13895320892333984,
-0.22495025396347046,
-0.3498494327068329,
-0.32945218682289124,
-0.054701365530490875,
-0.22235986590385437,
0.2802627980709076,
0.414838045835495,
-0.12993578612804413,
0.311349481344223,
-0.11043350398540497,
0.1052524596452713,
0.09259805083274841,
0.26401641964912415,
-0.3170114755630493,
0.017545806244015694,
0.06882038712501526,
0.29529231786727905,
0.13055267930030823,
-0.030251605436205864,
-0.1394539624452591,
0.19731150567531586,
0.06333639472723007,
-0.26893454790115356,
-0.07935157418251038,
0.1975773125886917,
-0.08557906746864319,
0.02730444446206093,
-0.1352439671754837,
-0.0031084769871085882,
0.1376470923423767,
0.23125018179416656,
0.17856955528259277,
0.5076372623443604,
-0.08304227143526077,
0.21941573917865753,
-0.10951607674360275,
0.18528158962726593,
0.2472895234823227,
0.10623187571763992,
0.3181799054145813,
0.14947566390037537,
-0.31811144948005676,
0.05304447561502457,
0.024709651246666908,
-0.034365639090538025,
0.19000977277755737,
0.0159982331097126,
0.12013959139585495,
-0.29668930172920227,
-0.2574707567691803,
-0.056300465017557144,
-0.15234516561031342,
0.12655936181545258,
0.19773276150226593,
-0.14195357263088226,
-0.02482062391936779,
0.3856178820133209,
-0.1641608029603958,
-0.18231827020645142,
-0.157395139336586,
0.12431871145963669,
-0.11281241476535797,
0.03582664206624031,
0.20012177526950836,
0.12803980708122253,
0.06473685055971146,
-0.47059357166290283,
-0.05008413642644882,
0.4825170338153839,
0.021273158490657806,
0.2309105098247528,
-0.0020610063802450895,
-0.0925416424870491,
0.16393950581550598,
0.21872320771217346,
-0.06206934526562691,
0.02117175981402397,
0.043210066854953766,
-0.2011876106262207,
-0.2918996810913086,
0.08061530441045761,
0.20840239524841309,
0.4862324893474579,
0.27636808156967163,
-0.17306749522686005,
-0.15578694641590118,
-0.3157207667827606,
-0.4088647663593292,
-0.2637399733066559,
-0.055146314203739166,
0.06800314784049988,
0.374734103679657,
0.28742265701293945,
0.054192934185266495,
-0.27597615122795105,
0.23240137100219727,
-0.04178740829229355,
-0.08642907440662384,
-0.3416120707988739,
0.012850859202444553,
0.08780469745397568,
-0.054452214390039444,
0.16466227173805237,
0.11744560301303864,
-0.12728461623191833,
-0.19627289474010468,
-0.3105180263519287,
0.01871279627084732,
-0.004410388879477978,
-0.18043270707130432,
0.06273430585861206,
0.10264002531766891,
-0.20538261532783508,
-0.1898232102394104,
0.10359514504671097,
-0.03642313554883003,
0.05871064215898514,
-0.24511702358722687,
0.3784095048904419,
-0.022674521431326866,
0.0034461161121726036,
0.18901196122169495,
0.1942967176437378,
0.29515931010246277,
0.21907329559326172,
0.15803693234920502,
-0.1561623513698578,
-0.11042987555265427,
0.25392407178878784,
0.7011096477508545,
0.314361572265625,
-0.1883096843957901,
0.10402873903512955,
0.22191525995731354,
0.2800584137439728,
-0.48337653279304504,
-0.0337689034640789,
0.17552560567855835,
-0.13505063951015472,
0.38812506198883057,
0.3272504210472107,
0.1071920320391655,
-0.11446565389633179,
0.2525237500667572,
0.012538093142211437,
0.442891389131546,
-0.2176285982131958,
0.08130990713834763,
0.3822910487651825,
-0.21075928211212158,
-0.10965292155742645,
0.07730510830879211,
0.12251078337430954,
0.14056935906410217,
0.3145765960216522,
-0.15730543434619904,
0.42409461736679077,
0.26822787523269653,
0.04625224322080612,
-0.020107602700591087,
-0.26626765727996826,
0.4101414382457733,
-0.08431512117385864,
0.08039025217294693,
0.09385775029659271,
0.1706474870443344,
0.3053487539291382,
-0.23271389305591583,
0.02340805158019066,
-0.32299184799194336,
-0.0020371179562062025,
-0.004831079859286547,
-0.016628103330731392,
-0.3652363121509552,
-0.053134169429540634,
-0.052431363612413406,
0.012389128096401691,
-0.03764206916093826,
-0.014058382250368595,
-0.21547198295593262,
-0.0640343651175499,
0.19912874698638916,
-0.01258101873099804,
0.31582674384117126,
0.0014954698272049427,
0.0478644035756588,
-0.20688366889953613,
0.06937269866466522,
0.12947110831737518,
-0.026830514892935753,
0.2059977501630783,
0.2517998516559601,
0.390961617231369,
0.22901038825511932,
0.21495743095874786,
0.001205968321301043,
-0.16223633289337158,
-0.12219568341970444,
-0.2516061067581177,
0.053992774337530136,
-0.06688590347766876,
-0.11086039245128632,
0.37306955456733704,
0.3432568907737732,
-0.15773528814315796,
-0.1415846347808838,
0.09912478178739548,
0.058652713894844055,
-0.29095515608787537,
0.12961773574352264,
0.11260117590427399,
-0.11218815296888351,
-0.22277547419071198,
-0.036663126200437546,
-0.19679436087608337,
-0.1045934185385704,
0.309487909078598,
-0.056815799325704575,
0.3283396363258362,
-0.19109413027763367,
0.15087899565696716,
-0.12006606161594391,
0.3416846692562103,
0.09822716563940048,
0.03831974416971207,
0.00432982575148344,
-0.20004475116729736,
-0.6663771271705627,
-0.167014017701149,
-0.07280322909355164,
-0.2887115180492401,
-0.2612493932247162,
0.11245579272508621,
0.3623698055744171,
-0.191613107919693,
0.20906133949756622,
-0.03096849098801613,
-0.10832007229328156,
-0.09802191704511642,
-0.20789837837219238,
-0.29712486267089844,
-0.2970387041568756,
-0.07414419949054718,
0.0432845875620842,
-0.4444464445114136,
-0.08605556190013885,
-0.08617385476827621,
0.09828108549118042,
-0.010083556175231934,
0.025294359773397446,
0.22434549033641815,
-0.3001258671283722,
0.40219932794570923,
0.002045269124209881,
0.7609817385673523,
-0.16218100488185883,
0.1837928593158722,
-0.25542309880256653,
-0.06754633039236069,
-0.1470840722322464,
0.20248109102249146,
-0.09074455499649048,
-0.0804930254817009,
-0.19994719326496124,
0.029996125027537346,
-0.04083161801099777,
-0.0829157903790474,
0.23553575575351715,
0.019598938524723053,
-0.05127933248877525,
-0.18547646701335907,
-0.27705395221710205,
0.038983725011348724,
0.06743162125349045,
0.023210367187857628,
-0.1395650953054428,
0.14136427640914917,
0.08625805377960205,
-0.13643455505371094,
0.36904820799827576,
-0.07268886268138885,
-0.3552284240722656,
-0.2635592520236969,
0.1610010415315628,
-0.3480725586414337,
-0.15343035757541656,
0.009711351245641708,
0.1023525595664978,
0.2974222004413605,
-0.08505605906248093,
-0.07228382676839828,
0.24516521394252777,
0.022054165601730347,
0.20614764094352722,
-0.035788409411907196,
0.21126599609851837,
0.058817509561777115,
-0.29351481795310974,
-0.26091983914375305,
-0.13104185461997986
] |
https://github.com/huggingface/datasets/issues/3162
|
`datasets-cli test` should work with datasets without scripts
|
> Hi ! You can run the command if you download the repository
>
> ```
> git clone https://huggingface.co/datasets/huggingface/DataMeasurementsTest
> ```
>
> and run the command
>
> ```
> datasets-cli test DataMeasurementsTest/DataMeasurementsTest.py
> ```
>
> (though on my side it doesn't manage to download the data since the dataset is private ^^)
Hi! Thanks for the info.
git cannot find the repository. Do you know if they have depreciated these tests and created a new one?
|
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 80 |
`datasets-cli test` should work with datasets without scripts
|
[
-0.7772921323776245,
0.23359768092632294,
-0.18654882907867432,
-0.24163000285625458,
0.056195858865976334,
0.18935929238796234,
0.4240715205669403,
0.40640518069267273,
0.325748473405838,
0.12547411024570465,
-0.015936708077788353,
0.11381346732378006,
-0.1479400247335434,
0.3383498191833496,
0.07243964076042175,
0.2921241223812103,
-0.08945080637931824,
0.3481610417366028,
-0.23578625917434692,
0.11913958191871643,
-0.11413634568452835,
-0.18710605800151825,
-0.05166475102305412,
0.026805605739355087,
-0.17971454560756683,
-0.14044296741485596,
-0.12915632128715515,
0.17358292639255524,
-0.10054922848939896,
-0.2694452106952667,
0.45860594511032104,
0.47313085198402405,
0.24961605668067932,
0.3371078073978424,
-0.00010490382555872202,
0.1118873655796051,
0.2948106825351715,
-0.10909148305654526,
-0.4247133731842041,
0.11112786084413528,
-0.4161779582500458,
0.05606970563530922,
0.04271436110138893,
-0.4775942265987396,
-0.1879008263349533,
-0.04096043109893799,
0.09823478758335114,
-0.7446628212928772,
-0.047700490802526474,
0.30823084712028503,
0.2686741054058075,
0.4631454646587372,
-0.4682489037513733,
-0.28667816519737244,
0.050867609679698944,
0.19743612408638,
0.016028765588998795,
-0.03358284756541252,
0.4378211498260498,
-0.243205726146698,
0.1558658927679062,
0.17621852457523346,
-0.016535215079784393,
-0.009804348461329937,
0.041229598224163055,
-0.15895968675613403,
-0.08897892385721207,
-0.16217906773090363,
0.14873814582824707,
0.24421335756778717,
0.5808706879615784,
-0.6595324277877808,
-0.24511459469795227,
0.047806911170482635,
-0.1862572431564331,
-0.019724559038877487,
0.03287104144692421,
0.19985666871070862,
-0.01584865339100361,
0.19810421764850616,
-0.4079655110836029,
-0.08350389450788498,
-0.06483347713947296,
-0.12072683870792389,
-0.04561195522546768,
0.07374938577413559,
0.02769816480576992,
0.09623593091964722,
-0.022564269602298737,
-0.1012575775384903,
0.04482045769691467,
-0.2196415811777115,
-0.42859286069869995,
0.13631562888622284,
-0.09222079068422318,
-0.36942702531814575,
0.13283900916576385,
0.15576399862766266,
0.4143785536289215,
0.35540956258773804,
0.03719406574964523,
0.27354565262794495,
-0.0840895026922226,
0.09649111330509186,
0.19681231677532196,
0.06564725190401077,
0.4494178295135498,
0.28333234786987305,
0.5198184847831726,
0.12995769083499908,
-0.0487079992890358,
-0.02980956621468067,
0.09221029281616211,
-0.20806337893009186,
-0.03626607730984688,
0.05770856514573097,
0.26208609342575073,
-0.19228701293468475,
-0.21753360331058502,
0.15352101624011993,
0.03724284842610359,
-0.13916756212711334,
0.1171426996588707,
0.4911973476409912,
0.18465501070022583,
-0.008919164538383484,
0.04743808135390282,
0.15626804530620575,
-0.03503848984837532,
-0.34214168787002563,
-0.20127929747104645,
0.21922411024570465,
0.009819157421588898,
-0.10511557012796402,
0.3351437747478485,
0.18137146532535553,
0.12406675517559052,
-0.26502230763435364,
-0.06278954446315765,
0.13172060251235962,
0.3704123795032501,
0.12154219299554825,
0.3472396731376648,
0.22189337015151978,
0.3247065246105194,
0.0028308492619544268,
0.05912631377577782,
-0.3036358058452606,
-0.21667681634426117,
0.2378084510564804,
0.019593343138694763,
-0.14026087522506714,
0.11869456619024277,
0.24397067725658417,
-0.28920769691467285,
-0.05039447173476219,
-0.11109116673469543,
-0.056517209857702255,
-0.08766777068376541,
-0.27395474910736084,
0.0820019394159317,
-0.08898304402828217,
-0.008631574921309948,
0.08748181909322739,
0.1047077551484108,
0.4276668131351471,
-0.7129131555557251,
0.11828101426362991,
0.02660965733230114,
-0.368808776140213,
-0.10773876309394836,
-0.12704430520534515,
-0.08911486715078354,
0.1354454755783081,
-0.20753151178359985,
0.03507864847779274,
0.3280167579650879,
-0.3713694214820862,
-0.01820988580584526,
0.21704138815402985,
0.2384520322084427,
-0.15973171591758728,
0.02889338694512844,
0.10084117203950882,
-0.05109557509422302,
-0.07541677355766296,
-0.4130837619304657,
0.10267297178506851,
0.0090315667912364,
0.13573625683784485,
0.11992349475622177,
-0.21976186335086823,
0.04435708373785019,
0.051003724336624146,
0.2735154628753662,
0.055759139358997345,
0.2795245349407196,
-0.11639288067817688,
0.30599743127822876,
-0.3666142225265503,
0.04281583055853844,
0.027426358312368393,
0.2363474816083908,
-0.19648320972919464,
-0.021266523748636246,
-0.37044191360473633,
-0.4293767511844635,
0.34087175130844116,
0.21867555379867554,
0.15108667314052582,
-0.13777554035186768,
-0.25209516286849976,
-0.18938817083835602,
0.23756487667560577,
-0.05025773122906685,
0.13051006197929382,
0.16158464550971985,
0.3297653794288635,
0.21354305744171143,
-0.08962245285511017,
-0.2591560482978821,
0.059330932796001434,
-0.24434684216976166,
-0.03673925995826721,
-0.04325622320175171,
0.2239866405725479,
-0.006536806467920542,
-0.06708256900310516,
-0.05709991976618767,
-0.14152757823467255,
-0.2020384520292282,
-0.2728189527988434,
0.004897084087133408,
0.4714062511920929,
0.03883348032832146,
-0.0572410449385643,
0.2966160476207733,
0.11932695657014847,
-0.05464460700750351,
-0.09463523328304291,
-0.05406773462891579,
0.03804081678390503,
0.08292826265096664,
0.14702749252319336,
-0.5560351610183716,
0.29555174708366394,
0.2068576216697693,
0.11078718304634094,
0.19198773801326752,
-0.04595693573355675,
0.23079901933670044,
-0.14571385085582733,
-0.16172629594802856,
-0.21011404693126678,
-0.022836515679955482,
0.12013876438140869,
0.34263065457344055,
-0.015398470684885979,
-0.19978837668895721,
-0.05434093996882439,
0.32568320631980896,
-0.24920465052127838,
0.30257830023765564,
-0.25614631175994873,
0.006172162480652332,
0.17537301778793335,
0.2459171712398529,
0.3020137548446655,
0.2495368868112564,
0.2298373579978943,
0.03320898488163948,
0.00009652960579842329,
0.00873175822198391,
0.009537736885249615,
0.11070167273283005,
-0.009532013908028603,
-0.0929054394364357,
-0.09954357892274857,
0.08781051635742188,
-0.3164929747581482,
-0.22590911388397217,
-0.16105391085147858,
-0.004654223565012217,
0.15792228281497955,
-0.40463972091674805,
0.031178543344140053,
-0.16689521074295044,
-0.16098670661449432,
0.1947198510169983,
0.23662729561328888,
0.08851044625043869,
-0.24439637362957,
0.11243287473917007,
-0.13993115723133087,
-0.10743025690317154,
0.17834246158599854,
-0.3176315128803253,
0.36863943934440613,
0.17743317782878876,
-0.3745800256729126,
-0.1720779538154602,
-0.1914309412240982,
-0.15785759687423706,
0.2095922976732254,
0.3081046938896179,
0.126158207654953,
0.3698248267173767,
-0.18502074480056763,
0.05226067453622818,
-0.49572625756263733,
-0.2549683153629303,
0.2927912175655365,
0.09910093247890472,
0.20934505760669708,
0.32060444355010986,
0.1460895538330078,
0.19476601481437683,
0.004293124657124281,
0.05460219457745552,
-0.21754132211208344,
-0.08381820470094681,
-0.09290437400341034,
0.11211243271827698,
-0.40325450897216797,
-0.38853758573532104,
-0.47203853726387024,
-0.11837825924158096,
-0.18976445496082306,
-0.08206181973218918,
0.2165319174528122,
0.0835459977388382,
0.06063057482242584,
0.18958595395088196,
0.04474300891160965,
-0.051138464361429214,
0.0040768831968307495,
0.14565110206604004,
-0.0983157530426979,
0.2394685298204422,
-0.24580857157707214,
-0.2983705401420593,
-0.07263977825641632,
-0.16636431217193604,
0.09540894627571106,
0.2498111128807068,
-0.13444842398166656,
-0.01199435442686081,
-0.25794604420661926,
0.2780574858188629,
0.13367366790771484,
0.13531821966171265,
0.20249207317829132,
0.09477513283491135,
-0.09557740390300751,
-0.149722158908844,
0.1883145272731781,
0.22139900922775269,
-0.25416433811187744,
-0.02331790328025818,
-0.015681089833378792,
0.38447126746177673,
-0.0703960582613945,
0.20239683985710144,
-0.1697627156972885,
-0.36621755361557007,
0.19067540764808655,
-0.5317690968513489,
0.7736567854881287,
-0.042454417794942856,
-0.042067237198352814,
-0.11637399345636368,
0.1704336404800415,
-0.24281296133995056,
0.1456599086523056,
-0.10827998071908951,
-0.10259287059307098,
-0.2546352744102478,
0.19410309195518494,
0.13003163039684296,
-0.234303280711174,
-0.08847101032733917,
-0.2278277575969696,
0.04530719295144081,
0.19936631619930267,
0.32574716210365295,
-0.19519105553627014,
0.038079634308815,
-0.052590083330869675,
0.06879917532205582,
-0.09225405007600784,
-0.07954602688550949,
-0.6976776123046875,
0.07586749643087387,
-0.3227127492427826,
0.38803115487098694,
-0.07364483922719955,
0.26461270451545715,
0.062492117285728455,
-0.23455117642879486,
-0.18200206756591797,
-0.3268337845802307,
0.2879946529865265,
-0.5302363038063049,
0.230531245470047,
0.14844614267349243,
0.3026476502418518,
-0.36501580476760864,
-0.050934087485075,
-0.5135205984115601,
0.2605781853199005,
0.12095721811056137,
0.2571867108345032,
-0.08209070563316345,
-0.16765046119689941,
0.22782832384109497,
0.017351023852825165,
-0.05769996717572212,
-0.1654740422964096,
-0.05877846106886864,
-0.1848284900188446,
-0.374530553817749,
-0.008283610455691814,
-0.0780082419514656,
-0.1565951704978943,
-0.16577237844467163,
-0.14118513464927673,
-0.24952659010887146,
0.057380031794309616,
0.24919790029525757,
0.3399280905723572,
0.07580418884754181,
0.20801599323749542,
0.2268524020910263,
-0.4340726435184479,
0.2700817883014679,
0.23010234534740448,
0.1995076835155487,
-0.27844712138175964,
-0.1666932851076126,
0.20157235860824585,
-0.15055227279663086,
0.6238096952438354,
0.03488961234688759,
-0.12694618105888367,
-0.14322541654109955,
0.019095314666628838,
0.0776793509721756,
-0.2742980122566223,
0.3394791781902313,
0.1278858631849289,
0.06524628400802612,
-0.33448269963264465,
-0.45929062366485596,
0.3172002136707306,
0.31911250948905945,
-0.0736890435218811,
0.066740483045578,
-0.006581366062164307,
-0.3373788297176361,
0.07167106866836548,
0.11426613479852676,
0.3435918986797333,
-0.16142113506793976,
0.05405055359005928,
0.15635502338409424,
0.014134779572486877,
0.41160836815834045,
-0.13895320892333984,
-0.22495025396347046,
-0.3498494327068329,
-0.32945218682289124,
-0.054701365530490875,
-0.22235986590385437,
0.2802627980709076,
0.414838045835495,
-0.12993578612804413,
0.311349481344223,
-0.11043350398540497,
0.1052524596452713,
0.09259805083274841,
0.26401641964912415,
-0.3170114755630493,
0.017545806244015694,
0.06882038712501526,
0.29529231786727905,
0.13055267930030823,
-0.030251605436205864,
-0.1394539624452591,
0.19731150567531586,
0.06333639472723007,
-0.26893454790115356,
-0.07935157418251038,
0.1975773125886917,
-0.08557906746864319,
0.02730444446206093,
-0.1352439671754837,
-0.0031084769871085882,
0.1376470923423767,
0.23125018179416656,
0.17856955528259277,
0.5076372623443604,
-0.08304227143526077,
0.21941573917865753,
-0.10951607674360275,
0.18528158962726593,
0.2472895234823227,
0.10623187571763992,
0.3181799054145813,
0.14947566390037537,
-0.31811144948005676,
0.05304447561502457,
0.024709651246666908,
-0.034365639090538025,
0.19000977277755737,
0.0159982331097126,
0.12013959139585495,
-0.29668930172920227,
-0.2574707567691803,
-0.056300465017557144,
-0.15234516561031342,
0.12655936181545258,
0.19773276150226593,
-0.14195357263088226,
-0.02482062391936779,
0.3856178820133209,
-0.1641608029603958,
-0.18231827020645142,
-0.157395139336586,
0.12431871145963669,
-0.11281241476535797,
0.03582664206624031,
0.20012177526950836,
0.12803980708122253,
0.06473685055971146,
-0.47059357166290283,
-0.05008413642644882,
0.4825170338153839,
0.021273158490657806,
0.2309105098247528,
-0.0020610063802450895,
-0.0925416424870491,
0.16393950581550598,
0.21872320771217346,
-0.06206934526562691,
0.02117175981402397,
0.043210066854953766,
-0.2011876106262207,
-0.2918996810913086,
0.08061530441045761,
0.20840239524841309,
0.4862324893474579,
0.27636808156967163,
-0.17306749522686005,
-0.15578694641590118,
-0.3157207667827606,
-0.4088647663593292,
-0.2637399733066559,
-0.055146314203739166,
0.06800314784049988,
0.374734103679657,
0.28742265701293945,
0.054192934185266495,
-0.27597615122795105,
0.23240137100219727,
-0.04178740829229355,
-0.08642907440662384,
-0.3416120707988739,
0.012850859202444553,
0.08780469745397568,
-0.054452214390039444,
0.16466227173805237,
0.11744560301303864,
-0.12728461623191833,
-0.19627289474010468,
-0.3105180263519287,
0.01871279627084732,
-0.004410388879477978,
-0.18043270707130432,
0.06273430585861206,
0.10264002531766891,
-0.20538261532783508,
-0.1898232102394104,
0.10359514504671097,
-0.03642313554883003,
0.05871064215898514,
-0.24511702358722687,
0.3784095048904419,
-0.022674521431326866,
0.0034461161121726036,
0.18901196122169495,
0.1942967176437378,
0.29515931010246277,
0.21907329559326172,
0.15803693234920502,
-0.1561623513698578,
-0.11042987555265427,
0.25392407178878784,
0.7011096477508545,
0.314361572265625,
-0.1883096843957901,
0.10402873903512955,
0.22191525995731354,
0.2800584137439728,
-0.48337653279304504,
-0.0337689034640789,
0.17552560567855835,
-0.13505063951015472,
0.38812506198883057,
0.3272504210472107,
0.1071920320391655,
-0.11446565389633179,
0.2525237500667572,
0.012538093142211437,
0.442891389131546,
-0.2176285982131958,
0.08130990713834763,
0.3822910487651825,
-0.21075928211212158,
-0.10965292155742645,
0.07730510830879211,
0.12251078337430954,
0.14056935906410217,
0.3145765960216522,
-0.15730543434619904,
0.42409461736679077,
0.26822787523269653,
0.04625224322080612,
-0.020107602700591087,
-0.26626765727996826,
0.4101414382457733,
-0.08431512117385864,
0.08039025217294693,
0.09385775029659271,
0.1706474870443344,
0.3053487539291382,
-0.23271389305591583,
0.02340805158019066,
-0.32299184799194336,
-0.0020371179562062025,
-0.004831079859286547,
-0.016628103330731392,
-0.3652363121509552,
-0.053134169429540634,
-0.052431363612413406,
0.012389128096401691,
-0.03764206916093826,
-0.014058382250368595,
-0.21547198295593262,
-0.0640343651175499,
0.19912874698638916,
-0.01258101873099804,
0.31582674384117126,
0.0014954698272049427,
0.0478644035756588,
-0.20688366889953613,
0.06937269866466522,
0.12947110831737518,
-0.026830514892935753,
0.2059977501630783,
0.2517998516559601,
0.390961617231369,
0.22901038825511932,
0.21495743095874786,
0.001205968321301043,
-0.16223633289337158,
-0.12219568341970444,
-0.2516061067581177,
0.053992774337530136,
-0.06688590347766876,
-0.11086039245128632,
0.37306955456733704,
0.3432568907737732,
-0.15773528814315796,
-0.1415846347808838,
0.09912478178739548,
0.058652713894844055,
-0.29095515608787537,
0.12961773574352264,
0.11260117590427399,
-0.11218815296888351,
-0.22277547419071198,
-0.036663126200437546,
-0.19679436087608337,
-0.1045934185385704,
0.309487909078598,
-0.056815799325704575,
0.3283396363258362,
-0.19109413027763367,
0.15087899565696716,
-0.12006606161594391,
0.3416846692562103,
0.09822716563940048,
0.03831974416971207,
0.00432982575148344,
-0.20004475116729736,
-0.6663771271705627,
-0.167014017701149,
-0.07280322909355164,
-0.2887115180492401,
-0.2612493932247162,
0.11245579272508621,
0.3623698055744171,
-0.191613107919693,
0.20906133949756622,
-0.03096849098801613,
-0.10832007229328156,
-0.09802191704511642,
-0.20789837837219238,
-0.29712486267089844,
-0.2970387041568756,
-0.07414419949054718,
0.0432845875620842,
-0.4444464445114136,
-0.08605556190013885,
-0.08617385476827621,
0.09828108549118042,
-0.010083556175231934,
0.025294359773397446,
0.22434549033641815,
-0.3001258671283722,
0.40219932794570923,
0.002045269124209881,
0.7609817385673523,
-0.16218100488185883,
0.1837928593158722,
-0.25542309880256653,
-0.06754633039236069,
-0.1470840722322464,
0.20248109102249146,
-0.09074455499649048,
-0.0804930254817009,
-0.19994719326496124,
0.029996125027537346,
-0.04083161801099777,
-0.0829157903790474,
0.23553575575351715,
0.019598938524723053,
-0.05127933248877525,
-0.18547646701335907,
-0.27705395221710205,
0.038983725011348724,
0.06743162125349045,
0.023210367187857628,
-0.1395650953054428,
0.14136427640914917,
0.08625805377960205,
-0.13643455505371094,
0.36904820799827576,
-0.07268886268138885,
-0.3552284240722656,
-0.2635592520236969,
0.1610010415315628,
-0.3480725586414337,
-0.15343035757541656,
0.009711351245641708,
0.1023525595664978,
0.2974222004413605,
-0.08505605906248093,
-0.07228382676839828,
0.24516521394252777,
0.022054165601730347,
0.20614764094352722,
-0.035788409411907196,
0.21126599609851837,
0.058817509561777115,
-0.29351481795310974,
-0.26091983914375305,
-0.13104185461997986
] |
https://github.com/huggingface/datasets/issues/3162
|
`datasets-cli test` should work with datasets without scripts
|
I think it's become private, but feel free to try with any other dataset like `lhoestq/test` for example at `https://huggingface.co/datasets/lhoestq/test`
|
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 20 |
`datasets-cli test` should work with datasets without scripts
|
[
-0.7772921323776245,
0.23359768092632294,
-0.18654882907867432,
-0.24163000285625458,
0.056195858865976334,
0.18935929238796234,
0.4240715205669403,
0.40640518069267273,
0.325748473405838,
0.12547411024570465,
-0.015936708077788353,
0.11381346732378006,
-0.1479400247335434,
0.3383498191833496,
0.07243964076042175,
0.2921241223812103,
-0.08945080637931824,
0.3481610417366028,
-0.23578625917434692,
0.11913958191871643,
-0.11413634568452835,
-0.18710605800151825,
-0.05166475102305412,
0.026805605739355087,
-0.17971454560756683,
-0.14044296741485596,
-0.12915632128715515,
0.17358292639255524,
-0.10054922848939896,
-0.2694452106952667,
0.45860594511032104,
0.47313085198402405,
0.24961605668067932,
0.3371078073978424,
-0.00010490382555872202,
0.1118873655796051,
0.2948106825351715,
-0.10909148305654526,
-0.4247133731842041,
0.11112786084413528,
-0.4161779582500458,
0.05606970563530922,
0.04271436110138893,
-0.4775942265987396,
-0.1879008263349533,
-0.04096043109893799,
0.09823478758335114,
-0.7446628212928772,
-0.047700490802526474,
0.30823084712028503,
0.2686741054058075,
0.4631454646587372,
-0.4682489037513733,
-0.28667816519737244,
0.050867609679698944,
0.19743612408638,
0.016028765588998795,
-0.03358284756541252,
0.4378211498260498,
-0.243205726146698,
0.1558658927679062,
0.17621852457523346,
-0.016535215079784393,
-0.009804348461329937,
0.041229598224163055,
-0.15895968675613403,
-0.08897892385721207,
-0.16217906773090363,
0.14873814582824707,
0.24421335756778717,
0.5808706879615784,
-0.6595324277877808,
-0.24511459469795227,
0.047806911170482635,
-0.1862572431564331,
-0.019724559038877487,
0.03287104144692421,
0.19985666871070862,
-0.01584865339100361,
0.19810421764850616,
-0.4079655110836029,
-0.08350389450788498,
-0.06483347713947296,
-0.12072683870792389,
-0.04561195522546768,
0.07374938577413559,
0.02769816480576992,
0.09623593091964722,
-0.022564269602298737,
-0.1012575775384903,
0.04482045769691467,
-0.2196415811777115,
-0.42859286069869995,
0.13631562888622284,
-0.09222079068422318,
-0.36942702531814575,
0.13283900916576385,
0.15576399862766266,
0.4143785536289215,
0.35540956258773804,
0.03719406574964523,
0.27354565262794495,
-0.0840895026922226,
0.09649111330509186,
0.19681231677532196,
0.06564725190401077,
0.4494178295135498,
0.28333234786987305,
0.5198184847831726,
0.12995769083499908,
-0.0487079992890358,
-0.02980956621468067,
0.09221029281616211,
-0.20806337893009186,
-0.03626607730984688,
0.05770856514573097,
0.26208609342575073,
-0.19228701293468475,
-0.21753360331058502,
0.15352101624011993,
0.03724284842610359,
-0.13916756212711334,
0.1171426996588707,
0.4911973476409912,
0.18465501070022583,
-0.008919164538383484,
0.04743808135390282,
0.15626804530620575,
-0.03503848984837532,
-0.34214168787002563,
-0.20127929747104645,
0.21922411024570465,
0.009819157421588898,
-0.10511557012796402,
0.3351437747478485,
0.18137146532535553,
0.12406675517559052,
-0.26502230763435364,
-0.06278954446315765,
0.13172060251235962,
0.3704123795032501,
0.12154219299554825,
0.3472396731376648,
0.22189337015151978,
0.3247065246105194,
0.0028308492619544268,
0.05912631377577782,
-0.3036358058452606,
-0.21667681634426117,
0.2378084510564804,
0.019593343138694763,
-0.14026087522506714,
0.11869456619024277,
0.24397067725658417,
-0.28920769691467285,
-0.05039447173476219,
-0.11109116673469543,
-0.056517209857702255,
-0.08766777068376541,
-0.27395474910736084,
0.0820019394159317,
-0.08898304402828217,
-0.008631574921309948,
0.08748181909322739,
0.1047077551484108,
0.4276668131351471,
-0.7129131555557251,
0.11828101426362991,
0.02660965733230114,
-0.368808776140213,
-0.10773876309394836,
-0.12704430520534515,
-0.08911486715078354,
0.1354454755783081,
-0.20753151178359985,
0.03507864847779274,
0.3280167579650879,
-0.3713694214820862,
-0.01820988580584526,
0.21704138815402985,
0.2384520322084427,
-0.15973171591758728,
0.02889338694512844,
0.10084117203950882,
-0.05109557509422302,
-0.07541677355766296,
-0.4130837619304657,
0.10267297178506851,
0.0090315667912364,
0.13573625683784485,
0.11992349475622177,
-0.21976186335086823,
0.04435708373785019,
0.051003724336624146,
0.2735154628753662,
0.055759139358997345,
0.2795245349407196,
-0.11639288067817688,
0.30599743127822876,
-0.3666142225265503,
0.04281583055853844,
0.027426358312368393,
0.2363474816083908,
-0.19648320972919464,
-0.021266523748636246,
-0.37044191360473633,
-0.4293767511844635,
0.34087175130844116,
0.21867555379867554,
0.15108667314052582,
-0.13777554035186768,
-0.25209516286849976,
-0.18938817083835602,
0.23756487667560577,
-0.05025773122906685,
0.13051006197929382,
0.16158464550971985,
0.3297653794288635,
0.21354305744171143,
-0.08962245285511017,
-0.2591560482978821,
0.059330932796001434,
-0.24434684216976166,
-0.03673925995826721,
-0.04325622320175171,
0.2239866405725479,
-0.006536806467920542,
-0.06708256900310516,
-0.05709991976618767,
-0.14152757823467255,
-0.2020384520292282,
-0.2728189527988434,
0.004897084087133408,
0.4714062511920929,
0.03883348032832146,
-0.0572410449385643,
0.2966160476207733,
0.11932695657014847,
-0.05464460700750351,
-0.09463523328304291,
-0.05406773462891579,
0.03804081678390503,
0.08292826265096664,
0.14702749252319336,
-0.5560351610183716,
0.29555174708366394,
0.2068576216697693,
0.11078718304634094,
0.19198773801326752,
-0.04595693573355675,
0.23079901933670044,
-0.14571385085582733,
-0.16172629594802856,
-0.21011404693126678,
-0.022836515679955482,
0.12013876438140869,
0.34263065457344055,
-0.015398470684885979,
-0.19978837668895721,
-0.05434093996882439,
0.32568320631980896,
-0.24920465052127838,
0.30257830023765564,
-0.25614631175994873,
0.006172162480652332,
0.17537301778793335,
0.2459171712398529,
0.3020137548446655,
0.2495368868112564,
0.2298373579978943,
0.03320898488163948,
0.00009652960579842329,
0.00873175822198391,
0.009537736885249615,
0.11070167273283005,
-0.009532013908028603,
-0.0929054394364357,
-0.09954357892274857,
0.08781051635742188,
-0.3164929747581482,
-0.22590911388397217,
-0.16105391085147858,
-0.004654223565012217,
0.15792228281497955,
-0.40463972091674805,
0.031178543344140053,
-0.16689521074295044,
-0.16098670661449432,
0.1947198510169983,
0.23662729561328888,
0.08851044625043869,
-0.24439637362957,
0.11243287473917007,
-0.13993115723133087,
-0.10743025690317154,
0.17834246158599854,
-0.3176315128803253,
0.36863943934440613,
0.17743317782878876,
-0.3745800256729126,
-0.1720779538154602,
-0.1914309412240982,
-0.15785759687423706,
0.2095922976732254,
0.3081046938896179,
0.126158207654953,
0.3698248267173767,
-0.18502074480056763,
0.05226067453622818,
-0.49572625756263733,
-0.2549683153629303,
0.2927912175655365,
0.09910093247890472,
0.20934505760669708,
0.32060444355010986,
0.1460895538330078,
0.19476601481437683,
0.004293124657124281,
0.05460219457745552,
-0.21754132211208344,
-0.08381820470094681,
-0.09290437400341034,
0.11211243271827698,
-0.40325450897216797,
-0.38853758573532104,
-0.47203853726387024,
-0.11837825924158096,
-0.18976445496082306,
-0.08206181973218918,
0.2165319174528122,
0.0835459977388382,
0.06063057482242584,
0.18958595395088196,
0.04474300891160965,
-0.051138464361429214,
0.0040768831968307495,
0.14565110206604004,
-0.0983157530426979,
0.2394685298204422,
-0.24580857157707214,
-0.2983705401420593,
-0.07263977825641632,
-0.16636431217193604,
0.09540894627571106,
0.2498111128807068,
-0.13444842398166656,
-0.01199435442686081,
-0.25794604420661926,
0.2780574858188629,
0.13367366790771484,
0.13531821966171265,
0.20249207317829132,
0.09477513283491135,
-0.09557740390300751,
-0.149722158908844,
0.1883145272731781,
0.22139900922775269,
-0.25416433811187744,
-0.02331790328025818,
-0.015681089833378792,
0.38447126746177673,
-0.0703960582613945,
0.20239683985710144,
-0.1697627156972885,
-0.36621755361557007,
0.19067540764808655,
-0.5317690968513489,
0.7736567854881287,
-0.042454417794942856,
-0.042067237198352814,
-0.11637399345636368,
0.1704336404800415,
-0.24281296133995056,
0.1456599086523056,
-0.10827998071908951,
-0.10259287059307098,
-0.2546352744102478,
0.19410309195518494,
0.13003163039684296,
-0.234303280711174,
-0.08847101032733917,
-0.2278277575969696,
0.04530719295144081,
0.19936631619930267,
0.32574716210365295,
-0.19519105553627014,
0.038079634308815,
-0.052590083330869675,
0.06879917532205582,
-0.09225405007600784,
-0.07954602688550949,
-0.6976776123046875,
0.07586749643087387,
-0.3227127492427826,
0.38803115487098694,
-0.07364483922719955,
0.26461270451545715,
0.062492117285728455,
-0.23455117642879486,
-0.18200206756591797,
-0.3268337845802307,
0.2879946529865265,
-0.5302363038063049,
0.230531245470047,
0.14844614267349243,
0.3026476502418518,
-0.36501580476760864,
-0.050934087485075,
-0.5135205984115601,
0.2605781853199005,
0.12095721811056137,
0.2571867108345032,
-0.08209070563316345,
-0.16765046119689941,
0.22782832384109497,
0.017351023852825165,
-0.05769996717572212,
-0.1654740422964096,
-0.05877846106886864,
-0.1848284900188446,
-0.374530553817749,
-0.008283610455691814,
-0.0780082419514656,
-0.1565951704978943,
-0.16577237844467163,
-0.14118513464927673,
-0.24952659010887146,
0.057380031794309616,
0.24919790029525757,
0.3399280905723572,
0.07580418884754181,
0.20801599323749542,
0.2268524020910263,
-0.4340726435184479,
0.2700817883014679,
0.23010234534740448,
0.1995076835155487,
-0.27844712138175964,
-0.1666932851076126,
0.20157235860824585,
-0.15055227279663086,
0.6238096952438354,
0.03488961234688759,
-0.12694618105888367,
-0.14322541654109955,
0.019095314666628838,
0.0776793509721756,
-0.2742980122566223,
0.3394791781902313,
0.1278858631849289,
0.06524628400802612,
-0.33448269963264465,
-0.45929062366485596,
0.3172002136707306,
0.31911250948905945,
-0.0736890435218811,
0.066740483045578,
-0.006581366062164307,
-0.3373788297176361,
0.07167106866836548,
0.11426613479852676,
0.3435918986797333,
-0.16142113506793976,
0.05405055359005928,
0.15635502338409424,
0.014134779572486877,
0.41160836815834045,
-0.13895320892333984,
-0.22495025396347046,
-0.3498494327068329,
-0.32945218682289124,
-0.054701365530490875,
-0.22235986590385437,
0.2802627980709076,
0.414838045835495,
-0.12993578612804413,
0.311349481344223,
-0.11043350398540497,
0.1052524596452713,
0.09259805083274841,
0.26401641964912415,
-0.3170114755630493,
0.017545806244015694,
0.06882038712501526,
0.29529231786727905,
0.13055267930030823,
-0.030251605436205864,
-0.1394539624452591,
0.19731150567531586,
0.06333639472723007,
-0.26893454790115356,
-0.07935157418251038,
0.1975773125886917,
-0.08557906746864319,
0.02730444446206093,
-0.1352439671754837,
-0.0031084769871085882,
0.1376470923423767,
0.23125018179416656,
0.17856955528259277,
0.5076372623443604,
-0.08304227143526077,
0.21941573917865753,
-0.10951607674360275,
0.18528158962726593,
0.2472895234823227,
0.10623187571763992,
0.3181799054145813,
0.14947566390037537,
-0.31811144948005676,
0.05304447561502457,
0.024709651246666908,
-0.034365639090538025,
0.19000977277755737,
0.0159982331097126,
0.12013959139585495,
-0.29668930172920227,
-0.2574707567691803,
-0.056300465017557144,
-0.15234516561031342,
0.12655936181545258,
0.19773276150226593,
-0.14195357263088226,
-0.02482062391936779,
0.3856178820133209,
-0.1641608029603958,
-0.18231827020645142,
-0.157395139336586,
0.12431871145963669,
-0.11281241476535797,
0.03582664206624031,
0.20012177526950836,
0.12803980708122253,
0.06473685055971146,
-0.47059357166290283,
-0.05008413642644882,
0.4825170338153839,
0.021273158490657806,
0.2309105098247528,
-0.0020610063802450895,
-0.0925416424870491,
0.16393950581550598,
0.21872320771217346,
-0.06206934526562691,
0.02117175981402397,
0.043210066854953766,
-0.2011876106262207,
-0.2918996810913086,
0.08061530441045761,
0.20840239524841309,
0.4862324893474579,
0.27636808156967163,
-0.17306749522686005,
-0.15578694641590118,
-0.3157207667827606,
-0.4088647663593292,
-0.2637399733066559,
-0.055146314203739166,
0.06800314784049988,
0.374734103679657,
0.28742265701293945,
0.054192934185266495,
-0.27597615122795105,
0.23240137100219727,
-0.04178740829229355,
-0.08642907440662384,
-0.3416120707988739,
0.012850859202444553,
0.08780469745397568,
-0.054452214390039444,
0.16466227173805237,
0.11744560301303864,
-0.12728461623191833,
-0.19627289474010468,
-0.3105180263519287,
0.01871279627084732,
-0.004410388879477978,
-0.18043270707130432,
0.06273430585861206,
0.10264002531766891,
-0.20538261532783508,
-0.1898232102394104,
0.10359514504671097,
-0.03642313554883003,
0.05871064215898514,
-0.24511702358722687,
0.3784095048904419,
-0.022674521431326866,
0.0034461161121726036,
0.18901196122169495,
0.1942967176437378,
0.29515931010246277,
0.21907329559326172,
0.15803693234920502,
-0.1561623513698578,
-0.11042987555265427,
0.25392407178878784,
0.7011096477508545,
0.314361572265625,
-0.1883096843957901,
0.10402873903512955,
0.22191525995731354,
0.2800584137439728,
-0.48337653279304504,
-0.0337689034640789,
0.17552560567855835,
-0.13505063951015472,
0.38812506198883057,
0.3272504210472107,
0.1071920320391655,
-0.11446565389633179,
0.2525237500667572,
0.012538093142211437,
0.442891389131546,
-0.2176285982131958,
0.08130990713834763,
0.3822910487651825,
-0.21075928211212158,
-0.10965292155742645,
0.07730510830879211,
0.12251078337430954,
0.14056935906410217,
0.3145765960216522,
-0.15730543434619904,
0.42409461736679077,
0.26822787523269653,
0.04625224322080612,
-0.020107602700591087,
-0.26626765727996826,
0.4101414382457733,
-0.08431512117385864,
0.08039025217294693,
0.09385775029659271,
0.1706474870443344,
0.3053487539291382,
-0.23271389305591583,
0.02340805158019066,
-0.32299184799194336,
-0.0020371179562062025,
-0.004831079859286547,
-0.016628103330731392,
-0.3652363121509552,
-0.053134169429540634,
-0.052431363612413406,
0.012389128096401691,
-0.03764206916093826,
-0.014058382250368595,
-0.21547198295593262,
-0.0640343651175499,
0.19912874698638916,
-0.01258101873099804,
0.31582674384117126,
0.0014954698272049427,
0.0478644035756588,
-0.20688366889953613,
0.06937269866466522,
0.12947110831737518,
-0.026830514892935753,
0.2059977501630783,
0.2517998516559601,
0.390961617231369,
0.22901038825511932,
0.21495743095874786,
0.001205968321301043,
-0.16223633289337158,
-0.12219568341970444,
-0.2516061067581177,
0.053992774337530136,
-0.06688590347766876,
-0.11086039245128632,
0.37306955456733704,
0.3432568907737732,
-0.15773528814315796,
-0.1415846347808838,
0.09912478178739548,
0.058652713894844055,
-0.29095515608787537,
0.12961773574352264,
0.11260117590427399,
-0.11218815296888351,
-0.22277547419071198,
-0.036663126200437546,
-0.19679436087608337,
-0.1045934185385704,
0.309487909078598,
-0.056815799325704575,
0.3283396363258362,
-0.19109413027763367,
0.15087899565696716,
-0.12006606161594391,
0.3416846692562103,
0.09822716563940048,
0.03831974416971207,
0.00432982575148344,
-0.20004475116729736,
-0.6663771271705627,
-0.167014017701149,
-0.07280322909355164,
-0.2887115180492401,
-0.2612493932247162,
0.11245579272508621,
0.3623698055744171,
-0.191613107919693,
0.20906133949756622,
-0.03096849098801613,
-0.10832007229328156,
-0.09802191704511642,
-0.20789837837219238,
-0.29712486267089844,
-0.2970387041568756,
-0.07414419949054718,
0.0432845875620842,
-0.4444464445114136,
-0.08605556190013885,
-0.08617385476827621,
0.09828108549118042,
-0.010083556175231934,
0.025294359773397446,
0.22434549033641815,
-0.3001258671283722,
0.40219932794570923,
0.002045269124209881,
0.7609817385673523,
-0.16218100488185883,
0.1837928593158722,
-0.25542309880256653,
-0.06754633039236069,
-0.1470840722322464,
0.20248109102249146,
-0.09074455499649048,
-0.0804930254817009,
-0.19994719326496124,
0.029996125027537346,
-0.04083161801099777,
-0.0829157903790474,
0.23553575575351715,
0.019598938524723053,
-0.05127933248877525,
-0.18547646701335907,
-0.27705395221710205,
0.038983725011348724,
0.06743162125349045,
0.023210367187857628,
-0.1395650953054428,
0.14136427640914917,
0.08625805377960205,
-0.13643455505371094,
0.36904820799827576,
-0.07268886268138885,
-0.3552284240722656,
-0.2635592520236969,
0.1610010415315628,
-0.3480725586414337,
-0.15343035757541656,
0.009711351245641708,
0.1023525595664978,
0.2974222004413605,
-0.08505605906248093,
-0.07228382676839828,
0.24516521394252777,
0.022054165601730347,
0.20614764094352722,
-0.035788409411907196,
0.21126599609851837,
0.058817509561777115,
-0.29351481795310974,
-0.26091983914375305,
-0.13104185461997986
] |
https://github.com/huggingface/datasets/issues/3162
|
`datasets-cli test` should work with datasets without scripts
|
> I think it's become private, but feel free to try with any other dataset like `lhoestq/test` for example at `https://huggingface.co/datasets/lhoestq/test`
your example repo and this page `https://huggingface.co/docs/datasets/add_dataset.html` helped me to solve.. thanks a lot
|
It would be really useful to be able to run `datasets-cli test`for datasets that don't have scripts attached to them (whether the datasets are private or not).
I wasn't able to run the script for a private test dataset that I had created on the hub (https://huggingface.co/datasets/huggingface/DataMeasurementsTest/tree/main) -- although @lhoestq came to save the day!
| 35 |
`datasets-cli test` should work with datasets without scripts
|
[
-0.7772921323776245,
0.23359768092632294,
-0.18654882907867432,
-0.24163000285625458,
0.056195858865976334,
0.18935929238796234,
0.4240715205669403,
0.40640518069267273,
0.325748473405838,
0.12547411024570465,
-0.015936708077788353,
0.11381346732378006,
-0.1479400247335434,
0.3383498191833496,
0.07243964076042175,
0.2921241223812103,
-0.08945080637931824,
0.3481610417366028,
-0.23578625917434692,
0.11913958191871643,
-0.11413634568452835,
-0.18710605800151825,
-0.05166475102305412,
0.026805605739355087,
-0.17971454560756683,
-0.14044296741485596,
-0.12915632128715515,
0.17358292639255524,
-0.10054922848939896,
-0.2694452106952667,
0.45860594511032104,
0.47313085198402405,
0.24961605668067932,
0.3371078073978424,
-0.00010490382555872202,
0.1118873655796051,
0.2948106825351715,
-0.10909148305654526,
-0.4247133731842041,
0.11112786084413528,
-0.4161779582500458,
0.05606970563530922,
0.04271436110138893,
-0.4775942265987396,
-0.1879008263349533,
-0.04096043109893799,
0.09823478758335114,
-0.7446628212928772,
-0.047700490802526474,
0.30823084712028503,
0.2686741054058075,
0.4631454646587372,
-0.4682489037513733,
-0.28667816519737244,
0.050867609679698944,
0.19743612408638,
0.016028765588998795,
-0.03358284756541252,
0.4378211498260498,
-0.243205726146698,
0.1558658927679062,
0.17621852457523346,
-0.016535215079784393,
-0.009804348461329937,
0.041229598224163055,
-0.15895968675613403,
-0.08897892385721207,
-0.16217906773090363,
0.14873814582824707,
0.24421335756778717,
0.5808706879615784,
-0.6595324277877808,
-0.24511459469795227,
0.047806911170482635,
-0.1862572431564331,
-0.019724559038877487,
0.03287104144692421,
0.19985666871070862,
-0.01584865339100361,
0.19810421764850616,
-0.4079655110836029,
-0.08350389450788498,
-0.06483347713947296,
-0.12072683870792389,
-0.04561195522546768,
0.07374938577413559,
0.02769816480576992,
0.09623593091964722,
-0.022564269602298737,
-0.1012575775384903,
0.04482045769691467,
-0.2196415811777115,
-0.42859286069869995,
0.13631562888622284,
-0.09222079068422318,
-0.36942702531814575,
0.13283900916576385,
0.15576399862766266,
0.4143785536289215,
0.35540956258773804,
0.03719406574964523,
0.27354565262794495,
-0.0840895026922226,
0.09649111330509186,
0.19681231677532196,
0.06564725190401077,
0.4494178295135498,
0.28333234786987305,
0.5198184847831726,
0.12995769083499908,
-0.0487079992890358,
-0.02980956621468067,
0.09221029281616211,
-0.20806337893009186,
-0.03626607730984688,
0.05770856514573097,
0.26208609342575073,
-0.19228701293468475,
-0.21753360331058502,
0.15352101624011993,
0.03724284842610359,
-0.13916756212711334,
0.1171426996588707,
0.4911973476409912,
0.18465501070022583,
-0.008919164538383484,
0.04743808135390282,
0.15626804530620575,
-0.03503848984837532,
-0.34214168787002563,
-0.20127929747104645,
0.21922411024570465,
0.009819157421588898,
-0.10511557012796402,
0.3351437747478485,
0.18137146532535553,
0.12406675517559052,
-0.26502230763435364,
-0.06278954446315765,
0.13172060251235962,
0.3704123795032501,
0.12154219299554825,
0.3472396731376648,
0.22189337015151978,
0.3247065246105194,
0.0028308492619544268,
0.05912631377577782,
-0.3036358058452606,
-0.21667681634426117,
0.2378084510564804,
0.019593343138694763,
-0.14026087522506714,
0.11869456619024277,
0.24397067725658417,
-0.28920769691467285,
-0.05039447173476219,
-0.11109116673469543,
-0.056517209857702255,
-0.08766777068376541,
-0.27395474910736084,
0.0820019394159317,
-0.08898304402828217,
-0.008631574921309948,
0.08748181909322739,
0.1047077551484108,
0.4276668131351471,
-0.7129131555557251,
0.11828101426362991,
0.02660965733230114,
-0.368808776140213,
-0.10773876309394836,
-0.12704430520534515,
-0.08911486715078354,
0.1354454755783081,
-0.20753151178359985,
0.03507864847779274,
0.3280167579650879,
-0.3713694214820862,
-0.01820988580584526,
0.21704138815402985,
0.2384520322084427,
-0.15973171591758728,
0.02889338694512844,
0.10084117203950882,
-0.05109557509422302,
-0.07541677355766296,
-0.4130837619304657,
0.10267297178506851,
0.0090315667912364,
0.13573625683784485,
0.11992349475622177,
-0.21976186335086823,
0.04435708373785019,
0.051003724336624146,
0.2735154628753662,
0.055759139358997345,
0.2795245349407196,
-0.11639288067817688,
0.30599743127822876,
-0.3666142225265503,
0.04281583055853844,
0.027426358312368393,
0.2363474816083908,
-0.19648320972919464,
-0.021266523748636246,
-0.37044191360473633,
-0.4293767511844635,
0.34087175130844116,
0.21867555379867554,
0.15108667314052582,
-0.13777554035186768,
-0.25209516286849976,
-0.18938817083835602,
0.23756487667560577,
-0.05025773122906685,
0.13051006197929382,
0.16158464550971985,
0.3297653794288635,
0.21354305744171143,
-0.08962245285511017,
-0.2591560482978821,
0.059330932796001434,
-0.24434684216976166,
-0.03673925995826721,
-0.04325622320175171,
0.2239866405725479,
-0.006536806467920542,
-0.06708256900310516,
-0.05709991976618767,
-0.14152757823467255,
-0.2020384520292282,
-0.2728189527988434,
0.004897084087133408,
0.4714062511920929,
0.03883348032832146,
-0.0572410449385643,
0.2966160476207733,
0.11932695657014847,
-0.05464460700750351,
-0.09463523328304291,
-0.05406773462891579,
0.03804081678390503,
0.08292826265096664,
0.14702749252319336,
-0.5560351610183716,
0.29555174708366394,
0.2068576216697693,
0.11078718304634094,
0.19198773801326752,
-0.04595693573355675,
0.23079901933670044,
-0.14571385085582733,
-0.16172629594802856,
-0.21011404693126678,
-0.022836515679955482,
0.12013876438140869,
0.34263065457344055,
-0.015398470684885979,
-0.19978837668895721,
-0.05434093996882439,
0.32568320631980896,
-0.24920465052127838,
0.30257830023765564,
-0.25614631175994873,
0.006172162480652332,
0.17537301778793335,
0.2459171712398529,
0.3020137548446655,
0.2495368868112564,
0.2298373579978943,
0.03320898488163948,
0.00009652960579842329,
0.00873175822198391,
0.009537736885249615,
0.11070167273283005,
-0.009532013908028603,
-0.0929054394364357,
-0.09954357892274857,
0.08781051635742188,
-0.3164929747581482,
-0.22590911388397217,
-0.16105391085147858,
-0.004654223565012217,
0.15792228281497955,
-0.40463972091674805,
0.031178543344140053,
-0.16689521074295044,
-0.16098670661449432,
0.1947198510169983,
0.23662729561328888,
0.08851044625043869,
-0.24439637362957,
0.11243287473917007,
-0.13993115723133087,
-0.10743025690317154,
0.17834246158599854,
-0.3176315128803253,
0.36863943934440613,
0.17743317782878876,
-0.3745800256729126,
-0.1720779538154602,
-0.1914309412240982,
-0.15785759687423706,
0.2095922976732254,
0.3081046938896179,
0.126158207654953,
0.3698248267173767,
-0.18502074480056763,
0.05226067453622818,
-0.49572625756263733,
-0.2549683153629303,
0.2927912175655365,
0.09910093247890472,
0.20934505760669708,
0.32060444355010986,
0.1460895538330078,
0.19476601481437683,
0.004293124657124281,
0.05460219457745552,
-0.21754132211208344,
-0.08381820470094681,
-0.09290437400341034,
0.11211243271827698,
-0.40325450897216797,
-0.38853758573532104,
-0.47203853726387024,
-0.11837825924158096,
-0.18976445496082306,
-0.08206181973218918,
0.2165319174528122,
0.0835459977388382,
0.06063057482242584,
0.18958595395088196,
0.04474300891160965,
-0.051138464361429214,
0.0040768831968307495,
0.14565110206604004,
-0.0983157530426979,
0.2394685298204422,
-0.24580857157707214,
-0.2983705401420593,
-0.07263977825641632,
-0.16636431217193604,
0.09540894627571106,
0.2498111128807068,
-0.13444842398166656,
-0.01199435442686081,
-0.25794604420661926,
0.2780574858188629,
0.13367366790771484,
0.13531821966171265,
0.20249207317829132,
0.09477513283491135,
-0.09557740390300751,
-0.149722158908844,
0.1883145272731781,
0.22139900922775269,
-0.25416433811187744,
-0.02331790328025818,
-0.015681089833378792,
0.38447126746177673,
-0.0703960582613945,
0.20239683985710144,
-0.1697627156972885,
-0.36621755361557007,
0.19067540764808655,
-0.5317690968513489,
0.7736567854881287,
-0.042454417794942856,
-0.042067237198352814,
-0.11637399345636368,
0.1704336404800415,
-0.24281296133995056,
0.1456599086523056,
-0.10827998071908951,
-0.10259287059307098,
-0.2546352744102478,
0.19410309195518494,
0.13003163039684296,
-0.234303280711174,
-0.08847101032733917,
-0.2278277575969696,
0.04530719295144081,
0.19936631619930267,
0.32574716210365295,
-0.19519105553627014,
0.038079634308815,
-0.052590083330869675,
0.06879917532205582,
-0.09225405007600784,
-0.07954602688550949,
-0.6976776123046875,
0.07586749643087387,
-0.3227127492427826,
0.38803115487098694,
-0.07364483922719955,
0.26461270451545715,
0.062492117285728455,
-0.23455117642879486,
-0.18200206756591797,
-0.3268337845802307,
0.2879946529865265,
-0.5302363038063049,
0.230531245470047,
0.14844614267349243,
0.3026476502418518,
-0.36501580476760864,
-0.050934087485075,
-0.5135205984115601,
0.2605781853199005,
0.12095721811056137,
0.2571867108345032,
-0.08209070563316345,
-0.16765046119689941,
0.22782832384109497,
0.017351023852825165,
-0.05769996717572212,
-0.1654740422964096,
-0.05877846106886864,
-0.1848284900188446,
-0.374530553817749,
-0.008283610455691814,
-0.0780082419514656,
-0.1565951704978943,
-0.16577237844467163,
-0.14118513464927673,
-0.24952659010887146,
0.057380031794309616,
0.24919790029525757,
0.3399280905723572,
0.07580418884754181,
0.20801599323749542,
0.2268524020910263,
-0.4340726435184479,
0.2700817883014679,
0.23010234534740448,
0.1995076835155487,
-0.27844712138175964,
-0.1666932851076126,
0.20157235860824585,
-0.15055227279663086,
0.6238096952438354,
0.03488961234688759,
-0.12694618105888367,
-0.14322541654109955,
0.019095314666628838,
0.0776793509721756,
-0.2742980122566223,
0.3394791781902313,
0.1278858631849289,
0.06524628400802612,
-0.33448269963264465,
-0.45929062366485596,
0.3172002136707306,
0.31911250948905945,
-0.0736890435218811,
0.066740483045578,
-0.006581366062164307,
-0.3373788297176361,
0.07167106866836548,
0.11426613479852676,
0.3435918986797333,
-0.16142113506793976,
0.05405055359005928,
0.15635502338409424,
0.014134779572486877,
0.41160836815834045,
-0.13895320892333984,
-0.22495025396347046,
-0.3498494327068329,
-0.32945218682289124,
-0.054701365530490875,
-0.22235986590385437,
0.2802627980709076,
0.414838045835495,
-0.12993578612804413,
0.311349481344223,
-0.11043350398540497,
0.1052524596452713,
0.09259805083274841,
0.26401641964912415,
-0.3170114755630493,
0.017545806244015694,
0.06882038712501526,
0.29529231786727905,
0.13055267930030823,
-0.030251605436205864,
-0.1394539624452591,
0.19731150567531586,
0.06333639472723007,
-0.26893454790115356,
-0.07935157418251038,
0.1975773125886917,
-0.08557906746864319,
0.02730444446206093,
-0.1352439671754837,
-0.0031084769871085882,
0.1376470923423767,
0.23125018179416656,
0.17856955528259277,
0.5076372623443604,
-0.08304227143526077,
0.21941573917865753,
-0.10951607674360275,
0.18528158962726593,
0.2472895234823227,
0.10623187571763992,
0.3181799054145813,
0.14947566390037537,
-0.31811144948005676,
0.05304447561502457,
0.024709651246666908,
-0.034365639090538025,
0.19000977277755737,
0.0159982331097126,
0.12013959139585495,
-0.29668930172920227,
-0.2574707567691803,
-0.056300465017557144,
-0.15234516561031342,
0.12655936181545258,
0.19773276150226593,
-0.14195357263088226,
-0.02482062391936779,
0.3856178820133209,
-0.1641608029603958,
-0.18231827020645142,
-0.157395139336586,
0.12431871145963669,
-0.11281241476535797,
0.03582664206624031,
0.20012177526950836,
0.12803980708122253,
0.06473685055971146,
-0.47059357166290283,
-0.05008413642644882,
0.4825170338153839,
0.021273158490657806,
0.2309105098247528,
-0.0020610063802450895,
-0.0925416424870491,
0.16393950581550598,
0.21872320771217346,
-0.06206934526562691,
0.02117175981402397,
0.043210066854953766,
-0.2011876106262207,
-0.2918996810913086,
0.08061530441045761,
0.20840239524841309,
0.4862324893474579,
0.27636808156967163,
-0.17306749522686005,
-0.15578694641590118,
-0.3157207667827606,
-0.4088647663593292,
-0.2637399733066559,
-0.055146314203739166,
0.06800314784049988,
0.374734103679657,
0.28742265701293945,
0.054192934185266495,
-0.27597615122795105,
0.23240137100219727,
-0.04178740829229355,
-0.08642907440662384,
-0.3416120707988739,
0.012850859202444553,
0.08780469745397568,
-0.054452214390039444,
0.16466227173805237,
0.11744560301303864,
-0.12728461623191833,
-0.19627289474010468,
-0.3105180263519287,
0.01871279627084732,
-0.004410388879477978,
-0.18043270707130432,
0.06273430585861206,
0.10264002531766891,
-0.20538261532783508,
-0.1898232102394104,
0.10359514504671097,
-0.03642313554883003,
0.05871064215898514,
-0.24511702358722687,
0.3784095048904419,
-0.022674521431326866,
0.0034461161121726036,
0.18901196122169495,
0.1942967176437378,
0.29515931010246277,
0.21907329559326172,
0.15803693234920502,
-0.1561623513698578,
-0.11042987555265427,
0.25392407178878784,
0.7011096477508545,
0.314361572265625,
-0.1883096843957901,
0.10402873903512955,
0.22191525995731354,
0.2800584137439728,
-0.48337653279304504,
-0.0337689034640789,
0.17552560567855835,
-0.13505063951015472,
0.38812506198883057,
0.3272504210472107,
0.1071920320391655,
-0.11446565389633179,
0.2525237500667572,
0.012538093142211437,
0.442891389131546,
-0.2176285982131958,
0.08130990713834763,
0.3822910487651825,
-0.21075928211212158,
-0.10965292155742645,
0.07730510830879211,
0.12251078337430954,
0.14056935906410217,
0.3145765960216522,
-0.15730543434619904,
0.42409461736679077,
0.26822787523269653,
0.04625224322080612,
-0.020107602700591087,
-0.26626765727996826,
0.4101414382457733,
-0.08431512117385864,
0.08039025217294693,
0.09385775029659271,
0.1706474870443344,
0.3053487539291382,
-0.23271389305591583,
0.02340805158019066,
-0.32299184799194336,
-0.0020371179562062025,
-0.004831079859286547,
-0.016628103330731392,
-0.3652363121509552,
-0.053134169429540634,
-0.052431363612413406,
0.012389128096401691,
-0.03764206916093826,
-0.014058382250368595,
-0.21547198295593262,
-0.0640343651175499,
0.19912874698638916,
-0.01258101873099804,
0.31582674384117126,
0.0014954698272049427,
0.0478644035756588,
-0.20688366889953613,
0.06937269866466522,
0.12947110831737518,
-0.026830514892935753,
0.2059977501630783,
0.2517998516559601,
0.390961617231369,
0.22901038825511932,
0.21495743095874786,
0.001205968321301043,
-0.16223633289337158,
-0.12219568341970444,
-0.2516061067581177,
0.053992774337530136,
-0.06688590347766876,
-0.11086039245128632,
0.37306955456733704,
0.3432568907737732,
-0.15773528814315796,
-0.1415846347808838,
0.09912478178739548,
0.058652713894844055,
-0.29095515608787537,
0.12961773574352264,
0.11260117590427399,
-0.11218815296888351,
-0.22277547419071198,
-0.036663126200437546,
-0.19679436087608337,
-0.1045934185385704,
0.309487909078598,
-0.056815799325704575,
0.3283396363258362,
-0.19109413027763367,
0.15087899565696716,
-0.12006606161594391,
0.3416846692562103,
0.09822716563940048,
0.03831974416971207,
0.00432982575148344,
-0.20004475116729736,
-0.6663771271705627,
-0.167014017701149,
-0.07280322909355164,
-0.2887115180492401,
-0.2612493932247162,
0.11245579272508621,
0.3623698055744171,
-0.191613107919693,
0.20906133949756622,
-0.03096849098801613,
-0.10832007229328156,
-0.09802191704511642,
-0.20789837837219238,
-0.29712486267089844,
-0.2970387041568756,
-0.07414419949054718,
0.0432845875620842,
-0.4444464445114136,
-0.08605556190013885,
-0.08617385476827621,
0.09828108549118042,
-0.010083556175231934,
0.025294359773397446,
0.22434549033641815,
-0.3001258671283722,
0.40219932794570923,
0.002045269124209881,
0.7609817385673523,
-0.16218100488185883,
0.1837928593158722,
-0.25542309880256653,
-0.06754633039236069,
-0.1470840722322464,
0.20248109102249146,
-0.09074455499649048,
-0.0804930254817009,
-0.19994719326496124,
0.029996125027537346,
-0.04083161801099777,
-0.0829157903790474,
0.23553575575351715,
0.019598938524723053,
-0.05127933248877525,
-0.18547646701335907,
-0.27705395221710205,
0.038983725011348724,
0.06743162125349045,
0.023210367187857628,
-0.1395650953054428,
0.14136427640914917,
0.08625805377960205,
-0.13643455505371094,
0.36904820799827576,
-0.07268886268138885,
-0.3552284240722656,
-0.2635592520236969,
0.1610010415315628,
-0.3480725586414337,
-0.15343035757541656,
0.009711351245641708,
0.1023525595664978,
0.2974222004413605,
-0.08505605906248093,
-0.07228382676839828,
0.24516521394252777,
0.022054165601730347,
0.20614764094352722,
-0.035788409411907196,
0.21126599609851837,
0.058817509561777115,
-0.29351481795310974,
-0.26091983914375305,
-0.13104185461997986
] |
https://github.com/huggingface/datasets/issues/3155
|
Illegal instruction (core dumped) at datasets import
|
It seems to be an issue with how conda-forge is building the binaries. It works on some machines, but not a machine with AMD Opteron 8384 processors.
|
## Describe the bug
I install datasets using conda and when I import datasets I get: "Illegal instruction (core dumped)"
## Steps to reproduce the bug
```
conda create --prefix path/to/env
conda activate path/to/env
conda install -c huggingface -c conda-forge datasets
# exits with output "Illegal instruction (core dumped)"
python -m datasets
```
## Environment info
When I run "datasets-cli env", I also get "Illegal instruction (core dumped)"
If I run the following commands:
```
conda create --prefix path/to/another/new/env
conda activate path/to/another/new/env
conda install -c huggingface transformers
transformers-cli env
```
Then I get:
- `transformers` version: 4.11.3
- Platform: Linux-5.4.0-67-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- PyTorch version (GPU?): not installed (NA)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No
Let me know what additional information you need in order to debug this issue. Thanks in advance!
| 27 |
Illegal instruction (core dumped) at datasets import
|
[
-0.3706066310405731,
-0.05678098276257515,
-0.23591074347496033,
0.21421289443969727,
0.3732421100139618,
0.2967417240142822,
0.23831243813037872,
0.024025853723287582,
0.2363838404417038,
0.17117443680763245,
-0.32062914967536926,
0.20077979564666748,
-0.058816082775592804,
0.1194770485162735,
-0.009287680499255657,
0.3871927559375763,
0.15780112147331238,
0.15884536504745483,
-0.31190580129623413,
-0.1065857857465744,
-0.21808497607707977,
0.19723980128765106,
-0.22488607466220856,
-0.0016220523975789547,
-0.2865109443664551,
0.015268002636730671,
0.21097607910633087,
0.3900664448738098,
-0.4287828803062439,
-0.22638195753097534,
0.009325589053332806,
0.07533446699380875,
0.17881523072719574,
0.38776060938835144,
-0.00010026958625530824,
0.11501473933458328,
-0.019447583705186844,
0.12578098475933075,
-0.32080069184303284,
0.5319422483444214,
-0.27433550357818604,
-0.0971163734793663,
-0.10108624398708344,
-0.35365527868270874,
0.18559446930885315,
0.07768367975950241,
-0.07098951190710068,
-0.11291493475437164,
0.4476360082626343,
0.37335145473480225,
0.3772105872631073,
0.30012381076812744,
0.08006804436445236,
-0.11901037395000458,
0.025719858705997467,
0.014490308240056038,
0.025688448920845985,
0.07182805985212326,
0.07509585469961166,
0.189717099070549,
0.06944364309310913,
0.08376770466566086,
-0.15500232577323914,
-0.2324666827917099,
-0.0280147697776556,
-0.22561044991016388,
-0.06028956547379494,
-0.0665099024772644,
0.11967528611421585,
-0.1194048747420311,
0.3418703079223633,
-0.11207890510559082,
-0.2512281537055969,
0.0961160957813263,
0.0014706276124343276,
-0.5185180306434631,
0.035939138382673264,
0.13766039907932281,
0.13043497502803802,
0.4830101430416107,
0.10797654092311859,
-0.21137630939483643,
-0.05005354434251785,
-0.2438063770532608,
-0.15458056330680847,
0.2838336229324341,
-0.1338755488395691,
-0.15083357691764832,
-0.029828546568751335,
0.02113717421889305,
0.13750585913658142,
0.03443380445241928,
-0.056321997195482254,
0.09026923775672913,
-0.3835052251815796,
0.017210816964507103,
0.18301331996917725,
0.36076289415359497,
-0.06725627928972244,
-0.18546052277088165,
0.1376618891954422,
0.19740331172943115,
-0.2185506373643875,
0.21247002482414246,
0.32163941860198975,
0.08216428011655807,
-0.007400590926408768,
0.2422395646572113,
0.20676501095294952,
0.08432992547750473,
-0.16598141193389893,
0.24971000850200653,
0.014932146295905113,
-0.22018761932849884,
0.11164624989032745,
0.03008515201508999,
-0.06228693202137947,
-0.33965569734573364,
-0.6183083653450012,
0.18794214725494385,
0.17273254692554474,
0.0025496496818959713,
-0.06798087060451508,
0.2779010534286499,
0.20460852980613708,
0.05908104032278061,
0.24598154425621033,
0.0849805623292923,
-0.13624708354473114,
-0.5502142310142517,
-0.32168471813201904,
0.17428171634674072,
-0.1592431217432022,
-0.1375497579574585,
0.03784051164984703,
-0.10281272977590561,
0.023856723681092262,
0.27622008323669434,
-0.14988569915294647,
-0.11608144640922546,
-0.07357247173786163,
-0.10399273037910461,
0.005596886854618788,
0.34952104091644287,
-0.0005753961740992963,
0.10828407853841782,
0.036322712898254395,
-0.23108863830566406,
0.16438215970993042,
0.18149273097515106,
-0.19914540648460388,
-0.32341939210891724,
-0.08204758912324905,
0.35658469796180725,
-0.13449811935424805,
-0.052997492253780365,
-0.09105829149484634,
0.13478367030620575,
-0.09819681197404861,
-0.08964090049266815,
-0.08778221905231476,
-0.15656782686710358,
0.030022257938981056,
-0.12190254777669907,
0.07428938895463943,
0.4870593845844269,
-0.5158229470252991,
0.10810519754886627,
-0.22509919106960297,
-0.1892990916967392,
0.10289686918258667,
0.3196861147880554,
-0.1037348210811615,
0.2897891402244568,
-0.21305477619171143,
0.18986830115318298,
0.15205207467079163,
-0.20585213601589203,
-0.07344040274620056,
0.10763074457645416,
-0.2602606415748596,
-0.07671993225812912,
-0.07228326797485352,
0.03631294518709183,
-0.007692017592489719,
-0.14421457052230835,
0.11889903992414474,
0.1423608511686325,
0.0070199184119701385,
-0.04258967563509941,
-0.2309761792421341,
-0.005705620162189007,
0.03477676212787628,
0.23069165647029877,
-0.07759803533554077,
0.053968608379364014,
0.2834646999835968,
0.00887040514498949,
0.19258375465869904,
-0.15635165572166443,
-0.0956742912530899,
0.5757191181182861,
-0.012254063971340656,
-0.1631152480840683,
-0.16169926524162292,
-0.15204383432865143,
-0.31827133893966675,
0.1362875998020172,
0.39508935809135437,
0.28154486417770386,
-0.0020084218122065067,
-0.09958569705486298,
-0.33664241433143616,
0.19489839673042297,
-0.1181105524301529,
0.140433207154274,
0.29705139994621277,
-0.09087220579385757,
-0.3191467821598053,
-0.027445929124951363,
0.00428460817784071,
0.31340909004211426,
-0.4026753008365631,
0.1398199200630188,
-0.2608647644519806,
-0.020680882036685944,
-0.2613389492034912,
-0.05180302634835243,
-0.04827035591006279,
-0.03989012911915779,
0.16281528770923615,
-0.20486508309841156,
-0.11523258686065674,
0.2823261320590973,
0.15263736248016357,
0.07579085975885391,
-0.17623093724250793,
0.09705858677625656,
-0.027641844004392624,
-0.06332705169916153,
0.09162570536136627,
-0.19214288890361786,
0.19366875290870667,
-0.11987759917974472,
0.21551033854484558,
0.23570874333381653,
-0.18760573863983154,
-0.19544999301433563,
0.010564968921244144,
-0.03407030552625656,
0.3516252934932709,
0.1252148151397705,
0.1015072762966156,
-0.6044425964355469,
0.17258280515670776,
0.422547847032547,
-0.07229435443878174,
0.12807519733905792,
-0.1446952372789383,
0.057787373661994934,
0.4805585443973541,
-0.061401672661304474,
0.046788234263658524,
-0.13354933261871338,
0.1787569224834442,
-0.06396503001451492,
0.28626397252082825,
0.3570720851421356,
0.45598724484443665,
0.2866455018520355,
0.15514086186885834,
0.20207267999649048,
0.049734290689229965,
-0.17555445432662964,
0.3211144804954529,
-0.10659205168485641,
0.0279396902769804,
0.021859658882021904,
-0.13466009497642517,
-0.07983507961034775,
-0.4218646287918091,
-0.11789090186357498,
0.24075914919376373,
0.23261341452598572,
-0.4877907931804657,
-0.03167043626308441,
-0.4993264973163605,
0.02015172317624092,
-0.35717785358428955,
0.077952079474926,
0.007900533266365528,
-0.4595915377140045,
-0.0671757310628891,
-0.0467463955283165,
-0.258192241191864,
-0.04892977327108383,
-0.12957797944545746,
0.11286777257919312,
-0.20187906920909882,
0.18781355023384094,
-0.08471642434597015,
-0.17575891315937042,
-0.10140015929937363,
0.16667257249355316,
0.23560234904289246,
0.2737894058227539,
0.22059819102287292,
-0.2407381683588028,
-0.0040161460638046265,
-0.029809677973389626,
-0.2232050597667694,
0.02537977322936058,
-0.07979536801576614,
0.0341717004776001,
0.056504637002944946,
0.17881007492542267,
0.007263600826263428,
-0.287485808134079,
-0.006981099024415016,
-0.1243692934513092,
-0.23023326694965363,
-0.01318414881825447,
-0.029099788516759872,
-0.2301316112279892,
-0.3410439193248749,
-0.35130774974823,
-0.3522050678730011,
-0.38588473200798035,
-0.06850209832191467,
-0.03455456346273422,
0.044203951954841614,
0.25417396426200867,
-0.04199835658073425,
-0.05152643844485283,
0.3472543954849243,
0.010181118734180927,
-0.3144649267196655,
-0.33893245458602905,
0.2903556525707245,
-0.3674163222312927,
-0.2835104167461395,
0.2653495967388153,
0.03654174134135246,
0.4103160798549652,
0.250392884016037,
-0.09586932510137558,
0.24296380579471588,
-0.1998825967311859,
0.1462959200143814,
-0.22482134401798248,
0.2187885195016861,
0.07502542436122894,
0.03214612230658531,
-0.126164048910141,
-0.1616489142179489,
-0.31212663650512695,
0.0460938923060894,
-0.15692494809627533,
-0.27784985303878784,
-0.39319002628326416,
0.4580027461051941,
-0.018791770562529564,
0.27641376852989197,
-0.24759557843208313,
-0.04502202197909355,
0.40839502215385437,
0.032477740198373795,
0.5098397135734558,
-0.13522234559059143,
-0.25874605774879456,
0.13744790852069855,
-0.01982223056256771,
-0.4345693588256836,
-0.014537534676492214,
-0.26357921957969666,
-0.037871066480875015,
-0.005910668522119522,
0.32809409499168396,
-0.33130237460136414,
-0.1499871015548706,
-0.06232364475727081,
0.3078387379646301,
0.0597517229616642,
0.19241105020046234,
0.1389753520488739,
-0.1175735592842102,
0.08137452602386475,
0.09544730186462402,
0.07070055603981018,
-0.12852200865745544,
0.07193957269191742,
-0.4824036955833435,
-0.12527689337730408,
-0.1843947172164917,
0.1985509842634201,
-0.08332355320453644,
0.21759767830371857,
-0.08005113154649734,
-0.08572475612163544,
0.16926540434360504,
0.034678973257541656,
0.36375370621681213,
-0.14514677226543427,
0.22264456748962402,
0.2348448932170868,
-0.005250841379165649,
-0.14408499002456665,
-0.10373244434595108,
-0.31623172760009766,
0.1406034529209137,
0.456885427236557,
-0.028188515454530716,
-0.38628843426704407,
-0.06874002516269684,
0.20914454758167267,
0.16725856065750122,
-0.08960437774658203,
-0.05986442416906357,
-0.05443597212433815,
-0.3548896908760071,
-0.095922090113163,
-0.07517396658658981,
0.4857434332370758,
0.18361146748065948,
-0.1382158249616623,
0.14508427679538727,
-0.2054278701543808,
0.26771265268325806,
0.1680302619934082,
0.1882064938545227,
0.1745925396680832,
0.037295304238796234,
0.036457423120737076,
-0.05657064914703369,
0.047914862632751465,
0.18497338891029358,
0.63861483335495,
-0.19103635847568512,
-0.36215949058532715,
0.025253526866436005,
-0.16984309256076813,
0.1723989099264145,
0.21980148553848267,
0.25163280963897705,
-0.08293187618255615,
-0.03522416949272156,
-0.2343197911977768,
-0.01080841850489378,
0.13830044865608215,
0.0702158734202385,
0.23706015944480896,
-0.36588841676712036,
-0.1970849335193634,
0.000707319297362119,
0.22511500120162964,
-0.12277781218290329,
0.2543601095676422,
0.24564476311206818,
-0.22918860614299774,
0.2486920803785324,
0.12461080402135849,
0.7322297096252441,
-0.09063655883073807,
0.045212630182504654,
0.37064510583877563,
-0.2858313024044037,
0.3426586985588074,
-0.1448131650686264,
-0.05465639382600784,
-0.27956879138946533,
-0.4592331647872925,
0.10437037795782089,
0.0051903803832829,
0.287647008895874,
0.24666661024093628,
-0.046560853719711304,
0.015443536452949047,
-0.18407508730888367,
0.2052708864212036,
-0.026659943163394928,
0.1771152913570404,
0.09839408844709396,
-0.13225752115249634,
-0.23486046493053436,
0.31017929315567017,
-0.03710748627781868,
-0.050503846257925034,
-0.3319675028324127,
-0.04975733906030655,
0.13865776360034943,
-0.06919419020414352,
-0.2429935336112976,
-0.04298827424645424,
-0.03620476648211479,
0.3765450119972229,
-0.17976254224777222,
0.07900141924619675,
0.24141454696655273,
0.358754962682724,
0.4751044809818268,
-0.0167015939950943,
0.13957591354846954,
0.06295473128557205,
-0.062024012207984924,
0.15792499482631683,
0.23157469928264618,
0.05470746010541916,
0.3708544969558716,
-0.058029454201459885,
-0.02588816173374653,
0.09755567461252213,
-0.026781931519508362,
-0.23381951451301575,
0.08590911328792572,
0.19521565735340118,
-0.06567452847957611,
-0.4110226333141327,
-0.3560095429420471,
0.10650290548801422,
0.2537294924259186,
-0.2411063015460968,
0.2205519676208496,
0.05511368811130524,
-0.11635290831327438,
0.20230437815189362,
-0.11047574877738953,
-0.33082467317581177,
-0.2037348449230194,
0.46643200516700745,
-0.06785456836223602,
-0.13574691116809845,
0.5105430483818054,
0.1531926840543747,
-0.21419362723827362,
-0.29431548714637756,
0.07348385453224182,
0.1690438687801361,
-0.21718010306358337,
0.2574070692062378,
-0.08787857741117477,
-0.35383477807044983,
0.146480992436409,
-0.030876385048031807,
0.03581998869776726,
0.02619433030486107,
-0.19244727492332458,
-0.33439919352531433,
-0.360037237405777,
0.0025920970365405083,
0.0706167072057724,
0.02572675235569477,
0.11451411992311478,
0.015469435602426529,
-0.12508217990398407,
0.017651448026299477,
-0.4634725749492645,
0.1537618488073349,
-0.23816663026809692,
-0.05205725505948067,
0.13725407421588898,
-0.1753852665424347,
-0.17993970215320587,
-0.11432626098394394,
0.2651519477367401,
0.14130419492721558,
-0.0768594890832901,
-0.34681791067123413,
-0.10435992479324341,
0.05479440093040466,
-0.1416565328836441,
-0.04849061369895935,
0.21631859242916107,
-0.26518940925598145,
-0.11290673911571503,
-0.05902485549449921,
0.20006807148456573,
0.23979440331459045,
-0.0024551954120397568,
0.27129536867141724,
0.3075205385684967,
0.1385708749294281,
-0.0928560271859169,
0.1342800259590149,
0.09887386858463287,
0.18939648568630219,
-0.0791192427277565,
0.17518250644207,
0.040820784866809845,
-0.20889973640441895,
-0.06091661751270294,
0.008882811293005943,
0.040619704872369766,
0.2619522511959076,
0.11390524357557297,
-0.5260647535324097,
0.06711083650588989,
0.24206888675689697,
0.2742789089679718,
0.3370994031429291,
-0.12994171679019928,
-0.1684664785861969,
0.08152271062135696,
0.34671053290367126,
-0.17886827886104584,
-0.35632407665252686,
0.5025612115859985,
-0.240616112947464,
0.005391327198594809,
0.12600423395633698,
0.0829712450504303,
-0.058818768709897995,
0.12440277636051178,
0.10639287531375885,
0.24453125894069672,
0.12028545141220093,
0.15214835107326508,
0.3836287558078766,
-0.043578311800956726,
0.0782802626490593,
0.15401291847229004,
0.1354411542415619,
0.06234162673354149,
0.560269832611084,
-0.06946977227926254,
0.3357808589935303,
0.17930644750595093,
0.11901197582483292,
0.0876588523387909,
-0.6275210976600647,
0.14545801281929016,
0.03402266651391983,
-0.08945018798112869,
0.21862581372261047,
0.1809120625257492,
0.2866736650466919,
-0.21419186890125275,
-0.3005349934101105,
-0.09287425130605698,
0.043402619659900665,
-0.515191912651062,
0.19643935561180115,
-0.08268888294696808,
0.13160471618175507,
-0.15445373952388763,
0.05108566954731941,
-0.13665862381458282,
-0.03679215908050537,
0.24830776453018188,
0.00871348287910223,
-0.17333905398845673,
-0.2630191147327423,
-0.0971997082233429,
-0.11236855387687683,
-0.06435931473970413,
-0.21960827708244324,
0.024376794695854187,
-0.0030257278122007847,
-0.18101917207241058,
0.40561747550964355,
0.11187520623207092,
0.44795817136764526,
0.2653583586215973,
0.2177402675151825,
0.07912453263998032,
-0.10796505212783813,
-0.23687699437141418,
-0.2290230691432953,
0.0556119941174984,
-0.16290178894996643,
0.4158371090888977,
0.3166264593601227,
0.254878431558609,
-0.2858416736125946,
-0.35268592834472656,
0.25303250551223755,
0.13899673521518707,
-0.14794640243053436,
0.022102126851677895,
-0.01645396463572979,
-0.21528223156929016,
-0.29196253418922424,
0.015572142787277699,
-0.13796375691890717,
-0.08913151174783707,
0.28762757778167725,
-0.1543193757534027,
0.02059243805706501,
-0.029504895210266113,
0.15575887262821198,
-0.17604629695415497,
0.5415435433387756,
0.44467398524284363,
0.006811278406530619,
-0.26294007897377014,
-0.14107473194599152,
-0.9202149510383606,
0.19651289284229279,
0.28869497776031494,
-0.2352333664894104,
0.14259016513824463,
-0.027691179886460304,
0.22592678666114807,
-0.03226714953780174,
0.006770606152713299,
0.12578073143959045,
0.13063396513462067,
0.2480248212814331,
-0.42400938272476196,
0.016147958114743233,
-0.04090674966573715,
-0.21770061552524567,
-0.11949239671230316,
-0.31304681301116943,
0.3706061840057373,
0.12397409975528717,
0.19213196635246277,
-0.06345215439796448,
-0.019166631624102592,
-0.10273052752017975,
-0.056420695036649704,
0.49123919010162354,
0.16246220469474792,
0.4340686798095703,
-0.16777609288692474,
-0.008203710429370403,
-0.12372373789548874,
-0.1861068606376648,
-0.19578133523464203,
0.24386543035507202,
0.05828176066279411,
0.2759819030761719,
-0.10650613903999329,
0.10562385618686676,
-0.09633223712444305,
0.28318434953689575,
0.05973299965262413,
0.13822638988494873,
-0.3323603570461273,
0.3995240330696106,
-0.1748521775007248,
0.1956043392419815,
0.20373797416687012,
0.37325289845466614,
0.21506132185459137,
0.2546641528606415,
-0.11230827867984772,
-0.24831679463386536,
0.3131173849105835,
-0.11183717101812363,
-0.1934874802827835,
-0.2678396999835968,
0.17793616652488708,
0.23690074682235718,
-0.4615078866481781,
-0.39783555269241333,
-0.03488790616393089,
0.09628686308860779,
-0.3533070683479309,
-0.33683136105537415,
0.5537527799606323,
-0.04249194264411926,
0.012340986169874668,
0.015101317316293716,
0.1972283571958542,
0.18642553687095642,
-0.20120924711227417,
0.08755762130022049,
-0.0027030068449676037
] |
https://github.com/huggingface/datasets/issues/3154
|
Sacrebleu unexpected behaviour/requirement for data format
|
Hi @BramVanroy!
Good question. This project relies on PyArrow (tables) to store data too big to fit in RAM. In the case of metrics, this means that the number of predictions and references has to match to form a table.
That's why your example throws an error even though it matches the schema:
```python
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
] # len(refs) = 2
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'] # len(hyps) = 3
```
Instead, it should be:
```python
refs = [
['The dog bit the man.', 'The dog had bit the man.'],
['It was not unexpected.', 'No one was surprised.'],
['The man bit him first.', 'The man had bitten the dog.'],
] # len(refs) = 3
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'] # len(hyps) = 3
```
However, `sacreblue` works with the format that's described in your example, hence this part:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
Hope you get an idea!
|
## Describe the bug
When comparing with the original `sacrebleu` implementation, the `datasets` implementation does some strange things that I do not quite understand. This issue was triggered when I was trying to implement TER and found the datasets implementation of BLEU [here](https://github.com/huggingface/datasets/pull/3153).
In the below snippet, the original sacrebleu snippet works just fine whereas the datasets implementation throws an error.
## Steps to reproduce the bug
```python
import sacrebleu
import datasets
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
]
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.']
expected_bleu = 48.530827
ds_bleu = datasets.load_metric("sacrebleu")
bleu_score_sb = sacrebleu.corpus_bleu(hyps, refs).score
print(bleu_score_sb, expected_bleu)
# works: 48.5308...
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
print(bleu_score_ds, expected_bleu)
# ValueError: Predictions and/or references don't match the expected format.
```
This seems to be related to how datasets forces the features format here:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
and then manipulates the references during the compute stage here
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L119-L122
I do not quite understand why that is required since sacrebleu handles argument parsing quite well [by itself](https://github.com/mjpost/sacrebleu/blob/2787185dd0f8d224c72ee5a831d163c2ac711a47/sacrebleu/metrics/base.py#L229).
## Actual results
Traceback (most recent call last):
File "C:\Users\bramv\AppData\Roaming\JetBrains\PyCharm2020.3\scratches\scratch_23.py", line 23, in <module>
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
File "C:\dev\python\datasets\src\datasets\metric.py", line 392, in compute
self.add_batch(predictions=predictions, references=references)
File "C:\dev\python\datasets\src\datasets\metric.py", line 439, in add_batch
raise ValueError(
ValueError: Predictions and/or references don't match the expected format.
Expected format: {'predictions': Value(dtype='string', id='sequence'), 'references': Sequence(feature=Value(dtype='string', id='sequence'), length=-1, id='references')},
Input predictions: ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'],
Input references: [['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'], ['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.']]
## Environment info
- `datasets` version: 1.14.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.9.2
- PyArrow version: 4.0.1
| 197 |
Sacrebleu unexpected behaviour/requirement for data format
|
[
-0.036639124155044556,
-0.2684367895126343,
-0.10606671869754791,
0.11010895669460297,
0.3857428729534149,
-0.20707353949546814,
0.17874950170516968,
0.18643514811992645,
-0.31102749705314636,
0.1750863492488861,
-0.054096419364213943,
0.08615096658468246,
0.1254209727048874,
0.07096877694129944,
-0.36316725611686707,
0.07156020402908325,
-0.011796782724559307,
0.2806418240070343,
0.3324216902256012,
-0.11246660351753235,
-0.11907370388507843,
0.13756148517131805,
-0.3625631332397461,
-0.1563454270362854,
-0.578432559967041,
0.2642112374305725,
-0.11025483906269073,
0.25250884890556335,
-0.45524901151657104,
-0.04195648804306984,
0.11213506758213043,
0.19878606498241425,
-0.11078840494155884,
0.302778422832489,
-0.00011817050108220428,
-0.3470284044742584,
0.005981455557048321,
-0.44245338439941406,
-0.4544149935245514,
-0.03668826073408127,
-0.31282803416252136,
-0.17321743071079254,
-0.08971735090017319,
-0.15437358617782593,
-0.4908255934715271,
-0.1343463808298111,
-0.1380818784236908,
0.0029992572963237762,
0.020368238911032677,
0.10347309708595276,
0.24265873432159424,
0.11632226407527924,
-0.24580056965351105,
-0.2013241946697235,
0.36332136392593384,
0.477848082780838,
-0.10252668708562851,
0.1816508173942566,
0.2644280791282654,
0.36074429750442505,
0.05289493128657341,
0.11636422574520111,
0.02598610520362854,
-0.13792391121387482,
-0.3066783547401428,
-0.10734768956899643,
-0.3014959692955017,
0.045013654977083206,
0.4049343466758728,
0.14337468147277832,
0.4381962716579437,
-0.07216053456068039,
-0.17576229572296143,
0.2922649383544922,
-0.269994854927063,
-0.18138064444065094,
0.20844042301177979,
0.2852252125740051,
0.2595648765563965,
0.19522356986999512,
-0.0813467875123024,
0.24803687632083893,
-0.1671559363603592,
0.11993341892957687,
-0.278363972902298,
-0.118107870221138,
-0.4321534335613251,
-0.02514704316854477,
-0.19718515872955322,
0.10558386892080307,
-0.683728039264679,
0.01488829217851162,
-0.24190808832645416,
-0.2092105746269226,
0.05796954408288002,
-0.2546018660068512,
-0.3775073289871216,
-0.18722420930862427,
0.11568336188793182,
0.2872747480869293,
0.167735293507576,
0.22033843398094177,
-0.125344380736351,
-0.0005959387053735554,
0.0047782547771930695,
0.179740309715271,
0.1768186390399933,
-0.27399584650993347,
-0.06302404403686523,
-0.09369468688964844,
0.1337633579969406,
-0.07209962606430054,
0.12937462329864502,
0.08610010892152786,
-0.11482600122690201,
-0.037954047322273254,
0.3107553720474243,
-0.4364684522151947,
-0.3556751012802124,
0.12186107784509659,
0.32817280292510986,
0.20799043774604797,
-0.035393550992012024,
0.14332261681556702,
-0.15430673956871033,
0.14061439037322998,
-0.2909442186355591,
0.3476499915122986,
0.019650926813483238,
-0.3119191527366638,
-0.11410008370876312,
-0.07543857395648956,
-0.47469794750213623,
-0.20624768733978271,
0.16284894943237305,
-0.001070709084160626,
-0.08009249716997147,
0.29723724722862244,
0.10926748812198639,
-0.3752128481864929,
0.04653980955481529,
-0.2771303355693817,
0.48645803332328796,
0.005750697571784258,
-0.504734218120575,
0.2566014528274536,
0.09972907602787018,
-0.3552195131778717,
0.14966847002506256,
0.06007503718137741,
-0.5195604562759399,
-0.13623382151126862,
0.14203350245952606,
0.2532920837402344,
-0.03472670167684555,
-0.04010444134473801,
0.1275334656238556,
0.01840401627123356,
0.07157079875469208,
-0.3380739390850067,
0.12572167813777924,
0.11803946644067764,
-0.13268844783306122,
-0.2959052324295044,
-0.05251779034733772,
0.4735734462738037,
-0.3305588364601135,
0.07182484120130539,
0.3747701048851013,
-0.11197591572999954,
0.6763092279434204,
0.27637553215026855,
0.10629457235336304,
-0.05948534235358238,
-0.23152272403240204,
0.019690396264195442,
0.32389262318611145,
-0.046228062361478806,
-0.43393009901046753,
0.4053036570549011,
0.018800463527441025,
-0.2147005796432495,
0.325698584318161,
-0.061390381306409836,
0.4299605190753937,
-0.16004735231399536,
-0.1702573150396347,
-0.20436353981494904,
0.16853715479373932,
-0.2562086582183838,
-0.21214602887630463,
-0.27019721269607544,
-0.13810645043849945,
-0.24020639061927795,
-0.039307739585638046,
0.609866738319397,
0.22516120970249176,
0.3775535523891449,
0.36303555965423584,
-0.1552814245223999,
0.15457917749881744,
-0.021493617445230484,
0.6281915307044983,
-0.3341260552406311,
0.26245439052581787,
-0.10954944789409637,
0.26146453619003296,
-0.009785426780581474,
0.09163898974657059,
0.03883974999189377,
0.05926479026675224,
-0.03943182900547981,
-0.28072085976600647,
-0.22336970269680023,
-0.02156767062842846,
-0.08899343758821487,
0.19318827986717224,
0.36406219005584717,
-0.26171165704727173,
-0.04813066124916077,
-0.10662839561700821,
0.05967231094837189,
0.048677414655685425,
-0.0396009162068367,
0.12193681299686432,
-0.03764045611023903,
0.183280810713768,
-0.1928565502166748,
-0.1259433925151825,
0.3464817404747009,
0.32327157258987427,
-0.19662708044052124,
0.041204627603292465,
0.1810642033815384,
0.3768128752708435,
0.2396518588066101,
0.05812743678689003,
0.09343152493238449,
0.09336863458156586,
0.004487043246626854,
-0.302144318819046,
0.38840165734291077,
0.3794935941696167,
-0.12332069128751755,
-0.04946909099817276,
0.4199572801589966,
0.00974440947175026,
0.010184217244386673,
-0.10975942760705948,
-0.002021174179390073,
0.12241901457309723,
-0.14589552581310272,
0.06666510552167892,
-0.6499150991439819,
-0.0828896313905716,
0.0912368893623352,
-0.0010405442444607615,
0.029457105323672295,
-0.3840999901294708,
0.21823686361312866,
0.10268589854240417,
0.047893863171339035,
0.05624819174408913,
0.015996871516108513,
0.24223239719867706,
-0.03339988738298416,
-0.13293050229549408,
0.22870200872421265,
0.45047128200531006,
0.09547795355319977,
0.2515965402126312,
-0.0036831230390816927,
0.19931170344352722,
-0.46158939599990845,
0.04278380423784256,
-0.01504597533494234,
-0.34339892864227295,
0.13858117163181305,
0.2765979766845703,
-0.003377702785655856,
-0.11619851738214493,
0.1474745273590088,
0.09382427483797073,
-0.13197235763072968,
-0.11356876790523529,
0.2792857885360718,
-0.41119879484176636,
0.22301925718784332,
-0.2597391605377197,
0.10586937516927719,
0.2410796582698822,
0.06707561016082764,
0.14547179639339447,
0.10234052687883377,
0.08223424106836319,
-0.011165119707584381,
-0.06611280888319016,
0.5639822483062744,
-0.11311192810535431,
-0.026978986337780952,
-0.19441157579421997,
0.04726957157254219,
-0.05242104083299637,
0.13686467707157135,
-0.30947163701057434,
-0.170979842543602,
0.1169562116265297,
-0.10092662274837494,
0.017560169100761414,
-0.431522011756897,
-0.2258291393518448,
0.16352029144763947,
0.17806226015090942,
0.01046119537204504,
0.18898101150989532,
-0.06992264091968536,
0.04738489165902138,
0.15772077441215515,
0.20831793546676636,
0.12330926209688187,
-0.030151590704917908,
0.48679447174072266,
-0.4382513761520386,
-0.2387075126171112,
-0.28420311212539673,
-0.16180947422981262,
0.4165360927581787,
-0.1331309676170349,
0.22705134749412537,
-0.11486894637346268,
0.035661231726408005,
-0.11419036984443665,
0.16342125833034515,
0.0227603018283844,
0.03585883229970932,
0.11802410334348679,
-0.1863834112882614,
-0.044303350150585175,
0.3194437026977539,
-0.2493220865726471,
-0.6044524312019348,
0.09727492928504944,
0.11191730946302414,
0.10520312935113907,
0.5144140720367432,
-0.15191668272018433,
-0.17465679347515106,
-0.019808610901236534,
-0.49498000741004944,
0.22963519394397736,
-0.292870432138443,
0.077942855656147,
-0.16711606085300446,
-0.25337135791778564,
-0.2876809239387512,
0.021999768912792206,
0.3431510925292969,
0.16291752457618713,
0.2733626067638397,
-0.15224365890026093,
-0.05207056179642677,
0.4711667001247406,
0.31295785307884216,
0.4284692704677582,
-0.13227248191833496,
0.20229005813598633,
0.13564777374267578,
0.36874085664749146,
-0.09903094917535782,
-0.10249649733304977,
0.0461735725402832,
-0.14920032024383545,
-0.2251082807779312,
0.4007512032985687,
-0.004089828580617905,
0.022345038130879402,
-0.10929232835769653,
0.07832352072000504,
0.10690465569496155,
-0.019369447603821754,
0.11278562992811203,
0.251009076833725,
0.26586636900901794,
-0.017999645322561264,
0.17985320091247559,
0.25963565707206726,
-0.1405397206544876,
-0.015809908509254456,
0.44870123267173767,
0.05859943851828575,
0.10861639678478241,
-0.038945045322179794,
0.3570076525211334,
-0.08359799534082413,
0.25623080134391785,
-0.14954859018325806,
0.4711335003376007,
-0.08300944417715073,
-0.07390251755714417,
0.21867232024669647,
0.00387927470728755,
0.24264422059059143,
-0.08454644680023193,
0.0059610530734062195,
-0.03207290917634964,
0.003841773374006152,
-0.1870235651731491,
-0.07141059637069702,
-0.34515824913978577,
0.14844132959842682,
0.39346420764923096,
0.2781326174736023,
-0.17578434944152832,
-0.19112397730350494,
-0.03715379163622856,
0.08850221335887909,
-0.12660302221775055,
-0.26387348771095276,
-0.34977003931999207,
-0.16556109488010406,
0.0012262155069038272,
-0.08169122785329819,
-0.04079507291316986,
-0.313335120677948,
0.0050701056607067585,
-0.06406228244304657,
-0.6155480146408081,
-0.07527585327625275,
0.14836829900741577,
-0.2522536814212799,
0.2240876406431198,
-0.25928857922554016,
-0.11863813549280167,
-0.22467508912086487,
0.5143061876296997,
0.33924826979637146,
0.3834324777126312,
-0.013752920553088188,
-0.11672481149435043,
0.3858446180820465,
-0.5834972262382507,
0.19349713623523712,
0.5752700567245483,
-0.1462988257408142,
0.15286290645599365,
0.04079994186758995,
-0.12844537198543549,
-0.4354979693889618,
-0.02189142256975174,
0.21276932954788208,
-0.1317477524280548,
-0.09996037930250168,
-0.03683396801352501,
-0.021228289231657982,
-0.22074271738529205,
-0.08815663307905197,
-0.21304231882095337,
0.21551010012626648,
0.05599726736545563,
0.4316364526748657,
0.12346106022596359,
1.5424871444702148,
0.24484293162822723,
-0.055295757949352264,
0.2833223342895508,
-0.5173494815826416,
-0.25662270188331604,
-0.0525444820523262,
0.25702178478240967,
-0.3186325430870056,
-0.19457648694515228,
-0.22188004851341248,
-0.1730169951915741,
0.27591872215270996,
0.3274820148944855,
-0.37625348567962646,
0.10407168418169022,
-0.2980044186115265,
0.18307368457317352,
0.1550309956073761,
-0.10065989196300507,
0.20598414540290833,
-0.06520325690507889,
0.018570225685834885,
0.13640928268432617,
0.13765943050384521,
0.07683449983596802,
-0.09277740120887756,
-0.23414723575115204,
-0.05209462717175484,
0.00265697855502367,
0.0501689538359642,
0.2047104686498642,
-0.3004753887653351,
-0.1638631373643875,
0.06204039976000786,
-0.2061128467321396,
-0.009808845818042755,
0.22323231399059296,
0.4170055389404297,
0.021317677572369576,
-0.18924765288829803,
0.07885054498910904,
0.2578171193599701,
-0.06294623762369156,
-0.1148461252450943,
-0.3853265941143036,
0.4097987711429596,
-0.07893498986959457,
0.05772166699171066,
0.072683185338974,
-0.031143508851528168,
0.11467834562063217,
0.09028656035661697,
0.20457592606544495,
-0.1578792780637741,
-0.5192272067070007,
-0.2806384265422821,
-0.017004111781716347,
-0.22665829956531525,
-0.08603834360837936,
0.133230060338974,
0.10065782815217972,
0.26371991634368896,
0.18318180739879608,
-0.05087567865848541,
-0.37344613671302795,
-0.305819571018219,
0.2830539345741272,
0.21867914497852325,
-0.13100464642047882,
0.131532683968544,
-0.3956868052482605,
-0.12023472040891647,
-0.37515851855278015,
-0.12852054834365845,
-0.16280055046081543,
-0.6688293218612671,
0.02754255197942257,
-0.5770970582962036,
0.1654139906167984,
0.2373245656490326,
0.2640441954135895,
0.19359473884105682,
-0.051123443990945816,
-0.25958871841430664,
-0.04442493990063667,
-0.08839543163776398,
-0.20087891817092896,
-0.05100823566317558,
-0.039157476276159286,
-0.08122538775205612,
0.05311785638332367,
0.07018028199672699,
0.18933527171611786,
-0.3448760509490967,
0.33726441860198975,
0.06451529264450073,
0.30915698409080505,
-0.1328912377357483,
-0.048195984214544296,
0.2194334715604782,
-0.10171612352132797,
0.05855930596590042,
0.2118537873029709,
-0.3762795627117157,
-0.18520043790340424,
-0.26235243678092957,
0.16358424723148346,
0.18681950867176056,
0.19722214341163635,
-0.39523735642433167,
0.17443323135375977,
-0.2022683173418045,
-0.26331189274787903,
0.08640821278095245,
0.16069509088993073,
-0.023015256971120834,
-0.02402087301015854,
-0.08763188123703003,
0.1454923003911972,
-0.27045607566833496,
-0.17046178877353668,
0.24999719858169556,
0.3395150303840637,
0.11418630927801132,
0.021820515394210815,
-0.3166292905807495,
-0.17080581188201904,
-0.0017248138319700956,
0.24973779916763306,
0.22273047268390656,
0.05634528398513794,
0.10389164835214615,
-0.2570786774158478,
0.16612112522125244,
-0.18448233604431152,
0.2603526711463928,
0.12800486385822296,
-0.017232561483979225,
-0.3660599887371063,
-0.002510368824005127,
0.18809913098812103,
-0.07538255304098129,
-0.06635600328445435,
-0.2430613487958908,
0.25225830078125,
0.0718081071972847,
0.4712616503238678,
0.6560980677604675,
-0.389733225107193,
0.1638866811990738,
-0.012509744614362717,
-0.2700653374195099,
-0.3207031190395355,
-0.18591396510601044,
-0.24688494205474854,
0.0993337631225586,
0.26005807518959045,
0.1206950843334198,
0.14852789044380188,
-0.12330930680036545,
0.07610288262367249,
0.526076078414917,
0.5019056797027588,
0.6835202574729919,
0.1884782910346985,
0.020112287253141403,
-0.1681380718946457,
0.11874350905418396,
0.08351079374551773,
-0.07054222375154495,
0.26253536343574524,
0.22246602177619934,
0.24724870920181274,
-0.10377932339906693,
-0.1837867796421051,
-0.07322986423969269,
-0.5665721297264099,
-0.28934037685394287,
0.04707804322242737,
0.3011094927787781,
-0.3626795709133148,
-0.23928187787532806,
-0.23598213493824005,
-0.07443298399448395,
0.4574061632156372,
0.1549706757068634,
-0.1654655486345291,
0.18040859699249268,
0.026053743436932564,
-0.12649370729923248,
0.16177119314670563,
0.2195928394794464,
-0.48769906163215637,
0.12107386440038681,
0.09446699172258377,
0.013078626245260239,
0.5131091475486755,
0.37707310914993286,
0.33900097012519836,
0.2157355099916458,
0.21460530161857605,
-0.2824203073978424,
-0.09924139082431793,
-0.2587447762489319,
0.03461693972349167,
0.503471314907074,
0.3787928819656372,
-0.29078876972198486,
0.3589603304862976,
0.21237441897392273,
-0.0885784924030304,
0.02742064744234085,
0.2737143337726593,
-0.1155969649553299,
-0.33337846398353577,
0.28311702609062195,
0.23315899074077606,
-0.24213692545890808,
-0.13564227521419525,
-0.26478806138038635,
-0.3862625062465668,
-0.08268911391496658,
0.540101170539856,
-0.3124423027038574,
0.34689125418663025,
0.163671612739563,
0.07414522022008896,
0.376637727022171,
0.317818820476532,
-0.028273481875658035,
-0.18174341320991516,
-0.1420520395040512,
-0.1408357322216034,
-0.046705156564712524,
0.32351523637771606,
0.1695490926504135,
0.22187334299087524,
-0.12230530381202698,
0.1546442061662674,
0.25202861428260803,
0.14463867247104645,
-0.2291894406080246,
-0.31555885076522827,
-0.11920040100812912,
-0.04883870854973793,
-0.46494683623313904,
-0.03739016503095627,
0.1090317890048027,
0.14476951956748962,
-0.2269981950521469,
-0.27401095628738403,
0.29049912095069885,
0.08472250401973724,
0.2702452838420868,
0.05788925290107727,
0.00105747627094388,
-0.31672006845474243,
-0.0931997001171112,
0.2270849198102951,
0.27309751510620117,
0.17592120170593262,
-0.10833010822534561,
-0.27648934721946716,
-0.13595157861709595,
0.31119951605796814,
0.08988357335329056,
0.2820752263069153,
0.2659737467765808,
0.15885543823242188,
-0.05611957982182503,
0.31994765996932983,
-0.0964827910065651,
0.40520694851875305,
0.24492712318897247,
0.06842987984418869,
0.04948899894952774,
0.30177071690559387,
-0.28594985604286194,
-0.18294425308704376,
0.2249562293291092,
0.49941134452819824,
0.11180326342582703,
0.13709136843681335,
-0.07117754966020584,
-0.261445552110672,
0.20685279369354248,
-0.024784710258245468,
-0.13807544112205505,
-0.019323252141475677,
0.33691200613975525,
0.35233592987060547,
0.3969721794128418,
-0.5981607437133789,
-0.10851753503084183,
0.24352020025253296,
-0.11078949272632599,
-0.030853567644953728,
0.13566425442695618,
-0.0963633805513382,
-0.1605435013771057,
-0.17803409695625305,
0.5988221168518066,
0.1771908849477768,
-0.30199483036994934,
-0.19451904296875,
-0.2903484106063843
] |
https://github.com/huggingface/datasets/issues/3154
|
Sacrebleu unexpected behaviour/requirement for data format
|
Thanks, that makes sense. It is a bit unfortunate because it may be confusing to users since the input format is suddenly different than what they may expect from the underlying library/metric. But it is understandable due to how `datasets` works!
|
## Describe the bug
When comparing with the original `sacrebleu` implementation, the `datasets` implementation does some strange things that I do not quite understand. This issue was triggered when I was trying to implement TER and found the datasets implementation of BLEU [here](https://github.com/huggingface/datasets/pull/3153).
In the below snippet, the original sacrebleu snippet works just fine whereas the datasets implementation throws an error.
## Steps to reproduce the bug
```python
import sacrebleu
import datasets
refs = [
['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'],
['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.'],
]
hyps = ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.']
expected_bleu = 48.530827
ds_bleu = datasets.load_metric("sacrebleu")
bleu_score_sb = sacrebleu.corpus_bleu(hyps, refs).score
print(bleu_score_sb, expected_bleu)
# works: 48.5308...
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
print(bleu_score_ds, expected_bleu)
# ValueError: Predictions and/or references don't match the expected format.
```
This seems to be related to how datasets forces the features format here:
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L94-L99
and then manipulates the references during the compute stage here
https://github.com/huggingface/datasets/blob/87c71b9c29a40958973004910f97e4892559dfed/metrics/sacrebleu/sacrebleu.py#L119-L122
I do not quite understand why that is required since sacrebleu handles argument parsing quite well [by itself](https://github.com/mjpost/sacrebleu/blob/2787185dd0f8d224c72ee5a831d163c2ac711a47/sacrebleu/metrics/base.py#L229).
## Actual results
Traceback (most recent call last):
File "C:\Users\bramv\AppData\Roaming\JetBrains\PyCharm2020.3\scratches\scratch_23.py", line 23, in <module>
bleu_score_ds = ds_bleu.compute(predictions=hyps, references=refs)["score"]
File "C:\dev\python\datasets\src\datasets\metric.py", line 392, in compute
self.add_batch(predictions=predictions, references=references)
File "C:\dev\python\datasets\src\datasets\metric.py", line 439, in add_batch
raise ValueError(
ValueError: Predictions and/or references don't match the expected format.
Expected format: {'predictions': Value(dtype='string', id='sequence'), 'references': Sequence(feature=Value(dtype='string', id='sequence'), length=-1, id='references')},
Input predictions: ['The dog bit the man.', "It wasn't surprising.", 'The man had just bitten him.'],
Input references: [['The dog bit the man.', 'It was not unexpected.', 'The man bit him first.'], ['The dog had bit the man.', 'No one was surprised.', 'The man had bitten the dog.']]
## Environment info
- `datasets` version: 1.14.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.9.2
- PyArrow version: 4.0.1
| 41 |
Sacrebleu unexpected behaviour/requirement for data format
|
[
-0.036639124155044556,
-0.2684367895126343,
-0.10606671869754791,
0.11010895669460297,
0.3857428729534149,
-0.20707353949546814,
0.17874950170516968,
0.18643514811992645,
-0.31102749705314636,
0.1750863492488861,
-0.054096419364213943,
0.08615096658468246,
0.1254209727048874,
0.07096877694129944,
-0.36316725611686707,
0.07156020402908325,
-0.011796782724559307,
0.2806418240070343,
0.3324216902256012,
-0.11246660351753235,
-0.11907370388507843,
0.13756148517131805,
-0.3625631332397461,
-0.1563454270362854,
-0.578432559967041,
0.2642112374305725,
-0.11025483906269073,
0.25250884890556335,
-0.45524901151657104,
-0.04195648804306984,
0.11213506758213043,
0.19878606498241425,
-0.11078840494155884,
0.302778422832489,
-0.00011817050108220428,
-0.3470284044742584,
0.005981455557048321,
-0.44245338439941406,
-0.4544149935245514,
-0.03668826073408127,
-0.31282803416252136,
-0.17321743071079254,
-0.08971735090017319,
-0.15437358617782593,
-0.4908255934715271,
-0.1343463808298111,
-0.1380818784236908,
0.0029992572963237762,
0.020368238911032677,
0.10347309708595276,
0.24265873432159424,
0.11632226407527924,
-0.24580056965351105,
-0.2013241946697235,
0.36332136392593384,
0.477848082780838,
-0.10252668708562851,
0.1816508173942566,
0.2644280791282654,
0.36074429750442505,
0.05289493128657341,
0.11636422574520111,
0.02598610520362854,
-0.13792391121387482,
-0.3066783547401428,
-0.10734768956899643,
-0.3014959692955017,
0.045013654977083206,
0.4049343466758728,
0.14337468147277832,
0.4381962716579437,
-0.07216053456068039,
-0.17576229572296143,
0.2922649383544922,
-0.269994854927063,
-0.18138064444065094,
0.20844042301177979,
0.2852252125740051,
0.2595648765563965,
0.19522356986999512,
-0.0813467875123024,
0.24803687632083893,
-0.1671559363603592,
0.11993341892957687,
-0.278363972902298,
-0.118107870221138,
-0.4321534335613251,
-0.02514704316854477,
-0.19718515872955322,
0.10558386892080307,
-0.683728039264679,
0.01488829217851162,
-0.24190808832645416,
-0.2092105746269226,
0.05796954408288002,
-0.2546018660068512,
-0.3775073289871216,
-0.18722420930862427,
0.11568336188793182,
0.2872747480869293,
0.167735293507576,
0.22033843398094177,
-0.125344380736351,
-0.0005959387053735554,
0.0047782547771930695,
0.179740309715271,
0.1768186390399933,
-0.27399584650993347,
-0.06302404403686523,
-0.09369468688964844,
0.1337633579969406,
-0.07209962606430054,
0.12937462329864502,
0.08610010892152786,
-0.11482600122690201,
-0.037954047322273254,
0.3107553720474243,
-0.4364684522151947,
-0.3556751012802124,
0.12186107784509659,
0.32817280292510986,
0.20799043774604797,
-0.035393550992012024,
0.14332261681556702,
-0.15430673956871033,
0.14061439037322998,
-0.2909442186355591,
0.3476499915122986,
0.019650926813483238,
-0.3119191527366638,
-0.11410008370876312,
-0.07543857395648956,
-0.47469794750213623,
-0.20624768733978271,
0.16284894943237305,
-0.001070709084160626,
-0.08009249716997147,
0.29723724722862244,
0.10926748812198639,
-0.3752128481864929,
0.04653980955481529,
-0.2771303355693817,
0.48645803332328796,
0.005750697571784258,
-0.504734218120575,
0.2566014528274536,
0.09972907602787018,
-0.3552195131778717,
0.14966847002506256,
0.06007503718137741,
-0.5195604562759399,
-0.13623382151126862,
0.14203350245952606,
0.2532920837402344,
-0.03472670167684555,
-0.04010444134473801,
0.1275334656238556,
0.01840401627123356,
0.07157079875469208,
-0.3380739390850067,
0.12572167813777924,
0.11803946644067764,
-0.13268844783306122,
-0.2959052324295044,
-0.05251779034733772,
0.4735734462738037,
-0.3305588364601135,
0.07182484120130539,
0.3747701048851013,
-0.11197591572999954,
0.6763092279434204,
0.27637553215026855,
0.10629457235336304,
-0.05948534235358238,
-0.23152272403240204,
0.019690396264195442,
0.32389262318611145,
-0.046228062361478806,
-0.43393009901046753,
0.4053036570549011,
0.018800463527441025,
-0.2147005796432495,
0.325698584318161,
-0.061390381306409836,
0.4299605190753937,
-0.16004735231399536,
-0.1702573150396347,
-0.20436353981494904,
0.16853715479373932,
-0.2562086582183838,
-0.21214602887630463,
-0.27019721269607544,
-0.13810645043849945,
-0.24020639061927795,
-0.039307739585638046,
0.609866738319397,
0.22516120970249176,
0.3775535523891449,
0.36303555965423584,
-0.1552814245223999,
0.15457917749881744,
-0.021493617445230484,
0.6281915307044983,
-0.3341260552406311,
0.26245439052581787,
-0.10954944789409637,
0.26146453619003296,
-0.009785426780581474,
0.09163898974657059,
0.03883974999189377,
0.05926479026675224,
-0.03943182900547981,
-0.28072085976600647,
-0.22336970269680023,
-0.02156767062842846,
-0.08899343758821487,
0.19318827986717224,
0.36406219005584717,
-0.26171165704727173,
-0.04813066124916077,
-0.10662839561700821,
0.05967231094837189,
0.048677414655685425,
-0.0396009162068367,
0.12193681299686432,
-0.03764045611023903,
0.183280810713768,
-0.1928565502166748,
-0.1259433925151825,
0.3464817404747009,
0.32327157258987427,
-0.19662708044052124,
0.041204627603292465,
0.1810642033815384,
0.3768128752708435,
0.2396518588066101,
0.05812743678689003,
0.09343152493238449,
0.09336863458156586,
0.004487043246626854,
-0.302144318819046,
0.38840165734291077,
0.3794935941696167,
-0.12332069128751755,
-0.04946909099817276,
0.4199572801589966,
0.00974440947175026,
0.010184217244386673,
-0.10975942760705948,
-0.002021174179390073,
0.12241901457309723,
-0.14589552581310272,
0.06666510552167892,
-0.6499150991439819,
-0.0828896313905716,
0.0912368893623352,
-0.0010405442444607615,
0.029457105323672295,
-0.3840999901294708,
0.21823686361312866,
0.10268589854240417,
0.047893863171339035,
0.05624819174408913,
0.015996871516108513,
0.24223239719867706,
-0.03339988738298416,
-0.13293050229549408,
0.22870200872421265,
0.45047128200531006,
0.09547795355319977,
0.2515965402126312,
-0.0036831230390816927,
0.19931170344352722,
-0.46158939599990845,
0.04278380423784256,
-0.01504597533494234,
-0.34339892864227295,
0.13858117163181305,
0.2765979766845703,
-0.003377702785655856,
-0.11619851738214493,
0.1474745273590088,
0.09382427483797073,
-0.13197235763072968,
-0.11356876790523529,
0.2792857885360718,
-0.41119879484176636,
0.22301925718784332,
-0.2597391605377197,
0.10586937516927719,
0.2410796582698822,
0.06707561016082764,
0.14547179639339447,
0.10234052687883377,
0.08223424106836319,
-0.011165119707584381,
-0.06611280888319016,
0.5639822483062744,
-0.11311192810535431,
-0.026978986337780952,
-0.19441157579421997,
0.04726957157254219,
-0.05242104083299637,
0.13686467707157135,
-0.30947163701057434,
-0.170979842543602,
0.1169562116265297,
-0.10092662274837494,
0.017560169100761414,
-0.431522011756897,
-0.2258291393518448,
0.16352029144763947,
0.17806226015090942,
0.01046119537204504,
0.18898101150989532,
-0.06992264091968536,
0.04738489165902138,
0.15772077441215515,
0.20831793546676636,
0.12330926209688187,
-0.030151590704917908,
0.48679447174072266,
-0.4382513761520386,
-0.2387075126171112,
-0.28420311212539673,
-0.16180947422981262,
0.4165360927581787,
-0.1331309676170349,
0.22705134749412537,
-0.11486894637346268,
0.035661231726408005,
-0.11419036984443665,
0.16342125833034515,
0.0227603018283844,
0.03585883229970932,
0.11802410334348679,
-0.1863834112882614,
-0.044303350150585175,
0.3194437026977539,
-0.2493220865726471,
-0.6044524312019348,
0.09727492928504944,
0.11191730946302414,
0.10520312935113907,
0.5144140720367432,
-0.15191668272018433,
-0.17465679347515106,
-0.019808610901236534,
-0.49498000741004944,
0.22963519394397736,
-0.292870432138443,
0.077942855656147,
-0.16711606085300446,
-0.25337135791778564,
-0.2876809239387512,
0.021999768912792206,
0.3431510925292969,
0.16291752457618713,
0.2733626067638397,
-0.15224365890026093,
-0.05207056179642677,
0.4711667001247406,
0.31295785307884216,
0.4284692704677582,
-0.13227248191833496,
0.20229005813598633,
0.13564777374267578,
0.36874085664749146,
-0.09903094917535782,
-0.10249649733304977,
0.0461735725402832,
-0.14920032024383545,
-0.2251082807779312,
0.4007512032985687,
-0.004089828580617905,
0.022345038130879402,
-0.10929232835769653,
0.07832352072000504,
0.10690465569496155,
-0.019369447603821754,
0.11278562992811203,
0.251009076833725,
0.26586636900901794,
-0.017999645322561264,
0.17985320091247559,
0.25963565707206726,
-0.1405397206544876,
-0.015809908509254456,
0.44870123267173767,
0.05859943851828575,
0.10861639678478241,
-0.038945045322179794,
0.3570076525211334,
-0.08359799534082413,
0.25623080134391785,
-0.14954859018325806,
0.4711335003376007,
-0.08300944417715073,
-0.07390251755714417,
0.21867232024669647,
0.00387927470728755,
0.24264422059059143,
-0.08454644680023193,
0.0059610530734062195,
-0.03207290917634964,
0.003841773374006152,
-0.1870235651731491,
-0.07141059637069702,
-0.34515824913978577,
0.14844132959842682,
0.39346420764923096,
0.2781326174736023,
-0.17578434944152832,
-0.19112397730350494,
-0.03715379163622856,
0.08850221335887909,
-0.12660302221775055,
-0.26387348771095276,
-0.34977003931999207,
-0.16556109488010406,
0.0012262155069038272,
-0.08169122785329819,
-0.04079507291316986,
-0.313335120677948,
0.0050701056607067585,
-0.06406228244304657,
-0.6155480146408081,
-0.07527585327625275,
0.14836829900741577,
-0.2522536814212799,
0.2240876406431198,
-0.25928857922554016,
-0.11863813549280167,
-0.22467508912086487,
0.5143061876296997,
0.33924826979637146,
0.3834324777126312,
-0.013752920553088188,
-0.11672481149435043,
0.3858446180820465,
-0.5834972262382507,
0.19349713623523712,
0.5752700567245483,
-0.1462988257408142,
0.15286290645599365,
0.04079994186758995,
-0.12844537198543549,
-0.4354979693889618,
-0.02189142256975174,
0.21276932954788208,
-0.1317477524280548,
-0.09996037930250168,
-0.03683396801352501,
-0.021228289231657982,
-0.22074271738529205,
-0.08815663307905197,
-0.21304231882095337,
0.21551010012626648,
0.05599726736545563,
0.4316364526748657,
0.12346106022596359,
1.5424871444702148,
0.24484293162822723,
-0.055295757949352264,
0.2833223342895508,
-0.5173494815826416,
-0.25662270188331604,
-0.0525444820523262,
0.25702178478240967,
-0.3186325430870056,
-0.19457648694515228,
-0.22188004851341248,
-0.1730169951915741,
0.27591872215270996,
0.3274820148944855,
-0.37625348567962646,
0.10407168418169022,
-0.2980044186115265,
0.18307368457317352,
0.1550309956073761,
-0.10065989196300507,
0.20598414540290833,
-0.06520325690507889,
0.018570225685834885,
0.13640928268432617,
0.13765943050384521,
0.07683449983596802,
-0.09277740120887756,
-0.23414723575115204,
-0.05209462717175484,
0.00265697855502367,
0.0501689538359642,
0.2047104686498642,
-0.3004753887653351,
-0.1638631373643875,
0.06204039976000786,
-0.2061128467321396,
-0.009808845818042755,
0.22323231399059296,
0.4170055389404297,
0.021317677572369576,
-0.18924765288829803,
0.07885054498910904,
0.2578171193599701,
-0.06294623762369156,
-0.1148461252450943,
-0.3853265941143036,
0.4097987711429596,
-0.07893498986959457,
0.05772166699171066,
0.072683185338974,
-0.031143508851528168,
0.11467834562063217,
0.09028656035661697,
0.20457592606544495,
-0.1578792780637741,
-0.5192272067070007,
-0.2806384265422821,
-0.017004111781716347,
-0.22665829956531525,
-0.08603834360837936,
0.133230060338974,
0.10065782815217972,
0.26371991634368896,
0.18318180739879608,
-0.05087567865848541,
-0.37344613671302795,
-0.305819571018219,
0.2830539345741272,
0.21867914497852325,
-0.13100464642047882,
0.131532683968544,
-0.3956868052482605,
-0.12023472040891647,
-0.37515851855278015,
-0.12852054834365845,
-0.16280055046081543,
-0.6688293218612671,
0.02754255197942257,
-0.5770970582962036,
0.1654139906167984,
0.2373245656490326,
0.2640441954135895,
0.19359473884105682,
-0.051123443990945816,
-0.25958871841430664,
-0.04442493990063667,
-0.08839543163776398,
-0.20087891817092896,
-0.05100823566317558,
-0.039157476276159286,
-0.08122538775205612,
0.05311785638332367,
0.07018028199672699,
0.18933527171611786,
-0.3448760509490967,
0.33726441860198975,
0.06451529264450073,
0.30915698409080505,
-0.1328912377357483,
-0.048195984214544296,
0.2194334715604782,
-0.10171612352132797,
0.05855930596590042,
0.2118537873029709,
-0.3762795627117157,
-0.18520043790340424,
-0.26235243678092957,
0.16358424723148346,
0.18681950867176056,
0.19722214341163635,
-0.39523735642433167,
0.17443323135375977,
-0.2022683173418045,
-0.26331189274787903,
0.08640821278095245,
0.16069509088993073,
-0.023015256971120834,
-0.02402087301015854,
-0.08763188123703003,
0.1454923003911972,
-0.27045607566833496,
-0.17046178877353668,
0.24999719858169556,
0.3395150303840637,
0.11418630927801132,
0.021820515394210815,
-0.3166292905807495,
-0.17080581188201904,
-0.0017248138319700956,
0.24973779916763306,
0.22273047268390656,
0.05634528398513794,
0.10389164835214615,
-0.2570786774158478,
0.16612112522125244,
-0.18448233604431152,
0.2603526711463928,
0.12800486385822296,
-0.017232561483979225,
-0.3660599887371063,
-0.002510368824005127,
0.18809913098812103,
-0.07538255304098129,
-0.06635600328445435,
-0.2430613487958908,
0.25225830078125,
0.0718081071972847,
0.4712616503238678,
0.6560980677604675,
-0.389733225107193,
0.1638866811990738,
-0.012509744614362717,
-0.2700653374195099,
-0.3207031190395355,
-0.18591396510601044,
-0.24688494205474854,
0.0993337631225586,
0.26005807518959045,
0.1206950843334198,
0.14852789044380188,
-0.12330930680036545,
0.07610288262367249,
0.526076078414917,
0.5019056797027588,
0.6835202574729919,
0.1884782910346985,
0.020112287253141403,
-0.1681380718946457,
0.11874350905418396,
0.08351079374551773,
-0.07054222375154495,
0.26253536343574524,
0.22246602177619934,
0.24724870920181274,
-0.10377932339906693,
-0.1837867796421051,
-0.07322986423969269,
-0.5665721297264099,
-0.28934037685394287,
0.04707804322242737,
0.3011094927787781,
-0.3626795709133148,
-0.23928187787532806,
-0.23598213493824005,
-0.07443298399448395,
0.4574061632156372,
0.1549706757068634,
-0.1654655486345291,
0.18040859699249268,
0.026053743436932564,
-0.12649370729923248,
0.16177119314670563,
0.2195928394794464,
-0.48769906163215637,
0.12107386440038681,
0.09446699172258377,
0.013078626245260239,
0.5131091475486755,
0.37707310914993286,
0.33900097012519836,
0.2157355099916458,
0.21460530161857605,
-0.2824203073978424,
-0.09924139082431793,
-0.2587447762489319,
0.03461693972349167,
0.503471314907074,
0.3787928819656372,
-0.29078876972198486,
0.3589603304862976,
0.21237441897392273,
-0.0885784924030304,
0.02742064744234085,
0.2737143337726593,
-0.1155969649553299,
-0.33337846398353577,
0.28311702609062195,
0.23315899074077606,
-0.24213692545890808,
-0.13564227521419525,
-0.26478806138038635,
-0.3862625062465668,
-0.08268911391496658,
0.540101170539856,
-0.3124423027038574,
0.34689125418663025,
0.163671612739563,
0.07414522022008896,
0.376637727022171,
0.317818820476532,
-0.028273481875658035,
-0.18174341320991516,
-0.1420520395040512,
-0.1408357322216034,
-0.046705156564712524,
0.32351523637771606,
0.1695490926504135,
0.22187334299087524,
-0.12230530381202698,
0.1546442061662674,
0.25202861428260803,
0.14463867247104645,
-0.2291894406080246,
-0.31555885076522827,
-0.11920040100812912,
-0.04883870854973793,
-0.46494683623313904,
-0.03739016503095627,
0.1090317890048027,
0.14476951956748962,
-0.2269981950521469,
-0.27401095628738403,
0.29049912095069885,
0.08472250401973724,
0.2702452838420868,
0.05788925290107727,
0.00105747627094388,
-0.31672006845474243,
-0.0931997001171112,
0.2270849198102951,
0.27309751510620117,
0.17592120170593262,
-0.10833010822534561,
-0.27648934721946716,
-0.13595157861709595,
0.31119951605796814,
0.08988357335329056,
0.2820752263069153,
0.2659737467765808,
0.15885543823242188,
-0.05611957982182503,
0.31994765996932983,
-0.0964827910065651,
0.40520694851875305,
0.24492712318897247,
0.06842987984418869,
0.04948899894952774,
0.30177071690559387,
-0.28594985604286194,
-0.18294425308704376,
0.2249562293291092,
0.49941134452819824,
0.11180326342582703,
0.13709136843681335,
-0.07117754966020584,
-0.261445552110672,
0.20685279369354248,
-0.024784710258245468,
-0.13807544112205505,
-0.019323252141475677,
0.33691200613975525,
0.35233592987060547,
0.3969721794128418,
-0.5981607437133789,
-0.10851753503084183,
0.24352020025253296,
-0.11078949272632599,
-0.030853567644953728,
0.13566425442695618,
-0.0963633805513382,
-0.1605435013771057,
-0.17803409695625305,
0.5988221168518066,
0.1771908849477768,
-0.30199483036994934,
-0.19451904296875,
-0.2903484106063843
] |
https://github.com/huggingface/datasets/issues/3148
|
Streaming with num_workers != 0
|
I can confirm that I was able to reproduce the bug. This seems odd given that #3423 reports duplicate data retrieval when `num_workers` and `streaming` are used together, which is obviously different from what is reported here.
|
## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
| 37 |
Streaming with num_workers != 0
|
[
-0.6882614493370056,
-0.3298450708389282,
-0.15023349225521088,
-0.17138057947158813,
0.03709246218204498,
-0.45807963609695435,
0.4348416328430176,
0.14308662712574005,
-0.06370139867067337,
0.48454001545906067,
0.43556490540504456,
-0.16781923174858093,
-0.5371176600456238,
0.17256572842597961,
0.005074653308838606,
0.42502257227897644,
-0.13684724271297455,
0.40095195174217224,
0.00785854086279869,
-0.09317074716091156,
0.10549292713403702,
0.056332796812057495,
0.07436451315879822,
-0.18959525227546692,
-0.3785557150840759,
0.003889532061293721,
0.39124149084091187,
0.3295925259590149,
0.0995626449584961,
0.18084263801574707,
-0.24525541067123413,
-0.06936870515346527,
0.003303719684481621,
0.33655044436454773,
-0.00011347881081746891,
-0.014451739378273487,
0.30826443433761597,
-0.034875329583883286,
-0.2871726155281067,
-0.007674859371036291,
-0.3357660472393036,
-0.13689644634723663,
-0.17053857445716858,
-0.02434651181101799,
-0.0248242300003767,
0.2685525119304657,
0.2796778976917267,
-0.3423406481742859,
0.3741130828857422,
0.2997220456600189,
0.1419261246919632,
0.36028003692626953,
-0.4039101302623749,
0.30929017066955566,
-0.15862810611724854,
-0.1953752487897873,
0.09205968677997589,
-0.01389481220394373,
0.13892343640327454,
0.026056911796331406,
-0.06561580300331116,
0.39423057436943054,
-0.25772103667259216,
-0.04683958739042282,
0.09050806611776352,
-0.22069840133190155,
0.4853293299674988,
-0.31599652767181396,
-0.011736203916370869,
0.2139713317155838,
-0.29171961545944214,
0.21556971967220306,
-0.05099685862660408,
-0.3061552941799164,
-0.07231326401233673,
-0.5405327081680298,
-0.008256466127932072,
0.3102324604988098,
-0.19109952449798584,
0.030773015692830086,
-0.22079361975193024,
0.07051581889390945,
-0.11147035658359528,
0.06067845597863197,
-0.047410011291503906,
0.36246076226234436,
0.04970812425017357,
0.00829552672803402,
-0.01419923361390829,
0.14140011370182037,
0.4047265350818634,
-0.12855049967765808,
0.05110706388950348,
-0.017967121675610542,
0.010776798240840435,
-0.1246010884642601,
0.2800174355506897,
0.14478866755962372,
-0.019002042710781097,
-0.1947491317987442,
0.15550000965595245,
0.35948723554611206,
0.10210156440734863,
0.20133525133132935,
0.2746586501598358,
-0.3108949661254883,
-0.03381437435746193,
-0.3672849237918854,
0.3725046217441559,
0.20638884603977203,
-0.11256179213523865,
-0.007222259882837534,
0.11819823831319809,
-0.07774586975574493,
0.1473824679851532,
0.057654909789562225,
0.10749373584985733,
0.06030142307281494,
-0.09268424659967422,
-0.019834164530038834,
-0.07118963450193405,
0.15371085703372955,
0.1998279094696045,
0.0761905089020729,
-0.019210971891880035,
0.5974214673042297,
-0.2046455293893814,
0.02727893926203251,
-0.49475228786468506,
-0.4010336399078369,
-0.3267124593257904,
-0.2199661135673523,
-0.028427373617887497,
-0.20001071691513062,
0.1847309023141861,
-0.5263158082962036,
0.33841532468795776,
-0.054760631173849106,
0.4133523106575012,
-0.11710339784622192,
0.2967454195022583,
-0.10858668386936188,
-0.028265632688999176,
0.22605474293231964,
0.19537976384162903,
0.09019594639539719,
0.1648201048374176,
-0.08243682235479355,
0.13025696575641632,
0.287386029958725,
0.08281736075878143,
-0.48461177945137024,
0.21602505445480347,
0.23838672041893005,
-0.17616242170333862,
0.25197821855545044,
0.152410626411438,
0.2736842632293701,
0.056663576513528824,
-0.055708207190036774,
-0.14278584718704224,
-0.18178732693195343,
-0.12682391703128815,
0.16102589666843414,
-0.1863907426595688,
0.4990946650505066,
0.06859920173883438,
-0.2224578708410263,
-0.04368683695793152,
0.10935091227293015,
0.5191242694854736,
0.07889392971992493,
-0.013518735766410828,
-0.4974595010280609,
0.10171057283878326,
0.11744098365306854,
0.29177892208099365,
0.0800359919667244,
0.06923242658376694,
0.3632781207561493,
-0.33496713638305664,
-0.12890662252902985,
0.4574817717075348,
0.3260129988193512,
0.2823580205440521,
-0.1046687662601471,
0.3336621820926666,
0.07213436812162399,
-0.07734076678752899,
0.1719921976327896,
-0.4032836854457855,
0.10087967664003372,
-0.200309157371521,
0.059856824576854706,
0.2846561074256897,
0.16559673845767975,
0.10800649970769882,
-0.07786550372838974,
-0.03769494220614433,
-0.027327684685587883,
0.08620350062847137,
0.03884682059288025,
0.06388112157583237,
-0.005318193230777979,
-0.18075944483280182,
0.1063876524567604,
0.04825099930167198,
-0.09450657665729523,
0.16792309284210205,
0.08173029124736786,
0.3046230673789978,
0.11745108664035797,
0.1503511667251587,
-0.061027221381664276,
0.14836348593235016,
0.12300225347280502,
0.1734527051448822,
0.04718834534287453,
-0.2737107276916504,
-0.07334830611944199,
-0.3549950420856476,
0.37258657813072205,
-0.34827449917793274,
-0.2626989781856537,
-0.11754916608333588,
0.1999933123588562,
0.01595984771847725,
-0.45256927609443665,
0.033305779099464417,
0.030781175941228867,
0.2223028987646103,
0.2921057939529419,
0.1184675320982933,
0.0256369449198246,
-0.22298860549926758,
0.16946078836917877,
-0.15911152958869934,
0.33893075585365295,
0.28457561135292053,
-0.14656022191047668,
0.17091433703899384,
0.4429682791233063,
0.07692012190818787,
0.12286259979009628,
-0.013676567934453487,
0.09933704882860184,
-0.2422071397304535,
0.026644445955753326,
0.09144940972328186,
-0.101702019572258,
0.23188209533691406,
-0.06969169527292252,
-0.03632638230919838,
0.026855260133743286,
0.4094840884208679,
-0.002251865342259407,
-0.3399418592453003,
-0.1292864978313446,
-0.5383991003036499,
0.2656490206718445,
-0.013923794031143188,
0.08403542637825012,
0.16438966989517212,
-0.1134810745716095,
-0.10799510031938553,
-0.06969951838254929,
0.4265660047531128,
-0.06214838847517967,
0.20335225760936737,
0.3277728855609894,
0.20090600848197937,
-0.0202406644821167,
-0.05456223711371422,
-0.38358527421951294,
0.39393332600593567,
-0.022481312975287437,
-0.15955796837806702,
0.37512755393981934,
-0.09816943854093552,
-0.3396885395050049,
-0.5506377220153809,
-0.19692490994930267,
0.009868530556559563,
0.26878753304481506,
-0.44492992758750916,
0.03331915661692619,
-0.05899115279316902,
-0.0922597348690033,
-0.15946881473064423,
0.009448016062378883,
-0.1816159188747406,
-0.22717086970806122,
0.18950392305850983,
0.6984214186668396,
-0.30411800742149353,
-0.066046804189682,
-0.4102746844291687,
-0.07186692208051682,
-0.03282221034169197,
0.5181176662445068,
-0.11788071691989899,
-0.20449498295783997,
0.0525151751935482,
0.06837563216686249,
0.07000219076871872,
-0.01569356583058834,
-0.0015165578806772828,
0.15606625378131866,
-0.3505447804927826,
0.008860515430569649,
0.041095878928899765,
-0.15096700191497803,
0.21918323636054993,
0.06408335268497467,
-0.0067186797969043255,
0.37935832142829895,
-0.11130312830209732,
-0.20848223567008972,
-0.18075282871723175,
-0.3011433482170105,
0.07544926553964615,
0.058066852390766144,
0.03640185669064522,
0.28840455412864685,
-0.44598278403282166,
0.02144107036292553,
0.019216587767004967,
-0.19922444224357605,
-0.09884068369865417,
0.07229157537221909,
0.4120548665523529,
0.07647508382797241,
0.28874024748802185,
-0.21759381890296936,
0.4516836404800415,
-0.3822515606880188,
-0.243402361869812,
-0.40276992321014404,
0.23716047406196594,
0.1037660613656044,
-0.1098174974322319,
0.316971093416214,
0.1187233030796051,
-0.22472020983695984,
0.10848329961299896,
-0.17076946794986725,
0.03949061781167984,
0.39551693201065063,
-0.24852043390274048,
-0.1910942792892456,
-0.07555370032787323,
0.2919985055923462,
0.21175530552864075,
-0.2630937993526459,
-0.1773589849472046,
0.14162428677082062,
-0.08486554026603699,
0.10991852730512619,
-0.009140853770077229,
-0.010744607076048851,
0.5573241114616394,
-0.10455921292304993,
0.3450942933559418,
-0.16757036745548248,
0.07348275184631348,
0.29119423031806946,
0.18471404910087585,
0.09632929414510727,
0.3886258006095886,
-0.06377889961004257,
0.34850019216537476,
0.330049067735672,
-0.089152030646801,
0.2116083949804306,
0.002107543870806694,
-0.2715660333633423,
-0.24589411914348602,
0.148395836353302,
-0.27844658493995667,
0.01807374507188797,
0.18489181995391846,
0.009193635545670986,
0.014830763451755047,
0.15682795643806458,
0.0783284604549408,
-0.02791127748787403,
-0.29347267746925354,
-0.46560487151145935,
0.07012621313333511,
0.27960628271102905,
-0.0592389814555645,
0.00961921364068985,
0.15355637669563293,
-0.4791906476020813,
0.13117733597755432,
-0.03865710645914078,
0.31957870721817017,
-0.05426764860749245,
-0.10050137341022491,
0.0980023443698883,
-0.007385994307696819,
0.5126441717147827,
-0.32842302322387695,
0.3369954526424408,
-0.08239439129829407,
0.13601136207580566,
-0.08207260072231293,
0.04824038967490196,
-0.004612512420862913,
-0.03586496040225029,
0.0539681501686573,
0.1994713693857193,
-0.08102281391620636,
0.19396357238292694,
-0.09610462933778763,
-0.5587490200996399,
-0.07683990895748138,
-0.2337060123682022,
-0.5752785801887512,
-0.1714470386505127,
-0.042205337435007095,
0.318815678358078,
0.07638734579086304,
0.18378838896751404,
-0.31707626581192017,
-0.26479262113571167,
0.11422592401504517,
0.06617819517850876,
0.18754568696022034,
-0.19305211305618286,
0.02177123725414276,
0.06528125703334808,
-0.28160059452056885,
0.11020781099796295,
0.0966658741235733,
-0.29858464002609253,
-0.22764082252979279,
0.24673733115196228,
-0.03233044967055321,
0.22994068264961243,
0.1556791514158249,
0.294778048992157,
0.38284844160079956,
0.17958292365074158,
0.17730015516281128,
0.7372989058494568,
0.21336303651332855,
0.2148028016090393,
0.07297512888908386,
-0.205597922205925,
0.09663213044404984,
0.052691008895635605,
-0.21946890652179718,
-0.07945115119218826,
-0.11265598237514496,
0.40509146451950073,
0.07265439629554749,
-0.6198503375053406,
-0.11978206783533096,
-0.3286910653114319,
0.2894195318222046,
0.9674395322799683,
0.11342944949865341,
-0.06292230635881424,
0.026845421642065048,
-0.35092663764953613,
0.36909136176109314,
-0.4831606149673462,
0.4944862127304077,
-0.3121255040168762,
-0.2257448136806488,
0.03840910643339157,
-0.13924165070056915,
-0.0032168133184313774,
-0.018673645332455635,
-0.22933615744113922,
0.4517771005630493,
-0.16347938776016235,
0.38894784450531006,
-0.024459006264805794,
-0.009696967899799347,
-0.28533416986465454,
-0.13057054579257965,
-0.4826939105987549,
0.1166566014289856,
-0.1490563154220581,
0.02512821927666664,
-0.37174683809280396,
-0.07712072134017944,
0.37540385127067566,
-0.08992744982242584,
0.14251451194286346,
-0.014788685366511345,
-0.15940795838832855,
-0.027591556310653687,
-0.314525842666626,
-0.01611616648733616,
-0.3382999002933502,
-0.12761780619621277,
-0.04902101308107376,
-0.039258260279893875,
-0.003966357093304396,
-0.15204842388629913,
0.07401872426271439,
0.12607425451278687,
-0.1650463193655014,
0.27262642979621887,
0.10100264847278595,
-0.3876912593841553,
-0.34404659271240234,
0.17667600512504578,
0.046041641384363174,
-0.12820684909820557,
-0.23762564361095428,
0.23147781193256378,
-0.043776098638772964,
0.20329144597053528,
0.028286650776863098,
0.18551941215991974,
-0.08026113361120224,
-0.13438890874385834,
0.1497601568698883,
0.037272412329912186,
-0.46648910641670227,
0.11873050779104233,
-0.2049296498298645,
-0.13507243990898132,
-0.1753440648317337,
0.41649433970451355,
0.19193443655967712,
0.3324678838253021,
0.22188806533813477,
0.09316050261259079,
-0.3477329611778259,
-0.1794908344745636,
-0.27588802576065063,
-0.056387268006801605,
-0.3653189241886139,
0.09256439656019211,
0.25184497237205505,
-0.40954363346099854,
0.07990231364965439,
-0.20127619802951813,
-0.2838439643383026,
0.6717515587806702,
-0.27237749099731445,
-0.1348179578781128,
-0.2174033373594284,
-0.07788315415382385,
-0.04557759687304497,
-0.17424610257148743,
0.02747192792594433,
-0.019380327314138412,
0.11593260616064072,
-0.21082010865211487,
-0.3646951913833618,
-0.16417306661605835,
-0.2637232840061188,
0.40430665016174316,
-0.12186732888221741,
-0.31511056423187256,
0.09393678605556488,
-0.054615046828985214,
0.09930679947137833,
0.07789885252714157,
-0.37654730677604675,
-0.33720409870147705,
0.09146255254745483,
0.15496577322483063,
0.06199468672275543,
-0.2908388376235962,
-0.22255785763263702,
-0.08971566706895828,
-0.11228787153959274,
0.16065272688865662,
-0.05289193615317345,
-0.10171771049499512,
-0.07664768397808075,
-0.2082599401473999,
0.6214777827262878,
0.39412984251976013,
-0.0661320760846138,
0.08238688111305237,
0.030705323442816734,
0.17843462526798248,
-0.43521374464035034,
0.07803336530923843,
0.38069358468055725,
-0.15489467978477478,
0.09494463354349136,
-0.11649462580680847,
0.09023591876029968,
0.26690906286239624,
0.3364448845386505,
-0.27960875630378723,
0.04668297991156578,
0.1291176825761795,
0.17161506414413452,
0.19106188416481018,
0.22459378838539124,
-0.25345054268836975,
0.2167695164680481,
0.2359251081943512,
-0.10099922865629196,
-0.002808065852150321,
0.15546894073486328,
0.13671714067459106,
0.10723977535963058,
0.09274044632911682,
-0.04713794216513634,
-0.5510463714599609,
0.04006662592291832,
0.5117153525352478,
-0.2934837341308594,
-0.505844235420227,
-0.08307994902133942,
0.1897728443145752,
-0.263278603553772,
0.10335142910480499,
-0.2551765739917755,
-0.06939440965652466,
-0.038522809743881226,
0.05762273073196411,
0.09971411526203156,
0.10397128015756607,
0.24293211102485657,
-0.17262794077396393,
-0.4368572533130646,
-0.22553539276123047,
-0.5042958855628967,
0.3460195064544678,
-0.2586558759212494,
0.5974482893943787,
0.12381511181592941,
-0.06511326879262924,
0.025702249258756638,
0.23957188427448273,
0.08219936490058899,
0.1808914989233017,
-0.2551768720149994,
0.13447315990924835,
-0.2691360116004944,
0.05510256066918373,
-0.028559330850839615,
0.10306335985660553,
0.3713776469230652,
0.45339691638946533,
-0.08819285035133362,
0.24510133266448975,
-0.18604111671447754,
0.21060635149478912,
-0.054872412234544754,
0.309813916683197,
0.08963856101036072,
-0.2606562077999115,
-0.16396301984786987,
0.4346409738063812,
0.4548361301422119,
0.11628300696611404,
0.09887956827878952,
0.2307019680738449,
0.10886110365390778,
-0.05143240839242935,
0.26841646432876587,
0.4059792160987854,
-0.00962722860276699,
-0.33047041296958923,
0.11027179658412933,
0.3169664442539215,
0.2775517404079437,
0.0863957330584526,
0.12329354882240295,
-0.2620602250099182,
0.12430702149868011,
0.0994565486907959,
-0.15259653329849243,
0.17056645452976227,
0.030469276010990143,
0.1575678586959839,
-0.16078241169452667,
-0.4123295843601227,
-0.14193467795848846,
-0.21662795543670654,
0.13457649946212769,
0.207819402217865,
-0.152742400765419,
0.016615858301520348,
-0.05367644876241684,
0.07955013960599899,
-0.05958212912082672,
0.3953987658023834,
-0.10060340911149979,
-0.12989339232444763,
-0.28609102964401245,
0.02206484228372574,
-0.590746283531189,
0.3060964345932007,
-0.020395120605826378,
0.22845591604709625,
0.06422173976898193,
0.12168289721012115,
-0.06658916920423508,
-0.1822565644979477,
-0.2861884832382202,
0.000013124302313372027,
0.17941884696483612,
0.22793518006801605,
-0.019727986305952072,
0.03380240872502327,
-0.13582462072372437,
-0.020850440487265587,
0.06283796578645706,
-0.1893913298845291,
0.42258086800575256,
-0.2199081927537918,
0.23380319774150848,
0.3229496479034424,
0.14530709385871887,
-0.4673413932323456,
0.2594026029109955,
-0.09305141121149063,
0.06849484145641327,
0.15104736387729645,
-0.14489471912384033,
0.1160377711057663,
0.049603793770074844,
0.042271167039871216,
-0.24041831493377686,
-0.06240124627947807,
0.24593740701675415,
0.1455453336238861,
-0.03703106939792633,
0.14517028629779816,
-0.18243931233882904,
0.6909224390983582,
0.20435896515846252,
0.06448252499103546,
-0.016767067834734917,
-0.06480035185813904,
-0.04102286323904991,
0.28702855110168457,
-0.198805570602417,
-0.1028369665145874,
0.14038780331611633,
-0.17415739595890045,
-0.31023746728897095,
-0.3169337213039398,
0.24101504683494568,
-0.05174718424677849,
-0.33592158555984497,
-0.6760669946670532,
0.46703261137008667,
0.4659062325954437,
0.1505698263645172,
-0.04218902438879013,
0.0432552844285965,
0.16888247430324554,
-0.14411062002182007,
0.04688597470521927,
0.12457012385129929,
-0.007186763919889927,
-0.1058085635304451,
0.0032798894681036472,
-0.48409244418144226,
0.30577540397644043,
0.029266059398651123,
0.3705202341079712,
-0.2528563439846039
] |
https://github.com/huggingface/datasets/issues/3148
|
Streaming with num_workers != 0
|
Any update? A possible solution is to have multiple arrow files as shards, and handle them like what webdatasets does.

Pytorch's new dataset RFC is supporting sharding now, which may helps avoid duplicate data under streaming mode. (https://github.com/pytorch/pytorch/blob/master/torch/utils/data/datapipes/iter/grouping.py#L13)
|
## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
| 39 |
Streaming with num_workers != 0
|
[
-0.6882614493370056,
-0.3298450708389282,
-0.15023349225521088,
-0.17138057947158813,
0.03709246218204498,
-0.45807963609695435,
0.4348416328430176,
0.14308662712574005,
-0.06370139867067337,
0.48454001545906067,
0.43556490540504456,
-0.16781923174858093,
-0.5371176600456238,
0.17256572842597961,
0.005074653308838606,
0.42502257227897644,
-0.13684724271297455,
0.40095195174217224,
0.00785854086279869,
-0.09317074716091156,
0.10549292713403702,
0.056332796812057495,
0.07436451315879822,
-0.18959525227546692,
-0.3785557150840759,
0.003889532061293721,
0.39124149084091187,
0.3295925259590149,
0.0995626449584961,
0.18084263801574707,
-0.24525541067123413,
-0.06936870515346527,
0.003303719684481621,
0.33655044436454773,
-0.00011347881081746891,
-0.014451739378273487,
0.30826443433761597,
-0.034875329583883286,
-0.2871726155281067,
-0.007674859371036291,
-0.3357660472393036,
-0.13689644634723663,
-0.17053857445716858,
-0.02434651181101799,
-0.0248242300003767,
0.2685525119304657,
0.2796778976917267,
-0.3423406481742859,
0.3741130828857422,
0.2997220456600189,
0.1419261246919632,
0.36028003692626953,
-0.4039101302623749,
0.30929017066955566,
-0.15862810611724854,
-0.1953752487897873,
0.09205968677997589,
-0.01389481220394373,
0.13892343640327454,
0.026056911796331406,
-0.06561580300331116,
0.39423057436943054,
-0.25772103667259216,
-0.04683958739042282,
0.09050806611776352,
-0.22069840133190155,
0.4853293299674988,
-0.31599652767181396,
-0.011736203916370869,
0.2139713317155838,
-0.29171961545944214,
0.21556971967220306,
-0.05099685862660408,
-0.3061552941799164,
-0.07231326401233673,
-0.5405327081680298,
-0.008256466127932072,
0.3102324604988098,
-0.19109952449798584,
0.030773015692830086,
-0.22079361975193024,
0.07051581889390945,
-0.11147035658359528,
0.06067845597863197,
-0.047410011291503906,
0.36246076226234436,
0.04970812425017357,
0.00829552672803402,
-0.01419923361390829,
0.14140011370182037,
0.4047265350818634,
-0.12855049967765808,
0.05110706388950348,
-0.017967121675610542,
0.010776798240840435,
-0.1246010884642601,
0.2800174355506897,
0.14478866755962372,
-0.019002042710781097,
-0.1947491317987442,
0.15550000965595245,
0.35948723554611206,
0.10210156440734863,
0.20133525133132935,
0.2746586501598358,
-0.3108949661254883,
-0.03381437435746193,
-0.3672849237918854,
0.3725046217441559,
0.20638884603977203,
-0.11256179213523865,
-0.007222259882837534,
0.11819823831319809,
-0.07774586975574493,
0.1473824679851532,
0.057654909789562225,
0.10749373584985733,
0.06030142307281494,
-0.09268424659967422,
-0.019834164530038834,
-0.07118963450193405,
0.15371085703372955,
0.1998279094696045,
0.0761905089020729,
-0.019210971891880035,
0.5974214673042297,
-0.2046455293893814,
0.02727893926203251,
-0.49475228786468506,
-0.4010336399078369,
-0.3267124593257904,
-0.2199661135673523,
-0.028427373617887497,
-0.20001071691513062,
0.1847309023141861,
-0.5263158082962036,
0.33841532468795776,
-0.054760631173849106,
0.4133523106575012,
-0.11710339784622192,
0.2967454195022583,
-0.10858668386936188,
-0.028265632688999176,
0.22605474293231964,
0.19537976384162903,
0.09019594639539719,
0.1648201048374176,
-0.08243682235479355,
0.13025696575641632,
0.287386029958725,
0.08281736075878143,
-0.48461177945137024,
0.21602505445480347,
0.23838672041893005,
-0.17616242170333862,
0.25197821855545044,
0.152410626411438,
0.2736842632293701,
0.056663576513528824,
-0.055708207190036774,
-0.14278584718704224,
-0.18178732693195343,
-0.12682391703128815,
0.16102589666843414,
-0.1863907426595688,
0.4990946650505066,
0.06859920173883438,
-0.2224578708410263,
-0.04368683695793152,
0.10935091227293015,
0.5191242694854736,
0.07889392971992493,
-0.013518735766410828,
-0.4974595010280609,
0.10171057283878326,
0.11744098365306854,
0.29177892208099365,
0.0800359919667244,
0.06923242658376694,
0.3632781207561493,
-0.33496713638305664,
-0.12890662252902985,
0.4574817717075348,
0.3260129988193512,
0.2823580205440521,
-0.1046687662601471,
0.3336621820926666,
0.07213436812162399,
-0.07734076678752899,
0.1719921976327896,
-0.4032836854457855,
0.10087967664003372,
-0.200309157371521,
0.059856824576854706,
0.2846561074256897,
0.16559673845767975,
0.10800649970769882,
-0.07786550372838974,
-0.03769494220614433,
-0.027327684685587883,
0.08620350062847137,
0.03884682059288025,
0.06388112157583237,
-0.005318193230777979,
-0.18075944483280182,
0.1063876524567604,
0.04825099930167198,
-0.09450657665729523,
0.16792309284210205,
0.08173029124736786,
0.3046230673789978,
0.11745108664035797,
0.1503511667251587,
-0.061027221381664276,
0.14836348593235016,
0.12300225347280502,
0.1734527051448822,
0.04718834534287453,
-0.2737107276916504,
-0.07334830611944199,
-0.3549950420856476,
0.37258657813072205,
-0.34827449917793274,
-0.2626989781856537,
-0.11754916608333588,
0.1999933123588562,
0.01595984771847725,
-0.45256927609443665,
0.033305779099464417,
0.030781175941228867,
0.2223028987646103,
0.2921057939529419,
0.1184675320982933,
0.0256369449198246,
-0.22298860549926758,
0.16946078836917877,
-0.15911152958869934,
0.33893075585365295,
0.28457561135292053,
-0.14656022191047668,
0.17091433703899384,
0.4429682791233063,
0.07692012190818787,
0.12286259979009628,
-0.013676567934453487,
0.09933704882860184,
-0.2422071397304535,
0.026644445955753326,
0.09144940972328186,
-0.101702019572258,
0.23188209533691406,
-0.06969169527292252,
-0.03632638230919838,
0.026855260133743286,
0.4094840884208679,
-0.002251865342259407,
-0.3399418592453003,
-0.1292864978313446,
-0.5383991003036499,
0.2656490206718445,
-0.013923794031143188,
0.08403542637825012,
0.16438966989517212,
-0.1134810745716095,
-0.10799510031938553,
-0.06969951838254929,
0.4265660047531128,
-0.06214838847517967,
0.20335225760936737,
0.3277728855609894,
0.20090600848197937,
-0.0202406644821167,
-0.05456223711371422,
-0.38358527421951294,
0.39393332600593567,
-0.022481312975287437,
-0.15955796837806702,
0.37512755393981934,
-0.09816943854093552,
-0.3396885395050049,
-0.5506377220153809,
-0.19692490994930267,
0.009868530556559563,
0.26878753304481506,
-0.44492992758750916,
0.03331915661692619,
-0.05899115279316902,
-0.0922597348690033,
-0.15946881473064423,
0.009448016062378883,
-0.1816159188747406,
-0.22717086970806122,
0.18950392305850983,
0.6984214186668396,
-0.30411800742149353,
-0.066046804189682,
-0.4102746844291687,
-0.07186692208051682,
-0.03282221034169197,
0.5181176662445068,
-0.11788071691989899,
-0.20449498295783997,
0.0525151751935482,
0.06837563216686249,
0.07000219076871872,
-0.01569356583058834,
-0.0015165578806772828,
0.15606625378131866,
-0.3505447804927826,
0.008860515430569649,
0.041095878928899765,
-0.15096700191497803,
0.21918323636054993,
0.06408335268497467,
-0.0067186797969043255,
0.37935832142829895,
-0.11130312830209732,
-0.20848223567008972,
-0.18075282871723175,
-0.3011433482170105,
0.07544926553964615,
0.058066852390766144,
0.03640185669064522,
0.28840455412864685,
-0.44598278403282166,
0.02144107036292553,
0.019216587767004967,
-0.19922444224357605,
-0.09884068369865417,
0.07229157537221909,
0.4120548665523529,
0.07647508382797241,
0.28874024748802185,
-0.21759381890296936,
0.4516836404800415,
-0.3822515606880188,
-0.243402361869812,
-0.40276992321014404,
0.23716047406196594,
0.1037660613656044,
-0.1098174974322319,
0.316971093416214,
0.1187233030796051,
-0.22472020983695984,
0.10848329961299896,
-0.17076946794986725,
0.03949061781167984,
0.39551693201065063,
-0.24852043390274048,
-0.1910942792892456,
-0.07555370032787323,
0.2919985055923462,
0.21175530552864075,
-0.2630937993526459,
-0.1773589849472046,
0.14162428677082062,
-0.08486554026603699,
0.10991852730512619,
-0.009140853770077229,
-0.010744607076048851,
0.5573241114616394,
-0.10455921292304993,
0.3450942933559418,
-0.16757036745548248,
0.07348275184631348,
0.29119423031806946,
0.18471404910087585,
0.09632929414510727,
0.3886258006095886,
-0.06377889961004257,
0.34850019216537476,
0.330049067735672,
-0.089152030646801,
0.2116083949804306,
0.002107543870806694,
-0.2715660333633423,
-0.24589411914348602,
0.148395836353302,
-0.27844658493995667,
0.01807374507188797,
0.18489181995391846,
0.009193635545670986,
0.014830763451755047,
0.15682795643806458,
0.0783284604549408,
-0.02791127748787403,
-0.29347267746925354,
-0.46560487151145935,
0.07012621313333511,
0.27960628271102905,
-0.0592389814555645,
0.00961921364068985,
0.15355637669563293,
-0.4791906476020813,
0.13117733597755432,
-0.03865710645914078,
0.31957870721817017,
-0.05426764860749245,
-0.10050137341022491,
0.0980023443698883,
-0.007385994307696819,
0.5126441717147827,
-0.32842302322387695,
0.3369954526424408,
-0.08239439129829407,
0.13601136207580566,
-0.08207260072231293,
0.04824038967490196,
-0.004612512420862913,
-0.03586496040225029,
0.0539681501686573,
0.1994713693857193,
-0.08102281391620636,
0.19396357238292694,
-0.09610462933778763,
-0.5587490200996399,
-0.07683990895748138,
-0.2337060123682022,
-0.5752785801887512,
-0.1714470386505127,
-0.042205337435007095,
0.318815678358078,
0.07638734579086304,
0.18378838896751404,
-0.31707626581192017,
-0.26479262113571167,
0.11422592401504517,
0.06617819517850876,
0.18754568696022034,
-0.19305211305618286,
0.02177123725414276,
0.06528125703334808,
-0.28160059452056885,
0.11020781099796295,
0.0966658741235733,
-0.29858464002609253,
-0.22764082252979279,
0.24673733115196228,
-0.03233044967055321,
0.22994068264961243,
0.1556791514158249,
0.294778048992157,
0.38284844160079956,
0.17958292365074158,
0.17730015516281128,
0.7372989058494568,
0.21336303651332855,
0.2148028016090393,
0.07297512888908386,
-0.205597922205925,
0.09663213044404984,
0.052691008895635605,
-0.21946890652179718,
-0.07945115119218826,
-0.11265598237514496,
0.40509146451950073,
0.07265439629554749,
-0.6198503375053406,
-0.11978206783533096,
-0.3286910653114319,
0.2894195318222046,
0.9674395322799683,
0.11342944949865341,
-0.06292230635881424,
0.026845421642065048,
-0.35092663764953613,
0.36909136176109314,
-0.4831606149673462,
0.4944862127304077,
-0.3121255040168762,
-0.2257448136806488,
0.03840910643339157,
-0.13924165070056915,
-0.0032168133184313774,
-0.018673645332455635,
-0.22933615744113922,
0.4517771005630493,
-0.16347938776016235,
0.38894784450531006,
-0.024459006264805794,
-0.009696967899799347,
-0.28533416986465454,
-0.13057054579257965,
-0.4826939105987549,
0.1166566014289856,
-0.1490563154220581,
0.02512821927666664,
-0.37174683809280396,
-0.07712072134017944,
0.37540385127067566,
-0.08992744982242584,
0.14251451194286346,
-0.014788685366511345,
-0.15940795838832855,
-0.027591556310653687,
-0.314525842666626,
-0.01611616648733616,
-0.3382999002933502,
-0.12761780619621277,
-0.04902101308107376,
-0.039258260279893875,
-0.003966357093304396,
-0.15204842388629913,
0.07401872426271439,
0.12607425451278687,
-0.1650463193655014,
0.27262642979621887,
0.10100264847278595,
-0.3876912593841553,
-0.34404659271240234,
0.17667600512504578,
0.046041641384363174,
-0.12820684909820557,
-0.23762564361095428,
0.23147781193256378,
-0.043776098638772964,
0.20329144597053528,
0.028286650776863098,
0.18551941215991974,
-0.08026113361120224,
-0.13438890874385834,
0.1497601568698883,
0.037272412329912186,
-0.46648910641670227,
0.11873050779104233,
-0.2049296498298645,
-0.13507243990898132,
-0.1753440648317337,
0.41649433970451355,
0.19193443655967712,
0.3324678838253021,
0.22188806533813477,
0.09316050261259079,
-0.3477329611778259,
-0.1794908344745636,
-0.27588802576065063,
-0.056387268006801605,
-0.3653189241886139,
0.09256439656019211,
0.25184497237205505,
-0.40954363346099854,
0.07990231364965439,
-0.20127619802951813,
-0.2838439643383026,
0.6717515587806702,
-0.27237749099731445,
-0.1348179578781128,
-0.2174033373594284,
-0.07788315415382385,
-0.04557759687304497,
-0.17424610257148743,
0.02747192792594433,
-0.019380327314138412,
0.11593260616064072,
-0.21082010865211487,
-0.3646951913833618,
-0.16417306661605835,
-0.2637232840061188,
0.40430665016174316,
-0.12186732888221741,
-0.31511056423187256,
0.09393678605556488,
-0.054615046828985214,
0.09930679947137833,
0.07789885252714157,
-0.37654730677604675,
-0.33720409870147705,
0.09146255254745483,
0.15496577322483063,
0.06199468672275543,
-0.2908388376235962,
-0.22255785763263702,
-0.08971566706895828,
-0.11228787153959274,
0.16065272688865662,
-0.05289193615317345,
-0.10171771049499512,
-0.07664768397808075,
-0.2082599401473999,
0.6214777827262878,
0.39412984251976013,
-0.0661320760846138,
0.08238688111305237,
0.030705323442816734,
0.17843462526798248,
-0.43521374464035034,
0.07803336530923843,
0.38069358468055725,
-0.15489467978477478,
0.09494463354349136,
-0.11649462580680847,
0.09023591876029968,
0.26690906286239624,
0.3364448845386505,
-0.27960875630378723,
0.04668297991156578,
0.1291176825761795,
0.17161506414413452,
0.19106188416481018,
0.22459378838539124,
-0.25345054268836975,
0.2167695164680481,
0.2359251081943512,
-0.10099922865629196,
-0.002808065852150321,
0.15546894073486328,
0.13671714067459106,
0.10723977535963058,
0.09274044632911682,
-0.04713794216513634,
-0.5510463714599609,
0.04006662592291832,
0.5117153525352478,
-0.2934837341308594,
-0.505844235420227,
-0.08307994902133942,
0.1897728443145752,
-0.263278603553772,
0.10335142910480499,
-0.2551765739917755,
-0.06939440965652466,
-0.038522809743881226,
0.05762273073196411,
0.09971411526203156,
0.10397128015756607,
0.24293211102485657,
-0.17262794077396393,
-0.4368572533130646,
-0.22553539276123047,
-0.5042958855628967,
0.3460195064544678,
-0.2586558759212494,
0.5974482893943787,
0.12381511181592941,
-0.06511326879262924,
0.025702249258756638,
0.23957188427448273,
0.08219936490058899,
0.1808914989233017,
-0.2551768720149994,
0.13447315990924835,
-0.2691360116004944,
0.05510256066918373,
-0.028559330850839615,
0.10306335985660553,
0.3713776469230652,
0.45339691638946533,
-0.08819285035133362,
0.24510133266448975,
-0.18604111671447754,
0.21060635149478912,
-0.054872412234544754,
0.309813916683197,
0.08963856101036072,
-0.2606562077999115,
-0.16396301984786987,
0.4346409738063812,
0.4548361301422119,
0.11628300696611404,
0.09887956827878952,
0.2307019680738449,
0.10886110365390778,
-0.05143240839242935,
0.26841646432876587,
0.4059792160987854,
-0.00962722860276699,
-0.33047041296958923,
0.11027179658412933,
0.3169664442539215,
0.2775517404079437,
0.0863957330584526,
0.12329354882240295,
-0.2620602250099182,
0.12430702149868011,
0.0994565486907959,
-0.15259653329849243,
0.17056645452976227,
0.030469276010990143,
0.1575678586959839,
-0.16078241169452667,
-0.4123295843601227,
-0.14193467795848846,
-0.21662795543670654,
0.13457649946212769,
0.207819402217865,
-0.152742400765419,
0.016615858301520348,
-0.05367644876241684,
0.07955013960599899,
-0.05958212912082672,
0.3953987658023834,
-0.10060340911149979,
-0.12989339232444763,
-0.28609102964401245,
0.02206484228372574,
-0.590746283531189,
0.3060964345932007,
-0.020395120605826378,
0.22845591604709625,
0.06422173976898193,
0.12168289721012115,
-0.06658916920423508,
-0.1822565644979477,
-0.2861884832382202,
0.000013124302313372027,
0.17941884696483612,
0.22793518006801605,
-0.019727986305952072,
0.03380240872502327,
-0.13582462072372437,
-0.020850440487265587,
0.06283796578645706,
-0.1893913298845291,
0.42258086800575256,
-0.2199081927537918,
0.23380319774150848,
0.3229496479034424,
0.14530709385871887,
-0.4673413932323456,
0.2594026029109955,
-0.09305141121149063,
0.06849484145641327,
0.15104736387729645,
-0.14489471912384033,
0.1160377711057663,
0.049603793770074844,
0.042271167039871216,
-0.24041831493377686,
-0.06240124627947807,
0.24593740701675415,
0.1455453336238861,
-0.03703106939792633,
0.14517028629779816,
-0.18243931233882904,
0.6909224390983582,
0.20435896515846252,
0.06448252499103546,
-0.016767067834734917,
-0.06480035185813904,
-0.04102286323904991,
0.28702855110168457,
-0.198805570602417,
-0.1028369665145874,
0.14038780331611633,
-0.17415739595890045,
-0.31023746728897095,
-0.3169337213039398,
0.24101504683494568,
-0.05174718424677849,
-0.33592158555984497,
-0.6760669946670532,
0.46703261137008667,
0.4659062325954437,
0.1505698263645172,
-0.04218902438879013,
0.0432552844285965,
0.16888247430324554,
-0.14411062002182007,
0.04688597470521927,
0.12457012385129929,
-0.007186763919889927,
-0.1058085635304451,
0.0032798894681036472,
-0.48409244418144226,
0.30577540397644043,
0.029266059398651123,
0.3705202341079712,
-0.2528563439846039
] |
https://github.com/huggingface/datasets/issues/3148
|
Streaming with num_workers != 0
|
Hi ! Thanks for the insights :) Note that in streaming mode there're usually no arrow files. The data are streamed from TAR, ZIP, text, etc. files directly from the web. Though for sharded datasets we can definitely adopt a similar strategy !
|
## Describe the bug
When using dataset streaming with pytorch DataLoader, the setting num_workers to anything other than 0 causes the code to freeze forever before yielding the first batch.
The code owner is likely @lhoestq
## Steps to reproduce the bug
For your convenience, we've prepped a colab notebook that reproduces the bug
https://colab.research.google.com/drive/1Mgl0oTZSNIE3UeGl_oX9wPCOIxRg19h1?usp=sharing
```python
!pip install datasets==1.14.0
should_freeze_forever = True
# ^-- set this to True in order to freeze forever, set to False in order to work normally
import torch
from datasets import load_dataset
data = load_dataset("oscar", "unshuffled_deduplicated_bn", split="train", streaming=True)
data = data.map(lambda x: {"text": x["text"], "orig": f"oscar[{x['id']}]"}, batched=True)
data = data.shuffle(100, seed=1337)
data = data.with_format("torch")
loader = torch.utils.data.DataLoader(data, batch_size=2, num_workers=2 if should_freeze_forever else 0)
# v-- the code should freeze forever at this line
for i, row in enumerate(loader):
print(row)
if i > 10: break
print("DONE!")
```
## Expected results
The code should not freeze forever with num_workers=2
## Actual results
The code freezes forever with num_workers=2
## Environment info
- `datasets` version: 1.14.0 (also found in previous versions)
- Platform: google colab (also locally)
- Python version: 3.7, (also 3.8)
- PyArrow version: 3.0.0
| 43 |
Streaming with num_workers != 0
|
[
-0.6882614493370056,
-0.3298450708389282,
-0.15023349225521088,
-0.17138057947158813,
0.03709246218204498,
-0.45807963609695435,
0.4348416328430176,
0.14308662712574005,
-0.06370139867067337,
0.48454001545906067,
0.43556490540504456,
-0.16781923174858093,
-0.5371176600456238,
0.17256572842597961,
0.005074653308838606,
0.42502257227897644,
-0.13684724271297455,
0.40095195174217224,
0.00785854086279869,
-0.09317074716091156,
0.10549292713403702,
0.056332796812057495,
0.07436451315879822,
-0.18959525227546692,
-0.3785557150840759,
0.003889532061293721,
0.39124149084091187,
0.3295925259590149,
0.0995626449584961,
0.18084263801574707,
-0.24525541067123413,
-0.06936870515346527,
0.003303719684481621,
0.33655044436454773,
-0.00011347881081746891,
-0.014451739378273487,
0.30826443433761597,
-0.034875329583883286,
-0.2871726155281067,
-0.007674859371036291,
-0.3357660472393036,
-0.13689644634723663,
-0.17053857445716858,
-0.02434651181101799,
-0.0248242300003767,
0.2685525119304657,
0.2796778976917267,
-0.3423406481742859,
0.3741130828857422,
0.2997220456600189,
0.1419261246919632,
0.36028003692626953,
-0.4039101302623749,
0.30929017066955566,
-0.15862810611724854,
-0.1953752487897873,
0.09205968677997589,
-0.01389481220394373,
0.13892343640327454,
0.026056911796331406,
-0.06561580300331116,
0.39423057436943054,
-0.25772103667259216,
-0.04683958739042282,
0.09050806611776352,
-0.22069840133190155,
0.4853293299674988,
-0.31599652767181396,
-0.011736203916370869,
0.2139713317155838,
-0.29171961545944214,
0.21556971967220306,
-0.05099685862660408,
-0.3061552941799164,
-0.07231326401233673,
-0.5405327081680298,
-0.008256466127932072,
0.3102324604988098,
-0.19109952449798584,
0.030773015692830086,
-0.22079361975193024,
0.07051581889390945,
-0.11147035658359528,
0.06067845597863197,
-0.047410011291503906,
0.36246076226234436,
0.04970812425017357,
0.00829552672803402,
-0.01419923361390829,
0.14140011370182037,
0.4047265350818634,
-0.12855049967765808,
0.05110706388950348,
-0.017967121675610542,
0.010776798240840435,
-0.1246010884642601,
0.2800174355506897,
0.14478866755962372,
-0.019002042710781097,
-0.1947491317987442,
0.15550000965595245,
0.35948723554611206,
0.10210156440734863,
0.20133525133132935,
0.2746586501598358,
-0.3108949661254883,
-0.03381437435746193,
-0.3672849237918854,
0.3725046217441559,
0.20638884603977203,
-0.11256179213523865,
-0.007222259882837534,
0.11819823831319809,
-0.07774586975574493,
0.1473824679851532,
0.057654909789562225,
0.10749373584985733,
0.06030142307281494,
-0.09268424659967422,
-0.019834164530038834,
-0.07118963450193405,
0.15371085703372955,
0.1998279094696045,
0.0761905089020729,
-0.019210971891880035,
0.5974214673042297,
-0.2046455293893814,
0.02727893926203251,
-0.49475228786468506,
-0.4010336399078369,
-0.3267124593257904,
-0.2199661135673523,
-0.028427373617887497,
-0.20001071691513062,
0.1847309023141861,
-0.5263158082962036,
0.33841532468795776,
-0.054760631173849106,
0.4133523106575012,
-0.11710339784622192,
0.2967454195022583,
-0.10858668386936188,
-0.028265632688999176,
0.22605474293231964,
0.19537976384162903,
0.09019594639539719,
0.1648201048374176,
-0.08243682235479355,
0.13025696575641632,
0.287386029958725,
0.08281736075878143,
-0.48461177945137024,
0.21602505445480347,
0.23838672041893005,
-0.17616242170333862,
0.25197821855545044,
0.152410626411438,
0.2736842632293701,
0.056663576513528824,
-0.055708207190036774,
-0.14278584718704224,
-0.18178732693195343,
-0.12682391703128815,
0.16102589666843414,
-0.1863907426595688,
0.4990946650505066,
0.06859920173883438,
-0.2224578708410263,
-0.04368683695793152,
0.10935091227293015,
0.5191242694854736,
0.07889392971992493,
-0.013518735766410828,
-0.4974595010280609,
0.10171057283878326,
0.11744098365306854,
0.29177892208099365,
0.0800359919667244,
0.06923242658376694,
0.3632781207561493,
-0.33496713638305664,
-0.12890662252902985,
0.4574817717075348,
0.3260129988193512,
0.2823580205440521,
-0.1046687662601471,
0.3336621820926666,
0.07213436812162399,
-0.07734076678752899,
0.1719921976327896,
-0.4032836854457855,
0.10087967664003372,
-0.200309157371521,
0.059856824576854706,
0.2846561074256897,
0.16559673845767975,
0.10800649970769882,
-0.07786550372838974,
-0.03769494220614433,
-0.027327684685587883,
0.08620350062847137,
0.03884682059288025,
0.06388112157583237,
-0.005318193230777979,
-0.18075944483280182,
0.1063876524567604,
0.04825099930167198,
-0.09450657665729523,
0.16792309284210205,
0.08173029124736786,
0.3046230673789978,
0.11745108664035797,
0.1503511667251587,
-0.061027221381664276,
0.14836348593235016,
0.12300225347280502,
0.1734527051448822,
0.04718834534287453,
-0.2737107276916504,
-0.07334830611944199,
-0.3549950420856476,
0.37258657813072205,
-0.34827449917793274,
-0.2626989781856537,
-0.11754916608333588,
0.1999933123588562,
0.01595984771847725,
-0.45256927609443665,
0.033305779099464417,
0.030781175941228867,
0.2223028987646103,
0.2921057939529419,
0.1184675320982933,
0.0256369449198246,
-0.22298860549926758,
0.16946078836917877,
-0.15911152958869934,
0.33893075585365295,
0.28457561135292053,
-0.14656022191047668,
0.17091433703899384,
0.4429682791233063,
0.07692012190818787,
0.12286259979009628,
-0.013676567934453487,
0.09933704882860184,
-0.2422071397304535,
0.026644445955753326,
0.09144940972328186,
-0.101702019572258,
0.23188209533691406,
-0.06969169527292252,
-0.03632638230919838,
0.026855260133743286,
0.4094840884208679,
-0.002251865342259407,
-0.3399418592453003,
-0.1292864978313446,
-0.5383991003036499,
0.2656490206718445,
-0.013923794031143188,
0.08403542637825012,
0.16438966989517212,
-0.1134810745716095,
-0.10799510031938553,
-0.06969951838254929,
0.4265660047531128,
-0.06214838847517967,
0.20335225760936737,
0.3277728855609894,
0.20090600848197937,
-0.0202406644821167,
-0.05456223711371422,
-0.38358527421951294,
0.39393332600593567,
-0.022481312975287437,
-0.15955796837806702,
0.37512755393981934,
-0.09816943854093552,
-0.3396885395050049,
-0.5506377220153809,
-0.19692490994930267,
0.009868530556559563,
0.26878753304481506,
-0.44492992758750916,
0.03331915661692619,
-0.05899115279316902,
-0.0922597348690033,
-0.15946881473064423,
0.009448016062378883,
-0.1816159188747406,
-0.22717086970806122,
0.18950392305850983,
0.6984214186668396,
-0.30411800742149353,
-0.066046804189682,
-0.4102746844291687,
-0.07186692208051682,
-0.03282221034169197,
0.5181176662445068,
-0.11788071691989899,
-0.20449498295783997,
0.0525151751935482,
0.06837563216686249,
0.07000219076871872,
-0.01569356583058834,
-0.0015165578806772828,
0.15606625378131866,
-0.3505447804927826,
0.008860515430569649,
0.041095878928899765,
-0.15096700191497803,
0.21918323636054993,
0.06408335268497467,
-0.0067186797969043255,
0.37935832142829895,
-0.11130312830209732,
-0.20848223567008972,
-0.18075282871723175,
-0.3011433482170105,
0.07544926553964615,
0.058066852390766144,
0.03640185669064522,
0.28840455412864685,
-0.44598278403282166,
0.02144107036292553,
0.019216587767004967,
-0.19922444224357605,
-0.09884068369865417,
0.07229157537221909,
0.4120548665523529,
0.07647508382797241,
0.28874024748802185,
-0.21759381890296936,
0.4516836404800415,
-0.3822515606880188,
-0.243402361869812,
-0.40276992321014404,
0.23716047406196594,
0.1037660613656044,
-0.1098174974322319,
0.316971093416214,
0.1187233030796051,
-0.22472020983695984,
0.10848329961299896,
-0.17076946794986725,
0.03949061781167984,
0.39551693201065063,
-0.24852043390274048,
-0.1910942792892456,
-0.07555370032787323,
0.2919985055923462,
0.21175530552864075,
-0.2630937993526459,
-0.1773589849472046,
0.14162428677082062,
-0.08486554026603699,
0.10991852730512619,
-0.009140853770077229,
-0.010744607076048851,
0.5573241114616394,
-0.10455921292304993,
0.3450942933559418,
-0.16757036745548248,
0.07348275184631348,
0.29119423031806946,
0.18471404910087585,
0.09632929414510727,
0.3886258006095886,
-0.06377889961004257,
0.34850019216537476,
0.330049067735672,
-0.089152030646801,
0.2116083949804306,
0.002107543870806694,
-0.2715660333633423,
-0.24589411914348602,
0.148395836353302,
-0.27844658493995667,
0.01807374507188797,
0.18489181995391846,
0.009193635545670986,
0.014830763451755047,
0.15682795643806458,
0.0783284604549408,
-0.02791127748787403,
-0.29347267746925354,
-0.46560487151145935,
0.07012621313333511,
0.27960628271102905,
-0.0592389814555645,
0.00961921364068985,
0.15355637669563293,
-0.4791906476020813,
0.13117733597755432,
-0.03865710645914078,
0.31957870721817017,
-0.05426764860749245,
-0.10050137341022491,
0.0980023443698883,
-0.007385994307696819,
0.5126441717147827,
-0.32842302322387695,
0.3369954526424408,
-0.08239439129829407,
0.13601136207580566,
-0.08207260072231293,
0.04824038967490196,
-0.004612512420862913,
-0.03586496040225029,
0.0539681501686573,
0.1994713693857193,
-0.08102281391620636,
0.19396357238292694,
-0.09610462933778763,
-0.5587490200996399,
-0.07683990895748138,
-0.2337060123682022,
-0.5752785801887512,
-0.1714470386505127,
-0.042205337435007095,
0.318815678358078,
0.07638734579086304,
0.18378838896751404,
-0.31707626581192017,
-0.26479262113571167,
0.11422592401504517,
0.06617819517850876,
0.18754568696022034,
-0.19305211305618286,
0.02177123725414276,
0.06528125703334808,
-0.28160059452056885,
0.11020781099796295,
0.0966658741235733,
-0.29858464002609253,
-0.22764082252979279,
0.24673733115196228,
-0.03233044967055321,
0.22994068264961243,
0.1556791514158249,
0.294778048992157,
0.38284844160079956,
0.17958292365074158,
0.17730015516281128,
0.7372989058494568,
0.21336303651332855,
0.2148028016090393,
0.07297512888908386,
-0.205597922205925,
0.09663213044404984,
0.052691008895635605,
-0.21946890652179718,
-0.07945115119218826,
-0.11265598237514496,
0.40509146451950073,
0.07265439629554749,
-0.6198503375053406,
-0.11978206783533096,
-0.3286910653114319,
0.2894195318222046,
0.9674395322799683,
0.11342944949865341,
-0.06292230635881424,
0.026845421642065048,
-0.35092663764953613,
0.36909136176109314,
-0.4831606149673462,
0.4944862127304077,
-0.3121255040168762,
-0.2257448136806488,
0.03840910643339157,
-0.13924165070056915,
-0.0032168133184313774,
-0.018673645332455635,
-0.22933615744113922,
0.4517771005630493,
-0.16347938776016235,
0.38894784450531006,
-0.024459006264805794,
-0.009696967899799347,
-0.28533416986465454,
-0.13057054579257965,
-0.4826939105987549,
0.1166566014289856,
-0.1490563154220581,
0.02512821927666664,
-0.37174683809280396,
-0.07712072134017944,
0.37540385127067566,
-0.08992744982242584,
0.14251451194286346,
-0.014788685366511345,
-0.15940795838832855,
-0.027591556310653687,
-0.314525842666626,
-0.01611616648733616,
-0.3382999002933502,
-0.12761780619621277,
-0.04902101308107376,
-0.039258260279893875,
-0.003966357093304396,
-0.15204842388629913,
0.07401872426271439,
0.12607425451278687,
-0.1650463193655014,
0.27262642979621887,
0.10100264847278595,
-0.3876912593841553,
-0.34404659271240234,
0.17667600512504578,
0.046041641384363174,
-0.12820684909820557,
-0.23762564361095428,
0.23147781193256378,
-0.043776098638772964,
0.20329144597053528,
0.028286650776863098,
0.18551941215991974,
-0.08026113361120224,
-0.13438890874385834,
0.1497601568698883,
0.037272412329912186,
-0.46648910641670227,
0.11873050779104233,
-0.2049296498298645,
-0.13507243990898132,
-0.1753440648317337,
0.41649433970451355,
0.19193443655967712,
0.3324678838253021,
0.22188806533813477,
0.09316050261259079,
-0.3477329611778259,
-0.1794908344745636,
-0.27588802576065063,
-0.056387268006801605,
-0.3653189241886139,
0.09256439656019211,
0.25184497237205505,
-0.40954363346099854,
0.07990231364965439,
-0.20127619802951813,
-0.2838439643383026,
0.6717515587806702,
-0.27237749099731445,
-0.1348179578781128,
-0.2174033373594284,
-0.07788315415382385,
-0.04557759687304497,
-0.17424610257148743,
0.02747192792594433,
-0.019380327314138412,
0.11593260616064072,
-0.21082010865211487,
-0.3646951913833618,
-0.16417306661605835,
-0.2637232840061188,
0.40430665016174316,
-0.12186732888221741,
-0.31511056423187256,
0.09393678605556488,
-0.054615046828985214,
0.09930679947137833,
0.07789885252714157,
-0.37654730677604675,
-0.33720409870147705,
0.09146255254745483,
0.15496577322483063,
0.06199468672275543,
-0.2908388376235962,
-0.22255785763263702,
-0.08971566706895828,
-0.11228787153959274,
0.16065272688865662,
-0.05289193615317345,
-0.10171771049499512,
-0.07664768397808075,
-0.2082599401473999,
0.6214777827262878,
0.39412984251976013,
-0.0661320760846138,
0.08238688111305237,
0.030705323442816734,
0.17843462526798248,
-0.43521374464035034,
0.07803336530923843,
0.38069358468055725,
-0.15489467978477478,
0.09494463354349136,
-0.11649462580680847,
0.09023591876029968,
0.26690906286239624,
0.3364448845386505,
-0.27960875630378723,
0.04668297991156578,
0.1291176825761795,
0.17161506414413452,
0.19106188416481018,
0.22459378838539124,
-0.25345054268836975,
0.2167695164680481,
0.2359251081943512,
-0.10099922865629196,
-0.002808065852150321,
0.15546894073486328,
0.13671714067459106,
0.10723977535963058,
0.09274044632911682,
-0.04713794216513634,
-0.5510463714599609,
0.04006662592291832,
0.5117153525352478,
-0.2934837341308594,
-0.505844235420227,
-0.08307994902133942,
0.1897728443145752,
-0.263278603553772,
0.10335142910480499,
-0.2551765739917755,
-0.06939440965652466,
-0.038522809743881226,
0.05762273073196411,
0.09971411526203156,
0.10397128015756607,
0.24293211102485657,
-0.17262794077396393,
-0.4368572533130646,
-0.22553539276123047,
-0.5042958855628967,
0.3460195064544678,
-0.2586558759212494,
0.5974482893943787,
0.12381511181592941,
-0.06511326879262924,
0.025702249258756638,
0.23957188427448273,
0.08219936490058899,
0.1808914989233017,
-0.2551768720149994,
0.13447315990924835,
-0.2691360116004944,
0.05510256066918373,
-0.028559330850839615,
0.10306335985660553,
0.3713776469230652,
0.45339691638946533,
-0.08819285035133362,
0.24510133266448975,
-0.18604111671447754,
0.21060635149478912,
-0.054872412234544754,
0.309813916683197,
0.08963856101036072,
-0.2606562077999115,
-0.16396301984786987,
0.4346409738063812,
0.4548361301422119,
0.11628300696611404,
0.09887956827878952,
0.2307019680738449,
0.10886110365390778,
-0.05143240839242935,
0.26841646432876587,
0.4059792160987854,
-0.00962722860276699,
-0.33047041296958923,
0.11027179658412933,
0.3169664442539215,
0.2775517404079437,
0.0863957330584526,
0.12329354882240295,
-0.2620602250099182,
0.12430702149868011,
0.0994565486907959,
-0.15259653329849243,
0.17056645452976227,
0.030469276010990143,
0.1575678586959839,
-0.16078241169452667,
-0.4123295843601227,
-0.14193467795848846,
-0.21662795543670654,
0.13457649946212769,
0.207819402217865,
-0.152742400765419,
0.016615858301520348,
-0.05367644876241684,
0.07955013960599899,
-0.05958212912082672,
0.3953987658023834,
-0.10060340911149979,
-0.12989339232444763,
-0.28609102964401245,
0.02206484228372574,
-0.590746283531189,
0.3060964345932007,
-0.020395120605826378,
0.22845591604709625,
0.06422173976898193,
0.12168289721012115,
-0.06658916920423508,
-0.1822565644979477,
-0.2861884832382202,
0.000013124302313372027,
0.17941884696483612,
0.22793518006801605,
-0.019727986305952072,
0.03380240872502327,
-0.13582462072372437,
-0.020850440487265587,
0.06283796578645706,
-0.1893913298845291,
0.42258086800575256,
-0.2199081927537918,
0.23380319774150848,
0.3229496479034424,
0.14530709385871887,
-0.4673413932323456,
0.2594026029109955,
-0.09305141121149063,
0.06849484145641327,
0.15104736387729645,
-0.14489471912384033,
0.1160377711057663,
0.049603793770074844,
0.042271167039871216,
-0.24041831493377686,
-0.06240124627947807,
0.24593740701675415,
0.1455453336238861,
-0.03703106939792633,
0.14517028629779816,
-0.18243931233882904,
0.6909224390983582,
0.20435896515846252,
0.06448252499103546,
-0.016767067834734917,
-0.06480035185813904,
-0.04102286323904991,
0.28702855110168457,
-0.198805570602417,
-0.1028369665145874,
0.14038780331611633,
-0.17415739595890045,
-0.31023746728897095,
-0.3169337213039398,
0.24101504683494568,
-0.05174718424677849,
-0.33592158555984497,
-0.6760669946670532,
0.46703261137008667,
0.4659062325954437,
0.1505698263645172,
-0.04218902438879013,
0.0432552844285965,
0.16888247430324554,
-0.14411062002182007,
0.04688597470521927,
0.12457012385129929,
-0.007186763919889927,
-0.1058085635304451,
0.0032798894681036472,
-0.48409244418144226,
0.30577540397644043,
0.029266059398651123,
0.3705202341079712,
-0.2528563439846039
] |
https://github.com/huggingface/datasets/issues/3145
|
[when Image type will exist] provide a way to get the data as binary + filename
|
@severo I'll keep that in mind.
You can track progress on the Image feature in #3163 (still in the early stage).
|
**Is your feature request related to a problem? Please describe.**
When a dataset cell contains a value of type Image (be it from a remote URL, an Array2D/3D, or any other way to represent images), I want to be able to write the image to the disk, with the correct filename, and optionally to know its mimetype, in order to serve it on the web.
Note: this issue would apply exactly the same for the `Audio` type.
**Describe the solution you'd like**
If a "cell" has the type `Image`, provide a way to get the binary content of the file, and the filename, eg as:
```python
filename: str
data: bytes
```
**Describe alternatives you've considered**
A way to write the cell to the disk (passing a local directory), and then return the pathname, filename, and mimetype.
| 21 |
[when Image type will exist] provide a way to get the data as binary + filename
|
[
-0.2321125566959381,
-0.07917569577693939,
-0.20139363408088684,
0.2667718529701233,
0.18414540588855743,
-0.14572854340076447,
0.041686754673719406,
0.570847749710083,
-0.044182486832141876,
0.33055028319358826,
0.19781188666820526,
-0.02530483901500702,
-0.41814467310905457,
0.26601651310920715,
-0.1427733451128006,
-0.11271177977323532,
0.06725675612688065,
0.42617496848106384,
-0.20237208902835846,
-0.06575780361890793,
-0.3211309015750885,
0.14461259543895721,
0.07321801036596298,
-0.128805473446846,
-0.3384322226047516,
-0.14894737303256989,
-0.2807433009147644,
0.3283618688583374,
-0.5668162107467651,
-0.13653290271759033,
-0.31873348355293274,
-0.09395156055688858,
0.19952449202537537,
0.13469526171684265,
-0.0001038094560499303,
-0.10455377399921417,
0.05377590283751488,
-0.1696537584066391,
-0.3823367655277252,
-0.11311226338148117,
-0.37073802947998047,
-0.05606553703546524,
-0.16248293220996857,
-0.4812004864215851,
-0.08396176993846893,
-0.13150091469287872,
0.6196925044059753,
-0.12429407238960266,
0.09097772091627121,
-0.017413388937711716,
0.23303045332431793,
-0.1635333001613617,
0.20368488132953644,
-0.06574083864688873,
0.04214911535382271,
0.5205366015434265,
-0.011148017831146717,
-0.15512871742248535,
0.25030237436294556,
0.22707206010818481,
0.19362325966358185,
0.4561183750629425,
0.18363843858242035,
-0.06370994448661804,
-0.09569951891899109,
0.21439389884471893,
0.19553393125534058,
0.07622849196195602,
-0.061369091272354126,
0.13606572151184082,
0.2134791761636734,
-0.07997477799654007,
-0.10591600835323334,
-0.03808612376451492,
-0.14509998261928558,
-0.30367106199264526,
0.1463421881198883,
0.041628580540418625,
-0.32120463252067566,
0.12797698378562927,
-0.0428859107196331,
-0.01298324204981327,
-0.19205518066883087,
0.10460032522678375,
-0.15391530096530914,
0.042576469480991364,
-0.18056795001029968,
0.05747601017355919,
-0.016656674444675446,
-0.06821440905332565,
-0.10358747094869614,
-0.23425371944904327,
0.06044486537575722,
0.1291651725769043,
0.13913507759571075,
-0.21363528072834015,
0.03288785740733147,
0.2396116554737091,
0.142799511551857,
-0.0710187703371048,
0.04911988973617554,
-0.2254776954650879,
-0.20107614994049072,
0.21117739379405975,
0.08521048724651337,
-0.34433722496032715,
-0.03124764934182167,
-0.1308562010526657,
0.13514283299446106,
0.14236243069171906,
-0.11780264973640442,
-0.1452091932296753,
-0.5272660255432129,
0.14644324779510498,
0.02956857904791832,
0.1536746621131897,
0.186520516872406,
0.028768926858901978,
-0.22911974787712097,
-0.17486967146396637,
0.2094295173883438,
0.25737911462783813,
0.026070114225149155,
0.19533102214336395,
-0.07953169196844101,
-0.015659695491194725,
0.45789745450019836,
-0.1337021291255951,
0.22803476452827454,
-0.1318873167037964,
-0.0477352999150753,
-0.004128508269786835,
-0.20646710693836212,
-0.3135565519332886,
0.1045844703912735,
0.3235209882259369,
0.19802477955818176,
-0.1172303706407547,
-0.16816997528076172,
0.006592638324946165,
0.04369013383984566,
-0.31532856822013855,
0.35615795850753784,
0.09368275105953217,
-0.09911543130874634,
-0.2600512206554413,
-0.06451044231653214,
-0.007062914781272411,
-0.28316789865493774,
-0.001799871795810759,
-0.13522294163703918,
0.28681907057762146,
-0.3273298740386963,
0.3019578158855438,
0.030693311244249344,
0.12975077331066132,
0.004419815260916948,
0.13248884677886963,
-0.24863258004188538,
-0.13650305569171906,
0.1696443259716034,
0.2211446464061737,
0.047748930752277374,
-0.06275194883346558,
-0.17907489836215973,
0.21845710277557373,
-0.14081008732318878,
0.053627774119377136,
0.02047330141067505,
-0.2953685224056244,
0.25759807229042053,
-0.12275303155183792,
0.1461394727230072,
0.0050156377255916595,
-0.40554967522621155,
-0.01564844883978367,
0.29987379908561707,
-0.026219816878437996,
0.20896762609481812,
0.1442452371120453,
-0.1014925017952919,
-0.11472576856613159,
0.4631388783454895,
0.3853413760662079,
-0.022661546245217323,
-0.28326547145843506,
-0.046313680708408356,
0.35126587748527527,
-0.274142324924469,
-0.12728580832481384,
0.22183488309383392,
-0.38991525769233704,
-0.34840425848960876,
-0.06454555690288544,
-0.05872207134962082,
0.1162654384970665,
0.23773561418056488,
0.23462505638599396,
0.010871589183807373,
-0.14151781797409058,
0.08668835461139679,
-0.17252111434936523,
0.2036033272743225,
-0.23605041205883026,
-0.007241896353662014,
-0.17754307389259338,
0.005449081305414438,
0.020410701632499695,
-0.2502910792827606,
-0.21705439686775208,
-0.34004074335098267,
-0.24637357890605927,
0.17100971937179565,
-0.068753682076931,
0.03964141383767128,
0.258907675743103,
0.32270097732543945,
0.20553189516067505,
-0.09223136305809021,
-0.03261875733733177,
-0.13785162568092346,
0.2173469364643097,
-0.32082676887512207,
-0.057909172028303146,
0.23005475103855133,
-0.20787636935710907,
0.06349485367536545,
0.022165967151522636,
0.09056922048330307,
-0.1878935694694519,
-0.16469523310661316,
0.05446138605475426,
0.1960412710905075,
0.26805490255355835,
0.1801689714193344,
0.2611382305622101,
0.26351240277290344,
0.07037097215652466,
0.04104279726743698,
0.059099793434143066,
-0.11647339910268784,
-0.07844892889261246,
0.2705114185810089,
0.06587377190589905,
-0.15317775309085846,
-0.020103149116039276,
-0.013705669902265072,
-0.14626269042491913,
0.06464048475027084,
-0.22646072506904602,
0.15880368649959564,
-0.18408282101154327,
-0.0405627004802227,
-0.3135637938976288,
-0.11961183696985245,
0.24274083971977234,
-0.15602760016918182,
0.02920357696712017,
-0.3128659427165985,
-0.3260370194911957,
0.7602543830871582,
0.15358750522136688,
0.43197140097618103,
0.10660794377326965,
-0.010964627377688885,
0.12502031028270721,
0.038353897631168365,
-0.15136973559856415,
0.29033362865448,
0.3916301429271698,
-0.10903023183345795,
-0.2250545769929886,
0.14760857820510864,
-0.05057492479681969,
0.2619783878326416,
-0.1606137901544571,
0.398103803396225,
-0.010438427329063416,
0.0029800357297062874,
-0.03200586140155792,
-0.15295760333538055,
-0.3017505407333374,
0.014016753062605858,
-0.2837052643299103,
0.10422003269195557,
-0.12004908174276352,
-0.07990722358226776,
-0.3306264579296112,
0.14181672036647797,
0.5899984240531921,
0.20914849638938904,
0.2197721004486084,
0.19010435044765472,
0.11475714296102524,
-0.0804118812084198,
0.08200740814208984,
-0.1450122892856598,
0.395329087972641,
0.28930550813674927,
-0.15981487929821014,
-0.12388014793395996,
0.11326524615287781,
-0.02240033447742462,
0.2688375413417816,
0.11646997183561325,
-0.3119107186794281,
0.6341094374656677,
-0.4770483374595642,
0.37946242094039917,
-0.26093295216560364,
-0.3362380862236023,
0.21961554884910583,
0.044499486684799194,
-0.12943243980407715,
0.4246118366718292,
0.2849680185317993,
-0.05151383578777313,
-0.19510139524936676,
0.09995023161172867,
-0.05691687390208244,
-0.458042174577713,
-0.10528990626335144,
0.02538275718688965,
-0.07309931516647339,
-0.23616081476211548,
0.15921452641487122,
-0.21791031956672668,
-0.2159985899925232,
0.10479158908128738,
0.29198750853538513,
0.34882062673568726,
0.34369367361068726,
0.33582064509391785,
-0.09152357280254364,
-0.13245302438735962,
0.18181562423706055,
-0.17358000576496124,
-0.2619442045688629,
0.03283025324344635,
0.05399226024746895,
-0.100011445581913,
-0.11785157024860382,
-0.1965000480413437,
-0.12881724536418915,
0.337820827960968,
-0.08698926866054535,
-0.5810530185699463,
0.20537954568862915,
0.24294789135456085,
0.0959325060248375,
-0.025127261877059937,
0.18380121886730194,
0.09017214179039001,
-0.43459758162498474,
-0.5592062473297119,
0.3038545548915863,
0.15902525186538696,
-0.16233840584754944,
0.43035799264907837,
0.4907367527484894,
-0.03292590379714966,
0.28597795963287354,
-0.0833841860294342,
0.029180241748690605,
-0.469974160194397,
0.25077036023139954,
0.03179706260561943,
0.43191930651664734,
-0.08660762012004852,
0.0771193578839302,
0.14678260684013367,
0.2761633098125458,
-0.04001259058713913,
0.0024397310335189104,
-0.10005494207143784,
-0.17862166464328766,
-0.22276456654071808,
0.4229463040828705,
-0.5896047353744507,
0.1537718027830124,
0.13408109545707703,
0.22237341105937958,
0.21906647086143494,
-0.14313775300979614,
-0.019012534990906715,
0.03999308496713638,
0.12515422701835632,
-0.04273843392729759,
0.3183138370513916,
0.1610064059495926,
-0.0690292939543724,
0.2553659975528717,
-0.16438375413417816,
0.13236312568187714,
0.17133456468582153,
0.29408740997314453,
-0.09163594990968704,
-0.20506666600704193,
0.06407185643911362,
0.027838414534926414,
0.07310035079717636,
0.6269778609275818,
0.07654241472482681,
-0.034691959619522095,
-0.16382156312465668,
-0.04597179591655731,
0.3125388026237488,
0.4257168471813202,
-0.2780832052230835,
0.05892731249332428,
-0.2537436783313751,
0.4457297623157501,
-0.4251580238342285,
-0.03842230141162872,
0.18231117725372314,
0.1091594472527504,
-0.03149845078587532,
-0.06110720708966255,
-0.09977442771196365,
0.08766459673643112,
-0.2609660029411316,
0.040463145822286606,
0.16110533475875854,
-0.05969531461596489,
0.08773092180490494,
-0.5217260122299194,
-0.3132935166358948,
0.061243604868650436,
-0.03280779719352722,
-0.10787343233823776,
0.11509399116039276,
-0.04581966996192932,
0.03992687165737152,
0.018808556720614433,
0.18618427217006683,
0.34212759137153625,
0.20039469003677368,
-0.14572103321552277,
0.16865567862987518,
0.32263943552970886,
0.13402529060840607,
-0.05777225270867348,
0.464550644159317,
-0.15017755329608917,
-0.11380136758089066,
0.12830312550067902,
0.10836336016654968,
-0.48123881220817566,
0.2739775776863098,
0.5555264949798584,
-0.1457410752773285,
-0.2877621054649353,
-0.01313669141381979,
0.3394622504711151,
0.09236028045415878,
0.05776422470808029,
0.24806001782417297,
-0.08982597291469574,
-0.441503643989563,
-0.09358199685811996,
0.08137127757072449,
0.7289267182350159,
-0.08584102988243103,
0.2995275855064392,
-0.1665041744709015,
-0.21542644500732422,
0.151029571890831,
0.17561154067516327,
-0.008725210092961788,
-0.07075031101703644,
0.03245161101222038,
-0.3123506009578705,
-0.10965998470783234,
0.22575491666793823,
0.17943036556243896,
-0.3137708008289337,
-0.05044117942452431,
0.03543730825185776,
0.35491886734962463,
0.0322793610394001,
0.16242438554763794,
-0.7293540835380554,
-0.13885675370693207,
-0.21826669573783875,
0.2362365424633026,
-0.17804701626300812,
0.04419971629977226,
-0.06704806536436081,
-0.3221186101436615,
0.048444654792547226,
-0.13706350326538086,
0.0962357148528099,
-0.06760944426059723,
-0.4275617301464081,
0.13066823780536652,
-0.48350614309310913,
-0.15573513507843018,
-0.6559828519821167,
-0.17431960999965668,
-0.08603444695472717,
0.29009780287742615,
0.047367215156555176,
0.3378514349460602,
0.07138283550739288,
0.050763923674821854,
-0.18641851842403412,
-0.06803230941295624,
0.2677229344844818,
0.045137204229831696,
0.308450311422348,
-0.07852539420127869,
-0.058146413415670395,
-0.13024720549583435,
0.04738251492381096,
-0.05919811129570007,
0.1277005821466446,
-0.024201834574341774,
-0.24709175527095795,
-0.21688735485076904,
-0.21063931286334991,
-0.015058247372508049,
0.23373131453990936,
0.1582145243883133,
0.10214992612600327,
0.010936575010418892,
0.3703053295612335,
-0.12154882401227951,
-0.13817279040813446,
0.07273536920547485,
0.011457080021500587,
0.07581206411123276,
0.12094950675964355,
-0.31624478101730347,
-0.04395715892314911,
-0.2834053933620453,
0.37623488903045654,
0.0220964215695858,
-0.4348670542240143,
0.296141654253006,
0.20622827112674713,
-0.1251506358385086,
-0.06373102962970734,
0.16852933168411255,
0.12479225546121597,
-0.08741435408592224,
-0.07258922606706619,
-0.25238460302352905,
-0.17489011585712433,
0.5399541854858398,
-0.26891711354255676,
0.49527284502983093,
0.29246363043785095,
0.20538078248500824,
-0.2299005091190338,
-0.32972535490989685,
-0.4524572789669037,
0.1147909164428711,
-0.23672056198120117,
0.1562757045030594,
-0.1505410522222519,
0.30935147404670715,
0.17669560015201569,
0.06615886837244034,
0.34072163701057434,
0.20888884365558624,
-0.23672927916049957,
-0.27183517813682556,
-0.18288204073905945,
0.0626666471362114,
-0.04804961010813713,
0.18789367377758026,
0.08320902287960052,
-0.3715406656265259,
-0.2384619116783142,
0.055673904716968536,
-0.13821934163570404,
-0.047921787947416306,
-0.12758687138557434,
-0.13497178256511688,
0.2531262934207916,
0.12201684713363647,
0.40151140093803406,
-0.007574596907943487,
-0.1717769056558609,
0.48827245831489563,
-0.0678596943616867,
0.08912302553653717,
-0.30881187319755554,
-0.10099808871746063,
0.36397215723991394,
0.12344618141651154,
0.09271858632564545,
-0.08399923145771027,
0.3515343964099884,
0.2319147139787674,
-0.1489025056362152,
0.050746746361255646,
0.2946019470691681,
-0.02036726474761963,
-0.24727365374565125,
-0.09665543586015701,
0.12857969105243683,
0.2910277843475342,
-0.15788376331329346,
0.2311161458492279,
-0.44154033064842224,
-0.11039144545793533,
0.10729324817657471,
0.146330326795578,
0.04811273515224457,
0.11475871503353119,
0.2723616659641266,
-0.03795328363776207,
0.1973733901977539,
-0.11249417811632156,
-0.11863400787115097,
0.515893280506134,
0.12556201219558716,
0.2616870403289795,
-0.0319254994392395,
0.43896007537841797,
0.22081387042999268,
0.22796876728534698,
-0.3635620176792145,
0.029488757252693176,
0.02600785531103611,
0.15765048563480377,
0.3196835517883301,
-0.06804849952459335,
0.09588156640529633,
0.21810387074947357,
-0.21059133112430573,
0.5468741655349731,
0.03473782166838646,
0.05896270275115967,
-0.26287245750427246,
0.17262408137321472,
-0.11052217334508896,
0.10809600353240967,
-0.073995441198349,
0.13360871374607086,
-0.38535791635513306,
-0.09002203494310379,
-0.3798776865005493,
-0.15465933084487915,
0.09295497834682465,
-0.025074589997529984,
-0.024998998269438744,
0.18932893872261047,
0.2407926470041275,
-0.15475471317768097,
-0.07131393253803253,
0.12698186933994293,
0.26960253715515137,
-0.39822226762771606,
0.19473996758460999,
0.35749274492263794,
0.26126936078071594,
0.5498310923576355,
0.23672325909137726,
0.2249801903963089,
0.06333703547716141,
0.11087758839130402,
-0.09054464846849442,
-0.056522466242313385,
-0.321689635515213,
-0.40887412428855896,
-0.10215587168931961,
0.22473645210266113,
0.12130609154701233,
0.11130402982234955,
0.28095415234565735,
-0.2639542520046234,
-0.2700651288032532,
0.06970389932394028,
-0.34599849581718445,
-0.036223817616701126,
0.09533457458019257,
0.03555579110980034,
0.134656623005867,
-0.08352287113666534,
-0.09340532124042511,
-0.49193742871284485,
-0.2673684358596802,
-0.07822290807962418,
-0.1419687271118164,
0.020913466811180115,
0.4104556739330292,
0.1328841894865036,
-0.00822941493242979,
-0.16256694495677948,
0.03049236722290516,
0.07380913197994232,
-0.19352832436561584,
-0.2172350138425827,
-0.10112228244543076,
-0.08061055839061737,
0.10033277422189713,
-0.38188642263412476,
-0.23998203873634338,
0.06037718057632446,
0.11273285746574402,
-0.025307590141892433,
0.24603039026260376,
-0.23680518567562103,
0.48392173647880554,
0.15630093216896057,
-0.1377766877412796,
-0.339098185300827,
0.24611952900886536,
0.024922240525484085,
-0.09353406727313995,
-0.40282219648361206,
0.174028679728508,
-0.15380032360553741,
0.2803991734981537,
-0.23403814435005188,
-0.18683503568172455,
-0.06811216473579407,
-0.1497890204191208,
0.33105283975601196,
0.11576757580041885,
0.10584080219268799,
-0.33705565333366394,
0.016154110431671143,
0.2129245400428772,
0.03233221918344498,
-0.0303572416305542,
-0.11491572856903076,
0.21463537216186523,
0.35604920983314514,
-0.11066743731498718,
-0.08420724421739578,
0.09592293202877045,
0.2948302626609802,
-0.1660970151424408,
-0.14690810441970825,
-0.12998826801776886,
0.11982613056898117,
-0.3590985834598541,
-0.08378450572490692,
0.01905861869454384,
0.2826937735080719,
-0.06993547081947327,
-0.2849275767803192,
-0.2076977640390396,
-0.4573022723197937,
0.2925269603729248,
0.10516808927059174,
-0.11960619688034058,
0.10023914277553558,
-0.0006135379080660641,
-0.07262703776359558,
0.5208814740180969,
-0.07958614826202393,
0.18237701058387756,
0.32422131299972534,
-0.014549256302416325,
0.0642666146159172,
0.14212940633296967,
0.2531130611896515,
0.07275938987731934,
-0.05728476122021675,
-0.05757516250014305,
0.10895249992609024,
-0.2099369764328003,
-0.13528971374034882,
-0.18661059439182281
] |
https://github.com/huggingface/datasets/issues/3145
|
[when Image type will exist] provide a way to get the data as binary + filename
|
Hi ! As discussed with @severo offline it looks like the dataset viewer already supports reading PIL images, so maybe the dataset viewer doesn't need to disable decoding after all
|
**Is your feature request related to a problem? Please describe.**
When a dataset cell contains a value of type Image (be it from a remote URL, an Array2D/3D, or any other way to represent images), I want to be able to write the image to the disk, with the correct filename, and optionally to know its mimetype, in order to serve it on the web.
Note: this issue would apply exactly the same for the `Audio` type.
**Describe the solution you'd like**
If a "cell" has the type `Image`, provide a way to get the binary content of the file, and the filename, eg as:
```python
filename: str
data: bytes
```
**Describe alternatives you've considered**
A way to write the cell to the disk (passing a local directory), and then return the pathname, filename, and mimetype.
| 30 |
[when Image type will exist] provide a way to get the data as binary + filename
|
[
-0.2321125566959381,
-0.07917569577693939,
-0.20139363408088684,
0.2667718529701233,
0.18414540588855743,
-0.14572854340076447,
0.041686754673719406,
0.570847749710083,
-0.044182486832141876,
0.33055028319358826,
0.19781188666820526,
-0.02530483901500702,
-0.41814467310905457,
0.26601651310920715,
-0.1427733451128006,
-0.11271177977323532,
0.06725675612688065,
0.42617496848106384,
-0.20237208902835846,
-0.06575780361890793,
-0.3211309015750885,
0.14461259543895721,
0.07321801036596298,
-0.128805473446846,
-0.3384322226047516,
-0.14894737303256989,
-0.2807433009147644,
0.3283618688583374,
-0.5668162107467651,
-0.13653290271759033,
-0.31873348355293274,
-0.09395156055688858,
0.19952449202537537,
0.13469526171684265,
-0.0001038094560499303,
-0.10455377399921417,
0.05377590283751488,
-0.1696537584066391,
-0.3823367655277252,
-0.11311226338148117,
-0.37073802947998047,
-0.05606553703546524,
-0.16248293220996857,
-0.4812004864215851,
-0.08396176993846893,
-0.13150091469287872,
0.6196925044059753,
-0.12429407238960266,
0.09097772091627121,
-0.017413388937711716,
0.23303045332431793,
-0.1635333001613617,
0.20368488132953644,
-0.06574083864688873,
0.04214911535382271,
0.5205366015434265,
-0.011148017831146717,
-0.15512871742248535,
0.25030237436294556,
0.22707206010818481,
0.19362325966358185,
0.4561183750629425,
0.18363843858242035,
-0.06370994448661804,
-0.09569951891899109,
0.21439389884471893,
0.19553393125534058,
0.07622849196195602,
-0.061369091272354126,
0.13606572151184082,
0.2134791761636734,
-0.07997477799654007,
-0.10591600835323334,
-0.03808612376451492,
-0.14509998261928558,
-0.30367106199264526,
0.1463421881198883,
0.041628580540418625,
-0.32120463252067566,
0.12797698378562927,
-0.0428859107196331,
-0.01298324204981327,
-0.19205518066883087,
0.10460032522678375,
-0.15391530096530914,
0.042576469480991364,
-0.18056795001029968,
0.05747601017355919,
-0.016656674444675446,
-0.06821440905332565,
-0.10358747094869614,
-0.23425371944904327,
0.06044486537575722,
0.1291651725769043,
0.13913507759571075,
-0.21363528072834015,
0.03288785740733147,
0.2396116554737091,
0.142799511551857,
-0.0710187703371048,
0.04911988973617554,
-0.2254776954650879,
-0.20107614994049072,
0.21117739379405975,
0.08521048724651337,
-0.34433722496032715,
-0.03124764934182167,
-0.1308562010526657,
0.13514283299446106,
0.14236243069171906,
-0.11780264973640442,
-0.1452091932296753,
-0.5272660255432129,
0.14644324779510498,
0.02956857904791832,
0.1536746621131897,
0.186520516872406,
0.028768926858901978,
-0.22911974787712097,
-0.17486967146396637,
0.2094295173883438,
0.25737911462783813,
0.026070114225149155,
0.19533102214336395,
-0.07953169196844101,
-0.015659695491194725,
0.45789745450019836,
-0.1337021291255951,
0.22803476452827454,
-0.1318873167037964,
-0.0477352999150753,
-0.004128508269786835,
-0.20646710693836212,
-0.3135565519332886,
0.1045844703912735,
0.3235209882259369,
0.19802477955818176,
-0.1172303706407547,
-0.16816997528076172,
0.006592638324946165,
0.04369013383984566,
-0.31532856822013855,
0.35615795850753784,
0.09368275105953217,
-0.09911543130874634,
-0.2600512206554413,
-0.06451044231653214,
-0.007062914781272411,
-0.28316789865493774,
-0.001799871795810759,
-0.13522294163703918,
0.28681907057762146,
-0.3273298740386963,
0.3019578158855438,
0.030693311244249344,
0.12975077331066132,
0.004419815260916948,
0.13248884677886963,
-0.24863258004188538,
-0.13650305569171906,
0.1696443259716034,
0.2211446464061737,
0.047748930752277374,
-0.06275194883346558,
-0.17907489836215973,
0.21845710277557373,
-0.14081008732318878,
0.053627774119377136,
0.02047330141067505,
-0.2953685224056244,
0.25759807229042053,
-0.12275303155183792,
0.1461394727230072,
0.0050156377255916595,
-0.40554967522621155,
-0.01564844883978367,
0.29987379908561707,
-0.026219816878437996,
0.20896762609481812,
0.1442452371120453,
-0.1014925017952919,
-0.11472576856613159,
0.4631388783454895,
0.3853413760662079,
-0.022661546245217323,
-0.28326547145843506,
-0.046313680708408356,
0.35126587748527527,
-0.274142324924469,
-0.12728580832481384,
0.22183488309383392,
-0.38991525769233704,
-0.34840425848960876,
-0.06454555690288544,
-0.05872207134962082,
0.1162654384970665,
0.23773561418056488,
0.23462505638599396,
0.010871589183807373,
-0.14151781797409058,
0.08668835461139679,
-0.17252111434936523,
0.2036033272743225,
-0.23605041205883026,
-0.007241896353662014,
-0.17754307389259338,
0.005449081305414438,
0.020410701632499695,
-0.2502910792827606,
-0.21705439686775208,
-0.34004074335098267,
-0.24637357890605927,
0.17100971937179565,
-0.068753682076931,
0.03964141383767128,
0.258907675743103,
0.32270097732543945,
0.20553189516067505,
-0.09223136305809021,
-0.03261875733733177,
-0.13785162568092346,
0.2173469364643097,
-0.32082676887512207,
-0.057909172028303146,
0.23005475103855133,
-0.20787636935710907,
0.06349485367536545,
0.022165967151522636,
0.09056922048330307,
-0.1878935694694519,
-0.16469523310661316,
0.05446138605475426,
0.1960412710905075,
0.26805490255355835,
0.1801689714193344,
0.2611382305622101,
0.26351240277290344,
0.07037097215652466,
0.04104279726743698,
0.059099793434143066,
-0.11647339910268784,
-0.07844892889261246,
0.2705114185810089,
0.06587377190589905,
-0.15317775309085846,
-0.020103149116039276,
-0.013705669902265072,
-0.14626269042491913,
0.06464048475027084,
-0.22646072506904602,
0.15880368649959564,
-0.18408282101154327,
-0.0405627004802227,
-0.3135637938976288,
-0.11961183696985245,
0.24274083971977234,
-0.15602760016918182,
0.02920357696712017,
-0.3128659427165985,
-0.3260370194911957,
0.7602543830871582,
0.15358750522136688,
0.43197140097618103,
0.10660794377326965,
-0.010964627377688885,
0.12502031028270721,
0.038353897631168365,
-0.15136973559856415,
0.29033362865448,
0.3916301429271698,
-0.10903023183345795,
-0.2250545769929886,
0.14760857820510864,
-0.05057492479681969,
0.2619783878326416,
-0.1606137901544571,
0.398103803396225,
-0.010438427329063416,
0.0029800357297062874,
-0.03200586140155792,
-0.15295760333538055,
-0.3017505407333374,
0.014016753062605858,
-0.2837052643299103,
0.10422003269195557,
-0.12004908174276352,
-0.07990722358226776,
-0.3306264579296112,
0.14181672036647797,
0.5899984240531921,
0.20914849638938904,
0.2197721004486084,
0.19010435044765472,
0.11475714296102524,
-0.0804118812084198,
0.08200740814208984,
-0.1450122892856598,
0.395329087972641,
0.28930550813674927,
-0.15981487929821014,
-0.12388014793395996,
0.11326524615287781,
-0.02240033447742462,
0.2688375413417816,
0.11646997183561325,
-0.3119107186794281,
0.6341094374656677,
-0.4770483374595642,
0.37946242094039917,
-0.26093295216560364,
-0.3362380862236023,
0.21961554884910583,
0.044499486684799194,
-0.12943243980407715,
0.4246118366718292,
0.2849680185317993,
-0.05151383578777313,
-0.19510139524936676,
0.09995023161172867,
-0.05691687390208244,
-0.458042174577713,
-0.10528990626335144,
0.02538275718688965,
-0.07309931516647339,
-0.23616081476211548,
0.15921452641487122,
-0.21791031956672668,
-0.2159985899925232,
0.10479158908128738,
0.29198750853538513,
0.34882062673568726,
0.34369367361068726,
0.33582064509391785,
-0.09152357280254364,
-0.13245302438735962,
0.18181562423706055,
-0.17358000576496124,
-0.2619442045688629,
0.03283025324344635,
0.05399226024746895,
-0.100011445581913,
-0.11785157024860382,
-0.1965000480413437,
-0.12881724536418915,
0.337820827960968,
-0.08698926866054535,
-0.5810530185699463,
0.20537954568862915,
0.24294789135456085,
0.0959325060248375,
-0.025127261877059937,
0.18380121886730194,
0.09017214179039001,
-0.43459758162498474,
-0.5592062473297119,
0.3038545548915863,
0.15902525186538696,
-0.16233840584754944,
0.43035799264907837,
0.4907367527484894,
-0.03292590379714966,
0.28597795963287354,
-0.0833841860294342,
0.029180241748690605,
-0.469974160194397,
0.25077036023139954,
0.03179706260561943,
0.43191930651664734,
-0.08660762012004852,
0.0771193578839302,
0.14678260684013367,
0.2761633098125458,
-0.04001259058713913,
0.0024397310335189104,
-0.10005494207143784,
-0.17862166464328766,
-0.22276456654071808,
0.4229463040828705,
-0.5896047353744507,
0.1537718027830124,
0.13408109545707703,
0.22237341105937958,
0.21906647086143494,
-0.14313775300979614,
-0.019012534990906715,
0.03999308496713638,
0.12515422701835632,
-0.04273843392729759,
0.3183138370513916,
0.1610064059495926,
-0.0690292939543724,
0.2553659975528717,
-0.16438375413417816,
0.13236312568187714,
0.17133456468582153,
0.29408740997314453,
-0.09163594990968704,
-0.20506666600704193,
0.06407185643911362,
0.027838414534926414,
0.07310035079717636,
0.6269778609275818,
0.07654241472482681,
-0.034691959619522095,
-0.16382156312465668,
-0.04597179591655731,
0.3125388026237488,
0.4257168471813202,
-0.2780832052230835,
0.05892731249332428,
-0.2537436783313751,
0.4457297623157501,
-0.4251580238342285,
-0.03842230141162872,
0.18231117725372314,
0.1091594472527504,
-0.03149845078587532,
-0.06110720708966255,
-0.09977442771196365,
0.08766459673643112,
-0.2609660029411316,
0.040463145822286606,
0.16110533475875854,
-0.05969531461596489,
0.08773092180490494,
-0.5217260122299194,
-0.3132935166358948,
0.061243604868650436,
-0.03280779719352722,
-0.10787343233823776,
0.11509399116039276,
-0.04581966996192932,
0.03992687165737152,
0.018808556720614433,
0.18618427217006683,
0.34212759137153625,
0.20039469003677368,
-0.14572103321552277,
0.16865567862987518,
0.32263943552970886,
0.13402529060840607,
-0.05777225270867348,
0.464550644159317,
-0.15017755329608917,
-0.11380136758089066,
0.12830312550067902,
0.10836336016654968,
-0.48123881220817566,
0.2739775776863098,
0.5555264949798584,
-0.1457410752773285,
-0.2877621054649353,
-0.01313669141381979,
0.3394622504711151,
0.09236028045415878,
0.05776422470808029,
0.24806001782417297,
-0.08982597291469574,
-0.441503643989563,
-0.09358199685811996,
0.08137127757072449,
0.7289267182350159,
-0.08584102988243103,
0.2995275855064392,
-0.1665041744709015,
-0.21542644500732422,
0.151029571890831,
0.17561154067516327,
-0.008725210092961788,
-0.07075031101703644,
0.03245161101222038,
-0.3123506009578705,
-0.10965998470783234,
0.22575491666793823,
0.17943036556243896,
-0.3137708008289337,
-0.05044117942452431,
0.03543730825185776,
0.35491886734962463,
0.0322793610394001,
0.16242438554763794,
-0.7293540835380554,
-0.13885675370693207,
-0.21826669573783875,
0.2362365424633026,
-0.17804701626300812,
0.04419971629977226,
-0.06704806536436081,
-0.3221186101436615,
0.048444654792547226,
-0.13706350326538086,
0.0962357148528099,
-0.06760944426059723,
-0.4275617301464081,
0.13066823780536652,
-0.48350614309310913,
-0.15573513507843018,
-0.6559828519821167,
-0.17431960999965668,
-0.08603444695472717,
0.29009780287742615,
0.047367215156555176,
0.3378514349460602,
0.07138283550739288,
0.050763923674821854,
-0.18641851842403412,
-0.06803230941295624,
0.2677229344844818,
0.045137204229831696,
0.308450311422348,
-0.07852539420127869,
-0.058146413415670395,
-0.13024720549583435,
0.04738251492381096,
-0.05919811129570007,
0.1277005821466446,
-0.024201834574341774,
-0.24709175527095795,
-0.21688735485076904,
-0.21063931286334991,
-0.015058247372508049,
0.23373131453990936,
0.1582145243883133,
0.10214992612600327,
0.010936575010418892,
0.3703053295612335,
-0.12154882401227951,
-0.13817279040813446,
0.07273536920547485,
0.011457080021500587,
0.07581206411123276,
0.12094950675964355,
-0.31624478101730347,
-0.04395715892314911,
-0.2834053933620453,
0.37623488903045654,
0.0220964215695858,
-0.4348670542240143,
0.296141654253006,
0.20622827112674713,
-0.1251506358385086,
-0.06373102962970734,
0.16852933168411255,
0.12479225546121597,
-0.08741435408592224,
-0.07258922606706619,
-0.25238460302352905,
-0.17489011585712433,
0.5399541854858398,
-0.26891711354255676,
0.49527284502983093,
0.29246363043785095,
0.20538078248500824,
-0.2299005091190338,
-0.32972535490989685,
-0.4524572789669037,
0.1147909164428711,
-0.23672056198120117,
0.1562757045030594,
-0.1505410522222519,
0.30935147404670715,
0.17669560015201569,
0.06615886837244034,
0.34072163701057434,
0.20888884365558624,
-0.23672927916049957,
-0.27183517813682556,
-0.18288204073905945,
0.0626666471362114,
-0.04804961010813713,
0.18789367377758026,
0.08320902287960052,
-0.3715406656265259,
-0.2384619116783142,
0.055673904716968536,
-0.13821934163570404,
-0.047921787947416306,
-0.12758687138557434,
-0.13497178256511688,
0.2531262934207916,
0.12201684713363647,
0.40151140093803406,
-0.007574596907943487,
-0.1717769056558609,
0.48827245831489563,
-0.0678596943616867,
0.08912302553653717,
-0.30881187319755554,
-0.10099808871746063,
0.36397215723991394,
0.12344618141651154,
0.09271858632564545,
-0.08399923145771027,
0.3515343964099884,
0.2319147139787674,
-0.1489025056362152,
0.050746746361255646,
0.2946019470691681,
-0.02036726474761963,
-0.24727365374565125,
-0.09665543586015701,
0.12857969105243683,
0.2910277843475342,
-0.15788376331329346,
0.2311161458492279,
-0.44154033064842224,
-0.11039144545793533,
0.10729324817657471,
0.146330326795578,
0.04811273515224457,
0.11475871503353119,
0.2723616659641266,
-0.03795328363776207,
0.1973733901977539,
-0.11249417811632156,
-0.11863400787115097,
0.515893280506134,
0.12556201219558716,
0.2616870403289795,
-0.0319254994392395,
0.43896007537841797,
0.22081387042999268,
0.22796876728534698,
-0.3635620176792145,
0.029488757252693176,
0.02600785531103611,
0.15765048563480377,
0.3196835517883301,
-0.06804849952459335,
0.09588156640529633,
0.21810387074947357,
-0.21059133112430573,
0.5468741655349731,
0.03473782166838646,
0.05896270275115967,
-0.26287245750427246,
0.17262408137321472,
-0.11052217334508896,
0.10809600353240967,
-0.073995441198349,
0.13360871374607086,
-0.38535791635513306,
-0.09002203494310379,
-0.3798776865005493,
-0.15465933084487915,
0.09295497834682465,
-0.025074589997529984,
-0.024998998269438744,
0.18932893872261047,
0.2407926470041275,
-0.15475471317768097,
-0.07131393253803253,
0.12698186933994293,
0.26960253715515137,
-0.39822226762771606,
0.19473996758460999,
0.35749274492263794,
0.26126936078071594,
0.5498310923576355,
0.23672325909137726,
0.2249801903963089,
0.06333703547716141,
0.11087758839130402,
-0.09054464846849442,
-0.056522466242313385,
-0.321689635515213,
-0.40887412428855896,
-0.10215587168931961,
0.22473645210266113,
0.12130609154701233,
0.11130402982234955,
0.28095415234565735,
-0.2639542520046234,
-0.2700651288032532,
0.06970389932394028,
-0.34599849581718445,
-0.036223817616701126,
0.09533457458019257,
0.03555579110980034,
0.134656623005867,
-0.08352287113666534,
-0.09340532124042511,
-0.49193742871284485,
-0.2673684358596802,
-0.07822290807962418,
-0.1419687271118164,
0.020913466811180115,
0.4104556739330292,
0.1328841894865036,
-0.00822941493242979,
-0.16256694495677948,
0.03049236722290516,
0.07380913197994232,
-0.19352832436561584,
-0.2172350138425827,
-0.10112228244543076,
-0.08061055839061737,
0.10033277422189713,
-0.38188642263412476,
-0.23998203873634338,
0.06037718057632446,
0.11273285746574402,
-0.025307590141892433,
0.24603039026260376,
-0.23680518567562103,
0.48392173647880554,
0.15630093216896057,
-0.1377766877412796,
-0.339098185300827,
0.24611952900886536,
0.024922240525484085,
-0.09353406727313995,
-0.40282219648361206,
0.174028679728508,
-0.15380032360553741,
0.2803991734981537,
-0.23403814435005188,
-0.18683503568172455,
-0.06811216473579407,
-0.1497890204191208,
0.33105283975601196,
0.11576757580041885,
0.10584080219268799,
-0.33705565333366394,
0.016154110431671143,
0.2129245400428772,
0.03233221918344498,
-0.0303572416305542,
-0.11491572856903076,
0.21463537216186523,
0.35604920983314514,
-0.11066743731498718,
-0.08420724421739578,
0.09592293202877045,
0.2948302626609802,
-0.1660970151424408,
-0.14690810441970825,
-0.12998826801776886,
0.11982613056898117,
-0.3590985834598541,
-0.08378450572490692,
0.01905861869454384,
0.2826937735080719,
-0.06993547081947327,
-0.2849275767803192,
-0.2076977640390396,
-0.4573022723197937,
0.2925269603729248,
0.10516808927059174,
-0.11960619688034058,
0.10023914277553558,
-0.0006135379080660641,
-0.07262703776359558,
0.5208814740180969,
-0.07958614826202393,
0.18237701058387756,
0.32422131299972534,
-0.014549256302416325,
0.0642666146159172,
0.14212940633296967,
0.2531130611896515,
0.07275938987731934,
-0.05728476122021675,
-0.05757516250014305,
0.10895249992609024,
-0.2099369764328003,
-0.13528971374034882,
-0.18661059439182281
] |
https://github.com/huggingface/datasets/issues/3142
|
Provide a way to write a streamed dataset to the disk
|
Yes, I agree this feature is much needed. We could do something similar to what TF does (https://www.tensorflow.org/api_docs/python/tf/data/Dataset#cache).
Ideally, if the entire streamed dataset is consumed/cached, the generated cache should be reusable for the Arrow dataset.
|
**Is your feature request related to a problem? Please describe.**
The streaming mode allows to get the 100 first rows of a dataset very quickly. But it does not cache the answer, so a posterior call to get the same 100 rows will send a request to the server again and again.
**Describe the solution you'd like**
Provide a way to write the streamed rows of a dataset on the disk, and to load from it later.
**Describe alternatives you've considered**
Provide a third mode: `lazy`, which would use the local cache for the data that have already been fetched previously, and use streaming to get the rest of the requested data.
| 36 |
Provide a way to write a streamed dataset to the disk
|
[
-0.4496351182460785,
-0.16796930134296417,
-0.22473379969596863,
-0.056569043546915054,
0.1529308259487152,
-0.02752460353076458,
-0.022778868675231934,
0.1225094422698021,
0.15739184617996216,
0.08497601747512817,
-0.07551039010286331,
0.08928224444389343,
-0.34157711267471313,
0.3490709066390991,
0.24536040425300598,
-0.013426883146166801,
0.24650777876377106,
0.2885722219944,
-0.11421754211187363,
-0.05506465584039688,
0.12113869935274124,
-0.13206040859222412,
0.18024462461471558,
-0.2933571934700012,
0.031608860939741135,
-0.292153000831604,
-0.0934811532497406,
0.2084282785654068,
-0.24094069004058838,
-0.05520422011613846,
-0.10752485692501068,
0.38353896141052246,
0.11258028447628021,
0.33806389570236206,
-0.00010384355846326798,
-0.11148962378501892,
-0.17448940873146057,
-0.3412221074104309,
-0.4053604304790497,
0.21905355155467987,
-0.13413289189338684,
0.12453541904687881,
-0.07441747933626175,
-0.34921786189079285,
0.07850948721170425,
-0.19901539385318756,
0.3941575288772583,
-0.49368730187416077,
0.39379066228866577,
0.02771841362118721,
0.31236574053764343,
0.009253077208995819,
-0.10308343917131424,
0.10891720652580261,
-0.17281055450439453,
0.5570154786109924,
-0.16331636905670166,
0.1391550451517105,
0.38414835929870605,
0.07200793921947479,
0.025837088003754616,
0.14675015211105347,
-0.16849489510059357,
-0.04189614579081535,
0.4149717092514038,
0.07878179848194122,
-0.21094796061515808,
0.02740972302854061,
0.03668399527668953,
0.0033910521306097507,
0.3944176137447357,
-0.5690591335296631,
-0.4245074689388275,
-0.05348026752471924,
-0.13803258538246155,
-0.3540017306804657,
0.059226144105196,
0.40246835350990295,
-0.32909226417541504,
0.22722923755645752,
-0.1538413017988205,
-0.3738916516304016,
-0.3351241648197174,
0.10365888476371765,
0.43911170959472656,
-0.021407131105661392,
0.04743245244026184,
-0.1183103621006012,
0.04737234115600586,
0.3567609488964081,
0.5425831079483032,
-0.2142350822687149,
0.08087365329265594,
0.1645822525024414,
-0.07095324993133545,
-0.24988722801208496,
-0.2726185917854309,
0.025034472346305847,
-0.045449864119291306,
0.0051306504756212234,
0.5849153995513916,
0.014028243720531464,
0.11632420867681503,
-0.11352551728487015,
0.06455999612808228,
-0.19088903069496155,
-0.16534267365932465,
-0.11211947351694107,
0.1532667726278305,
-0.004066094756126404,
0.1380922645330429,
-0.1401873230934143,
0.03349911421537399,
0.3641410171985626,
0.26454779505729675,
-0.12212525308132172,
0.06821534037590027,
0.07725019007921219,
-0.18327279388904572,
-0.08020567893981934,
0.15771934390068054,
0.08986582607030869,
-0.14533290266990662,
0.3394543528556824,
0.00301381410099566,
-0.2246880829334259,
0.11128710955381393,
0.13036835193634033,
0.17360888421535492,
-0.0633663460612297,
-0.04478484019637108,
0.02724010869860649,
0.11596722155809402,
0.1955641657114029,
0.09292282909154892,
-0.1676986813545227,
0.15873843431472778,
-0.179734468460083,
-0.10432348400354385,
-0.13258947432041168,
0.30018773674964905,
-0.14731910824775696,
0.2791123688220978,
0.05967678502202034,
0.09623077511787415,
-0.0593208409845829,
-0.06583959609270096,
0.015326925553381443,
-0.16103209555149078,
0.17308244109153748,
0.2542513310909271,
-0.2306338995695114,
-0.006111632566899061,
0.2589135766029358,
0.09221198409795761,
-0.129839226603508,
-0.17836503684520721,
0.15796786546707153,
-0.28468284010887146,
-0.31733429431915283,
-0.07897981256246567,
0.35301753878593445,
-0.19254831969738007,
-0.2266141027212143,
0.13410666584968567,
0.16565164923667908,
-0.3109789490699768,
0.013112087734043598,
-0.14207856357097626,
0.07639393955469131,
0.3464663028717041,
-0.02501608245074749,
0.2802566587924957,
0.09372768551111221,
-0.09434974193572998,
0.15320849418640137,
0.5248692631721497,
-0.12476224452257156,
-0.16207775473594666,
0.24078461527824402,
-0.2531363070011139,
-0.03371617943048477,
0.38247743248939514,
0.5672091841697693,
0.47938692569732666,
-0.08908503502607346,
0.013032420538365841,
0.27696242928504944,
-0.05798092857003212,
0.16458065807819366,
-0.13453145325183868,
-0.17899930477142334,
-0.10880422592163086,
0.29033127427101135,
-0.20865608751773834,
0.2803576588630676,
0.4924285411834717,
0.15699119865894318,
0.3628268539905548,
-0.1102515310049057,
0.4346599876880646,
0.2749377191066742,
0.3231135904788971,
-0.03252600505948067,
-0.42125779390335083,
-0.09147431701421738,
-0.03323205187916756,
-0.2721458077430725,
0.45347368717193604,
-0.14288896322250366,
0.14777377247810364,
-0.26326486468315125,
-0.06366147845983505,
0.0716414675116539,
0.1471853405237198,
-0.008438668213784695,
0.26236164569854736,
0.3425518274307251,
0.05404353514313698,
0.004474837798625231,
-0.23115824162960052,
0.23964351415634155,
-0.28899291157722473,
-0.23236964643001556,
-0.03581181541085243,
0.1682911068201065,
0.09317255020141602,
-0.36820441484451294,
0.05634044110774994,
-0.05046151950955391,
-0.11168991029262543,
0.04340996965765953,
0.07212823629379272,
0.26364293694496155,
-0.16979767382144928,
0.32274913787841797,
0.23412074148654938,
0.36789780855178833,
0.04406217858195305,
-0.01835295557975769,
0.17287249863147736,
0.31585028767585754,
0.14654423296451569,
-0.10222307592630386,
-0.4747491478919983,
0.06409531831741333,
-0.11952100694179535,
-0.03664272278547287,
-0.01106015220284462,
0.0068177334032952785,
0.041607484221458435,
0.1853826940059662,
0.013895229436457157,
0.08338886499404907,
0.2140457034111023,
-0.06331399083137512,
-0.0321798138320446,
-0.2352934032678604,
-0.10922946035861969,
0.09991411119699478,
0.2682401239871979,
-0.0917074903845787,
0.3387133479118347,
0.04791847988963127,
-0.03930118307471275,
-0.12971599400043488,
0.22173304855823517,
0.4667849838733673,
0.4828086793422699,
0.3505353331565857,
0.2950611710548401,
-0.12687471508979797,
0.16517670452594757,
-0.044250015169382095,
0.2714829742908478,
-0.4302676320075989,
-0.3144281208515167,
0.26264309883117676,
-0.08198065310716629,
-0.2977975904941559,
-0.3818720877170563,
-0.07037357985973358,
0.05596214532852173,
-0.11005620658397675,
0.053284697234630585,
-0.2711491584777832,
0.07851152122020721,
0.006152480375021696,
-0.0727025493979454,
0.011689302511513233,
0.05072116106748581,
-0.11287276446819305,
0.15206560492515564,
0.7347835302352905,
-0.07521900534629822,
0.033946700394153595,
-0.03770952671766281,
0.3727591335773468,
0.1231934204697609,
-0.00877551268786192,
-0.2773519456386566,
-0.1257886439561844,
0.2506781220436096,
0.2397206425666809,
-0.07466033846139908,
0.17920701205730438,
0.6129950284957886,
0.09630303084850311,
0.10050218552350998,
-0.5034179091453552,
0.26639649271965027,
-0.1624649167060852,
0.021173477172851562,
0.10812156647443771,
-0.12275758385658264,
0.4102647602558136,
-0.014083719812333584,
-0.40208107233047485,
-0.11989136785268784,
-0.1836964637041092,
-0.1655966341495514,
-0.11685148626565933,
0.2821926474571228,
-0.09371121227741241,
-0.13796518743038177,
0.10553648322820663,
-0.3191571831703186,
-0.5665332674980164,
0.2924391031265259,
-0.11503133922815323,
0.28529247641563416,
-0.1742306798696518,
0.15344677865505219,
-0.11552295833826065,
0.20811982452869415,
0.05665338784456253,
-0.1490345150232315,
-0.4862239956855774,
0.3277337849140167,
-0.27174845337867737,
-0.3322007656097412,
0.1938195824623108,
0.22528474032878876,
-0.09330703318119049,
0.507890522480011,
-0.21482929587364197,
-0.09741868078708649,
0.28759661316871643,
-0.15880636870861053,
-0.22045482695102692,
0.0679241195321083,
0.22794249653816223,
0.013607770204544067,
-0.10104336589574814,
-0.13510286808013916,
-0.010268977843225002,
-0.03325333446264267,
0.18701624870300293,
-0.003317920258268714,
-0.12331779301166534,
0.2995988428592682,
-0.012751943431794643,
0.12605814635753632,
-0.00605539558455348,
0.06220826134085655,
0.2978914976119995,
0.1350625604391098,
0.3361663818359375,
-0.07027590274810791,
-0.08858709037303925,
0.12464670836925507,
-0.023711398243904114,
-0.2905017137527466,
0.030350055545568466,
-0.10846686363220215,
-0.07952649891376495,
-0.04976474121212959,
0.14652830362319946,
-0.2096530646085739,
0.013849279843270779,
-0.030099162831902504,
-0.06251055002212524,
0.35372450947761536,
-0.19279177486896515,
0.1559506058692932,
-0.06572075188159943,
-0.049571700394153595,
-0.2020835280418396,
0.20668648183345795,
0.2714274823665619,
0.04271629452705383,
-0.26601919531822205,
0.18001626431941986,
-0.6256893277168274,
-0.11012373119592667,
0.045398566871881485,
0.15227435529232025,
-0.46549662947654724,
-0.05277589336037636,
0.13366249203681946,
0.054502423852682114,
0.4542244076728821,
-0.31058865785598755,
0.11109264194965363,
-0.17993038892745972,
0.1710185408592224,
-0.25916236639022827,
0.3184131383895874,
-0.02067619189620018,
0.17219790816307068,
-0.09823267161846161,
0.16663780808448792,
-0.20668846368789673,
0.2014104276895523,
-0.11469335108995438,
0.0378965362906456,
-0.10832168161869049,
-0.15664832293987274,
0.010983733460307121,
-0.23326343297958374,
-0.26777905225753784,
0.007293690461665392,
0.14489521086215973,
0.07488025724887848,
0.07488449662923813,
-0.1861291080713272,
-0.0775352269411087,
0.26182037591934204,
0.08295417577028275,
-0.25688421726226807,
0.27822956442832947,
-0.027770204469561577,
-0.005099279806017876,
0.08407144248485565,
0.23843610286712646,
-0.12534929811954498,
0.022741546854376793,
0.1866660863161087,
0.07453630119562149,
0.3699023127555847,
-0.2303130030632019,
0.08432884514331818,
0.22295358777046204,
0.3074028789997101,
0.29801544547080994,
0.40967389941215515,
-0.13763995468616486,
-0.5296835899353027,
0.12197894603013992,
-0.06940311193466187,
0.01230314839631319,
-0.20202717185020447,
-0.302183598279953,
0.0672263652086258,
-0.3057667315006256,
0.06175253167748451,
0.39093154668807983,
-0.0932626873254776,
-0.2608678936958313,
0.2663528323173523,
0.2172383964061737,
0.951058566570282,
-0.1893852949142456,
0.30498379468917847,
0.10157119482755661,
-0.4428722560405731,
-0.0649595782160759,
-0.4709678888320923,
0.16836652159690857,
-0.23571906983852386,
-0.33958345651626587,
-0.13804472982883453,
-0.05959522724151611,
-0.24351967871189117,
0.08004762977361679,
-0.4044152498245239,
-0.1242530420422554,
0.4027447998523712,
0.06676247715950012,
-0.051193758845329285,
0.13525156676769257,
-0.509212076663971,
-0.31191205978393555,
-0.29324737191200256,
0.2964022755622864,
-0.016469785943627357,
-0.16276030242443085,
-0.14004002511501312,
-0.18599112331867218,
0.2919664978981018,
0.09919361025094986,
-0.25172320008277893,
-0.15853697061538696,
-0.2555890679359436,
0.09574954211711884,
-0.551422655582428,
-0.2009834349155426,
-0.3592167794704437,
0.07403638958930969,
0.036220483481884,
0.09941083937883377,
-0.04852220416069031,
-0.15854798257350922,
-0.12307138741016388,
0.06407789885997772,
-0.19443279504776,
-0.12148154526948929,
-0.12856616079807281,
0.03982464224100113,
-0.043301358819007874,
0.3380484879016876,
-0.044948019087314606,
-0.6035651564598083,
0.125181645154953,
-0.08821571618318558,
0.04205003380775452,
-0.09805053472518921,
-0.15679723024368286,
-0.012009876780211926,
-0.1731291562318802,
-0.18308719992637634,
0.20769865810871124,
0.21145321428775787,
-0.019673381000757217,
-0.06261829286813736,
-0.1074632927775383,
0.021213172003626823,
-0.227060467004776,
0.4213907718658447,
-0.17583951354026794,
0.10532881319522858,
0.1649433821439743,
-0.32669204473495483,
-0.24519531428813934,
-0.33217853307724,
0.010239820927381516,
-0.10479643940925598,
0.09872296452522278,
0.058075547218322754,
-0.27309316396713257,
-0.23543034493923187,
-0.3440702557563782,
-0.051107257604599,
0.12254767119884491,
0.19253979623317719,
-0.3788946270942688,
-0.24618402123451233,
-0.429314523935318,
0.24504901468753815,
0.23704703152179718,
0.29587897658348083,
0.09525991976261139,
-0.25293001532554626,
-0.12512895464897156,
-0.04681605100631714,
-0.4270837604999542,
-0.027220657095313072,
0.056976523250341415,
0.09050630033016205,
0.4119313359260559,
-0.01761341281235218,
0.21728402376174927,
-0.14454226195812225,
0.2349567413330078,
-0.01471563521772623,
-0.1307843029499054,
-0.27344727516174316,
-0.07487048208713531,
0.06547822803258896,
0.027492964640259743,
-0.08345077186822891,
-0.4084404408931732,
-0.4358600974082947,
-0.09080750495195389,
-0.13982710242271423,
0.11480055004358292,
0.27434924244880676,
-0.2652910053730011,
-0.22256498038768768,
0.4537913203239441,
0.2558644413948059,
-0.4105691611766815,
-0.15483669936656952,
0.13098874688148499,
0.023943858221173286,
-0.37858420610427856,
-0.08037504553794861,
0.17691223323345184,
-0.27380457520484924,
0.0006286426796577871,
0.2499280422925949,
0.500044047832489,
0.08888431638479233,
0.34116238355636597,
0.021382542327046394,
-0.043869879096746445,
0.029784079641103745,
0.4928562045097351,
0.0758257508277893,
-0.05770222097635269,
0.07571129500865936,
0.03761996328830719,
0.3419996201992035,
0.15529073774814606,
-0.1432340145111084,
-0.21440988779067993,
-0.1739269495010376,
0.2655177116394043,
0.05962209403514862,
-0.02968376688659191,
-0.23670826852321625,
0.15231339633464813,
-0.11745443940162659,
0.055479276925325394,
-0.22421878576278687,
-0.10998192429542542,
0.33668607473373413,
0.10944920033216476,
0.15250268578529358,
-0.20116601884365082,
0.022955114021897316,
0.06465048342943192,
0.28430330753326416,
-0.0018076435662806034,
0.35473477840423584,
0.31899741291999817,
-0.198091521859169,
-0.3559606373310089,
-0.14619587361812592,
-0.0530385784804821,
-0.25538334250450134,
-0.0901198759675026,
0.5064196586608887,
0.18946966528892517,
-0.044274330139160156,
-0.38187089562416077,
-0.06871597468852997,
-0.18411120772361755,
-0.07069326192140579,
-0.13691926002502441,
-0.027269240468740463,
-0.0856083557009697,
-0.21917128562927246,
0.05853855237364769,
0.22682783007621765,
0.01667330414056778,
-0.001467700581997633,
-0.1097162663936615,
0.08858931809663773,
0.35983991622924805,
0.030881570652127266,
0.15474826097488403,
0.32079771161079407,
0.0025783677119761705,
-0.2972359359264374,
0.05879939720034599,
0.09718482196331024,
0.1835450977087021,
0.11289654672145844,
0.0701831579208374,
0.022493261843919754,
0.0454249307513237,
0.01889181137084961,
0.43077966570854187,
0.042172983288764954,
-0.15800391137599945,
-0.2567109763622284,
0.06975188851356506,
0.23749496042728424,
0.07666268944740295,
0.20630037784576416,
0.3200271725654602,
-0.13687212765216827,
0.24918654561042786,
0.14580127596855164,
-0.14486660063266754,
-0.008923321962356567,
0.001215728814713657,
0.20902954041957855,
-0.2858956456184387,
0.026695694774389267,
0.008835593238472939,
-0.11868301033973694,
0.10741326957941055,
0.14767448604106903,
-0.2554628551006317,
0.20166823267936707,
0.08297185599803925,
0.1460612416267395,
0.07443295419216156,
0.29946890473365784,
0.04657858982682228,
-0.12388356775045395,
-0.17753222584724426,
-0.2696591019630432,
-0.24495956301689148,
-0.01840449869632721,
0.16364413499832153,
-0.15979938209056854,
-0.36431390047073364,
0.05386636033654213,
0.2841508984565735,
0.22913293540477753,
-0.16900041699409485,
-0.05660158023238182,
-0.10233591496944427,
0.33423706889152527,
-0.06460874527692795,
-0.15974286198616028,
0.31356021761894226,
0.3615257740020752,
-0.027734797447919846,
-0.5653034448623657,
0.3114122450351715,
0.24737431108951569,
0.3447422385215759,
0.29976963996887207,
0.1836315393447876,
-0.3672662377357483,
0.0658542662858963,
0.2039545178413391,
-0.17363934218883514,
0.17615622282028198,
-0.41709765791893005,
-0.02825559489428997,
-0.12656421959400177,
0.13782036304473877,
-0.11594872921705246,
-0.10886348783969879,
0.16289007663726807,
0.44749072194099426,
-0.2163214385509491,
-0.002815910615026951,
-0.16737870872020721,
0.3701743483543396,
-0.09589295834302902,
-0.0623357929289341,
0.03832106664776802,
0.038359809666872025,
-0.14444869756698608,
0.07409414649009705,
0.23432700335979462,
0.19849319756031036,
-0.23416192829608917,
0.0924476608633995,
-0.1405387967824936,
0.1099698394536972,
0.09165988862514496,
0.04927518218755722,
-0.150303915143013,
0.23856022953987122,
0.13964694738388062,
0.37641391158103943,
0.2972537577152252,
-0.4478726387023926,
0.048000797629356384,
0.19613607227802277,
-0.3130631148815155,
0.17193885147571564,
0.24518385529518127,
-0.18223866820335388,
0.1401636004447937,
0.10416020452976227,
0.3429386615753174,
0.041148774325847626,
-0.2783437967300415,
-0.12616564333438873,
-0.5491719841957092
] |
https://github.com/huggingface/datasets/issues/3142
|
Provide a way to write a streamed dataset to the disk
|
@mariosasko Hi big brother,any update on this? It's 2024 with large streamed dataset loading consume too much time(exp. 2day..), really need this feature for what TF does
|
**Is your feature request related to a problem? Please describe.**
The streaming mode allows to get the 100 first rows of a dataset very quickly. But it does not cache the answer, so a posterior call to get the same 100 rows will send a request to the server again and again.
**Describe the solution you'd like**
Provide a way to write the streamed rows of a dataset on the disk, and to load from it later.
**Describe alternatives you've considered**
Provide a third mode: `lazy`, which would use the local cache for the data that have already been fetched previously, and use streaming to get the rest of the requested data.
| 27 |
Provide a way to write a streamed dataset to the disk
|
[
-0.4496351182460785,
-0.16796930134296417,
-0.22473379969596863,
-0.056569043546915054,
0.1529308259487152,
-0.02752460353076458,
-0.022778868675231934,
0.1225094422698021,
0.15739184617996216,
0.08497601747512817,
-0.07551039010286331,
0.08928224444389343,
-0.34157711267471313,
0.3490709066390991,
0.24536040425300598,
-0.013426883146166801,
0.24650777876377106,
0.2885722219944,
-0.11421754211187363,
-0.05506465584039688,
0.12113869935274124,
-0.13206040859222412,
0.18024462461471558,
-0.2933571934700012,
0.031608860939741135,
-0.292153000831604,
-0.0934811532497406,
0.2084282785654068,
-0.24094069004058838,
-0.05520422011613846,
-0.10752485692501068,
0.38353896141052246,
0.11258028447628021,
0.33806389570236206,
-0.00010384355846326798,
-0.11148962378501892,
-0.17448940873146057,
-0.3412221074104309,
-0.4053604304790497,
0.21905355155467987,
-0.13413289189338684,
0.12453541904687881,
-0.07441747933626175,
-0.34921786189079285,
0.07850948721170425,
-0.19901539385318756,
0.3941575288772583,
-0.49368730187416077,
0.39379066228866577,
0.02771841362118721,
0.31236574053764343,
0.009253077208995819,
-0.10308343917131424,
0.10891720652580261,
-0.17281055450439453,
0.5570154786109924,
-0.16331636905670166,
0.1391550451517105,
0.38414835929870605,
0.07200793921947479,
0.025837088003754616,
0.14675015211105347,
-0.16849489510059357,
-0.04189614579081535,
0.4149717092514038,
0.07878179848194122,
-0.21094796061515808,
0.02740972302854061,
0.03668399527668953,
0.0033910521306097507,
0.3944176137447357,
-0.5690591335296631,
-0.4245074689388275,
-0.05348026752471924,
-0.13803258538246155,
-0.3540017306804657,
0.059226144105196,
0.40246835350990295,
-0.32909226417541504,
0.22722923755645752,
-0.1538413017988205,
-0.3738916516304016,
-0.3351241648197174,
0.10365888476371765,
0.43911170959472656,
-0.021407131105661392,
0.04743245244026184,
-0.1183103621006012,
0.04737234115600586,
0.3567609488964081,
0.5425831079483032,
-0.2142350822687149,
0.08087365329265594,
0.1645822525024414,
-0.07095324993133545,
-0.24988722801208496,
-0.2726185917854309,
0.025034472346305847,
-0.045449864119291306,
0.0051306504756212234,
0.5849153995513916,
0.014028243720531464,
0.11632420867681503,
-0.11352551728487015,
0.06455999612808228,
-0.19088903069496155,
-0.16534267365932465,
-0.11211947351694107,
0.1532667726278305,
-0.004066094756126404,
0.1380922645330429,
-0.1401873230934143,
0.03349911421537399,
0.3641410171985626,
0.26454779505729675,
-0.12212525308132172,
0.06821534037590027,
0.07725019007921219,
-0.18327279388904572,
-0.08020567893981934,
0.15771934390068054,
0.08986582607030869,
-0.14533290266990662,
0.3394543528556824,
0.00301381410099566,
-0.2246880829334259,
0.11128710955381393,
0.13036835193634033,
0.17360888421535492,
-0.0633663460612297,
-0.04478484019637108,
0.02724010869860649,
0.11596722155809402,
0.1955641657114029,
0.09292282909154892,
-0.1676986813545227,
0.15873843431472778,
-0.179734468460083,
-0.10432348400354385,
-0.13258947432041168,
0.30018773674964905,
-0.14731910824775696,
0.2791123688220978,
0.05967678502202034,
0.09623077511787415,
-0.0593208409845829,
-0.06583959609270096,
0.015326925553381443,
-0.16103209555149078,
0.17308244109153748,
0.2542513310909271,
-0.2306338995695114,
-0.006111632566899061,
0.2589135766029358,
0.09221198409795761,
-0.129839226603508,
-0.17836503684520721,
0.15796786546707153,
-0.28468284010887146,
-0.31733429431915283,
-0.07897981256246567,
0.35301753878593445,
-0.19254831969738007,
-0.2266141027212143,
0.13410666584968567,
0.16565164923667908,
-0.3109789490699768,
0.013112087734043598,
-0.14207856357097626,
0.07639393955469131,
0.3464663028717041,
-0.02501608245074749,
0.2802566587924957,
0.09372768551111221,
-0.09434974193572998,
0.15320849418640137,
0.5248692631721497,
-0.12476224452257156,
-0.16207775473594666,
0.24078461527824402,
-0.2531363070011139,
-0.03371617943048477,
0.38247743248939514,
0.5672091841697693,
0.47938692569732666,
-0.08908503502607346,
0.013032420538365841,
0.27696242928504944,
-0.05798092857003212,
0.16458065807819366,
-0.13453145325183868,
-0.17899930477142334,
-0.10880422592163086,
0.29033127427101135,
-0.20865608751773834,
0.2803576588630676,
0.4924285411834717,
0.15699119865894318,
0.3628268539905548,
-0.1102515310049057,
0.4346599876880646,
0.2749377191066742,
0.3231135904788971,
-0.03252600505948067,
-0.42125779390335083,
-0.09147431701421738,
-0.03323205187916756,
-0.2721458077430725,
0.45347368717193604,
-0.14288896322250366,
0.14777377247810364,
-0.26326486468315125,
-0.06366147845983505,
0.0716414675116539,
0.1471853405237198,
-0.008438668213784695,
0.26236164569854736,
0.3425518274307251,
0.05404353514313698,
0.004474837798625231,
-0.23115824162960052,
0.23964351415634155,
-0.28899291157722473,
-0.23236964643001556,
-0.03581181541085243,
0.1682911068201065,
0.09317255020141602,
-0.36820441484451294,
0.05634044110774994,
-0.05046151950955391,
-0.11168991029262543,
0.04340996965765953,
0.07212823629379272,
0.26364293694496155,
-0.16979767382144928,
0.32274913787841797,
0.23412074148654938,
0.36789780855178833,
0.04406217858195305,
-0.01835295557975769,
0.17287249863147736,
0.31585028767585754,
0.14654423296451569,
-0.10222307592630386,
-0.4747491478919983,
0.06409531831741333,
-0.11952100694179535,
-0.03664272278547287,
-0.01106015220284462,
0.0068177334032952785,
0.041607484221458435,
0.1853826940059662,
0.013895229436457157,
0.08338886499404907,
0.2140457034111023,
-0.06331399083137512,
-0.0321798138320446,
-0.2352934032678604,
-0.10922946035861969,
0.09991411119699478,
0.2682401239871979,
-0.0917074903845787,
0.3387133479118347,
0.04791847988963127,
-0.03930118307471275,
-0.12971599400043488,
0.22173304855823517,
0.4667849838733673,
0.4828086793422699,
0.3505353331565857,
0.2950611710548401,
-0.12687471508979797,
0.16517670452594757,
-0.044250015169382095,
0.2714829742908478,
-0.4302676320075989,
-0.3144281208515167,
0.26264309883117676,
-0.08198065310716629,
-0.2977975904941559,
-0.3818720877170563,
-0.07037357985973358,
0.05596214532852173,
-0.11005620658397675,
0.053284697234630585,
-0.2711491584777832,
0.07851152122020721,
0.006152480375021696,
-0.0727025493979454,
0.011689302511513233,
0.05072116106748581,
-0.11287276446819305,
0.15206560492515564,
0.7347835302352905,
-0.07521900534629822,
0.033946700394153595,
-0.03770952671766281,
0.3727591335773468,
0.1231934204697609,
-0.00877551268786192,
-0.2773519456386566,
-0.1257886439561844,
0.2506781220436096,
0.2397206425666809,
-0.07466033846139908,
0.17920701205730438,
0.6129950284957886,
0.09630303084850311,
0.10050218552350998,
-0.5034179091453552,
0.26639649271965027,
-0.1624649167060852,
0.021173477172851562,
0.10812156647443771,
-0.12275758385658264,
0.4102647602558136,
-0.014083719812333584,
-0.40208107233047485,
-0.11989136785268784,
-0.1836964637041092,
-0.1655966341495514,
-0.11685148626565933,
0.2821926474571228,
-0.09371121227741241,
-0.13796518743038177,
0.10553648322820663,
-0.3191571831703186,
-0.5665332674980164,
0.2924391031265259,
-0.11503133922815323,
0.28529247641563416,
-0.1742306798696518,
0.15344677865505219,
-0.11552295833826065,
0.20811982452869415,
0.05665338784456253,
-0.1490345150232315,
-0.4862239956855774,
0.3277337849140167,
-0.27174845337867737,
-0.3322007656097412,
0.1938195824623108,
0.22528474032878876,
-0.09330703318119049,
0.507890522480011,
-0.21482929587364197,
-0.09741868078708649,
0.28759661316871643,
-0.15880636870861053,
-0.22045482695102692,
0.0679241195321083,
0.22794249653816223,
0.013607770204544067,
-0.10104336589574814,
-0.13510286808013916,
-0.010268977843225002,
-0.03325333446264267,
0.18701624870300293,
-0.003317920258268714,
-0.12331779301166534,
0.2995988428592682,
-0.012751943431794643,
0.12605814635753632,
-0.00605539558455348,
0.06220826134085655,
0.2978914976119995,
0.1350625604391098,
0.3361663818359375,
-0.07027590274810791,
-0.08858709037303925,
0.12464670836925507,
-0.023711398243904114,
-0.2905017137527466,
0.030350055545568466,
-0.10846686363220215,
-0.07952649891376495,
-0.04976474121212959,
0.14652830362319946,
-0.2096530646085739,
0.013849279843270779,
-0.030099162831902504,
-0.06251055002212524,
0.35372450947761536,
-0.19279177486896515,
0.1559506058692932,
-0.06572075188159943,
-0.049571700394153595,
-0.2020835280418396,
0.20668648183345795,
0.2714274823665619,
0.04271629452705383,
-0.26601919531822205,
0.18001626431941986,
-0.6256893277168274,
-0.11012373119592667,
0.045398566871881485,
0.15227435529232025,
-0.46549662947654724,
-0.05277589336037636,
0.13366249203681946,
0.054502423852682114,
0.4542244076728821,
-0.31058865785598755,
0.11109264194965363,
-0.17993038892745972,
0.1710185408592224,
-0.25916236639022827,
0.3184131383895874,
-0.02067619189620018,
0.17219790816307068,
-0.09823267161846161,
0.16663780808448792,
-0.20668846368789673,
0.2014104276895523,
-0.11469335108995438,
0.0378965362906456,
-0.10832168161869049,
-0.15664832293987274,
0.010983733460307121,
-0.23326343297958374,
-0.26777905225753784,
0.007293690461665392,
0.14489521086215973,
0.07488025724887848,
0.07488449662923813,
-0.1861291080713272,
-0.0775352269411087,
0.26182037591934204,
0.08295417577028275,
-0.25688421726226807,
0.27822956442832947,
-0.027770204469561577,
-0.005099279806017876,
0.08407144248485565,
0.23843610286712646,
-0.12534929811954498,
0.022741546854376793,
0.1866660863161087,
0.07453630119562149,
0.3699023127555847,
-0.2303130030632019,
0.08432884514331818,
0.22295358777046204,
0.3074028789997101,
0.29801544547080994,
0.40967389941215515,
-0.13763995468616486,
-0.5296835899353027,
0.12197894603013992,
-0.06940311193466187,
0.01230314839631319,
-0.20202717185020447,
-0.302183598279953,
0.0672263652086258,
-0.3057667315006256,
0.06175253167748451,
0.39093154668807983,
-0.0932626873254776,
-0.2608678936958313,
0.2663528323173523,
0.2172383964061737,
0.951058566570282,
-0.1893852949142456,
0.30498379468917847,
0.10157119482755661,
-0.4428722560405731,
-0.0649595782160759,
-0.4709678888320923,
0.16836652159690857,
-0.23571906983852386,
-0.33958345651626587,
-0.13804472982883453,
-0.05959522724151611,
-0.24351967871189117,
0.08004762977361679,
-0.4044152498245239,
-0.1242530420422554,
0.4027447998523712,
0.06676247715950012,
-0.051193758845329285,
0.13525156676769257,
-0.509212076663971,
-0.31191205978393555,
-0.29324737191200256,
0.2964022755622864,
-0.016469785943627357,
-0.16276030242443085,
-0.14004002511501312,
-0.18599112331867218,
0.2919664978981018,
0.09919361025094986,
-0.25172320008277893,
-0.15853697061538696,
-0.2555890679359436,
0.09574954211711884,
-0.551422655582428,
-0.2009834349155426,
-0.3592167794704437,
0.07403638958930969,
0.036220483481884,
0.09941083937883377,
-0.04852220416069031,
-0.15854798257350922,
-0.12307138741016388,
0.06407789885997772,
-0.19443279504776,
-0.12148154526948929,
-0.12856616079807281,
0.03982464224100113,
-0.043301358819007874,
0.3380484879016876,
-0.044948019087314606,
-0.6035651564598083,
0.125181645154953,
-0.08821571618318558,
0.04205003380775452,
-0.09805053472518921,
-0.15679723024368286,
-0.012009876780211926,
-0.1731291562318802,
-0.18308719992637634,
0.20769865810871124,
0.21145321428775787,
-0.019673381000757217,
-0.06261829286813736,
-0.1074632927775383,
0.021213172003626823,
-0.227060467004776,
0.4213907718658447,
-0.17583951354026794,
0.10532881319522858,
0.1649433821439743,
-0.32669204473495483,
-0.24519531428813934,
-0.33217853307724,
0.010239820927381516,
-0.10479643940925598,
0.09872296452522278,
0.058075547218322754,
-0.27309316396713257,
-0.23543034493923187,
-0.3440702557563782,
-0.051107257604599,
0.12254767119884491,
0.19253979623317719,
-0.3788946270942688,
-0.24618402123451233,
-0.429314523935318,
0.24504901468753815,
0.23704703152179718,
0.29587897658348083,
0.09525991976261139,
-0.25293001532554626,
-0.12512895464897156,
-0.04681605100631714,
-0.4270837604999542,
-0.027220657095313072,
0.056976523250341415,
0.09050630033016205,
0.4119313359260559,
-0.01761341281235218,
0.21728402376174927,
-0.14454226195812225,
0.2349567413330078,
-0.01471563521772623,
-0.1307843029499054,
-0.27344727516174316,
-0.07487048208713531,
0.06547822803258896,
0.027492964640259743,
-0.08345077186822891,
-0.4084404408931732,
-0.4358600974082947,
-0.09080750495195389,
-0.13982710242271423,
0.11480055004358292,
0.27434924244880676,
-0.2652910053730011,
-0.22256498038768768,
0.4537913203239441,
0.2558644413948059,
-0.4105691611766815,
-0.15483669936656952,
0.13098874688148499,
0.023943858221173286,
-0.37858420610427856,
-0.08037504553794861,
0.17691223323345184,
-0.27380457520484924,
0.0006286426796577871,
0.2499280422925949,
0.500044047832489,
0.08888431638479233,
0.34116238355636597,
0.021382542327046394,
-0.043869879096746445,
0.029784079641103745,
0.4928562045097351,
0.0758257508277893,
-0.05770222097635269,
0.07571129500865936,
0.03761996328830719,
0.3419996201992035,
0.15529073774814606,
-0.1432340145111084,
-0.21440988779067993,
-0.1739269495010376,
0.2655177116394043,
0.05962209403514862,
-0.02968376688659191,
-0.23670826852321625,
0.15231339633464813,
-0.11745443940162659,
0.055479276925325394,
-0.22421878576278687,
-0.10998192429542542,
0.33668607473373413,
0.10944920033216476,
0.15250268578529358,
-0.20116601884365082,
0.022955114021897316,
0.06465048342943192,
0.28430330753326416,
-0.0018076435662806034,
0.35473477840423584,
0.31899741291999817,
-0.198091521859169,
-0.3559606373310089,
-0.14619587361812592,
-0.0530385784804821,
-0.25538334250450134,
-0.0901198759675026,
0.5064196586608887,
0.18946966528892517,
-0.044274330139160156,
-0.38187089562416077,
-0.06871597468852997,
-0.18411120772361755,
-0.07069326192140579,
-0.13691926002502441,
-0.027269240468740463,
-0.0856083557009697,
-0.21917128562927246,
0.05853855237364769,
0.22682783007621765,
0.01667330414056778,
-0.001467700581997633,
-0.1097162663936615,
0.08858931809663773,
0.35983991622924805,
0.030881570652127266,
0.15474826097488403,
0.32079771161079407,
0.0025783677119761705,
-0.2972359359264374,
0.05879939720034599,
0.09718482196331024,
0.1835450977087021,
0.11289654672145844,
0.0701831579208374,
0.022493261843919754,
0.0454249307513237,
0.01889181137084961,
0.43077966570854187,
0.042172983288764954,
-0.15800391137599945,
-0.2567109763622284,
0.06975188851356506,
0.23749496042728424,
0.07666268944740295,
0.20630037784576416,
0.3200271725654602,
-0.13687212765216827,
0.24918654561042786,
0.14580127596855164,
-0.14486660063266754,
-0.008923321962356567,
0.001215728814713657,
0.20902954041957855,
-0.2858956456184387,
0.026695694774389267,
0.008835593238472939,
-0.11868301033973694,
0.10741326957941055,
0.14767448604106903,
-0.2554628551006317,
0.20166823267936707,
0.08297185599803925,
0.1460612416267395,
0.07443295419216156,
0.29946890473365784,
0.04657858982682228,
-0.12388356775045395,
-0.17753222584724426,
-0.2696591019630432,
-0.24495956301689148,
-0.01840449869632721,
0.16364413499832153,
-0.15979938209056854,
-0.36431390047073364,
0.05386636033654213,
0.2841508984565735,
0.22913293540477753,
-0.16900041699409485,
-0.05660158023238182,
-0.10233591496944427,
0.33423706889152527,
-0.06460874527692795,
-0.15974286198616028,
0.31356021761894226,
0.3615257740020752,
-0.027734797447919846,
-0.5653034448623657,
0.3114122450351715,
0.24737431108951569,
0.3447422385215759,
0.29976963996887207,
0.1836315393447876,
-0.3672662377357483,
0.0658542662858963,
0.2039545178413391,
-0.17363934218883514,
0.17615622282028198,
-0.41709765791893005,
-0.02825559489428997,
-0.12656421959400177,
0.13782036304473877,
-0.11594872921705246,
-0.10886348783969879,
0.16289007663726807,
0.44749072194099426,
-0.2163214385509491,
-0.002815910615026951,
-0.16737870872020721,
0.3701743483543396,
-0.09589295834302902,
-0.0623357929289341,
0.03832106664776802,
0.038359809666872025,
-0.14444869756698608,
0.07409414649009705,
0.23432700335979462,
0.19849319756031036,
-0.23416192829608917,
0.0924476608633995,
-0.1405387967824936,
0.1099698394536972,
0.09165988862514496,
0.04927518218755722,
-0.150303915143013,
0.23856022953987122,
0.13964694738388062,
0.37641391158103943,
0.2972537577152252,
-0.4478726387023926,
0.048000797629356384,
0.19613607227802277,
-0.3130631148815155,
0.17193885147571564,
0.24518385529518127,
-0.18223866820335388,
0.1401636004447937,
0.10416020452976227,
0.3429386615753174,
0.041148774325847626,
-0.2783437967300415,
-0.12616564333438873,
-0.5491719841957092
] |
https://github.com/huggingface/datasets/issues/3135
|
Make inspect.get_dataset_config_names always return a non-empty list of configs
|
Hi @severo, I guess this issue requests not only to be able to access the configuration name (by using `inspect.get_dataset_config_names`), but the configuration itself as well (I mean you use the name to get the configuration afterwards, maybe using `builder_cls.builder_configs`), is this right?
|
**Is your feature request related to a problem? Please describe.**
Currently, some datasets have a configuration, while others don't. It would be simpler for the user to always have configuration names to refer to
**Describe the solution you'd like**
In that sense inspect.get_dataset_config_names should always return at least one configuration name, be it `default` or `Check___region_1` (for community datasets like `Check/region_1`).
https://github.com/huggingface/datasets/blob/c5747a5e1dde2670b7f2ca6e79e2ffd99dff85af/src/datasets/inspect.py#L161
| 43 |
Make inspect.get_dataset_config_names always return a non-empty list of configs
|
[
-0.45350271463394165,
0.16631533205509186,
-0.23985488712787628,
0.12245305627584457,
0.24777114391326904,
0.10002037137746811,
0.237759068608284,
0.48764288425445557,
0.26419293880462646,
0.20124845206737518,
-0.061975862830877304,
0.44736820459365845,
-0.14056704938411713,
0.1489565372467041,
-0.026522714644670486,
0.48707303404808044,
-0.24685360491275787,
0.46882641315460205,
-0.2976653575897217,
-0.16174110770225525,
-0.16876015067100525,
-0.019702404737472534,
-0.03995795175433159,
-0.32115891575813293,
0.021391520276665688,
0.022608794271945953,
0.30886977910995483,
0.13864745199680328,
-0.018942514434456825,
-0.3666549324989319,
0.09326813369989395,
0.1292276233434677,
-0.4480474591255188,
-0.05805835872888565,
-0.00010894051229115576,
0.33994749188423157,
0.12213166803121567,
-0.08978509157896042,
-0.5700482726097107,
0.05009293183684349,
-0.273371160030365,
-0.21792668104171753,
0.10694770514965057,
-0.03330601006746292,
-0.15667077898979187,
-0.3289972245693207,
0.007629698608070612,
-0.26242774724960327,
-0.1719975471496582,
0.2146369069814682,
0.16437262296676636,
0.17658981680870056,
-0.17756029963493347,
-0.15109366178512573,
0.11891656368970871,
0.07951294630765915,
-0.05637684836983681,
-0.2698880732059479,
-0.15821599960327148,
0.0822388157248497,
0.06285638362169266,
0.2971099019050598,
-0.18159252405166626,
0.0013646449660882354,
-0.055147476494312286,
-0.17930039763450623,
-0.17802686989307404,
-0.15891969203948975,
0.4902121126651764,
0.29160434007644653,
0.3032689690589905,
-0.26181483268737793,
-0.08972815424203873,
-0.4086460769176483,
0.07600287348031998,
-0.013596024364233017,
0.15737445652484894,
-0.044404979795217514,
-0.21557725965976715,
0.1827286034822464,
-0.034596577286720276,
-0.37143436074256897,
-0.06389284878969193,
-0.14034335315227509,
-0.12798386812210083,
0.2971957325935364,
0.07463117688894272,
-0.09760773926973343,
0.24742554128170013,
-0.034753333777189255,
0.33221688866615295,
-0.406048446893692,
-0.24222137033939362,
-0.03427772596478462,
-0.234992116689682,
-0.10022074729204178,
0.2691899836063385,
-0.04496191442012787,
0.25850141048431396,
0.44542136788368225,
0.09105585515499115,
0.16370393335819244,
0.10357792675495148,
-0.0764479786157608,
-0.0035112949553877115,
-0.0944882482290268,
0.5059954524040222,
0.4540858864784241,
-0.09166543185710907,
-0.11774495244026184,
0.22641371190547943,
0.10426822304725647,
-0.0400715135037899,
0.06649806350469589,
-0.2509586215019226,
0.0868648961186409,
0.3048396408557892,
-0.032446227967739105,
-0.210384801030159,
0.3488929867744446,
0.07799132168292999,
-0.018057439476251602,
0.08001987636089325,
0.5387001037597656,
-0.036675892770290375,
0.16662345826625824,
0.07941127568483353,
-0.052152786403894424,
-0.06276839226484299,
-0.17989252507686615,
-0.26450955867767334,
-0.18604040145874023,
0.2151213139295578,
-0.060093823820352554,
0.21520431339740753,
0.10057587176561356,
0.3520325720310211,
0.02439267933368683,
-0.1774289757013321,
0.09004265815019608,
0.3167569637298584,
-0.00007135716441553086,
0.4707813560962677,
0.4307720363140106,
0.1072312518954277,
-0.1239100769162178,
0.24469001591205597,
-0.4190509617328644,
-0.3205208480358124,
0.21486420929431915,
0.06371322274208069,
-0.2550634443759918,
0.14752261340618134,
0.23378963768482208,
-0.2185959666967392,
0.14088086783885956,
0.3748665750026703,
0.2209390103816986,
-0.18832097947597504,
0.19096848368644714,
-0.06736209243535995,
0.06228538975119591,
0.285409539937973,
0.01142788864672184,
0.2590312659740448,
0.44717156887054443,
-0.43651634454727173,
-0.17874152958393097,
0.19446371495723724,
-0.26409170031547546,
-0.3301105499267578,
-0.32626646757125854,
-0.12136644870042801,
0.09491921216249466,
-0.28843748569488525,
-0.005258851684629917,
0.5097482204437256,
-0.16164980828762054,
0.037478867918252945,
0.16045357286930084,
-0.03270259499549866,
-0.07370392978191376,
0.1951676905155182,
0.011178449727594852,
-0.053875599056482315,
0.2333996742963791,
-0.010989914648234844,
-0.1455618143081665,
-0.045313119888305664,
-0.08602146804332733,
-0.10354883968830109,
-0.16828687489032745,
0.017988447099924088,
-0.04272644966840744,
0.02517045848071575,
0.21673646569252014,
-0.12878690659999847,
-0.2006591558456421,
0.3776687979698181,
-0.18955554068088531,
-0.2524159252643585,
0.456608384847641,
0.3062525689601898,
0.13240830600261688,
-0.06507376581430435,
0.05510431528091431,
-0.7192606925964355,
0.0360272191464901,
0.17722655832767487,
-0.0489734522998333,
0.015787817537784576,
-0.2634783983230591,
-0.09456652402877808,
0.17503292858600616,
-0.051468539983034134,
-0.13437114655971527,
0.23836715519428253,
0.6427186131477356,
-0.1981508433818817,
-0.06923975050449371,
-0.23234674334526062,
0.08869647234678268,
-0.3002593219280243,
0.05074732378125191,
-0.4062843322753906,
0.12071472406387329,
0.2754617929458618,
0.13357990980148315,
-0.08903199434280396,
-0.07751674950122833,
0.04401863366365433,
-0.011612065136432648,
0.2569020390510559,
0.07332958281040192,
0.34399914741516113,
-0.26813969016075134,
0.22704337537288666,
0.16394944489002228,
-0.15458877384662628,
0.07482965290546417,
-0.029258862137794495,
-0.08246243000030518,
-0.10752680897712708,
0.034829892218112946,
-0.2807536721229553,
0.28257253766059875,
0.15915489196777344,
0.3457951843738556,
-0.15620718896389008,
-0.06240806356072426,
0.3246000409126282,
-0.1259695589542389,
-0.34044894576072693,
-0.3688529133796692,
-0.1070726066827774,
0.2865798771381378,
0.33896002173423767,
0.20331545174121857,
-0.397468239068985,
0.08253112435340881,
0.33857300877571106,
0.1356750726699829,
-0.008764197118580341,
-0.2777554392814636,
0.08496899902820587,
0.016364462673664093,
0.03034518100321293,
0.18430127203464508,
0.09592283517122269,
0.3691166341304779,
0.05296551436185837,
0.10555291175842285,
-0.3309178054332733,
0.028313875198364258,
0.3126165568828583,
-0.004239505156874657,
0.14932963252067566,
0.46065470576286316,
-0.0530611053109169,
-0.41082924604415894,
-0.4017515480518341,
-0.30067047476768494,
0.003522372106090188,
0.05601533502340317,
-0.2973977327346802,
-0.050940290093421936,
-0.2071194052696228,
0.038091547787189484,
0.018485546112060547,
-0.04410911351442337,
-0.1624775528907776,
-0.06185779348015785,
0.06957341730594635,
-0.01760062761604786,
-0.41186946630477905,
0.5201969146728516,
-0.4608231782913208,
0.34871503710746765,
0.3567473888397217,
-0.4788186550140381,
-0.09419059753417969,
0.043770309537649155,
-0.06352967023849487,
0.04736435040831566,
-0.05144594982266426,
-0.20466889441013336,
0.2275179624557495,
-0.15870407223701477,
-0.24229148030281067,
-0.17591635882854462,
-0.14542096853256226,
0.43865346908569336,
0.08913784474134445,
0.13174180686473846,
0.4155654311180115,
0.20414040982723236,
0.24067072570323944,
-0.13651250302791595,
0.10168065130710602,
0.3789271414279938,
-0.1372307687997818,
-0.06444134563207626,
0.17663469910621643,
0.10196364670991898,
-0.21731045842170715,
-0.3889075815677643,
0.2923368215560913,
-0.2185755968093872,
0.03480364754796028,
0.13560141623020172,
0.16771729290485382,
0.5271356105804443,
0.23862743377685547,
-0.05851100757718086,
-0.3568491041660309,
0.18618594110012054,
-0.11271939426660538,
-0.2481478750705719,
0.23542307317256927,
0.07091554999351501,
0.05948052555322647,
-0.06865110248327255,
-0.4875281751155853,
0.1724182665348053,
0.23238427937030792,
-0.5034920573234558,
-0.11312346905469894,
-0.021481245756149292,
0.0544743537902832,
-0.13660992681980133,
0.015487023629248142,
0.16839879751205444,
0.30780842900276184,
-0.1392158418893814,
-0.2719883620738983,
-0.4021913707256317,
0.3127717077732086,
-0.243148535490036,
-0.006912069395184517,
-0.08265911787748337,
-0.14058054983615875,
-0.11119625717401505,
0.13310013711452484,
0.03810124844312668,
0.007887307554483414,
-0.18865303695201874,
-0.39500224590301514,
0.8776752352714539,
0.04292358458042145,
-0.21283943951129913,
-0.31691235303878784,
0.4085274934768677,
-0.16697584092617035,
0.21204450726509094,
-0.25906136631965637,
0.018091388046741486,
-0.010162271559238434,
0.3742249310016632,
-0.08265506476163864,
-0.18471866846084595,
0.2687191367149353,
-0.19371995329856873,
-0.02669447846710682,
0.23159687221050262,
0.4882831871509552,
-0.16734716296195984,
0.23325631022453308,
-0.16593274474143982,
-0.0961732342839241,
-0.2580954432487488,
-0.16756998002529144,
-0.45058473944664,
-0.06895451247692108,
-0.05576179921627045,
0.03610149025917053,
-0.19195355474948883,
0.22215206921100616,
0.13109220564365387,
-0.18393844366073608,
-0.13557912409305573,
0.103302963078022,
0.570972204208374,
-0.09290596097707748,
0.10096236318349838,
0.5131367444992065,
0.15488767623901367,
0.0247868113219738,
-0.021074926480650902,
-0.19496312737464905,
-0.12722282111644745,
0.18220457434654236,
0.23632079362869263,
-0.41469666361808777,
-0.18717998266220093,
0.1347130984067917,
0.13729611039161682,
-0.12376482039690018,
0.30607426166534424,
0.02103922888636589,
-0.24963806569576263,
0.08698966354131699,
0.0720621794462204,
0.001976883504539728,
0.1453271359205246,
0.022320615127682686,
-0.10515323281288147,
-0.1433373987674713,
-0.14680878818035126,
0.15627264976501465,
0.04918687790632248,
0.3446131646633148,
0.20563064515590668,
0.23607546091079712,
-0.09223534166812897,
0.28082457184791565,
0.221556156873703,
0.40803593397140503,
-0.2510351240634918,
-0.313865602016449,
0.135239839553833,
-0.15656036138534546,
0.26517626643180847,
0.3229653239250183,
-0.10331942141056061,
-0.08483445644378662,
0.15767575800418854,
0.16570259630680084,
-0.04821333661675453,
0.27954843640327454,
-0.002943035215139389,
-0.06941409409046173,
-0.09318475425243378,
-0.5302278995513916,
0.24432097375392914,
-0.2105972170829773,
0.11085585504770279,
0.4596121609210968,
-0.13884344696998596,
-0.35945555567741394,
-0.0036994051188230515,
0.2616092264652252,
0.40713149309158325,
0.2772051692008972,
-0.07538389414548874,
0.43730244040489197,
-0.18147458136081696,
0.22958123683929443,
-0.3371114432811737,
0.19621281325817108,
-0.34819331765174866,
-0.16937319934368134,
0.08190055191516876,
-0.2206466794013977,
0.1265472173690796,
0.34879034757614136,
-0.03510892391204834,
0.016790958121418953,
0.17524422705173492,
0.14411401748657227,
0.07445073127746582,
0.09547414630651474,
-0.30421212315559387,
-0.04397321119904518,
-0.09891095757484436,
0.12179671227931976,
-0.055528849363327026,
-0.06871066242456436,
-0.0761139839887619,
0.0324772410094738,
0.268978089094162,
-0.2476959228515625,
0.09307794272899628,
0.07759962975978851,
-0.33666056394577026,
-0.08324062079191208,
0.12484986335039139,
-0.13513819873332977,
-0.41321682929992676,
-0.02422976866364479,
-0.2342340499162674,
0.42119213938713074,
-0.07087094336748123,
0.14130543172359467,
0.15380172431468964,
0.18905048072338104,
-0.09741103649139404,
-0.06359869241714478,
0.18462321162223816,
0.16174009442329407,
-0.08684239536523819,
-0.13928848505020142,
-0.23953725397586823,
-0.002631236333400011,
0.2423917055130005,
-0.07286496460437775,
0.23175732791423798,
-0.3775627613067627,
0.3241478502750397,
0.25305721163749695,
0.2012922316789627,
-0.06071755662560463,
0.142475426197052,
0.0028811683878302574,
-0.18852511048316956,
0.20187152922153473,
0.20283153653144836,
-0.2485509067773819,
-0.07218529284000397,
0.0668707937002182,
0.04176731035113335,
-0.03920450061559677,
0.34086906909942627,
-0.16357660293579102,
-0.15072773396968842,
-0.42948055267333984,
0.21641436219215393,
-0.08857215940952301,
0.08868759870529175,
0.32729899883270264,
-0.0032058865763247013,
-0.37253597378730774,
-0.007045971229672432,
-0.12164473533630371,
0.09442403167486191,
0.14283786714076996,
-0.2037525177001953,
-0.05838847905397415,
-0.057339929044246674,
0.27446824312210083,
-0.018837131559848785,
0.5584211945533752,
-0.07089942693710327,
0.16416306793689728,
-0.11010601371526718,
-0.309381365776062,
-0.3622787594795227,
-0.0817268118262291,
-0.34636595845222473,
0.10113617032766342,
-0.17647798359394073,
0.12060444802045822,
0.09099423140287399,
-0.16434165835380554,
0.20673084259033203,
-0.40071243047714233,
-0.21492424607276917,
-0.2842528522014618,
-0.05562695488333702,
0.04816872999072075,
-0.1972026377916336,
0.4193071722984314,
-0.10650251060724258,
-0.10402432084083557,
-0.12164787203073502,
-0.39953336119651794,
0.11211124807596207,
0.09913917630910873,
0.11854080855846405,
0.19856548309326172,
0.0035097463987767696,
0.062066592276096344,
-0.01539955846965313,
0.024262985214591026,
0.029779231175780296,
-0.0875406414270401,
-0.028449222445487976,
0.17728284001350403,
-0.39416903257369995,
0.0611099898815155,
0.3480294942855835,
0.25927403569221497,
-0.15360316634178162,
-0.062458544969558716,
0.019200973212718964,
-0.039487045258283615,
-0.16223430633544922,
0.2580355405807495,
0.34242016077041626,
0.45818012952804565,
-0.16874215006828308,
0.08251052349805832,
0.2655907869338989,
0.2781793177127838,
-0.3105950653553009,
-0.013311372138559818,
0.1499486118555069,
0.05034807324409485,
0.3480429947376251,
0.31426578760147095,
-0.09258086234331131,
-0.3638535141944885,
0.4448144733905792,
0.12464883178472519,
0.06627862900495529,
-0.1382419317960739,
0.1870042234659195,
0.7354021668434143,
-0.09635921567678452,
0.05600748211145401,
0.2955375611782074,
0.3444656431674957,
0.2622140347957611,
0.2557012736797333,
0.16322553157806396,
0.23711024224758148,
0.04377680644392967,
-0.04009716212749481,
-0.17051176726818085,
-0.5201781988143921,
0.237620010972023,
-0.06176784634590149,
-0.27743059396743774,
0.08650768548250198,
-0.017093582078814507,
-0.06476954370737076,
0.0678616613149643,
0.06286432594060898,
-0.1865318864583969,
0.08009878545999527,
-0.20119716227054596,
-0.11779256165027618,
0.07609516382217407,
-0.14718303084373474,
0.061783988028764725,
0.055109959095716476,
0.41091853380203247,
-0.40145343542099,
-0.11726314574480057,
-0.32609307765960693,
0.01804201863706112,
-0.1267593502998352,
0.4257732033729553,
0.004400866571813822,
-0.3374839723110199,
-0.2769708037376404,
0.21304550766944885,
0.09652496874332428,
0.060497768223285675,
0.15503942966461182,
0.10918433219194412,
0.05191478505730629,
0.0069515518844127655,
0.24771273136138916,
-0.11633992940187454,
-0.06364987790584564,
-0.12079047411680222,
-0.6798061728477478,
-0.04549362510442734,
-0.25212690234184265,
-0.3724362254142761,
0.29414883255958557,
0.3040282428264618,
-0.11140703409910202,
-0.0828859806060791,
0.016948765143752098,
-0.1833147406578064,
-0.13891661167144775,
0.163789302110672,
0.5979571342468262,
-0.05850686505436897,
0.003789275186136365,
-0.16863128542900085,
-0.1615850180387497,
-0.28367936611175537,
0.5536590218544006,
0.3118472397327423,
0.2305958867073059,
0.10472335666418076,
0.13061009347438812,
-0.25472742319107056,
0.011764354072511196,
-0.20205706357955933,
-0.21211227774620056,
0.10739824920892715,
-0.03592480719089508,
-0.26386794447898865,
0.02452908642590046,
0.05298462137579918,
-0.4201774299144745,
0.2528814971446991,
0.40076881647109985,
0.431857168674469,
-0.05663754791021347,
0.15082375705242157,
-0.18587864935398102,
0.2860431373119354,
-0.09104076027870178,
-0.19101451337337494,
-0.2791799008846283,
-0.14856283366680145,
0.263005793094635,
0.14034157991409302,
-0.21868953108787537,
-0.04616270959377289,
0.25364479422569275,
0.18184170126914978,
-0.033380262553691864,
-0.006613654084503651,
0.12974750995635986,
0.13099242746829987,
0.12900817394256592,
-0.026595497503876686,
0.16081756353378296,
-0.07315957546234131,
-0.0947786495089531,
-0.2748902142047882,
-0.045440975576639175,
-0.08702061325311661,
0.07190262526273727,
0.27219700813293457,
-0.241018146276474,
-0.28843656182289124,
0.010084115900099277,
-0.09643233567476273,
-0.028317326679825783,
0.43282100558280945,
0.09866698086261749,
0.014090334996581078,
0.3631823658943176,
-0.06502316147089005,
0.2249816507101059,
-0.1852167844772339,
-0.10609171539545059,
-0.0015766096767038107,
0.022624816745519638,
-0.010465643368661404,
-0.3609037399291992,
0.5355437994003296,
0.262818843126297,
-0.42101505398750305,
-0.32084739208221436,
0.16597774624824524,
-0.04965953901410103,
0.014971073716878891,
-0.23837220668792725,
-0.029611684381961823,
0.46145114302635193,
-0.3602345287799835,
-0.13563714921474457,
-0.10714856535196304,
-0.2511225938796997,
0.18002280592918396,
-0.08898068964481354,
0.03312937170267105,
0.039722882211208344,
-0.1650804579257965,
-0.4056648015975952,
-0.35811710357666016
] |
https://github.com/huggingface/datasets/issues/3135
|
Make inspect.get_dataset_config_names always return a non-empty list of configs
|
Yes, maybe the issue could be reformulated. As a user, I want to avoid having to manage special cases:
- I want to be able to get the names of a dataset's configs, and use them in the rest of the API (get the data, get the split names, etc).
- I don't want to have to manage datasets with named configs (`glue`) differently from datasets without named configs (`acronym_identification`, `Check/region_1`)
|
**Is your feature request related to a problem? Please describe.**
Currently, some datasets have a configuration, while others don't. It would be simpler for the user to always have configuration names to refer to
**Describe the solution you'd like**
In that sense inspect.get_dataset_config_names should always return at least one configuration name, be it `default` or `Check___region_1` (for community datasets like `Check/region_1`).
https://github.com/huggingface/datasets/blob/c5747a5e1dde2670b7f2ca6e79e2ffd99dff85af/src/datasets/inspect.py#L161
| 71 |
Make inspect.get_dataset_config_names always return a non-empty list of configs
|
[
-0.45350271463394165,
0.16631533205509186,
-0.23985488712787628,
0.12245305627584457,
0.24777114391326904,
0.10002037137746811,
0.237759068608284,
0.48764288425445557,
0.26419293880462646,
0.20124845206737518,
-0.061975862830877304,
0.44736820459365845,
-0.14056704938411713,
0.1489565372467041,
-0.026522714644670486,
0.48707303404808044,
-0.24685360491275787,
0.46882641315460205,
-0.2976653575897217,
-0.16174110770225525,
-0.16876015067100525,
-0.019702404737472534,
-0.03995795175433159,
-0.32115891575813293,
0.021391520276665688,
0.022608794271945953,
0.30886977910995483,
0.13864745199680328,
-0.018942514434456825,
-0.3666549324989319,
0.09326813369989395,
0.1292276233434677,
-0.4480474591255188,
-0.05805835872888565,
-0.00010894051229115576,
0.33994749188423157,
0.12213166803121567,
-0.08978509157896042,
-0.5700482726097107,
0.05009293183684349,
-0.273371160030365,
-0.21792668104171753,
0.10694770514965057,
-0.03330601006746292,
-0.15667077898979187,
-0.3289972245693207,
0.007629698608070612,
-0.26242774724960327,
-0.1719975471496582,
0.2146369069814682,
0.16437262296676636,
0.17658981680870056,
-0.17756029963493347,
-0.15109366178512573,
0.11891656368970871,
0.07951294630765915,
-0.05637684836983681,
-0.2698880732059479,
-0.15821599960327148,
0.0822388157248497,
0.06285638362169266,
0.2971099019050598,
-0.18159252405166626,
0.0013646449660882354,
-0.055147476494312286,
-0.17930039763450623,
-0.17802686989307404,
-0.15891969203948975,
0.4902121126651764,
0.29160434007644653,
0.3032689690589905,
-0.26181483268737793,
-0.08972815424203873,
-0.4086460769176483,
0.07600287348031998,
-0.013596024364233017,
0.15737445652484894,
-0.044404979795217514,
-0.21557725965976715,
0.1827286034822464,
-0.034596577286720276,
-0.37143436074256897,
-0.06389284878969193,
-0.14034335315227509,
-0.12798386812210083,
0.2971957325935364,
0.07463117688894272,
-0.09760773926973343,
0.24742554128170013,
-0.034753333777189255,
0.33221688866615295,
-0.406048446893692,
-0.24222137033939362,
-0.03427772596478462,
-0.234992116689682,
-0.10022074729204178,
0.2691899836063385,
-0.04496191442012787,
0.25850141048431396,
0.44542136788368225,
0.09105585515499115,
0.16370393335819244,
0.10357792675495148,
-0.0764479786157608,
-0.0035112949553877115,
-0.0944882482290268,
0.5059954524040222,
0.4540858864784241,
-0.09166543185710907,
-0.11774495244026184,
0.22641371190547943,
0.10426822304725647,
-0.0400715135037899,
0.06649806350469589,
-0.2509586215019226,
0.0868648961186409,
0.3048396408557892,
-0.032446227967739105,
-0.210384801030159,
0.3488929867744446,
0.07799132168292999,
-0.018057439476251602,
0.08001987636089325,
0.5387001037597656,
-0.036675892770290375,
0.16662345826625824,
0.07941127568483353,
-0.052152786403894424,
-0.06276839226484299,
-0.17989252507686615,
-0.26450955867767334,
-0.18604040145874023,
0.2151213139295578,
-0.060093823820352554,
0.21520431339740753,
0.10057587176561356,
0.3520325720310211,
0.02439267933368683,
-0.1774289757013321,
0.09004265815019608,
0.3167569637298584,
-0.00007135716441553086,
0.4707813560962677,
0.4307720363140106,
0.1072312518954277,
-0.1239100769162178,
0.24469001591205597,
-0.4190509617328644,
-0.3205208480358124,
0.21486420929431915,
0.06371322274208069,
-0.2550634443759918,
0.14752261340618134,
0.23378963768482208,
-0.2185959666967392,
0.14088086783885956,
0.3748665750026703,
0.2209390103816986,
-0.18832097947597504,
0.19096848368644714,
-0.06736209243535995,
0.06228538975119591,
0.285409539937973,
0.01142788864672184,
0.2590312659740448,
0.44717156887054443,
-0.43651634454727173,
-0.17874152958393097,
0.19446371495723724,
-0.26409170031547546,
-0.3301105499267578,
-0.32626646757125854,
-0.12136644870042801,
0.09491921216249466,
-0.28843748569488525,
-0.005258851684629917,
0.5097482204437256,
-0.16164980828762054,
0.037478867918252945,
0.16045357286930084,
-0.03270259499549866,
-0.07370392978191376,
0.1951676905155182,
0.011178449727594852,
-0.053875599056482315,
0.2333996742963791,
-0.010989914648234844,
-0.1455618143081665,
-0.045313119888305664,
-0.08602146804332733,
-0.10354883968830109,
-0.16828687489032745,
0.017988447099924088,
-0.04272644966840744,
0.02517045848071575,
0.21673646569252014,
-0.12878690659999847,
-0.2006591558456421,
0.3776687979698181,
-0.18955554068088531,
-0.2524159252643585,
0.456608384847641,
0.3062525689601898,
0.13240830600261688,
-0.06507376581430435,
0.05510431528091431,
-0.7192606925964355,
0.0360272191464901,
0.17722655832767487,
-0.0489734522998333,
0.015787817537784576,
-0.2634783983230591,
-0.09456652402877808,
0.17503292858600616,
-0.051468539983034134,
-0.13437114655971527,
0.23836715519428253,
0.6427186131477356,
-0.1981508433818817,
-0.06923975050449371,
-0.23234674334526062,
0.08869647234678268,
-0.3002593219280243,
0.05074732378125191,
-0.4062843322753906,
0.12071472406387329,
0.2754617929458618,
0.13357990980148315,
-0.08903199434280396,
-0.07751674950122833,
0.04401863366365433,
-0.011612065136432648,
0.2569020390510559,
0.07332958281040192,
0.34399914741516113,
-0.26813969016075134,
0.22704337537288666,
0.16394944489002228,
-0.15458877384662628,
0.07482965290546417,
-0.029258862137794495,
-0.08246243000030518,
-0.10752680897712708,
0.034829892218112946,
-0.2807536721229553,
0.28257253766059875,
0.15915489196777344,
0.3457951843738556,
-0.15620718896389008,
-0.06240806356072426,
0.3246000409126282,
-0.1259695589542389,
-0.34044894576072693,
-0.3688529133796692,
-0.1070726066827774,
0.2865798771381378,
0.33896002173423767,
0.20331545174121857,
-0.397468239068985,
0.08253112435340881,
0.33857300877571106,
0.1356750726699829,
-0.008764197118580341,
-0.2777554392814636,
0.08496899902820587,
0.016364462673664093,
0.03034518100321293,
0.18430127203464508,
0.09592283517122269,
0.3691166341304779,
0.05296551436185837,
0.10555291175842285,
-0.3309178054332733,
0.028313875198364258,
0.3126165568828583,
-0.004239505156874657,
0.14932963252067566,
0.46065470576286316,
-0.0530611053109169,
-0.41082924604415894,
-0.4017515480518341,
-0.30067047476768494,
0.003522372106090188,
0.05601533502340317,
-0.2973977327346802,
-0.050940290093421936,
-0.2071194052696228,
0.038091547787189484,
0.018485546112060547,
-0.04410911351442337,
-0.1624775528907776,
-0.06185779348015785,
0.06957341730594635,
-0.01760062761604786,
-0.41186946630477905,
0.5201969146728516,
-0.4608231782913208,
0.34871503710746765,
0.3567473888397217,
-0.4788186550140381,
-0.09419059753417969,
0.043770309537649155,
-0.06352967023849487,
0.04736435040831566,
-0.05144594982266426,
-0.20466889441013336,
0.2275179624557495,
-0.15870407223701477,
-0.24229148030281067,
-0.17591635882854462,
-0.14542096853256226,
0.43865346908569336,
0.08913784474134445,
0.13174180686473846,
0.4155654311180115,
0.20414040982723236,
0.24067072570323944,
-0.13651250302791595,
0.10168065130710602,
0.3789271414279938,
-0.1372307687997818,
-0.06444134563207626,
0.17663469910621643,
0.10196364670991898,
-0.21731045842170715,
-0.3889075815677643,
0.2923368215560913,
-0.2185755968093872,
0.03480364754796028,
0.13560141623020172,
0.16771729290485382,
0.5271356105804443,
0.23862743377685547,
-0.05851100757718086,
-0.3568491041660309,
0.18618594110012054,
-0.11271939426660538,
-0.2481478750705719,
0.23542307317256927,
0.07091554999351501,
0.05948052555322647,
-0.06865110248327255,
-0.4875281751155853,
0.1724182665348053,
0.23238427937030792,
-0.5034920573234558,
-0.11312346905469894,
-0.021481245756149292,
0.0544743537902832,
-0.13660992681980133,
0.015487023629248142,
0.16839879751205444,
0.30780842900276184,
-0.1392158418893814,
-0.2719883620738983,
-0.4021913707256317,
0.3127717077732086,
-0.243148535490036,
-0.006912069395184517,
-0.08265911787748337,
-0.14058054983615875,
-0.11119625717401505,
0.13310013711452484,
0.03810124844312668,
0.007887307554483414,
-0.18865303695201874,
-0.39500224590301514,
0.8776752352714539,
0.04292358458042145,
-0.21283943951129913,
-0.31691235303878784,
0.4085274934768677,
-0.16697584092617035,
0.21204450726509094,
-0.25906136631965637,
0.018091388046741486,
-0.010162271559238434,
0.3742249310016632,
-0.08265506476163864,
-0.18471866846084595,
0.2687191367149353,
-0.19371995329856873,
-0.02669447846710682,
0.23159687221050262,
0.4882831871509552,
-0.16734716296195984,
0.23325631022453308,
-0.16593274474143982,
-0.0961732342839241,
-0.2580954432487488,
-0.16756998002529144,
-0.45058473944664,
-0.06895451247692108,
-0.05576179921627045,
0.03610149025917053,
-0.19195355474948883,
0.22215206921100616,
0.13109220564365387,
-0.18393844366073608,
-0.13557912409305573,
0.103302963078022,
0.570972204208374,
-0.09290596097707748,
0.10096236318349838,
0.5131367444992065,
0.15488767623901367,
0.0247868113219738,
-0.021074926480650902,
-0.19496312737464905,
-0.12722282111644745,
0.18220457434654236,
0.23632079362869263,
-0.41469666361808777,
-0.18717998266220093,
0.1347130984067917,
0.13729611039161682,
-0.12376482039690018,
0.30607426166534424,
0.02103922888636589,
-0.24963806569576263,
0.08698966354131699,
0.0720621794462204,
0.001976883504539728,
0.1453271359205246,
0.022320615127682686,
-0.10515323281288147,
-0.1433373987674713,
-0.14680878818035126,
0.15627264976501465,
0.04918687790632248,
0.3446131646633148,
0.20563064515590668,
0.23607546091079712,
-0.09223534166812897,
0.28082457184791565,
0.221556156873703,
0.40803593397140503,
-0.2510351240634918,
-0.313865602016449,
0.135239839553833,
-0.15656036138534546,
0.26517626643180847,
0.3229653239250183,
-0.10331942141056061,
-0.08483445644378662,
0.15767575800418854,
0.16570259630680084,
-0.04821333661675453,
0.27954843640327454,
-0.002943035215139389,
-0.06941409409046173,
-0.09318475425243378,
-0.5302278995513916,
0.24432097375392914,
-0.2105972170829773,
0.11085585504770279,
0.4596121609210968,
-0.13884344696998596,
-0.35945555567741394,
-0.0036994051188230515,
0.2616092264652252,
0.40713149309158325,
0.2772051692008972,
-0.07538389414548874,
0.43730244040489197,
-0.18147458136081696,
0.22958123683929443,
-0.3371114432811737,
0.19621281325817108,
-0.34819331765174866,
-0.16937319934368134,
0.08190055191516876,
-0.2206466794013977,
0.1265472173690796,
0.34879034757614136,
-0.03510892391204834,
0.016790958121418953,
0.17524422705173492,
0.14411401748657227,
0.07445073127746582,
0.09547414630651474,
-0.30421212315559387,
-0.04397321119904518,
-0.09891095757484436,
0.12179671227931976,
-0.055528849363327026,
-0.06871066242456436,
-0.0761139839887619,
0.0324772410094738,
0.268978089094162,
-0.2476959228515625,
0.09307794272899628,
0.07759962975978851,
-0.33666056394577026,
-0.08324062079191208,
0.12484986335039139,
-0.13513819873332977,
-0.41321682929992676,
-0.02422976866364479,
-0.2342340499162674,
0.42119213938713074,
-0.07087094336748123,
0.14130543172359467,
0.15380172431468964,
0.18905048072338104,
-0.09741103649139404,
-0.06359869241714478,
0.18462321162223816,
0.16174009442329407,
-0.08684239536523819,
-0.13928848505020142,
-0.23953725397586823,
-0.002631236333400011,
0.2423917055130005,
-0.07286496460437775,
0.23175732791423798,
-0.3775627613067627,
0.3241478502750397,
0.25305721163749695,
0.2012922316789627,
-0.06071755662560463,
0.142475426197052,
0.0028811683878302574,
-0.18852511048316956,
0.20187152922153473,
0.20283153653144836,
-0.2485509067773819,
-0.07218529284000397,
0.0668707937002182,
0.04176731035113335,
-0.03920450061559677,
0.34086906909942627,
-0.16357660293579102,
-0.15072773396968842,
-0.42948055267333984,
0.21641436219215393,
-0.08857215940952301,
0.08868759870529175,
0.32729899883270264,
-0.0032058865763247013,
-0.37253597378730774,
-0.007045971229672432,
-0.12164473533630371,
0.09442403167486191,
0.14283786714076996,
-0.2037525177001953,
-0.05838847905397415,
-0.057339929044246674,
0.27446824312210083,
-0.018837131559848785,
0.5584211945533752,
-0.07089942693710327,
0.16416306793689728,
-0.11010601371526718,
-0.309381365776062,
-0.3622787594795227,
-0.0817268118262291,
-0.34636595845222473,
0.10113617032766342,
-0.17647798359394073,
0.12060444802045822,
0.09099423140287399,
-0.16434165835380554,
0.20673084259033203,
-0.40071243047714233,
-0.21492424607276917,
-0.2842528522014618,
-0.05562695488333702,
0.04816872999072075,
-0.1972026377916336,
0.4193071722984314,
-0.10650251060724258,
-0.10402432084083557,
-0.12164787203073502,
-0.39953336119651794,
0.11211124807596207,
0.09913917630910873,
0.11854080855846405,
0.19856548309326172,
0.0035097463987767696,
0.062066592276096344,
-0.01539955846965313,
0.024262985214591026,
0.029779231175780296,
-0.0875406414270401,
-0.028449222445487976,
0.17728284001350403,
-0.39416903257369995,
0.0611099898815155,
0.3480294942855835,
0.25927403569221497,
-0.15360316634178162,
-0.062458544969558716,
0.019200973212718964,
-0.039487045258283615,
-0.16223430633544922,
0.2580355405807495,
0.34242016077041626,
0.45818012952804565,
-0.16874215006828308,
0.08251052349805832,
0.2655907869338989,
0.2781793177127838,
-0.3105950653553009,
-0.013311372138559818,
0.1499486118555069,
0.05034807324409485,
0.3480429947376251,
0.31426578760147095,
-0.09258086234331131,
-0.3638535141944885,
0.4448144733905792,
0.12464883178472519,
0.06627862900495529,
-0.1382419317960739,
0.1870042234659195,
0.7354021668434143,
-0.09635921567678452,
0.05600748211145401,
0.2955375611782074,
0.3444656431674957,
0.2622140347957611,
0.2557012736797333,
0.16322553157806396,
0.23711024224758148,
0.04377680644392967,
-0.04009716212749481,
-0.17051176726818085,
-0.5201781988143921,
0.237620010972023,
-0.06176784634590149,
-0.27743059396743774,
0.08650768548250198,
-0.017093582078814507,
-0.06476954370737076,
0.0678616613149643,
0.06286432594060898,
-0.1865318864583969,
0.08009878545999527,
-0.20119716227054596,
-0.11779256165027618,
0.07609516382217407,
-0.14718303084373474,
0.061783988028764725,
0.055109959095716476,
0.41091853380203247,
-0.40145343542099,
-0.11726314574480057,
-0.32609307765960693,
0.01804201863706112,
-0.1267593502998352,
0.4257732033729553,
0.004400866571813822,
-0.3374839723110199,
-0.2769708037376404,
0.21304550766944885,
0.09652496874332428,
0.060497768223285675,
0.15503942966461182,
0.10918433219194412,
0.05191478505730629,
0.0069515518844127655,
0.24771273136138916,
-0.11633992940187454,
-0.06364987790584564,
-0.12079047411680222,
-0.6798061728477478,
-0.04549362510442734,
-0.25212690234184265,
-0.3724362254142761,
0.29414883255958557,
0.3040282428264618,
-0.11140703409910202,
-0.0828859806060791,
0.016948765143752098,
-0.1833147406578064,
-0.13891661167144775,
0.163789302110672,
0.5979571342468262,
-0.05850686505436897,
0.003789275186136365,
-0.16863128542900085,
-0.1615850180387497,
-0.28367936611175537,
0.5536590218544006,
0.3118472397327423,
0.2305958867073059,
0.10472335666418076,
0.13061009347438812,
-0.25472742319107056,
0.011764354072511196,
-0.20205706357955933,
-0.21211227774620056,
0.10739824920892715,
-0.03592480719089508,
-0.26386794447898865,
0.02452908642590046,
0.05298462137579918,
-0.4201774299144745,
0.2528814971446991,
0.40076881647109985,
0.431857168674469,
-0.05663754791021347,
0.15082375705242157,
-0.18587864935398102,
0.2860431373119354,
-0.09104076027870178,
-0.19101451337337494,
-0.2791799008846283,
-0.14856283366680145,
0.263005793094635,
0.14034157991409302,
-0.21868953108787537,
-0.04616270959377289,
0.25364479422569275,
0.18184170126914978,
-0.033380262553691864,
-0.006613654084503651,
0.12974750995635986,
0.13099242746829987,
0.12900817394256592,
-0.026595497503876686,
0.16081756353378296,
-0.07315957546234131,
-0.0947786495089531,
-0.2748902142047882,
-0.045440975576639175,
-0.08702061325311661,
0.07190262526273727,
0.27219700813293457,
-0.241018146276474,
-0.28843656182289124,
0.010084115900099277,
-0.09643233567476273,
-0.028317326679825783,
0.43282100558280945,
0.09866698086261749,
0.014090334996581078,
0.3631823658943176,
-0.06502316147089005,
0.2249816507101059,
-0.1852167844772339,
-0.10609171539545059,
-0.0015766096767038107,
0.022624816745519638,
-0.010465643368661404,
-0.3609037399291992,
0.5355437994003296,
0.262818843126297,
-0.42101505398750305,
-0.32084739208221436,
0.16597774624824524,
-0.04965953901410103,
0.014971073716878891,
-0.23837220668792725,
-0.029611684381961823,
0.46145114302635193,
-0.3602345287799835,
-0.13563714921474457,
-0.10714856535196304,
-0.2511225938796997,
0.18002280592918396,
-0.08898068964481354,
0.03312937170267105,
0.039722882211208344,
-0.1650804579257965,
-0.4056648015975952,
-0.35811710357666016
] |
https://github.com/huggingface/datasets/issues/3134
|
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
Hi,
Did you try to run the code multiple times (GitHub URLs can be down sometimes for various reasons)? I can access `https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py`, so this code is working without an error on my side.
Additionally, can you please run the `datasets-cli env` command because it seems to me that you are using the `datasets` version different from `1.12.1`?
|
datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ?
| 58 |
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
[
-0.10520761460065842,
-0.3566337525844574,
-0.26646512746810913,
0.028044139966368675,
0.2455897331237793,
-0.03638395294547081,
-0.19981496036052704,
0.2608465850353241,
0.08752495795488358,
0.3726719915866852,
-0.19780975580215454,
0.054957956075668335,
-0.03285195305943489,
0.39216750860214233,
0.14178209006786346,
-0.10429978370666504,
-0.10787612944841385,
-0.02875380776822567,
-0.14157775044441223,
-0.058351218700408936,
-0.07145993411540985,
0.385695219039917,
-0.033697210252285004,
0.23756097257137299,
0.06264947354793549,
-0.02923612669110298,
-0.05653402954339981,
0.17631518840789795,
-0.4330582022666931,
-0.2100653201341629,
0.3370116949081421,
0.09464089572429657,
-0.016959263011813164,
0.42217040061950684,
-0.00010095238394569606,
0.15937139093875885,
0.3235456049442291,
0.004811227787286043,
-0.04882708564400673,
-0.30803877115249634,
-0.0715925395488739,
-0.2474088966846466,
0.08241963386535645,
0.09464855492115021,
-0.22444480657577515,
-0.18096335232257843,
0.02908211201429367,
0.031443752348423004,
0.30403485894203186,
0.34331265091896057,
0.3490753471851349,
0.45534369349479675,
0.22179046273231506,
-0.2962709367275238,
0.053350724279880524,
-0.11303819715976715,
-0.06532014906406403,
0.37502366304397583,
0.26157909631729126,
0.03886505216360092,
-0.007569651119410992,
0.3586105704307556,
0.3443681597709656,
-0.13879984617233276,
0.21470755338668823,
-0.23563142120838165,
0.2655462324619293,
-0.21593427658081055,
0.11637772619724274,
0.11680258065462112,
0.07828404754400253,
-0.057469792664051056,
-0.3265353739261627,
0.12577299773693085,
-0.033106978982686996,
-0.6105457544326782,
0.08539476990699768,
-0.026876823976635933,
-0.055704813450574875,
0.03820626810193062,
-0.33723747730255127,
-0.29534420371055603,
-0.1344202160835266,
-0.11826015263795853,
-0.19425320625305176,
-0.15492701530456543,
-0.33771467208862305,
-0.12165047973394394,
0.22645042836666107,
-0.10138761252164841,
-0.49001920223236084,
0.4279312193393707,
-0.23676258325576782,
0.07510978728532791,
-0.2173524796962738,
-0.10808578133583069,
0.3413977324962616,
0.19781990349292755,
0.3518276810646057,
0.35781362652778625,
-0.0028456782456487417,
-0.051894474774599075,
-0.12527133524417877,
-0.01138843409717083,
-0.03334875404834747,
0.23787672817707062,
-0.027560826390981674,
-0.010971073992550373,
0.319298654794693,
0.4521491527557373,
0.1329779475927353,
-0.049562547355890274,
0.029520170763134956,
-0.4733523428440094,
-0.3376420736312866,
0.10796219110488892,
0.16823288798332214,
-0.41222038865089417,
-0.3837381899356842,
0.10756020992994308,
0.14935719966888428,
0.020572423934936523,
0.06958819180727005,
0.2857632637023926,
-0.1584746092557907,
-0.06935781240463257,
0.004255516454577446,
0.1819152534008026,
-0.2966179847717285,
0.09435110539197922,
-0.40242260694503784,
0.18948301672935486,
-0.29061242938041687,
-0.17883779108524323,
0.04950811341404915,
-0.18891815841197968,
0.3401777148246765,
-0.06055081635713577,
0.19904004037380219,
-0.10042794793844223,
0.06202888861298561,
0.23737956583499908,
-0.25160446763038635,
0.40160614252090454,
-0.012209052219986916,
-0.03521890193223953,
0.10825071483850479,
-0.11743338406085968,
-0.09428030997514725,
-0.27115708589553833,
-0.5134903788566589,
-0.35003337264060974,
0.0750151202082634,
0.30519282817840576,
-0.06046074256300926,
-0.05622474104166031,
-0.10124465823173523,
0.08795584738254547,
-0.24560867249965668,
-0.013037588447332382,
-0.029521923512220383,
0.07430605590343475,
-0.0930316150188446,
-0.10322892665863037,
0.3732300400733948,
0.20584917068481445,
-0.040993787348270416,
-0.14541995525360107,
0.1641288548707962,
-0.31478801369667053,
0.08203836530447006,
0.2852477431297302,
0.09125399589538574,
-0.07041241973638535,
-0.23564419150352478,
-0.2636219263076782,
0.4284752309322357,
-0.5727972984313965,
-0.30397558212280273,
0.039954788982868195,
-0.23299463093280792,
-0.19237203896045685,
0.19437168538570404,
-0.3274851143360138,
-0.0854627788066864,
-0.15714605152606964,
0.27897050976753235,
-0.02288704179227352,
0.02282697707414627,
-0.262654185295105,
-0.049030452966690063,
-0.14964896440505981,
0.09913825988769531,
0.12453417479991913,
0.18682456016540527,
0.044084999710321426,
0.046723511070013046,
-0.3679733872413635,
0.18346989154815674,
0.1834898144006729,
-0.20701515674591064,
0.3566684126853943,
-0.023418979719281197,
0.20128074288368225,
0.04977920651435852,
-0.11615157127380371,
0.14627820253372192,
-0.029499592259526253,
-0.2832503914833069,
0.1397954672574997,
-0.07366915792226791,
-0.0970941111445427,
-0.5573174357414246,
0.024229373782873154,
0.0182819701731205,
-0.38562217354774475,
0.19715029001235962,
-0.04613281041383743,
0.27040281891822815,
0.28017669916152954,
-0.1658095419406891,
0.03311919793486595,
-0.2856922447681427,
0.23792831599712372,
-0.37963613867759705,
-0.052875664085149765,
-0.1829136312007904,
0.03400691971182823,
0.2619437873363495,
0.2398638278245926,
0.07660162448883057,
-0.18021215498447418,
-0.009757584892213345,
0.1319802701473236,
0.037298135459423065,
0.32047411799430847,
0.5408188700675964,
0.270528644323349,
0.3302689492702484,
-0.23076586425304413,
-0.08537763357162476,
0.07088332623243332,
0.038339171558618546,
0.20427192747592926,
-0.06075187772512436,
0.12270601093769073,
-0.22232140600681305,
0.03022465668618679,
0.050999391824007034,
0.25634685158729553,
0.33702394366264343,
0.2303512692451477,
-0.24740572273731232,
0.058656029403209686,
0.42934656143188477,
-0.09668821841478348,
0.3491423726081848,
-0.2344798743724823,
-0.2155253291130066,
-0.030643198639154434,
0.3622743785381317,
-0.046788327395915985,
0.025179432705044746,
0.08436015993356705,
0.1632852554321289,
-0.07341918349266052,
0.026422755792737007,
-0.01677265763282776,
-0.09146613627672195,
0.18567819893360138,
0.17009064555168152,
0.10531139373779297,
-0.06731468439102173,
-0.19764000177383423,
0.0038492565508931875,
-0.03386843204498291,
-0.10823981463909149,
0.15010060369968414,
0.07531189173460007,
-0.13779930770397186,
-0.2211562693119049,
-0.26084503531455994,
-0.25011250376701355,
0.09063898772001266,
0.0055345939472317696,
0.0059827822260558605,
-0.2015400230884552,
0.10444533079862595,
0.2707040309906006,
-0.39339569211006165,
-0.28019532561302185,
-0.3329162001609802,
0.1740989238023758,
-0.08883870393037796,
0.03278085216879845,
0.3055312931537628,
0.1489058881998062,
0.345579594373703,
0.10723576694726944,
0.28991106152534485,
-0.2548505365848541,
-0.09485512226819992,
-0.017982568591833115,
0.2361445128917694,
-0.16741755604743958,
-0.33756449818611145,
0.354837030172348,
-0.4415571987628937,
0.1361125111579895,
-0.12272689491510391,
-0.36137655377388,
0.09159516543149948,
-0.16694150865077972,
0.1402539163827896,
0.42513635754585266,
0.14888526499271393,
-0.08985842019319534,
0.362053781747818,
0.353617787361145,
-0.1250976175069809,
-0.23539212346076965,
-0.03394284099340439,
-0.15403307974338531,
0.05356277897953987,
-0.03915758058428764,
-0.14283333718776703,
-0.2889048457145691,
-0.3263952434062958,
0.4472883641719818,
0.13445472717285156,
-0.04964211955666542,
0.23511265218257904,
0.10630358755588531,
0.15933552384376526,
0.09599927812814713,
0.10442063957452774,
-0.1595175564289093,
-0.5515465140342712,
0.25651347637176514,
-0.4323243498802185,
-0.4424850046634674,
0.0897507444024086,
0.32589560747146606,
0.17584651708602905,
-0.017491338774561882,
-0.41766950488090515,
-0.5006688833236694,
-0.13934248685836792,
0.14848759770393372,
0.13953310251235962,
0.15214529633522034,
0.3417992889881134,
-0.15007564425468445,
-0.20181557536125183,
-0.11273779720067978,
-0.1223241463303566,
-0.18546292185783386,
-0.10236145555973053,
0.1358303278684616,
-0.18551474809646606,
0.33155080676078796,
0.011720573529601097,
0.6068850159645081,
0.26382333040237427,
0.1644515097141266,
0.22081582248210907,
-0.10578719526529312,
0.5123518705368042,
-0.17119534313678741,
-0.22853770852088928,
0.054016437381505966,
0.122702956199646,
-0.04658452793955803,
-0.09940709173679352,
0.2881370186805725,
0.4083961248397827,
-0.23870597779750824,
-0.18472370505332947,
-0.056175537407398224,
-0.03053506277501583,
-0.36276134848594666,
0.16809290647506714,
0.1056174784898758,
0.050199076533317566,
0.09637080132961273,
-0.09292003512382507,
0.08836894482374191,
0.36143967509269714,
0.4342694878578186,
0.06471981853246689,
0.11720111221075058,
-0.23492158949375153,
-0.0931505411863327,
-0.5612886548042297,
0.3119571805000305,
-0.23598910868167877,
-0.040504831820726395,
-0.31670477986335754,
-0.010480783879756927,
0.05488967522978783,
-0.1940946877002716,
0.6354513764381409,
-0.1398560255765915,
0.2266964614391327,
0.06280647963285446,
-0.34125658869743347,
-0.3265874981880188,
0.05669594928622246,
0.00027450398192740977,
0.3390761911869049,
0.1469140499830246,
0.37205496430397034,
-0.16767892241477966,
-0.11775200814008713,
0.2419668287038803,
-0.15970586240291595,
-0.0626145675778389,
0.3407301902770996,
-0.3545937240123749,
-0.4292251467704773,
-0.13113844394683838,
0.21945418417453766,
0.06899548321962357,
0.2646758258342743,
0.17558376491069794,
0.03781438618898392,
0.07727619260549545,
0.015607237815856934,
0.08428054302930832,
0.14530383050441742,
0.042283669114112854,
-0.10853835940361023,
-0.14555993676185608,
0.2564532160758972,
-0.028737802058458328,
-0.1873098611831665,
0.5847259163856506,
-0.09157391637563705,
-0.6690026521682739,
0.3275487720966339,
0.20771554112434387,
0.21737973392009735,
0.38934120535850525,
-0.13114191591739655,
-0.076270692050457,
-0.021875083446502686,
0.27008309960365295,
-0.3583872616291046,
0.08760371059179306,
0.24592430889606476,
0.2546670138835907,
-0.1197521835565567,
-0.2901638448238373,
0.08507366478443146,
0.15148049592971802,
-0.05511418357491493,
0.47125738859176636,
0.33316776156425476,
0.07813415676355362,
-0.03195944428443909,
-0.17202435433864594,
0.8959888815879822,
0.08450363576412201,
0.06707266718149185,
0.1583292931318283,
-0.2922930419445038,
0.3150196969509125,
-0.3556116223335266,
0.12874071300029755,
-0.13018202781677246,
-0.2465168684720993,
0.02155100367963314,
-0.04158935323357582,
0.1423000991344452,
-0.34171274304389954,
0.2426387071609497,
0.3557705283164978,
0.07250384241342545,
0.05178090184926987,
-0.05787782743573189,
0.09000757336616516,
-0.14044347405433655,
0.06487303972244263,
-0.2528652846813202,
0.3162938356399536,
0.12143196910619736,
0.5003266334533691,
-0.06686078757047653,
-0.009713391773402691,
-0.10690931975841522,
-0.2450597882270813,
-0.14268067479133606,
-0.06386087089776993,
0.024445854127407074,
0.2525409460067749,
0.18769820034503937,
-0.3288484215736389,
-0.2530622184276581,
0.28148069977760315,
0.2732752859592438,
0.27132299542427063,
-0.2061777263879776,
0.204217791557312,
-0.2903864085674286,
-0.3199739158153534,
-0.03687966242432594,
0.3138306736946106,
-0.08004003763198853,
-0.2670665979385376,
-0.06297614425420761,
0.08473608642816544,
0.1331501305103302,
-0.0550529807806015,
-0.09709832072257996,
-0.1174020916223526,
-0.09083641320466995,
-0.023426026105880737,
0.22434690594673157,
-0.17294247448444366,
0.06142570450901985,
-0.25356557965278625,
0.23587028682231903,
0.16663555800914764,
-0.17710287868976593,
-0.24708996713161469,
0.11999993026256561,
-0.1489463597536087,
-0.08982197195291519,
0.27254509925842285,
-0.15973569452762604,
-0.05912705883383751,
0.0904514417052269,
0.23339630663394928,
-0.1014159545302391,
-0.35592812299728394,
-0.13454227149486542,
0.2987511157989502,
-0.327711820602417,
0.3614071011543274,
0.04521483555436134,
-0.04173273965716362,
-0.13791725039482117,
0.4319393038749695,
0.26291561126708984,
-0.2642897367477417,
0.20342907309532166,
-0.4921904504299164,
-0.3742845952510834,
0.29478487372398376,
0.00701097771525383,
0.07938358932733536,
-0.02396775223314762,
-0.1514798402786255,
0.1463487148284912,
-0.0747518241405487,
-0.4472401738166809,
-0.08273585885763168,
-0.3252613842487335,
-0.31359270215034485,
0.18961283564567566,
-0.2441224753856659,
0.31492865085601807,
0.13187988102436066,
0.203042134642601,
-0.039360396564006805,
-0.48618409037590027,
-0.2966104745864868,
-0.15156584978103638,
0.03500914201140404,
-0.2721741497516632,
0.17425879836082458,
0.23625747859477997,
0.05071137845516205,
-0.2102842926979065,
0.12360916286706924,
0.10794584453105927,
0.22305777668952942,
0.3208198845386505,
-0.04322539642453194,
-0.14372842013835907,
-0.05338933318853378,
0.08812887221574783,
0.07658158987760544,
0.40579283237457275,
0.10931980609893799,
-0.061759453266859055,
-0.1348838210105896,
0.01313027273863554,
-0.10287756472826004,
-0.08673468232154846,
0.04690142348408699,
0.16286154091358185,
-0.001879827817901969,
0.16568607091903687,
0.0040883589535951614,
0.1243925616145134,
0.04923992604017258,
0.5256220102310181,
0.02308576926589012,
-0.2301255762577057,
0.1573610156774521,
-0.011337069794535637,
0.2661168873310089,
-0.3420408368110657,
-0.014152949675917625,
-0.017325296998023987,
0.1802077442407608,
-0.027651268988847733,
-0.014296820387244225,
0.16820743680000305,
0.0632312148809433,
0.055717334151268005,
0.14351578056812286,
0.2527404725551605,
-0.17053799331188202,
0.16533444821834564,
-0.0325377956032753,
-0.01011453103274107,
-0.03673817962408066,
0.45180872082710266,
0.2731487452983856,
-0.06026581674814224,
0.24990878999233246,
-0.04964287951588631,
0.24676626920700073,
0.08557460457086563,
0.11459755897521973,
0.038895055651664734,
-0.2367248386144638,
-0.043940771371126175,
0.02008500136435032,
-0.12183169275522232,
-0.0781671330332756,
-0.09857309609651566,
0.43283534049987793,
-0.2707478404045105,
-0.08284002542495728,
-0.3949332535266876,
0.24821309745311737,
-0.07722010463476181,
-0.34734076261520386,
-0.014539293013513088,
-0.33769410848617554,
-0.030297407880425453,
-0.02569587342441082,
0.1488276571035385,
-0.016578076407313347,
0.2787100672721863,
-0.17291633784770966,
0.1188245341181755,
-0.21984460949897766,
-0.2984919250011444,
-0.04376846179366112,
0.2936023473739624,
0.01680205762386322,
0.1719825565814972,
0.059656254947185516,
0.020319903269410133,
0.16093124449253082,
0.3458753228187561,
0.393649697303772,
-0.2009923756122589,
-0.08028118312358856,
0.038602665066719055,
-0.166176438331604,
-0.14216162264347076,
-0.0552581287920475,
0.5125475525856018,
0.16758993268013,
-0.10150288045406342,
0.19527465105056763,
0.2552452087402344,
-0.25178489089012146,
0.28979894518852234,
-0.04890817403793335,
0.17470896244049072,
-0.1740897297859192,
0.26933231949806213,
-0.1927187740802765,
0.07744207978248596,
-0.29179486632347107,
0.15193291008472443,
-0.4124905467033386,
-0.18619798123836517,
-0.028222616761922836,
0.038187555968761444,
-0.010581683367490768,
-0.34770941734313965,
0.16909049451351166,
-0.05571291595697403,
0.2779124975204468,
0.4755209982395172,
0.2420458346605301,
-0.03584132716059685,
-0.23741666972637177,
-0.3578600585460663,
0.1934644728899002,
0.05469157546758652,
-0.24906191229820251,
-0.00875229761004448,
0.0820980817079544,
-0.04434790462255478,
0.1656619757413864,
0.19409936666488647,
0.22886577248573303,
0.016261648386716843,
-0.004428678657859564,
-0.23901304602622986,
0.21445250511169434,
-0.18601930141448975,
0.02148490771651268,
0.10173806548118591,
-0.05867907032370567,
0.011021378450095654,
-0.19229573011398315,
0.15008707344532013,
0.023986460641026497,
0.06530692428350449,
-0.10377752035856247,
0.1409660428762436,
0.26579782366752625,
0.06485693156719208,
0.2042703926563263,
0.002504437929019332,
-0.2663758397102356,
-0.26016050577163696,
-0.32451891899108887,
-0.061200257390737534,
0.13718929886817932,
-0.10595497488975525,
-0.07443208992481232,
-0.19409498572349548,
-0.31930768489837646,
-0.12802338600158691,
0.41555091738700867,
0.01362048089504242,
0.007097030524164438,
-0.003272084752097726,
0.1419353187084198,
0.04702112078666687,
-0.13059920072555542,
0.20702044665813446,
0.2865699827671051,
-0.007319840136915445,
0.013487188145518303,
-0.05646466836333275,
-0.3230922520160675,
0.5086897015571594,
-0.2769298851490021,
-0.13909301161766052,
-0.05565759167075157,
0.2836889326572418,
0.41019222140312195,
-0.12832078337669373,
-0.35077065229415894,
0.280404657125473,
0.08403362333774567,
0.09941116720438004,
-0.20649327337741852,
0.43714964389801025,
-0.2823712229728699,
-0.06384380161762238,
-0.027286872267723083,
0.28427061438560486,
-0.012172567658126354,
-0.16876259446144104,
0.19625838100910187,
-0.14583881199359894
] |
https://github.com/huggingface/datasets/issues/3134
|
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
Same issue when running `metric = datasets.load_metric("accuracy")`.
Error info is:
```
metric = datasets.load_metric("accuracy")
Traceback (most recent call last):
File "<ipython-input-2-d25db38b26c5>", line 1, in <module>
metric = datasets.load_metric("accuracy")
File "D:\anaconda3\lib\site-packages\datasets\load.py", line 610, in load_metric
module_path, _ = prepare_module(
File "D:\anaconda3\lib\site-packages\datasets\load.py", line 330, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "D:\anaconda3\lib\site-packages\datasets\utils\file_utils.py", line 288, in cached_path
output_path = get_from_cache(
File "D:\anaconda3\lib\site-packages\datasets\utils\file_utils.py", line 605, in get_from_cache
raise ConnectionError("Couldn't reach {}".format(url))
ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/accuracy/accuracy.py
```
My `datasets-cli env` result is as follows:
- `datasets` version: 1.11.0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 6.0.0
@yananchen1989 did you find a way to solve this?
|
datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ?
| 103 |
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
[
-0.10520761460065842,
-0.3566337525844574,
-0.26646512746810913,
0.028044139966368675,
0.2455897331237793,
-0.03638395294547081,
-0.19981496036052704,
0.2608465850353241,
0.08752495795488358,
0.3726719915866852,
-0.19780975580215454,
0.054957956075668335,
-0.03285195305943489,
0.39216750860214233,
0.14178209006786346,
-0.10429978370666504,
-0.10787612944841385,
-0.02875380776822567,
-0.14157775044441223,
-0.058351218700408936,
-0.07145993411540985,
0.385695219039917,
-0.033697210252285004,
0.23756097257137299,
0.06264947354793549,
-0.02923612669110298,
-0.05653402954339981,
0.17631518840789795,
-0.4330582022666931,
-0.2100653201341629,
0.3370116949081421,
0.09464089572429657,
-0.016959263011813164,
0.42217040061950684,
-0.00010095238394569606,
0.15937139093875885,
0.3235456049442291,
0.004811227787286043,
-0.04882708564400673,
-0.30803877115249634,
-0.0715925395488739,
-0.2474088966846466,
0.08241963386535645,
0.09464855492115021,
-0.22444480657577515,
-0.18096335232257843,
0.02908211201429367,
0.031443752348423004,
0.30403485894203186,
0.34331265091896057,
0.3490753471851349,
0.45534369349479675,
0.22179046273231506,
-0.2962709367275238,
0.053350724279880524,
-0.11303819715976715,
-0.06532014906406403,
0.37502366304397583,
0.26157909631729126,
0.03886505216360092,
-0.007569651119410992,
0.3586105704307556,
0.3443681597709656,
-0.13879984617233276,
0.21470755338668823,
-0.23563142120838165,
0.2655462324619293,
-0.21593427658081055,
0.11637772619724274,
0.11680258065462112,
0.07828404754400253,
-0.057469792664051056,
-0.3265353739261627,
0.12577299773693085,
-0.033106978982686996,
-0.6105457544326782,
0.08539476990699768,
-0.026876823976635933,
-0.055704813450574875,
0.03820626810193062,
-0.33723747730255127,
-0.29534420371055603,
-0.1344202160835266,
-0.11826015263795853,
-0.19425320625305176,
-0.15492701530456543,
-0.33771467208862305,
-0.12165047973394394,
0.22645042836666107,
-0.10138761252164841,
-0.49001920223236084,
0.4279312193393707,
-0.23676258325576782,
0.07510978728532791,
-0.2173524796962738,
-0.10808578133583069,
0.3413977324962616,
0.19781990349292755,
0.3518276810646057,
0.35781362652778625,
-0.0028456782456487417,
-0.051894474774599075,
-0.12527133524417877,
-0.01138843409717083,
-0.03334875404834747,
0.23787672817707062,
-0.027560826390981674,
-0.010971073992550373,
0.319298654794693,
0.4521491527557373,
0.1329779475927353,
-0.049562547355890274,
0.029520170763134956,
-0.4733523428440094,
-0.3376420736312866,
0.10796219110488892,
0.16823288798332214,
-0.41222038865089417,
-0.3837381899356842,
0.10756020992994308,
0.14935719966888428,
0.020572423934936523,
0.06958819180727005,
0.2857632637023926,
-0.1584746092557907,
-0.06935781240463257,
0.004255516454577446,
0.1819152534008026,
-0.2966179847717285,
0.09435110539197922,
-0.40242260694503784,
0.18948301672935486,
-0.29061242938041687,
-0.17883779108524323,
0.04950811341404915,
-0.18891815841197968,
0.3401777148246765,
-0.06055081635713577,
0.19904004037380219,
-0.10042794793844223,
0.06202888861298561,
0.23737956583499908,
-0.25160446763038635,
0.40160614252090454,
-0.012209052219986916,
-0.03521890193223953,
0.10825071483850479,
-0.11743338406085968,
-0.09428030997514725,
-0.27115708589553833,
-0.5134903788566589,
-0.35003337264060974,
0.0750151202082634,
0.30519282817840576,
-0.06046074256300926,
-0.05622474104166031,
-0.10124465823173523,
0.08795584738254547,
-0.24560867249965668,
-0.013037588447332382,
-0.029521923512220383,
0.07430605590343475,
-0.0930316150188446,
-0.10322892665863037,
0.3732300400733948,
0.20584917068481445,
-0.040993787348270416,
-0.14541995525360107,
0.1641288548707962,
-0.31478801369667053,
0.08203836530447006,
0.2852477431297302,
0.09125399589538574,
-0.07041241973638535,
-0.23564419150352478,
-0.2636219263076782,
0.4284752309322357,
-0.5727972984313965,
-0.30397558212280273,
0.039954788982868195,
-0.23299463093280792,
-0.19237203896045685,
0.19437168538570404,
-0.3274851143360138,
-0.0854627788066864,
-0.15714605152606964,
0.27897050976753235,
-0.02288704179227352,
0.02282697707414627,
-0.262654185295105,
-0.049030452966690063,
-0.14964896440505981,
0.09913825988769531,
0.12453417479991913,
0.18682456016540527,
0.044084999710321426,
0.046723511070013046,
-0.3679733872413635,
0.18346989154815674,
0.1834898144006729,
-0.20701515674591064,
0.3566684126853943,
-0.023418979719281197,
0.20128074288368225,
0.04977920651435852,
-0.11615157127380371,
0.14627820253372192,
-0.029499592259526253,
-0.2832503914833069,
0.1397954672574997,
-0.07366915792226791,
-0.0970941111445427,
-0.5573174357414246,
0.024229373782873154,
0.0182819701731205,
-0.38562217354774475,
0.19715029001235962,
-0.04613281041383743,
0.27040281891822815,
0.28017669916152954,
-0.1658095419406891,
0.03311919793486595,
-0.2856922447681427,
0.23792831599712372,
-0.37963613867759705,
-0.052875664085149765,
-0.1829136312007904,
0.03400691971182823,
0.2619437873363495,
0.2398638278245926,
0.07660162448883057,
-0.18021215498447418,
-0.009757584892213345,
0.1319802701473236,
0.037298135459423065,
0.32047411799430847,
0.5408188700675964,
0.270528644323349,
0.3302689492702484,
-0.23076586425304413,
-0.08537763357162476,
0.07088332623243332,
0.038339171558618546,
0.20427192747592926,
-0.06075187772512436,
0.12270601093769073,
-0.22232140600681305,
0.03022465668618679,
0.050999391824007034,
0.25634685158729553,
0.33702394366264343,
0.2303512692451477,
-0.24740572273731232,
0.058656029403209686,
0.42934656143188477,
-0.09668821841478348,
0.3491423726081848,
-0.2344798743724823,
-0.2155253291130066,
-0.030643198639154434,
0.3622743785381317,
-0.046788327395915985,
0.025179432705044746,
0.08436015993356705,
0.1632852554321289,
-0.07341918349266052,
0.026422755792737007,
-0.01677265763282776,
-0.09146613627672195,
0.18567819893360138,
0.17009064555168152,
0.10531139373779297,
-0.06731468439102173,
-0.19764000177383423,
0.0038492565508931875,
-0.03386843204498291,
-0.10823981463909149,
0.15010060369968414,
0.07531189173460007,
-0.13779930770397186,
-0.2211562693119049,
-0.26084503531455994,
-0.25011250376701355,
0.09063898772001266,
0.0055345939472317696,
0.0059827822260558605,
-0.2015400230884552,
0.10444533079862595,
0.2707040309906006,
-0.39339569211006165,
-0.28019532561302185,
-0.3329162001609802,
0.1740989238023758,
-0.08883870393037796,
0.03278085216879845,
0.3055312931537628,
0.1489058881998062,
0.345579594373703,
0.10723576694726944,
0.28991106152534485,
-0.2548505365848541,
-0.09485512226819992,
-0.017982568591833115,
0.2361445128917694,
-0.16741755604743958,
-0.33756449818611145,
0.354837030172348,
-0.4415571987628937,
0.1361125111579895,
-0.12272689491510391,
-0.36137655377388,
0.09159516543149948,
-0.16694150865077972,
0.1402539163827896,
0.42513635754585266,
0.14888526499271393,
-0.08985842019319534,
0.362053781747818,
0.353617787361145,
-0.1250976175069809,
-0.23539212346076965,
-0.03394284099340439,
-0.15403307974338531,
0.05356277897953987,
-0.03915758058428764,
-0.14283333718776703,
-0.2889048457145691,
-0.3263952434062958,
0.4472883641719818,
0.13445472717285156,
-0.04964211955666542,
0.23511265218257904,
0.10630358755588531,
0.15933552384376526,
0.09599927812814713,
0.10442063957452774,
-0.1595175564289093,
-0.5515465140342712,
0.25651347637176514,
-0.4323243498802185,
-0.4424850046634674,
0.0897507444024086,
0.32589560747146606,
0.17584651708602905,
-0.017491338774561882,
-0.41766950488090515,
-0.5006688833236694,
-0.13934248685836792,
0.14848759770393372,
0.13953310251235962,
0.15214529633522034,
0.3417992889881134,
-0.15007564425468445,
-0.20181557536125183,
-0.11273779720067978,
-0.1223241463303566,
-0.18546292185783386,
-0.10236145555973053,
0.1358303278684616,
-0.18551474809646606,
0.33155080676078796,
0.011720573529601097,
0.6068850159645081,
0.26382333040237427,
0.1644515097141266,
0.22081582248210907,
-0.10578719526529312,
0.5123518705368042,
-0.17119534313678741,
-0.22853770852088928,
0.054016437381505966,
0.122702956199646,
-0.04658452793955803,
-0.09940709173679352,
0.2881370186805725,
0.4083961248397827,
-0.23870597779750824,
-0.18472370505332947,
-0.056175537407398224,
-0.03053506277501583,
-0.36276134848594666,
0.16809290647506714,
0.1056174784898758,
0.050199076533317566,
0.09637080132961273,
-0.09292003512382507,
0.08836894482374191,
0.36143967509269714,
0.4342694878578186,
0.06471981853246689,
0.11720111221075058,
-0.23492158949375153,
-0.0931505411863327,
-0.5612886548042297,
0.3119571805000305,
-0.23598910868167877,
-0.040504831820726395,
-0.31670477986335754,
-0.010480783879756927,
0.05488967522978783,
-0.1940946877002716,
0.6354513764381409,
-0.1398560255765915,
0.2266964614391327,
0.06280647963285446,
-0.34125658869743347,
-0.3265874981880188,
0.05669594928622246,
0.00027450398192740977,
0.3390761911869049,
0.1469140499830246,
0.37205496430397034,
-0.16767892241477966,
-0.11775200814008713,
0.2419668287038803,
-0.15970586240291595,
-0.0626145675778389,
0.3407301902770996,
-0.3545937240123749,
-0.4292251467704773,
-0.13113844394683838,
0.21945418417453766,
0.06899548321962357,
0.2646758258342743,
0.17558376491069794,
0.03781438618898392,
0.07727619260549545,
0.015607237815856934,
0.08428054302930832,
0.14530383050441742,
0.042283669114112854,
-0.10853835940361023,
-0.14555993676185608,
0.2564532160758972,
-0.028737802058458328,
-0.1873098611831665,
0.5847259163856506,
-0.09157391637563705,
-0.6690026521682739,
0.3275487720966339,
0.20771554112434387,
0.21737973392009735,
0.38934120535850525,
-0.13114191591739655,
-0.076270692050457,
-0.021875083446502686,
0.27008309960365295,
-0.3583872616291046,
0.08760371059179306,
0.24592430889606476,
0.2546670138835907,
-0.1197521835565567,
-0.2901638448238373,
0.08507366478443146,
0.15148049592971802,
-0.05511418357491493,
0.47125738859176636,
0.33316776156425476,
0.07813415676355362,
-0.03195944428443909,
-0.17202435433864594,
0.8959888815879822,
0.08450363576412201,
0.06707266718149185,
0.1583292931318283,
-0.2922930419445038,
0.3150196969509125,
-0.3556116223335266,
0.12874071300029755,
-0.13018202781677246,
-0.2465168684720993,
0.02155100367963314,
-0.04158935323357582,
0.1423000991344452,
-0.34171274304389954,
0.2426387071609497,
0.3557705283164978,
0.07250384241342545,
0.05178090184926987,
-0.05787782743573189,
0.09000757336616516,
-0.14044347405433655,
0.06487303972244263,
-0.2528652846813202,
0.3162938356399536,
0.12143196910619736,
0.5003266334533691,
-0.06686078757047653,
-0.009713391773402691,
-0.10690931975841522,
-0.2450597882270813,
-0.14268067479133606,
-0.06386087089776993,
0.024445854127407074,
0.2525409460067749,
0.18769820034503937,
-0.3288484215736389,
-0.2530622184276581,
0.28148069977760315,
0.2732752859592438,
0.27132299542427063,
-0.2061777263879776,
0.204217791557312,
-0.2903864085674286,
-0.3199739158153534,
-0.03687966242432594,
0.3138306736946106,
-0.08004003763198853,
-0.2670665979385376,
-0.06297614425420761,
0.08473608642816544,
0.1331501305103302,
-0.0550529807806015,
-0.09709832072257996,
-0.1174020916223526,
-0.09083641320466995,
-0.023426026105880737,
0.22434690594673157,
-0.17294247448444366,
0.06142570450901985,
-0.25356557965278625,
0.23587028682231903,
0.16663555800914764,
-0.17710287868976593,
-0.24708996713161469,
0.11999993026256561,
-0.1489463597536087,
-0.08982197195291519,
0.27254509925842285,
-0.15973569452762604,
-0.05912705883383751,
0.0904514417052269,
0.23339630663394928,
-0.1014159545302391,
-0.35592812299728394,
-0.13454227149486542,
0.2987511157989502,
-0.327711820602417,
0.3614071011543274,
0.04521483555436134,
-0.04173273965716362,
-0.13791725039482117,
0.4319393038749695,
0.26291561126708984,
-0.2642897367477417,
0.20342907309532166,
-0.4921904504299164,
-0.3742845952510834,
0.29478487372398376,
0.00701097771525383,
0.07938358932733536,
-0.02396775223314762,
-0.1514798402786255,
0.1463487148284912,
-0.0747518241405487,
-0.4472401738166809,
-0.08273585885763168,
-0.3252613842487335,
-0.31359270215034485,
0.18961283564567566,
-0.2441224753856659,
0.31492865085601807,
0.13187988102436066,
0.203042134642601,
-0.039360396564006805,
-0.48618409037590027,
-0.2966104745864868,
-0.15156584978103638,
0.03500914201140404,
-0.2721741497516632,
0.17425879836082458,
0.23625747859477997,
0.05071137845516205,
-0.2102842926979065,
0.12360916286706924,
0.10794584453105927,
0.22305777668952942,
0.3208198845386505,
-0.04322539642453194,
-0.14372842013835907,
-0.05338933318853378,
0.08812887221574783,
0.07658158987760544,
0.40579283237457275,
0.10931980609893799,
-0.061759453266859055,
-0.1348838210105896,
0.01313027273863554,
-0.10287756472826004,
-0.08673468232154846,
0.04690142348408699,
0.16286154091358185,
-0.001879827817901969,
0.16568607091903687,
0.0040883589535951614,
0.1243925616145134,
0.04923992604017258,
0.5256220102310181,
0.02308576926589012,
-0.2301255762577057,
0.1573610156774521,
-0.011337069794535637,
0.2661168873310089,
-0.3420408368110657,
-0.014152949675917625,
-0.017325296998023987,
0.1802077442407608,
-0.027651268988847733,
-0.014296820387244225,
0.16820743680000305,
0.0632312148809433,
0.055717334151268005,
0.14351578056812286,
0.2527404725551605,
-0.17053799331188202,
0.16533444821834564,
-0.0325377956032753,
-0.01011453103274107,
-0.03673817962408066,
0.45180872082710266,
0.2731487452983856,
-0.06026581674814224,
0.24990878999233246,
-0.04964287951588631,
0.24676626920700073,
0.08557460457086563,
0.11459755897521973,
0.038895055651664734,
-0.2367248386144638,
-0.043940771371126175,
0.02008500136435032,
-0.12183169275522232,
-0.0781671330332756,
-0.09857309609651566,
0.43283534049987793,
-0.2707478404045105,
-0.08284002542495728,
-0.3949332535266876,
0.24821309745311737,
-0.07722010463476181,
-0.34734076261520386,
-0.014539293013513088,
-0.33769410848617554,
-0.030297407880425453,
-0.02569587342441082,
0.1488276571035385,
-0.016578076407313347,
0.2787100672721863,
-0.17291633784770966,
0.1188245341181755,
-0.21984460949897766,
-0.2984919250011444,
-0.04376846179366112,
0.2936023473739624,
0.01680205762386322,
0.1719825565814972,
0.059656254947185516,
0.020319903269410133,
0.16093124449253082,
0.3458753228187561,
0.393649697303772,
-0.2009923756122589,
-0.08028118312358856,
0.038602665066719055,
-0.166176438331604,
-0.14216162264347076,
-0.0552581287920475,
0.5125475525856018,
0.16758993268013,
-0.10150288045406342,
0.19527465105056763,
0.2552452087402344,
-0.25178489089012146,
0.28979894518852234,
-0.04890817403793335,
0.17470896244049072,
-0.1740897297859192,
0.26933231949806213,
-0.1927187740802765,
0.07744207978248596,
-0.29179486632347107,
0.15193291008472443,
-0.4124905467033386,
-0.18619798123836517,
-0.028222616761922836,
0.038187555968761444,
-0.010581683367490768,
-0.34770941734313965,
0.16909049451351166,
-0.05571291595697403,
0.2779124975204468,
0.4755209982395172,
0.2420458346605301,
-0.03584132716059685,
-0.23741666972637177,
-0.3578600585460663,
0.1934644728899002,
0.05469157546758652,
-0.24906191229820251,
-0.00875229761004448,
0.0820980817079544,
-0.04434790462255478,
0.1656619757413864,
0.19409936666488647,
0.22886577248573303,
0.016261648386716843,
-0.004428678657859564,
-0.23901304602622986,
0.21445250511169434,
-0.18601930141448975,
0.02148490771651268,
0.10173806548118591,
-0.05867907032370567,
0.011021378450095654,
-0.19229573011398315,
0.15008707344532013,
0.023986460641026497,
0.06530692428350449,
-0.10377752035856247,
0.1409660428762436,
0.26579782366752625,
0.06485693156719208,
0.2042703926563263,
0.002504437929019332,
-0.2663758397102356,
-0.26016050577163696,
-0.32451891899108887,
-0.061200257390737534,
0.13718929886817932,
-0.10595497488975525,
-0.07443208992481232,
-0.19409498572349548,
-0.31930768489837646,
-0.12802338600158691,
0.41555091738700867,
0.01362048089504242,
0.007097030524164438,
-0.003272084752097726,
0.1419353187084198,
0.04702112078666687,
-0.13059920072555542,
0.20702044665813446,
0.2865699827671051,
-0.007319840136915445,
0.013487188145518303,
-0.05646466836333275,
-0.3230922520160675,
0.5086897015571594,
-0.2769298851490021,
-0.13909301161766052,
-0.05565759167075157,
0.2836889326572418,
0.41019222140312195,
-0.12832078337669373,
-0.35077065229415894,
0.280404657125473,
0.08403362333774567,
0.09941116720438004,
-0.20649327337741852,
0.43714964389801025,
-0.2823712229728699,
-0.06384380161762238,
-0.027286872267723083,
0.28427061438560486,
-0.012172567658126354,
-0.16876259446144104,
0.19625838100910187,
-0.14583881199359894
] |
https://github.com/huggingface/datasets/issues/3134
|
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
It seems to be able to solve this issue by adding the equivalent `accuracy.py` locally.
change `metric = datasets.load_metric("accuracy")` to `metric = datasets.load_metric(path = "./accuracy.py")`.
Copy `accuracy.py` from browser at [accuracy.py](https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/accuracy/accuracy.py)
|
datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ?
| 31 |
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
[
-0.10520761460065842,
-0.3566337525844574,
-0.26646512746810913,
0.028044139966368675,
0.2455897331237793,
-0.03638395294547081,
-0.19981496036052704,
0.2608465850353241,
0.08752495795488358,
0.3726719915866852,
-0.19780975580215454,
0.054957956075668335,
-0.03285195305943489,
0.39216750860214233,
0.14178209006786346,
-0.10429978370666504,
-0.10787612944841385,
-0.02875380776822567,
-0.14157775044441223,
-0.058351218700408936,
-0.07145993411540985,
0.385695219039917,
-0.033697210252285004,
0.23756097257137299,
0.06264947354793549,
-0.02923612669110298,
-0.05653402954339981,
0.17631518840789795,
-0.4330582022666931,
-0.2100653201341629,
0.3370116949081421,
0.09464089572429657,
-0.016959263011813164,
0.42217040061950684,
-0.00010095238394569606,
0.15937139093875885,
0.3235456049442291,
0.004811227787286043,
-0.04882708564400673,
-0.30803877115249634,
-0.0715925395488739,
-0.2474088966846466,
0.08241963386535645,
0.09464855492115021,
-0.22444480657577515,
-0.18096335232257843,
0.02908211201429367,
0.031443752348423004,
0.30403485894203186,
0.34331265091896057,
0.3490753471851349,
0.45534369349479675,
0.22179046273231506,
-0.2962709367275238,
0.053350724279880524,
-0.11303819715976715,
-0.06532014906406403,
0.37502366304397583,
0.26157909631729126,
0.03886505216360092,
-0.007569651119410992,
0.3586105704307556,
0.3443681597709656,
-0.13879984617233276,
0.21470755338668823,
-0.23563142120838165,
0.2655462324619293,
-0.21593427658081055,
0.11637772619724274,
0.11680258065462112,
0.07828404754400253,
-0.057469792664051056,
-0.3265353739261627,
0.12577299773693085,
-0.033106978982686996,
-0.6105457544326782,
0.08539476990699768,
-0.026876823976635933,
-0.055704813450574875,
0.03820626810193062,
-0.33723747730255127,
-0.29534420371055603,
-0.1344202160835266,
-0.11826015263795853,
-0.19425320625305176,
-0.15492701530456543,
-0.33771467208862305,
-0.12165047973394394,
0.22645042836666107,
-0.10138761252164841,
-0.49001920223236084,
0.4279312193393707,
-0.23676258325576782,
0.07510978728532791,
-0.2173524796962738,
-0.10808578133583069,
0.3413977324962616,
0.19781990349292755,
0.3518276810646057,
0.35781362652778625,
-0.0028456782456487417,
-0.051894474774599075,
-0.12527133524417877,
-0.01138843409717083,
-0.03334875404834747,
0.23787672817707062,
-0.027560826390981674,
-0.010971073992550373,
0.319298654794693,
0.4521491527557373,
0.1329779475927353,
-0.049562547355890274,
0.029520170763134956,
-0.4733523428440094,
-0.3376420736312866,
0.10796219110488892,
0.16823288798332214,
-0.41222038865089417,
-0.3837381899356842,
0.10756020992994308,
0.14935719966888428,
0.020572423934936523,
0.06958819180727005,
0.2857632637023926,
-0.1584746092557907,
-0.06935781240463257,
0.004255516454577446,
0.1819152534008026,
-0.2966179847717285,
0.09435110539197922,
-0.40242260694503784,
0.18948301672935486,
-0.29061242938041687,
-0.17883779108524323,
0.04950811341404915,
-0.18891815841197968,
0.3401777148246765,
-0.06055081635713577,
0.19904004037380219,
-0.10042794793844223,
0.06202888861298561,
0.23737956583499908,
-0.25160446763038635,
0.40160614252090454,
-0.012209052219986916,
-0.03521890193223953,
0.10825071483850479,
-0.11743338406085968,
-0.09428030997514725,
-0.27115708589553833,
-0.5134903788566589,
-0.35003337264060974,
0.0750151202082634,
0.30519282817840576,
-0.06046074256300926,
-0.05622474104166031,
-0.10124465823173523,
0.08795584738254547,
-0.24560867249965668,
-0.013037588447332382,
-0.029521923512220383,
0.07430605590343475,
-0.0930316150188446,
-0.10322892665863037,
0.3732300400733948,
0.20584917068481445,
-0.040993787348270416,
-0.14541995525360107,
0.1641288548707962,
-0.31478801369667053,
0.08203836530447006,
0.2852477431297302,
0.09125399589538574,
-0.07041241973638535,
-0.23564419150352478,
-0.2636219263076782,
0.4284752309322357,
-0.5727972984313965,
-0.30397558212280273,
0.039954788982868195,
-0.23299463093280792,
-0.19237203896045685,
0.19437168538570404,
-0.3274851143360138,
-0.0854627788066864,
-0.15714605152606964,
0.27897050976753235,
-0.02288704179227352,
0.02282697707414627,
-0.262654185295105,
-0.049030452966690063,
-0.14964896440505981,
0.09913825988769531,
0.12453417479991913,
0.18682456016540527,
0.044084999710321426,
0.046723511070013046,
-0.3679733872413635,
0.18346989154815674,
0.1834898144006729,
-0.20701515674591064,
0.3566684126853943,
-0.023418979719281197,
0.20128074288368225,
0.04977920651435852,
-0.11615157127380371,
0.14627820253372192,
-0.029499592259526253,
-0.2832503914833069,
0.1397954672574997,
-0.07366915792226791,
-0.0970941111445427,
-0.5573174357414246,
0.024229373782873154,
0.0182819701731205,
-0.38562217354774475,
0.19715029001235962,
-0.04613281041383743,
0.27040281891822815,
0.28017669916152954,
-0.1658095419406891,
0.03311919793486595,
-0.2856922447681427,
0.23792831599712372,
-0.37963613867759705,
-0.052875664085149765,
-0.1829136312007904,
0.03400691971182823,
0.2619437873363495,
0.2398638278245926,
0.07660162448883057,
-0.18021215498447418,
-0.009757584892213345,
0.1319802701473236,
0.037298135459423065,
0.32047411799430847,
0.5408188700675964,
0.270528644323349,
0.3302689492702484,
-0.23076586425304413,
-0.08537763357162476,
0.07088332623243332,
0.038339171558618546,
0.20427192747592926,
-0.06075187772512436,
0.12270601093769073,
-0.22232140600681305,
0.03022465668618679,
0.050999391824007034,
0.25634685158729553,
0.33702394366264343,
0.2303512692451477,
-0.24740572273731232,
0.058656029403209686,
0.42934656143188477,
-0.09668821841478348,
0.3491423726081848,
-0.2344798743724823,
-0.2155253291130066,
-0.030643198639154434,
0.3622743785381317,
-0.046788327395915985,
0.025179432705044746,
0.08436015993356705,
0.1632852554321289,
-0.07341918349266052,
0.026422755792737007,
-0.01677265763282776,
-0.09146613627672195,
0.18567819893360138,
0.17009064555168152,
0.10531139373779297,
-0.06731468439102173,
-0.19764000177383423,
0.0038492565508931875,
-0.03386843204498291,
-0.10823981463909149,
0.15010060369968414,
0.07531189173460007,
-0.13779930770397186,
-0.2211562693119049,
-0.26084503531455994,
-0.25011250376701355,
0.09063898772001266,
0.0055345939472317696,
0.0059827822260558605,
-0.2015400230884552,
0.10444533079862595,
0.2707040309906006,
-0.39339569211006165,
-0.28019532561302185,
-0.3329162001609802,
0.1740989238023758,
-0.08883870393037796,
0.03278085216879845,
0.3055312931537628,
0.1489058881998062,
0.345579594373703,
0.10723576694726944,
0.28991106152534485,
-0.2548505365848541,
-0.09485512226819992,
-0.017982568591833115,
0.2361445128917694,
-0.16741755604743958,
-0.33756449818611145,
0.354837030172348,
-0.4415571987628937,
0.1361125111579895,
-0.12272689491510391,
-0.36137655377388,
0.09159516543149948,
-0.16694150865077972,
0.1402539163827896,
0.42513635754585266,
0.14888526499271393,
-0.08985842019319534,
0.362053781747818,
0.353617787361145,
-0.1250976175069809,
-0.23539212346076965,
-0.03394284099340439,
-0.15403307974338531,
0.05356277897953987,
-0.03915758058428764,
-0.14283333718776703,
-0.2889048457145691,
-0.3263952434062958,
0.4472883641719818,
0.13445472717285156,
-0.04964211955666542,
0.23511265218257904,
0.10630358755588531,
0.15933552384376526,
0.09599927812814713,
0.10442063957452774,
-0.1595175564289093,
-0.5515465140342712,
0.25651347637176514,
-0.4323243498802185,
-0.4424850046634674,
0.0897507444024086,
0.32589560747146606,
0.17584651708602905,
-0.017491338774561882,
-0.41766950488090515,
-0.5006688833236694,
-0.13934248685836792,
0.14848759770393372,
0.13953310251235962,
0.15214529633522034,
0.3417992889881134,
-0.15007564425468445,
-0.20181557536125183,
-0.11273779720067978,
-0.1223241463303566,
-0.18546292185783386,
-0.10236145555973053,
0.1358303278684616,
-0.18551474809646606,
0.33155080676078796,
0.011720573529601097,
0.6068850159645081,
0.26382333040237427,
0.1644515097141266,
0.22081582248210907,
-0.10578719526529312,
0.5123518705368042,
-0.17119534313678741,
-0.22853770852088928,
0.054016437381505966,
0.122702956199646,
-0.04658452793955803,
-0.09940709173679352,
0.2881370186805725,
0.4083961248397827,
-0.23870597779750824,
-0.18472370505332947,
-0.056175537407398224,
-0.03053506277501583,
-0.36276134848594666,
0.16809290647506714,
0.1056174784898758,
0.050199076533317566,
0.09637080132961273,
-0.09292003512382507,
0.08836894482374191,
0.36143967509269714,
0.4342694878578186,
0.06471981853246689,
0.11720111221075058,
-0.23492158949375153,
-0.0931505411863327,
-0.5612886548042297,
0.3119571805000305,
-0.23598910868167877,
-0.040504831820726395,
-0.31670477986335754,
-0.010480783879756927,
0.05488967522978783,
-0.1940946877002716,
0.6354513764381409,
-0.1398560255765915,
0.2266964614391327,
0.06280647963285446,
-0.34125658869743347,
-0.3265874981880188,
0.05669594928622246,
0.00027450398192740977,
0.3390761911869049,
0.1469140499830246,
0.37205496430397034,
-0.16767892241477966,
-0.11775200814008713,
0.2419668287038803,
-0.15970586240291595,
-0.0626145675778389,
0.3407301902770996,
-0.3545937240123749,
-0.4292251467704773,
-0.13113844394683838,
0.21945418417453766,
0.06899548321962357,
0.2646758258342743,
0.17558376491069794,
0.03781438618898392,
0.07727619260549545,
0.015607237815856934,
0.08428054302930832,
0.14530383050441742,
0.042283669114112854,
-0.10853835940361023,
-0.14555993676185608,
0.2564532160758972,
-0.028737802058458328,
-0.1873098611831665,
0.5847259163856506,
-0.09157391637563705,
-0.6690026521682739,
0.3275487720966339,
0.20771554112434387,
0.21737973392009735,
0.38934120535850525,
-0.13114191591739655,
-0.076270692050457,
-0.021875083446502686,
0.27008309960365295,
-0.3583872616291046,
0.08760371059179306,
0.24592430889606476,
0.2546670138835907,
-0.1197521835565567,
-0.2901638448238373,
0.08507366478443146,
0.15148049592971802,
-0.05511418357491493,
0.47125738859176636,
0.33316776156425476,
0.07813415676355362,
-0.03195944428443909,
-0.17202435433864594,
0.8959888815879822,
0.08450363576412201,
0.06707266718149185,
0.1583292931318283,
-0.2922930419445038,
0.3150196969509125,
-0.3556116223335266,
0.12874071300029755,
-0.13018202781677246,
-0.2465168684720993,
0.02155100367963314,
-0.04158935323357582,
0.1423000991344452,
-0.34171274304389954,
0.2426387071609497,
0.3557705283164978,
0.07250384241342545,
0.05178090184926987,
-0.05787782743573189,
0.09000757336616516,
-0.14044347405433655,
0.06487303972244263,
-0.2528652846813202,
0.3162938356399536,
0.12143196910619736,
0.5003266334533691,
-0.06686078757047653,
-0.009713391773402691,
-0.10690931975841522,
-0.2450597882270813,
-0.14268067479133606,
-0.06386087089776993,
0.024445854127407074,
0.2525409460067749,
0.18769820034503937,
-0.3288484215736389,
-0.2530622184276581,
0.28148069977760315,
0.2732752859592438,
0.27132299542427063,
-0.2061777263879776,
0.204217791557312,
-0.2903864085674286,
-0.3199739158153534,
-0.03687966242432594,
0.3138306736946106,
-0.08004003763198853,
-0.2670665979385376,
-0.06297614425420761,
0.08473608642816544,
0.1331501305103302,
-0.0550529807806015,
-0.09709832072257996,
-0.1174020916223526,
-0.09083641320466995,
-0.023426026105880737,
0.22434690594673157,
-0.17294247448444366,
0.06142570450901985,
-0.25356557965278625,
0.23587028682231903,
0.16663555800914764,
-0.17710287868976593,
-0.24708996713161469,
0.11999993026256561,
-0.1489463597536087,
-0.08982197195291519,
0.27254509925842285,
-0.15973569452762604,
-0.05912705883383751,
0.0904514417052269,
0.23339630663394928,
-0.1014159545302391,
-0.35592812299728394,
-0.13454227149486542,
0.2987511157989502,
-0.327711820602417,
0.3614071011543274,
0.04521483555436134,
-0.04173273965716362,
-0.13791725039482117,
0.4319393038749695,
0.26291561126708984,
-0.2642897367477417,
0.20342907309532166,
-0.4921904504299164,
-0.3742845952510834,
0.29478487372398376,
0.00701097771525383,
0.07938358932733536,
-0.02396775223314762,
-0.1514798402786255,
0.1463487148284912,
-0.0747518241405487,
-0.4472401738166809,
-0.08273585885763168,
-0.3252613842487335,
-0.31359270215034485,
0.18961283564567566,
-0.2441224753856659,
0.31492865085601807,
0.13187988102436066,
0.203042134642601,
-0.039360396564006805,
-0.48618409037590027,
-0.2966104745864868,
-0.15156584978103638,
0.03500914201140404,
-0.2721741497516632,
0.17425879836082458,
0.23625747859477997,
0.05071137845516205,
-0.2102842926979065,
0.12360916286706924,
0.10794584453105927,
0.22305777668952942,
0.3208198845386505,
-0.04322539642453194,
-0.14372842013835907,
-0.05338933318853378,
0.08812887221574783,
0.07658158987760544,
0.40579283237457275,
0.10931980609893799,
-0.061759453266859055,
-0.1348838210105896,
0.01313027273863554,
-0.10287756472826004,
-0.08673468232154846,
0.04690142348408699,
0.16286154091358185,
-0.001879827817901969,
0.16568607091903687,
0.0040883589535951614,
0.1243925616145134,
0.04923992604017258,
0.5256220102310181,
0.02308576926589012,
-0.2301255762577057,
0.1573610156774521,
-0.011337069794535637,
0.2661168873310089,
-0.3420408368110657,
-0.014152949675917625,
-0.017325296998023987,
0.1802077442407608,
-0.027651268988847733,
-0.014296820387244225,
0.16820743680000305,
0.0632312148809433,
0.055717334151268005,
0.14351578056812286,
0.2527404725551605,
-0.17053799331188202,
0.16533444821834564,
-0.0325377956032753,
-0.01011453103274107,
-0.03673817962408066,
0.45180872082710266,
0.2731487452983856,
-0.06026581674814224,
0.24990878999233246,
-0.04964287951588631,
0.24676626920700073,
0.08557460457086563,
0.11459755897521973,
0.038895055651664734,
-0.2367248386144638,
-0.043940771371126175,
0.02008500136435032,
-0.12183169275522232,
-0.0781671330332756,
-0.09857309609651566,
0.43283534049987793,
-0.2707478404045105,
-0.08284002542495728,
-0.3949332535266876,
0.24821309745311737,
-0.07722010463476181,
-0.34734076261520386,
-0.014539293013513088,
-0.33769410848617554,
-0.030297407880425453,
-0.02569587342441082,
0.1488276571035385,
-0.016578076407313347,
0.2787100672721863,
-0.17291633784770966,
0.1188245341181755,
-0.21984460949897766,
-0.2984919250011444,
-0.04376846179366112,
0.2936023473739624,
0.01680205762386322,
0.1719825565814972,
0.059656254947185516,
0.020319903269410133,
0.16093124449253082,
0.3458753228187561,
0.393649697303772,
-0.2009923756122589,
-0.08028118312358856,
0.038602665066719055,
-0.166176438331604,
-0.14216162264347076,
-0.0552581287920475,
0.5125475525856018,
0.16758993268013,
-0.10150288045406342,
0.19527465105056763,
0.2552452087402344,
-0.25178489089012146,
0.28979894518852234,
-0.04890817403793335,
0.17470896244049072,
-0.1740897297859192,
0.26933231949806213,
-0.1927187740802765,
0.07744207978248596,
-0.29179486632347107,
0.15193291008472443,
-0.4124905467033386,
-0.18619798123836517,
-0.028222616761922836,
0.038187555968761444,
-0.010581683367490768,
-0.34770941734313965,
0.16909049451351166,
-0.05571291595697403,
0.2779124975204468,
0.4755209982395172,
0.2420458346605301,
-0.03584132716059685,
-0.23741666972637177,
-0.3578600585460663,
0.1934644728899002,
0.05469157546758652,
-0.24906191229820251,
-0.00875229761004448,
0.0820980817079544,
-0.04434790462255478,
0.1656619757413864,
0.19409936666488647,
0.22886577248573303,
0.016261648386716843,
-0.004428678657859564,
-0.23901304602622986,
0.21445250511169434,
-0.18601930141448975,
0.02148490771651268,
0.10173806548118591,
-0.05867907032370567,
0.011021378450095654,
-0.19229573011398315,
0.15008707344532013,
0.023986460641026497,
0.06530692428350449,
-0.10377752035856247,
0.1409660428762436,
0.26579782366752625,
0.06485693156719208,
0.2042703926563263,
0.002504437929019332,
-0.2663758397102356,
-0.26016050577163696,
-0.32451891899108887,
-0.061200257390737534,
0.13718929886817932,
-0.10595497488975525,
-0.07443208992481232,
-0.19409498572349548,
-0.31930768489837646,
-0.12802338600158691,
0.41555091738700867,
0.01362048089504242,
0.007097030524164438,
-0.003272084752097726,
0.1419353187084198,
0.04702112078666687,
-0.13059920072555542,
0.20702044665813446,
0.2865699827671051,
-0.007319840136915445,
0.013487188145518303,
-0.05646466836333275,
-0.3230922520160675,
0.5086897015571594,
-0.2769298851490021,
-0.13909301161766052,
-0.05565759167075157,
0.2836889326572418,
0.41019222140312195,
-0.12832078337669373,
-0.35077065229415894,
0.280404657125473,
0.08403362333774567,
0.09941116720438004,
-0.20649327337741852,
0.43714964389801025,
-0.2823712229728699,
-0.06384380161762238,
-0.027286872267723083,
0.28427061438560486,
-0.012172567658126354,
-0.16876259446144104,
0.19625838100910187,
-0.14583881199359894
] |
https://github.com/huggingface/datasets/issues/3134
|
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
> It seems to be able to solve this issue by adding the equivalent `accuracy.py` locally. change `metric = datasets.load_metric("accuracy")` to `metric = datasets.load_metric(path = "./accuracy.py")`. Copy `accuracy.py` from browser at [accuracy.py](https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/accuracy/accuracy.py)
This is really a good way
|
datasets version: 1.12.1
`metric = datasets.load_metric('rouge')`
The error:
> ConnectionError Traceback (most recent call last)
> <ipython-input-3-dd10a0c5212f> in <module>
> ----> 1 metric = datasets.load_metric('rouge')
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in load_metric(path, config_name, process_id, num_process, cache_dir, experiment_id, keep_in_memory, download_config, download_mode, script_version, **metric_init_kwargs)
> 613 download_config=download_config,
> 614 download_mode=download_mode,
> --> 615 dataset=False,
> 616 )
> 617 metric_cls = import_main_class(module_path, dataset=False)
>
> /usr/local/lib/python3.6/dist-packages/datasets/load.py in prepare_module(path, script_version, download_config, download_mode, dataset, force_local_path, dynamic_modules_path, return_resolved_file_path, **download_kwargs)
> 328 file_path = hf_github_url(path=path, name=name, dataset=dataset, version=script_version)
> 329 try:
> --> 330 local_path = cached_path(file_path, download_config=download_config)
> 331 except FileNotFoundError:
> 332 if script_version is not None:
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in cached_path(url_or_filename, download_config, **download_kwargs)
> 296 use_etag=download_config.use_etag,
> 297 max_retries=download_config.max_retries,
> --> 298 use_auth_token=download_config.use_auth_token,
> 299 )
> 300 elif os.path.exists(url_or_filename):
>
> /usr/local/lib/python3.6/dist-packages/datasets/utils/file_utils.py in get_from_cache(url, cache_dir, force_download, proxies, etag_timeout, resume_download, user_agent, local_files_only, use_etag, max_retries, use_auth_token)
> 603 raise FileNotFoundError("Couldn't find file at {}".format(url))
> 604 _raise_if_offline_mode_is_enabled(f"Tried to reach {url}")
> --> 605 raise ConnectionError("Couldn't reach {}".format(url))
> 606
> 607 # Try a second time
>
> ConnectionError: Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
Is there any remedy to solve the connection issue ?
| 38 |
Couldn't reach https://raw.githubusercontent.com/huggingface/datasets/1.11.0/metrics/rouge/rouge.py
|
[
-0.10520761460065842,
-0.3566337525844574,
-0.26646512746810913,
0.028044139966368675,
0.2455897331237793,
-0.03638395294547081,
-0.19981496036052704,
0.2608465850353241,
0.08752495795488358,
0.3726719915866852,
-0.19780975580215454,
0.054957956075668335,
-0.03285195305943489,
0.39216750860214233,
0.14178209006786346,
-0.10429978370666504,
-0.10787612944841385,
-0.02875380776822567,
-0.14157775044441223,
-0.058351218700408936,
-0.07145993411540985,
0.385695219039917,
-0.033697210252285004,
0.23756097257137299,
0.06264947354793549,
-0.02923612669110298,
-0.05653402954339981,
0.17631518840789795,
-0.4330582022666931,
-0.2100653201341629,
0.3370116949081421,
0.09464089572429657,
-0.016959263011813164,
0.42217040061950684,
-0.00010095238394569606,
0.15937139093875885,
0.3235456049442291,
0.004811227787286043,
-0.04882708564400673,
-0.30803877115249634,
-0.0715925395488739,
-0.2474088966846466,
0.08241963386535645,
0.09464855492115021,
-0.22444480657577515,
-0.18096335232257843,
0.02908211201429367,
0.031443752348423004,
0.30403485894203186,
0.34331265091896057,
0.3490753471851349,
0.45534369349479675,
0.22179046273231506,
-0.2962709367275238,
0.053350724279880524,
-0.11303819715976715,
-0.06532014906406403,
0.37502366304397583,
0.26157909631729126,
0.03886505216360092,
-0.007569651119410992,
0.3586105704307556,
0.3443681597709656,
-0.13879984617233276,
0.21470755338668823,
-0.23563142120838165,
0.2655462324619293,
-0.21593427658081055,
0.11637772619724274,
0.11680258065462112,
0.07828404754400253,
-0.057469792664051056,
-0.3265353739261627,
0.12577299773693085,
-0.033106978982686996,
-0.6105457544326782,
0.08539476990699768,
-0.026876823976635933,
-0.055704813450574875,
0.03820626810193062,
-0.33723747730255127,
-0.29534420371055603,
-0.1344202160835266,
-0.11826015263795853,
-0.19425320625305176,
-0.15492701530456543,
-0.33771467208862305,
-0.12165047973394394,
0.22645042836666107,
-0.10138761252164841,
-0.49001920223236084,
0.4279312193393707,
-0.23676258325576782,
0.07510978728532791,
-0.2173524796962738,
-0.10808578133583069,
0.3413977324962616,
0.19781990349292755,
0.3518276810646057,
0.35781362652778625,
-0.0028456782456487417,
-0.051894474774599075,
-0.12527133524417877,
-0.01138843409717083,
-0.03334875404834747,
0.23787672817707062,
-0.027560826390981674,
-0.010971073992550373,
0.319298654794693,
0.4521491527557373,
0.1329779475927353,
-0.049562547355890274,
0.029520170763134956,
-0.4733523428440094,
-0.3376420736312866,
0.10796219110488892,
0.16823288798332214,
-0.41222038865089417,
-0.3837381899356842,
0.10756020992994308,
0.14935719966888428,
0.020572423934936523,
0.06958819180727005,
0.2857632637023926,
-0.1584746092557907,
-0.06935781240463257,
0.004255516454577446,
0.1819152534008026,
-0.2966179847717285,
0.09435110539197922,
-0.40242260694503784,
0.18948301672935486,
-0.29061242938041687,
-0.17883779108524323,
0.04950811341404915,
-0.18891815841197968,
0.3401777148246765,
-0.06055081635713577,
0.19904004037380219,
-0.10042794793844223,
0.06202888861298561,
0.23737956583499908,
-0.25160446763038635,
0.40160614252090454,
-0.012209052219986916,
-0.03521890193223953,
0.10825071483850479,
-0.11743338406085968,
-0.09428030997514725,
-0.27115708589553833,
-0.5134903788566589,
-0.35003337264060974,
0.0750151202082634,
0.30519282817840576,
-0.06046074256300926,
-0.05622474104166031,
-0.10124465823173523,
0.08795584738254547,
-0.24560867249965668,
-0.013037588447332382,
-0.029521923512220383,
0.07430605590343475,
-0.0930316150188446,
-0.10322892665863037,
0.3732300400733948,
0.20584917068481445,
-0.040993787348270416,
-0.14541995525360107,
0.1641288548707962,
-0.31478801369667053,
0.08203836530447006,
0.2852477431297302,
0.09125399589538574,
-0.07041241973638535,
-0.23564419150352478,
-0.2636219263076782,
0.4284752309322357,
-0.5727972984313965,
-0.30397558212280273,
0.039954788982868195,
-0.23299463093280792,
-0.19237203896045685,
0.19437168538570404,
-0.3274851143360138,
-0.0854627788066864,
-0.15714605152606964,
0.27897050976753235,
-0.02288704179227352,
0.02282697707414627,
-0.262654185295105,
-0.049030452966690063,
-0.14964896440505981,
0.09913825988769531,
0.12453417479991913,
0.18682456016540527,
0.044084999710321426,
0.046723511070013046,
-0.3679733872413635,
0.18346989154815674,
0.1834898144006729,
-0.20701515674591064,
0.3566684126853943,
-0.023418979719281197,
0.20128074288368225,
0.04977920651435852,
-0.11615157127380371,
0.14627820253372192,
-0.029499592259526253,
-0.2832503914833069,
0.1397954672574997,
-0.07366915792226791,
-0.0970941111445427,
-0.5573174357414246,
0.024229373782873154,
0.0182819701731205,
-0.38562217354774475,
0.19715029001235962,
-0.04613281041383743,
0.27040281891822815,
0.28017669916152954,
-0.1658095419406891,
0.03311919793486595,
-0.2856922447681427,
0.23792831599712372,
-0.37963613867759705,
-0.052875664085149765,
-0.1829136312007904,
0.03400691971182823,
0.2619437873363495,
0.2398638278245926,
0.07660162448883057,
-0.18021215498447418,
-0.009757584892213345,
0.1319802701473236,
0.037298135459423065,
0.32047411799430847,
0.5408188700675964,
0.270528644323349,
0.3302689492702484,
-0.23076586425304413,
-0.08537763357162476,
0.07088332623243332,
0.038339171558618546,
0.20427192747592926,
-0.06075187772512436,
0.12270601093769073,
-0.22232140600681305,
0.03022465668618679,
0.050999391824007034,
0.25634685158729553,
0.33702394366264343,
0.2303512692451477,
-0.24740572273731232,
0.058656029403209686,
0.42934656143188477,
-0.09668821841478348,
0.3491423726081848,
-0.2344798743724823,
-0.2155253291130066,
-0.030643198639154434,
0.3622743785381317,
-0.046788327395915985,
0.025179432705044746,
0.08436015993356705,
0.1632852554321289,
-0.07341918349266052,
0.026422755792737007,
-0.01677265763282776,
-0.09146613627672195,
0.18567819893360138,
0.17009064555168152,
0.10531139373779297,
-0.06731468439102173,
-0.19764000177383423,
0.0038492565508931875,
-0.03386843204498291,
-0.10823981463909149,
0.15010060369968414,
0.07531189173460007,
-0.13779930770397186,
-0.2211562693119049,
-0.26084503531455994,
-0.25011250376701355,
0.09063898772001266,
0.0055345939472317696,
0.0059827822260558605,
-0.2015400230884552,
0.10444533079862595,
0.2707040309906006,
-0.39339569211006165,
-0.28019532561302185,
-0.3329162001609802,
0.1740989238023758,
-0.08883870393037796,
0.03278085216879845,
0.3055312931537628,
0.1489058881998062,
0.345579594373703,
0.10723576694726944,
0.28991106152534485,
-0.2548505365848541,
-0.09485512226819992,
-0.017982568591833115,
0.2361445128917694,
-0.16741755604743958,
-0.33756449818611145,
0.354837030172348,
-0.4415571987628937,
0.1361125111579895,
-0.12272689491510391,
-0.36137655377388,
0.09159516543149948,
-0.16694150865077972,
0.1402539163827896,
0.42513635754585266,
0.14888526499271393,
-0.08985842019319534,
0.362053781747818,
0.353617787361145,
-0.1250976175069809,
-0.23539212346076965,
-0.03394284099340439,
-0.15403307974338531,
0.05356277897953987,
-0.03915758058428764,
-0.14283333718776703,
-0.2889048457145691,
-0.3263952434062958,
0.4472883641719818,
0.13445472717285156,
-0.04964211955666542,
0.23511265218257904,
0.10630358755588531,
0.15933552384376526,
0.09599927812814713,
0.10442063957452774,
-0.1595175564289093,
-0.5515465140342712,
0.25651347637176514,
-0.4323243498802185,
-0.4424850046634674,
0.0897507444024086,
0.32589560747146606,
0.17584651708602905,
-0.017491338774561882,
-0.41766950488090515,
-0.5006688833236694,
-0.13934248685836792,
0.14848759770393372,
0.13953310251235962,
0.15214529633522034,
0.3417992889881134,
-0.15007564425468445,
-0.20181557536125183,
-0.11273779720067978,
-0.1223241463303566,
-0.18546292185783386,
-0.10236145555973053,
0.1358303278684616,
-0.18551474809646606,
0.33155080676078796,
0.011720573529601097,
0.6068850159645081,
0.26382333040237427,
0.1644515097141266,
0.22081582248210907,
-0.10578719526529312,
0.5123518705368042,
-0.17119534313678741,
-0.22853770852088928,
0.054016437381505966,
0.122702956199646,
-0.04658452793955803,
-0.09940709173679352,
0.2881370186805725,
0.4083961248397827,
-0.23870597779750824,
-0.18472370505332947,
-0.056175537407398224,
-0.03053506277501583,
-0.36276134848594666,
0.16809290647506714,
0.1056174784898758,
0.050199076533317566,
0.09637080132961273,
-0.09292003512382507,
0.08836894482374191,
0.36143967509269714,
0.4342694878578186,
0.06471981853246689,
0.11720111221075058,
-0.23492158949375153,
-0.0931505411863327,
-0.5612886548042297,
0.3119571805000305,
-0.23598910868167877,
-0.040504831820726395,
-0.31670477986335754,
-0.010480783879756927,
0.05488967522978783,
-0.1940946877002716,
0.6354513764381409,
-0.1398560255765915,
0.2266964614391327,
0.06280647963285446,
-0.34125658869743347,
-0.3265874981880188,
0.05669594928622246,
0.00027450398192740977,
0.3390761911869049,
0.1469140499830246,
0.37205496430397034,
-0.16767892241477966,
-0.11775200814008713,
0.2419668287038803,
-0.15970586240291595,
-0.0626145675778389,
0.3407301902770996,
-0.3545937240123749,
-0.4292251467704773,
-0.13113844394683838,
0.21945418417453766,
0.06899548321962357,
0.2646758258342743,
0.17558376491069794,
0.03781438618898392,
0.07727619260549545,
0.015607237815856934,
0.08428054302930832,
0.14530383050441742,
0.042283669114112854,
-0.10853835940361023,
-0.14555993676185608,
0.2564532160758972,
-0.028737802058458328,
-0.1873098611831665,
0.5847259163856506,
-0.09157391637563705,
-0.6690026521682739,
0.3275487720966339,
0.20771554112434387,
0.21737973392009735,
0.38934120535850525,
-0.13114191591739655,
-0.076270692050457,
-0.021875083446502686,
0.27008309960365295,
-0.3583872616291046,
0.08760371059179306,
0.24592430889606476,
0.2546670138835907,
-0.1197521835565567,
-0.2901638448238373,
0.08507366478443146,
0.15148049592971802,
-0.05511418357491493,
0.47125738859176636,
0.33316776156425476,
0.07813415676355362,
-0.03195944428443909,
-0.17202435433864594,
0.8959888815879822,
0.08450363576412201,
0.06707266718149185,
0.1583292931318283,
-0.2922930419445038,
0.3150196969509125,
-0.3556116223335266,
0.12874071300029755,
-0.13018202781677246,
-0.2465168684720993,
0.02155100367963314,
-0.04158935323357582,
0.1423000991344452,
-0.34171274304389954,
0.2426387071609497,
0.3557705283164978,
0.07250384241342545,
0.05178090184926987,
-0.05787782743573189,
0.09000757336616516,
-0.14044347405433655,
0.06487303972244263,
-0.2528652846813202,
0.3162938356399536,
0.12143196910619736,
0.5003266334533691,
-0.06686078757047653,
-0.009713391773402691,
-0.10690931975841522,
-0.2450597882270813,
-0.14268067479133606,
-0.06386087089776993,
0.024445854127407074,
0.2525409460067749,
0.18769820034503937,
-0.3288484215736389,
-0.2530622184276581,
0.28148069977760315,
0.2732752859592438,
0.27132299542427063,
-0.2061777263879776,
0.204217791557312,
-0.2903864085674286,
-0.3199739158153534,
-0.03687966242432594,
0.3138306736946106,
-0.08004003763198853,
-0.2670665979385376,
-0.06297614425420761,
0.08473608642816544,
0.1331501305103302,
-0.0550529807806015,
-0.09709832072257996,
-0.1174020916223526,
-0.09083641320466995,
-0.023426026105880737,
0.22434690594673157,
-0.17294247448444366,
0.06142570450901985,
-0.25356557965278625,
0.23587028682231903,
0.16663555800914764,
-0.17710287868976593,
-0.24708996713161469,
0.11999993026256561,
-0.1489463597536087,
-0.08982197195291519,
0.27254509925842285,
-0.15973569452762604,
-0.05912705883383751,
0.0904514417052269,
0.23339630663394928,
-0.1014159545302391,
-0.35592812299728394,
-0.13454227149486542,
0.2987511157989502,
-0.327711820602417,
0.3614071011543274,
0.04521483555436134,
-0.04173273965716362,
-0.13791725039482117,
0.4319393038749695,
0.26291561126708984,
-0.2642897367477417,
0.20342907309532166,
-0.4921904504299164,
-0.3742845952510834,
0.29478487372398376,
0.00701097771525383,
0.07938358932733536,
-0.02396775223314762,
-0.1514798402786255,
0.1463487148284912,
-0.0747518241405487,
-0.4472401738166809,
-0.08273585885763168,
-0.3252613842487335,
-0.31359270215034485,
0.18961283564567566,
-0.2441224753856659,
0.31492865085601807,
0.13187988102436066,
0.203042134642601,
-0.039360396564006805,
-0.48618409037590027,
-0.2966104745864868,
-0.15156584978103638,
0.03500914201140404,
-0.2721741497516632,
0.17425879836082458,
0.23625747859477997,
0.05071137845516205,
-0.2102842926979065,
0.12360916286706924,
0.10794584453105927,
0.22305777668952942,
0.3208198845386505,
-0.04322539642453194,
-0.14372842013835907,
-0.05338933318853378,
0.08812887221574783,
0.07658158987760544,
0.40579283237457275,
0.10931980609893799,
-0.061759453266859055,
-0.1348838210105896,
0.01313027273863554,
-0.10287756472826004,
-0.08673468232154846,
0.04690142348408699,
0.16286154091358185,
-0.001879827817901969,
0.16568607091903687,
0.0040883589535951614,
0.1243925616145134,
0.04923992604017258,
0.5256220102310181,
0.02308576926589012,
-0.2301255762577057,
0.1573610156774521,
-0.011337069794535637,
0.2661168873310089,
-0.3420408368110657,
-0.014152949675917625,
-0.017325296998023987,
0.1802077442407608,
-0.027651268988847733,
-0.014296820387244225,
0.16820743680000305,
0.0632312148809433,
0.055717334151268005,
0.14351578056812286,
0.2527404725551605,
-0.17053799331188202,
0.16533444821834564,
-0.0325377956032753,
-0.01011453103274107,
-0.03673817962408066,
0.45180872082710266,
0.2731487452983856,
-0.06026581674814224,
0.24990878999233246,
-0.04964287951588631,
0.24676626920700073,
0.08557460457086563,
0.11459755897521973,
0.038895055651664734,
-0.2367248386144638,
-0.043940771371126175,
0.02008500136435032,
-0.12183169275522232,
-0.0781671330332756,
-0.09857309609651566,
0.43283534049987793,
-0.2707478404045105,
-0.08284002542495728,
-0.3949332535266876,
0.24821309745311737,
-0.07722010463476181,
-0.34734076261520386,
-0.014539293013513088,
-0.33769410848617554,
-0.030297407880425453,
-0.02569587342441082,
0.1488276571035385,
-0.016578076407313347,
0.2787100672721863,
-0.17291633784770966,
0.1188245341181755,
-0.21984460949897766,
-0.2984919250011444,
-0.04376846179366112,
0.2936023473739624,
0.01680205762386322,
0.1719825565814972,
0.059656254947185516,
0.020319903269410133,
0.16093124449253082,
0.3458753228187561,
0.393649697303772,
-0.2009923756122589,
-0.08028118312358856,
0.038602665066719055,
-0.166176438331604,
-0.14216162264347076,
-0.0552581287920475,
0.5125475525856018,
0.16758993268013,
-0.10150288045406342,
0.19527465105056763,
0.2552452087402344,
-0.25178489089012146,
0.28979894518852234,
-0.04890817403793335,
0.17470896244049072,
-0.1740897297859192,
0.26933231949806213,
-0.1927187740802765,
0.07744207978248596,
-0.29179486632347107,
0.15193291008472443,
-0.4124905467033386,
-0.18619798123836517,
-0.028222616761922836,
0.038187555968761444,
-0.010581683367490768,
-0.34770941734313965,
0.16909049451351166,
-0.05571291595697403,
0.2779124975204468,
0.4755209982395172,
0.2420458346605301,
-0.03584132716059685,
-0.23741666972637177,
-0.3578600585460663,
0.1934644728899002,
0.05469157546758652,
-0.24906191229820251,
-0.00875229761004448,
0.0820980817079544,
-0.04434790462255478,
0.1656619757413864,
0.19409936666488647,
0.22886577248573303,
0.016261648386716843,
-0.004428678657859564,
-0.23901304602622986,
0.21445250511169434,
-0.18601930141448975,
0.02148490771651268,
0.10173806548118591,
-0.05867907032370567,
0.011021378450095654,
-0.19229573011398315,
0.15008707344532013,
0.023986460641026497,
0.06530692428350449,
-0.10377752035856247,
0.1409660428762436,
0.26579782366752625,
0.06485693156719208,
0.2042703926563263,
0.002504437929019332,
-0.2663758397102356,
-0.26016050577163696,
-0.32451891899108887,
-0.061200257390737534,
0.13718929886817932,
-0.10595497488975525,
-0.07443208992481232,
-0.19409498572349548,
-0.31930768489837646,
-0.12802338600158691,
0.41555091738700867,
0.01362048089504242,
0.007097030524164438,
-0.003272084752097726,
0.1419353187084198,
0.04702112078666687,
-0.13059920072555542,
0.20702044665813446,
0.2865699827671051,
-0.007319840136915445,
0.013487188145518303,
-0.05646466836333275,
-0.3230922520160675,
0.5086897015571594,
-0.2769298851490021,
-0.13909301161766052,
-0.05565759167075157,
0.2836889326572418,
0.41019222140312195,
-0.12832078337669373,
-0.35077065229415894,
0.280404657125473,
0.08403362333774567,
0.09941116720438004,
-0.20649327337741852,
0.43714964389801025,
-0.2823712229728699,
-0.06384380161762238,
-0.027286872267723083,
0.28427061438560486,
-0.012172567658126354,
-0.16876259446144104,
0.19625838100910187,
-0.14583881199359894
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.