html_url stringlengths 48 51 | title stringlengths 5 280 | comments stringlengths 63 51.8k | body stringlengths 0 36.2k ⌀ | comment_length int64 16 1.52k | text stringlengths 159 54.1k | embeddings listlengths 768 768 |
|---|---|---|---|---|---|---|
https://github.com/huggingface/datasets/issues/4863 | TFDS wiki_dialog dataset to Huggingface dataset | Nvm, I was able to port it to huggingface datasets, will upload to the hub soon | ## Adding a Dataset
- **Name:** *Wiki_dialog*
- **Description: https://github.com/google-research/dialog-inpainting#:~:text=JSON%20object%2C%20for-,example,-%3A
- **Paper: https://arxiv.org/abs/2205.09073
- **Data: https://github.com/google-research/dialog-inpainting
- **Motivation:** *Research and Development on biggest corpus of dialog data*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
| 16 | TFDS wiki_dialog dataset to Huggingface dataset
## Adding a Dataset
- **Name:** *Wiki_dialog*
- **Description: https://github.com/google-research/dialog-inpainting#:~:text=JSON%20object%2C%20for-,example,-%3A
- **Paper: https://arxiv.org/abs/2205.09073
- **Data: https://github.com/google-research/dialog-inpainting
- **Motivation:** *Research and Development on biggest corpus of dialog data*
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
Nvm, I was able to port it to huggingface datasets, will upload to the hub soon | [
-0.08726494014263153,
-0.34952399134635925,
-0.019723545759916306,
0.2652052938938141,
0.016463112086057663,
0.08815964311361313,
0.22276954352855682,
0.31378763914108276,
0.09480077028274536,
0.07103592902421951,
-0.5528787970542908,
0.15335436165332794,
-0.1302528828382492,
0.5124830007553101,
0.1650669276714325,
-0.14924608170986176,
0.06220574304461479,
-0.08008654415607452,
-0.1847049593925476,
-0.08442692458629608,
-0.18211650848388672,
0.28011515736579895,
-0.26402515172958374,
0.03461795300245285,
-0.12386639416217804,
-0.0794350802898407,
-0.1335596740245819,
0.06012042239308357,
0.024171508848667145,
-0.15865519642829895,
0.15858498215675354,
0.07332006096839905,
-0.12444624304771423,
0.3837774693965912,
-0.0001012580469250679,
-0.01280885562300682,
0.10893866419792175,
-0.06762973219156265,
-0.2658305764198303,
0.18553426861763,
0.16597682237625122,
0.036528199911117554,
0.021777290850877762,
0.017391137778759003,
-0.17159613966941833,
-0.27046677470207214,
0.06993934512138367,
0.10986992716789246,
0.28315889835357666,
0.13895215094089508,
0.2855105400085449,
0.496974915266037,
0.23234237730503082,
-0.14075249433517456,
-0.06779292970895767,
-0.03398141264915466,
-0.20522044599056244,
0.21105174720287323,
0.31429123878479004,
0.12096524238586426,
-0.06947597116231918,
0.34821000695228577,
-0.023357924073934555,
-0.20454338192939758,
0.38750672340393066,
0.06159960478544235,
-0.07494881004095078,
-0.14862173795700073,
0.05243809148669243,
0.5543204545974731,
0.5266470909118652,
-0.2965603172779083,
-0.20881468057632446,
-0.28745388984680176,
-0.1750912368297577,
0.040240831673145294,
-0.027924783527851105,
-0.0001467335969209671,
-0.13370387256145477,
0.3687467575073242,
-0.14965103566646576,
-0.3606550395488739,
-0.2668716311454773,
0.07981370389461517,
0.00837504118680954,
0.2990224361419678,
-0.12298716604709625,
-0.0784464105963707,
-0.04747327044606209,
-0.2098298966884613,
-0.2324790060520172,
-0.026935812085866928,
-0.06496615707874298,
-0.06054849550127983,
-0.182865709066391,
-0.31364619731903076,
0.3961874842643738,
0.3181510865688324,
0.5551531314849854,
0.05351947620511055,
-0.013950596563518047,
0.1000397577881813,
-0.12020119279623032,
-0.05712909996509552,
0.17978230118751526,
-0.04722251743078232,
0.0183941088616848,
-0.05019936338067055,
0.3356103301048279,
-0.04597220569849014,
0.06698480248451233,
0.07047391682863235,
0.09457296133041382,
-0.0844956636428833,
-0.08343103528022766,
-0.3603973388671875,
0.21120639145374298,
-0.033086832612752914,
0.2373540997505188,
0.0911121591925621,
0.03877171874046326,
0.19702990353107452,
-0.120455302298069,
0.25639569759368896,
-0.0729198008775711,
-0.03346799314022064,
0.14915475249290466,
0.11807402968406677,
-0.05809883028268814,
0.10036963224411011,
-0.22165043652057648,
-0.019580069929361343,
-0.06075625121593475,
0.1670551300048828,
0.03528808429837227,
0.15080909430980682,
0.19301320612430573,
-0.07703118026256561,
0.3658543825149536,
0.21751120686531067,
-0.21129684150218964,
0.31196197867393494,
-0.0022200122475624084,
0.04617076367139816,
0.19542834162712097,
0.06646626442670822,
0.2328946441411972,
-0.07172422856092453,
-0.20399779081344604,
-0.2300550937652588,
0.008493110537528992,
-0.16634592413902283,
-0.19547100365161896,
0.2551470696926117,
-0.12257793545722961,
-0.2112937569618225,
-0.41892847418785095,
0.4174129366874695,
-0.1171373650431633,
-0.18008454144001007,
0.07837134599685669,
0.22924065589904785,
-0.2048797756433487,
-0.1279531717300415,
-0.058099426329135895,
0.634017288684845,
-0.13914920389652252,
-0.09133797883987427,
0.26318007707595825,
-0.23144379258155823,
-0.39538896083831787,
0.18967288732528687,
-0.041636016219854355,
0.08091824501752853,
-0.309578537940979,
0.25702619552612305,
-0.12942349910736084,
-0.5566810369491577,
-0.3462621569633484,
0.2812802195549011,
-0.2941291034221649,
0.056000061333179474,
-0.07314535230398178,
0.03894176706671715,
0.14072540402412415,
-0.12861368060112,
0.29248666763305664,
0.1871432065963745,
0.05155647173523903,
0.2432575523853302,
-0.20476311445236206,
-0.31321775913238525,
-0.022960703819990158,
0.0026786215603351593,
-0.00644567608833313,
0.055232930928468704,
0.01905933767557144,
-0.04695774242281914,
0.3521444499492645,
-0.29622939229011536,
0.17472335696220398,
0.21660757064819336,
0.3168269991874695,
0.03165016323328018,
0.14879684150218964,
-0.3200854957103729,
-0.6439231038093567,
0.08691815286874771,
-0.057098910212516785,
0.1867416948080063,
-0.06143338978290558,
-0.23053358495235443,
-0.19517594575881958,
0.034626930952072144,
-0.15285520255565643,
-0.2481318712234497,
0.30490222573280334,
0.12934334576129913,
0.05383904650807381,
0.06805367767810822,
-0.22874172031879425,
0.19486097991466522,
-0.13651713728904724,
0.25811251997947693,
-0.11746075749397278,
0.18413138389587402,
0.06182654947042465,
-0.04024781659245491,
0.15383581817150116,
0.06698396801948547,
-0.26845303177833557,
-0.08698434382677078,
0.10297560691833496,
0.31174883246421814,
-0.167427659034729,
0.4563579559326172,
0.13762319087982178,
0.08428162336349487,
0.25196343660354614,
-0.42380139231681824,
-0.01878260262310505,
-0.16922155022621155,
-0.05718516930937767,
-0.10099445283412933,
-0.2751675248146057,
0.1585949957370758,
-0.16478337347507477,
0.17695237696170807,
0.19365058839321136,
0.19318744540214539,
-0.02822326123714447,
-0.07147915661334991,
-0.08564095199108124,
-0.16480545699596405,
0.0072978585958480835,
0.27285462617874146,
0.2793313264846802,
0.05340646952390671,
-0.3985469937324524,
0.4150857925415039,
0.35085830092430115,
-0.15275917947292328,
0.24150249361991882,
0.15587764978408813,
-0.3732154667377472,
-0.118002749979496,
0.017112771049141884,
-0.3848693370819092,
0.09546975046396255,
0.3975546061992645,
0.04666663706302643,
0.15352927148342133,
0.15254884958267212,
-0.1950729787349701,
0.23469722270965576,
-0.0013428106904029846,
0.06368755549192429,
0.3774256706237793,
0.11897178739309311,
0.022142641246318817,
-0.6001770496368408,
0.18206138908863068,
-0.14384394884109497,
0.08335743099451065,
-0.275783509016037,
-0.024303508922457695,
-0.17192891240119934,
-0.07350832223892212,
0.03625883162021637,
-0.2449275702238083,
-0.20907150208950043,
-0.16477687656879425,
0.14000338315963745,
0.179571270942688,
-0.01387755572795868,
0.11459607630968094,
-0.008687473833560944,
0.2199677675962448,
0.056990817189216614,
-0.034529656171798706,
-0.22817091643810272,
-0.3426419794559479,
-0.2283206582069397,
0.19110646843910217,
0.248341903090477,
0.08079267293214798,
0.5864696502685547,
0.04137533903121948,
0.2339242547750473,
-0.32674074172973633,
-0.4934391975402832,
0.2716746926307678,
-0.2656720280647278,
0.361533522605896,
0.1735881268978119,
0.29415032267570496,
-0.18626996874809265,
-0.06704293936491013,
-0.020377574488520622,
-0.20511262118816376,
-0.41534423828125,
-0.16148877143859863,
-0.32450252771377563,
-0.10980607569217682,
-0.17908193171024323,
-0.20798587799072266,
-0.13359518349170685,
-0.4404497742652893,
0.4901183843612671,
-0.19033461809158325,
-0.025814928114414215,
0.6379609704017639,
0.025287926197052002,
0.3591538965702057,
-0.07743251323699951,
0.23256531357765198,
-0.19893495738506317,
0.0328558124601841,
0.20030684769153595,
-0.39605841040611267,
-0.3033324182033539,
-0.15278282761573792,
-0.023239385336637497,
0.1081906110048294,
-0.12650488317012787,
-0.3223240375518799,
-0.3370099663734436,
-0.2886642515659332,
0.10450536012649536,
0.21786965429782867,
-0.007969086989760399,
0.3598839044570923,
-0.05064668878912926,
-0.15553966164588928,
-0.2924284338951111,
-0.18102368712425232,
0.07688901573419571,
-0.1535918414592743,
-0.047569043934345245,
0.10055067390203476,
0.12883564829826355,
-0.04814350605010986,
0.36800432205200195,
0.20592544972896576,
0.21533608436584473,
0.2688259482383728,
-0.24981966614723206,
0.39824843406677246,
-0.13855630159378052,
-0.42039957642555237,
0.4572489261627197,
0.1168082132935524,
-0.0442371629178524,
0.5705171227455139,
0.141902357339859,
0.012280698865652084,
-0.1051914244890213,
-0.2562633156776428,
-0.2795718014240265,
-0.3873700499534607,
-0.21214845776557922,
0.3006426692008972,
-0.0672917291522026,
0.07109640538692474,
-0.16102701425552368,
-0.2964712083339691,
-0.12568381428718567,
0.1944437175989151,
0.3623276948928833,
0.10409804433584213,
-0.050545502454042435,
-0.07231932878494263,
0.12874287366867065,
-0.496665358543396,
0.12658067047595978,
0.07427974790334702,
-0.3904118835926056,
-0.07281120121479034,
-0.16314175724983215,
-0.08224441111087799,
-0.08955200016498566,
0.5820897221565247,
-0.10113632678985596,
0.06199539825320244,
0.06467059254646301,
0.06585744023323059,
-0.40168705582618713,
0.274005651473999,
-0.05129444599151611,
-0.18897219002246857,
0.2067360281944275,
0.6040179133415222,
-0.5595672130584717,
-0.16438107192516327,
0.16981039941310883,
0.022501979023218155,
-0.08423154801130295,
-0.08270037174224854,
0.022445525974035263,
-0.23362058401107788,
-0.2863762080669403,
0.02034512162208557,
0.013445442542433739,
0.16919668018817902,
0.2517853379249573,
-0.11662358045578003,
0.05200127512216568,
-0.06593289971351624,
0.19221849739551544,
0.17652234435081482,
0.08674251288175583,
0.36140480637550354,
0.12985730171203613,
0.11870680004358292,
0.32113319635391235,
0.17436371743679047,
0.1938253492116928,
0.026058770716190338,
-0.12971891462802887,
-0.19346308708190918,
-0.03747139498591423,
0.15342476963996887,
0.35024863481521606,
0.13120628893375397,
0.13902172446250916,
-0.11392897367477417,
0.2330518215894699,
0.0024139033630490303,
0.05684906989336014,
0.052447639405727386,
0.020755644887685776,
-0.24223867058753967,
0.012024203315377235,
0.5135461091995239,
-0.04278546944260597,
-0.04633284732699394,
0.2382173389196396,
0.6521921753883362,
-0.46509256958961487,
-0.037359874695539474,
0.18827494978904724,
0.9128788113594055,
0.013525620102882385,
0.2983796298503876,
0.725520670413971,
-0.1230696588754654,
0.45219478011131287,
0.1471775472164154,
-0.2585669755935669,
-0.18341264128684998,
0.2247975766658783,
0.05860885977745056,
0.006205063313245773,
-0.3212870657444,
-0.1131550520658493,
-0.30921924114227295,
-0.1858755201101303,
0.03980078548192978,
0.2939727306365967,
0.07995202392339706,
0.283952921628952,
-0.040572263300418854,
-0.5104498267173767,
-0.3938586115837097,
0.26438647508621216,
-0.02315901219844818,
0.15647871792316437,
-0.11342041939496994,
-0.49458086490631104,
-0.06615014374256134,
0.027985267341136932,
-0.26250946521759033,
0.01607557013630867,
-0.15715475380420685,
-0.007860276848077774,
0.29141536355018616,
0.005359575152397156,
0.12048079073429108,
0.4046724736690521,
0.4249865412712097,
0.05259419232606888,
-0.5060898065567017,
0.018588606268167496,
-0.23486000299453735,
-0.1420711725950241,
-0.09010806679725647,
-0.08151272684335709,
0.5010502338409424,
-0.16328364610671997,
-0.20679038763046265,
0.09163831174373627,
0.18889927864074707,
-0.22733183205127716,
-0.48039570450782776,
-0.3169540762901306,
-0.11921663582324982,
-0.18331941962242126,
-0.06548110395669937,
0.07092908769845963,
-0.21251128613948822,
-0.16350167989730835,
0.16318465769290924,
-0.09431315958499908,
0.11936027556657791,
0.0612928681075573,
0.30034297704696655,
-0.1548978090286255,
0.014720162376761436,
0.085791677236557,
-0.11203981190919876,
-0.19146862626075745,
0.2667842507362366,
0.4903518557548523,
-0.20111556351184845,
-0.2859191298484802,
0.0678667351603508,
0.22556109726428986,
-0.09377342462539673,
0.2671585977077484,
0.22171860933303833,
0.03662407398223877,
0.05835239216685295,
0.463494211435318,
0.1382642686367035,
-0.0863923653960228,
0.04233198240399361,
0.007080703973770142,
-0.5079975724220276,
0.4190792441368103,
-0.10289628803730011,
0.23617087304592133,
-0.1363668143749237,
0.3752119243144989,
-0.018287843093276024,
-0.04492691904306412,
-0.4557521939277649,
-0.011307213455438614,
-0.057200223207473755,
-0.1690925508737564,
0.22501718997955322,
-0.26348698139190674,
0.14427371323108673,
-0.030109932646155357,
0.19377243518829346,
0.08879382163286209,
-0.20850734412670135,
-0.3030591607093811,
-0.4274163842201233,
0.09044189751148224,
0.15863120555877686,
-0.12214218825101852,
0.1688486635684967,
0.03793841600418091,
-0.2672967314720154,
-0.24336519837379456,
0.3724035322666168,
0.15984931588172913,
0.04523347690701485,
-0.05338012054562569,
-0.03829675540328026,
0.16309167444705963,
0.10654553771018982,
-0.02299947291612625,
0.4184328615665436,
0.12107104063034058,
-0.23604825139045715,
-0.09039898216724396,
-0.1540050208568573,
-0.10471616685390472,
0.31060707569122314,
0.48523253202438354,
0.337899386882782,
-0.04388159513473511,
0.220465749502182,
-0.08899854123592377,
-0.11691828072071075,
0.34029412269592285,
0.3127230107784271,
0.09615762531757355,
-0.05297251045703888,
0.13964885473251343,
-0.13385534286499023,
0.2610515356063843,
-0.1978083848953247,
0.03937811031937599,
0.4208490252494812,
-0.30344921350479126,
0.14277657866477966,
0.05365157872438431,
-0.23788100481033325,
0.0314764678478241,
0.06877236068248749,
0.1251320242881775,
0.02145157754421234,
-0.22710730135440826,
-0.27878522872924805,
0.3342415988445282,
-0.1013147234916687,
0.07931312918663025,
0.33882132172584534,
0.32647040486335754,
0.45178040862083435,
0.16269370913505554,
-0.007136724889278412,
-0.0572085976600647,
-0.608312726020813,
0.1483919322490692,
0.525297224521637,
-0.09117670357227325,
0.1022530347108841,
0.1961275190114975,
-0.07476554811000824,
0.1650111973285675,
-0.08608776330947876,
0.4541597068309784,
0.02260345220565796,
-0.040968190878629684,
-0.16533693671226501,
0.4612779915332794,
-0.18509995937347412,
-0.3234087824821472,
-0.19879724085330963,
-0.17293286323547363,
-0.006595611572265625,
0.12380200624465942,
-0.08528485894203186,
-0.3055155277252197,
-0.3097773492336273,
-0.028955258429050446,
-0.01477869600057602,
-0.3141164183616638,
-0.03686857223510742,
0.08334363996982574,
0.20476031303405762,
-0.05829574167728424,
-0.16492816805839539,
0.021231040358543396,
-0.16649062931537628,
-0.053837504237890244,
0.460173100233078,
0.11685067415237427,
0.010777253657579422,
-0.1815735250711441,
0.27387508749961853,
-0.1925514042377472,
-0.07203549891710281,
-0.06382530927658081,
0.14125052094459534,
0.2384059727191925,
0.016511058434844017,
0.2739916741847992,
0.1854221671819687,
-0.2867198884487152,
0.0186051856726408,
-0.13345463573932648,
-0.07230643928050995,
-0.13479791581630707,
-0.19475454092025757,
-0.2019980102777481,
-0.014826148748397827,
-0.24602776765823364,
-0.0333879217505455,
-0.3753420412540436,
-0.1089605763554573,
0.21556541323661804,
0.14016279578208923,
0.0316162034869194,
-0.3143399655818939,
0.11714324355125427,
0.09932039678096771,
0.5172010660171509,
0.42854052782058716,
0.08670754730701447,
0.12318995594978333,
0.042850181460380554,
-0.5783221125602722,
0.22780343890190125,
0.29658544063568115,
0.06780662387609482,
-0.030381016433238983,
0.0950375571846962,
0.22341209650039673,
0.0191210750490427,
-0.11063645780086517,
-0.11537916958332062,
-0.21519607305526733,
-0.016247384250164032,
-0.023271922022104263,
0.02583615481853485,
-0.025064460933208466,
0.0213729590177536,
0.1532779037952423,
-0.11374412477016449,
0.08451290428638458,
0.00505372229963541,
0.07120713591575623,
-0.307528018951416,
0.4020260274410248,
-0.0004113484174013138,
-0.3541882634162903,
0.15756359696388245,
0.06889981031417847,
0.3390197157859802,
-0.2713768482208252,
-0.24893034994602203,
-0.24004629254341125,
-0.21080003678798676,
-0.3391987681388855,
0.06760917603969574,
-0.10562387108802795,
0.2236470878124237,
-0.03040476143360138,
-0.3850744664669037,
0.11981836706399918,
0.041660990566015244,
0.2724207639694214,
-0.11192063987255096,
-0.02211277186870575,
0.17159071564674377,
0.07038842886686325,
-0.11055678874254227,
0.1454392969608307,
0.4446714520454407,
-0.18845060467720032,
0.16606490314006805,
-0.1623445749282837,
-0.5046707987785339,
0.44825446605682373,
-0.39294591546058655,
-0.22820717096328735,
0.09581170976161957,
0.13896937668323517,
-0.023261524736881256,
-0.3772032558917999,
-0.44491615891456604,
0.20281586050987244,
0.2419271618127823,
0.08262933790683746,
-0.20481868088245392,
0.43079137802124023,
0.18937887251377106,
-0.12176032364368439,
-0.23391878604888916,
0.36720821261405945,
0.17876601219177246,
-0.07949063181877136,
-0.06519502401351929,
-0.16164548695087433
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | Hi hi, instead of using `download_and_extract` function, I only use `download` function: `base_dir = Path(dl_manager.download(urls))`. It turns out that the code works for `datasets==2.2.2`, however, it doesn't work with `datasets==2.4.0`. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 30 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
Hi hi, instead of using `download_and_extract` function, I only use `download` function: `base_dir = Path(dl_manager.download(urls))`. It turns out that the code works for `datasets==2.2.2`, however, it doesn't work with `datasets==2.4.0`. | [
-0.22395770251750946,
0.1329294741153717,
0.0017217844724655151,
0.4737096428871155,
0.568895161151886,
0.08158870786428452,
0.35390034317970276,
0.3585244119167328,
0.5213257670402527,
0.40628087520599365,
-0.20903171598911285,
0.40095254778862,
-0.01900530233979225,
0.11190696805715561,
0.0007781274616718292,
-0.015242673456668854,
-0.057524122297763824,
0.16364066302776337,
0.09544655680656433,
-0.04538639634847641,
-0.5809697508811951,
0.021519383415579796,
-0.13573212921619415,
0.18114641308784485,
-0.03152000904083252,
0.008559893816709518,
0.14318034052848816,
0.14365696907043457,
-0.3081880509853363,
-0.5212625861167908,
0.3294975459575653,
-0.14277659356594086,
0.07203561067581177,
0.26483574509620667,
-0.00010780533193610609,
0.14262321591377258,
0.3875703811645508,
-0.00824439711868763,
-0.3284680247306824,
0.006479397416114807,
-0.4962732791900635,
0.055428169667720795,
0.23173655569553375,
-0.36549606919288635,
-0.22451478242874146,
-0.4096270203590393,
-0.26614701747894287,
-0.49591127038002014,
0.10109866410493851,
0.2633983790874481,
0.20943835377693176,
0.22911997139453888,
0.2991964817047119,
-0.1409880667924881,
0.5565750598907471,
-0.31410616636276245,
-0.1128317266702652,
0.16805845499038696,
0.28044503927230835,
0.0939013883471489,
-0.04186146706342697,
0.20279642939567566,
-0.06651579588651657,
0.34332770109176636,
0.4734589755535126,
0.013490011915564537,
0.35954126715660095,
0.06941317021846771,
-0.08372962474822998,
0.0017352290451526642,
0.17642104625701904,
-0.2310713529586792,
-0.21196331083774567,
-0.2082987129688263,
0.3122035264968872,
-0.5401394963264465,
0.290854275226593,
0.04829370975494385,
0.03518527373671532,
0.07483594119548798,
0.2162129133939743,
-0.09057214111089706,
-0.09025873243808746,
0.13427215814590454,
-0.08396019041538239,
0.1984325349330902,
-0.26633960008621216,
-0.06909634917974472,
0.18997158110141754,
0.08808194100856781,
0.4482201933860779,
-0.057375334203243256,
-0.1485976278781891,
0.021022651344537735,
-0.20346660912036896,
0.13080337643623352,
0.006247133016586304,
0.07560770213603973,
-0.05436922609806061,
0.2109176218509674,
0.31655532121658325,
-0.2471049726009369,
0.09579658508300781,
0.14540785551071167,
0.23907530307769775,
0.1270173192024231,
-0.048290155827999115,
0.10251282155513763,
0.04385918006300926,
0.03744872286915779,
-0.04316578432917595,
-0.14642760157585144,
-0.10715429484844208,
0.017504774034023285,
0.08702775835990906,
0.14183542132377625,
0.3728981018066406,
-0.12858162820339203,
-0.5220284461975098,
0.19368812441825867,
-0.1260836273431778,
-0.19424735009670258,
0.10650711506605148,
0.33439338207244873,
-0.05171288549900055,
-0.07031805068254471,
0.3032742142677307,
0.16701653599739075,
-0.19598296284675598,
-0.48701050877571106,
-0.21939672529697418,
0.23025508224964142,
-0.2139182686805725,
-0.25710999965667725,
-0.06142568588256836,
-0.21088355779647827,
0.10060391575098038,
-0.18419061601161957,
-0.14437130093574524,
-0.31088966131210327,
0.04179631173610687,
-0.20254690945148468,
0.16061268746852875,
0.26155802607536316,
0.23681369423866272,
0.02917141653597355,
0.133590430021286,
-0.559554934501648,
0.005013413727283478,
0.20780983567237854,
-0.2356697916984558,
-0.25459617376327515,
-0.0660664513707161,
0.2216053158044815,
-0.08839733153581619,
0.1494787633419037,
-0.11345478147268295,
-0.30043214559555054,
-0.08658518642187119,
-0.16987401247024536,
-0.048958368599414825,
-0.1927136480808258,
0.017986584454774857,
-0.16749028861522675,
0.4114718437194824,
0.49458247423171997,
0.11953963339328766,
0.09386175870895386,
-0.3940531015396118,
-0.10029584169387817,
-0.03103228658437729,
0.004370454698801041,
-0.12723316252231598,
0.42006632685661316,
-0.03817468136548996,
0.10121400654315948,
0.38442739844322205,
-0.3391105532646179,
-0.5720916390419006,
0.20973993837833405,
-0.06250122934579849,
-0.0012667812407016754,
0.04401572421193123,
0.1807422935962677,
0.4111280143260956,
-0.06638666987419128,
0.2026480734348297,
0.3701593279838562,
0.05743023753166199,
0.14122986793518066,
-0.10423588007688522,
-0.21461381018161774,
0.24336737394332886,
0.05352659150958061,
0.07273949682712555,
0.0054283589124679565,
0.3212997317314148,
-0.05721905454993248,
0.1428402066230774,
-0.10193474590778351,
-0.06851702928543091,
0.06030404567718506,
0.1015702486038208,
-0.11189986765384674,
-0.04697367548942566,
-0.16143035888671875,
-0.3177679181098938,
-0.00238138809800148,
0.13319480419158936,
-0.3394277095794678,
-0.05893002450466156,
-0.09329506009817123,
-0.4838675558567047,
0.07353775203227997,
-0.4730508029460907,
-0.2946585714817047,
0.17230980098247528,
0.11117593199014664,
-0.07029388844966888,
0.12074537575244904,
-0.17187634110450745,
0.2077803611755371,
-0.21992623805999756,
0.19794777035713196,
-0.5623967051506042,
0.19731688499450684,
-0.07359261065721512,
-0.22428512573242188,
0.10018640756607056,
0.1618136763572693,
0.15031962096691132,
-0.07647247612476349,
-0.3538355231285095,
0.4993545114994049,
0.09776878356933594,
0.203293114900589,
-0.15994301438331604,
0.12510895729064941,
0.04987668991088867,
-0.1441851109266281,
0.0118582583963871,
0.18810145556926727,
0.4616028964519501,
-0.05378033220767975,
-0.1138446256518364,
0.1331312209367752,
-0.2177756279706955,
-0.006897374987602234,
0.16069571673870087,
0.07899419963359833,
0.0313328355550766,
-0.02409839816391468,
-0.2341141253709793,
-0.0723404660820961,
0.14141876995563507,
0.22287297248840332,
0.21960078179836273,
0.07694195210933685,
-0.35896554589271545,
-0.17016735672950745,
0.427695095539093,
0.12273652851581573,
0.33988213539123535,
-0.2151789665222168,
-0.5229853987693787,
0.19068598747253418,
-0.04240971803665161,
0.547608494758606,
0.19963881373405457,
0.17230044305324554,
-0.13318218290805817,
0.06470116227865219,
0.05759770795702934,
-0.11981996893882751,
0.2791821360588074,
0.07445196062326431,
0.2518116533756256,
0.13732290267944336,
-0.14910060167312622,
0.08774352818727493,
-0.3328001797199249,
-0.08883191645145416,
0.038612134754657745,
0.5031018853187561,
-0.45184648036956787,
-0.03136361762881279,
-0.13903021812438965,
0.19542601704597473,
-0.08374505490064621,
-0.5564721822738647,
0.12392452359199524,
-0.3701889216899872,
-0.16824187338352203,
0.34525391459465027,
-0.11954395473003387,
-0.07305020838975906,
-0.37116825580596924,
0.09834751486778259,
0.09380296617746353,
-0.04324593394994736,
-0.23594120144844055,
-0.242514967918396,
-0.07538320124149323,
0.039953041821718216,
0.2585369646549225,
0.2221779078245163,
0.3246936500072479,
-0.25052565336227417,
0.32605451345443726,
0.02320471964776516,
0.1812467873096466,
0.025186603888869286,
-0.10411819815635681,
0.13234291970729828,
-0.00036104023456573486,
0.13932539522647858,
0.16212677955627441,
-0.2014092653989792,
0.31636521220207214,
-0.19298918545246124,
-0.1475219875574112,
0.17659468948841095,
0.26667749881744385,
-0.24452538788318634,
0.02375894784927368,
-0.7141469120979309,
0.042441435158252716,
-0.40751755237579346,
-0.02211538702249527,
0.07760001718997955,
-0.0267830491065979,
-0.021711383014917374,
0.11595869064331055,
0.15934988856315613,
0.18715053796768188,
0.05404219031333923,
-0.1151392012834549,
-0.12142252922058105,
0.5125563740730286,
-0.2707633674144745,
-0.3217809796333313,
0.06982728838920593,
-0.10503555089235306,
0.10391815751791,
0.12045503407716751,
-0.317396342754364,
0.19710510969161987,
-0.30019906163215637,
-0.1944730132818222,
-0.16783374547958374,
-0.006736336275935173,
0.2976502776145935,
0.2997097373008728,
-0.06862562894821167,
-0.11592079699039459,
-0.11911818385124207,
-0.08528856188058853,
-0.24104636907577515,
-0.11336571723222733,
-0.08579909056425095,
0.1377083957195282,
-0.12413997948169708,
0.055795539170503616,
-0.056692905724048615,
0.028520384803414345,
0.32619622349739075,
-0.23711875081062317,
0.1987929791212082,
-0.13165560364723206,
-0.594427764415741,
0.006469304673373699,
-0.20365509390830994,
-0.017194241285324097,
0.07878303527832031,
-0.12743732333183289,
0.2001625895500183,
-0.21625256538391113,
-0.13549767434597015,
-0.455399751663208,
-0.2557535469532013,
-0.08623950183391571,
0.050724200904369354,
0.09727869927883148,
-0.15277419984340668,
0.4092644453048706,
-0.08678710460662842,
-0.06569138914346695,
0.276680052280426,
0.09294520318508148,
0.13665200769901276,
-0.12719187140464783,
0.2923419177532196,
-0.12354882806539536,
-0.13085994124412537,
0.24995188415050507,
-0.15019084513187408,
0.1819303333759308,
0.20989049971103668,
-0.035878438502550125,
0.24687737226486206,
-0.14413027465343475,
0.39853543043136597,
0.027876324951648712,
0.36377787590026855,
0.2431190013885498,
-0.028351131826639175,
-0.30064481496810913,
0.03175760433077812,
-0.4031108617782593,
-0.14846962690353394,
-0.07720860838890076,
0.2190912514925003,
-0.06150420010089874,
-0.029850924387574196,
0.6144877672195435,
-0.1404901146888733,
-0.17726360261440277,
-0.09493176639080048,
-0.013439875096082687,
-0.2600286900997162,
-0.4077506959438324,
0.2069709599018097,
0.12877348065376282,
0.39474114775657654,
0.08377046883106232,
0.036517854779958725,
-0.43476995825767517,
-0.1772901713848114,
-0.015394061803817749,
0.18436595797538757,
0.264702171087265,
0.08841734379529953,
0.2179241180419922,
0.18159005045890808,
0.12554572522640228,
0.19552068412303925,
0.659494161605835,
-0.03289426490664482,
-0.45511937141418457,
-0.05274348706007004,
-0.36449864506721497,
0.1140742301940918,
0.0278627872467041,
-0.136687234044075,
-0.08897919207811356,
-0.2225528210401535,
-0.25513219833374023,
-0.1804434359073639,
-0.13865448534488678,
0.36167600750923157,
0.009072617627680302,
-0.026067474856972694,
-0.3928919732570648,
0.5616773366928101,
0.04950820282101631,
-0.010593652725219727,
0.3779745101928711,
0.23752397298812866,
-0.07227079570293427,
0.01410137489438057,
0.21780511736869812,
0.6930732131004333,
0.013273011893033981,
-0.13385815918445587,
0.6125252842903137,
-0.2927969694137573,
-0.1309875249862671,
-0.1515270471572876,
0.11991865932941437,
-0.38977500796318054,
-0.3678615689277649,
-0.037809520959854126,
-0.11517272889614105,
0.48220667243003845,
-0.039685413241386414,
0.07511121034622192,
0.011019737459719181,
-0.048561930656433105,
-0.256838858127594,
-0.1250326782464981,
0.2905901372432709,
-0.17626458406448364,
-0.1200176477432251,
-0.33673644065856934,
0.1378319412469864,
-0.058205172419548035,
0.1591893583536148,
0.17748397588729858,
-0.05766426771879196,
0.049380671232938766,
-0.13874834775924683,
-0.06834504008293152,
0.22884151339530945,
-0.2824099659919739,
0.018696893006563187,
-0.1869087964296341,
-0.6097549200057983,
0.28430989384651184,
0.2275279313325882,
0.07271742820739746,
0.12170317769050598,
-0.14206284284591675,
0.14915117621421814,
-0.09770888835191727,
-0.037008218467235565,
-0.12937796115875244,
0.1053709015250206,
0.3830547630786896,
0.06959809362888336,
-0.1484304517507553,
0.19650942087173462,
-0.00005676504224538803,
-0.1329338252544403,
0.3113933801651001,
0.17757713794708252,
0.2381243109703064,
-0.36183962225914,
-0.13161562383174896,
-0.027342654764652252,
0.047574881464242935,
-0.2822435200214386,
0.15118055045604706,
0.012247104197740555,
-0.08379075676202774,
-0.002504698932170868,
0.088445283472538,
-0.38628870248794556,
0.015012447722256184,
0.20241042971611023,
0.30347302556037903,
0.41144534945487976,
0.5327016115188599,
0.08465509116649628,
-0.13744047284126282,
-0.3091373145580292,
0.09922672063112259,
0.7074678540229797,
-0.26635900139808655,
0.12169716507196426,
-0.28696733713150024,
0.22858460247516632,
-0.18233472108840942,
0.22204360365867615,
0.05407770350575447,
0.020800456404685974,
-0.06360622495412827,
-0.5093861818313599,
-0.14220063388347626,
0.1388179510831833,
0.16938519477844238,
0.17137886583805084,
0.13693976402282715,
0.05728754773736,
-0.019253510981798172,
0.018176985904574394,
-0.3057464063167572,
0.23082312941551208,
-0.05318932980298996,
0.03750523924827576,
0.44950342178344727,
0.1368636041879654,
0.21441885828971863,
-0.1713259518146515,
0.16517430543899536,
0.002049928531050682,
-0.053981803357601166,
-0.2138494849205017,
-0.22267577052116394,
0.09596067667007446,
-0.0021140724420547485,
0.04934350401163101,
-0.10366076976060867,
-0.34590065479278564,
-0.15248426795005798,
-0.3284830152988434,
-0.006126074120402336,
0.10830209404230118,
-0.13873295485973358,
0.11131814867258072,
0.12183639407157898,
0.1016443520784378,
-0.08662357926368713,
0.23207032680511475,
-0.42355450987815857,
-0.016934171319007874,
-0.11486701667308807,
0.06592205166816711,
0.12927599251270294,
0.09400792419910431,
-0.2985394299030304,
-0.08946732431650162,
-0.1471390724182129,
0.2961325943470001,
0.5829503536224365,
-0.25732284784317017,
0.09707172214984894,
-0.0016111331060528755,
0.17154306173324585,
0.22417844831943512,
-0.22298254072666168,
0.02265583537518978,
0.06099999323487282,
0.212324857711792,
-0.37191829085350037,
0.025351278483867645,
0.2573859989643097,
-0.07966173440217972,
0.20592430233955383,
0.17422336339950562,
-0.18983423709869385,
0.17082953453063965,
-0.4295864701271057,
0.10183592885732651,
0.20296071469783783,
-0.17595736682415009,
0.14176279306411743,
0.3704574704170227,
-0.26056379079818726,
-0.13157635927200317,
0.22510439157485962,
0.26713234186172485,
-0.07001449912786484,
0.5760083794593811,
-0.043131761252880096,
0.07081694155931473,
0.4270486533641815,
0.0699903592467308,
-0.24822330474853516,
-0.3110007047653198,
0.3022071123123169,
-0.09824973344802856,
-0.33572232723236084,
0.15567368268966675,
0.25799891352653503,
-0.01872830092906952,
-0.16645345091819763,
0.2814091145992279,
-0.2052573412656784,
0.09134551882743835,
-0.02062920480966568,
0.2471776306629181,
-0.02132847160100937,
-0.1630566567182541,
-0.19906660914421082,
-0.11219228804111481,
-0.0728871077299118,
-0.1710871309041977,
0.336944580078125,
-0.002083495259284973,
-0.14397719502449036,
-0.36691415309906006,
0.29842907190322876,
0.1205233708024025,
0.24237379431724548,
-0.5542211532592773,
0.16868937015533447,
-0.14613227546215057,
0.2529730200767517,
0.06027824059128761,
0.5711065530776978,
0.34690481424331665,
0.3080393970012665,
-0.1624889075756073,
-0.15325544774532318,
-0.00861554779112339,
-0.39921435713768005,
-0.03551800921559334,
0.15440799295902252,
0.024929530918598175,
0.38328316807746887,
0.3728399872779846,
0.20190560817718506,
-0.15299402177333832,
-0.05233922228217125,
0.15950438380241394,
0.08943800628185272,
-0.2769966721534729,
0.4488206207752228,
-0.07022669166326523,
-0.3105451464653015,
-0.2414381206035614,
-0.15524297952651978,
-0.4252392053604126,
-0.22952893376350403,
0.11521212756633759,
-0.05257793888449669,
0.22112348675727844,
-0.07214605063199997,
0.09548938274383545,
0.13173402845859528,
0.2501939535140991,
0.3810420632362366,
-0.13061097264289856,
-0.2810116112232208,
-0.04427431523799896,
-0.6727177500724792,
0.2869771122932434,
-0.09145456552505493,
-0.17054709792137146,
0.04379117488861084,
0.027618905529379845,
-0.06104172021150589,
0.2797980308532715,
0.2564498782157898,
0.23011541366577148,
0.06695201992988586,
0.4487813711166382,
-0.2156989425420761,
-0.1686227172613144,
0.13630782067775726,
-0.06866021454334259,
-0.17265275120735168,
-0.07412530481815338,
0.13072702288627625,
0.09012126922607422,
0.1352599561214447,
0.11609002202749252,
0.07631237804889679,
0.1114899069070816,
-0.2012052834033966,
0.3803287744522095,
0.0907389298081398,
0.5059734582901001,
-0.13130450248718262,
0.07271537184715271,
-0.08926127851009369,
0.08011345565319061,
-0.015153941698372364,
0.49741867184638977,
0.24957071244716644,
0.1011846661567688,
0.06529557704925537,
-0.4659405052661896,
-0.4616118371486664,
0.16441276669502258,
-0.1931637078523636,
0.5235896110534668,
-0.4295758008956909,
0.2939082682132721,
-0.09590206295251846,
0.14677560329437256,
-0.036467358469963074,
-0.11595135182142258,
-0.10640797019004822,
0.19680669903755188,
-0.16392582654953003,
-0.26339712738990784,
0.1926536113023758,
-0.3973512351512909,
-0.2507685124874115,
-0.07658226042985916,
0.2562633156776428,
0.16313287615776062,
0.0670301765203476,
-0.3767915964126587,
0.22876682877540588,
0.31301355361938477,
-0.2053418755531311,
-0.13427312672138214,
-0.011564360931515694,
-0.10763363540172577,
0.16739648580551147,
0.0032354071736335754,
0.2170044630765915,
0.15919211506843567,
-0.041047751903533936,
0.09051358699798584,
-0.23549611866474152
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | Hi @yana-xuyan, thanks for reporting.
Indeed you already found the answer: an Excel file should be just downloaded and not downloaded-and-extracted.
The reason why is that if you call also extract, our library will try to infer the compression format (and extract it). And Excel files are viewed as ZIP files and extracted as so (into a directory). This is because the Office Open XML is indeed a zipped file under the hood): https://en.wikipedia.org/wiki/Office_Open_XML
> Office Open XML (also informally known as OOXML) is a **zipped**, XML-based file format
```python
import zipfile
zipfile.is_zipfile("filename.xlsx")
```
returns `True`. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 96 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
Hi @yana-xuyan, thanks for reporting.
Indeed you already found the answer: an Excel file should be just downloaded and not downloaded-and-extracted.
The reason why is that if you call also extract, our library will try to infer the compression format (and extract it). And Excel files are viewed as ZIP files and extracted as so (into a directory). This is because the Office Open XML is indeed a zipped file under the hood): https://en.wikipedia.org/wiki/Office_Open_XML
> Office Open XML (also informally known as OOXML) is a **zipped**, XML-based file format
```python
import zipfile
zipfile.is_zipfile("filename.xlsx")
```
returns `True`. | [
-0.22395770251750946,
0.1329294741153717,
0.0017217844724655151,
0.4737096428871155,
0.568895161151886,
0.08158870786428452,
0.35390034317970276,
0.3585244119167328,
0.5213257670402527,
0.40628087520599365,
-0.20903171598911285,
0.40095254778862,
-0.01900530233979225,
0.11190696805715561,
0.0007781274616718292,
-0.015242673456668854,
-0.057524122297763824,
0.16364066302776337,
0.09544655680656433,
-0.04538639634847641,
-0.5809697508811951,
0.021519383415579796,
-0.13573212921619415,
0.18114641308784485,
-0.03152000904083252,
0.008559893816709518,
0.14318034052848816,
0.14365696907043457,
-0.3081880509853363,
-0.5212625861167908,
0.3294975459575653,
-0.14277659356594086,
0.07203561067581177,
0.26483574509620667,
-0.00010780533193610609,
0.14262321591377258,
0.3875703811645508,
-0.00824439711868763,
-0.3284680247306824,
0.006479397416114807,
-0.4962732791900635,
0.055428169667720795,
0.23173655569553375,
-0.36549606919288635,
-0.22451478242874146,
-0.4096270203590393,
-0.26614701747894287,
-0.49591127038002014,
0.10109866410493851,
0.2633983790874481,
0.20943835377693176,
0.22911997139453888,
0.2991964817047119,
-0.1409880667924881,
0.5565750598907471,
-0.31410616636276245,
-0.1128317266702652,
0.16805845499038696,
0.28044503927230835,
0.0939013883471489,
-0.04186146706342697,
0.20279642939567566,
-0.06651579588651657,
0.34332770109176636,
0.4734589755535126,
0.013490011915564537,
0.35954126715660095,
0.06941317021846771,
-0.08372962474822998,
0.0017352290451526642,
0.17642104625701904,
-0.2310713529586792,
-0.21196331083774567,
-0.2082987129688263,
0.3122035264968872,
-0.5401394963264465,
0.290854275226593,
0.04829370975494385,
0.03518527373671532,
0.07483594119548798,
0.2162129133939743,
-0.09057214111089706,
-0.09025873243808746,
0.13427215814590454,
-0.08396019041538239,
0.1984325349330902,
-0.26633960008621216,
-0.06909634917974472,
0.18997158110141754,
0.08808194100856781,
0.4482201933860779,
-0.057375334203243256,
-0.1485976278781891,
0.021022651344537735,
-0.20346660912036896,
0.13080337643623352,
0.006247133016586304,
0.07560770213603973,
-0.05436922609806061,
0.2109176218509674,
0.31655532121658325,
-0.2471049726009369,
0.09579658508300781,
0.14540785551071167,
0.23907530307769775,
0.1270173192024231,
-0.048290155827999115,
0.10251282155513763,
0.04385918006300926,
0.03744872286915779,
-0.04316578432917595,
-0.14642760157585144,
-0.10715429484844208,
0.017504774034023285,
0.08702775835990906,
0.14183542132377625,
0.3728981018066406,
-0.12858162820339203,
-0.5220284461975098,
0.19368812441825867,
-0.1260836273431778,
-0.19424735009670258,
0.10650711506605148,
0.33439338207244873,
-0.05171288549900055,
-0.07031805068254471,
0.3032742142677307,
0.16701653599739075,
-0.19598296284675598,
-0.48701050877571106,
-0.21939672529697418,
0.23025508224964142,
-0.2139182686805725,
-0.25710999965667725,
-0.06142568588256836,
-0.21088355779647827,
0.10060391575098038,
-0.18419061601161957,
-0.14437130093574524,
-0.31088966131210327,
0.04179631173610687,
-0.20254690945148468,
0.16061268746852875,
0.26155802607536316,
0.23681369423866272,
0.02917141653597355,
0.133590430021286,
-0.559554934501648,
0.005013413727283478,
0.20780983567237854,
-0.2356697916984558,
-0.25459617376327515,
-0.0660664513707161,
0.2216053158044815,
-0.08839733153581619,
0.1494787633419037,
-0.11345478147268295,
-0.30043214559555054,
-0.08658518642187119,
-0.16987401247024536,
-0.048958368599414825,
-0.1927136480808258,
0.017986584454774857,
-0.16749028861522675,
0.4114718437194824,
0.49458247423171997,
0.11953963339328766,
0.09386175870895386,
-0.3940531015396118,
-0.10029584169387817,
-0.03103228658437729,
0.004370454698801041,
-0.12723316252231598,
0.42006632685661316,
-0.03817468136548996,
0.10121400654315948,
0.38442739844322205,
-0.3391105532646179,
-0.5720916390419006,
0.20973993837833405,
-0.06250122934579849,
-0.0012667812407016754,
0.04401572421193123,
0.1807422935962677,
0.4111280143260956,
-0.06638666987419128,
0.2026480734348297,
0.3701593279838562,
0.05743023753166199,
0.14122986793518066,
-0.10423588007688522,
-0.21461381018161774,
0.24336737394332886,
0.05352659150958061,
0.07273949682712555,
0.0054283589124679565,
0.3212997317314148,
-0.05721905454993248,
0.1428402066230774,
-0.10193474590778351,
-0.06851702928543091,
0.06030404567718506,
0.1015702486038208,
-0.11189986765384674,
-0.04697367548942566,
-0.16143035888671875,
-0.3177679181098938,
-0.00238138809800148,
0.13319480419158936,
-0.3394277095794678,
-0.05893002450466156,
-0.09329506009817123,
-0.4838675558567047,
0.07353775203227997,
-0.4730508029460907,
-0.2946585714817047,
0.17230980098247528,
0.11117593199014664,
-0.07029388844966888,
0.12074537575244904,
-0.17187634110450745,
0.2077803611755371,
-0.21992623805999756,
0.19794777035713196,
-0.5623967051506042,
0.19731688499450684,
-0.07359261065721512,
-0.22428512573242188,
0.10018640756607056,
0.1618136763572693,
0.15031962096691132,
-0.07647247612476349,
-0.3538355231285095,
0.4993545114994049,
0.09776878356933594,
0.203293114900589,
-0.15994301438331604,
0.12510895729064941,
0.04987668991088867,
-0.1441851109266281,
0.0118582583963871,
0.18810145556926727,
0.4616028964519501,
-0.05378033220767975,
-0.1138446256518364,
0.1331312209367752,
-0.2177756279706955,
-0.006897374987602234,
0.16069571673870087,
0.07899419963359833,
0.0313328355550766,
-0.02409839816391468,
-0.2341141253709793,
-0.0723404660820961,
0.14141876995563507,
0.22287297248840332,
0.21960078179836273,
0.07694195210933685,
-0.35896554589271545,
-0.17016735672950745,
0.427695095539093,
0.12273652851581573,
0.33988213539123535,
-0.2151789665222168,
-0.5229853987693787,
0.19068598747253418,
-0.04240971803665161,
0.547608494758606,
0.19963881373405457,
0.17230044305324554,
-0.13318218290805817,
0.06470116227865219,
0.05759770795702934,
-0.11981996893882751,
0.2791821360588074,
0.07445196062326431,
0.2518116533756256,
0.13732290267944336,
-0.14910060167312622,
0.08774352818727493,
-0.3328001797199249,
-0.08883191645145416,
0.038612134754657745,
0.5031018853187561,
-0.45184648036956787,
-0.03136361762881279,
-0.13903021812438965,
0.19542601704597473,
-0.08374505490064621,
-0.5564721822738647,
0.12392452359199524,
-0.3701889216899872,
-0.16824187338352203,
0.34525391459465027,
-0.11954395473003387,
-0.07305020838975906,
-0.37116825580596924,
0.09834751486778259,
0.09380296617746353,
-0.04324593394994736,
-0.23594120144844055,
-0.242514967918396,
-0.07538320124149323,
0.039953041821718216,
0.2585369646549225,
0.2221779078245163,
0.3246936500072479,
-0.25052565336227417,
0.32605451345443726,
0.02320471964776516,
0.1812467873096466,
0.025186603888869286,
-0.10411819815635681,
0.13234291970729828,
-0.00036104023456573486,
0.13932539522647858,
0.16212677955627441,
-0.2014092653989792,
0.31636521220207214,
-0.19298918545246124,
-0.1475219875574112,
0.17659468948841095,
0.26667749881744385,
-0.24452538788318634,
0.02375894784927368,
-0.7141469120979309,
0.042441435158252716,
-0.40751755237579346,
-0.02211538702249527,
0.07760001718997955,
-0.0267830491065979,
-0.021711383014917374,
0.11595869064331055,
0.15934988856315613,
0.18715053796768188,
0.05404219031333923,
-0.1151392012834549,
-0.12142252922058105,
0.5125563740730286,
-0.2707633674144745,
-0.3217809796333313,
0.06982728838920593,
-0.10503555089235306,
0.10391815751791,
0.12045503407716751,
-0.317396342754364,
0.19710510969161987,
-0.30019906163215637,
-0.1944730132818222,
-0.16783374547958374,
-0.006736336275935173,
0.2976502776145935,
0.2997097373008728,
-0.06862562894821167,
-0.11592079699039459,
-0.11911818385124207,
-0.08528856188058853,
-0.24104636907577515,
-0.11336571723222733,
-0.08579909056425095,
0.1377083957195282,
-0.12413997948169708,
0.055795539170503616,
-0.056692905724048615,
0.028520384803414345,
0.32619622349739075,
-0.23711875081062317,
0.1987929791212082,
-0.13165560364723206,
-0.594427764415741,
0.006469304673373699,
-0.20365509390830994,
-0.017194241285324097,
0.07878303527832031,
-0.12743732333183289,
0.2001625895500183,
-0.21625256538391113,
-0.13549767434597015,
-0.455399751663208,
-0.2557535469532013,
-0.08623950183391571,
0.050724200904369354,
0.09727869927883148,
-0.15277419984340668,
0.4092644453048706,
-0.08678710460662842,
-0.06569138914346695,
0.276680052280426,
0.09294520318508148,
0.13665200769901276,
-0.12719187140464783,
0.2923419177532196,
-0.12354882806539536,
-0.13085994124412537,
0.24995188415050507,
-0.15019084513187408,
0.1819303333759308,
0.20989049971103668,
-0.035878438502550125,
0.24687737226486206,
-0.14413027465343475,
0.39853543043136597,
0.027876324951648712,
0.36377787590026855,
0.2431190013885498,
-0.028351131826639175,
-0.30064481496810913,
0.03175760433077812,
-0.4031108617782593,
-0.14846962690353394,
-0.07720860838890076,
0.2190912514925003,
-0.06150420010089874,
-0.029850924387574196,
0.6144877672195435,
-0.1404901146888733,
-0.17726360261440277,
-0.09493176639080048,
-0.013439875096082687,
-0.2600286900997162,
-0.4077506959438324,
0.2069709599018097,
0.12877348065376282,
0.39474114775657654,
0.08377046883106232,
0.036517854779958725,
-0.43476995825767517,
-0.1772901713848114,
-0.015394061803817749,
0.18436595797538757,
0.264702171087265,
0.08841734379529953,
0.2179241180419922,
0.18159005045890808,
0.12554572522640228,
0.19552068412303925,
0.659494161605835,
-0.03289426490664482,
-0.45511937141418457,
-0.05274348706007004,
-0.36449864506721497,
0.1140742301940918,
0.0278627872467041,
-0.136687234044075,
-0.08897919207811356,
-0.2225528210401535,
-0.25513219833374023,
-0.1804434359073639,
-0.13865448534488678,
0.36167600750923157,
0.009072617627680302,
-0.026067474856972694,
-0.3928919732570648,
0.5616773366928101,
0.04950820282101631,
-0.010593652725219727,
0.3779745101928711,
0.23752397298812866,
-0.07227079570293427,
0.01410137489438057,
0.21780511736869812,
0.6930732131004333,
0.013273011893033981,
-0.13385815918445587,
0.6125252842903137,
-0.2927969694137573,
-0.1309875249862671,
-0.1515270471572876,
0.11991865932941437,
-0.38977500796318054,
-0.3678615689277649,
-0.037809520959854126,
-0.11517272889614105,
0.48220667243003845,
-0.039685413241386414,
0.07511121034622192,
0.011019737459719181,
-0.048561930656433105,
-0.256838858127594,
-0.1250326782464981,
0.2905901372432709,
-0.17626458406448364,
-0.1200176477432251,
-0.33673644065856934,
0.1378319412469864,
-0.058205172419548035,
0.1591893583536148,
0.17748397588729858,
-0.05766426771879196,
0.049380671232938766,
-0.13874834775924683,
-0.06834504008293152,
0.22884151339530945,
-0.2824099659919739,
0.018696893006563187,
-0.1869087964296341,
-0.6097549200057983,
0.28430989384651184,
0.2275279313325882,
0.07271742820739746,
0.12170317769050598,
-0.14206284284591675,
0.14915117621421814,
-0.09770888835191727,
-0.037008218467235565,
-0.12937796115875244,
0.1053709015250206,
0.3830547630786896,
0.06959809362888336,
-0.1484304517507553,
0.19650942087173462,
-0.00005676504224538803,
-0.1329338252544403,
0.3113933801651001,
0.17757713794708252,
0.2381243109703064,
-0.36183962225914,
-0.13161562383174896,
-0.027342654764652252,
0.047574881464242935,
-0.2822435200214386,
0.15118055045604706,
0.012247104197740555,
-0.08379075676202774,
-0.002504698932170868,
0.088445283472538,
-0.38628870248794556,
0.015012447722256184,
0.20241042971611023,
0.30347302556037903,
0.41144534945487976,
0.5327016115188599,
0.08465509116649628,
-0.13744047284126282,
-0.3091373145580292,
0.09922672063112259,
0.7074678540229797,
-0.26635900139808655,
0.12169716507196426,
-0.28696733713150024,
0.22858460247516632,
-0.18233472108840942,
0.22204360365867615,
0.05407770350575447,
0.020800456404685974,
-0.06360622495412827,
-0.5093861818313599,
-0.14220063388347626,
0.1388179510831833,
0.16938519477844238,
0.17137886583805084,
0.13693976402282715,
0.05728754773736,
-0.019253510981798172,
0.018176985904574394,
-0.3057464063167572,
0.23082312941551208,
-0.05318932980298996,
0.03750523924827576,
0.44950342178344727,
0.1368636041879654,
0.21441885828971863,
-0.1713259518146515,
0.16517430543899536,
0.002049928531050682,
-0.053981803357601166,
-0.2138494849205017,
-0.22267577052116394,
0.09596067667007446,
-0.0021140724420547485,
0.04934350401163101,
-0.10366076976060867,
-0.34590065479278564,
-0.15248426795005798,
-0.3284830152988434,
-0.006126074120402336,
0.10830209404230118,
-0.13873295485973358,
0.11131814867258072,
0.12183639407157898,
0.1016443520784378,
-0.08662357926368713,
0.23207032680511475,
-0.42355450987815857,
-0.016934171319007874,
-0.11486701667308807,
0.06592205166816711,
0.12927599251270294,
0.09400792419910431,
-0.2985394299030304,
-0.08946732431650162,
-0.1471390724182129,
0.2961325943470001,
0.5829503536224365,
-0.25732284784317017,
0.09707172214984894,
-0.0016111331060528755,
0.17154306173324585,
0.22417844831943512,
-0.22298254072666168,
0.02265583537518978,
0.06099999323487282,
0.212324857711792,
-0.37191829085350037,
0.025351278483867645,
0.2573859989643097,
-0.07966173440217972,
0.20592430233955383,
0.17422336339950562,
-0.18983423709869385,
0.17082953453063965,
-0.4295864701271057,
0.10183592885732651,
0.20296071469783783,
-0.17595736682415009,
0.14176279306411743,
0.3704574704170227,
-0.26056379079818726,
-0.13157635927200317,
0.22510439157485962,
0.26713234186172485,
-0.07001449912786484,
0.5760083794593811,
-0.043131761252880096,
0.07081694155931473,
0.4270486533641815,
0.0699903592467308,
-0.24822330474853516,
-0.3110007047653198,
0.3022071123123169,
-0.09824973344802856,
-0.33572232723236084,
0.15567368268966675,
0.25799891352653503,
-0.01872830092906952,
-0.16645345091819763,
0.2814091145992279,
-0.2052573412656784,
0.09134551882743835,
-0.02062920480966568,
0.2471776306629181,
-0.02132847160100937,
-0.1630566567182541,
-0.19906660914421082,
-0.11219228804111481,
-0.0728871077299118,
-0.1710871309041977,
0.336944580078125,
-0.002083495259284973,
-0.14397719502449036,
-0.36691415309906006,
0.29842907190322876,
0.1205233708024025,
0.24237379431724548,
-0.5542211532592773,
0.16868937015533447,
-0.14613227546215057,
0.2529730200767517,
0.06027824059128761,
0.5711065530776978,
0.34690481424331665,
0.3080393970012665,
-0.1624889075756073,
-0.15325544774532318,
-0.00861554779112339,
-0.39921435713768005,
-0.03551800921559334,
0.15440799295902252,
0.024929530918598175,
0.38328316807746887,
0.3728399872779846,
0.20190560817718506,
-0.15299402177333832,
-0.05233922228217125,
0.15950438380241394,
0.08943800628185272,
-0.2769966721534729,
0.4488206207752228,
-0.07022669166326523,
-0.3105451464653015,
-0.2414381206035614,
-0.15524297952651978,
-0.4252392053604126,
-0.22952893376350403,
0.11521212756633759,
-0.05257793888449669,
0.22112348675727844,
-0.07214605063199997,
0.09548938274383545,
0.13173402845859528,
0.2501939535140991,
0.3810420632362366,
-0.13061097264289856,
-0.2810116112232208,
-0.04427431523799896,
-0.6727177500724792,
0.2869771122932434,
-0.09145456552505493,
-0.17054709792137146,
0.04379117488861084,
0.027618905529379845,
-0.06104172021150589,
0.2797980308532715,
0.2564498782157898,
0.23011541366577148,
0.06695201992988586,
0.4487813711166382,
-0.2156989425420761,
-0.1686227172613144,
0.13630782067775726,
-0.06866021454334259,
-0.17265275120735168,
-0.07412530481815338,
0.13072702288627625,
0.09012126922607422,
0.1352599561214447,
0.11609002202749252,
0.07631237804889679,
0.1114899069070816,
-0.2012052834033966,
0.3803287744522095,
0.0907389298081398,
0.5059734582901001,
-0.13130450248718262,
0.07271537184715271,
-0.08926127851009369,
0.08011345565319061,
-0.015153941698372364,
0.49741867184638977,
0.24957071244716644,
0.1011846661567688,
0.06529557704925537,
-0.4659405052661896,
-0.4616118371486664,
0.16441276669502258,
-0.1931637078523636,
0.5235896110534668,
-0.4295758008956909,
0.2939082682132721,
-0.09590206295251846,
0.14677560329437256,
-0.036467358469963074,
-0.11595135182142258,
-0.10640797019004822,
0.19680669903755188,
-0.16392582654953003,
-0.26339712738990784,
0.1926536113023758,
-0.3973512351512909,
-0.2507685124874115,
-0.07658226042985916,
0.2562633156776428,
0.16313287615776062,
0.0670301765203476,
-0.3767915964126587,
0.22876682877540588,
0.31301355361938477,
-0.2053418755531311,
-0.13427312672138214,
-0.011564360931515694,
-0.10763363540172577,
0.16739648580551147,
0.0032354071736335754,
0.2170044630765915,
0.15919211506843567,
-0.041047751903533936,
0.09051358699798584,
-0.23549611866474152
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | Hi @albertvillanova, thank you for your reply! Do you have any clue on why the same error still exists with `datasets==2.4.0` even after I don't extract the downloaded file? FYI, if I downgrade to `datasets==2.2.2`, the code works fine. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 39 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
Hi @albertvillanova, thank you for your reply! Do you have any clue on why the same error still exists with `datasets==2.4.0` even after I don't extract the downloaded file? FYI, if I downgrade to `datasets==2.2.2`, the code works fine. | [
-0.22395770251750946,
0.1329294741153717,
0.0017217844724655151,
0.4737096428871155,
0.568895161151886,
0.08158870786428452,
0.35390034317970276,
0.3585244119167328,
0.5213257670402527,
0.40628087520599365,
-0.20903171598911285,
0.40095254778862,
-0.01900530233979225,
0.11190696805715561,
0.0007781274616718292,
-0.015242673456668854,
-0.057524122297763824,
0.16364066302776337,
0.09544655680656433,
-0.04538639634847641,
-0.5809697508811951,
0.021519383415579796,
-0.13573212921619415,
0.18114641308784485,
-0.03152000904083252,
0.008559893816709518,
0.14318034052848816,
0.14365696907043457,
-0.3081880509853363,
-0.5212625861167908,
0.3294975459575653,
-0.14277659356594086,
0.07203561067581177,
0.26483574509620667,
-0.00010780533193610609,
0.14262321591377258,
0.3875703811645508,
-0.00824439711868763,
-0.3284680247306824,
0.006479397416114807,
-0.4962732791900635,
0.055428169667720795,
0.23173655569553375,
-0.36549606919288635,
-0.22451478242874146,
-0.4096270203590393,
-0.26614701747894287,
-0.49591127038002014,
0.10109866410493851,
0.2633983790874481,
0.20943835377693176,
0.22911997139453888,
0.2991964817047119,
-0.1409880667924881,
0.5565750598907471,
-0.31410616636276245,
-0.1128317266702652,
0.16805845499038696,
0.28044503927230835,
0.0939013883471489,
-0.04186146706342697,
0.20279642939567566,
-0.06651579588651657,
0.34332770109176636,
0.4734589755535126,
0.013490011915564537,
0.35954126715660095,
0.06941317021846771,
-0.08372962474822998,
0.0017352290451526642,
0.17642104625701904,
-0.2310713529586792,
-0.21196331083774567,
-0.2082987129688263,
0.3122035264968872,
-0.5401394963264465,
0.290854275226593,
0.04829370975494385,
0.03518527373671532,
0.07483594119548798,
0.2162129133939743,
-0.09057214111089706,
-0.09025873243808746,
0.13427215814590454,
-0.08396019041538239,
0.1984325349330902,
-0.26633960008621216,
-0.06909634917974472,
0.18997158110141754,
0.08808194100856781,
0.4482201933860779,
-0.057375334203243256,
-0.1485976278781891,
0.021022651344537735,
-0.20346660912036896,
0.13080337643623352,
0.006247133016586304,
0.07560770213603973,
-0.05436922609806061,
0.2109176218509674,
0.31655532121658325,
-0.2471049726009369,
0.09579658508300781,
0.14540785551071167,
0.23907530307769775,
0.1270173192024231,
-0.048290155827999115,
0.10251282155513763,
0.04385918006300926,
0.03744872286915779,
-0.04316578432917595,
-0.14642760157585144,
-0.10715429484844208,
0.017504774034023285,
0.08702775835990906,
0.14183542132377625,
0.3728981018066406,
-0.12858162820339203,
-0.5220284461975098,
0.19368812441825867,
-0.1260836273431778,
-0.19424735009670258,
0.10650711506605148,
0.33439338207244873,
-0.05171288549900055,
-0.07031805068254471,
0.3032742142677307,
0.16701653599739075,
-0.19598296284675598,
-0.48701050877571106,
-0.21939672529697418,
0.23025508224964142,
-0.2139182686805725,
-0.25710999965667725,
-0.06142568588256836,
-0.21088355779647827,
0.10060391575098038,
-0.18419061601161957,
-0.14437130093574524,
-0.31088966131210327,
0.04179631173610687,
-0.20254690945148468,
0.16061268746852875,
0.26155802607536316,
0.23681369423866272,
0.02917141653597355,
0.133590430021286,
-0.559554934501648,
0.005013413727283478,
0.20780983567237854,
-0.2356697916984558,
-0.25459617376327515,
-0.0660664513707161,
0.2216053158044815,
-0.08839733153581619,
0.1494787633419037,
-0.11345478147268295,
-0.30043214559555054,
-0.08658518642187119,
-0.16987401247024536,
-0.048958368599414825,
-0.1927136480808258,
0.017986584454774857,
-0.16749028861522675,
0.4114718437194824,
0.49458247423171997,
0.11953963339328766,
0.09386175870895386,
-0.3940531015396118,
-0.10029584169387817,
-0.03103228658437729,
0.004370454698801041,
-0.12723316252231598,
0.42006632685661316,
-0.03817468136548996,
0.10121400654315948,
0.38442739844322205,
-0.3391105532646179,
-0.5720916390419006,
0.20973993837833405,
-0.06250122934579849,
-0.0012667812407016754,
0.04401572421193123,
0.1807422935962677,
0.4111280143260956,
-0.06638666987419128,
0.2026480734348297,
0.3701593279838562,
0.05743023753166199,
0.14122986793518066,
-0.10423588007688522,
-0.21461381018161774,
0.24336737394332886,
0.05352659150958061,
0.07273949682712555,
0.0054283589124679565,
0.3212997317314148,
-0.05721905454993248,
0.1428402066230774,
-0.10193474590778351,
-0.06851702928543091,
0.06030404567718506,
0.1015702486038208,
-0.11189986765384674,
-0.04697367548942566,
-0.16143035888671875,
-0.3177679181098938,
-0.00238138809800148,
0.13319480419158936,
-0.3394277095794678,
-0.05893002450466156,
-0.09329506009817123,
-0.4838675558567047,
0.07353775203227997,
-0.4730508029460907,
-0.2946585714817047,
0.17230980098247528,
0.11117593199014664,
-0.07029388844966888,
0.12074537575244904,
-0.17187634110450745,
0.2077803611755371,
-0.21992623805999756,
0.19794777035713196,
-0.5623967051506042,
0.19731688499450684,
-0.07359261065721512,
-0.22428512573242188,
0.10018640756607056,
0.1618136763572693,
0.15031962096691132,
-0.07647247612476349,
-0.3538355231285095,
0.4993545114994049,
0.09776878356933594,
0.203293114900589,
-0.15994301438331604,
0.12510895729064941,
0.04987668991088867,
-0.1441851109266281,
0.0118582583963871,
0.18810145556926727,
0.4616028964519501,
-0.05378033220767975,
-0.1138446256518364,
0.1331312209367752,
-0.2177756279706955,
-0.006897374987602234,
0.16069571673870087,
0.07899419963359833,
0.0313328355550766,
-0.02409839816391468,
-0.2341141253709793,
-0.0723404660820961,
0.14141876995563507,
0.22287297248840332,
0.21960078179836273,
0.07694195210933685,
-0.35896554589271545,
-0.17016735672950745,
0.427695095539093,
0.12273652851581573,
0.33988213539123535,
-0.2151789665222168,
-0.5229853987693787,
0.19068598747253418,
-0.04240971803665161,
0.547608494758606,
0.19963881373405457,
0.17230044305324554,
-0.13318218290805817,
0.06470116227865219,
0.05759770795702934,
-0.11981996893882751,
0.2791821360588074,
0.07445196062326431,
0.2518116533756256,
0.13732290267944336,
-0.14910060167312622,
0.08774352818727493,
-0.3328001797199249,
-0.08883191645145416,
0.038612134754657745,
0.5031018853187561,
-0.45184648036956787,
-0.03136361762881279,
-0.13903021812438965,
0.19542601704597473,
-0.08374505490064621,
-0.5564721822738647,
0.12392452359199524,
-0.3701889216899872,
-0.16824187338352203,
0.34525391459465027,
-0.11954395473003387,
-0.07305020838975906,
-0.37116825580596924,
0.09834751486778259,
0.09380296617746353,
-0.04324593394994736,
-0.23594120144844055,
-0.242514967918396,
-0.07538320124149323,
0.039953041821718216,
0.2585369646549225,
0.2221779078245163,
0.3246936500072479,
-0.25052565336227417,
0.32605451345443726,
0.02320471964776516,
0.1812467873096466,
0.025186603888869286,
-0.10411819815635681,
0.13234291970729828,
-0.00036104023456573486,
0.13932539522647858,
0.16212677955627441,
-0.2014092653989792,
0.31636521220207214,
-0.19298918545246124,
-0.1475219875574112,
0.17659468948841095,
0.26667749881744385,
-0.24452538788318634,
0.02375894784927368,
-0.7141469120979309,
0.042441435158252716,
-0.40751755237579346,
-0.02211538702249527,
0.07760001718997955,
-0.0267830491065979,
-0.021711383014917374,
0.11595869064331055,
0.15934988856315613,
0.18715053796768188,
0.05404219031333923,
-0.1151392012834549,
-0.12142252922058105,
0.5125563740730286,
-0.2707633674144745,
-0.3217809796333313,
0.06982728838920593,
-0.10503555089235306,
0.10391815751791,
0.12045503407716751,
-0.317396342754364,
0.19710510969161987,
-0.30019906163215637,
-0.1944730132818222,
-0.16783374547958374,
-0.006736336275935173,
0.2976502776145935,
0.2997097373008728,
-0.06862562894821167,
-0.11592079699039459,
-0.11911818385124207,
-0.08528856188058853,
-0.24104636907577515,
-0.11336571723222733,
-0.08579909056425095,
0.1377083957195282,
-0.12413997948169708,
0.055795539170503616,
-0.056692905724048615,
0.028520384803414345,
0.32619622349739075,
-0.23711875081062317,
0.1987929791212082,
-0.13165560364723206,
-0.594427764415741,
0.006469304673373699,
-0.20365509390830994,
-0.017194241285324097,
0.07878303527832031,
-0.12743732333183289,
0.2001625895500183,
-0.21625256538391113,
-0.13549767434597015,
-0.455399751663208,
-0.2557535469532013,
-0.08623950183391571,
0.050724200904369354,
0.09727869927883148,
-0.15277419984340668,
0.4092644453048706,
-0.08678710460662842,
-0.06569138914346695,
0.276680052280426,
0.09294520318508148,
0.13665200769901276,
-0.12719187140464783,
0.2923419177532196,
-0.12354882806539536,
-0.13085994124412537,
0.24995188415050507,
-0.15019084513187408,
0.1819303333759308,
0.20989049971103668,
-0.035878438502550125,
0.24687737226486206,
-0.14413027465343475,
0.39853543043136597,
0.027876324951648712,
0.36377787590026855,
0.2431190013885498,
-0.028351131826639175,
-0.30064481496810913,
0.03175760433077812,
-0.4031108617782593,
-0.14846962690353394,
-0.07720860838890076,
0.2190912514925003,
-0.06150420010089874,
-0.029850924387574196,
0.6144877672195435,
-0.1404901146888733,
-0.17726360261440277,
-0.09493176639080048,
-0.013439875096082687,
-0.2600286900997162,
-0.4077506959438324,
0.2069709599018097,
0.12877348065376282,
0.39474114775657654,
0.08377046883106232,
0.036517854779958725,
-0.43476995825767517,
-0.1772901713848114,
-0.015394061803817749,
0.18436595797538757,
0.264702171087265,
0.08841734379529953,
0.2179241180419922,
0.18159005045890808,
0.12554572522640228,
0.19552068412303925,
0.659494161605835,
-0.03289426490664482,
-0.45511937141418457,
-0.05274348706007004,
-0.36449864506721497,
0.1140742301940918,
0.0278627872467041,
-0.136687234044075,
-0.08897919207811356,
-0.2225528210401535,
-0.25513219833374023,
-0.1804434359073639,
-0.13865448534488678,
0.36167600750923157,
0.009072617627680302,
-0.026067474856972694,
-0.3928919732570648,
0.5616773366928101,
0.04950820282101631,
-0.010593652725219727,
0.3779745101928711,
0.23752397298812866,
-0.07227079570293427,
0.01410137489438057,
0.21780511736869812,
0.6930732131004333,
0.013273011893033981,
-0.13385815918445587,
0.6125252842903137,
-0.2927969694137573,
-0.1309875249862671,
-0.1515270471572876,
0.11991865932941437,
-0.38977500796318054,
-0.3678615689277649,
-0.037809520959854126,
-0.11517272889614105,
0.48220667243003845,
-0.039685413241386414,
0.07511121034622192,
0.011019737459719181,
-0.048561930656433105,
-0.256838858127594,
-0.1250326782464981,
0.2905901372432709,
-0.17626458406448364,
-0.1200176477432251,
-0.33673644065856934,
0.1378319412469864,
-0.058205172419548035,
0.1591893583536148,
0.17748397588729858,
-0.05766426771879196,
0.049380671232938766,
-0.13874834775924683,
-0.06834504008293152,
0.22884151339530945,
-0.2824099659919739,
0.018696893006563187,
-0.1869087964296341,
-0.6097549200057983,
0.28430989384651184,
0.2275279313325882,
0.07271742820739746,
0.12170317769050598,
-0.14206284284591675,
0.14915117621421814,
-0.09770888835191727,
-0.037008218467235565,
-0.12937796115875244,
0.1053709015250206,
0.3830547630786896,
0.06959809362888336,
-0.1484304517507553,
0.19650942087173462,
-0.00005676504224538803,
-0.1329338252544403,
0.3113933801651001,
0.17757713794708252,
0.2381243109703064,
-0.36183962225914,
-0.13161562383174896,
-0.027342654764652252,
0.047574881464242935,
-0.2822435200214386,
0.15118055045604706,
0.012247104197740555,
-0.08379075676202774,
-0.002504698932170868,
0.088445283472538,
-0.38628870248794556,
0.015012447722256184,
0.20241042971611023,
0.30347302556037903,
0.41144534945487976,
0.5327016115188599,
0.08465509116649628,
-0.13744047284126282,
-0.3091373145580292,
0.09922672063112259,
0.7074678540229797,
-0.26635900139808655,
0.12169716507196426,
-0.28696733713150024,
0.22858460247516632,
-0.18233472108840942,
0.22204360365867615,
0.05407770350575447,
0.020800456404685974,
-0.06360622495412827,
-0.5093861818313599,
-0.14220063388347626,
0.1388179510831833,
0.16938519477844238,
0.17137886583805084,
0.13693976402282715,
0.05728754773736,
-0.019253510981798172,
0.018176985904574394,
-0.3057464063167572,
0.23082312941551208,
-0.05318932980298996,
0.03750523924827576,
0.44950342178344727,
0.1368636041879654,
0.21441885828971863,
-0.1713259518146515,
0.16517430543899536,
0.002049928531050682,
-0.053981803357601166,
-0.2138494849205017,
-0.22267577052116394,
0.09596067667007446,
-0.0021140724420547485,
0.04934350401163101,
-0.10366076976060867,
-0.34590065479278564,
-0.15248426795005798,
-0.3284830152988434,
-0.006126074120402336,
0.10830209404230118,
-0.13873295485973358,
0.11131814867258072,
0.12183639407157898,
0.1016443520784378,
-0.08662357926368713,
0.23207032680511475,
-0.42355450987815857,
-0.016934171319007874,
-0.11486701667308807,
0.06592205166816711,
0.12927599251270294,
0.09400792419910431,
-0.2985394299030304,
-0.08946732431650162,
-0.1471390724182129,
0.2961325943470001,
0.5829503536224365,
-0.25732284784317017,
0.09707172214984894,
-0.0016111331060528755,
0.17154306173324585,
0.22417844831943512,
-0.22298254072666168,
0.02265583537518978,
0.06099999323487282,
0.212324857711792,
-0.37191829085350037,
0.025351278483867645,
0.2573859989643097,
-0.07966173440217972,
0.20592430233955383,
0.17422336339950562,
-0.18983423709869385,
0.17082953453063965,
-0.4295864701271057,
0.10183592885732651,
0.20296071469783783,
-0.17595736682415009,
0.14176279306411743,
0.3704574704170227,
-0.26056379079818726,
-0.13157635927200317,
0.22510439157485962,
0.26713234186172485,
-0.07001449912786484,
0.5760083794593811,
-0.043131761252880096,
0.07081694155931473,
0.4270486533641815,
0.0699903592467308,
-0.24822330474853516,
-0.3110007047653198,
0.3022071123123169,
-0.09824973344802856,
-0.33572232723236084,
0.15567368268966675,
0.25799891352653503,
-0.01872830092906952,
-0.16645345091819763,
0.2814091145992279,
-0.2052573412656784,
0.09134551882743835,
-0.02062920480966568,
0.2471776306629181,
-0.02132847160100937,
-0.1630566567182541,
-0.19906660914421082,
-0.11219228804111481,
-0.0728871077299118,
-0.1710871309041977,
0.336944580078125,
-0.002083495259284973,
-0.14397719502449036,
-0.36691415309906006,
0.29842907190322876,
0.1205233708024025,
0.24237379431724548,
-0.5542211532592773,
0.16868937015533447,
-0.14613227546215057,
0.2529730200767517,
0.06027824059128761,
0.5711065530776978,
0.34690481424331665,
0.3080393970012665,
-0.1624889075756073,
-0.15325544774532318,
-0.00861554779112339,
-0.39921435713768005,
-0.03551800921559334,
0.15440799295902252,
0.024929530918598175,
0.38328316807746887,
0.3728399872779846,
0.20190560817718506,
-0.15299402177333832,
-0.05233922228217125,
0.15950438380241394,
0.08943800628185272,
-0.2769966721534729,
0.4488206207752228,
-0.07022669166326523,
-0.3105451464653015,
-0.2414381206035614,
-0.15524297952651978,
-0.4252392053604126,
-0.22952893376350403,
0.11521212756633759,
-0.05257793888449669,
0.22112348675727844,
-0.07214605063199997,
0.09548938274383545,
0.13173402845859528,
0.2501939535140991,
0.3810420632362366,
-0.13061097264289856,
-0.2810116112232208,
-0.04427431523799896,
-0.6727177500724792,
0.2869771122932434,
-0.09145456552505493,
-0.17054709792137146,
0.04379117488861084,
0.027618905529379845,
-0.06104172021150589,
0.2797980308532715,
0.2564498782157898,
0.23011541366577148,
0.06695201992988586,
0.4487813711166382,
-0.2156989425420761,
-0.1686227172613144,
0.13630782067775726,
-0.06866021454334259,
-0.17265275120735168,
-0.07412530481815338,
0.13072702288627625,
0.09012126922607422,
0.1352599561214447,
0.11609002202749252,
0.07631237804889679,
0.1114899069070816,
-0.2012052834033966,
0.3803287744522095,
0.0907389298081398,
0.5059734582901001,
-0.13130450248718262,
0.07271537184715271,
-0.08926127851009369,
0.08011345565319061,
-0.015153941698372364,
0.49741867184638977,
0.24957071244716644,
0.1011846661567688,
0.06529557704925537,
-0.4659405052661896,
-0.4616118371486664,
0.16441276669502258,
-0.1931637078523636,
0.5235896110534668,
-0.4295758008956909,
0.2939082682132721,
-0.09590206295251846,
0.14677560329437256,
-0.036467358469963074,
-0.11595135182142258,
-0.10640797019004822,
0.19680669903755188,
-0.16392582654953003,
-0.26339712738990784,
0.1926536113023758,
-0.3973512351512909,
-0.2507685124874115,
-0.07658226042985916,
0.2562633156776428,
0.16313287615776062,
0.0670301765203476,
-0.3767915964126587,
0.22876682877540588,
0.31301355361938477,
-0.2053418755531311,
-0.13427312672138214,
-0.011564360931515694,
-0.10763363540172577,
0.16739648580551147,
0.0032354071736335754,
0.2170044630765915,
0.15919211506843567,
-0.041047751903533936,
0.09051358699798584,
-0.23549611866474152
] |
https://github.com/huggingface/datasets/issues/4862 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code | I guess this has to do with the cache: you should remove the previously-wrongly generated directory from the cache; otherwise `datasets` tries to re-use it. | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
| 25 | Got "AttributeError: 'xPath' object has no attribute 'read'" when loading an excel dataset with my own code
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
# Sample code to reproduce the bug
# The dataset function is as follows:
from pathlib import Path
from typing import Dict, List, Tuple
import datasets
import pandas as pd
_CITATION = """\
"""
_DATASETNAME = "jadi_ide"
_DESCRIPTION = """\
"""
_HOMEPAGE = ""
_LICENSE = "Unknown"
_URLS = {
_DATASETNAME: "https://github.com/fathanick/Javanese-Dialect-Identification-from-Twitter-Data/raw/main/Update 16K_Dataset.xlsx",
}
_SOURCE_VERSION = "1.0.0"
class JaDi_Ide(datasets.GeneratorBasedBuilder):
SOURCE_VERSION = datasets.Version(_SOURCE_VERSION)
BUILDER_CONFIGS = [
NusantaraConfig(
name="jadi_ide_source",
version=SOURCE_VERSION,
description="JaDi-Ide source schema",
schema="source",
subset_id="jadi_ide",
),
]
DEFAULT_CONFIG_NAME = "source"
def _info(self) -> datasets.DatasetInfo:
if self.config.schema == "source":
features = datasets.Features(
{
"id": datasets.Value("string"),
"text": datasets.Value("string"),
"label": datasets.Value("string")
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
features=features,
homepage=_HOMEPAGE,
license=_LICENSE,
citation=_CITATION,
)
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
"""Returns SplitGenerators."""
# Dataset does not have predetermined split, putting all as TRAIN
urls = _URLS[_DATASETNAME]
base_dir = Path(dl_manager.download_and_extract(urls))
data_files = {"train": base_dir}
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"filepath": data_files["train"],
"split": "train",
},
),
]
def _generate_examples(self, filepath: Path, split: str) -> Tuple[int, Dict]:
"""Yields examples as (key, example) tuples."""
df = pd.read_excel(filepath, engine='openpyxl')
df.columns = ["id", "text", "label"]
if self.config.schema == "source":
for row in df.itertuples():
ex = {
"id": str(row.id),
"text": row.text,
"label": row.label,
}
yield row.id, ex
```
## Expected results
Expecting to load the dataset smoothly.
## Actual results
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/load.py", line 1751, in load_dataset
use_auth_token=use_auth_token,
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 705, in download_and_prepare
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 793, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/builder.py", line 1216, in _prepare_split
desc=f"Generating {split_info.name} split",
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/tqdm/std.py", line 1195, in __iter__
for obj in iterable:
File "/home/xuyan/.cache/huggingface/modules/datasets_modules/datasets/jadi_ide/7a539f2b6f726defea8fbe36ceda17bae66c370f6d6c418e3a08d760ebef7519/jadi_ide.py", line 107, in _generate_examples
df = pd.read_excel(filepath, engine='openpyxl')
File "/home/xuyan/anaconda3/lib/python3.7/site-packages/datasets/download/streaming_download_manager.py", line 701, in xpandas_read_excel
return pd.read_excel(BytesIO(filepath_or_buffer.read()), **kwargs)
AttributeError: 'xPath' object has no attribute 'read'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.4
- PyArrow version: 9.0.0
- Pandas version: 0.25.1
I guess this has to do with the cache: you should remove the previously-wrongly generated directory from the cache; otherwise `datasets` tries to re-use it. | [
-0.22395770251750946,
0.1329294741153717,
0.0017217844724655151,
0.4737096428871155,
0.568895161151886,
0.08158870786428452,
0.35390034317970276,
0.3585244119167328,
0.5213257670402527,
0.40628087520599365,
-0.20903171598911285,
0.40095254778862,
-0.01900530233979225,
0.11190696805715561,
0.0007781274616718292,
-0.015242673456668854,
-0.057524122297763824,
0.16364066302776337,
0.09544655680656433,
-0.04538639634847641,
-0.5809697508811951,
0.021519383415579796,
-0.13573212921619415,
0.18114641308784485,
-0.03152000904083252,
0.008559893816709518,
0.14318034052848816,
0.14365696907043457,
-0.3081880509853363,
-0.5212625861167908,
0.3294975459575653,
-0.14277659356594086,
0.07203561067581177,
0.26483574509620667,
-0.00010780533193610609,
0.14262321591377258,
0.3875703811645508,
-0.00824439711868763,
-0.3284680247306824,
0.006479397416114807,
-0.4962732791900635,
0.055428169667720795,
0.23173655569553375,
-0.36549606919288635,
-0.22451478242874146,
-0.4096270203590393,
-0.26614701747894287,
-0.49591127038002014,
0.10109866410493851,
0.2633983790874481,
0.20943835377693176,
0.22911997139453888,
0.2991964817047119,
-0.1409880667924881,
0.5565750598907471,
-0.31410616636276245,
-0.1128317266702652,
0.16805845499038696,
0.28044503927230835,
0.0939013883471489,
-0.04186146706342697,
0.20279642939567566,
-0.06651579588651657,
0.34332770109176636,
0.4734589755535126,
0.013490011915564537,
0.35954126715660095,
0.06941317021846771,
-0.08372962474822998,
0.0017352290451526642,
0.17642104625701904,
-0.2310713529586792,
-0.21196331083774567,
-0.2082987129688263,
0.3122035264968872,
-0.5401394963264465,
0.290854275226593,
0.04829370975494385,
0.03518527373671532,
0.07483594119548798,
0.2162129133939743,
-0.09057214111089706,
-0.09025873243808746,
0.13427215814590454,
-0.08396019041538239,
0.1984325349330902,
-0.26633960008621216,
-0.06909634917974472,
0.18997158110141754,
0.08808194100856781,
0.4482201933860779,
-0.057375334203243256,
-0.1485976278781891,
0.021022651344537735,
-0.20346660912036896,
0.13080337643623352,
0.006247133016586304,
0.07560770213603973,
-0.05436922609806061,
0.2109176218509674,
0.31655532121658325,
-0.2471049726009369,
0.09579658508300781,
0.14540785551071167,
0.23907530307769775,
0.1270173192024231,
-0.048290155827999115,
0.10251282155513763,
0.04385918006300926,
0.03744872286915779,
-0.04316578432917595,
-0.14642760157585144,
-0.10715429484844208,
0.017504774034023285,
0.08702775835990906,
0.14183542132377625,
0.3728981018066406,
-0.12858162820339203,
-0.5220284461975098,
0.19368812441825867,
-0.1260836273431778,
-0.19424735009670258,
0.10650711506605148,
0.33439338207244873,
-0.05171288549900055,
-0.07031805068254471,
0.3032742142677307,
0.16701653599739075,
-0.19598296284675598,
-0.48701050877571106,
-0.21939672529697418,
0.23025508224964142,
-0.2139182686805725,
-0.25710999965667725,
-0.06142568588256836,
-0.21088355779647827,
0.10060391575098038,
-0.18419061601161957,
-0.14437130093574524,
-0.31088966131210327,
0.04179631173610687,
-0.20254690945148468,
0.16061268746852875,
0.26155802607536316,
0.23681369423866272,
0.02917141653597355,
0.133590430021286,
-0.559554934501648,
0.005013413727283478,
0.20780983567237854,
-0.2356697916984558,
-0.25459617376327515,
-0.0660664513707161,
0.2216053158044815,
-0.08839733153581619,
0.1494787633419037,
-0.11345478147268295,
-0.30043214559555054,
-0.08658518642187119,
-0.16987401247024536,
-0.048958368599414825,
-0.1927136480808258,
0.017986584454774857,
-0.16749028861522675,
0.4114718437194824,
0.49458247423171997,
0.11953963339328766,
0.09386175870895386,
-0.3940531015396118,
-0.10029584169387817,
-0.03103228658437729,
0.004370454698801041,
-0.12723316252231598,
0.42006632685661316,
-0.03817468136548996,
0.10121400654315948,
0.38442739844322205,
-0.3391105532646179,
-0.5720916390419006,
0.20973993837833405,
-0.06250122934579849,
-0.0012667812407016754,
0.04401572421193123,
0.1807422935962677,
0.4111280143260956,
-0.06638666987419128,
0.2026480734348297,
0.3701593279838562,
0.05743023753166199,
0.14122986793518066,
-0.10423588007688522,
-0.21461381018161774,
0.24336737394332886,
0.05352659150958061,
0.07273949682712555,
0.0054283589124679565,
0.3212997317314148,
-0.05721905454993248,
0.1428402066230774,
-0.10193474590778351,
-0.06851702928543091,
0.06030404567718506,
0.1015702486038208,
-0.11189986765384674,
-0.04697367548942566,
-0.16143035888671875,
-0.3177679181098938,
-0.00238138809800148,
0.13319480419158936,
-0.3394277095794678,
-0.05893002450466156,
-0.09329506009817123,
-0.4838675558567047,
0.07353775203227997,
-0.4730508029460907,
-0.2946585714817047,
0.17230980098247528,
0.11117593199014664,
-0.07029388844966888,
0.12074537575244904,
-0.17187634110450745,
0.2077803611755371,
-0.21992623805999756,
0.19794777035713196,
-0.5623967051506042,
0.19731688499450684,
-0.07359261065721512,
-0.22428512573242188,
0.10018640756607056,
0.1618136763572693,
0.15031962096691132,
-0.07647247612476349,
-0.3538355231285095,
0.4993545114994049,
0.09776878356933594,
0.203293114900589,
-0.15994301438331604,
0.12510895729064941,
0.04987668991088867,
-0.1441851109266281,
0.0118582583963871,
0.18810145556926727,
0.4616028964519501,
-0.05378033220767975,
-0.1138446256518364,
0.1331312209367752,
-0.2177756279706955,
-0.006897374987602234,
0.16069571673870087,
0.07899419963359833,
0.0313328355550766,
-0.02409839816391468,
-0.2341141253709793,
-0.0723404660820961,
0.14141876995563507,
0.22287297248840332,
0.21960078179836273,
0.07694195210933685,
-0.35896554589271545,
-0.17016735672950745,
0.427695095539093,
0.12273652851581573,
0.33988213539123535,
-0.2151789665222168,
-0.5229853987693787,
0.19068598747253418,
-0.04240971803665161,
0.547608494758606,
0.19963881373405457,
0.17230044305324554,
-0.13318218290805817,
0.06470116227865219,
0.05759770795702934,
-0.11981996893882751,
0.2791821360588074,
0.07445196062326431,
0.2518116533756256,
0.13732290267944336,
-0.14910060167312622,
0.08774352818727493,
-0.3328001797199249,
-0.08883191645145416,
0.038612134754657745,
0.5031018853187561,
-0.45184648036956787,
-0.03136361762881279,
-0.13903021812438965,
0.19542601704597473,
-0.08374505490064621,
-0.5564721822738647,
0.12392452359199524,
-0.3701889216899872,
-0.16824187338352203,
0.34525391459465027,
-0.11954395473003387,
-0.07305020838975906,
-0.37116825580596924,
0.09834751486778259,
0.09380296617746353,
-0.04324593394994736,
-0.23594120144844055,
-0.242514967918396,
-0.07538320124149323,
0.039953041821718216,
0.2585369646549225,
0.2221779078245163,
0.3246936500072479,
-0.25052565336227417,
0.32605451345443726,
0.02320471964776516,
0.1812467873096466,
0.025186603888869286,
-0.10411819815635681,
0.13234291970729828,
-0.00036104023456573486,
0.13932539522647858,
0.16212677955627441,
-0.2014092653989792,
0.31636521220207214,
-0.19298918545246124,
-0.1475219875574112,
0.17659468948841095,
0.26667749881744385,
-0.24452538788318634,
0.02375894784927368,
-0.7141469120979309,
0.042441435158252716,
-0.40751755237579346,
-0.02211538702249527,
0.07760001718997955,
-0.0267830491065979,
-0.021711383014917374,
0.11595869064331055,
0.15934988856315613,
0.18715053796768188,
0.05404219031333923,
-0.1151392012834549,
-0.12142252922058105,
0.5125563740730286,
-0.2707633674144745,
-0.3217809796333313,
0.06982728838920593,
-0.10503555089235306,
0.10391815751791,
0.12045503407716751,
-0.317396342754364,
0.19710510969161987,
-0.30019906163215637,
-0.1944730132818222,
-0.16783374547958374,
-0.006736336275935173,
0.2976502776145935,
0.2997097373008728,
-0.06862562894821167,
-0.11592079699039459,
-0.11911818385124207,
-0.08528856188058853,
-0.24104636907577515,
-0.11336571723222733,
-0.08579909056425095,
0.1377083957195282,
-0.12413997948169708,
0.055795539170503616,
-0.056692905724048615,
0.028520384803414345,
0.32619622349739075,
-0.23711875081062317,
0.1987929791212082,
-0.13165560364723206,
-0.594427764415741,
0.006469304673373699,
-0.20365509390830994,
-0.017194241285324097,
0.07878303527832031,
-0.12743732333183289,
0.2001625895500183,
-0.21625256538391113,
-0.13549767434597015,
-0.455399751663208,
-0.2557535469532013,
-0.08623950183391571,
0.050724200904369354,
0.09727869927883148,
-0.15277419984340668,
0.4092644453048706,
-0.08678710460662842,
-0.06569138914346695,
0.276680052280426,
0.09294520318508148,
0.13665200769901276,
-0.12719187140464783,
0.2923419177532196,
-0.12354882806539536,
-0.13085994124412537,
0.24995188415050507,
-0.15019084513187408,
0.1819303333759308,
0.20989049971103668,
-0.035878438502550125,
0.24687737226486206,
-0.14413027465343475,
0.39853543043136597,
0.027876324951648712,
0.36377787590026855,
0.2431190013885498,
-0.028351131826639175,
-0.30064481496810913,
0.03175760433077812,
-0.4031108617782593,
-0.14846962690353394,
-0.07720860838890076,
0.2190912514925003,
-0.06150420010089874,
-0.029850924387574196,
0.6144877672195435,
-0.1404901146888733,
-0.17726360261440277,
-0.09493176639080048,
-0.013439875096082687,
-0.2600286900997162,
-0.4077506959438324,
0.2069709599018097,
0.12877348065376282,
0.39474114775657654,
0.08377046883106232,
0.036517854779958725,
-0.43476995825767517,
-0.1772901713848114,
-0.015394061803817749,
0.18436595797538757,
0.264702171087265,
0.08841734379529953,
0.2179241180419922,
0.18159005045890808,
0.12554572522640228,
0.19552068412303925,
0.659494161605835,
-0.03289426490664482,
-0.45511937141418457,
-0.05274348706007004,
-0.36449864506721497,
0.1140742301940918,
0.0278627872467041,
-0.136687234044075,
-0.08897919207811356,
-0.2225528210401535,
-0.25513219833374023,
-0.1804434359073639,
-0.13865448534488678,
0.36167600750923157,
0.009072617627680302,
-0.026067474856972694,
-0.3928919732570648,
0.5616773366928101,
0.04950820282101631,
-0.010593652725219727,
0.3779745101928711,
0.23752397298812866,
-0.07227079570293427,
0.01410137489438057,
0.21780511736869812,
0.6930732131004333,
0.013273011893033981,
-0.13385815918445587,
0.6125252842903137,
-0.2927969694137573,
-0.1309875249862671,
-0.1515270471572876,
0.11991865932941437,
-0.38977500796318054,
-0.3678615689277649,
-0.037809520959854126,
-0.11517272889614105,
0.48220667243003845,
-0.039685413241386414,
0.07511121034622192,
0.011019737459719181,
-0.048561930656433105,
-0.256838858127594,
-0.1250326782464981,
0.2905901372432709,
-0.17626458406448364,
-0.1200176477432251,
-0.33673644065856934,
0.1378319412469864,
-0.058205172419548035,
0.1591893583536148,
0.17748397588729858,
-0.05766426771879196,
0.049380671232938766,
-0.13874834775924683,
-0.06834504008293152,
0.22884151339530945,
-0.2824099659919739,
0.018696893006563187,
-0.1869087964296341,
-0.6097549200057983,
0.28430989384651184,
0.2275279313325882,
0.07271742820739746,
0.12170317769050598,
-0.14206284284591675,
0.14915117621421814,
-0.09770888835191727,
-0.037008218467235565,
-0.12937796115875244,
0.1053709015250206,
0.3830547630786896,
0.06959809362888336,
-0.1484304517507553,
0.19650942087173462,
-0.00005676504224538803,
-0.1329338252544403,
0.3113933801651001,
0.17757713794708252,
0.2381243109703064,
-0.36183962225914,
-0.13161562383174896,
-0.027342654764652252,
0.047574881464242935,
-0.2822435200214386,
0.15118055045604706,
0.012247104197740555,
-0.08379075676202774,
-0.002504698932170868,
0.088445283472538,
-0.38628870248794556,
0.015012447722256184,
0.20241042971611023,
0.30347302556037903,
0.41144534945487976,
0.5327016115188599,
0.08465509116649628,
-0.13744047284126282,
-0.3091373145580292,
0.09922672063112259,
0.7074678540229797,
-0.26635900139808655,
0.12169716507196426,
-0.28696733713150024,
0.22858460247516632,
-0.18233472108840942,
0.22204360365867615,
0.05407770350575447,
0.020800456404685974,
-0.06360622495412827,
-0.5093861818313599,
-0.14220063388347626,
0.1388179510831833,
0.16938519477844238,
0.17137886583805084,
0.13693976402282715,
0.05728754773736,
-0.019253510981798172,
0.018176985904574394,
-0.3057464063167572,
0.23082312941551208,
-0.05318932980298996,
0.03750523924827576,
0.44950342178344727,
0.1368636041879654,
0.21441885828971863,
-0.1713259518146515,
0.16517430543899536,
0.002049928531050682,
-0.053981803357601166,
-0.2138494849205017,
-0.22267577052116394,
0.09596067667007446,
-0.0021140724420547485,
0.04934350401163101,
-0.10366076976060867,
-0.34590065479278564,
-0.15248426795005798,
-0.3284830152988434,
-0.006126074120402336,
0.10830209404230118,
-0.13873295485973358,
0.11131814867258072,
0.12183639407157898,
0.1016443520784378,
-0.08662357926368713,
0.23207032680511475,
-0.42355450987815857,
-0.016934171319007874,
-0.11486701667308807,
0.06592205166816711,
0.12927599251270294,
0.09400792419910431,
-0.2985394299030304,
-0.08946732431650162,
-0.1471390724182129,
0.2961325943470001,
0.5829503536224365,
-0.25732284784317017,
0.09707172214984894,
-0.0016111331060528755,
0.17154306173324585,
0.22417844831943512,
-0.22298254072666168,
0.02265583537518978,
0.06099999323487282,
0.212324857711792,
-0.37191829085350037,
0.025351278483867645,
0.2573859989643097,
-0.07966173440217972,
0.20592430233955383,
0.17422336339950562,
-0.18983423709869385,
0.17082953453063965,
-0.4295864701271057,
0.10183592885732651,
0.20296071469783783,
-0.17595736682415009,
0.14176279306411743,
0.3704574704170227,
-0.26056379079818726,
-0.13157635927200317,
0.22510439157485962,
0.26713234186172485,
-0.07001449912786484,
0.5760083794593811,
-0.043131761252880096,
0.07081694155931473,
0.4270486533641815,
0.0699903592467308,
-0.24822330474853516,
-0.3110007047653198,
0.3022071123123169,
-0.09824973344802856,
-0.33572232723236084,
0.15567368268966675,
0.25799891352653503,
-0.01872830092906952,
-0.16645345091819763,
0.2814091145992279,
-0.2052573412656784,
0.09134551882743835,
-0.02062920480966568,
0.2471776306629181,
-0.02132847160100937,
-0.1630566567182541,
-0.19906660914421082,
-0.11219228804111481,
-0.0728871077299118,
-0.1710871309041977,
0.336944580078125,
-0.002083495259284973,
-0.14397719502449036,
-0.36691415309906006,
0.29842907190322876,
0.1205233708024025,
0.24237379431724548,
-0.5542211532592773,
0.16868937015533447,
-0.14613227546215057,
0.2529730200767517,
0.06027824059128761,
0.5711065530776978,
0.34690481424331665,
0.3080393970012665,
-0.1624889075756073,
-0.15325544774532318,
-0.00861554779112339,
-0.39921435713768005,
-0.03551800921559334,
0.15440799295902252,
0.024929530918598175,
0.38328316807746887,
0.3728399872779846,
0.20190560817718506,
-0.15299402177333832,
-0.05233922228217125,
0.15950438380241394,
0.08943800628185272,
-0.2769966721534729,
0.4488206207752228,
-0.07022669166326523,
-0.3105451464653015,
-0.2414381206035614,
-0.15524297952651978,
-0.4252392053604126,
-0.22952893376350403,
0.11521212756633759,
-0.05257793888449669,
0.22112348675727844,
-0.07214605063199997,
0.09548938274383545,
0.13173402845859528,
0.2501939535140991,
0.3810420632362366,
-0.13061097264289856,
-0.2810116112232208,
-0.04427431523799896,
-0.6727177500724792,
0.2869771122932434,
-0.09145456552505493,
-0.17054709792137146,
0.04379117488861084,
0.027618905529379845,
-0.06104172021150589,
0.2797980308532715,
0.2564498782157898,
0.23011541366577148,
0.06695201992988586,
0.4487813711166382,
-0.2156989425420761,
-0.1686227172613144,
0.13630782067775726,
-0.06866021454334259,
-0.17265275120735168,
-0.07412530481815338,
0.13072702288627625,
0.09012126922607422,
0.1352599561214447,
0.11609002202749252,
0.07631237804889679,
0.1114899069070816,
-0.2012052834033966,
0.3803287744522095,
0.0907389298081398,
0.5059734582901001,
-0.13130450248718262,
0.07271537184715271,
-0.08926127851009369,
0.08011345565319061,
-0.015153941698372364,
0.49741867184638977,
0.24957071244716644,
0.1011846661567688,
0.06529557704925537,
-0.4659405052661896,
-0.4616118371486664,
0.16441276669502258,
-0.1931637078523636,
0.5235896110534668,
-0.4295758008956909,
0.2939082682132721,
-0.09590206295251846,
0.14677560329437256,
-0.036467358469963074,
-0.11595135182142258,
-0.10640797019004822,
0.19680669903755188,
-0.16392582654953003,
-0.26339712738990784,
0.1926536113023758,
-0.3973512351512909,
-0.2507685124874115,
-0.07658226042985916,
0.2562633156776428,
0.16313287615776062,
0.0670301765203476,
-0.3767915964126587,
0.22876682877540588,
0.31301355361938477,
-0.2053418755531311,
-0.13427312672138214,
-0.011564360931515694,
-0.10763363540172577,
0.16739648580551147,
0.0032354071736335754,
0.2170044630765915,
0.15919211506843567,
-0.041047751903533936,
0.09051358699798584,
-0.23549611866474152
] |
https://github.com/huggingface/datasets/issues/4861 | Using disk for memory with the method `from_dict` | This issue was also causing an OOM in @nateraw 's workflow and shows again that behavior is confusing - we should definitely switch to using the disk IMO | **Is your feature request related to a problem? Please describe.**
I start with an empty dataset. In a loop, at each iteration, I create a new dataset with the method `from_dict` (based on some data I load) and I concatenate this new dataset with the one at the previous iteration. After some iterations, I have an OOM error.
**Describe the solution you'd like**
The method `from_dict` loads the data in RAM. It could be good to add an option to use the disk instead.
**Describe alternatives you've considered**
To solve the problem, I have to do an intermediate step where I save the new datasets at each iteration with `save_to_disk`. Once it's done, I open them all and concatenate them.
| 28 | Using disk for memory with the method `from_dict`
**Is your feature request related to a problem? Please describe.**
I start with an empty dataset. In a loop, at each iteration, I create a new dataset with the method `from_dict` (based on some data I load) and I concatenate this new dataset with the one at the previous iteration. After some iterations, I have an OOM error.
**Describe the solution you'd like**
The method `from_dict` loads the data in RAM. It could be good to add an option to use the disk instead.
**Describe alternatives you've considered**
To solve the problem, I have to do an intermediate step where I save the new datasets at each iteration with `save_to_disk`. Once it's done, I open them all and concatenate them.
This issue was also causing an OOM in @nateraw 's workflow and shows again that behavior is confusing - we should definitely switch to using the disk IMO | [
-0.22289536893367767,
-0.5735651254653931,
-0.02692171186208725,
0.24311186373233795,
0.03270350396633148,
-0.21326953172683716,
0.14041100442409515,
0.09544262290000916,
0.28427645564079285,
0.3349032700061798,
0.25292813777923584,
0.518291175365448,
-0.036538541316986084,
0.13357001543045044,
-0.3896331191062927,
0.2416554093360901,
0.17047074437141418,
0.03844378888607025,
-0.5753229856491089,
0.04720235615968704,
-0.22379358112812042,
0.02142578922212124,
-0.20098504424095154,
-0.36784642934799194,
-0.19154240190982819,
-0.03837443143129349,
-0.2447388470172882,
0.4703299105167389,
0.12295477837324142,
-0.12636277079582214,
0.06918160617351532,
0.2481956034898758,
0.0645519271492958,
0.22943541407585144,
-0.00010573861072771251,
-0.1440543234348297,
0.07211920619010925,
-0.21134161949157715,
-0.3707645833492279,
0.10529975593090057,
0.07579678297042847,
-0.29770827293395996,
0.11925333738327026,
-0.33025333285331726,
0.05179288238286972,
0.29308944940567017,
-0.07503817230463028,
-0.6237449645996094,
0.4015379548072815,
0.0782470554113388,
0.26669761538505554,
0.13610921800136566,
0.01768994703888893,
-0.20810580253601074,
-0.2093801200389862,
0.4277729392051697,
-0.04748598113656044,
0.1796627789735794,
0.5516434907913208,
-0.06618334352970123,
-0.044867806136608124,
0.07104673981666565,
-0.17873597145080566,
0.0667470246553421,
0.18827396631240845,
0.25927314162254333,
0.4546334743499756,
-0.0791148990392685,
-0.06452126055955887,
0.07643112540245056,
0.534201979637146,
0.04498613625764847,
0.032901372760534286,
-0.18541400134563446,
-0.072505883872509,
-0.1655188798904419,
0.058253057301044464,
0.07259057462215424,
-0.3792501389980316,
0.2849465608596802,
0.19476890563964844,
-0.32344844937324524,
-0.18572300672531128,
0.19330227375030518,
-0.12953980267047882,
-0.2586214244365692,
-0.06587065011262894,
0.10150457918643951,
0.28136223554611206,
0.10248931497335434,
-0.03804454207420349,
-0.12205679714679718,
-0.055164460092782974,
0.043476153165102005,
-0.12046147882938385,
-0.20612411201000214,
0.06654563546180725,
-0.41917815804481506,
0.23366281390190125,
-0.002945210784673691,
0.11147870123386383,
0.19008776545524597,
-0.11599474400281906,
0.019176792353391647,
0.39757290482521057,
0.24252794682979584,
-0.06384586542844772,
-0.058537352830171585,
0.1829030066728592,
0.035853661596775055,
-0.25224044919013977,
-0.08039310574531555,
0.009795468300580978,
-0.023955177515745163,
0.3071269690990448,
-0.30243098735809326,
0.16623324155807495,
0.01895057037472725,
-0.21216684579849243,
-0.18227407336235046,
0.13205423951148987,
-0.02316816709935665,
0.06387406587600708,
0.2501677870750427,
-0.030793212354183197,
0.3937930166721344,
0.15488021075725555,
0.2774093747138977,
-0.07664121687412262,
-0.002075018361210823,
-0.1566099375486374,
-0.13703468441963196,
-0.13213852047920227,
0.28720203042030334,
-0.11347569525241852,
0.17836681008338928,
-0.05843297392129898,
0.22013477981090546,
0.08275242149829865,
-0.23108816146850586,
-0.04395176097750664,
-0.2074810266494751,
0.20152437686920166,
-0.15719464421272278,
-0.14349530637264252,
-0.2589680254459381,
0.18009702861309052,
0.003543104976415634,
-0.19016966223716736,
0.5721864700317383,
-0.21124765276908875,
-0.5039937496185303,
-0.5787798762321472,
0.21891926229000092,
0.17533491551876068,
0.14668896794319153,
-0.09182194620370865,
0.19018515944480896,
0.018452033400535583,
0.017759103327989578,
-0.2950032353401184,
0.055287957191467285,
-0.06862077116966248,
-0.2669419050216675,
-0.06177011877298355,
0.16387887299060822,
-0.2681361734867096,
0.2551046907901764,
-0.3738851547241211,
0.16466136276721954,
0.4439751207828522,
0.43174540996551514,
-0.30565324425697327,
0.18764227628707886,
-0.43844932317733765,
-0.028855595737695694,
0.1224723681807518,
-0.33176082372665405,
-0.2246914654970169,
0.15220409631729126,
-0.1671212613582611,
0.04948616772890091,
0.4074864387512207,
0.3775497376918793,
0.10928298532962799,
0.06216120719909668,
0.5015478134155273,
0.09454509615898132,
0.04882364720106125,
-0.03460695222020149,
-0.3765680491924286,
-0.12084992974996567,
-0.014563087373971939,
-0.0283602774143219,
-0.33870914578437805,
0.41817981004714966,
-0.03597060590982437,
-0.09143378585577011,
0.47744980454444885,
-0.29961615800857544,
-0.040640056133270264,
0.09538006782531738,
0.5648539066314697,
-0.19006575644016266,
-0.1397780179977417,
-0.00019375979900360107,
-0.26772600412368774,
0.11835829168558121,
0.3178430199623108,
0.13336026668548584,
-0.08042429387569427,
-0.07713259756565094,
-0.02071913331747055,
-0.021268006414175034,
0.0009072087705135345,
0.12677477300167084,
0.13621452450752258,
0.032638560980558395,
0.20491258800029755,
-0.2932792603969574,
-0.13477250933647156,
0.3872261345386505,
-0.2910177707672119,
-0.01871926710009575,
0.09235428273677826,
0.26625847816467285,
0.022587506100535393,
-0.0880630686879158,
-0.2779160737991333,
0.10590860992670059,
-0.00006456300616264343,
0.12684962153434753,
0.12785272300243378,
0.2453388273715973,
0.0879911556839943,
-0.06713970005512238,
-0.02453441172838211,
0.11029408872127533,
-0.04476117342710495,
-0.06946738064289093,
0.33580896258354187,
-0.1822454184293747,
0.01633784919977188,
-0.1844170093536377,
0.04421323537826538,
0.30897057056427,
0.25733986496925354,
0.09881992638111115,
0.08775269985198975,
0.0813434049487114,
0.14887499809265137,
-0.1056034117937088,
0.09991970658302307,
-0.3241559863090515,
0.22041700780391693,
0.3311111629009247,
0.042442645877599716,
0.09076480567455292,
-0.5490249395370483,
-0.07305926829576492,
0.379337877035141,
0.06581573188304901,
0.374581515789032,
0.16904199123382568,
0.0853031724691391,
-0.16880464553833008,
-0.14329807460308075,
0.01767696812748909,
0.5654438138008118,
0.2601966857910156,
-0.09502056241035461,
0.03779168054461479,
-0.13495519757270813,
-0.055911410599946976,
0.18969467282295227,
0.02645771950483322,
0.29560473561286926,
0.051263295114040375,
0.07503052800893784,
-0.2242431789636612,
-0.2354922592639923,
-0.10115069150924683,
-0.017546508461236954,
-0.10774257779121399,
-0.06649549305438995,
-0.06363634765148163,
-0.15866495668888092,
-0.19906505942344666,
-0.23658178746700287,
0.2153785675764084,
-0.12312580645084381,
-0.19082234799861908,
-0.08471086621284485,
0.7156753540039062,
-0.2461611032485962,
-0.16023726761341095,
0.19938641786575317,
0.483381986618042,
-0.026516281068325043,
0.01615658402442932,
-0.05875803157687187,
0.010786868631839752,
-0.12411657720804214,
0.0673825740814209,
0.20852594077587128,
-0.3143623471260071,
0.4415248930454254,
-0.048423878848552704,
-0.09192678332328796,
-0.422107994556427,
0.004778444766998291,
0.0120353102684021,
0.16435283422470093,
0.09059546887874603,
-0.06583188474178314,
0.2539835572242737,
-0.015573261305689812,
-0.11905590444803238,
0.2022303342819214,
-0.04689456894993782,
-0.24173662066459656,
0.14553306996822357,
0.1425776332616806,
0.20605061948299408,
-0.2960382401943207,
-0.18814721703529358,
-0.2393534928560257,
-0.4216567277908325,
0.04748111218214035,
-0.006116803735494614,
0.33121830224990845,
0.12909884750843048,
-0.058712612837553024,
0.06309990584850311,
0.45591193437576294,
0.26378968358039856,
-0.3769783079624176,
-0.17679768800735474,
0.1642991453409195,
0.0054649063386023045,
-0.12105076014995575,
-0.04543042182922363,
-0.23783646523952484,
0.14811773598194122,
0.1857592761516571,
-0.48107409477233887,
-0.49045321345329285,
-0.04162921756505966,
0.2127305269241333,
-0.3580038845539093,
0.036489568650722504,
0.29452231526374817,
0.15135040879249573,
-0.24993547797203064,
0.048389360308647156,
-0.10496492683887482,
0.23806902766227722,
0.4726841449737549,
0.07411905378103256,
0.11425764113664627,
0.2226458191871643,
0.14132528007030487,
0.17197896540164948,
-0.21013271808624268,
0.28528860211372375,
0.489921510219574,
0.020669015124440193,
0.1481969952583313,
-0.2796872556209564,
0.06046485900878906,
-0.3849141001701355,
-0.1059117317199707,
-0.4261842370033264,
0.15250368416309357,
-0.015551522374153137,
-0.29239019751548767,
-0.14420752227306366,
0.17241275310516357,
-0.06271897256374359,
-0.19815172255039215,
0.19769707322120667,
-0.4111146330833435,
0.11179744452238083,
-0.22536993026733398,
-0.05217062309384346,
-0.1621156930923462,
0.13799533247947693,
-0.20179621875286102,
-0.2673628330230713,
0.20038577914237976,
-0.44871920347213745,
-0.4640587866306305,
-0.25517258048057556,
-0.6897960305213928,
0.37371915578842163,
-0.04050283506512642,
0.19284391403198242,
0.017561841756105423,
-0.26452428102493286,
0.11268813908100128,
-0.04339291527867317,
0.6569108963012695,
0.41169440746307373,
-0.35911256074905396,
0.2189207524061203,
-0.32267260551452637,
-0.35986456274986267,
0.04375823214650154,
-0.3165437877178192,
-0.09060445427894592,
-0.1830155849456787,
0.4255411624908447,
-0.38231322169303894,
-0.3015074133872986,
-0.23967549204826355,
0.24711719155311584,
-0.17403200268745422,
-0.02038830704987049,
0.0826968401670456,
-0.4689578413963318,
-0.38522323966026306,
-0.18044248223304749,
0.26021602749824524,
0.6050800681114197,
-0.015150228515267372,
-0.024937082082033157,
0.03558383136987686,
-0.16125622391700745,
0.045199889689683914,
-0.3278871774673462,
0.4249265193939209,
-0.26623204350471497,
0.08099141716957092,
-0.09934577345848083,
0.516877293586731,
0.5008143186569214,
0.3324373960494995,
0.06945611536502838,
-0.02768871933221817,
-0.019527863711118698,
-0.14690300822257996,
0.3510025441646576,
0.4386131465435028,
0.40086665749549866,
0.3063049018383026,
-0.14806659519672394,
0.2671007513999939,
-0.6066229343414307,
-0.10840386152267456,
0.213125079870224,
-0.03429761901497841,
-0.26989132165908813,
0.054749198257923126,
0.12099269032478333,
0.14930234849452972,
-0.06494353711605072,
0.23538738489151,
-0.14245131611824036,
-0.39212745428085327,
0.4465212821960449,
0.19769422709941864,
1.0532625913619995,
-0.0553702786564827,
0.38649240136146545,
0.11325637251138687,
-0.07001228630542755,
0.11632052809000015,
0.1346941888332367,
0.18759937584400177,
-0.10509780049324036,
-0.013271513395011425,
0.0889335423707962,
-0.23858407139778137,
0.21794819831848145,
0.15499840676784515,
-0.36710125207901,
0.03878972306847572,
-0.3986698389053345,
-0.05113663896918297,
-0.2527080178260803,
0.044830359518527985,
-0.2766420543193817,
-0.26765304803848267,
-0.19283901154994965,
0.1139611154794693,
0.15580159425735474,
-0.10423889756202698,
-0.09975861012935638,
0.057678986340761185,
0.09437073767185211,
-0.12088390439748764,
-0.05992365628480911,
-0.17011576890945435,
-0.06441675126552582,
0.2685462236404419,
-0.07996843755245209,
0.005261547863483429,
-0.14225460588932037,
0.4073173999786377,
0.09657719731330872,
-0.018136192113161087,
0.07324811071157455,
-0.013876866549253464,
-0.06444443017244339,
0.2987023890018463,
0.1889733523130417,
-0.35345932841300964,
0.4809325635433197,
-0.024860356003046036,
-0.17203029990196228,
0.1385844647884369,
-0.06423839926719666,
-0.5624660849571228,
-0.18120728433132172,
0.008120827376842499,
0.23091499507427216,
-0.22684137523174286,
-0.19788677990436554,
0.19021865725517273,
-0.1238773912191391,
-0.16087326407432556,
0.23509620130062103,
0.4325840473175049,
-0.3629123568534851,
0.5069167613983154,
-0.17558033764362335,
-0.06512001156806946,
-0.029090017080307007,
-0.01354953646659851,
0.47117817401885986,
0.09753976762294769,
0.32152867317199707,
-0.1269339621067047,
0.057535141706466675,
-0.23304873704910278,
0.09407924860715866,
0.006200822535902262,
0.15651249885559082,
0.47135382890701294,
0.1476578712463379,
-0.13724279403686523,
-0.0584162101149559,
0.2710334062576294,
0.11608630418777466,
0.23580855131149292,
-0.46434640884399414,
-0.1820174604654312,
-0.3600756525993347,
0.2185116857290268,
0.24912968277931213,
0.3229854702949524,
0.01173301413655281,
-0.0894438624382019,
-0.4733833074569702,
0.03919922560453415,
-0.41691726446151733,
-0.00617415364831686,
-0.26187068223953247,
0.1694476306438446,
-0.045448824763298035,
-0.0794367864727974,
0.22884468734264374,
-0.006280013360083103,
0.26179239153862,
0.10040614753961563,
0.006566920317709446,
-0.2550243139266968,
0.21140535175800323,
0.10411959141492844,
-0.08007524162530899,
-0.3122605085372925,
0.10147229582071304,
-0.6609883308410645,
-0.04092844948172569,
-0.13529805839061737,
0.017948158085346222,
0.20226839184761047,
-0.200685515999794,
-0.07599131762981415,
0.2447386384010315,
0.24782559275627136,
-0.06591156125068665,
0.16952171921730042,
0.0607181116938591,
0.25196605920791626,
-0.12938444316387177,
0.2341390699148178,
-0.2542245090007782,
-0.16032147407531738,
-0.23834751546382904,
0.156255304813385,
0.1316431164741516,
-0.058555543422698975,
0.0761084035038948,
0.0932164192199707,
-0.31942543387413025,
0.07888489216566086,
0.5236649513244629,
-0.10047602653503418,
-0.10477118194103241,
0.08166076987981796,
0.3261195421218872,
0.3562431335449219,
0.03665713220834732,
-0.44537830352783203,
0.08802728354930878,
-0.40282952785491943,
-0.003275454044342041,
0.291808158159256,
-0.030290771275758743,
0.191130131483078,
-0.18662618100643158,
-0.19563060998916626,
-0.04992397502064705,
-0.19403935968875885,
0.07496185600757599,
0.15936227142810822,
0.02334268018603325,
0.006231490522623062,
0.15425103902816772,
0.11235299706459045,
0.2223374843597412,
0.555841863155365,
-0.007582284510135651,
0.22831419110298157,
0.17570924758911133,
0.08917079120874405,
0.028532326221466064,
-0.07399637997150421,
0.36328354477882385,
0.3605054020881653,
-0.3028930127620697,
-0.01725437492132187,
-0.2787659764289856,
-0.20045647025108337,
-0.4058024287223816,
-0.05298465117812157,
-0.16257379949092865,
0.03824599087238312,
-0.4361642003059387,
-0.04092855751514435,
-0.0953601598739624,
-0.0877012386918068,
0.26945069432258606,
-0.002159383147954941,
0.08257701992988586,
-0.270740270614624,
-0.06866829097270966,
-0.007863156497478485,
0.2969115972518921,
0.2210397869348526,
0.13640879094600677,
0.04251579940319061,
0.2920851409435272,
-0.26526445150375366,
-0.039097242057323456,
-0.017830364406108856,
0.08283978700637817,
0.2665341794490814,
0.22413760423660278,
0.28868019580841064,
0.33365485072135925,
-0.1273491084575653,
-0.00022102147340774536,
0.09541678428649902,
-0.15063540637493134,
-0.31669533252716064,
0.07139559835195541,
0.17883703112602234,
0.24088214337825775,
0.2449030727148056,
0.21939559280872345,
-0.19044268131256104,
0.022643284872174263,
0.13971053063869476,
0.00007068179547786713,
-0.3705098628997803,
0.15482446551322937,
0.11759373545646667,
-0.5127593874931335,
0.1947845220565796,
0.05229288712143898,
0.030881226062774658,
-0.3082064986228943,
0.3493288457393646,
-0.24635685980319977,
0.14240849018096924,
0.16359654068946838,
0.12589013576507568,
-0.16505959630012512,
0.3224695324897766,
0.07031884044408798,
-0.05337782949209213,
-0.26349568367004395,
-0.29840561747550964,
-0.22360177338123322,
0.14822712540626526,
0.3383990228176117,
-0.15829192101955414,
-0.011396754533052444,
0.4076738655567169,
0.19684182107448578,
-0.08588360995054245,
-0.04313960671424866,
-0.4407976269721985,
-0.1287744790315628,
0.11883758008480072,
-0.34406694769859314,
-0.13879826664924622,
0.2015334516763687,
-0.021062979474663734,
-0.027751637622714043,
-0.4816579520702362,
0.23093706369400024,
0.17814724147319794,
0.16127577424049377,
0.05766288563609123,
0.5270109176635742,
0.020340707153081894,
0.44753339886665344,
0.12193125486373901,
0.10645382106304169,
0.2175152599811554,
0.040779031813144684,
-0.18155430257320404,
0.48486727476119995,
-0.11938352882862091,
-0.11058264225721359,
-0.14233320951461792,
0.02469756454229355,
0.29474303126335144,
-0.3333313763141632,
0.2638293206691742,
-0.11563874781131744,
0.17309734225273132,
0.1748862862586975,
-0.3235323429107666,
-0.08093196153640747,
0.17690721154212952,
0.16012391448020935,
-0.27362796664237976,
0.1233651340007782,
0.35306668281555176,
0.14031833410263062,
-0.05652141571044922,
-0.24611498415470123,
-0.08012000471353531,
0.13058505952358246,
0.17880505323410034,
-0.3373456299304962,
-0.14314298331737518,
0.3471637964248657,
-0.2436141073703766,
-0.05849262326955795,
-0.22411683201789856,
-0.32001006603240967,
0.2362101525068283,
-0.1649329960346222,
-0.2134527862071991,
0.2524615228176117,
-0.0028638727962970734,
-0.11213847994804382,
-0.016607344150543213,
0.36971667408943176,
-0.3426544964313507,
-0.25187358260154724,
-0.035137832164764404,
-0.1395169496536255
] |
https://github.com/huggingface/datasets/issues/4858 | map() function removes columns when input_columns is not None | Hi! Thanks for reporting! This looks like a bug. I've just opened a PR with the fix. | ## Describe the bug
The map function, removes features from the dataset that are not present in the _input_columns_ list of columns, despite the columns being removed not mentioned in the _remove_columns_ argument.
## Steps to reproduce the bug
```python
from datasets import Dataset
ds = Dataset.from_dict({"a" : [1,2,3],"b" : [0,1,0], "c" : [2,4,5]})
def double(x,y):
x = x*2
y = y*2
return {"d" : x, "e" : y}
ds.map(double, input_columns=["a","c"])
```
## Expected results
```
Dataset({
features: ['a', 'b', 'c', 'd', 'e'],
num_rows: 3
})
```
## Actual results
```
Dataset({
features: ['a', 'c', 'd', 'e'],
num_rows: 3
})
```
In this specific example feature **b** should not be removed.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: linux (colab)
- Python version: 3.7.13
- PyArrow version: 6.0.1
| 17 | map() function removes columns when input_columns is not None
## Describe the bug
The map function, removes features from the dataset that are not present in the _input_columns_ list of columns, despite the columns being removed not mentioned in the _remove_columns_ argument.
## Steps to reproduce the bug
```python
from datasets import Dataset
ds = Dataset.from_dict({"a" : [1,2,3],"b" : [0,1,0], "c" : [2,4,5]})
def double(x,y):
x = x*2
y = y*2
return {"d" : x, "e" : y}
ds.map(double, input_columns=["a","c"])
```
## Expected results
```
Dataset({
features: ['a', 'b', 'c', 'd', 'e'],
num_rows: 3
})
```
## Actual results
```
Dataset({
features: ['a', 'c', 'd', 'e'],
num_rows: 3
})
```
In this specific example feature **b** should not be removed.
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: linux (colab)
- Python version: 3.7.13
- PyArrow version: 6.0.1
Hi! Thanks for reporting! This looks like a bug. I've just opened a PR with the fix. | [
0.2791581153869629,
-0.11062590032815933,
-0.06368225812911987,
0.1861584484577179,
0.16765299439430237,
0.16881519556045532,
0.5726051926612854,
0.39615511894226074,
0.3560894727706909,
0.1518978327512741,
0.006297950632870197,
0.5933223962783813,
-0.017512522637844086,
0.01556372456252575,
-0.13431377708911896,
-0.25282976031303406,
0.1279875487089157,
0.18521897494792938,
-0.4863124191761017,
-0.2554718255996704,
-0.25020530819892883,
-0.019422369077801704,
-0.6026982069015503,
-0.09996697306632996,
-0.036317430436611176,
-0.004326110705733299,
-0.12132951617240906,
0.08496426045894623,
-0.035084597766399384,
0.04212454333901405,
-0.06261736154556274,
-0.21444714069366455,
-0.24072912335395813,
0.17888310551643372,
-0.00010404431668575853,
-0.19432564079761505,
0.02939082309603691,
0.004012811928987503,
-0.15815062820911407,
-0.10394540429115295,
-0.2769721746444702,
-0.14386220276355743,
0.11863533407449722,
-0.3368569612503052,
0.10208595544099808,
-0.23388253152370453,
-0.3153788149356842,
0.04794962704181671,
0.018961727619171143,
0.15542462468147278,
0.3049335479736328,
0.22773922979831696,
0.02891760692000389,
0.11729301512241364,
0.3574541509151459,
0.35023581981658936,
-0.3506031632423401,
-0.08726869523525238,
0.09179175645112991,
-0.354789674282074,
0.3207879960536957,
0.23927649855613708,
-0.4852491319179535,
-0.07746292650699615,
0.07625007629394531,
0.28255677223205566,
0.14013630151748657,
-0.357096403837204,
0.22063708305358887,
0.14307281374931335,
0.20286351442337036,
-0.30747148394584656,
0.00459107244387269,
-0.17207640409469604,
0.036173585802316666,
-0.20129165053367615,
0.06988807022571564,
-0.03288039565086365,
0.009773170575499535,
0.045984141528606415,
-0.1377384215593338,
-0.03905284032225609,
0.20325788855552673,
0.2793942987918854,
-0.1461414396762848,
0.17676761746406555,
-0.04931899160146713,
0.10904085636138916,
-0.07433269917964935,
0.017754578962922096,
-0.07214761525392532,
-0.4283260107040405,
0.13441355526447296,
0.5140968561172485,
-0.26677435636520386,
-0.14668241143226624,
0.17753483355045319,
-0.0005435645580291748,
0.03161781281232834,
-0.024540875107049942,
0.12713949382305145,
-0.05243276059627533,
-0.12904006242752075,
0.3904249370098114,
0.35538166761398315,
0.23621143400669098,
-0.15784499049186707,
0.3768589496612549,
-0.04914233088493347,
0.07684392482042313,
-0.019365593791007996,
0.038505155593156815,
0.5784411430358887,
0.12726424634456635,
0.3583098351955414,
-0.000008456408977508545,
0.5579498410224915,
-0.10074283182621002,
-0.3233169913291931,
0.1686551719903946,
-0.24381837248802185,
0.03694861754775047,
-0.05951191857457161,
0.14174336194992065,
0.03359198570251465,
0.13883142173290253,
-0.2852068245410919,
0.3271464705467224,
-0.16023065149784088,
0.09934501349925995,
-0.381106436252594,
0.30405133962631226,
-0.16700129210948944,
-0.32536712288856506,
0.18107309937477112,
0.15710628032684326,
0.31998786330223083,
0.37644481658935547,
-0.09530231356620789,
-0.08772215247154236,
-0.1866765171289444,
-0.3350745439529419,
0.4269847571849823,
0.32624468207359314,
-0.07962992042303085,
0.147758349776268,
0.27509647607803345,
-0.282662034034729,
0.028443217277526855,
0.37780994176864624,
-0.22082003951072693,
0.2306615263223648,
-0.2882825434207916,
0.25449591875076294,
-0.04237451031804085,
0.05598774552345276,
-0.23310300707817078,
0.07834303379058838,
0.2260558158159256,
0.02706117555499077,
0.09864287078380585,
-0.24705897271633148,
-0.05566038191318512,
-0.45388513803482056,
0.08207102119922638,
0.4175569415092468,
-0.2956026792526245,
-0.06630396842956543,
0.09739160537719727,
0.038196563720703125,
0.2270680069923401,
0.10844013094902039,
-0.02567346952855587,
-0.03745502978563309,
-0.2648760676383972,
0.17675118148326874,
0.2516442835330963,
0.16671372950077057,
-0.15616273880004883,
0.09290124475955963,
-0.09349832683801651,
0.2639968693256378,
-0.3500863015651703,
0.025599045678973198,
0.12330642342567444,
0.04348977282643318,
-0.06569139659404755,
-0.014421012252569199,
0.10736936330795288,
0.1386495679616928,
-0.25062334537506104,
0.024620527401566505,
0.26775890588760376,
-0.1030956357717514,
0.1061495840549469,
0.3007623255252838,
0.18542301654815674,
-0.36494192481040955,
0.3108900487422943,
0.030391598120331764,
0.19267037510871887,
0.3158315420150757,
0.30571725964546204,
0.058006662875413895,
-0.06976793706417084,
-0.19359853863716125,
-0.4053078889846802,
0.17220628261566162,
0.3339102864265442,
-0.02483595907688141,
-0.1230049878358841,
-0.18983738124370575,
-0.13454264402389526,
0.055466897785663605,
-0.1739717721939087,
0.07501330226659775,
0.23797613382339478,
-0.034932516515254974,
-0.12415380775928497,
0.06691940128803253,
-0.2640914022922516,
0.09229051321744919,
-0.06984846293926239,
0.19686511158943176,
-0.21970200538635254,
0.4213239252567291,
0.018274206668138504,
-0.10888456553220749,
-0.10637978464365005,
0.22818347811698914,
0.36937621235847473,
0.024067828431725502,
-0.062172695994377136,
0.22388863563537598,
0.06388530135154724,
-0.12442061305046082,
-0.39172881841659546,
0.18521058559417725,
0.20190922915935516,
0.06147633120417595,
0.03534701466560364,
0.2132403403520584,
0.289935827255249,
-0.02079550176858902,
-0.10504292696714401,
0.20128820836544037,
-0.13413824141025543,
0.1367909014225006,
-0.24032306671142578,
0.07448267936706543,
-0.09378213435411453,
-0.22878573834896088,
0.06534575670957565,
-0.31112319231033325,
-0.3481009304523468,
0.0671832263469696,
-0.05998560041189194,
0.10294681042432785,
-0.18808987736701965,
0.09469382464885712,
0.5389106273651123,
0.029696278274059296,
0.17251461744308472,
-0.10598807781934738,
-0.32966721057891846,
-0.002913333475589752,
0.11992395669221878,
0.05394254997372627,
0.5652921795845032,
0.1610354632139206,
0.13409829139709473,
0.11866502463817596,
0.09521210193634033,
-0.05390998348593712,
0.1568368822336197,
0.15906791388988495,
0.04683264344930649,
0.09117661416530609,
0.34029483795166016,
0.20167276263237,
-0.3508252799510956,
0.23920011520385742,
0.13745395839214325,
0.29968369007110596,
-0.31370481848716736,
-0.05959668755531311,
-0.27711009979248047,
0.1562739610671997,
0.15258358418941498,
0.0414077453315258,
0.018442250788211823,
-0.3297061026096344,
0.13895100355148315,
0.06639555841684341,
-0.30362966656684875,
0.12664690613746643,
-0.0646822452545166,
-0.11288852989673615,
0.028960512951016426,
-0.32920101284980774,
-0.0203857384622097,
-0.101002998650074,
-0.13454526662826538,
0.22834888100624084,
-0.11623550951480865,
0.08588758111000061,
-0.09500427544116974,
0.20153196156024933,
-0.37903594970703125,
-0.269566148519516,
-0.31693392992019653,
0.10313504934310913,
-0.41397690773010254,
0.035853490233421326,
0.09483825415372849,
0.1946788728237152,
-0.16258305311203003,
-0.00804292131215334,
0.1745356321334839,
-0.0846165269613266,
-0.1338011920452118,
0.21878239512443542,
0.16084617376327515,
-0.0885213166475296,
-0.4024960696697235,
-0.14098486304283142,
0.19406351447105408,
-0.23958556354045868,
-0.03014407306909561,
-0.0696633905172348,
0.1895974725484848,
-0.1748127043247223,
0.15658298134803772,
-0.19851619005203247,
-0.19367985427379608,
-0.051751330494880676,
-0.3528422713279724,
0.07490749657154083,
0.2755770981311798,
0.05862492695450783,
-0.20598594844341278,
0.16506914794445038,
-0.11153873056173325,
-0.03781028464436531,
0.07898876070976257,
-0.37481582164764404,
-0.3126976191997528,
-0.1179182380437851,
0.2113913595676422,
-0.014062311500310898,
0.27320897579193115,
0.43070149421691895,
0.20691798627376556,
-0.10154078900814056,
0.00786479189991951,
-0.10427126288414001,
-0.13300031423568726,
0.5763022303581238,
0.0004317238926887512,
-0.06333740800619125,
0.2633911073207855,
-0.04954936355352402,
0.22709378600120544,
0.07345069944858551,
0.0367281436920166,
0.4058336913585663,
-0.18240945041179657,
0.3927169144153595,
-0.1495710015296936,
-0.4702918231487274,
0.029292387887835503,
-0.06444233655929565,
-0.07426425814628601,
0.19999027252197266,
-0.15449142456054688,
-0.5020911693572998,
-0.0688667893409729,
0.16069285571575165,
-0.2882889211177826,
-0.1817733198404312,
0.1678851842880249,
0.03895581141114235,
0.1621752381324768,
0.1762014627456665,
0.15232014656066895,
-0.13434992730617523,
-0.2133873701095581,
0.04304679110646248,
-0.3098357319831848,
0.26282042264938354,
-0.2990904152393341,
-0.31437695026397705,
-0.046549513936042786,
-0.26585090160369873,
0.2581287622451782,
-0.06380769610404968,
-0.04845428839325905,
0.03978307917714119,
-0.4350380301475525,
0.0036809444427490234,
0.3505935072898865,
0.35490137338638306,
-0.22098040580749512,
-0.19607515633106232,
0.22075144946575165,
0.06906158477067947,
-0.33521175384521484,
-0.23011396825313568,
-0.36742332577705383,
0.21356235444545746,
-0.053368937224149704,
0.44503816962242126,
-0.20456311106681824,
-0.07996787875890732,
0.39018532633781433,
0.2945564091205597,
0.03015097603201866,
-0.07239672541618347,
-0.266140341758728,
-0.17946428060531616,
-0.045720234513282776,
0.045736610889434814,
0.16249577701091766,
0.1728350669145584,
-0.13721255958080292,
-0.2346154749393463,
0.047111108899116516,
-0.18303287029266357,
-0.06445455551147461,
0.05899200215935707,
0.3455580472946167,
0.058295704424381256,
0.02199641615152359,
-0.1190003901720047,
0.05762069299817085,
-0.14162738621234894,
0.1930026412010193,
0.031700439751148224,
-0.04013523459434509,
0.049422696232795715,
-0.47957277297973633,
0.3996160626411438,
0.05382869392633438,
0.12222537398338318,
0.22763743996620178,
-0.4841788113117218,
0.21099063754081726,
0.006456276401877403,
-0.437220960855484,
0.46301478147506714,
-0.17070786654949188,
0.20126642286777496,
-0.20916137099266052,
0.1943526417016983,
-0.07652770727872849,
-0.17610466480255127,
0.30139991641044617,
0.01475469022989273,
-0.15927773714065552,
0.5717207193374634,
-0.08702274411916733,
0.7415139079093933,
0.024509266018867493,
-0.10543757677078247,
0.2976876497268677,
0.05522885173559189,
0.43077489733695984,
-0.005473319441080093,
0.136198952794075,
-0.2749301791191101,
-0.4021507799625397,
-0.027813993394374847,
0.018042858690023422,
0.17043143510818481,
0.07878918945789337,
-0.08519618213176727,
0.3133240044116974,
-0.4443647265434265,
0.6577810049057007,
0.06673017144203186,
-0.46396195888519287,
0.3390505015850067,
-0.05563824996352196,
-0.03291545808315277,
0.14125289022922516,
0.012346349656581879,
0.0355592705309391,
-0.0006633335724473,
0.08923738449811935,
0.04615433141589165,
-0.254993736743927,
0.07394082844257355,
0.007771190255880356,
-0.31050917506217957,
0.07698148488998413,
0.06772683560848236,
-0.2858802080154419,
-0.12121805548667908,
0.36045509576797485,
-0.010655537247657776,
0.007967192679643631,
0.18144403398036957,
-0.012163553386926651,
0.48225417733192444,
0.414384126663208,
-0.08079832792282104,
0.15554551780223846,
-0.07036133110523224,
0.043850384652614594,
-0.44897574186325073,
0.24768885970115662,
-0.16386771202087402,
-0.039262790232896805,
-0.18918418884277344,
0.28240057826042175,
0.170485720038414,
-0.30143386125564575,
-0.2791989743709564,
-0.05036906898021698,
0.26955005526542664,
-0.36125001311302185,
0.209883913397789,
0.039350591599941254,
-0.10321620106697083,
0.5096169710159302,
-0.08024056255817413,
-0.1819799840450287,
-0.18429920077323914,
0.1414031982421875,
0.1521039754152298,
0.2881593406200409,
0.3835148811340332,
-0.054636213928461075,
-0.1719205230474472,
-0.26635226607322693,
-0.08121246099472046,
-0.09021922945976257,
-0.1107947900891304,
0.1485489159822464,
-0.1706109195947647,
-0.002574145793914795,
-0.04018218070268631,
0.06673169881105423,
-0.3453747630119324,
0.1990092694759369,
-0.1878146380186081,
-0.282406210899353,
0.0014812219887971878,
0.20364026725292206,
0.281253844499588,
-0.11178477108478546,
-0.017052829265594482,
0.11730661988258362,
-0.0596398264169693,
0.07419681549072266,
-0.4182853102684021,
0.1890726089477539,
-0.12457598745822906,
0.36654502153396606,
0.3547755777835846,
0.12491913884878159,
-0.05363012105226517,
-0.20203424990177155,
0.3140029311180115,
-0.013945139944553375,
0.1659364402294159,
-0.3777708411216736,
-0.1413961499929428,
0.07456064969301224,
-0.141501784324646,
0.08678572624921799,
-0.1517091542482376,
-0.1486191749572754,
-0.14548102021217346,
-0.19249792397022247,
0.3453308045864105,
0.1371523141860962,
-0.07551546394824982,
0.34064388275146484,
-0.03009367361664772,
-0.09145527333021164,
-0.16195173561573029,
0.03855985775589943,
-0.3505917191505432,
-0.20890139043331146,
0.2714139223098755,
0.06597138196229935,
0.14746953547000885,
0.0245852991938591,
-0.19199469685554504,
-0.01100592315196991,
-0.4116280674934387,
-0.04968204349279404,
0.39761239290237427,
-0.21834377944469452,
-0.07527262717485428,
-0.01265679020434618,
0.12916649878025055,
-0.37988632917404175,
-0.23417136073112488,
-0.05800445377826691,
-0.02509736269712448,
0.33201879262924194,
-0.5444532632827759,
-0.12112243473529816,
0.4687328338623047,
0.39530861377716064,
0.40816426277160645,
0.3678476810455322,
0.11453811824321747,
-0.044980619102716446,
-0.03268929570913315,
0.05680418759584427,
0.1251416951417923,
-0.10953660309314728,
0.018733525648713112,
0.7451099157333374,
-0.040375903248786926,
0.10443329066038132,
0.08200133591890335,
-0.03397073969244957,
-0.22446668148040771,
0.3626672029495239,
0.2627149820327759,
0.13334786891937256,
0.0815681517124176,
0.0186149999499321,
-0.028820432722568512,
-0.4066869020462036,
0.3484177887439728,
0.22453227639198303,
-0.12969970703125,
-0.012929640710353851,
0.18592151999473572,
-0.07758037000894547,
0.09385992586612701,
-0.1341441124677658,
-0.11126887798309326,
0.20979303121566772,
-0.3819931745529175,
0.13422249257564545,
-0.0227602981030941,
-0.26640257239341736,
-0.15186914801597595,
-0.10691238939762115,
0.0017077885568141937,
-0.1962306648492813,
0.8339669704437256,
-0.05839209258556366,
-0.07424040138721466,
-0.11883825063705444,
0.0623442605137825,
0.20637920498847961,
0.23577004671096802,
-0.045021578669548035,
-0.12073036283254623,
0.058230120688676834,
-0.0177978053689003,
-0.1842525452375412,
0.2050081342458725,
0.11286763846874237,
-0.06447415798902512,
-0.016634467989206314,
-0.0826423168182373,
0.06998828053474426,
-0.35067564249038696,
-0.08866818249225616,
0.2206498235464096,
-0.04439529776573181,
0.3014109432697296,
0.04032641276717186,
0.2132859081029892,
-0.2649589478969574,
0.04308329522609711,
0.3107645809650421,
0.25736504793167114,
-0.43990135192871094,
0.24280419945716858,
-0.06717931479215622,
-0.5475304126739502,
-0.11532041430473328,
-0.24850937724113464,
-0.02479046955704689,
-0.22468572854995728,
0.3558325171470642,
0.24066795408725739,
0.22854873538017273,
-0.045480936765670776,
0.1371563971042633,
-0.10262225568294525,
0.026328276842832565,
0.22033879160881042,
-0.29454657435417175,
-0.433445543050766,
-0.13803254067897797,
-0.6371958255767822,
0.19216591119766235,
-0.18933019042015076,
-0.06965728104114532,
0.28951746225357056,
0.23470346629619598,
0.3060065805912018,
0.11824919283390045,
-0.0609564483165741,
-0.08457041531801224,
0.07534782588481903,
0.16477951407432556,
-0.34901201725006104,
-0.2042723149061203,
-0.1250738501548767,
-0.12430077791213989,
0.07088734209537506,
-0.4839779734611511,
0.23384730517864227,
-0.0717025026679039,
0.16859236359596252,
-0.14608639478683472,
0.13179326057434082,
-0.2275606393814087,
0.21217882633209229,
0.3245882987976074,
0.1759949028491974,
-0.003348611295223236,
-0.13594664633274078,
-0.2193920761346817,
-0.09771998226642609,
-0.11965771019458771,
-0.0345047265291214,
0.230108380317688,
0.030494803562760353,
0.4337433874607086,
0.06747154146432877,
-0.10600888729095459,
0.053588006645441055,
0.1789320409297943,
0.1752692312002182,
-0.08055270463228226,
-0.37168678641319275,
0.1133241280913353,
0.03057102859020233,
0.11205630749464035,
-0.09353572875261307,
0.11338409781455994,
-0.18898549675941467,
-0.04606219381093979,
0.12001964449882507,
-0.37099945545196533,
0.47196394205093384,
-0.29696235060691833,
-0.38658657670021057,
-0.24976810812950134,
0.17584843933582306,
0.03929233178496361,
-0.31090471148490906,
-0.3224774897098541,
-0.09580138325691223,
0.2636052370071411,
-0.3208760619163513,
-0.11931058764457703,
0.2354041337966919,
-0.32607612013816833,
0.14009800553321838,
0.1201833188533783,
0.08961513638496399,
-0.03564201295375824,
0.03687732666730881,
0.23780468106269836,
-0.25691092014312744
] |
https://github.com/huggingface/datasets/issues/4857 | No preprocessed wikipedia is working on huggingface/datasets | Thanks for reporting @aninrusimha.
Please, note that the preprocessed datasets are still available, as described in the dataset card, e.g.: https://huggingface.co/datasets/wikipedia
```python
ds = load_dataset("wikipedia", "20220301.en")
``` | ## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
| 27 | No preprocessed wikipedia is working on huggingface/datasets
## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
Thanks for reporting @aninrusimha.
Please, note that the preprocessed datasets are still available, as described in the dataset card, e.g.: https://huggingface.co/datasets/wikipedia
```python
ds = load_dataset("wikipedia", "20220301.en")
``` | [
0.016649190336465836,
-0.29818832874298096,
0.023333508521318436,
0.005202166736125946,
0.1565481722354889,
0.1782524287700653,
0.22608761489391327,
0.3795302212238312,
0.11009877920150757,
0.008971981704235077,
-0.1580875962972641,
0.25768595933914185,
0.07001125812530518,
0.06866201758384705,
0.1289260983467102,
-0.18748167157173157,
0.26901957392692566,
0.04306778311729431,
-0.3298555016517639,
0.09757597744464874,
-0.2661128640174866,
0.4626607894897461,
-0.40742939710617065,
-0.09308773279190063,
-0.3274777829647064,
0.3562246561050415,
-0.11626339703798294,
0.01129179447889328,
-0.2007552683353424,
-0.32010775804519653,
0.5156974792480469,
-0.028594251722097397,
0.24540016055107117,
0.3390163779258728,
-0.00011534069199115038,
0.02653852105140686,
0.7574597001075745,
-0.03772061690688133,
-0.3841533064842224,
-0.23615987598896027,
-0.12127390503883362,
-0.30372366309165955,
0.12146832048892975,
-0.20749187469482422,
-0.15736427903175354,
-0.3375653028488159,
0.12432676553726196,
-0.2586873471736908,
0.31295686960220337,
0.009724232368171215,
0.2160719335079193,
0.10054697096347809,
0.48795968294143677,
-0.3111501932144165,
0.19619867205619812,
0.3553074598312378,
-0.20167195796966553,
0.16101130843162537,
-0.18190649151802063,
-0.29519209265708923,
0.17778432369232178,
0.3237621486186981,
-0.09071510285139084,
-0.21543718874454498,
0.38284873962402344,
0.02176447957754135,
-0.17182618379592896,
-0.43533021211624146,
0.3940902352333069,
0.3285059630870819,
0.44975030422210693,
-0.28154680132865906,
-0.13534189760684967,
-0.06073958799242973,
-0.1010458841919899,
-0.1159331277012825,
0.2632473409175873,
0.1131896823644638,
-0.14028920233249664,
0.09455369412899017,
0.09294769167900085,
-0.2571561932563782,
-0.07748416066169739,
0.21746520698070526,
0.05607344210147858,
0.5896091461181641,
-0.18244138360023499,
0.03476044908165932,
0.10487966239452362,
-0.08374030888080597,
-0.2186172753572464,
-0.039384543895721436,
0.03555179387331009,
0.33444082736968994,
0.055250152945518494,
-0.0743163451552391,
-0.07391408830881119,
0.3598159849643707,
0.24046078324317932,
-0.014067724347114563,
-0.464102178812027,
0.13877469301223755,
0.13601568341255188,
-0.13312119245529175,
0.4022216498851776,
-0.2735043168067932,
0.06576580554246902,
0.01078695897012949,
0.49415498971939087,
0.5135367512702942,
-0.003365997225046158,
-0.023126788437366486,
0.19255471229553223,
-0.17073315382003784,
-0.001254253089427948,
-0.09607548266649246,
0.43596506118774414,
-0.33627551794052124,
0.2966214716434479,
0.09102930128574371,
-0.07860922813415527,
-0.16854502260684967,
-0.43035832047462463,
0.34172356128692627,
-0.11586151272058487,
0.17842963337898254,
0.11891390383243561,
0.10034795105457306,
-0.19340375065803528,
-0.20972520112991333,
-0.0558888278901577,
-0.027941744774580002,
-0.09049549698829651,
0.24546173214912415,
0.23824794590473175,
-0.4446922838687897,
0.40217533707618713,
0.08395861089229584,
-0.08129401504993439,
-0.23925231397151947,
-0.24044187366962433,
-0.005301520694047213,
0.03381355106830597,
0.18060338497161865,
0.15673573315143585,
0.18938462436199188,
0.07508009672164917,
-0.09254036843776703,
-0.16866794228553772,
-0.052313581109046936,
-0.2577835023403168,
-0.12977229058742523,
-0.46625539660453796,
0.11088713258504868,
0.020921219140291214,
0.1634933054447174,
-0.17917296290397644,
0.3028373420238495,
0.016965419054031372,
-0.18251430988311768,
0.013421215116977692,
0.19578522443771362,
-0.28672516345977783,
-0.0601559616625309,
0.6989014744758606,
0.4142017960548401,
0.0401667021214962,
-0.15550704300403595,
-0.21636857092380524,
0.06880398094654083,
0.11499472707509995,
0.011197339743375778,
-0.15319953858852386,
0.23727348446846008,
-0.25523361563682556,
-0.08150162547826767,
-0.015229560434818268,
0.06722307205200195,
-0.08824177831411362,
-0.04683056101202965,
0.24902118742465973,
0.20928670465946198,
-0.33898043632507324,
-0.06811679154634476,
0.09809181094169617,
0.1005127802491188,
0.17865127325057983,
0.10121451318264008,
0.17494331300258636,
-0.11820828914642334,
-0.3500557541847229,
-0.25809210538864136,
-0.0010339133441448212,
-0.2807893455028534,
0.21878622472286224,
0.06576921790838242,
-0.10620956867933273,
0.30729734897613525,
0.14155295491218567,
0.002225920557975769,
0.1000446304678917,
0.49508363008499146,
0.16880103945732117,
0.2938147187232971,
0.284430593252182,
-0.38604310154914856,
-0.5679603219032288,
0.051546476781368256,
-0.006816515699028969,
0.3225487172603607,
-0.014585264027118683,
-0.3114994764328003,
-0.3693835735321045,
0.15313133597373962,
0.009797617793083191,
-0.34364819526672363,
0.15693239867687225,
-0.1059873104095459,
0.4197542369365692,
0.5698978900909424,
-0.12831716239452362,
-0.21515965461730957,
-0.022127069532871246,
0.1102570965886116,
-0.4692602753639221,
0.36265552043914795,
-0.20691555738449097,
-0.13639332354068756,
-0.05311661213636398,
0.20043200254440308,
0.09429150819778442,
0.009971167892217636,
0.10269077122211456,
0.16245631873607635,
0.09537750482559204,
0.20296624302864075,
-0.030202895402908325,
-0.1842445582151413,
0.12361375987529755,
-0.6302605867385864,
-0.17162714898586273,
0.29066184163093567,
0.04841408506035805,
-0.048378538340330124,
-0.1644744575023651,
0.1218680888414383,
-0.061451178044080734,
0.057846661657094955,
-0.11829985678195953,
0.14250104129314423,
0.1649945229291916,
0.07890944182872772,
-0.21060994267463684,
-0.3162768483161926,
0.09476019442081451,
-0.02439834550023079,
-0.02229481004178524,
0.047383662313222885,
-0.17884685099124908,
-0.4242299795150757,
0.13201923668384552,
0.010944530367851257,
0.010325908660888672,
0.19290655851364136,
-0.37068822979927063,
-0.17891043424606323,
0.23783782124519348,
-0.33539706468582153,
0.13283473253250122,
0.047372009605169296,
0.12660129368305206,
0.10808689892292023,
0.04789862409234047,
-0.034494008868932724,
0.3081744611263275,
0.05917811766266823,
0.19243541359901428,
-0.021529659628868103,
0.12679140269756317,
0.20032083988189697,
-0.15915876626968384,
0.4007045328617096,
-0.4175581932067871,
0.14846862852573395,
-0.32374852895736694,
-0.08446671813726425,
-0.21269701421260834,
-0.29140451550483704,
-0.10265878587961197,
-0.0566861666738987,
-0.28424301743507385,
-0.3872435688972473,
-0.17035579681396484,
0.15590372681617737,
-0.014713658019900322,
0.20045866072177887,
-0.10589945316314697,
0.045695990324020386,
0.01299835555255413,
0.053904443979263306,
-0.47117453813552856,
-0.1973152905702591,
-0.0490211620926857,
0.007515713572502136,
0.2037864625453949,
0.02073493041098118,
0.08054912835359573,
-0.09324343502521515,
-0.35082149505615234,
-0.5601412653923035,
-0.617858350276947,
0.20127619802951813,
-0.19612185657024384,
0.2551562190055847,
0.25336068868637085,
0.3185284733772278,
-0.09278390556573868,
-0.32023879885673523,
0.24120599031448364,
-0.248456209897995,
-0.037941157817840576,
-0.03682725131511688,
-0.07439585030078888,
0.15804575383663177,
-0.15097029507160187,
-0.06281784921884537,
-0.005642855539917946,
-0.0056847985833883286,
0.3053763508796692,
-0.0243099182844162,
-0.16225112974643707,
0.14437802135944366,
0.05893794074654579,
-0.1220254972577095,
-0.13572393357753754,
-0.03951464593410492,
-0.11423088610172272,
-0.24325384199619293,
0.40680646896362305,
-0.27078309655189514,
-0.49315735697746277,
0.17597632110118866,
0.04003836214542389,
0.16150401532649994,
-0.0883062332868576,
-0.36376529932022095,
0.12876391410827637,
-0.010523142293095589,
0.21604064106941223,
0.1641659140586853,
0.07606236636638641,
0.13514865934848785,
0.1253681778907776,
0.04649767279624939,
0.12149970978498459,
-0.1066683977842331,
-0.21165084838867188,
-0.45479345321655273,
0.1338682919740677,
0.3744921386241913,
0.27164193987846375,
-0.00175485759973526,
0.75599604845047,
0.3914698362350464,
0.085673987865448,
0.4508904814720154,
-0.049548327922821045,
0.4750373959541321,
-0.3435705006122589,
-0.472967267036438,
-0.11039937287569046,
-0.06592723727226257,
0.18917757272720337,
0.20762191712856293,
0.10364934802055359,
-0.3070777356624603,
-0.3861333429813385,
-0.057783663272857666,
-0.18905290961265564,
-0.2906670570373535,
-0.23946250975131989,
0.13813257217407227,
0.28585100173950195,
0.006764154881238937,
0.22216743230819702,
0.020091138780117035,
-0.39695239067077637,
0.2876805067062378,
0.1601409763097763,
0.1619229018688202,
-0.005125971976667643,
-0.02606143057346344,
-0.00792419072240591,
-0.6842341423034668,
0.17200705409049988,
-0.10450180619955063,
0.1258891224861145,
0.03269089385867119,
0.0068150535225868225,
0.07498428225517273,
0.05068408325314522,
0.08672969043254852,
0.004140403121709824,
0.04473353922367096,
0.03231676295399666,
-0.09286388754844666,
-0.3123212456703186,
0.170394167304039,
0.11094461381435394,
0.23790886998176575,
0.3780111074447632,
0.6292974352836609,
-0.363768070936203,
-0.08272998780012131,
0.6916569471359253,
0.06207698583602905,
-0.10783079266548157,
-0.09664292633533478,
-0.29270288348197937,
-0.3348095417022705,
-0.14590036869049072,
-0.19694843888282776,
0.06768511980772018,
0.2358068972826004,
-0.12095700949430466,
0.09644566476345062,
-0.14346563816070557,
0.022862758487462997,
0.13150103390216827,
0.11084844172000885,
0.1980048418045044,
0.1069856584072113,
0.2601589560508728,
0.2718402147293091,
0.016062572598457336,
0.08880677074193954,
0.2300853431224823,
-0.11003491282463074,
-0.5577498078346252,
-0.20557379722595215,
0.07576871663331985,
0.21861785650253296,
0.05965442210435867,
-0.17170651257038116,
-0.027986489236354828,
0.13984158635139465,
0.02797185629606247,
-0.44232848286628723,
-0.1559014618396759,
0.33313578367233276,
0.12934640049934387,
-0.4985637962818146,
-0.17740356922149658,
0.4688819944858551,
0.16933035850524902,
0.20557834208011627,
0.357725590467453,
0.42983031272888184,
-0.32421791553497314,
0.013384334743022919,
0.13248251378536224,
0.8187673091888428,
-0.08230291306972504,
0.16294080018997192,
0.017537076026201248,
0.262628972530365,
0.6619390845298767,
0.2201390117406845,
-0.03955048695206642,
-0.24133065342903137,
-0.03896106407046318,
0.043720342218875885,
0.22445666790008545,
0.19402813911437988,
-0.2957853674888611,
-0.32434988021850586,
0.25523465871810913,
-0.09473136067390442,
0.3012312650680542,
-0.024561719968914986,
0.3315684497356415,
0.12447202205657959,
-0.18339700996875763,
-0.2273426055908203,
0.12482231855392456,
-0.14795836806297302,
0.4349239766597748,
-0.16102775931358337,
0.010247459635138512,
0.09622368216514587,
-0.11155405640602112,
-0.49733132123947144,
0.0472448468208313,
-0.013025329448282719,
0.19346582889556885,
0.12221185863018036,
-0.26544442772865295,
0.2120872139930725,
0.4697960615158081,
0.26273292303085327,
0.4283492863178253,
-0.4834861159324646,
0.008871262893080711,
-0.4841129183769226,
-0.37306785583496094,
-0.2116270214319229,
0.20705097913742065,
0.018966566771268845,
0.019118908792734146,
-0.23741228878498077,
0.15034155547618866,
0.018895789980888367,
-0.06526526063680649,
-0.195001482963562,
-0.03594420850276947,
-0.2341529279947281,
-0.15820011496543884,
-0.28616252541542053,
-0.040601812303066254,
0.2019273042678833,
-0.26331156492233276,
0.18279823660850525,
-0.03989698737859726,
-0.0005894636269658804,
-0.15722045302391052,
0.30982181429862976,
-0.1661197692155838,
-0.05988358333706856,
0.46425509452819824,
-0.17323720455169678,
-0.07484698295593262,
0.6054420471191406,
0.3422967493534088,
-0.28889644145965576,
-0.05422006919980049,
-0.015035092830657959,
-0.29742884635925293,
-0.22431135177612305,
0.03436471149325371,
0.07787057757377625,
0.39136815071105957,
-0.20051608979701996,
0.15689197182655334,
0.03685540705919266,
-0.29842936992645264,
0.1547888070344925,
-0.125405952334404,
-0.2000921666622162,
0.32240602374076843,
-0.09404817223548889,
0.10599330812692642,
0.25545036792755127,
-0.05482643470168114,
0.19224651157855988,
0.1650099754333496,
-0.26888057589530945,
0.11728788912296295,
0.016958845779299736,
0.003250693902373314,
0.18517953157424927,
-0.06505169719457626,
-0.20527666807174683,
-0.22592076659202576,
0.14188973605632782,
0.11668102443218231,
0.18744422495365143,
-0.18163537979125977,
-0.12702976167201996,
0.10459611564874649,
-0.07072209566831589,
-0.2187395840883255,
-0.026727374643087387,
-0.19304467737674713,
-0.12493395805358887,
-0.3763541579246521,
-0.028685199096798897,
0.31242597103118896,
0.05582909286022186,
0.21648679673671722,
0.39694175124168396,
0.22168919444084167,
-0.14144718647003174,
0.23530183732509613,
0.13613645732402802,
0.40648573637008667,
-0.07744774967432022,
0.08292010426521301,
0.21088537573814392,
0.06438496708869934,
-0.1011025607585907,
0.1641862988471985,
0.047276973724365234,
-0.02111104503273964,
0.44269800186157227,
-0.13667243719100952,
-0.19523437321186066,
0.2969265282154083,
0.2968035638332367,
0.22128452360630035,
-0.06730955839157104,
0.20060329139232635,
0.30713263154029846,
0.11339960247278214,
-0.2729688286781311,
0.23635898530483246,
0.39026516675949097,
0.21846024692058563,
-0.14668402075767517,
0.03046266734600067,
0.09341958165168762,
-0.02551978826522827,
0.047171700745821,
0.18423429131507874,
0.12329912930727005,
-0.1748962700366974,
0.36271417140960693,
-0.11622177064418793,
0.44342687726020813,
0.11429669708013535,
-0.17845681309700012,
0.1729760468006134,
0.11214137077331543,
-0.0031021051108837128,
0.12586304545402527,
0.09244399517774582,
-0.08717528730630875,
0.14249089360237122,
0.08571723848581314,
-0.24571265280246735,
0.15460674464702606,
0.21200889348983765,
-0.194471538066864,
0.23811256885528564,
-0.1070331335067749,
0.4109498858451843,
-0.05015546455979347,
-0.07744347304105759,
-0.22046367824077606,
0.4015553891658783,
-0.21818062663078308,
-0.3620583117008209,
-0.046898066997528076,
-0.14720025658607483,
0.1472066193819046,
0.08454421162605286,
0.15105126798152924,
-0.3095055818557739,
0.25762611627578735,
0.11277657002210617,
-0.3231595754623413,
-0.3628084063529968,
0.3495105803012848,
0.06866190582513809,
0.4271731674671173,
-0.015997719019651413,
0.011943625286221504,
-0.09972831606864929,
-0.11836856603622437,
-0.13638389110565186,
0.4618924558162689,
0.41453203558921814,
0.25410181283950806,
-0.23903217911720276,
0.08320996910333633,
-0.08357399702072144,
-0.032559506595134735,
0.02435040846467018,
0.2894572913646698,
0.17771588265895844,
0.025946516543626785,
0.1921510398387909,
0.12685346603393555,
-0.10608287155628204,
-0.5359523892402649,
0.3083871603012085,
0.502238392829895,
-0.21204230189323425,
-0.15585163235664368,
-0.41385284066200256,
-0.0665084719657898,
0.0574231818318367,
-0.01947912573814392,
-0.27251696586608887,
0.17591381072998047,
0.31362178921699524,
0.24467305839061737,
0.0007911287248134613,
-0.23102383315563202,
0.07409349828958511,
0.04874112084507942,
0.26313161849975586,
0.5171588659286499,
0.022416621446609497,
-0.17306946218013763,
-0.501397430896759,
-0.4181981086730957,
0.004372157156467438,
-0.16545967757701874,
0.037869349122047424,
0.14251840114593506,
0.06119956821203232,
-0.14912131428718567,
0.056679047644138336,
-0.13870592415332794,
-0.44738802313804626,
0.16284862160682678,
0.20740874111652374,
-0.22474975883960724,
-0.06836560368537903,
-0.2862401008605957,
-0.16194449365139008,
-0.04097220301628113,
-0.15367671847343445,
0.18185846507549286,
-0.05910775065422058,
-0.09962154924869537,
-0.1969093233346939,
0.21831434965133667,
-0.04492694139480591,
0.22305722534656525,
0.09050500392913818,
0.05717623978853226,
0.11407454311847687,
-0.11855046451091766,
-0.1595686376094818,
-0.34024885296821594,
-0.08971162140369415,
0.12222647666931152,
0.5307744145393372,
-0.07370398938655853,
0.013923484832048416,
-0.22415271401405334,
-0.4938994348049164,
-0.22058041393756866,
0.5398825407028198,
0.09623917937278748,
0.09306145459413528,
-0.4315398633480072,
-0.11409968137741089,
-0.02519862726330757,
-0.10577470064163208,
0.17327550053596497,
0.30696627497673035,
-0.2778628468513489,
0.17467880249023438,
-0.20538073778152466,
-0.3677241802215576,
0.314209520816803,
-0.47318387031555176,
-0.19759759306907654,
-0.3270644545555115,
0.055112503468990326,
0.02715231478214264,
-0.12985241413116455,
-0.5591039657592773,
-0.014892660081386566,
0.3234235644340515,
0.04823319613933563,
0.015745311975479126,
0.13536912202835083,
-0.1687992811203003,
-0.028702206909656525,
-0.2595338821411133,
0.3329080045223236,
0.1266869753599167,
-0.05892046540975571,
0.015903688967227936,
-0.28808265924453735
] |
https://github.com/huggingface/datasets/issues/4857 | No preprocessed wikipedia is working on huggingface/datasets | This is working now, but I was getting an error a few days ago when running an existing script. Unfortunately I did not do a proper bug report, but for some reason I was unable to load the dataset due to a request being made to the wikimedia website. However, its working now. Thanks for the reply! | ## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
| 57 | No preprocessed wikipedia is working on huggingface/datasets
## Describe the bug
20220301 wikipedia dump has been deprecated, so now there is no working wikipedia dump on huggingface
https://huggingface.co/datasets/wikipedia
https://dumps.wikimedia.org/enwiki/
This is working now, but I was getting an error a few days ago when running an existing script. Unfortunately I did not do a proper bug report, but for some reason I was unable to load the dataset due to a request being made to the wikimedia website. However, its working now. Thanks for the reply! | [
-0.056750476360321045,
-0.25431889295578003,
0.014886856079101562,
-0.01529131829738617,
0.11912667751312256,
0.15966364741325378,
0.27118024230003357,
0.3747330605983734,
0.21714477241039276,
-0.006378106772899628,
-0.047890499234199524,
0.2112503945827484,
0.11526419967412949,
0.08615552634000778,
0.10442163050174713,
-0.15778103470802307,
0.2484128177165985,
0.014726176857948303,
-0.35469067096710205,
0.08716723322868347,
-0.32522231340408325,
0.4668947458267212,
-0.44834768772125244,
-0.1224411129951477,
-0.3173741102218628,
0.28926509618759155,
-0.1183493509888649,
0.06016573682427406,
-0.16127559542655945,
-0.3189137279987335,
0.43241575360298157,
0.022220131009817123,
0.19756178557872772,
0.38956260681152344,
-0.00011220803571632132,
-0.05667615681886673,
0.8028172850608826,
-0.04034808650612831,
-0.342631459236145,
-0.1791321188211441,
-0.09752583503723145,
-0.23473620414733887,
0.05178800970315933,
-0.2236933410167694,
-0.14866067469120026,
-0.2990543842315674,
0.21084025502204895,
-0.21725435554981232,
0.2534139156341553,
-0.07601319253444672,
0.24106383323669434,
0.07847877591848373,
0.3706027865409851,
-0.31133371591567993,
0.17559503018856049,
0.39297980070114136,
-0.21132038533687592,
0.08620059490203857,
-0.15273426473140717,
-0.3505180776119232,
0.0737217515707016,
0.3250494599342346,
-0.1661592572927475,
-0.2221386432647705,
0.4265236258506775,
0.047328755259513855,
-0.3082207441329956,
-0.44723573327064514,
0.4263852834701538,
0.33591094613075256,
0.5006714463233948,
-0.27478140592575073,
-0.14985404908657074,
-0.04641801863908768,
-0.044408489018678665,
-0.038324903696775436,
0.27870145440101624,
0.0943954810500145,
-0.0821988433599472,
0.08552780747413635,
0.019789790734648705,
-0.16776886582374573,
-0.10060807317495346,
0.15087775886058807,
0.0796395093202591,
0.5158644914627075,
-0.15496137738227844,
0.04953749477863312,
0.02275393344461918,
-0.18608184158802032,
-0.20883521437644958,
-0.1039326936006546,
-0.05674941465258598,
0.2956730127334595,
0.04302658140659332,
-0.057604290544986725,
-0.022975653409957886,
0.49296629428863525,
0.24312534928321838,
-0.029729202389717102,
-0.4679034650325775,
0.1689082384109497,
0.14472724497318268,
-0.11238595098257065,
0.40107083320617676,
-0.26414281129837036,
0.14149773120880127,
-0.013893784023821354,
0.4801545739173889,
0.5212058424949646,
-0.04766921326518059,
-0.07041879743337631,
0.16481351852416992,
-0.18006150424480438,
0.002161473035812378,
-0.12089253216981888,
0.43243104219436646,
-0.36995288729667664,
0.2796398401260376,
0.06070886179804802,
0.06263317167758942,
-0.2895874083042145,
-0.3948259949684143,
0.39898595213890076,
-0.10167510062456131,
0.2208782434463501,
0.05833977460861206,
0.10533911734819412,
-0.23425284028053284,
-0.15876466035842896,
-0.05832802504301071,
0.03514660894870758,
-0.10222561657428741,
0.3100064694881439,
0.2692444920539856,
-0.33534762263298035,
0.35457080602645874,
0.005417970009148121,
-0.02452865242958069,
-0.14892873167991638,
-0.2227141559123993,
0.00973525270819664,
0.1576090157032013,
0.18306007981300354,
0.2304467260837555,
0.21163691580295563,
0.009899619966745377,
-0.14171932637691498,
-0.15073320269584656,
-0.03904452174901962,
-0.24283188581466675,
-0.058039095252752304,
-0.3424868881702423,
0.1208113431930542,
-0.05073025822639465,
0.16085585951805115,
-0.1351168155670166,
0.33438462018966675,
0.07607260346412659,
-0.2600414752960205,
0.018411442637443542,
0.18575122952461243,
-0.3092435598373413,
-0.12680980563163757,
0.6704645752906799,
0.4907856583595276,
-0.03793551027774811,
-0.07967154681682587,
-0.16752175986766815,
0.06523393094539642,
0.14239975810050964,
0.024522898718714714,
-0.10725421458482742,
0.1631573885679245,
-0.22249577939510345,
0.03717191517353058,
-0.09303876012563705,
0.020643014460802078,
-0.04870562255382538,
-0.013493533246219158,
0.2466021329164505,
0.22972668707370758,
-0.3029369115829468,
-0.09876398742198944,
0.16498808562755585,
0.002082160674035549,
0.14646504819393158,
0.06631259620189667,
0.1398707628250122,
-0.11172462999820709,
-0.3431164622306824,
-0.23295287787914276,
-0.019388459622859955,
-0.2737274169921875,
0.19803690910339355,
-0.01830141246318817,
-0.08762931078672409,
0.247895285487175,
0.12964877486228943,
-0.04223101958632469,
0.1323152333498001,
0.47249048948287964,
0.1859341710805893,
0.23372340202331543,
0.24389922618865967,
-0.38079527020454407,
-0.593320369720459,
0.07969699054956436,
0.03103915974497795,
0.26381605863571167,
0.06851226091384888,
-0.24638152122497559,
-0.30181145668029785,
0.14200912415981293,
-0.010679077357053757,
-0.33006027340888977,
0.19423514604568481,
-0.10172705352306366,
0.35281822085380554,
0.49702179431915283,
-0.1877518892288208,
-0.297482967376709,
0.04148416966199875,
0.03915918990969658,
-0.5057879090309143,
0.4118422865867615,
-0.2182229608297348,
-0.20481523871421814,
0.020923271775245667,
0.20148888230323792,
0.12955884635448456,
0.052245981991291046,
0.16800746321678162,
0.09555140137672424,
0.00536971865221858,
0.3011910915374756,
0.04634346067905426,
-0.14801712334156036,
0.07707254588603973,
-0.5556297898292542,
-0.1337137669324875,
0.2043493092060089,
0.045966342091560364,
-0.09038259088993073,
-0.22711366415023804,
0.17092543840408325,
-0.07490989565849304,
0.119183748960495,
-0.14249050617218018,
0.05686105042695999,
0.11959254741668701,
0.010493699461221695,
-0.19457212090492249,
-0.3397291600704193,
0.05983953922986984,
-0.0673905462026596,
-0.08962073922157288,
0.007684411481022835,
-0.1294364333152771,
-0.2516585886478424,
0.23862987756729126,
0.022478390485048294,
0.025052104145288467,
0.2030729353427887,
-0.35468217730522156,
-0.15947631001472473,
0.29911401867866516,
-0.282470166683197,
0.15013864636421204,
0.07958793640136719,
0.08504879474639893,
0.08767897635698318,
0.06260737031698227,
-0.050150226801633835,
0.28499510884284973,
-0.013873420655727386,
0.17725636065006256,
0.015760313719511032,
0.06382656842470169,
0.2273087501525879,
-0.138858824968338,
0.383638471364975,
-0.41915586590766907,
0.09049252420663834,
-0.3568534255027771,
-0.07384695112705231,
-0.2369040548801422,
-0.2693807780742645,
-0.049265630543231964,
0.01911337673664093,
-0.2763122022151947,
-0.4211212992668152,
-0.12068885564804077,
0.20447389781475067,
-0.04795317351818085,
0.14585982263088226,
-0.14585205912590027,
0.05892668664455414,
-0.015866968780755997,
0.02169823832809925,
-0.5255704522132874,
-0.2422010898590088,
0.02571718394756317,
0.04268747195601463,
0.27169501781463623,
0.10365106910467148,
0.10701292753219604,
-0.07011963427066803,
-0.2846633791923523,
-0.5764155387878418,
-0.593172550201416,
0.21938365697860718,
-0.22186504304409027,
0.21756647527217865,
0.2399352639913559,
0.3700403571128845,
-0.0924273207783699,
-0.363689661026001,
0.26682353019714355,
-0.27786025404930115,
0.0071876682341098785,
-0.03960024192929268,
-0.05535563826560974,
0.02314293198287487,
-0.1941978484392166,
-0.007040657103061676,
0.12975026667118073,
-0.08616305887699127,
0.3061206638813019,
0.030838090926408768,
-0.15200373530387878,
0.09501619637012482,
0.08993804454803467,
-0.14483186602592468,
-0.1546618640422821,
-0.09935013204813004,
-0.13677111268043518,
-0.2744978666305542,
0.4337458908557892,
-0.30933377146720886,
-0.4790906608104706,
0.217808336019516,
0.05294825881719589,
0.21719840168952942,
-0.13169577717781067,
-0.3210189938545227,
0.1349591165781021,
0.019624389708042145,
0.2554130256175995,
0.23279140889644623,
0.0904289186000824,
0.13932064175605774,
0.19555610418319702,
0.015812469646334648,
0.063295878469944,
-0.1349756270647049,
-0.2178405225276947,
-0.46818915009498596,
0.09236927330493927,
0.4073164761066437,
0.29248082637786865,
-0.10946816205978394,
0.7512854337692261,
0.36574414372444153,
0.053100600838661194,
0.42475879192352295,
-0.016972104087471962,
0.5682305693626404,
-0.2947141230106354,
-0.46154019236564636,
-0.035391226410865784,
-0.08207863569259644,
0.15471895039081573,
0.30864667892456055,
0.04497777670621872,
-0.3632112741470337,
-0.363050639629364,
-0.11571735143661499,
-0.1954040825366974,
-0.3073144555091858,
-0.1901940107345581,
0.22027717530727386,
0.1528339833021164,
0.029844030737876892,
0.287827730178833,
0.010923231020569801,
-0.4138928949832916,
0.2941892743110657,
0.17785152792930603,
0.2767714262008667,
-0.04169172793626785,
-0.12517884373664856,
-0.00584357138723135,
-0.710122287273407,
0.23428753018379211,
-0.1547522395849228,
0.09616006910800934,
-0.048346612602472305,
-0.053185731172561646,
0.013567283749580383,
-0.06308379769325256,
0.03207360953092575,
-0.10577326267957687,
0.011635500937700272,
0.07090410590171814,
-0.025845970958471298,
-0.26760435104370117,
0.18287557363510132,
0.10412639379501343,
0.2812252640724182,
0.31979748606681824,
0.5351616144180298,
-0.3783179819583893,
-0.07214880734682083,
0.6434954404830933,
0.0546082966029644,
-0.12406936287879944,
-0.21390758454799652,
-0.29646381735801697,
-0.2986440062522888,
-0.16838958859443665,
-0.30430835485458374,
0.03164234757423401,
0.12652719020843506,
-0.18771333992481232,
0.07009449601173401,
-0.1045931875705719,
0.030666783452033997,
0.16862231492996216,
0.16288533806800842,
0.15045109391212463,
0.0529654361307621,
0.2985701262950897,
0.28006988763809204,
0.059680014848709106,
0.1589856594800949,
0.21487487852573395,
-0.06904301047325134,
-0.43750596046447754,
-0.16111889481544495,
0.019517958164215088,
0.26854678988456726,
0.15064017474651337,
-0.1570676565170288,
-0.08619622141122818,
0.20338322222232819,
0.019861463457345963,
-0.4157513380050659,
-0.2776656150817871,
0.3415020704269409,
0.15995046496391296,
-0.48601624369621277,
-0.07418198883533478,
0.38234466314315796,
0.16265495121479034,
0.19977034628391266,
0.3678826093673706,
0.4511300325393677,
-0.331191748380661,
0.02786393091082573,
0.16859380900859833,
0.8868820071220398,
-0.12231577932834625,
0.17348453402519226,
0.051293760538101196,
0.27345675230026245,
0.575100839138031,
0.23657946288585663,
-0.029446762055158615,
-0.407975971698761,
-0.05345121771097183,
0.05707734078168869,
0.24041345715522766,
0.18834568560123444,
-0.22906635701656342,
-0.36295846104621887,
0.3102533519268036,
-0.04572487995028496,
0.30030515789985657,
-0.0688987523317337,
0.3497556447982788,
0.10177338123321533,
-0.235732764005661,
-0.21737295389175415,
0.13660261034965515,
-0.06757436692714691,
0.36985793709754944,
-0.1816394031047821,
-0.02283373847603798,
0.10235877335071564,
-0.10856130719184875,
-0.47963476181030273,
0.16723185777664185,
0.07615320384502411,
0.06073664501309395,
0.11612118780612946,
-0.21988488733768463,
0.2258244901895523,
0.43783387541770935,
0.22559039294719696,
0.4440339207649231,
-0.4793533682823181,
0.0491296760737896,
-0.4571906328201294,
-0.37231144309043884,
-0.1951739341020584,
0.17992828786373138,
0.019678322598338127,
-0.0335797518491745,
-0.2993153929710388,
0.0747537612915039,
0.022893089801073074,
0.038690872490406036,
-0.24631869792938232,
0.013318948447704315,
-0.22406764328479767,
-0.2651257812976837,
-0.35246697068214417,
0.00575382262468338,
0.11928753554821014,
-0.20105291903018951,
0.20131227374076843,
-0.08155672252178192,
0.08386484533548355,
-0.1007574275135994,
0.33518630266189575,
-0.08931843936443329,
-0.0663292407989502,
0.44164472818374634,
-0.24078649282455444,
-0.09635645151138306,
0.6109594106674194,
0.37319645285606384,
-0.35751986503601074,
-0.07820941507816315,
-0.0816059410572052,
-0.21673060953617096,
-0.2573728561401367,
-0.048336561769247055,
0.11589960753917694,
0.32456642389297485,
-0.13596411049365997,
0.1014380007982254,
-0.025206685066223145,
-0.2909608781337738,
0.1465436816215515,
-0.13165417313575745,
-0.11753962934017181,
0.3791314363479614,
-0.09939445555210114,
0.09988879412412643,
0.2078239619731903,
-0.11685575544834137,
0.2174718827009201,
0.15618722140789032,
-0.30867257714271545,
-0.00033389776945114136,
0.09083466231822968,
-0.04223246872425079,
0.1891331672668457,
-0.117249496281147,
-0.18034771084785461,
-0.1937832534313202,
0.151015505194664,
0.12692983448505402,
0.16947080194950104,
-0.1939695179462433,
-0.02238016575574875,
0.1002473384141922,
-0.06129046529531479,
-0.17520441114902496,
-0.014447405003011227,
-0.13154542446136475,
-0.12779010832309723,
-0.4462011754512787,
-0.07048134505748749,
0.34308016300201416,
0.00898989662528038,
0.1523568481206894,
0.44544875621795654,
0.20850077271461487,
-0.19546160101890564,
0.28008604049682617,
0.14600521326065063,
0.47850900888442993,
-0.18562637269496918,
0.011634740978479385,
0.18566863238811493,
0.05962324142456055,
-0.03711950406432152,
0.1863325536251068,
0.04261504113674164,
0.08661547303199768,
0.48178574442863464,
-0.11102138459682465,
-0.19703596830368042,
0.31392812728881836,
0.2911536991596222,
0.22089840471744537,
-0.03999078646302223,
0.1382293403148651,
0.27617108821868896,
0.1379518210887909,
-0.21614620089530945,
0.26480352878570557,
0.4595288038253784,
0.20072199404239655,
-0.14691442251205444,
0.08490696549415588,
0.03153426572680473,
-0.04837818816304207,
0.08456061780452728,
0.18648415803909302,
0.19732435047626495,
-0.20579876005649567,
0.3028464615345001,
-0.19242626428604126,
0.37457144260406494,
0.08950435370206833,
-0.20646768808364868,
0.15126395225524902,
0.07918082177639008,
-0.03564479947090149,
0.12978661060333252,
0.08145163953304291,
-0.052339643239974976,
0.14106756448745728,
0.0837537869811058,
-0.2778996527194977,
0.1853821873664856,
0.17005415260791779,
-0.10314583778381348,
0.2156812846660614,
-0.06059129536151886,
0.34680765867233276,
0.01844434067606926,
-0.09122365713119507,
-0.22360774874687195,
0.4424719512462616,
-0.2010871171951294,
-0.3260660767555237,
-0.12186403572559357,
-0.11827186495065689,
0.2015000581741333,
-0.026680395007133484,
0.15065281093120575,
-0.20725597441196442,
0.30697616934776306,
0.11022967100143433,
-0.28194254636764526,
-0.2696535885334015,
0.4611704647541046,
0.017781449481844902,
0.4753941595554352,
0.04474971815943718,
0.029640981927514076,
-0.043249890208244324,
-0.062431663274765015,
-0.07938775420188904,
0.42704567313194275,
0.4628276526927948,
0.27520084381103516,
-0.19548621773719788,
0.06233200430870056,
-0.12821412086486816,
-0.05832268297672272,
0.027258530259132385,
0.3443372845649719,
0.08727896213531494,
-0.06261685490608215,
0.2094685435295105,
0.1651688814163208,
-0.10199213773012161,
-0.49988609552383423,
0.3149566054344177,
0.4108642339706421,
-0.06677543371915817,
-0.2090754508972168,
-0.4167182743549347,
-0.09716926515102386,
0.00396563857793808,
-0.03940562158823013,
-0.24566268920898438,
0.1670771688222885,
0.2891443371772766,
0.19956333935260773,
0.019410841166973114,
-0.2941603362560272,
0.08752565830945969,
0.1033257395029068,
0.3317566215991974,
0.4751414656639099,
0.005433555692434311,
-0.13574378192424774,
-0.42599374055862427,
-0.3947451710700989,
0.05912887677550316,
-0.13097091019153595,
0.007471887394785881,
0.0380169153213501,
0.09735804796218872,
-0.11498332768678665,
0.046877287328243256,
-0.04640445113182068,
-0.4414759576320648,
0.15971027314662933,
0.1989266574382782,
-0.29296013712882996,
-0.06150128319859505,
-0.2706277370452881,
-0.20426973700523376,
-0.05047354847192764,
-0.13451242446899414,
0.1826089769601822,
-0.03708730265498161,
-0.0664270669221878,
-0.19376586377620697,
0.24089854955673218,
-0.13062556087970734,
0.16252879798412323,
0.04839383810758591,
0.08005139231681824,
0.18213090300559998,
-0.17314401268959045,
-0.19210468232631683,
-0.39097002148628235,
-0.14940105378627777,
0.11627405881881714,
0.5787706971168518,
-0.03163354471325874,
0.05300275236368179,
-0.19089986383914948,
-0.4945249855518341,
-0.23513102531433105,
0.49610817432403564,
0.0027044974267482758,
0.14293941855430603,
-0.363078236579895,
-0.07848289608955383,
0.042249828577041626,
-0.08459107577800751,
0.12428537011146545,
0.26978600025177,
-0.23528644442558289,
0.19025664031505585,
-0.23403432965278625,
-0.40654635429382324,
0.4118255376815796,
-0.5206714272499084,
-0.1905365139245987,
-0.2702923119068146,
0.001137666404247284,
-0.03772951662540436,
-0.134028360247612,
-0.529315173625946,
0.006117381155490875,
0.22274702787399292,
0.11451642960309982,
0.0398331843316555,
0.06944189965724945,
-0.2643611431121826,
-0.10413934290409088,
-0.2854216396808624,
0.2882959544658661,
0.12453854829072952,
-0.11831291019916534,
-0.041110094636678696,
-0.1646961122751236
] |
https://github.com/huggingface/datasets/issues/4856 | file missing when load_dataset with openwebtext on windows | I have tried to extract ```0015896-b1054262f7da52a0518521e29c8e352c.txt``` from ```17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz``` with 7-zip
and put the file into cache_path ```F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa```
there is still raise the same error and I find the file was removed from cache_path after I run the run_mlm.py with ```python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base```. | ## Describe the bug
0015896-b1054262f7da52a0518521e29c8e352c.txt is missing when I run run_mlm.py with openwebtext. I check the cache_path and can not find 0015896-b1054262f7da52a0518521e29c8e352c.txt. but I can find this file in the 17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz with 7-zip.
## Steps to reproduce the bug
```sh
python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base
```
or
```python
from datasets import load_dataset
load_dataset("openwebtext", None, cache_dir=None, use_auth_token=None)
```
## Expected results
Loading is successful
## Actual results
Traceback (most recent call last):
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 795, in _download_and_prepare
raise OSError(
OSError: Cannot find data file.
Original error:
[Errno 22] Invalid argument: 'F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa/0015896-b1054262f7da52a0518521e29c8e352c.txt'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: windows
- Python version: 3.8.5
- PyArrow version: 9.0.0
| 55 | file missing when load_dataset with openwebtext on windows
## Describe the bug
0015896-b1054262f7da52a0518521e29c8e352c.txt is missing when I run run_mlm.py with openwebtext. I check the cache_path and can not find 0015896-b1054262f7da52a0518521e29c8e352c.txt. but I can find this file in the 17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz with 7-zip.
## Steps to reproduce the bug
```sh
python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base
```
or
```python
from datasets import load_dataset
load_dataset("openwebtext", None, cache_dir=None, use_auth_token=None)
```
## Expected results
Loading is successful
## Actual results
Traceback (most recent call last):
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 704, in download_and_prepare
self._download_and_prepare(
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 1227, in _download_and_prepare
super()._download_and_prepare(dl_manager, verify_infos, check_duplicate_keys=verify_infos)
File "D:\Python\v3.8.5\lib\site-packages\datasets\builder.py", line 795, in _download_and_prepare
raise OSError(
OSError: Cannot find data file.
Original error:
[Errno 22] Invalid argument: 'F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa/0015896-b1054262f7da52a0518521e29c8e352c.txt'
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: windows
- Python version: 3.8.5
- PyArrow version: 9.0.0
I have tried to extract ```0015896-b1054262f7da52a0518521e29c8e352c.txt``` from ```17ecf461bfccd469a1fbc264ccb03731f8606eea7b3e2e8b86e13d18040bf5b3/urlsf_subset00-16_data.xz``` with 7-zip
and put the file into cache_path ```F://huggingface/datasets/downloads/extracted/0901d27f43b7e9ac0577da0d0061c8c632ba0b70ecd1b4bfb21562d9b7486faa```
there is still raise the same error and I find the file was removed from cache_path after I run the run_mlm.py with ```python run_mlm.py --model_type roberta --tokenizer_name roberta-base --dataset_name openwebtext --per_device_train_batch_size 8 --per_device_eval_batch_size 8 --do_train --do_eval --output_dir F:/model/roberta-base```. | [
-0.2830095589160919,
0.1394357979297638,
0.03655129298567772,
0.36213862895965576,
0.13359737396240234,
0.41025614738464355,
0.33363834023475647,
0.35540279746055603,
0.190585657954216,
-0.053093135356903076,
0.27123355865478516,
0.24614746868610382,
-0.1301415115594864,
-0.2126888632774353,
0.3175825774669647,
0.11393724381923676,
-0.054831795394420624,
0.2565184235572815,
0.05509301647543907,
-0.13283729553222656,
-0.3607725501060486,
0.18737109005451202,
-0.32623472809791565,
-0.03961078077554703,
-0.13870474696159363,
0.01109812781214714,
-0.103950634598732,
0.6298651695251465,
0.13917970657348633,
-0.17827208340168,
0.12191703915596008,
-0.543380081653595,
0.18117687106132507,
0.3027768135070801,
-0.00011508628813317046,
0.10763238370418549,
0.20860688388347626,
-0.08127231150865555,
-0.21917368471622467,
-0.13288240134716034,
-0.40289372205734253,
-0.21645206212997437,
-0.15970349311828613,
-0.05801945924758911,
0.07771874219179153,
0.01805562898516655,
0.09967789053916931,
-0.5211238861083984,
0.044361986219882965,
0.48996809124946594,
0.15577751398086548,
0.43307989835739136,
0.23650486767292023,
0.0994105339050293,
0.5507484674453735,
-0.04954421520233154,
-0.028446754440665245,
0.21746407449245453,
0.22170723974704742,
-0.09621129184961319,
-0.019658714532852173,
0.1808217465877533,
-0.07353581488132477,
-0.0866338461637497,
-0.007462538778781891,
0.06490211933851242,
0.47608813643455505,
-0.17585280537605286,
0.15648582577705383,
0.2146202027797699,
0.5155119895935059,
-0.2634730935096741,
-0.18436789512634277,
-0.1742885261774063,
-0.0824730396270752,
-0.18621885776519775,
0.3795795142650604,
0.49620378017425537,
0.1396256536245346,
0.27182286977767944,
0.056157186627388,
-0.1635451465845108,
0.017796069383621216,
0.14327725768089294,
-0.14942297339439392,
0.31751781702041626,
-0.06959129124879837,
0.023000843822956085,
-0.3955880403518677,
0.23090840876102448,
0.222283735871315,
-0.23988503217697144,
-0.2168007791042328,
0.1815921515226364,
-0.13496720790863037,
0.026032663881778717,
0.07863721251487732,
-0.12070270627737045,
-0.1258229911327362,
0.22156737744808197,
0.3571767210960388,
-0.2138907015323639,
-0.0908365324139595,
0.1731095016002655,
0.1160595715045929,
0.20893675088882446,
-0.23540982604026794,
-0.1507963091135025,
0.312564492225647,
-0.06346189975738525,
-0.0703267753124237,
-0.19841569662094116,
-0.27016279101371765,
-0.4355008006095886,
0.16802465915679932,
0.15426883101463318,
0.48015713691711426,
-0.16234086453914642,
-0.524318277835846,
-0.00019356980919837952,
-0.16802752017974854,
-0.09919040650129318,
-0.09009698033332825,
0.07638358324766159,
-0.17445503175258636,
-0.13714700937271118,
0.4085736870765686,
-0.1334507167339325,
-0.42340973019599915,
-0.2323935180902481,
-0.2184431254863739,
0.029155641794204712,
-0.15845848619937897,
0.048959881067276,
0.28277918696403503,
-0.01946226879954338,
0.7646055817604065,
-0.037998031824827194,
-0.14854831993579865,
-0.043860115110874176,
0.005804909393191338,
-0.03176344931125641,
0.03358670696616173,
0.4431084394454956,
0.08401936292648315,
0.1583627611398697,
-0.009735360741615295,
0.11425790190696716,
-0.08964671194553375,
0.40378227829933167,
-0.28316789865493774,
-0.3555654287338257,
-0.1502663940191269,
0.07868850231170654,
-0.17150188982486725,
-0.1560107320547104,
0.09200097620487213,
-0.15018896758556366,
0.12419592589139938,
-0.16596229374408722,
0.10166282951831818,
-0.13865704834461212,
-0.31953105330467224,
-0.20581495761871338,
0.3037939965724945,
0.6623613834381104,
-0.25016751885414124,
-0.029878821223974228,
0.022120555862784386,
0.1738664209842682,
0.11652997136116028,
-0.07053980231285095,
-0.24470219016075134,
0.2935337424278259,
-0.4484531879425049,
0.16150273382663727,
0.32363632321357727,
-0.49284639954566956,
-0.3606938123703003,
0.32228076457977295,
-0.1937257945537567,
0.055252544581890106,
0.07676272094249725,
-0.0696486383676529,
0.011553831398487091,
-0.42468035221099854,
0.20594912767410278,
0.12938174605369568,
-0.06260224431753159,
0.10843060165643692,
-0.39038705825805664,
-0.3047209084033966,
0.13431981205940247,
0.014210991561412811,
-0.066340371966362,
-0.12437532097101212,
0.2777878940105438,
0.057693980634212494,
0.25091296434402466,
0.208793044090271,
0.1371874362230301,
0.3155030608177185,
0.09370417147874832,
0.05263632535934448,
0.07930558174848557,
-0.07707042992115021,
-0.22584083676338196,
0.17474746704101562,
-0.051977839320898056,
-0.09717878699302673,
0.08980658650398254,
0.04244042932987213,
-0.13198506832122803,
-0.09723442792892456,
-0.3386225402355194,
-0.4128568470478058,
0.03256946802139282,
-0.03192296624183655,
0.060062896460294724,
0.16718792915344238,
0.004822295159101486,
-0.09640240669250488,
-0.011774942278862,
0.14461222290992737,
-0.0882742702960968,
0.18304108083248138,
-0.014564787968993187,
-0.18008670210838318,
0.2946237027645111,
0.17174121737480164,
0.13840794563293457,
0.008698559366166592,
-0.30306416749954224,
0.39540958404541016,
-0.18692763149738312,
-0.027883194386959076,
0.0735829696059227,
0.26277241110801697,
0.276368647813797,
-0.1936327964067459,
0.24502259492874146,
0.3215186595916748,
0.17088916897773743,
-0.12603159248828888,
0.06761738657951355,
-0.07418832182884216,
0.4198265075683594,
-0.029751978814601898,
0.04392744600772858,
-0.01665436290204525,
-0.06343205273151398,
-0.21393336355686188,
0.15150511264801025,
0.11271391808986664,
0.13668107986450195,
0.059902992099523544,
0.15647563338279724,
0.047160759568214417,
0.04739665240049362,
0.22273963689804077,
0.8344999551773071,
-0.019701097160577774,
0.16089946031570435,
0.1706772744655609,
-0.5957251191139221,
-0.05987250804901123,
-0.10847887396812439,
-0.020694993436336517,
0.8301113843917847,
0.16556860506534576,
0.02873704954981804,
0.16764001548290253,
-0.04027487710118294,
-0.23897425830364227,
0.4995104670524597,
0.3508760333061218,
0.22159208357334137,
0.17513106763362885,
-0.006715050432831049,
0.16818223893642426,
-0.18494370579719543,
-0.04462466388940811,
0.11223646253347397,
0.09515532106161118,
-0.36983710527420044,
0.11007560044527054,
-0.25623998045921326,
0.08877547830343246,
-0.31323158740997314,
0.03329181671142578,
-0.03861066326498985,
-0.037749405950307846,
-0.12030598521232605,
0.08335457742214203,
-0.15224052965641022,
0.013503906317055225,
-0.2956103980541229,
0.18864481151103973,
0.285524845123291,
-0.007947767153382301,
-0.04246646165847778,
0.13317106664180756,
-0.6954682469367981,
-0.07531854510307312,
0.3953162133693695,
-0.24096068739891052,
0.06689400225877762,
-0.1234864890575409,
0.11985796689987183,
-0.41492050886154175,
-0.12978345155715942,
-0.09553065896034241,
0.22475647926330566,
0.1616329550743103,
0.15596985816955566,
0.04409456625580788,
0.041041530668735504,
-0.13518443703651428,
0.10120660066604614,
-0.06777142733335495,
-0.12617290019989014,
-0.04869874566793442,
0.10422460734844208,
-0.15120692551136017,
-0.060413092374801636,
-0.5439866185188293,
-0.14086855947971344,
-0.409920871257782,
0.06558714061975479,
-0.11892189085483551,
0.07664582133293152,
0.0073016611859202385,
-0.1533319056034088,
0.016774777323007584,
0.06833573430776596,
0.0560692623257637,
-0.04969077184796333,
-0.48955556750297546,
0.3493848145008087,
-0.32890820503234863,
-0.4178221523761749,
0.4305116534233093,
-0.04733576625585556,
-0.043921712785959244,
-0.057024240493774414,
-0.6963936686515808,
0.13251563906669617,
0.023736538365483284,
0.003697488456964493,
-0.23492729663848877,
0.33223459124565125,
0.39398282766342163,
0.11581983417272568,
-0.024714581668376923,
-0.2661648392677307,
-0.225979283452034,
0.12038327753543854,
-0.1447143852710724,
0.3616815507411957,
-0.14647775888442993,
0.18709087371826172,
0.09066453576087952,
0.06285082548856735,
0.3387722969055176,
0.08132021874189377,
0.10941289365291595,
-0.011388814076781273,
0.21228614449501038,
-0.03069210797548294,
-0.024555742740631104,
0.16565728187561035,
-0.05663652718067169,
0.19669455289840698,
0.7405434250831604,
0.38593798875808716,
-0.049068301916122437,
-0.1729094237089157,
-0.3195195496082306,
-0.1288335919380188,
-0.4022136628627777,
0.1635465919971466,
-0.13742689788341522,
0.2851892113685608,
0.32531389594078064,
0.0353623703122139,
-0.18500974774360657,
-0.20554709434509277,
0.42568111419677734,
0.4915297031402588,
0.16325481235980988,
0.2263340801000595,
0.1491299718618393,
-0.167962908744812,
-0.412719190120697,
-0.026946932077407837,
-0.0012021904112771153,
0.5487001538276672,
0.13677074015140533,
-0.05514926463365555,
-0.03485432267189026,
0.2098916471004486,
0.6110970973968506,
-0.12931711971759796,
0.2566731572151184,
0.18746522068977356,
0.22738230228424072,
-0.13570336997509003,
-0.21042701601982117,
0.05771782621741295,
0.5691323280334473,
0.2900222837924957,
0.19359062612056732,
0.09728225320577621,
-0.13305947184562683,
0.4476875364780426,
0.17147976160049438,
-0.2709216773509979,
-0.2979449927806854,
-0.3084273040294647,
-0.2602679431438446,
0.011342847719788551,
-0.25856152176856995,
0.25423550605773926,
0.10993319749832153,
-0.11208106577396393,
-0.1186579167842865,
-0.22415518760681152,
-0.2874189019203186,
0.09822823107242584,
-0.21164920926094055,
0.2509816884994507,
-0.04244207218289375,
0.3960016369819641,
0.1696322113275528,
0.5137072801589966,
0.10333165526390076,
0.39628374576568604,
-0.18251457810401917,
-0.2870773673057556,
0.2728923261165619,
-0.4302038252353668,
0.11691579222679138,
0.24364572763442993,
-0.174428328871727,
-0.31670811772346497,
0.04732051491737366,
-0.14556829631328583,
-0.3331323564052582,
-0.015388723462820053,
0.17247390747070312,
0.02773132175207138,
-0.14206622540950775,
-0.3772234618663788,
0.3221692740917206,
-0.2352832406759262,
0.06975157558917999,
0.4566839933395386,
-0.20225833356380463,
-0.5485297441482544,
0.06449543684720993,
-0.27348431944847107,
0.6660129427909851,
0.3318961262702942,
0.2152213305234909,
0.18469563126564026,
-0.06183961406350136,
-0.05911095812916756,
-0.21484065055847168,
0.23831136524677277,
-0.07579737156629562,
-0.403647243976593,
-0.04561927169561386,
-0.1326153725385666,
0.16495418548583984,
0.31918537616729736,
0.07233548164367676,
0.19764377176761627,
0.2917805314064026,
-0.038049910217523575,
0.3988066017627716,
0.09161658585071564,
0.04557039216160774,
-0.22652018070220947,
-0.21214206516742706,
0.025746501982212067,
0.2279702126979828,
0.5007193684577942,
-0.1669004261493683,
-0.11175169795751572,
0.06261029839515686,
-0.18108446896076202,
-0.28477925062179565,
0.08422807604074478,
-0.721108615398407,
0.2674923837184906,
-0.15893986821174622,
0.08831067383289337,
0.4055771827697754,
-0.06716097891330719,
0.16248223185539246,
0.0994582325220108,
-0.23088768124580383,
0.1918521374464035,
0.31224462389945984,
0.035571467131376266,
0.06763225793838501,
0.04719267413020134,
0.3415290415287018,
-0.10524523258209229,
-0.058330658823251724,
0.08074792474508286,
-0.47697654366493225,
-0.15470412373542786,
0.08110597729682922,
-0.08495880663394928,
0.3890131115913391,
-0.16334998607635498,
-0.19281286001205444,
-0.005772814154624939,
0.16134221851825714,
-0.3021872043609619,
0.07155469805002213,
0.3427959680557251,
-0.060389041900634766,
0.2966035008430481,
-0.18120671808719635,
-0.37872952222824097,
-0.10871507227420807,
0.1371574103832245,
-0.29941415786743164,
-0.017709290608763695,
0.525593638420105,
0.0958603024482727,
-0.08734262734651566,
-0.07649664580821991,
0.39763450622558594,
-0.022621219977736473,
-0.4033624827861786,
0.2422037273645401,
0.03582735359668732,
0.3711079955101013,
0.009201246313750744,
0.20568957924842834,
0.09975308179855347,
-0.13183584809303284,
0.05403871461749077,
-0.8152225613594055,
0.11576368659734726,
-0.06795626878738403,
0.10899370908737183,
-0.15742145478725433,
-0.0035902969539165497,
0.30621710419654846,
0.053266413509845734,
-0.3456905782222748,
-0.22239968180656433,
0.34257882833480835,
0.022864969447255135,
0.08424651622772217,
0.11005134880542755,
0.1870204210281372,
0.5531550049781799,
0.133134663105011,
-0.036182377487421036,
-0.04035766422748566,
0.029654331505298615,
-0.12831103801727295,
-0.38776469230651855,
0.19227063655853271,
-0.156083881855011,
-0.023759692907333374,
0.12625744938850403,
-0.33214932680130005,
-0.06965012848377228,
0.07684197276830673,
0.026140186935663223,
-0.21873816847801208,
-0.11219102144241333,
-0.045469217002391815,
0.027097877115011215,
0.003816083073616028,
-0.18026292324066162,
0.30070632696151733,
-0.4174557626247406,
0.33442676067352295,
0.1711512953042984,
0.18642602860927582,
0.12275248765945435,
0.08944852650165558,
0.07982965558767319,
-0.25897017121315,
-0.3531057834625244,
0.2266477346420288,
0.4984228014945984,
-0.35284852981567383,
-0.09383871406316757,
0.23275227844715118,
-0.14187729358673096,
0.04426012933254242,
-0.30903884768486023,
0.006670551374554634,
0.20242393016815186,
0.1378842294216156,
-0.3260723650455475,
0.032609324902296066,
0.25140583515167236,
-0.2001301795244217,
0.07724341750144958,
-0.07792093604803085,
0.16830980777740479,
-0.03546277806162834,
-0.37169742584228516,
0.236934632062912,
0.47766566276550293,
0.19841334223747253,
0.0521075613796711,
0.426248162984848,
0.07102712988853455,
0.3260611593723297,
-0.10297054797410965,
0.2283567637205124,
-0.03376609832048416,
0.4920189380645752,
0.04816992208361626,
0.3402312099933624,
0.2171250879764557,
-0.005664285272359848,
-0.42319026589393616,
-0.6834138631820679,
0.15718960762023926,
0.0313669890165329,
0.018502451479434967,
0.23211032152175903,
-0.07219874858856201,
0.27995121479034424,
-0.3067969083786011,
0.13526061177253723,
0.07964878529310226,
0.13707152009010315,
-0.18032175302505493,
-0.020924344658851624,
0.06992863118648529,
-0.055615656077861786,
0.1536642611026764,
0.03579195961356163,
0.08314940333366394,
-0.05648868530988693,
-0.2241699993610382,
0.20920613408088684,
-0.13249550759792328,
-0.14847639203071594,
-0.16095447540283203,
0.1375473141670227,
-0.053109414875507355,
-0.32787570357322693,
0.1506546139717102,
0.1061018779873848,
-0.2903110980987549,
0.07047009468078613,
0.15168480575084686,
0.2848004102706909,
0.20206058025360107,
-0.09229029715061188,
-0.19229595363140106,
0.21566878259181976,
-0.08176761120557785,
-0.19174520671367645,
0.15694256126880646,
0.16830408573150635,
0.13062317669391632,
-0.030051760375499725,
0.012726552784442902,
0.005030275322496891,
0.034446801990270615,
0.025904782116413116,
-0.18896208703517914,
-0.11973373591899872,
0.07236389815807343,
-0.2459774613380432,
-0.28659841418266296,
-0.27507835626602173,
0.18959364295005798,
-0.11252620071172714,
0.06498956680297852,
0.45524176955223083,
0.01437700167298317,
0.004248561337590218,
-0.04338320344686508,
0.05409896373748779,
-0.008635744452476501,
0.2665144205093384,
0.2946959435939789,
-0.13334938883781433,
-0.23469272255897522,
-0.30245012044906616,
-0.5880318284034729,
0.22297298908233643,
0.15072104334831238,
-0.29957157373428345,
0.03187131881713867,
0.11121731996536255,
-0.189388245344162,
-0.21449275314807892,
0.28014928102493286,
0.07570906728506088,
0.2318708598613739,
0.1378946304321289,
-0.2992653250694275,
-0.4749160408973694,
-0.02543652057647705,
0.2597520053386688,
-0.021123962476849556,
-0.3706129193305969,
0.18021054565906525,
-0.013971108943223953,
0.003012407571077347,
-0.5866475701332092,
-0.05911517143249512,
-0.021475274115800858,
0.10080662369728088,
0.5492231249809265,
0.036603979766368866,
0.14187631011009216,
-0.03606368601322174,
-0.19067755341529846,
-0.18635758757591248,
0.09262441843748093,
0.09059378504753113,
0.13825275003910065,
0.05902799591422081,
0.075670525431633,
-0.27351683378219604,
-0.1644197702407837,
-0.31092625856399536,
0.18057580292224884,
0.02867574244737625,
-0.14174742996692657,
-0.593106746673584,
0.18082717061042786,
-0.18656432628631592,
0.1938481479883194,
0.43646422028541565,
0.18669438362121582,
-0.4043380320072174,
-0.22508399188518524,
-0.2045484185218811,
-0.25005051493644714,
0.20947346091270447,
-0.6805999875068665,
-0.011799165979027748,
-0.3187396824359894,
0.5019510984420776,
-0.2112104296684265,
0.12020167708396912,
-0.3295619785785675,
-0.0797320008277893,
0.4850215017795563,
0.015440055169165134,
-0.2527957260608673,
0.35931482911109924,
-0.13410864770412445,
0.09169602394104004,
0.15759745240211487,
0.07273128628730774,
-0.02014855295419693,
-0.4430607855319977,
0.10829043388366699,
-0.25311267375946045
] |
https://github.com/huggingface/datasets/issues/4855 | Dataset Viewer issue for super_glue | Thanks for reporting @wzsxxa.
However the "super_glue" dataset is rendered properly by the Dataset preview: https://huggingface.co/datasets/super_glue | ### Link
https://huggingface.co/datasets/super_glue
### Description
can't view super_glue dataset on the web page
### Owner
_No response_ | 16 | Dataset Viewer issue for super_glue
### Link
https://huggingface.co/datasets/super_glue
### Description
can't view super_glue dataset on the web page
### Owner
_No response_
Thanks for reporting @wzsxxa.
However the "super_glue" dataset is rendered properly by the Dataset preview: https://huggingface.co/datasets/super_glue | [
-0.2482534795999527,
-0.22790858149528503,
-0.025696979835629463,
0.28930649161338806,
0.3232521414756775,
0.0356961190700531,
0.10096246004104614,
0.22673331201076508,
0.23496505618095398,
0.05590607970952988,
-0.32945185899734497,
0.14187577366828918,
0.07412376999855042,
0.30459094047546387,
0.17941346764564514,
-0.007614403963088989,
0.06985479593276978,
0.14161336421966553,
-0.0865592509508133,
0.10347230732440948,
-0.2075471729040146,
-0.12464970350265503,
-0.19471043348312378,
0.03132648393511772,
-0.18944254517555237,
0.049240969121456146,
-0.032689619809389114,
0.011267919093370438,
-0.33808284997940063,
-0.3868284225463867,
0.18719132244586945,
0.25866520404815674,
0.21278516948223114,
0.21398428082466125,
-0.00010177905642194673,
0.2434011548757553,
0.5353638529777527,
0.2374459207057953,
-0.1403702199459076,
0.24062013626098633,
-0.4742741286754608,
-0.26665621995925903,
0.1312396079301834,
0.03678034991025925,
-0.2536851465702057,
0.006254379637539387,
0.04057691618800163,
-0.24301503598690033,
0.21543624997138977,
-0.08439908921718597,
0.3489113748073578,
0.4015425145626068,
0.07655330002307892,
-0.18268856406211853,
-0.0064452290534973145,
0.09871502220630646,
-0.29022425413131714,
0.30821290612220764,
0.08217418938875198,
-0.00012549757957458496,
-0.2438335418701172,
0.3083944618701935,
0.09665895998477936,
0.16134005784988403,
0.07296444475650787,
-0.16174063086509705,
-0.1094825491309166,
-0.11784628033638,
0.1589777171611786,
0.38890090584754944,
0.5062301158905029,
-0.0424220934510231,
-0.25169122219085693,
0.10043185204267502,
-0.13213984668254852,
0.31545665860176086,
0.19465792179107666,
0.1503884494304657,
0.11835040152072906,
0.3391492962837219,
-0.1956402212381363,
-0.0709896981716156,
-0.11145897209644318,
0.03528357297182083,
-0.3136695325374603,
0.05079798027873039,
-0.33845168352127075,
0.061142075806856155,
0.10215891897678375,
-0.1640441119670868,
-0.031128499656915665,
0.024249404668807983,
-0.1808691769838333,
-0.13490289449691772,
-0.20955561101436615,
0.07365034520626068,
0.09848930686712265,
0.30380141735076904,
0.1346515715122223,
0.10181508958339691,
0.05061647668480873,
0.25515371561050415,
0.0448458194732666,
0.19887521862983704,
0.195895254611969,
0.0537833534181118,
0.1580176055431366,
0.05620603263378143,
0.47049784660339355,
0.1997806280851364,
0.16099753975868225,
0.03808705508708954,
0.006217814050614834,
-0.14518237113952637,
-0.449417382478714,
-0.49775657057762146,
0.3304542303085327,
-0.06391254812479019,
-0.3425493538379669,
0.2762290835380554,
0.0068527646362781525,
-0.022591598331928253,
0.044939253479242325,
0.4244728982448578,
-0.2002367079257965,
-0.08180642873048782,
0.06912514567375183,
0.103545643389225,
-0.22454743087291718,
-0.42998453974723816,
-0.27834635972976685,
-0.053710225969552994,
-0.32764551043510437,
-0.0032489504665136337,
0.12559588253498077,
-0.292269766330719,
-0.017621539533138275,
0.07734556496143341,
-0.0505371168255806,
-0.07636801898479462,
-0.32938119769096375,
0.07315115630626678,
-0.11780638247728348,
0.26863229274749756,
0.15891456604003906,
0.15397940576076508,
0.05129986256361008,
-0.27357035875320435,
0.2170046865940094,
0.05353795364499092,
0.05917759984731674,
-0.1808895468711853,
-0.427998423576355,
0.24187111854553223,
-0.5324811935424805,
0.041673336178064346,
-0.11993557959794998,
0.05799615755677223,
-0.21596449613571167,
0.12416477501392365,
-0.04620677977800369,
0.1622004210948944,
-0.04933415725827217,
-0.18579605221748352,
0.3541496694087982,
0.40993815660476685,
-0.40124237537384033,
-0.05348360538482666,
-0.08153200894594193,
-0.2729729115962982,
-0.16890010237693787,
0.16894201934337616,
0.025173239409923553,
-0.3034200072288513,
-0.34943246841430664,
0.044819459319114685,
0.08179697394371033,
-0.03982818126678467,
-0.7437775135040283,
0.5023195743560791,
-0.11223649978637695,
0.09687687456607819,
0.04790504276752472,
-0.15377573668956757,
0.07289654016494751,
0.09776493906974792,
-0.18194565176963806,
-0.08591234683990479,
0.23452293872833252,
-0.12700293958187103,
-0.46844837069511414,
-0.1711251139640808,
0.3219335079193115,
0.11658233404159546,
0.11272785067558289,
-0.009256713092327118,
0.07003148645162582,
-0.27695658802986145,
0.34446048736572266,
0.34070637822151184,
0.15172478556632996,
-0.017315037548542023,
0.12082250416278839,
0.1540108323097229,
0.10487242043018341,
-0.1350322961807251,
-0.2508176267147064,
0.09737416356801987,
0.051962174475193024,
0.19046197831630707,
-0.015149198472499847,
-0.25160735845565796,
-0.3414595127105713,
0.11126474291086197,
-0.2533172070980072,
-0.2534273862838745,
0.27864208817481995,
0.1316666156053543,
-0.14248816668987274,
0.2066400945186615,
0.08503615856170654,
0.14911729097366333,
0.07081121951341629,
0.19241169095039368,
-0.11867877840995789,
0.40045365691185,
-0.19579245150089264,
0.031092852354049683,
0.00737631693482399,
0.07540833950042725,
0.11977842450141907,
0.005741376429796219,
-0.04742708429694176,
0.372795045375824,
-0.21995942294597626,
0.032241739332675934,
0.3565926253795624,
0.06880250573158264,
0.33662864565849304,
-0.7261459827423096,
0.4084717631340027,
0.05568788945674896,
-0.03359674662351608,
0.036510169506073,
-0.34560829401016235,
0.0836513340473175,
0.11029690504074097,
0.20526689291000366,
-0.008855719119310379,
0.37025508284568787,
0.1852075606584549,
-0.08104800432920456,
-0.11251527816057205,
-0.12257114797830582,
0.10107003152370453,
0.24023663997650146,
0.41279706358909607,
-0.025140253826975822,
-0.3061753511428833,
0.19705072045326233,
0.017344634979963303,
-0.14329974353313446,
-0.0006813704967498779,
-0.007744964212179184,
-0.5964511036872864,
-0.11929366737604141,
0.2108742743730545,
0.23586226999759674,
-0.04467390477657318,
0.24317803978919983,
0.11543037742376328,
0.03499199077486992,
-0.07829541712999344,
-0.1174459233880043,
0.06873717904090881,
0.05594341456890106,
-0.29577645659446716,
-0.10600834339857101,
0.017979733645915985,
-0.224599227309227,
-0.32750463485717773,
0.22062218189239502,
0.04162711650133133,
-0.03628067672252655,
-0.37895968556404114,
-0.2360544353723526,
-0.20626939833164215,
-0.5562167763710022,
0.0192115418612957,
-0.07153622061014175,
-0.35244280099868774,
-0.3761272430419922,
-0.06727597862482071,
0.02291685715317726,
-0.061438798904418945,
0.2864656448364258,
-0.1641814261674881,
0.41419991850852966,
-0.042287394404411316,
0.4758148789405823,
-0.3439235985279083,
0.16689826548099518,
-0.22525882720947266,
0.17422908544540405,
0.2138678878545761,
0.012927336618304253,
0.1705169677734375,
0.05425532907247543,
0.3660392165184021,
-0.3497789800167084,
-0.28506410121917725,
0.17176023125648499,
0.058144718408584595,
0.4400452673435211,
0.002346053719520569,
0.1270919144153595,
0.17540551722049713,
0.07677063345909119,
0.45053794980049133,
-0.07920549809932709,
0.1458905041217804,
0.02412489429116249,
0.026995956897735596,
-0.05741589888930321,
0.0001243799924850464,
-0.0038100555539131165,
-0.26237213611602783,
-0.40821027755737305,
0.20092277228832245,
-0.20949049293994904,
-0.022321954369544983,
-0.1572776585817337,
-0.030288249254226685,
-0.0011071283370256424,
0.06485957652330399,
-0.18259301781654358,
-0.4471881687641144,
-0.39432087540626526,
0.31044843792915344,
-0.35480839014053345,
-0.49880585074424744,
0.007883254438638687,
0.052987195551395416,
0.12122887372970581,
-0.14949730038642883,
-0.43598198890686035,
0.02616923302412033,
-0.29420602321624756,
-0.06626333296298981,
0.12130655348300934,
-0.003332441672682762,
0.057876911014318466,
-0.1592896580696106,
-0.11872164905071259,
-0.23659735918045044,
-0.20046307146549225,
-0.05661524087190628,
-0.3678046762943268,
0.19528700411319733,
-0.03974315524101257,
-0.022420324385166168,
0.3397829234600067,
0.3806164264678955,
0.14458240568637848,
0.04082724452018738,
0.1390189528465271,
-0.16261303424835205,
0.543825626373291,
0.15141701698303223,
-0.25791439414024353,
-0.18183085322380066,
-0.11752945184707642,
0.2591904401779175,
0.23991727828979492,
0.29824987053871155,
0.21900777518749237,
-0.028469180688261986,
0.10945793986320496,
-0.19335070252418518,
-0.12108676135540009,
-0.19946825504302979,
0.04151047393679619,
-0.08318568021059036,
0.06098281219601631,
0.1686130166053772,
0.14763160049915314,
-0.2157561480998993,
0.09492161870002747,
0.5130206942558289,
0.043238501995801926,
0.01512894593179226,
-0.07925131171941757,
0.06974224746227264,
-0.342788964509964,
0.3165719509124756,
-0.24800746142864227,
0.2546551823616028,
0.017108332365751266,
-0.2080317735671997,
0.21749937534332275,
0.019620992243289948,
0.7270799279212952,
-0.35401999950408936,
0.35643160343170166,
0.25176265835762024,
-0.229060098528862,
-0.438556969165802,
-0.002923116087913513,
-0.07175805419683456,
0.11723073571920395,
0.16479948163032532,
-0.036224693059921265,
0.022746466100215912,
-0.11534151434898376,
0.42332637310028076,
-0.43375545740127563,
-0.24908357858657837,
-0.32852593064308167,
0.008487246930599213,
0.12319441884756088,
0.09530992805957794,
-0.17773959040641785,
-0.03347649797797203,
-0.030985310673713684,
-0.04885794222354889,
-0.1527521014213562,
-0.21286699175834656,
-0.22595590353012085,
0.1332806944847107,
0.21405333280563354,
0.23574745655059814,
0.0036247509997338057,
0.2647705674171448,
0.5834200382232666,
0.46054592728614807,
0.17912913858890533,
0.4858205020427704,
-0.08412624895572662,
-0.11476288735866547,
0.11167097836732864,
-0.1643415093421936,
0.12423426657915115,
0.18672685325145721,
-0.06982558220624924,
-0.16295653581619263,
0.08765701949596405,
0.18456077575683594,
-0.5737822651863098,
0.19700154662132263,
0.2589690685272217,
-0.13474273681640625,
-0.3252110183238983,
-0.20245520770549774,
0.7581670880317688,
-0.008130932226777077,
-0.1317531019449234,
0.18672333657741547,
0.4716142416000366,
-0.09454455971717834,
0.0209974255412817,
-0.17826345562934875,
0.9371996521949768,
-0.1313433051109314,
-0.12579719722270966,
0.11881335079669952,
-0.32390856742858887,
0.32434678077697754,
-0.2462354153394699,
-0.006530432030558586,
-0.38054901361465454,
-0.39260005950927734,
-0.06484518200159073,
-0.05445818603038788,
0.27061349153518677,
0.04447316378355026,
-0.03499660640954971,
-0.10558203607797623,
0.10692514479160309,
0.2612573504447937,
0.1579250991344452,
0.24438130855560303,
0.040346354246139526,
0.04876694455742836,
0.15691815316677094,
0.28013840317726135,
-0.1066906750202179,
0.13831818103790283,
-0.05500952526926994,
-0.07223573327064514,
0.0446818582713604,
-0.03289942443370819,
-0.4642578363418579,
0.08703915029764175,
-0.20325319468975067,
0.05912074074149132,
0.02797660417854786,
-0.15155121684074402,
0.24851739406585693,
0.039687734097242355,
-0.28741317987442017,
0.20477722585201263,
-0.4395555853843689,
0.25058436393737793,
0.06064065545797348,
-0.12826472520828247,
0.009040390141308308,
0.22578026354312897,
0.0937301442027092,
0.03287775069475174,
-0.10502554476261139,
-0.04717974364757538,
0.14491057395935059,
-0.054785411804914474,
-0.2221679985523224,
0.06405234336853027,
-0.01623426377773285,
-0.5484455823898315,
0.15559516847133636,
-0.23438745737075806,
0.1555580347776413,
-0.21525034308433533,
0.2349286824464798,
0.08252471685409546,
-0.009813676588237286,
-0.02048712968826294,
0.2668038010597229,
-0.0691361129283905,
-0.08522993326187134,
0.5112951993942261,
-0.10657153278589249,
-0.03054715506732464,
-0.07169601321220398,
0.16479600965976715,
-0.39154499769210815,
-0.212660014629364,
-0.05558415502309799,
0.1356019377708435,
-0.2408272624015808,
0.14746259152889252,
-0.28894713521003723,
-0.1089513897895813,
0.0069344001822173595,
-0.1727939397096634,
0.18968656659126282,
-0.15978652238845825,
-0.1433190405368805,
-0.2997923791408539,
-0.1243249699473381,
0.09351897984743118,
-0.12318089604377747,
0.2058754861354828,
-0.14173312485218048,
0.1251949518918991,
0.14947044849395752,
0.21118861436843872,
-0.4120310842990875,
0.13618546724319458,
0.03458564728498459,
-0.22576859593391418,
0.11167526990175247,
0.021448306739330292,
0.19083760678768158,
-0.23009945452213287,
0.1348881721496582,
0.10865306854248047,
-0.2873683273792267,
-0.2753395736217499,
-0.07072298228740692,
0.07345279306173325,
0.13107673823833466,
-0.28122225403785706,
0.09576495736837387,
0.126155823469162,
0.09182608127593994,
0.04685623571276665,
0.10529957711696625,
0.05045834928750992,
-0.04342848062515259,
0.017636016011238098,
-0.03772931918501854,
-0.11920192092657089,
0.006647873669862747,
0.18979589641094208,
0.07302814722061157,
0.5278058052062988,
0.0778735801577568,
-0.04482794553041458,
0.008852789178490639,
-0.030871711671352386,
0.018750598654150963,
-0.003400556743144989,
-0.04128740727901459,
0.14246658980846405,
0.27604052424430847,
-0.28160375356674194,
-0.05624055862426758,
0.10967260599136353,
0.6493843793869019,
0.07940185815095901,
-0.24393315613269806,
-0.012545467354357243,
0.1201779767870903,
0.307806134223938,
-0.25487247109413147,
-0.0944942981004715,
0.3229465186595917,
-0.17760330438613892,
0.2130221426486969,
-0.130415678024292,
0.327396035194397,
0.3484050929546356,
0.059870824217796326,
0.053745970129966736,
0.46515917778015137,
-0.04970327019691467,
0.24690432846546173,
0.36196422576904297,
-0.19485116004943848,
0.09416352212429047,
0.2531435489654541,
0.1720859706401825,
-0.03166630119085312,
0.4428126811981201,
0.20093174278736115,
0.15588273108005524,
0.1582184135913849,
0.29364487528800964,
0.16920775175094604,
-0.2207229733467102,
0.02999153733253479,
0.1502799689769745,
-0.22171756625175476,
0.05833466351032257,
-0.21150091290473938,
0.45971035957336426,
-0.29773110151290894,
-0.015463875606656075,
-0.32831233739852905,
-0.14677025377750397,
-0.1007685735821724,
-0.008474164642393589,
0.1078471690416336,
-0.2160666584968567,
-0.30898287892341614,
0.14586110413074493,
-0.0610089935362339,
-0.26010459661483765,
0.29011470079421997,
-0.23660428822040558,
-0.038592949509620667,
-0.2677347958087921,
-0.054132215678691864,
0.0993521586060524,
0.09604492783546448,
-0.1970652937889099,
-0.027735760435461998,
0.13905975222587585,
0.10901127755641937,
0.2666114568710327,
0.528684675693512,
0.35126644372940063,
-0.04395207762718201,
-0.026999980211257935,
-0.26197829842567444,
-0.0826934427022934,
-0.09187610447406769,
-0.12799333035945892,
0.11367371678352356,
0.2157609760761261,
-0.1415730118751526,
0.23420338332653046,
0.23011529445648193,
-0.2266882061958313,
0.12743189930915833,
0.01206875964999199,
0.2870332896709442,
-0.1420765519142151,
0.01728079468011856,
-0.3506956398487091,
-0.18197491765022278,
-0.06773393601179123,
-0.5414145588874817,
-0.3833869993686676,
-0.14624252915382385,
0.3403428792953491,
-0.23206186294555664,
0.042195260524749756,
-0.4063708484172821,
0.11513403058052063,
0.13823002576828003,
0.6386569738388062,
0.30974674224853516,
0.25344568490982056,
0.02639525756239891,
-0.34928154945373535,
-0.4077691435813904,
0.27088746428489685,
-0.041424114257097244,
-0.06662055104970932,
0.12107166647911072,
0.07609834522008896,
-0.1849348247051239,
-0.06993617862462997,
0.2751700282096863,
0.4282238185405731,
-0.08020280301570892,
0.004853624850511551,
-0.13609616458415985,
0.03201354667544365,
0.19921891391277313,
-0.03603365272283554,
-0.012386031448841095,
-0.12679588794708252,
0.3054669201374054,
0.10993800312280655,
0.08921021968126297,
0.004949837923049927,
0.2959458529949188,
-0.15146706998348236,
-0.41019535064697266,
0.6216736435890198,
0.05005800724029541,
0.4522503614425659,
0.06377385556697845,
-0.10128815472126007,
-0.266536146402359,
-0.1749449521303177,
-0.2065323293209076,
0.34121206402778625,
0.16058431565761566,
0.23634925484657288,
-0.00667294068261981,
-0.40185263752937317,
-0.05428488552570343,
-0.042685072869062424,
-0.07234469056129456,
0.5030589699745178,
-0.33422353863716125,
-0.09171058982610703,
-0.09011708199977875,
-0.1060694232583046,
0.25124987959861755,
0.11887869238853455,
-0.012487068772315979,
0.0182278323918581,
-0.14987978339195251,
-0.3186829686164856,
0.22614048421382904,
-0.36505457758903503,
-0.1399553269147873,
0.04899711161851883,
0.11805199831724167,
0.15857350826263428,
-0.09210950136184692,
-0.5424670577049255,
-0.15338048338890076,
0.25692248344421387,
0.007921876385807991,
0.05344676598906517,
0.30116069316864014,
-0.13376320898532867,
0.008003760129213333,
-0.007976356893777847,
0.22542855143547058,
0.2523568868637085,
-0.2813965082168579,
0.1804247498512268,
-0.13320669531822205
] |
https://github.com/huggingface/datasets/issues/4852 | Bug in multilingual_with_para config of exams dataset and checksums error | Hi @albertvillanova. Unfortunately I still get this error. Is this because the merge has yet to be released? Is there a way to track the release? | ## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers | 26 | Bug in multilingual_with_para config of exams dataset and checksums error
## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers
Hi @albertvillanova. Unfortunately I still get this error. Is this because the merge has yet to be released? Is there a way to track the release? | [
-0.2889246940612793,
-0.04891008883714676,
-0.08580703288316727,
0.430634081363678,
0.19367215037345886,
-0.07232353836297989,
0.11616993695497513,
0.4211183786392212,
-0.13265259563922882,
0.20865973830223083,
0.19296199083328247,
0.3872624337673187,
0.12413590401411057,
-0.08251821994781494,
-0.21289996802806854,
-0.09971265494823456,
0.1547173410654068,
-0.3067677617073059,
-0.014719650149345398,
0.06906510889530182,
-0.4402295649051666,
0.2278546392917633,
-0.21662156283855438,
-0.15988832712173462,
0.13392318785190582,
0.06672144681215286,
-0.040370140224695206,
0.09083256125450134,
0.04031982272863388,
-0.17206694185733795,
0.2217913120985031,
-0.05626826360821724,
-0.1461198925971985,
0.48542308807373047,
-0.00011512571654748172,
0.17807039618492126,
0.28416067361831665,
-0.20220889151096344,
-0.18911822140216827,
-0.10432317852973938,
-0.34022122621536255,
-0.07324126362800598,
-0.1469397097826004,
-0.2920343577861786,
-0.07564583420753479,
0.10036907345056534,
-0.20535634458065033,
-0.4228822886943817,
-0.013672322034835815,
0.46140459179878235,
0.20128142833709717,
0.3209543824195862,
0.032586608082056046,
0.05278536304831505,
-0.07406554371118546,
-0.12408222258090973,
-0.17572133243083954,
-0.18899500370025635,
0.2327008694410324,
0.04482430964708328,
-0.01744721829891205,
0.19156506657600403,
-0.063198521733284,
-0.2513652741909027,
-0.24919167160987854,
-0.06336445361375809,
0.14954152703285217,
-0.24391937255859375,
0.31602317094802856,
0.3106659948825836,
0.0952068567276001,
-0.1615287959575653,
-0.24845874309539795,
-0.18904155492782593,
-0.08762117475271225,
0.1314583420753479,
0.48598942160606384,
0.27862414717674255,
-0.10169598460197449,
0.019966602325439453,
-0.061614472419023514,
0.060861993581056595,
-0.020783796906471252,
0.3074851334095001,
0.34324491024017334,
0.20284713804721832,
0.19014115631580353,
0.07902715355157852,
0.11226743459701538,
-0.14944712817668915,
0.17439714074134827,
-0.2217230647802353,
-0.25346940755844116,
0.19909889996051788,
-0.5081998705863953,
-0.04610079899430275,
-0.06487333029508591,
0.068498894572258,
0.36218923330307007,
0.16637663543224335,
0.13642285764217377,
0.19974738359451294,
-0.08861219137907028,
0.09966105222702026,
0.12672854959964752,
0.1371777206659317,
0.17302969098091125,
0.7321918606758118,
0.0929909199476242,
0.25430336594581604,
0.23117506504058838,
0.2705709934234619,
0.18069997429847717,
-0.38055098056793213,
0.36094656586647034,
0.2751587927341461,
-0.03657965734601021,
-0.26278096437454224,
-0.07030008733272552,
0.3551766872406006,
-0.12416180968284607,
-0.1540854126214981,
0.0937250629067421,
0.22088435292243958,
-0.2587679922580719,
0.2780771851539612,
-0.023384490981698036,
0.22075539827346802,
-0.22355851531028748,
0.10040180385112762,
-0.24521490931510925,
0.06329178810119629,
0.009061459451913834,
-0.0837467685341835,
-0.09877884387969971,
-0.03174001723527908,
0.34639599919319153,
0.1060962900519371,
0.14464151859283447,
-0.23568519949913025,
0.11131200194358826,
-0.1858721673488617,
-0.18267765641212463,
0.2952782213687897,
-0.018922988325357437,
-0.11477938294410706,
0.1360590159893036,
-0.19651852548122406,
-0.16334980726242065,
0.22748443484306335,
-0.43939971923828125,
-0.2398683726787567,
-0.07560985535383224,
0.1892712116241455,
-0.20520025491714478,
0.13104327023029327,
-0.21892830729484558,
0.04279850795865059,
0.5503324866294861,
-0.17144693434238434,
0.15978732705116272,
-0.42920196056365967,
-0.3377898633480072,
-0.28057268261909485,
0.010359099134802818,
0.08503738045692444,
-0.17024537920951843,
-0.14387118816375732,
0.31428447365760803,
-0.05693243816494942,
0.3000282347202301,
0.017090750858187675,
-0.2144712507724762,
-0.1681438386440277,
-0.17301660776138306,
0.2552188038825989,
0.21138662099838257,
-0.46891114115715027,
-0.4063766598701477,
0.05300135910511017,
0.12404155731201172,
0.22804950177669525,
0.2301434576511383,
-0.18207746744155884,
-0.2059646099805832,
0.07073064148426056,
0.3049963712692261,
0.22783628106117249,
0.17312990128993988,
0.2124926596879959,
-0.3648093044757843,
-0.1796494424343109,
-0.0799236074090004,
0.26053765416145325,
0.19128310680389404,
-0.2585929036140442,
0.10856421291828156,
-0.13874275982379913,
0.22831964492797852,
-0.10496747493743896,
0.039169445633888245,
0.3538582921028137,
0.24357058107852936,
-0.19882084429264069,
0.16031064093112946,
-0.25480324029922485,
-0.4412216544151306,
0.2805800139904022,
0.015309803187847137,
0.11622608453035355,
-0.13357841968536377,
-0.018538665026426315,
-0.04634340852499008,
-0.23090659081935883,
-0.3735906779766083,
0.05598592013120651,
0.0935760885477066,
0.14905008673667908,
0.03892658278346062,
0.20674946904182434,
-0.08433786034584045,
0.2885296940803528,
-0.20422714948654175,
-0.10404700040817261,
-0.39805009961128235,
0.2565862238407135,
-0.16279689967632294,
-0.13250240683555603,
-0.09550058841705322,
0.027260243892669678,
0.04467259347438812,
-0.10354450345039368,
-0.3081572651863098,
0.35836556553840637,
0.4663684666156769,
-0.1561264842748642,
0.006199408322572708,
0.22395342588424683,
-0.011236364021897316,
-0.026025395840406418,
-0.19413408637046814,
0.392218679189682,
0.037693873047828674,
-0.05082288756966591,
0.024546083062887192,
0.7444872856140137,
-0.13075804710388184,
0.2777775824069977,
0.11182437837123871,
-0.04196569323539734,
0.38709887862205505,
-0.1947573572397232,
-0.2152373045682907,
-0.19821542501449585,
0.40604984760284424,
-0.001963594928383827,
0.15972626209259033,
0.0772722065448761,
-0.4318917393684387,
-0.08492865413427353,
0.4195607304573059,
-0.007631892338395119,
0.028166014701128006,
-0.00985906645655632,
0.32373133301734924,
0.1275503933429718,
-0.11765968799591064,
0.3853660225868225,
0.6394978761672974,
0.04234915226697922,
-0.18564222753047943,
0.09261167794466019,
-0.13667823374271393,
-0.03464386612176895,
0.13306447863578796,
-0.1226949393749237,
0.329577773809433,
0.688351571559906,
-0.03921409323811531,
-0.05969693139195442,
-0.14571186900138855,
-0.12393562495708466,
-0.0320725217461586,
0.33028876781463623,
-0.41040587425231934,
0.07257305830717087,
-0.43423569202423096,
0.11060606688261032,
-0.38913092017173767,
-0.09910517930984497,
-0.3117385804653168,
-0.20336098968982697,
0.1456611156463623,
-0.18711884319782257,
-0.25437015295028687,
0.16125722229480743,
-0.41854462027549744,
0.03004556894302368,
0.034438252449035645,
-0.34715527296066284,
0.2622622847557068,
-0.14902321994304657,
-0.24924802780151367,
0.009294494986534119,
0.5586284399032593,
-0.19223178923130035,
0.10582564771175385,
-0.2513931691646576,
-0.5329142212867737,
-0.1111137643456459,
-0.0895785540342331,
0.09097817540168762,
-0.03539551794528961,
0.41358453035354614,
0.15469340980052948,
0.13614186644554138,
-0.12621884047985077,
-0.3215678632259369,
0.4165956974029541,
0.2949883043766022,
-0.4564020037651062,
0.15964430570602417,
0.10722246766090393,
0.1073913499712944,
0.021556299179792404,
-0.5161380171775818,
-0.17140032351016998,
-0.16749413311481476,
-0.16501908004283905,
-0.08791789412498474,
0.2805212140083313,
0.11180968582630157,
0.26030468940734863,
-0.05230942368507385,
-0.03025543875992298,
0.1816568821668625,
-0.25373345613479614,
-0.3335137367248535,
0.08313918113708496,
0.16481119394302368,
-0.45925039052963257,
-0.2662331461906433,
0.016783397644758224,
0.3185589611530304,
0.08579997718334198,
-0.5072774291038513,
-0.410443514585495,
-0.034017398953437805,
0.252566933631897,
-0.2506718337535858,
-0.15756449103355408,
0.3817373514175415,
0.11805801838636398,
-0.013918121345341206,
-0.19223347306251526,
-0.111442431807518,
0.2608034908771515,
0.03872714191675186,
0.49044761061668396,
-0.06901707500219345,
0.2183246612548828,
-0.0724043995141983,
0.5487789511680603,
0.414470911026001,
0.18996144831180573,
0.1289690136909485,
0.17429710924625397,
0.131181538105011,
-0.1097048744559288,
-0.24338217079639435,
-0.03392435237765312,
-0.0498681366443634,
0.1023889034986496,
0.13412314653396606,
-0.02639792487025261,
-0.42838841676712036,
-0.17110440135002136,
-0.1308763176202774,
-0.3874008059501648,
-0.2695454955101013,
0.2824651300907135,
-0.2963687777519226,
0.20419928431510925,
-0.097034752368927,
-0.038877084851264954,
-0.007951336912810802,
-0.03309357911348343,
0.03900082781910896,
0.3206688165664673,
-0.39025723934173584,
-0.16278745234012604,
-0.559734582901001,
-0.17996342480182648,
0.2908793091773987,
0.24375829100608826,
0.2799805998802185,
0.7132918238639832,
-0.07239238172769547,
-0.18538030982017517,
0.00011233985424041748,
-0.14907526969909668,
0.5359302759170532,
-0.5307053923606873,
0.005483776330947876,
0.16315603256225586,
-0.10355274379253387,
-0.37501928210258484,
-0.353519469499588,
-0.18246197700500488,
-0.02901163138449192,
0.21855561435222626,
0.48033198714256287,
-0.4618847668170929,
-0.08264674991369247,
0.035105857998132706,
0.2370242029428482,
-0.27263540029525757,
-0.20611345767974854,
-0.5603216290473938,
-0.2713738977909088,
-0.23774491250514984,
0.33954423666000366,
0.041547439992427826,
0.32003846764564514,
-0.07037544995546341,
0.0301273874938488,
0.14086230099201202,
-0.21691477298736572,
-0.1830894500017166,
-0.10634961724281311,
0.18420350551605225,
-0.019661739468574524,
0.3977416455745697,
-0.1985553652048111,
0.07127036154270172,
0.5020309090614319,
0.6129558682441711,
-0.2424185574054718,
-0.24817419052124023,
0.04087585210800171,
-0.21618668735027313,
0.3080114722251892,
0.07942868024110794,
-0.01483925525099039,
0.25884872674942017,
0.29525327682495117,
0.015213605016469955,
0.3290458023548126,
-0.1477966606616974,
0.32612520456314087,
0.27976521849632263,
-0.3284355103969574,
-0.36832332611083984,
-0.19644513726234436,
0.102216437458992,
-0.07672695815563202,
0.20661678910255432,
-0.15693673491477966,
-0.23598136007785797,
0.402052640914917,
0.17094022035598755,
0.7325440049171448,
0.25393587350845337,
0.036160748451948166,
-0.1250268518924713,
-0.0320117324590683,
-0.2727283239364624,
-0.18132738769054413,
0.0013610851019620895,
-0.3080989718437195,
-0.3899081349372864,
0.049746379256248474,
-0.15288065373897552,
0.30945608019828796,
-0.2042131870985031,
-0.19025278091430664,
0.2331157773733139,
-0.1882648766040802,
0.10785175859928131,
0.08877377212047577,
-0.13268442451953888,
-0.1568480134010315,
0.05233240872621536,
-0.04498458653688431,
0.058398157358169556,
0.015169546008110046,
-0.11231718957424164,
0.09056726098060608,
0.03912241384387016,
-0.34352320432662964,
-0.33975130319595337,
-0.3344677686691284,
0.14376115798950195,
-0.2575191855430603,
0.20493458211421967,
0.5204906463623047,
-0.1156710758805275,
0.10315251350402832,
0.5456973314285278,
0.23644587397575378,
0.20901241898536682,
-0.02050572820007801,
-0.04462067410349846,
0.2777346074581146,
0.16539615392684937,
0.014328057877719402,
-0.21902550756931305,
0.5253053903579712,
-0.29574155807495117,
-0.42284825444221497,
0.060114797204732895,
-0.19616620242595673,
-0.20877721905708313,
-0.23524677753448486,
0.09475746005773544,
-0.11502034962177277,
-0.17957372963428497,
-0.2386208474636078,
-0.20150110125541687,
0.2133086919784546,
-0.33019372820854187,
0.1535230576992035,
0.18788869678974152,
-0.28247278928756714,
0.38276708126068115,
0.24476788938045502,
-0.2894214987754822,
-0.08694368600845337,
0.5216753482818604,
0.4440710246562958,
0.0196746364235878,
0.5181102752685547,
-0.13554993271827698,
-0.16983884572982788,
-0.29406535625457764,
0.16083800792694092,
0.24995385110378265,
-0.18825110793113708,
-0.0712834969162941,
-0.10113585740327835,
-0.0009652227163314819,
-0.06973445415496826,
0.23615817725658417,
0.24084338545799255,
0.2069295048713684,
0.016620028764009476,
-0.6832229495048523,
-0.0035495078191161156,
0.07869850099086761,
0.08599346876144409,
0.05186872184276581,
-0.24049192667007446,
-0.16307878494262695,
-0.1820242702960968,
0.21816278994083405,
-0.28515204787254333,
-0.1236511841416359,
-0.5081221461296082,
0.1580752581357956,
-0.26914724707603455,
0.2652387022972107,
0.08659953624010086,
-0.004958398640155792,
0.1556730568408966,
-0.0928235799074173,
-0.13553662598133087,
-0.22080135345458984,
-0.23131921887397766,
0.14905677735805511,
0.15420478582382202,
0.1946098804473877,
-0.02610909193754196,
-0.2971850633621216,
0.01652837172150612,
0.04618892818689346,
-0.1692313253879547,
0.0876978412270546,
-0.037734441459178925,
0.4045088589191437,
0.38229116797447205,
0.01780567690730095,
0.22570376098155975,
0.07920435070991516,
-0.4030889868736267,
-0.16816560924053192,
0.0050278413109481335,
0.07331791520118713,
-0.048585012555122375,
-0.06400704383850098,
0.16443786025047302,
0.02037155255675316,
-0.10307474434375763,
0.24849191308021545,
0.04403131455183029,
-0.3354489803314209,
0.22090280055999756,
-0.04140394181013107,
0.06424811482429504,
0.43611130118370056,
-0.5393906235694885,
0.0008052140474319458,
0.28078150749206543,
0.17732523381710052,
-0.42065954208374023,
-0.3065328001976013,
0.41359832882881165,
-0.01770257204771042,
0.16015969216823578,
0.24835902452468872,
0.29407134652137756,
-0.32402706146240234,
0.49081212282180786,
-0.07545581459999084,
0.0014803654048591852,
-0.0370502769947052,
0.20006608963012695,
0.5482141971588135,
-0.11079315841197968,
0.07659249752759933,
0.12399013340473175,
-0.36252880096435547,
-0.05140174180269241,
-0.14104606211185455,
-0.11394426971673965,
0.4141942858695984,
0.04049842804670334,
0.15105220675468445,
-0.1591777801513672,
-0.2774756848812103,
0.49055707454681396,
-0.03746061027050018,
-0.17277568578720093,
-0.04083104431629181,
0.1516072005033493,
0.44382116198539734,
-0.0332331582903862,
0.10461292415857315,
-0.20447666943073273,
0.029551252722740173,
-0.1759091317653656,
-0.17107588052749634,
-0.3435629606246948,
-0.3253655731678009,
-0.0826009213924408,
0.10031828284263611,
0.04684598371386528,
0.13908220827579498,
0.25190192461013794,
0.08438654243946075,
-0.19560761749744415,
-0.07298290729522705,
-0.009121187031269073,
0.14703486859798431,
-0.03804939240217209,
-0.2674141526222229,
0.23993727564811707,
0.09475113451480865,
-0.031504929065704346,
-0.15168727934360504,
0.1568223088979721,
0.36633649468421936,
0.2979487478733063,
0.013520848006010056,
-0.2238997370004654,
0.17674845457077026,
0.22665216028690338,
0.08528898656368256,
0.6291882395744324,
0.1916208267211914,
-0.09152708947658539,
0.4346705973148346,
0.09528344124555588,
-0.20733344554901123,
0.13656899333000183,
0.07359840720891953,
0.055533405393362045,
0.06084955856204033,
0.24046248197555542,
-0.05467113107442856,
0.11650701612234116,
-0.04771880805492401,
0.1254807859659195,
-0.36385834217071533,
-0.07277821004390717,
0.27141252160072327,
0.1431996077299118,
0.2877497375011444,
0.042424459010362625,
0.08738041669130325,
0.17026710510253906,
0.6912105083465576,
0.10463662445545197,
-0.21447426080703735,
-0.24333888292312622,
-0.2582271099090576,
-0.5087728500366211,
0.3690849840641022,
-0.22408407926559448,
0.19929948449134827,
0.005746565293520689,
0.04561056196689606,
0.09429022669792175,
0.2856282591819763,
0.2570408582687378,
-0.0941816195845604,
-0.008127864450216293,
0.37863218784332275,
-0.5480489134788513,
-0.22402791678905487,
0.18239660561084747,
0.10030889511108398,
0.14243857562541962,
-0.3046860098838806,
-0.0021092183887958527,
0.28984686732292175,
0.056046031415462494,
-0.04063832759857178,
-0.2457708865404129,
0.018111780285835266,
0.21260786056518555,
-0.11222903430461884,
0.12759536504745483,
0.6521234512329102,
-0.050992682576179504,
0.026390286162495613,
0.17961585521697998,
-0.00036232080310583115,
-0.04536568000912666,
0.38844841718673706,
0.10636758804321289,
0.16407595574855804,
-0.061806268990039825,
-0.2997899353504181,
-0.1742662489414215,
0.3866216838359833,
0.06069786846637726,
-0.3607288897037506,
-0.16458198428153992,
0.020073087885975838,
0.35312387347221375,
-0.11520320922136307,
-0.18159618973731995,
0.09807123243808746,
0.01451415941119194,
0.22357742488384247,
-0.14959511160850525,
-0.35327768325805664,
0.42430901527404785,
0.008188779465854168,
-0.09922899305820465,
-0.143720343708992,
0.033206693828105927,
-0.31034258008003235,
0.007909538224339485,
-0.579617977142334,
0.04259314388036728,
0.4172549247741699,
0.1058715283870697,
-0.1304822415113449,
0.18765953183174133,
-0.3301571309566498,
0.24865494668483734,
0.07764427363872528,
0.1482696235179901,
-0.04010269045829773,
-0.14032909274101257,
0.0487133227288723,
-0.16712051630020142
] |
https://github.com/huggingface/datasets/issues/4852 | Bug in multilingual_with_para config of exams dataset and checksums error | Hi @thesofakillers, yes you are right: the fix will be available after next release (it was planned for today; Monday at the latest).
In the meantime, you can use the version of the `exams` on our main branch by passing `revision` to `load_dataset`:
```python
ds = load_dataset("exams", revision="main")
``` | ## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers | 49 | Bug in multilingual_with_para config of exams dataset and checksums error
## Describe the bug
There is a bug for "multilingual_with_para" config in exams dataset:
```python
ds = load_dataset("./datasets/exams", split="train")
```
raises:
```
KeyError: 'choices'
```
Moreover, there is a NonMatchingChecksumError:
```
NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/train_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/dev_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/multilingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/test_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_bg_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_hu_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_it_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_mk_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pl_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_pt_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sq_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_sr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_tr_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/train_vi_with_para.jsonl.tar.gz', 'https://github.com/mhardalov/exams-qa/raw/main/data/exams/cross-lingual/with_paragraphs/dev_vi_with_para.jsonl.tar.gz']
```
CC: @thesofakillers
Hi @thesofakillers, yes you are right: the fix will be available after next release (it was planned for today; Monday at the latest).
In the meantime, you can use the version of the `exams` on our main branch by passing `revision` to `load_dataset`:
```python
ds = load_dataset("exams", revision="main")
``` | [
-0.2889246940612793,
-0.04891008883714676,
-0.08580703288316727,
0.430634081363678,
0.19367215037345886,
-0.07232353836297989,
0.11616993695497513,
0.4211183786392212,
-0.13265259563922882,
0.20865973830223083,
0.19296199083328247,
0.3872624337673187,
0.12413590401411057,
-0.08251821994781494,
-0.21289996802806854,
-0.09971265494823456,
0.1547173410654068,
-0.3067677617073059,
-0.014719650149345398,
0.06906510889530182,
-0.4402295649051666,
0.2278546392917633,
-0.21662156283855438,
-0.15988832712173462,
0.13392318785190582,
0.06672144681215286,
-0.040370140224695206,
0.09083256125450134,
0.04031982272863388,
-0.17206694185733795,
0.2217913120985031,
-0.05626826360821724,
-0.1461198925971985,
0.48542308807373047,
-0.00011512571654748172,
0.17807039618492126,
0.28416067361831665,
-0.20220889151096344,
-0.18911822140216827,
-0.10432317852973938,
-0.34022122621536255,
-0.07324126362800598,
-0.1469397097826004,
-0.2920343577861786,
-0.07564583420753479,
0.10036907345056534,
-0.20535634458065033,
-0.4228822886943817,
-0.013672322034835815,
0.46140459179878235,
0.20128142833709717,
0.3209543824195862,
0.032586608082056046,
0.05278536304831505,
-0.07406554371118546,
-0.12408222258090973,
-0.17572133243083954,
-0.18899500370025635,
0.2327008694410324,
0.04482430964708328,
-0.01744721829891205,
0.19156506657600403,
-0.063198521733284,
-0.2513652741909027,
-0.24919167160987854,
-0.06336445361375809,
0.14954152703285217,
-0.24391937255859375,
0.31602317094802856,
0.3106659948825836,
0.0952068567276001,
-0.1615287959575653,
-0.24845874309539795,
-0.18904155492782593,
-0.08762117475271225,
0.1314583420753479,
0.48598942160606384,
0.27862414717674255,
-0.10169598460197449,
0.019966602325439453,
-0.061614472419023514,
0.060861993581056595,
-0.020783796906471252,
0.3074851334095001,
0.34324491024017334,
0.20284713804721832,
0.19014115631580353,
0.07902715355157852,
0.11226743459701538,
-0.14944712817668915,
0.17439714074134827,
-0.2217230647802353,
-0.25346940755844116,
0.19909889996051788,
-0.5081998705863953,
-0.04610079899430275,
-0.06487333029508591,
0.068498894572258,
0.36218923330307007,
0.16637663543224335,
0.13642285764217377,
0.19974738359451294,
-0.08861219137907028,
0.09966105222702026,
0.12672854959964752,
0.1371777206659317,
0.17302969098091125,
0.7321918606758118,
0.0929909199476242,
0.25430336594581604,
0.23117506504058838,
0.2705709934234619,
0.18069997429847717,
-0.38055098056793213,
0.36094656586647034,
0.2751587927341461,
-0.03657965734601021,
-0.26278096437454224,
-0.07030008733272552,
0.3551766872406006,
-0.12416180968284607,
-0.1540854126214981,
0.0937250629067421,
0.22088435292243958,
-0.2587679922580719,
0.2780771851539612,
-0.023384490981698036,
0.22075539827346802,
-0.22355851531028748,
0.10040180385112762,
-0.24521490931510925,
0.06329178810119629,
0.009061459451913834,
-0.0837467685341835,
-0.09877884387969971,
-0.03174001723527908,
0.34639599919319153,
0.1060962900519371,
0.14464151859283447,
-0.23568519949913025,
0.11131200194358826,
-0.1858721673488617,
-0.18267765641212463,
0.2952782213687897,
-0.018922988325357437,
-0.11477938294410706,
0.1360590159893036,
-0.19651852548122406,
-0.16334980726242065,
0.22748443484306335,
-0.43939971923828125,
-0.2398683726787567,
-0.07560985535383224,
0.1892712116241455,
-0.20520025491714478,
0.13104327023029327,
-0.21892830729484558,
0.04279850795865059,
0.5503324866294861,
-0.17144693434238434,
0.15978732705116272,
-0.42920196056365967,
-0.3377898633480072,
-0.28057268261909485,
0.010359099134802818,
0.08503738045692444,
-0.17024537920951843,
-0.14387118816375732,
0.31428447365760803,
-0.05693243816494942,
0.3000282347202301,
0.017090750858187675,
-0.2144712507724762,
-0.1681438386440277,
-0.17301660776138306,
0.2552188038825989,
0.21138662099838257,
-0.46891114115715027,
-0.4063766598701477,
0.05300135910511017,
0.12404155731201172,
0.22804950177669525,
0.2301434576511383,
-0.18207746744155884,
-0.2059646099805832,
0.07073064148426056,
0.3049963712692261,
0.22783628106117249,
0.17312990128993988,
0.2124926596879959,
-0.3648093044757843,
-0.1796494424343109,
-0.0799236074090004,
0.26053765416145325,
0.19128310680389404,
-0.2585929036140442,
0.10856421291828156,
-0.13874275982379913,
0.22831964492797852,
-0.10496747493743896,
0.039169445633888245,
0.3538582921028137,
0.24357058107852936,
-0.19882084429264069,
0.16031064093112946,
-0.25480324029922485,
-0.4412216544151306,
0.2805800139904022,
0.015309803187847137,
0.11622608453035355,
-0.13357841968536377,
-0.018538665026426315,
-0.04634340852499008,
-0.23090659081935883,
-0.3735906779766083,
0.05598592013120651,
0.0935760885477066,
0.14905008673667908,
0.03892658278346062,
0.20674946904182434,
-0.08433786034584045,
0.2885296940803528,
-0.20422714948654175,
-0.10404700040817261,
-0.39805009961128235,
0.2565862238407135,
-0.16279689967632294,
-0.13250240683555603,
-0.09550058841705322,
0.027260243892669678,
0.04467259347438812,
-0.10354450345039368,
-0.3081572651863098,
0.35836556553840637,
0.4663684666156769,
-0.1561264842748642,
0.006199408322572708,
0.22395342588424683,
-0.011236364021897316,
-0.026025395840406418,
-0.19413408637046814,
0.392218679189682,
0.037693873047828674,
-0.05082288756966591,
0.024546083062887192,
0.7444872856140137,
-0.13075804710388184,
0.2777775824069977,
0.11182437837123871,
-0.04196569323539734,
0.38709887862205505,
-0.1947573572397232,
-0.2152373045682907,
-0.19821542501449585,
0.40604984760284424,
-0.001963594928383827,
0.15972626209259033,
0.0772722065448761,
-0.4318917393684387,
-0.08492865413427353,
0.4195607304573059,
-0.007631892338395119,
0.028166014701128006,
-0.00985906645655632,
0.32373133301734924,
0.1275503933429718,
-0.11765968799591064,
0.3853660225868225,
0.6394978761672974,
0.04234915226697922,
-0.18564222753047943,
0.09261167794466019,
-0.13667823374271393,
-0.03464386612176895,
0.13306447863578796,
-0.1226949393749237,
0.329577773809433,
0.688351571559906,
-0.03921409323811531,
-0.05969693139195442,
-0.14571186900138855,
-0.12393562495708466,
-0.0320725217461586,
0.33028876781463623,
-0.41040587425231934,
0.07257305830717087,
-0.43423569202423096,
0.11060606688261032,
-0.38913092017173767,
-0.09910517930984497,
-0.3117385804653168,
-0.20336098968982697,
0.1456611156463623,
-0.18711884319782257,
-0.25437015295028687,
0.16125722229480743,
-0.41854462027549744,
0.03004556894302368,
0.034438252449035645,
-0.34715527296066284,
0.2622622847557068,
-0.14902321994304657,
-0.24924802780151367,
0.009294494986534119,
0.5586284399032593,
-0.19223178923130035,
0.10582564771175385,
-0.2513931691646576,
-0.5329142212867737,
-0.1111137643456459,
-0.0895785540342331,
0.09097817540168762,
-0.03539551794528961,
0.41358453035354614,
0.15469340980052948,
0.13614186644554138,
-0.12621884047985077,
-0.3215678632259369,
0.4165956974029541,
0.2949883043766022,
-0.4564020037651062,
0.15964430570602417,
0.10722246766090393,
0.1073913499712944,
0.021556299179792404,
-0.5161380171775818,
-0.17140032351016998,
-0.16749413311481476,
-0.16501908004283905,
-0.08791789412498474,
0.2805212140083313,
0.11180968582630157,
0.26030468940734863,
-0.05230942368507385,
-0.03025543875992298,
0.1816568821668625,
-0.25373345613479614,
-0.3335137367248535,
0.08313918113708496,
0.16481119394302368,
-0.45925039052963257,
-0.2662331461906433,
0.016783397644758224,
0.3185589611530304,
0.08579997718334198,
-0.5072774291038513,
-0.410443514585495,
-0.034017398953437805,
0.252566933631897,
-0.2506718337535858,
-0.15756449103355408,
0.3817373514175415,
0.11805801838636398,
-0.013918121345341206,
-0.19223347306251526,
-0.111442431807518,
0.2608034908771515,
0.03872714191675186,
0.49044761061668396,
-0.06901707500219345,
0.2183246612548828,
-0.0724043995141983,
0.5487789511680603,
0.414470911026001,
0.18996144831180573,
0.1289690136909485,
0.17429710924625397,
0.131181538105011,
-0.1097048744559288,
-0.24338217079639435,
-0.03392435237765312,
-0.0498681366443634,
0.1023889034986496,
0.13412314653396606,
-0.02639792487025261,
-0.42838841676712036,
-0.17110440135002136,
-0.1308763176202774,
-0.3874008059501648,
-0.2695454955101013,
0.2824651300907135,
-0.2963687777519226,
0.20419928431510925,
-0.097034752368927,
-0.038877084851264954,
-0.007951336912810802,
-0.03309357911348343,
0.03900082781910896,
0.3206688165664673,
-0.39025723934173584,
-0.16278745234012604,
-0.559734582901001,
-0.17996342480182648,
0.2908793091773987,
0.24375829100608826,
0.2799805998802185,
0.7132918238639832,
-0.07239238172769547,
-0.18538030982017517,
0.00011233985424041748,
-0.14907526969909668,
0.5359302759170532,
-0.5307053923606873,
0.005483776330947876,
0.16315603256225586,
-0.10355274379253387,
-0.37501928210258484,
-0.353519469499588,
-0.18246197700500488,
-0.02901163138449192,
0.21855561435222626,
0.48033198714256287,
-0.4618847668170929,
-0.08264674991369247,
0.035105857998132706,
0.2370242029428482,
-0.27263540029525757,
-0.20611345767974854,
-0.5603216290473938,
-0.2713738977909088,
-0.23774491250514984,
0.33954423666000366,
0.041547439992427826,
0.32003846764564514,
-0.07037544995546341,
0.0301273874938488,
0.14086230099201202,
-0.21691477298736572,
-0.1830894500017166,
-0.10634961724281311,
0.18420350551605225,
-0.019661739468574524,
0.3977416455745697,
-0.1985553652048111,
0.07127036154270172,
0.5020309090614319,
0.6129558682441711,
-0.2424185574054718,
-0.24817419052124023,
0.04087585210800171,
-0.21618668735027313,
0.3080114722251892,
0.07942868024110794,
-0.01483925525099039,
0.25884872674942017,
0.29525327682495117,
0.015213605016469955,
0.3290458023548126,
-0.1477966606616974,
0.32612520456314087,
0.27976521849632263,
-0.3284355103969574,
-0.36832332611083984,
-0.19644513726234436,
0.102216437458992,
-0.07672695815563202,
0.20661678910255432,
-0.15693673491477966,
-0.23598136007785797,
0.402052640914917,
0.17094022035598755,
0.7325440049171448,
0.25393587350845337,
0.036160748451948166,
-0.1250268518924713,
-0.0320117324590683,
-0.2727283239364624,
-0.18132738769054413,
0.0013610851019620895,
-0.3080989718437195,
-0.3899081349372864,
0.049746379256248474,
-0.15288065373897552,
0.30945608019828796,
-0.2042131870985031,
-0.19025278091430664,
0.2331157773733139,
-0.1882648766040802,
0.10785175859928131,
0.08877377212047577,
-0.13268442451953888,
-0.1568480134010315,
0.05233240872621536,
-0.04498458653688431,
0.058398157358169556,
0.015169546008110046,
-0.11231718957424164,
0.09056726098060608,
0.03912241384387016,
-0.34352320432662964,
-0.33975130319595337,
-0.3344677686691284,
0.14376115798950195,
-0.2575191855430603,
0.20493458211421967,
0.5204906463623047,
-0.1156710758805275,
0.10315251350402832,
0.5456973314285278,
0.23644587397575378,
0.20901241898536682,
-0.02050572820007801,
-0.04462067410349846,
0.2777346074581146,
0.16539615392684937,
0.014328057877719402,
-0.21902550756931305,
0.5253053903579712,
-0.29574155807495117,
-0.42284825444221497,
0.060114797204732895,
-0.19616620242595673,
-0.20877721905708313,
-0.23524677753448486,
0.09475746005773544,
-0.11502034962177277,
-0.17957372963428497,
-0.2386208474636078,
-0.20150110125541687,
0.2133086919784546,
-0.33019372820854187,
0.1535230576992035,
0.18788869678974152,
-0.28247278928756714,
0.38276708126068115,
0.24476788938045502,
-0.2894214987754822,
-0.08694368600845337,
0.5216753482818604,
0.4440710246562958,
0.0196746364235878,
0.5181102752685547,
-0.13554993271827698,
-0.16983884572982788,
-0.29406535625457764,
0.16083800792694092,
0.24995385110378265,
-0.18825110793113708,
-0.0712834969162941,
-0.10113585740327835,
-0.0009652227163314819,
-0.06973445415496826,
0.23615817725658417,
0.24084338545799255,
0.2069295048713684,
0.016620028764009476,
-0.6832229495048523,
-0.0035495078191161156,
0.07869850099086761,
0.08599346876144409,
0.05186872184276581,
-0.24049192667007446,
-0.16307878494262695,
-0.1820242702960968,
0.21816278994083405,
-0.28515204787254333,
-0.1236511841416359,
-0.5081221461296082,
0.1580752581357956,
-0.26914724707603455,
0.2652387022972107,
0.08659953624010086,
-0.004958398640155792,
0.1556730568408966,
-0.0928235799074173,
-0.13553662598133087,
-0.22080135345458984,
-0.23131921887397766,
0.14905677735805511,
0.15420478582382202,
0.1946098804473877,
-0.02610909193754196,
-0.2971850633621216,
0.01652837172150612,
0.04618892818689346,
-0.1692313253879547,
0.0876978412270546,
-0.037734441459178925,
0.4045088589191437,
0.38229116797447205,
0.01780567690730095,
0.22570376098155975,
0.07920435070991516,
-0.4030889868736267,
-0.16816560924053192,
0.0050278413109481335,
0.07331791520118713,
-0.048585012555122375,
-0.06400704383850098,
0.16443786025047302,
0.02037155255675316,
-0.10307474434375763,
0.24849191308021545,
0.04403131455183029,
-0.3354489803314209,
0.22090280055999756,
-0.04140394181013107,
0.06424811482429504,
0.43611130118370056,
-0.5393906235694885,
0.0008052140474319458,
0.28078150749206543,
0.17732523381710052,
-0.42065954208374023,
-0.3065328001976013,
0.41359832882881165,
-0.01770257204771042,
0.16015969216823578,
0.24835902452468872,
0.29407134652137756,
-0.32402706146240234,
0.49081212282180786,
-0.07545581459999084,
0.0014803654048591852,
-0.0370502769947052,
0.20006608963012695,
0.5482141971588135,
-0.11079315841197968,
0.07659249752759933,
0.12399013340473175,
-0.36252880096435547,
-0.05140174180269241,
-0.14104606211185455,
-0.11394426971673965,
0.4141942858695984,
0.04049842804670334,
0.15105220675468445,
-0.1591777801513672,
-0.2774756848812103,
0.49055707454681396,
-0.03746061027050018,
-0.17277568578720093,
-0.04083104431629181,
0.1516072005033493,
0.44382116198539734,
-0.0332331582903862,
0.10461292415857315,
-0.20447666943073273,
0.029551252722740173,
-0.1759091317653656,
-0.17107588052749634,
-0.3435629606246948,
-0.3253655731678009,
-0.0826009213924408,
0.10031828284263611,
0.04684598371386528,
0.13908220827579498,
0.25190192461013794,
0.08438654243946075,
-0.19560761749744415,
-0.07298290729522705,
-0.009121187031269073,
0.14703486859798431,
-0.03804939240217209,
-0.2674141526222229,
0.23993727564811707,
0.09475113451480865,
-0.031504929065704346,
-0.15168727934360504,
0.1568223088979721,
0.36633649468421936,
0.2979487478733063,
0.013520848006010056,
-0.2238997370004654,
0.17674845457077026,
0.22665216028690338,
0.08528898656368256,
0.6291882395744324,
0.1916208267211914,
-0.09152708947658539,
0.4346705973148346,
0.09528344124555588,
-0.20733344554901123,
0.13656899333000183,
0.07359840720891953,
0.055533405393362045,
0.06084955856204033,
0.24046248197555542,
-0.05467113107442856,
0.11650701612234116,
-0.04771880805492401,
0.1254807859659195,
-0.36385834217071533,
-0.07277821004390717,
0.27141252160072327,
0.1431996077299118,
0.2877497375011444,
0.042424459010362625,
0.08738041669130325,
0.17026710510253906,
0.6912105083465576,
0.10463662445545197,
-0.21447426080703735,
-0.24333888292312622,
-0.2582271099090576,
-0.5087728500366211,
0.3690849840641022,
-0.22408407926559448,
0.19929948449134827,
0.005746565293520689,
0.04561056196689606,
0.09429022669792175,
0.2856282591819763,
0.2570408582687378,
-0.0941816195845604,
-0.008127864450216293,
0.37863218784332275,
-0.5480489134788513,
-0.22402791678905487,
0.18239660561084747,
0.10030889511108398,
0.14243857562541962,
-0.3046860098838806,
-0.0021092183887958527,
0.28984686732292175,
0.056046031415462494,
-0.04063832759857178,
-0.2457708865404129,
0.018111780285835266,
0.21260786056518555,
-0.11222903430461884,
0.12759536504745483,
0.6521234512329102,
-0.050992682576179504,
0.026390286162495613,
0.17961585521697998,
-0.00036232080310583115,
-0.04536568000912666,
0.38844841718673706,
0.10636758804321289,
0.16407595574855804,
-0.061806268990039825,
-0.2997899353504181,
-0.1742662489414215,
0.3866216838359833,
0.06069786846637726,
-0.3607288897037506,
-0.16458198428153992,
0.020073087885975838,
0.35312387347221375,
-0.11520320922136307,
-0.18159618973731995,
0.09807123243808746,
0.01451415941119194,
0.22357742488384247,
-0.14959511160850525,
-0.35327768325805664,
0.42430901527404785,
0.008188779465854168,
-0.09922899305820465,
-0.143720343708992,
0.033206693828105927,
-0.31034258008003235,
0.007909538224339485,
-0.579617977142334,
0.04259314388036728,
0.4172549247741699,
0.1058715283870697,
-0.1304822415113449,
0.18765953183174133,
-0.3301571309566498,
0.24865494668483734,
0.07764427363872528,
0.1482696235179901,
-0.04010269045829773,
-0.14032909274101257,
0.0487133227288723,
-0.16712051630020142
] |
https://github.com/huggingface/datasets/issues/4840 | Dataset Viewer issue for darragh/demo_data_raw3 | do you have an idea of why it can occur @huggingface/datasets? The dataset consists of a single parquet file. | ### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No | 19 | Dataset Viewer issue for darragh/demo_data_raw3
### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No
do you have an idea of why it can occur @huggingface/datasets? The dataset consists of a single parquet file. | [
-0.35398557782173157,
-0.20391644537448883,
0.024462096393108368,
0.40717417001724243,
0.14356133341789246,
0.09458959847688675,
0.21502617001533508,
0.3621065020561218,
-0.18674451112747192,
0.11043444275856018,
-0.019130919128656387,
0.56197589635849,
-0.29584264755249023,
0.11778751760721207,
-0.037920042872428894,
-0.33071768283843994,
0.2174132913351059,
0.2772083878517151,
0.08946900069713593,
0.010059967637062073,
-0.11733685433864594,
-0.026835972443223,
-0.2209634929895401,
0.13374421000480652,
0.0669393390417099,
-0.041156522929668427,
-0.1156647801399231,
0.00908217579126358,
-0.3235589563846588,
-0.5615828037261963,
0.31459489464759827,
-0.1282951533794403,
0.38348719477653503,
0.4725242853164673,
-0.00011364548845449463,
0.2106221467256546,
0.4296293258666992,
0.0726986899971962,
-0.26468583941459656,
-0.15266089141368866,
0.17111650109291077,
-0.012382976710796356,
0.4863245189189911,
-0.20736977458000183,
-0.14494749903678894,
-0.6552938222885132,
0.035469427704811096,
-0.09960512816905975,
0.30403298139572144,
0.3366110920906067,
0.20523269474506378,
0.2795812785625458,
0.14411069452762604,
-0.20354986190795898,
0.5926012396812439,
0.3083805441856384,
-0.0638737604022026,
0.5013716220855713,
0.20360863208770752,
0.37502726912498474,
-0.1256207823753357,
0.17469429969787598,
0.05880017578601837,
0.1563357412815094,
0.2062668800354004,
-0.010211511515080929,
0.007440708577632904,
-0.1979878544807434,
0.18726620078086853,
0.22208434343338013,
0.49234357476234436,
-0.37167516350746155,
-0.08215581625699997,
-0.015539038926362991,
0.05360762029886246,
-0.2660648822784424,
0.044554486870765686,
0.17420171201229095,
-0.02271820604801178,
0.173031285405159,
-0.06772288680076599,
-0.17435361444950104,
-0.3557487726211548,
0.08258397877216339,
-0.28435957431793213,
0.15005534887313843,
-0.187591090798378,
0.22026219964027405,
0.09446898102760315,
-0.16204777359962463,
0.5086382627487183,
0.05380869284272194,
-0.3109733760356903,
-0.24486108124256134,
-0.2816867232322693,
-0.048155635595321655,
-0.041974395513534546,
-0.1429949402809143,
0.07731882482767105,
0.1411515772342682,
-0.21354269981384277,
0.23471948504447937,
0.3172546923160553,
0.16678762435913086,
0.2180958390235901,
-0.16230374574661255,
0.12450556457042694,
0.4086337089538574,
0.15357372164726257,
0.031460314989089966,
0.20843514800071716,
0.005225431174039841,
-0.3492846190929413,
-0.17744548618793488,
-0.16618359088897705,
-0.3612669110298157,
0.43154823780059814,
-0.10731208324432373,
-0.2686229944229126,
0.04820956289768219,
-0.21510320901870728,
0.11662894487380981,
-0.060554806143045425,
0.5458500385284424,
0.1179036796092987,
-0.2680932581424713,
-0.1045352965593338,
0.39912229776382446,
-0.005036761052906513,
-0.2707044184207916,
-0.15087471902370453,
0.00793908629566431,
-0.12407799065113068,
-0.31537413597106934,
-0.09803038835525513,
-0.24137812852859497,
-0.11204402148723602,
0.10023946315050125,
-0.04474726319313049,
0.07985329627990723,
0.0670432597398758,
-0.12137427926063538,
-0.015726611018180847,
0.22400490939617157,
0.036981645971536636,
-0.022754983976483345,
0.29988640546798706,
-0.24627281725406647,
-0.10341069102287292,
0.10428448021411896,
-0.13721555471420288,
-0.024571724236011505,
-0.6351284980773926,
0.19807782769203186,
-0.12994566559791565,
-0.04161331057548523,
-0.5100188255310059,
0.11363404989242554,
-0.24339190125465393,
-0.269559770822525,
-0.11391880363225937,
-0.32929277420043945,
0.145575612783432,
-0.24374432861804962,
0.2186635136604309,
0.17590895295143127,
-0.41203734278678894,
0.14003628492355347,
-0.3599837124347687,
-0.3302769362926483,
0.14148405194282532,
0.2983587384223938,
-0.29809170961380005,
-0.0781051442027092,
-0.3862614929676056,
0.09443007409572601,
0.6377676725387573,
-0.26939448714256287,
-0.3561667501926422,
0.24372337758541107,
-0.09931506216526031,
-0.0006730444729328156,
0.09821610152721405,
-0.159395232796669,
0.4289875626564026,
0.013270199298858643,
-0.06096838414669037,
-0.13790598511695862,
0.09070093184709549,
-0.06217461824417114,
-0.2038421332836151,
-0.12210783362388611,
0.15944606065750122,
0.16496238112449646,
0.13746538758277893,
-0.22321438789367676,
0.24440798163414001,
-0.6272785067558289,
0.25556880235671997,
-0.14457263052463531,
0.030715884640812874,
0.023308441042900085,
0.3595500886440277,
0.23140226304531097,
0.08759823441505432,
-0.29061397910118103,
-0.4695451855659485,
0.036979369819164276,
-0.06475797295570374,
-0.12497006356716156,
-0.1882571429014206,
-0.3053025007247925,
-0.2765345871448517,
0.12473016232252121,
-0.31902748346328735,
-0.11137281358242035,
0.21063120663166046,
0.04036401957273483,
-0.17044076323509216,
0.1716063767671585,
-0.05103117227554321,
-0.4171864092350006,
0.027994951233267784,
0.17310553789138794,
0.07922843098640442,
0.5128872394561768,
-0.17738933861255646,
-0.20556998252868652,
0.09868206083774567,
-0.10218507796525955,
0.17917415499687195,
-0.21902590990066528,
-0.06580650061368942,
0.2804371118545532,
0.252494215965271,
0.11082876473665237,
0.2588278353214264,
-0.24403198063373566,
0.09292487800121307,
-0.627184271812439,
0.023799272254109383,
0.12749135494232178,
0.10138404369354248,
0.10070561617612839,
-0.2943998873233795,
0.02761179953813553,
0.408343642950058,
0.11133814603090286,
-0.08123999834060669,
0.17902398109436035,
0.21141210198402405,
0.17988558113574982,
0.13441386818885803,
-0.10809007287025452,
0.010519593954086304,
0.2331623136997223,
0.18677246570587158,
0.10414411872625351,
-0.3534218966960907,
0.001523442566394806,
0.2121160626411438,
0.050994206219911575,
0.0867050290107727,
0.29412969946861267,
-0.4918704032897949,
-0.11136766523122787,
0.26785463094711304,
0.35134100914001465,
0.10116378217935562,
0.27243131399154663,
0.17126426100730896,
0.183332622051239,
-0.006718597374856472,
-0.12416557222604752,
0.08349855989217758,
0.18071816861629486,
0.34381434321403503,
0.14502260088920593,
0.15591713786125183,
0.05602957680821419,
-0.263936311006546,
-0.05483441427350044,
0.05836538225412369,
0.3060353100299835,
-0.3149782419204712,
0.08846075087785721,
-0.3993648886680603,
-0.2103392779827118,
-0.114515021443367,
-0.030393891036510468,
-0.1801208108663559,
-0.1420266032218933,
-0.028712596744298935,
0.065956249833107,
-0.14863502979278564,
0.21910862624645233,
0.023496534675359726,
0.025879189372062683,
0.017152464017271996,
0.028310390189290047,
-0.1946132630109787,
-0.3846260905265808,
-0.5149696469306946,
0.043830882757902145,
0.3574642241001129,
0.06209463253617287,
0.33668363094329834,
-0.18664482235908508,
0.2050168663263321,
-0.7806691527366638,
-0.3491104543209076,
0.03789195418357849,
-0.11477537453174591,
0.3763318359851837,
0.3664662539958954,
0.059449613094329834,
-0.23841139674186707,
-0.1759275496006012,
0.193887397646904,
0.021855106577277184,
-0.1454039365053177,
0.15422029793262482,
-0.0196786280721426,
-0.04342932254076004,
0.08294960856437683,
-0.1548968255519867,
-0.27838847041130066,
-0.4165700376033783,
0.18851543962955475,
-0.10110771656036377,
0.028554432094097137,
-0.18930767476558685,
0.09981556981801987,
0.179348424077034,
-0.18834878504276276,
-0.00813494622707367,
-0.11489197611808777,
0.07736721634864807,
0.15463818609714508,
-0.260855495929718,
-0.4350815415382385,
0.3023013174533844,
-0.08279469609260559,
0.04096341133117676,
0.2719522714614868,
-0.4023134708404541,
0.08002740889787674,
-0.05397455394268036,
0.0861264169216156,
-0.06066438555717468,
-0.2252248078584671,
0.36834457516670227,
0.035429272800683975,
-0.00860055536031723,
-0.1334429830312729,
-0.16151151061058044,
0.15678049623966217,
-0.30584850907325745,
0.1450507938861847,
-0.031866494566202164,
0.45488959550857544,
0.05604105815291405,
0.5367851257324219,
0.21610873937606812,
-0.24613480269908905,
0.3003808259963989,
-0.40332114696502686,
0.5266162753105164,
0.029566798359155655,
-0.09855280816555023,
-0.005330745130777359,
-0.051806241273880005,
-0.010727888904511929,
0.33856621384620667,
-0.18349510431289673,
-0.2678133547306061,
-0.10692663490772247,
-0.31979626417160034,
-0.19435805082321167,
-0.2591343820095062,
-0.11531095206737518,
-0.13788601756095886,
0.07905983924865723,
-0.1554284691810608,
0.18841436505317688,
0.08484050631523132,
-0.04255739971995354,
0.09212075173854828,
0.3397379517555237,
-0.10606341809034348,
0.05196089670062065,
-0.1730474978685379,
0.1259951889514923,
0.025324668735265732,
0.47197800874710083,
0.05500134453177452,
0.3622722327709198,
-0.09696033596992493,
-0.07834967970848083,
0.3279476761817932,
-0.02690870501101017,
0.7620782256126404,
-0.04348016530275345,
0.01940462365746498,
0.09691408276557922,
0.1300804764032364,
-0.39687514305114746,
-0.1463480442762375,
-0.13868556916713715,
0.16523757576942444,
0.03775418549776077,
0.5183079242706299,
-0.3424632251262665,
-0.04608934745192528,
0.3745482861995697,
-0.024467404931783676,
-0.02019474282860756,
-0.15901190042495728,
-0.22325053811073303,
-0.16903817653656006,
-0.06862352788448334,
-0.0736384466290474,
0.11981626600027084,
0.05044684559106827,
0.06503396481275558,
-0.08220204710960388,
-0.3576505482196808,
-0.13733425736427307,
-0.08443963527679443,
0.26221928000450134,
0.47993600368499756,
-0.1752876490354538,
0.09541991353034973,
0.09903541952371597,
0.3898566961288452,
0.8236055970191956,
0.5059017539024353,
-0.07101525366306305,
-0.8327760100364685,
0.18151938915252686,
-0.024902962148189545,
0.44437259435653687,
0.0161592960357666,
-0.11915728449821472,
0.1303698718547821,
-0.05038575828075409,
0.06932640820741653,
-0.12228483706712723,
0.1613064706325531,
0.5781219005584717,
-0.2376687079668045,
-0.4677588641643524,
-0.09750127047300339,
0.5180134773254395,
0.08195739984512329,
-0.04035739600658417,
0.1641443371772766,
0.42332524061203003,
0.005117038264870644,
0.2537037134170532,
0.11751458793878555,
0.8456377387046814,
-0.11008565127849579,
0.08715391159057617,
0.5279055833816528,
-0.7078197598457336,
0.338594526052475,
0.22915323078632355,
0.0474063977599144,
-0.5259461998939514,
-0.31566596031188965,
-0.026102187111973763,
-0.20061512291431427,
0.31752318143844604,
-0.11734229326248169,
-0.21059653162956238,
-0.08788147568702698,
-0.07714196294546127,
0.1352270543575287,
0.034200794994831085,
0.25558149814605713,
-0.10263306647539139,
0.26623326539993286,
-0.058656878769397736,
0.13558052480220795,
-0.2689008116722107,
-0.09053492546081543,
-0.07058535516262054,
-0.2415618747472763,
-0.19280658662319183,
-0.09754621982574463,
-0.43310314416885376,
0.09896213561296463,
0.005512081552296877,
-0.02859240397810936,
0.037566736340522766,
-0.7001129388809204,
0.37472885847091675,
0.03341794013977051,
-0.2637770175933838,
0.04550306499004364,
-0.29631757736206055,
0.3539324998855591,
0.04997635632753372,
-0.11539003252983093,
0.04753619804978371,
-0.05881485342979431,
0.2328239232301712,
-0.06067854166030884,
-0.11228484660387039,
0.31846609711647034,
0.0024811476469039917,
-0.08229395747184753,
-0.06872425228357315,
0.08137386292219162,
0.15607786178588867,
-0.33664610981941223,
0.041250381618738174,
-0.5416633486747742,
-0.039632607251405716,
-0.16255778074264526,
0.11179910600185394,
-0.10567034780979156,
-0.01485313381999731,
-0.16801142692565918,
0.06250865757465363,
-0.24048039317131042,
0.04172518104314804,
0.27641645073890686,
-0.11543457955121994,
0.08382690697908401,
0.38223952054977417,
0.25311145186424255,
-0.32143276929855347,
-0.1942633092403412,
0.12387815862894058,
0.19745925068855286,
-0.3319358229637146,
0.1907985508441925,
0.03594205528497696,
0.22965247929096222,
0.10782217979431152,
0.11091092228889465,
0.20347964763641357,
-0.32072916626930237,
-0.1518498659133911,
-0.19397485256195068,
-0.13041071593761444,
0.12613171339035034,
-0.4024224579334259,
0.31856662034988403,
0.3044026792049408,
-0.021312139928340912,
0.11949515342712402,
-0.23086905479431152,
-0.28227734565734863,
0.22298875451087952,
0.006063846871256828,
0.008002128452062607,
-0.24013206362724304,
-0.013203456997871399,
0.04167678952217102,
-0.0435059629380703,
0.11903779208660126,
-0.04487960785627365,
-0.22494329512119293,
-0.16706997156143188,
0.09236715734004974,
0.0927371084690094,
0.010336318984627724,
-0.026787569746375084,
-0.07539673894643784,
-0.1369258314371109,
-0.20662905275821686,
0.08412232249975204,
0.09252147376537323,
-0.07013258337974548,
-0.12973709404468536,
-0.0026723239570856094,
0.3864406645298004,
-0.11292418092489243,
-0.12398018687963486,
0.11627573519945145,
-0.030951328575611115,
0.20002049207687378,
-0.2619370222091675,
0.017044011503458023,
-0.17755341529846191,
-0.10067424178123474,
0.012711885385215282,
0.10917909443378448,
0.30249062180519104,
-0.12305713444948196,
0.40182918310165405,
-0.320773720741272,
0.00025712326169013977,
0.04455797001719475,
0.5020383596420288,
0.525709867477417,
-0.23168525099754333,
-0.10842948406934738,
0.5662049055099487,
0.15109097957611084,
-0.4362790882587433,
0.06560466438531876,
0.14031656086444855,
-0.06112845242023468,
0.003557339310646057,
-0.014088310301303864,
-0.038512520492076874,
0.17214542627334595,
-0.17246080935001373,
0.21497410535812378,
0.5780750513076782,
0.06455109268426895,
0.24308736622333527,
0.3810614347457886,
-0.1939210742712021,
-0.01778595522046089,
0.2926373779773712,
0.269761860370636,
0.2754250466823578,
0.31608879566192627,
-0.18681642413139343,
0.11415062099695206,
-0.0728725865483284,
-0.04819590970873833,
0.2677097022533417,
-0.33772751688957214,
0.007183801382780075,
0.14155951142311096,
0.11875925958156586,
-0.13428136706352234,
0.2559065818786621,
0.37802329659461975,
0.18134596943855286,
-0.13909929990768433,
-0.23079946637153625,
0.23624302446842194,
-0.05312240868806839,
0.25750109553337097,
0.09380726516246796,
-0.12747009098529816,
-0.17506451904773712,
-0.011550236493349075,
-0.17822951078414917,
-0.03987661004066467,
-0.15548700094223022,
0.159550279378891,
-0.08189690113067627,
-0.2670823633670807,
0.08841980993747711,
0.08604855835437775,
0.08724736422300339,
-0.17835335433483124,
0.2754570543766022,
0.17086923122406006,
-0.11221788823604584,
0.19259504973888397,
0.29121625423431396,
0.4121069610118866,
0.2763679623603821,
-0.2255280762910843,
-0.3313428461551666,
-0.13638216257095337,
-0.09668035805225372,
0.04560261219739914,
-0.013441912829875946,
0.18353745341300964,
0.25459641218185425,
0.3114648163318634,
0.17142708599567413,
-0.08530265092849731,
0.17795029282569885,
0.05275588855147362,
0.03668249770998955,
-0.32632705569267273,
0.06596249341964722,
-0.3317272961139679,
-0.165333092212677,
-0.06281458586454391,
-0.3399190306663513,
-0.5041068196296692,
-0.09221533685922623,
0.3553631901741028,
0.030657969415187836,
0.06484038382768631,
-0.18387089669704437,
0.07601447403430939,
0.219275563955307,
0.5057064890861511,
0.32837197184562683,
0.27405568957328796,
-0.10849638283252716,
-0.32635748386383057,
-0.5642266273498535,
0.3037218749523163,
-0.14763469994068146,
-0.35636889934539795,
0.39123523235321045,
-0.07963423430919647,
0.11355137825012207,
0.09093958139419556,
0.254209965467453,
0.4400906562805176,
-0.10313738882541656,
0.27038195729255676,
-0.180353581905365,
0.029407817870378494,
0.10742391645908356,
-0.26120418310165405,
0.0038852617144584656,
-0.19168290495872498,
0.38863813877105713,
-0.03143656253814697,
0.03713768720626831,
-0.0777982696890831,
0.17105820775032043,
-0.010725274682044983,
-0.39297914505004883,
0.3835535943508148,
-0.03425942361354828,
0.4647081196308136,
0.08707582205533981,
0.15510745346546173,
-0.10255320370197296,
-0.09243938326835632,
-0.2948295772075653,
0.46974295377731323,
0.09485214948654175,
0.057005301117897034,
-0.17444027960300446,
-0.19213847815990448,
-0.11379716545343399,
0.06440341472625732,
0.03565424680709839,
0.16751068830490112,
-0.3219403624534607,
0.24634692072868347,
-0.20801353454589844,
-0.128990039229393,
0.20593871176242828,
-0.02199321985244751,
0.04326940327882767,
0.04641278088092804,
-0.26815611124038696,
-0.40156760811805725,
0.4843543469905853,
-0.5115644931793213,
-0.23760434985160828,
0.03160547837615013,
0.03566814959049225,
0.31191229820251465,
-0.13074222207069397,
-0.31309717893600464,
-0.0257977694272995,
0.49071744084358215,
0.06158342584967613,
0.19751004874706268,
0.047162219882011414,
0.040122076869010925,
-0.012825850397348404,
-0.06306362897157669,
0.5054775476455688,
-0.029726140201091766,
-0.11362667381763458,
-0.05378057807683945,
-0.2616208791732788
] |
https://github.com/huggingface/datasets/issues/4840 | Dataset Viewer issue for darragh/demo_data_raw3 | Thanks for reporting @severo.
I'm not able to reproduce that error. I get instead:
```
FileNotFoundError: [Errno 2] No such file or directory: 'orix/data/ChiSig/唐合乐-9-3.jpg'
```
Which pyarrow version are you using? Mine is 6.0.1. | ### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No | 34 | Dataset Viewer issue for darragh/demo_data_raw3
### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No
Thanks for reporting @severo.
I'm not able to reproduce that error. I get instead:
```
FileNotFoundError: [Errno 2] No such file or directory: 'orix/data/ChiSig/唐合乐-9-3.jpg'
```
Which pyarrow version are you using? Mine is 6.0.1. | [
-0.33789145946502686,
0.07463118433952332,
0.03789704665541649,
0.32135605812072754,
0.09047198295593262,
0.023588411509990692,
0.2501470148563385,
0.4774776101112366,
-0.4221305549144745,
0.08033768087625504,
-0.10341911762952805,
0.5430614948272705,
-0.2949056327342987,
-0.04329200088977814,
-0.07259340584278107,
-0.2684590816497803,
0.14774107933044434,
0.3360552489757538,
0.07737573981285095,
-0.05418636277318001,
-0.10900837928056717,
-0.10002057254314423,
-0.20811554789543152,
0.14262445271015167,
-0.03283935412764549,
0.01128591038286686,
-0.13124558329582214,
0.0888896957039833,
-0.4099341928958893,
-0.48346948623657227,
0.2269333153963089,
-0.026983927935361862,
0.4676765203475952,
0.6078506112098694,
-0.00011881034151883796,
0.11324308812618256,
0.3966102600097656,
0.05125076323747635,
-0.2402447611093521,
-0.18535934388637543,
0.11609215289354324,
-0.03628776594996452,
0.26955968141555786,
-0.15243446826934814,
0.017047513276338577,
-0.7917477488517761,
0.15112636983394623,
0.28834447264671326,
0.2387058585882187,
0.2926062345504761,
0.12428286671638489,
0.19304999709129333,
0.21305005252361298,
-0.0688454732298851,
0.624042272567749,
0.4595955014228821,
-0.07150540500879288,
0.6283948421478271,
0.21005159616470337,
0.20601798593997955,
-0.2712646424770355,
0.18138791620731354,
-0.018702831119298935,
0.3095848858356476,
0.2044084668159485,
0.09170708805322647,
-0.06840325146913528,
-0.21109041571617126,
0.07362619042396545,
0.3912547528743744,
0.5242841243743896,
-0.30572643876075745,
-0.20644420385360718,
0.043757982552051544,
0.10148890316486359,
-0.3836953341960907,
0.07453308254480362,
0.25733301043510437,
-0.17606714367866516,
0.14309632778167725,
-0.19874835014343262,
-0.13971608877182007,
-0.5436665415763855,
0.3279227614402771,
-0.3304781913757324,
0.09333064407110214,
-0.08059141039848328,
0.22380945086479187,
0.10624107718467712,
-0.15520675480365753,
0.6078681349754333,
0.08828406780958176,
-0.2465856969356537,
-0.08958730846643448,
-0.12470930814743042,
0.03242357820272446,
-0.02565288543701172,
-0.04099613428115845,
0.014115814119577408,
0.023970328271389008,
-0.13407498598098755,
0.17457112669944763,
0.18843495845794678,
0.18066594004631042,
0.074265256524086,
-0.11950455605983734,
0.16871550679206848,
0.3973657190799713,
0.2532542943954468,
-0.055834345519542694,
0.2571987509727478,
0.030346540734171867,
-0.38426363468170166,
-0.28925085067749023,
-0.10250131785869598,
-0.3716839849948883,
0.3572409152984619,
-0.023013874888420105,
-0.26451870799064636,
-0.12476856261491776,
-0.322061151266098,
0.009025398641824722,
-0.10290869325399399,
0.4624607264995575,
0.027222491800785065,
-0.29760777950286865,
-0.07318039238452911,
0.3632386326789856,
0.009037088602781296,
-0.20641040802001953,
-0.02062040939927101,
0.11586181819438934,
-0.12411747872829437,
-0.15718556940555573,
-0.07600601017475128,
-0.17315196990966797,
-0.11561273783445358,
-0.09719419479370117,
-0.0015260502696037292,
0.3158474564552307,
-0.04245945066213608,
-0.16419099271297455,
0.07479129731655121,
0.26479312777519226,
0.009317930787801743,
-0.04464249312877655,
0.11916065216064453,
-0.38030701875686646,
-0.09760653972625732,
0.32954829931259155,
-0.10302504152059555,
-0.03588324412703514,
-0.7286491990089417,
0.11795095354318619,
-0.2784828543663025,
-0.0950419157743454,
-0.40837904810905457,
0.07597008347511292,
-0.204309344291687,
-0.2756735384464264,
-0.009065583348274231,
-0.24010004103183746,
0.1070982962846756,
-0.2863653898239136,
0.17302986979484558,
0.17641624808311462,
-0.5445986390113831,
0.1287878006696701,
-0.2941666543483734,
-0.2159392386674881,
0.10397285223007202,
0.3004634976387024,
-0.2569098174571991,
0.050593361258506775,
-0.41880548000335693,
0.24370108544826508,
0.6580138802528381,
-0.3600797951221466,
-0.39103221893310547,
0.1406138837337494,
-0.014864005148410797,
-0.1114155501127243,
0.07016447931528091,
0.02778666839003563,
0.3730790615081787,
-0.03031097911298275,
-0.10706426203250885,
-0.0610421821475029,
0.11710847169160843,
-0.11555833369493484,
-0.1534830927848816,
-0.1747284233570099,
0.18498216569423676,
0.29578012228012085,
0.1472211629152298,
-0.1527780294418335,
0.25418078899383545,
-0.7182743549346924,
0.2921212911605835,
-0.22200965881347656,
0.025558724999427795,
-0.018379200249910355,
0.4216773211956024,
0.04769199714064598,
0.06572509557008743,
-0.2140893042087555,
-0.3800731599330902,
0.04967667907476425,
-0.21262727677822113,
-0.01215808093547821,
-0.2554607391357422,
-0.16710685193538666,
-0.25723743438720703,
0.07087410241365433,
-0.3481329381465912,
-0.033018436282873154,
0.11358854174613953,
-0.05629253387451172,
-0.023941876366734505,
0.32288914918899536,
-0.00616084411740303,
-0.36809974908828735,
0.009965954348444939,
0.16609685122966766,
0.17903092503547668,
0.5348272323608398,
-0.19326332211494446,
-0.3399159908294678,
0.06543812155723572,
-0.11556688696146011,
0.09395693242549896,
-0.13599129021167755,
0.005593863781541586,
0.27627548575401306,
0.1048465445637703,
0.1457953006029129,
0.11565250903367996,
-0.22955496609210968,
0.18807505071163177,
-0.504571795463562,
-0.024097057059407234,
-0.0006355214864015579,
0.07511524111032486,
0.17314612865447998,
-0.18848243355751038,
0.03533729910850525,
0.3562164604663849,
-0.019613198935985565,
-0.01619017869234085,
0.12608835101127625,
0.07737766951322556,
0.05004021152853966,
0.18016187846660614,
-0.06731676310300827,
0.024771172553300858,
0.3149477541446686,
0.18266919255256653,
0.14994868636131287,
-0.09613286703824997,
0.010026253759860992,
0.3388313055038452,
-0.04398351162672043,
0.14565183222293854,
0.28187477588653564,
-0.5404937267303467,
-0.01612592488527298,
0.30508625507354736,
0.24193869531154633,
0.17326608300209045,
0.2506304979324341,
0.02484460175037384,
0.06944267451763153,
0.02938031777739525,
-0.11556188017129898,
-0.021397002041339874,
0.13736248016357422,
0.467791885137558,
0.18092814087867737,
0.19915150105953217,
-0.006318307481706142,
-0.24770104885101318,
-0.15771743655204773,
0.11640412360429764,
0.43412113189697266,
-0.240671306848526,
0.0378231555223465,
-0.4245660901069641,
-0.36831486225128174,
-0.06771311163902283,
-0.2945958971977234,
-0.213424414396286,
-0.1269759237766266,
0.0969095379114151,
0.20075461268424988,
-0.07752575725317001,
0.21578270196914673,
0.046653661876916885,
-0.15935803949832916,
0.056676819920539856,
-0.021455375477671623,
-0.14175426959991455,
-0.28876233100891113,
-0.5050766468048096,
-0.014373659156262875,
0.3805285394191742,
-0.1255311816930771,
0.3234364986419678,
-0.34288716316223145,
0.21632787585258484,
-0.6397269368171692,
-0.41062358021736145,
0.06857317686080933,
-0.10461747646331787,
0.31176063418388367,
0.24555730819702148,
0.13394083082675934,
-0.24343834817409515,
-0.2413983941078186,
0.20377537608146667,
0.023269759491086006,
-0.23023420572280884,
0.18809568881988525,
-0.14764074981212616,
0.06216051056981087,
0.18718819320201874,
-0.12977102398872375,
-0.2687932252883911,
-0.3202161490917206,
0.16306254267692566,
-0.031631436198949814,
0.15993128716945648,
-0.05018394812941551,
0.3235122561454773,
0.18914008140563965,
-0.31156620383262634,
-0.13859747350215912,
-0.0215437151491642,
0.006624702364206314,
0.38872265815734863,
-0.1985674798488617,
-0.445649117231369,
0.30675461888313293,
-0.10022013634443283,
-0.06652557849884033,
0.2809966206550598,
-0.30386537313461304,
-0.10160649567842484,
-0.017329880967736244,
0.3754688799381256,
0.04443860799074173,
-0.2839779257774353,
0.4170825481414795,
-0.03928731381893158,
0.003315819427371025,
-0.0667213648557663,
-0.05718335509300232,
0.05167757347226143,
-0.17962181568145752,
0.21973009407520294,
-0.018220245838165283,
0.24273008108139038,
0.11312274634838104,
0.6379588842391968,
0.01928064599633217,
-0.34148386120796204,
0.28003495931625366,
-0.4962444305419922,
0.48800113797187805,
0.2697066068649292,
-0.014814277179539204,
0.032570693641901016,
-0.018831461668014526,
0.0415741428732872,
0.2557671070098877,
-0.137166827917099,
-0.3055899143218994,
-0.1829310804605484,
-0.25348711013793945,
-0.30929329991340637,
-0.15924082696437836,
-0.04680030792951584,
-0.023420259356498718,
0.02418375015258789,
-0.25494349002838135,
0.11673439294099808,
0.16201308369636536,
-0.19683697819709778,
0.039118651300668716,
0.36020219326019287,
0.09052195399999619,
-0.011413557454943657,
-0.2013101577758789,
-0.021637191995978355,
0.03648741915822029,
0.4856775999069214,
0.26324695348739624,
0.15931585431098938,
-0.07779572904109955,
-0.10582494735717773,
0.2171792834997177,
-0.024233609437942505,
0.7587894797325134,
-0.060327112674713135,
-0.05504957586526871,
-0.014725679531693459,
0.22486793994903564,
-0.44760629534721375,
-0.16786833107471466,
0.020476702600717545,
0.1417841762304306,
0.015621191821992397,
0.3238832950592041,
-0.22731173038482666,
-0.021282369270920753,
0.3509087562561035,
-0.023381270468235016,
-0.04842374473810196,
-0.2605930268764496,
-0.24183310568332672,
-0.20686280727386475,
-0.02557159960269928,
-0.2947133183479309,
0.04454987496137619,
0.0011870483867824078,
0.07674241811037064,
-0.11030042171478271,
-0.24360404908657074,
-0.11895902454853058,
-0.10699544847011566,
0.2926831543445587,
0.3155830204486847,
-0.21320441365242004,
0.04073929414153099,
0.14931420981884003,
0.19502203166484833,
0.9374231696128845,
0.34813013672828674,
-0.06440496444702148,
-0.7942437529563904,
0.08332851529121399,
-0.03995976597070694,
0.34186726808547974,
0.04364483803510666,
-0.1312626600265503,
0.010310374200344086,
0.0872403234243393,
0.041937846690416336,
-0.15833675861358643,
0.11068742722272873,
0.5887071490287781,
-0.2974793314933777,
-0.31150081753730774,
0.0911203995347023,
0.6074398756027222,
0.1516965925693512,
0.0036544501781463623,
0.046836335211992264,
0.32844775915145874,
0.06081296503543854,
0.14677616953849792,
0.12182679772377014,
0.8212854266166687,
-0.13671112060546875,
0.19078098237514496,
0.6044479608535767,
-0.679754912853241,
0.2814198434352875,
0.3313096761703491,
0.11563710123300552,
-0.503412127494812,
-0.2571859359741211,
-0.11930371075868607,
-0.19297239184379578,
0.4076234698295593,
-0.16265316307544708,
-0.13441528379917145,
-0.15571638941764832,
-0.15376390516757965,
0.2058313637971878,
0.09241293370723724,
0.06300218403339386,
-0.1320718377828598,
0.2373797446489334,
0.02155662700533867,
0.05093993991613388,
-0.2391667515039444,
0.010625170543789864,
-0.07556013762950897,
-0.21935105323791504,
-0.3357723355293274,
0.036422401666641235,
-0.3698849081993103,
0.11762388795614243,
0.014731017872691154,
-0.1068442165851593,
0.08914990723133087,
-0.8643109798431396,
0.13502632081508636,
0.14613761007785797,
-0.41282403469085693,
-0.26210466027259827,
-0.3591157793998718,
0.38229966163635254,
0.11669324338436127,
-0.07970208674669266,
0.10506652295589447,
-0.12418137490749359,
0.2494194060564041,
-0.06184915453195572,
-0.09887492656707764,
0.43966320157051086,
0.061352044343948364,
-0.055187758058309555,
-0.08872415870428085,
0.05304582417011261,
0.12835583090782166,
-0.3069084584712982,
0.131318598985672,
-0.5575277209281921,
-0.05049945414066315,
-0.07354138046503067,
0.06387775391340256,
-0.06488129496574402,
-0.021321596577763557,
-0.0720146968960762,
0.01922472193837166,
-0.18084260821342468,
0.05184677988290787,
0.39708608388900757,
-0.12842339277267456,
0.07497722655534744,
0.3843628168106079,
0.23837845027446747,
-0.22983454167842865,
-0.12814612686634064,
0.1104862168431282,
0.20826652646064758,
-0.45493283867836,
0.06280778348445892,
0.16072037816047668,
0.4072209596633911,
0.04787525534629822,
0.029586199671030045,
0.17269843816757202,
-0.4425935745239258,
-0.1680799275636673,
-0.22596918046474457,
-0.12528549134731293,
0.23817045986652374,
-0.215148463845253,
0.26553553342819214,
0.15608111023902893,
-0.01316906325519085,
0.22595536708831787,
-0.21580766141414642,
-0.20447322726249695,
0.19612076878547668,
0.10285129398107529,
-0.030663587152957916,
-0.3439923822879791,
0.03860126808285713,
0.08135119825601578,
-0.10224032402038574,
0.04452928155660629,
-0.0830177515745163,
-0.2456631064414978,
-0.09897657483816147,
0.014825001358985901,
0.10960438847541809,
0.12156045436859131,
-0.22254176437854767,
0.05074997618794441,
-0.23030203580856323,
-0.1576443910598755,
0.12515445053577423,
-0.019823815673589706,
0.08779089897871017,
-0.23892073333263397,
0.020804230123758316,
0.22975000739097595,
-0.12398076802492142,
-0.02203461155295372,
0.09634306281805038,
-0.10030797123908997,
0.41475188732147217,
-0.0737660750746727,
0.15013784170150757,
-0.13625475764274597,
-0.0873197391629219,
0.06719505786895752,
0.060063593089580536,
0.14926427602767944,
-0.30800673365592957,
0.40275099873542786,
-0.42546236515045166,
0.09284156560897827,
-0.1831449568271637,
0.5928642749786377,
0.3479548394680023,
-0.3170572519302368,
-0.11012384295463562,
0.5885350108146667,
0.07979659736156464,
-0.4315483272075653,
0.035069748759269714,
0.08331993222236633,
-0.03432556241750717,
-0.0010593421757221222,
0.04827707260847092,
-0.21309803426265717,
0.13531091809272766,
-0.14957524836063385,
0.18033438920974731,
0.457563579082489,
0.11021069437265396,
0.05031833052635193,
0.44939953088760376,
-0.2738226652145386,
0.06026267632842064,
0.43091297149658203,
0.277069091796875,
0.22212237119674683,
0.265743225812912,
-0.1399584710597992,
0.057027436792850494,
-0.23904851078987122,
0.059399139136075974,
0.29517433047294617,
-0.24794800579547882,
-0.08028219640254974,
0.20417608320713043,
0.19158592820167542,
-0.17269709706306458,
0.25899356603622437,
0.41392388939857483,
0.29729562997817993,
0.007478210609406233,
-0.14587534964084625,
0.1952858865261078,
0.05412434786558151,
0.3316999673843384,
-0.06412693113088608,
-0.1747124195098877,
-0.059427276253700256,
-0.045949842780828476,
-0.15690723061561584,
-0.27150076627731323,
-0.005145624279975891,
0.29487431049346924,
-0.19457800686359406,
-0.2603182792663574,
0.18574810028076172,
0.14160564541816711,
0.049019474536180496,
-0.14543990790843964,
0.19350095093250275,
0.21969057619571686,
-0.12788349390029907,
0.21306665241718292,
0.34612545371055603,
0.43852582573890686,
0.36787158250808716,
-0.21098625659942627,
-0.2967807650566101,
-0.20501607656478882,
-0.08687040209770203,
-0.02819068357348442,
0.03313149884343147,
0.24755653738975525,
0.24916891753673553,
0.22524438798427582,
0.1441451907157898,
-0.02497066557407379,
0.33282163739204407,
0.05285491794347763,
0.100176602602005,
-0.15384820103645325,
0.05744349956512451,
-0.37471112608909607,
-0.2791808545589447,
-0.009733390063047409,
-0.33204954862594604,
-0.32756730914115906,
0.1295126974582672,
0.2817755341529846,
0.04997415468096733,
0.05713753402233124,
-0.11763502657413483,
0.03146837279200554,
0.1066025048494339,
0.40042975544929504,
0.4077483117580414,
0.49979186058044434,
-0.15771056711673737,
-0.21197958290576935,
-0.45640209317207336,
0.3155726194381714,
-0.20242634415626526,
-0.3908793330192566,
0.23174872994422913,
0.0163311418145895,
0.05944593995809555,
0.12644298374652863,
0.44267886877059937,
0.3775033950805664,
-0.061089325696229935,
0.3726196587085724,
-0.20873813331127167,
-0.021479256451129913,
0.09200426936149597,
-0.117720827460289,
-0.11916936188936234,
-0.2331756055355072,
0.3416309654712677,
-0.12013302743434906,
-0.003780920058488846,
-0.1337641477584839,
0.08143755793571472,
0.10318595170974731,
-0.2664053440093994,
0.4966765344142914,
-0.07135924696922302,
0.4312557280063629,
0.06773669272661209,
0.16357260942459106,
-0.04520241543650627,
-0.08130411058664322,
-0.3060629069805145,
0.33222275972366333,
0.20172831416130066,
0.03465452417731285,
-0.18315595388412476,
-0.11945584416389465,
-0.1599903702735901,
0.2728695571422577,
-0.03171530365943909,
0.22702473402023315,
-0.15779106318950653,
0.15500780940055847,
-0.018786247819662094,
-0.21959935128688812,
0.12038496136665344,
-0.1846073567867279,
0.03235583007335663,
-0.009464258328080177,
-0.4498988389968872,
-0.3379414677619934,
0.4813165068626404,
-0.5709683299064636,
-0.09040893614292145,
0.05449342355132103,
-0.061950311064720154,
0.2501629590988159,
0.003415064886212349,
-0.24857750535011292,
-0.018896527588367462,
0.515317440032959,
0.12762627005577087,
0.19953733682632446,
0.03579798340797424,
0.052899233996868134,
0.06061724200844765,
-0.01801571436226368,
0.5825275182723999,
-0.1083403006196022,
-0.17103372514247894,
-0.19039806723594666,
-0.2245350033044815
] |
https://github.com/huggingface/datasets/issues/4840 | Dataset Viewer issue for darragh/demo_data_raw3 | Apparently, there is something weird with that Parquet file: its schema is:
```
images: extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>>
```
I have forced a right schema:
```python
from datasets import Features, Image, load_dataset
features = Features({"images": Image()})
ds = datasets.load_dataset("parquet", split="train", data_files="train-00000-of-00001.parquet", features=features)
```
and then recreated a new Parquet file:
```python
ds.to_parquet("train.parquet")
```
Now this Parquet file has the right schema:
```
images: struct<bytes: binary, path: string>
child 0, bytes: binary
child 1, path: string
```
and can be loaded normally:
```python
In [26]: ds = load_dataset("parquet", split="train", data_files="dataset.parquet")
n [27]: ds
Out[27]:
Dataset({
features: ['images'],
num_rows: 20
})
``` | ### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No | 97 | Dataset Viewer issue for darragh/demo_data_raw3
### Link
https://huggingface.co/datasets/darragh/demo_data_raw3
### Description
```
Exception: ValueError
Message: Arrow type extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>> does not have a datasets dtype equivalent.
```
reported by @NielsRogge
### Owner
No
Apparently, there is something weird with that Parquet file: its schema is:
```
images: extension<arrow.py_extension_type<pyarrow.lib.UnknownExtensionType>>
```
I have forced a right schema:
```python
from datasets import Features, Image, load_dataset
features = Features({"images": Image()})
ds = datasets.load_dataset("parquet", split="train", data_files="train-00000-of-00001.parquet", features=features)
```
and then recreated a new Parquet file:
```python
ds.to_parquet("train.parquet")
```
Now this Parquet file has the right schema:
```
images: struct<bytes: binary, path: string>
child 0, bytes: binary
child 1, path: string
```
and can be loaded normally:
```python
In [26]: ds = load_dataset("parquet", split="train", data_files="dataset.parquet")
n [27]: ds
Out[27]:
Dataset({
features: ['images'],
num_rows: 20
})
``` | [
-0.32083433866500854,
-0.062167443335056305,
0.02742553874850273,
0.42224323749542236,
0.2109047919511795,
0.03596245497465134,
0.1780756264925003,
0.33485084772109985,
-0.1641368865966797,
0.043284960091114044,
0.07184018939733505,
0.5532619953155518,
-0.306625097990036,
0.21577052772045135,
-0.02774042636156082,
-0.18339291214942932,
0.2282702624797821,
0.2543252110481262,
0.2167973518371582,
-0.039346542209386826,
-0.1701449304819107,
-0.01528204046189785,
-0.1670437455177307,
-0.01174107939004898,
0.03757879137992859,
0.07776493579149246,
-0.13484370708465576,
0.19502407312393188,
-0.35095253586769104,
-0.431611031293869,
0.24756349623203278,
-0.0681319534778595,
0.3029617965221405,
0.44796937704086304,
-0.00011320318299112841,
0.19257931411266327,
0.42668890953063965,
-0.0007103327661752701,
-0.21433262526988983,
-0.22460170090198517,
0.07642396539449692,
-0.14302945137023926,
0.4256266951560974,
-0.3492397964000702,
-0.2276482880115509,
-0.5803928375244141,
0.03434918820858002,
-0.04927262291312218,
0.23036208748817444,
0.3021007776260376,
0.22024130821228027,
0.12146328389644623,
0.02742801234126091,
-0.11922070384025574,
0.6348556876182556,
0.317409485578537,
-0.09959930926561356,
0.4307645261287689,
0.11877419799566269,
0.31941676139831543,
-0.05838943272829056,
0.19872474670410156,
0.10244221985340118,
0.1830548495054245,
0.14857590198516846,
0.07200957834720612,
0.02743421122431755,
-0.20295798778533936,
0.14953508973121643,
0.1778849959373474,
0.32039421796798706,
-0.24947082996368408,
-0.06655890494585037,
-0.11258500814437866,
0.03172377124428749,
-0.399600088596344,
0.009282685816287994,
0.29324567317962646,
0.10174846649169922,
0.09223758429288864,
-0.12080637365579605,
-0.11699419468641281,
-0.24715617299079895,
0.08639874309301376,
-0.3025602102279663,
0.1747053861618042,
-0.11772693693637848,
0.20934638381004333,
-0.04993260279297829,
-0.13450372219085693,
0.4260229170322418,
0.011410360224545002,
-0.29850614070892334,
-0.18192622065544128,
-0.24705316126346588,
0.006104469299316406,
-0.01524302363395691,
-0.21081644296646118,
-0.07224684953689575,
0.10440777242183685,
-0.24045316874980927,
0.23484274744987488,
0.3356274664402008,
0.18770167231559753,
0.28154927492141724,
-0.2144247442483902,
-0.17473039031028748,
0.3818235397338867,
-0.02215864509344101,
0.18760712444782257,
0.03946997597813606,
-0.0059938132762908936,
-0.20860356092453003,
-0.1800733506679535,
-0.1361783891916275,
-0.355303019285202,
0.46655964851379395,
-0.07999420911073685,
-0.1669507771730423,
0.0952305793762207,
-0.19680559635162354,
0.15628266334533691,
-0.018667854368686676,
0.46680980920791626,
0.016288593411445618,
-0.1719658076763153,
-0.11070241779088974,
0.33108097314834595,
-0.09730984270572662,
-0.21421858668327332,
-0.23561230301856995,
-0.0029259249567985535,
-0.17243652045726776,
-0.23704253137111664,
-0.11195319890975952,
-0.12507030367851257,
-0.00730274710804224,
0.2275426834821701,
-0.0928758829832077,
0.02019573748111725,
0.11431515216827393,
-0.2705610692501068,
0.17175805568695068,
0.2552089989185333,
0.008642658591270447,
-0.045446719974279404,
0.3690034747123718,
-0.3400952219963074,
-0.1302832067012787,
0.043712832033634186,
-0.27898502349853516,
-0.023783590644598007,
-0.5553815960884094,
0.2003175914287567,
-0.2516102194786072,
-0.02778548002243042,
-0.6845912933349609,
0.1483556628227234,
-0.1758996844291687,
-0.20294375717639923,
-0.16355717182159424,
-0.41708773374557495,
-0.019000131636857986,
-0.16974426805973053,
0.27066558599472046,
0.1989828646183014,
-0.39813777804374695,
0.19600266218185425,
-0.21548770368099213,
-0.16645246744155884,
0.25827184319496155,
0.16916456818580627,
-0.27913790941238403,
-0.055276788771152496,
-0.3978724777698517,
0.012659437954425812,
0.5890547633171082,
-0.23495130240917206,
-0.24490174651145935,
0.20111092925071716,
-0.006209217011928558,
0.1859579235315323,
0.03990316763520241,
-0.19391407072544098,
0.5510188341140747,
0.07307872921228409,
-0.10464614629745483,
0.011573005467653275,
0.09750226140022278,
-0.029480447992682457,
-0.23272618651390076,
-0.09064360707998276,
0.19942297041416168,
0.2260093241930008,
0.09989164769649506,
-0.20381814241409302,
0.28635334968566895,
-0.4665714204311371,
0.24954909086227417,
-0.15654560923576355,
-0.007935022003948689,
0.023149659857153893,
0.3480468690395355,
0.34883439540863037,
0.041007399559020996,
-0.22229284048080444,
-0.3846186399459839,
0.11449892073869705,
0.04412257671356201,
-0.05614260584115982,
-0.2805892825126648,
-0.1396234631538391,
-0.2190030813217163,
0.0012612640857696533,
-0.4250833988189697,
-0.17473191022872925,
0.23946398496627808,
0.1635449230670929,
-0.22760839760303497,
0.1539928913116455,
-0.001259002834558487,
-0.2833668291568756,
-0.07964193820953369,
0.10045114904642105,
0.03355806693434715,
0.5577999353408813,
-0.08605153113603592,
-0.2937740087509155,
0.12693700194358826,
-0.0138859823346138,
0.15088394284248352,
-0.2858273983001709,
0.04397175833582878,
0.3786502480506897,
0.47635617852211,
0.10318606346845627,
0.059040747582912445,
-0.2048787921667099,
0.0918535590171814,
-0.5565235018730164,
-0.047387346625328064,
0.08412882685661316,
0.08902303874492645,
0.10802014917135239,
-0.32058876752853394,
0.14687228202819824,
0.3653047978878021,
0.17104387283325195,
-0.007178802043199539,
0.03999096900224686,
0.2442445456981659,
0.16311539709568024,
0.004273710772395134,
-0.1599065661430359,
-0.14202512800693512,
0.3218570947647095,
-0.02247159741818905,
0.12112370878458023,
-0.3797222673892975,
0.042313236743211746,
0.39429736137390137,
0.130101278424263,
0.07725951820611954,
0.1748484969139099,
-0.20248723030090332,
-0.18927636742591858,
0.2072698473930359,
0.35769784450531006,
0.15022209286689758,
0.25431838631629944,
0.06922008842229843,
0.1749376505613327,
-0.1691674143075943,
0.037992142140865326,
0.09179577231407166,
0.2118188738822937,
0.4347151219844818,
0.07682736963033676,
0.3047579228878021,
0.03267001733183861,
-0.28027233481407166,
-0.11765789985656738,
0.08710753917694092,
0.23350468277931213,
-0.28047990798950195,
0.21286197006702423,
-0.41724759340286255,
0.01656743884086609,
-0.19807475805282593,
0.08875717222690582,
-0.06948967278003693,
-0.1302243322134018,
-0.08468343317508698,
0.09772410988807678,
-0.13699555397033691,
0.16391757130622864,
-0.10683748126029968,
-0.09978146851062775,
0.01622351072728634,
-0.13568498194217682,
-0.11524613201618195,
-0.39858314394950867,
-0.46069446206092834,
0.053594086319208145,
0.3438586890697479,
0.09974601119756699,
0.2703768014907837,
-0.18162955343723297,
0.09110201895236969,
-0.6683365106582642,
-0.547954261302948,
0.057556215673685074,
-0.18371954560279846,
0.3236131966114044,
0.292743444442749,
-0.01206214725971222,
-0.2123899608850479,
-0.23543785512447357,
0.30449822545051575,
0.05908888578414917,
-0.134325310587883,
0.19022753834724426,
-0.06768202781677246,
-0.0812973827123642,
0.06795024871826172,
-0.21863576769828796,
-0.1782824695110321,
-0.3333517611026764,
0.12922883033752441,
0.27174338698387146,
0.028284326195716858,
-0.12715314328670502,
0.24056074023246765,
0.0503668375313282,
-0.06942697614431381,
0.03831158205866814,
-0.14883308112621307,
-0.019184689968824387,
0.15832684934139252,
-0.2708979547023773,
-0.40075162053108215,
0.25841978192329407,
-0.15759754180908203,
0.11309036612510681,
0.35124653577804565,
-0.4965452551841736,
0.04121217131614685,
-0.03978671878576279,
-0.09545745700597763,
-0.016978591680526733,
-0.271783709526062,
0.2788154184818268,
0.11032043397426605,
-0.03198578581213951,
-0.0770910233259201,
-0.10641492903232574,
0.030421338975429535,
-0.08587523549795151,
0.15121400356292725,
-0.0903303325176239,
0.433677613735199,
0.08716492354869843,
0.5163021087646484,
0.012185439467430115,
-0.17747503519058228,
0.4532562494277954,
-0.36381202936172485,
0.595468282699585,
-0.13291051983833313,
-0.01011132076382637,
0.08326081186532974,
-0.06793360412120819,
-0.017204025760293007,
0.30486100912094116,
-0.25090983510017395,
-0.3873472511768341,
-0.007809538394212723,
-0.06537313014268875,
-0.23574703931808472,
-0.20530855655670166,
-0.1161542534828186,
-0.08184447884559631,
0.041894420981407166,
-0.1442764401435852,
0.08729583770036697,
0.10095605254173279,
-0.049177203327417374,
0.0862455815076828,
0.2851470112800598,
-0.09052426367998123,
0.05467762053012848,
-0.3210884630680084,
0.11959090083837509,
0.17438891530036926,
0.20362886786460876,
-0.03154865279793739,
0.3434019982814789,
0.014285292476415634,
-0.25564438104629517,
0.3677210807800293,
-0.12682543694972992,
0.8788013458251953,
0.043817855417728424,
0.15602713823318481,
0.14948977530002594,
0.04424354434013367,
-0.5024715662002563,
-0.3185179531574249,
-0.11357788741588593,
-0.00708207581192255,
0.03303006663918495,
0.6580190062522888,
-0.32558417320251465,
-0.06889965385198593,
0.3379115164279938,
-0.08946342766284943,
-0.14688155055046082,
-0.05225374549627304,
-0.37812337279319763,
-0.18639805912971497,
-0.09852510690689087,
-0.13265138864517212,
0.1690184623003006,
0.21738986670970917,
0.007568232715129852,
-0.06034310534596443,
-0.4890357553958893,
-0.17568698525428772,
-0.18192128837108612,
0.3146348297595978,
0.5610715746879578,
-0.08195754885673523,
0.05554817244410515,
0.1043720692396164,
0.45834803581237793,
0.6177082061767578,
0.6387582421302795,
-0.02130013331770897,
-0.7635905146598816,
0.2635320723056793,
-0.01995907351374626,
0.36112192273139954,
0.04023834317922592,
-0.015307685360312462,
-0.06447292119264603,
-0.18202194571495056,
0.11793839931488037,
-0.3368290662765503,
0.34979361295700073,
0.590628445148468,
-0.3361620008945465,
-0.3227364420890808,
-0.29481735825538635,
0.5032340288162231,
0.0734182745218277,
-0.039318881928920746,
-0.02320849895477295,
0.42900824546813965,
-0.1490383893251419,
0.4795428514480591,
0.24917832016944885,
0.7461633086204529,
-0.1483517289161682,
0.19770589470863342,
0.5389273762702942,
-0.7341644167900085,
0.26758959889411926,
0.06934905052185059,
-0.012264592573046684,
-0.5010407567024231,
-0.27809709310531616,
0.012876788154244423,
-0.19286410510540009,
0.28820985555648804,
-0.07615429162979126,
-0.1116800382733345,
0.004737411625683308,
-0.0025870800018310547,
0.18237587809562683,
-0.03193056583404541,
0.24590367078781128,
0.044918302446603775,
0.25556182861328125,
-0.06411422789096832,
0.15896455943584442,
-0.09249906241893768,
-0.28661563992500305,
-0.047124359756708145,
-0.1994895190000534,
-0.24700060486793518,
-0.055053483694791794,
-0.2635754346847534,
0.11659743636846542,
0.028610941022634506,
0.00897127389907837,
0.04819609969854355,
-0.7012298703193665,
0.1821557730436325,
0.09679383039474487,
-0.3592838644981384,
-0.03537878766655922,
-0.19567498564720154,
0.3910005986690521,
0.24176552891731262,
-0.13392581045627594,
0.08288156241178513,
-0.0964682549238205,
0.23272690176963806,
0.04496658593416214,
0.013045422732830048,
0.24650466442108154,
0.0032487958669662476,
0.01045595109462738,
-0.13259044289588928,
0.11933880299329758,
0.27498358488082886,
-0.291392982006073,
-0.1462414711713791,
-0.425969660282135,
0.0051915571093559265,
-0.11610454320907593,
0.12642063200473785,
-0.27763694524765015,
0.0009571418631821871,
-0.14200225472450256,
-0.026553992182016373,
-0.3210132420063019,
0.004474353045225143,
0.37338724732398987,
-0.09410437196493149,
0.25308459997177124,
0.4147980809211731,
0.2060290426015854,
-0.23981121182441711,
-0.15438854694366455,
0.04328349232673645,
0.1900559961795807,
-0.3081302344799042,
0.15339304506778717,
0.02616945281624794,
0.17844347655773163,
0.16074496507644653,
-0.030340123921632767,
0.13429789245128632,
-0.3496416509151459,
-0.1304715871810913,
-0.207127645611763,
-0.025554290041327477,
0.10701142251491547,
-0.4713837206363678,
0.2950839698314667,
0.1732572317123413,
-0.021903280168771744,
-0.02839537523686886,
-0.2971782088279724,
-0.30059635639190674,
0.2581773102283478,
-0.008410364389419556,
0.11762278527021408,
-0.25165626406669617,
-0.007341116666793823,
-0.0864567756652832,
-0.09954775869846344,
0.1712338924407959,
-0.10678905248641968,
-0.17116743326187134,
-0.19220030307769775,
0.042617712169885635,
0.08278927206993103,
0.07116112112998962,
-0.014588801190257072,
-0.11443261802196503,
-0.06332272291183472,
-0.23475247621536255,
0.04502149298787117,
0.10474780201911926,
-0.07793453335762024,
-0.15901923179626465,
-0.0006328588351607323,
0.5142155289649963,
-0.11399098485708237,
-0.01988058350980282,
-0.0015414915978908539,
-0.1410716474056244,
0.2328644096851349,
-0.1661357581615448,
0.030629675835371017,
-0.20920996367931366,
-0.009017646312713623,
0.03657819330692291,
0.08369966596364975,
0.15357601642608643,
-0.034693941473960876,
0.5318898558616638,
-0.2785409688949585,
0.10805796086788177,
0.051198557019233704,
0.4827882945537567,
0.4798968732357025,
-0.24248187243938446,
-0.34771478176116943,
0.5057772994041443,
0.19496963918209076,
-0.38861700892448425,
0.001686503761447966,
0.08631931245326996,
0.012347743846476078,
0.03720856085419655,
0.017975084483623505,
0.03282066062092781,
0.22099703550338745,
-0.4584439992904663,
0.21136882901191711,
0.6038140058517456,
0.026051705703139305,
0.3409362733364105,
0.37237393856048584,
-0.21734778583049774,
-0.03758611902594566,
0.19679872691631317,
0.2630957067012787,
0.22512079775333405,
0.5521507859230042,
0.04846604913473129,
0.17938870191574097,
0.08404439687728882,
-0.013831499963998795,
0.20910903811454773,
-0.23613634705543518,
-0.029841255396604538,
0.2348208874464035,
0.1772969365119934,
-0.030852288007736206,
0.074043408036232,
0.13800832629203796,
0.41886240243911743,
-0.16919614374637604,
-0.1822010576725006,
0.14093391597270966,
0.019208552315831184,
0.13848981261253357,
0.01866278052330017,
-0.1285741776227951,
-0.29449987411499023,
0.10414670407772064,
-0.23430520296096802,
-0.13654187321662903,
-0.22101151943206787,
0.21814827620983124,
-0.1373744159936905,
-0.20889557898044586,
0.018509991466999054,
-0.013412941247224808,
0.11199501156806946,
-0.14892926812171936,
0.3277296721935272,
0.23941011726856232,
-0.17741218209266663,
0.2507137358188629,
0.17482592165470123,
0.40203896164894104,
0.34677669405937195,
-0.29368340969085693,
-0.2936328947544098,
0.046490754932165146,
-0.06529443711042404,
-0.009371363557875156,
-0.026075955480337143,
0.1170598566532135,
0.12643013894557953,
0.2762109041213989,
0.1932573765516281,
-0.10496540367603302,
0.09432181715965271,
0.07424011081457138,
-0.08222095668315887,
-0.22838442027568817,
0.28075942397117615,
-0.2137954831123352,
-0.056397996842861176,
-0.006938297301530838,
-0.18653693795204163,
-0.5104534029960632,
-0.3498825132846832,
0.30124375224113464,
0.05257377028465271,
0.1877598762512207,
-0.04951145127415657,
0.08232208341360092,
0.11640369892120361,
0.5243492126464844,
0.2048625648021698,
0.060723476111888885,
-0.16139312088489532,
-0.2049635648727417,
-0.5510616898536682,
0.2605281472206116,
-0.19707028567790985,
-0.4115713834762573,
0.4057157039642334,
0.19342809915542603,
0.0357968844473362,
0.0671350359916687,
0.09226865321397781,
0.4655072093009949,
-0.13919979333877563,
0.2643507421016693,
-0.21340042352676392,
-0.018190253525972366,
0.055620305240154266,
-0.17413806915283203,
-0.15664997696876526,
-0.21486970782279968,
0.3473590314388275,
-0.20037615299224854,
0.060135677456855774,
-0.05032290518283844,
-0.008566632866859436,
-0.03572880104184151,
-0.37241095304489136,
0.3776990473270416,
-0.08097628504037857,
0.25012582540512085,
0.019717596471309662,
0.11483331769704819,
-0.24783965945243835,
-0.1524246484041214,
-0.2851629853248596,
0.551896333694458,
-0.007389970123767853,
0.12714555859565735,
-0.18696102499961853,
-0.09688495099544525,
-0.16883908212184906,
-0.008622249588370323,
0.06364072114229202,
0.1333329677581787,
-0.308451384305954,
0.20192624628543854,
-0.05547234043478966,
-0.048116233199834824,
0.058050189167261124,
0.0028105974197387695,
-0.02710709720849991,
0.0739513710141182,
-0.11026814579963684,
-0.3786916434764862,
0.4863796830177307,
-0.43120914697647095,
-0.26527974009513855,
0.046563033014535904,
0.04615776240825653,
0.22664609551429749,
0.06541120260953903,
-0.2117021083831787,
0.07405742257833481,
0.5034642219543457,
-0.010983221232891083,
0.13662633299827576,
0.17343491315841675,
0.14931949973106384,
-0.0031200647354125977,
-0.07961095869541168,
0.29024171829223633,
-0.08455450087785721,
-0.07078871130943298,
-0.12319441139698029,
-0.209511861205101
] |
https://github.com/huggingface/datasets/issues/4829 | Misalignment between card tag validation and docs | (Note that the doc is aligned with the hub validation rules, and the "ground truth" is the hub validation rules given that they apply to all datasets, not just the canonical ones) | ## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
| 32 | Misalignment between card tag validation and docs
## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
(Note that the doc is aligned with the hub validation rules, and the "ground truth" is the hub validation rules given that they apply to all datasets, not just the canonical ones) | [
-0.37480810284614563,
-0.17362239956855774,
-0.027834326028823853,
0.14412137866020203,
0.19238075613975525,
0.23069870471954346,
0.1749410778284073,
0.3382502496242523,
0.2947353720664978,
0.00824795663356781,
0.029535343870520592,
0.2788616418838501,
0.1573074609041214,
0.32470235228538513,
-0.06309583783149719,
0.07244705408811569,
0.06191474199295044,
0.16657590866088867,
0.0755886361002922,
0.041187919676303864,
0.04898402839899063,
0.10137889534235,
-0.12919984757900238,
0.11447317153215408,
-0.4880099594593048,
-0.08376993238925934,
0.15190117061138153,
0.009864617139101028,
-0.43656209111213684,
-0.2899446487426758,
0.3822222948074341,
0.16082745790481567,
-0.13876056671142578,
0.17570944130420685,
-0.00010341964662075043,
-0.11578664183616638,
0.17085811495780945,
0.06138576567173004,
-0.0006472915410995483,
-0.16219167411327362,
-0.3202979266643524,
-0.041992224752902985,
-0.1843276023864746,
0.2865350842475891,
-0.26251256465911865,
-0.24456189572811127,
-0.060718268156051636,
0.025406010448932648,
-0.027241721749305725,
-0.02212649956345558,
0.25393134355545044,
0.15830206871032715,
0.16793230175971985,
-0.25900959968566895,
-0.11265633255243301,
0.28137391805648804,
-0.06551558524370193,
0.3151554465293884,
0.11607012897729874,
-0.20430053770542145,
-0.11497370153665543,
0.42062851786613464,
0.17378318309783936,
-0.14976927638053894,
0.17358213663101196,
0.007380980998277664,
-0.08000148087739944,
-0.1651190221309662,
0.12647831439971924,
0.22424063086509705,
0.3731338381767273,
-0.25736814737319946,
-0.38983845710754395,
-0.2899998426437378,
-0.06999479979276657,
-0.28610193729400635,
0.3265484571456909,
0.19918382167816162,
0.3601399064064026,
0.2327193170785904,
-0.05408066511154175,
0.11876621097326279,
0.03755901753902435,
-0.07078804075717926,
-0.11357271671295166,
0.2810143828392029,
0.05067334324121475,
-0.18830391764640808,
0.2507542371749878,
-0.11669005453586578,
-0.08332334458827972,
0.05304525047540665,
-0.45556727051734924,
0.2079869955778122,
-0.2884046137332916,
-0.0408138707280159,
0.016160745173692703,
0.17210745811462402,
0.32811179757118225,
0.32008814811706543,
0.09116166085004807,
0.11586152017116547,
0.14523911476135254,
0.18483483791351318,
0.32927143573760986,
0.08771945536136627,
0.18623676896095276,
0.32881584763526917,
0.12820203602313995,
0.2805052101612091,
0.04932330921292305,
0.014188997447490692,
0.12698110938072205,
-0.10065225511789322,
-0.3379603922367096,
-0.04038533940911293,
-0.0904165655374527,
-0.17658908665180206,
-0.25056537985801697,
0.34337639808654785,
-0.13492457568645477,
0.1253938227891922,
0.23503132164478302,
0.27381303906440735,
-0.06034785509109497,
0.15027663111686707,
-0.04214591532945633,
-0.06338698416948318,
0.026007412001490593,
0.15360231697559357,
-0.29397332668304443,
0.014203017577528954,
-0.23856091499328613,
-0.11016946285963058,
0.1491527259349823,
-0.3080213665962219,
0.40797483921051025,
0.3148658573627472,
0.09692256152629852,
0.044928230345249176,
-0.23059481382369995,
-0.22574597597122192,
0.19052407145500183,
0.35009387135505676,
0.09429304301738739,
-0.010338174179196358,
-0.04103223606944084,
0.1295308619737625,
-0.04960808530449867,
-0.09179740399122238,
-0.28667113184928894,
-0.1594172567129135,
-0.19114525616168976,
0.35155487060546875,
-0.09580431133508682,
-0.04142896831035614,
-0.15657362341880798,
0.10528260469436646,
0.10748539119958878,
-0.3094429075717926,
-0.040147311985492706,
-0.05463803559541702,
-0.2500700056552887,
0.021039238199591637,
0.08590024709701538,
0.07067392766475677,
0.02424897626042366,
-0.11967151612043381,
0.39117172360420227,
0.16412286460399628,
-0.0647672638297081,
0.3508658707141876,
-0.25396159291267395,
0.29972442984580994,
-0.33972248435020447,
0.4084751009941101,
0.08635556697845459,
-0.4647153615951538,
-0.4956578314304352,
-0.10344824939966202,
-0.052354685962200165,
-0.031333934515714645,
-0.13602760434150696,
-0.1670106202363968,
0.18343140184879303,
0.024698222056031227,
0.04017278924584389,
-0.02547750622034073,
-0.057214729487895966,
0.1436985284090042,
-0.31266501545906067,
-0.07285049557685852,
0.04418781027197838,
-0.18668246269226074,
-0.12960541248321533,
-0.2257377803325653,
-0.08565593510866165,
0.25017693638801575,
0.4029928743839264,
0.006450466811656952,
-0.06642366200685501,
0.3185502290725708,
0.37550270557403564,
-0.17354117333889008,
0.07915938645601273,
-0.19947925209999084,
-0.4424840807914734,
0.16015776991844177,
-0.022848881781101227,
0.23119351267814636,
0.346828818321228,
-0.20584487915039062,
-0.24328073859214783,
-0.18311774730682373,
-0.24175389111042023,
-0.08407197892665863,
0.18098744750022888,
-0.0512947142124176,
0.18299812078475952,
-0.17378750443458557,
-0.23372623324394226,
0.19220560789108276,
-0.36911913752555847,
0.25969117879867554,
-0.04664460942149162,
0.02251427434384823,
-0.30754348635673523,
0.03318597003817558,
0.036958418786525726,
-0.028226248919963837,
-0.021803662180900574,
0.05273505672812462,
0.008095313794910908,
0.21386170387268066,
0.31079939007759094,
0.1649954617023468,
-0.028502464294433594,
0.20579299330711365,
0.4303604066371918,
-0.3882182538509369,
-0.27625489234924316,
-0.05408269539475441,
0.03847571462392807,
0.047267429530620575,
-0.4173263609409332,
0.20497697591781616,
-0.257136732339859,
-0.09928060322999954,
-0.033771686255931854,
-0.031602658331394196,
0.29121944308280945,
0.11175087094306946,
-0.05570019781589508,
-0.20427696406841278,
0.19107286632061005,
0.26132142543792725,
0.06535448133945465,
0.13858868181705475,
-0.09376821666955948,
0.3347533941268921,
0.484483540058136,
0.2035626322031021,
-0.011064976453781128,
0.03718312084674835,
0.06471084803342819,
-0.06837337464094162,
0.1497524380683899,
0.15952683985233307,
0.1941225230693817,
0.16026750206947327,
0.08153124153614044,
0.14223533868789673,
-0.31995391845703125,
-0.23202583193778992,
0.24795961380004883,
-0.10247646272182465,
-0.07216868549585342,
0.35803064703941345,
0.031365420669317245,
0.10671400278806686,
-0.3329628109931946,
0.18575727939605713,
0.15013355016708374,
0.13711191713809967,
-0.4431602358818054,
-0.07618681341409683,
-0.32352226972579956,
-0.23967191576957703,
-0.11573342978954315,
-0.49095413088798523,
-0.19290027022361755,
-0.3230554461479187,
0.2713731825351715,
0.3034375011920929,
-0.3206785321235657,
0.39897820353507996,
-0.017782174050807953,
0.03356480598449707,
-0.1011052131652832,
-0.1106140986084938,
-0.14109724760055542,
0.025295879691839218,
-0.14606913924217224,
0.185236394405365,
0.1522544026374817,
-0.1560877114534378,
0.20810078084468842,
-0.22216331958770752,
-0.045555513352155685,
-0.28881391882896423,
-0.6747271418571472,
0.3292314410209656,
-0.15227673947811127,
0.0034155994653701782,
0.34776780009269714,
0.10755539685487747,
-0.18317444622516632,
-0.02674686536192894,
0.0930812656879425,
-0.03731442987918854,
-0.37276706099510193,
-0.08294765651226044,
-0.11995115876197815,
-0.17369849979877472,
-0.4555743634700775,
-0.4130208194255829,
0.1651899367570877,
-0.361983060836792,
0.24936269223690033,
-0.08488105982542038,
0.15695521235466003,
0.32747378945350647,
-0.026713836938142776,
-0.2407536655664444,
-0.49948760867118835,
0.0281989686191082,
-0.35727497935295105,
-0.2488735318183899,
0.07704543322324753,
-0.11250855028629303,
-0.5797256231307983,
0.07382127642631531,
0.13073451817035675,
0.4166760742664337,
0.02273305132985115,
0.11450625956058502,
-0.16725128889083862,
0.08264253288507462,
0.06721794605255127,
0.0024670399725437164,
0.0009416248649358749,
0.2361833155155182,
-0.020813168957829475,
-0.04507770389318466,
-0.21274176239967346,
-0.18679365515708923,
0.17167189717292786,
-0.050826482474803925,
0.10246030986309052,
-0.14631113409996033,
-0.20868757367134094,
0.08288030326366425,
0.21979254484176636,
0.2867638170719147,
-0.1757938116788864,
0.2981434166431427,
-0.21555714309215546,
0.391539603471756,
-0.06495968252420425,
-0.18301710486412048,
-0.02550072968006134,
0.23121903836727142,
0.18266046047210693,
0.138519287109375,
0.01141328364610672,
0.2999376058578491,
0.08528000116348267,
0.21098534762859344,
-0.18224379420280457,
-0.13932758569717407,
0.12954318523406982,
0.08123017102479935,
0.007723800837993622,
0.18655557930469513,
0.1492983102798462,
0.0942574143409729,
-0.08967459946870804,
0.28224068880081177,
0.3715144395828247,
0.05459893122315407,
0.13997524976730347,
-0.19509629905223846,
-0.12123614549636841,
-0.09298595041036606,
0.006897494196891785,
0.18196363747119904,
0.15608620643615723,
-0.11900074779987335,
-0.155075341463089,
-0.19798125326633453,
-0.005543724168092012,
0.29659736156463623,
-0.10888134688138962,
0.05548388510942459,
-0.03969436511397362,
-0.018084723502397537,
-0.0888897031545639,
-0.06696560233831406,
-0.05631564185023308,
-0.34708574414253235,
0.2610800266265869,
0.4020654261112213,
-0.2973044812679291,
-0.19358223676681519,
-0.10349248349666595,
-0.21065911650657654,
-0.013991311192512512,
0.12242303043603897,
-0.2970291078090668,
-0.16020546853542328,
-0.3098154664039612,
0.16830356419086456,
0.35422995686531067,
0.1813107430934906,
0.05895572155714035,
-0.060825686901807785,
-0.07168901711702347,
-0.15576782822608948,
-0.02747809886932373,
0.29066845774650574,
0.5042436718940735,
-0.2233215719461441,
0.18720360100269318,
-0.012598589062690735,
0.38160446286201477,
0.4492458999156952,
0.45756539702415466,
0.039633724838495255,
-0.23984035849571228,
0.12408014386892319,
-0.15162594616413116,
0.16290687024593353,
0.1777355968952179,
0.08860533684492111,
0.273863822221756,
-0.059018589556217194,
-0.05905786156654358,
-0.5054613351821899,
0.14095526933670044,
0.07009516656398773,
0.07984600961208344,
-0.038681965321302414,
-0.2398129254579544,
0.12553073465824127,
0.24100665748119354,
-0.12602360546588898,
0.5502756834030151,
0.5406531691551208,
-0.2753881812095642,
-0.04641721025109291,
0.15286847949028015,
0.7970966100692749,
0.376544713973999,
-0.06314364075660706,
0.2570632994174957,
-0.35538196563720703,
0.5052668452262878,
-0.1325817108154297,
0.19720184803009033,
-0.5549489259719849,
-0.20136147737503052,
-0.1108907163143158,
-0.049752309918403625,
0.024566303938627243,
-0.14206241071224213,
-0.04903177171945572,
0.2283545583486557,
-0.069121353328228,
0.3923066258430481,
-0.08366032689809799,
0.17191925644874573,
-0.3562341332435608,
-0.2768011689186096,
-0.3492457866668701,
0.18409600853919983,
-0.03283511847257614,
0.3083324134349823,
-0.22457441687583923,
-0.07981204986572266,
-0.2979952394962311,
-0.35309314727783203,
-0.4732056260108948,
0.0745229497551918,
-0.16532553732395172,
-0.18851099908351898,
-0.02379007637500763,
0.27243751287460327,
0.012814760208129883,
0.040790434926748276,
0.14476308226585388,
0.23433876037597656,
-0.3292941451072693,
0.19750279188156128,
-0.17608776688575745,
-0.018637975677847862,
-0.15855379402637482,
-0.11079603433609009,
0.2945803701877594,
-0.09862171858549118,
-0.058278776705265045,
-0.3619612157344818,
-0.0005095172673463821,
0.0749933123588562,
-0.14873529970645905,
0.11267642676830292,
-0.16038399934768677,
-0.36277905106544495,
-0.008240529336035252,
-0.20413082838058472,
0.02771405503153801,
-0.2631325125694275,
0.2049020677804947,
0.17543190717697144,
-0.1289660632610321,
0.08446584641933441,
0.2770225703716278,
-0.0976632684469223,
-0.23283056914806366,
0.49417755007743835,
-0.13110604882240295,
-0.08959130942821503,
0.09839849174022675,
0.03797229006886482,
-0.13580623269081116,
-0.3003864884376526,
-0.1985328495502472,
0.2876338064670563,
-0.5694774389266968,
-0.15678302943706512,
-0.10749181360006332,
-0.504181444644928,
0.21258904039859772,
0.31119903922080994,
0.3920850157737732,
0.07429244369268417,
0.06796616315841675,
-0.35353320837020874,
-0.23301465809345245,
0.33209025859832764,
-0.3092324435710907,
0.19463534653186798,
0.20809873938560486,
0.0322309285402298,
0.08303549140691757,
-0.08882608264684677,
-0.41074392199516296,
0.036119334399700165,
-0.022215094417333603,
0.043141741305589676,
-0.22599926590919495,
-0.12860718369483948,
0.2520129978656769,
-0.4803994297981262,
0.144426628947258,
0.2982836365699768,
-0.1327344924211502,
-0.2818519175052643,
-0.3272944986820221,
0.04877646267414093,
0.18002614378929138,
0.10642585903406143,
-0.18037226796150208,
0.20542749762535095,
-0.1969188153743744,
-0.1718646138906479,
0.21999211609363556,
-0.18517938256263733,
0.22325778007507324,
0.11532825231552124,
0.057095471769571304,
0.04729040712118149,
0.0032011941075325012,
-0.06577383726835251,
0.01692871004343033,
-0.02471546083688736,
0.022866617888212204,
-0.04028833657503128,
-0.2833975851535797,
-0.10331284254789352,
0.06090116873383522,
0.22745859622955322,
0.30646461248397827,
0.07087287306785583,
0.26623815298080444,
0.06085321679711342,
0.16023831069469452,
0.07313525676727295,
0.5139249563217163,
0.2297651320695877,
0.036351919174194336,
-0.29022789001464844,
-0.04501231759786606,
0.33546674251556396,
-0.2756410241127014,
-0.3125302791595459,
-0.05161410942673683,
0.1846705675125122,
0.08407793939113617,
0.09048961102962494,
0.5044140219688416,
-0.030159205198287964,
-0.4627850651741028,
0.1644764542579651,
0.526507556438446,
-0.26613831520080566,
0.14496587216854095,
0.3932562470436096,
-0.21895980834960938,
0.30675941705703735,
0.1750335842370987,
-0.13980570435523987,
0.28856757283210754,
0.10940361768007278,
-0.1287578046321869,
0.427053838968277,
0.2060277760028839,
-0.045329611748456955,
0.17469368875026703,
-0.2843914330005646,
-0.011405743658542633,
0.28690415620803833,
0.06981564313173294,
0.03283868730068207,
0.15467412769794464,
0.1893812119960785,
-0.12315329164266586,
-0.3361009955406189,
-0.26904168725013733,
0.15419349074363708,
-0.39889097213745117,
0.04479776322841644,
-0.39079946279525757,
-0.0454937219619751,
0.08079573512077332,
-0.03522148355841637,
0.14239048957824707,
0.12439627945423126,
0.23813150823116302,
-0.10908494889736176,
-0.23670248687267303,
-0.285762220621109,
-0.2577042877674103,
0.4676436185836792,
0.1879422664642334,
-0.12522079050540924,
0.2554898262023926,
0.08229610323905945,
-0.3018568158149719,
0.05326484516263008,
0.5918700695037842,
0.4531589448451996,
0.014421641826629639,
0.3569716811180115,
-0.0947641059756279,
-0.09128934144973755,
-0.007013032212853432,
-0.052978575229644775,
0.2866647243499756,
0.060165151953697205,
-0.09829212725162506,
0.2669852674007416,
0.2928312122821808,
-0.2272922396659851,
-0.12916670739650726,
-0.2119886726140976,
0.21797697246074677,
0.17100198566913605,
0.10952690988779068,
-0.15611419081687927,
0.06512605398893356,
-0.09321799874305725,
0.13580021262168884,
-0.0004794299602508545,
0.005406519398093224,
0.4714721143245697,
0.2216537892818451,
0.27984026074409485,
-0.15521463751792908,
0.1387186199426651,
0.465013712644577,
0.42111462354660034,
0.25605249404907227,
-0.43574094772338867,
-0.19524256885051727,
-0.033518992364406586,
-0.45145919919013977,
0.3695131242275238,
0.044667694717645645,
-0.005548948422074318,
-0.10493838787078857,
-0.01746969483792782,
-0.07029392570257187,
-0.13357020914554596,
0.17682236433029175,
0.07503572851419449,
0.37124285101890564,
-0.02575419843196869,
-0.15556639432907104,
0.21602848172187805,
-0.046161949634552,
-0.21958325803279877,
0.013531230390071869,
-0.12564857304096222,
0.26988574862480164,
0.032122623175382614,
0.09106067568063736,
-0.18793559074401855,
0.17453740537166595,
-0.15596431493759155,
-0.0034847408533096313,
0.08579417318105698,
0.29297369718551636,
0.3500540256500244,
-0.161298006772995,
-0.006230903789401054,
-0.29736843705177307,
-0.008993884548544884,
-0.39990004897117615,
0.4325156807899475,
-0.19689609110355377,
0.2504233121871948,
0.06041397154331207,
-0.21696816384792328,
-0.22574114799499512,
0.07920966297388077,
0.2473612278699875,
0.04299560561776161,
-0.538097083568573,
0.237647145986557,
-0.1059889942407608,
-0.18559180200099945,
0.17291279137134552,
0.32196199893951416,
0.12388843297958374,
-0.01615981012582779,
-0.18460781872272491,
-0.6050394177436829,
0.2696990966796875,
-0.20914892852306366,
0.0656159520149231,
-0.022100429981946945,
0.17688831686973572,
0.4880181550979614,
-0.11460531502962112,
-1.0205696821212769,
-0.039928093552589417,
0.11904025822877884,
-0.17272785305976868,
-0.2427520602941513,
0.09678320586681366,
0.07540790736675262,
0.04742060974240303,
-0.15486285090446472,
0.36066097021102905,
0.2103620171546936,
-0.44736674427986145,
0.21051859855651855,
0.020030628889799118
] |
https://github.com/huggingface/datasets/issues/4829 | Misalignment between card tag validation and docs | Instead of our own implementation, we now use `huggingface_hub`'s `DatasetCardData`, which has the correct type hint, so I think we can close this issue. | ## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
| 24 | Misalignment between card tag validation and docs
## Describe the bug
As pointed out in other issue: https://github.com/huggingface/datasets/pull/4827#discussion_r943536284
the validation of the dataset card tags is not aligned with its documentation: e.g.
- implementation: `license: List[str]`
- docs: `license: Union[str, List[str]]`
They should be aligned.
CC: @julien-c
Instead of our own implementation, we now use `huggingface_hub`'s `DatasetCardData`, which has the correct type hint, so I think we can close this issue. | [
-0.30711981654167175,
-0.259937047958374,
-0.019689971581101418,
0.20848478376865387,
0.2689773142337799,
0.12550398707389832,
0.08933639526367188,
0.3309425711631775,
0.2765294313430786,
0.008246742188930511,
-0.1250099241733551,
0.3567868769168854,
0.009760169312357903,
0.40340811014175415,
-0.12196345627307892,
0.08225854486227036,
0.07919734716415405,
0.11328435689210892,
-0.035122476518154144,
0.01919492334127426,
-0.005331382155418396,
0.20483754575252533,
-0.019238684326410294,
0.07608281075954437,
-0.38418522477149963,
-0.11669022589921951,
0.15633845329284668,
0.058222487568855286,
-0.3945232033729553,
-0.35395506024360657,
0.35242435336112976,
0.11831854283809662,
-0.18011650443077087,
0.28726938366889954,
-0.00010378452861914411,
-0.04025541990995407,
0.22991499304771423,
0.06300156563520432,
-0.024185556918382645,
-0.2583545446395874,
-0.21523520350456238,
-0.009533586911857128,
-0.06102757155895233,
0.21963593363761902,
-0.2634316384792328,
-0.2828346788883209,
-0.07491794973611832,
0.07170818746089935,
0.2100091576576233,
0.009730693884193897,
0.2888824939727783,
0.25463157892227173,
0.13520298898220062,
-0.27384859323501587,
-0.05937368422746658,
0.3624236583709717,
-0.1566319316625595,
0.2877756655216217,
0.09233810752630234,
-0.035297803580760956,
-0.03497617691755295,
0.43580859899520874,
0.14773298799991608,
-0.1272384375333786,
0.273235946893692,
-0.004464826546609402,
-0.12371938675642014,
-0.17304521799087524,
0.09877293556928635,
0.22942861914634705,
0.21878379583358765,
-0.2692055404186249,
-0.3456808626651764,
-0.3611445128917694,
0.018413640558719635,
-0.18613611161708832,
0.32572463154792786,
0.1985919326543808,
0.18663230538368225,
0.19601918756961823,
-0.1595580130815506,
0.07955028116703033,
0.005728565156459808,
-0.10607418417930603,
-0.001018241047859192,
0.13607271015644073,
-0.09494303911924362,
-0.13762599229812622,
0.35826247930526733,
-0.23845727741718292,
-0.18842428922653198,
0.08924765884876251,
-0.4112238585948944,
0.14939527213573456,
-0.19916324317455292,
-0.1116764172911644,
0.05978977680206299,
0.3288300037384033,
0.3814716935157776,
0.22286514937877655,
0.09831737726926804,
0.16922014951705933,
0.025822915136814117,
0.22684124112129211,
0.3268580734729767,
0.028240535408258438,
0.2608731687068939,
0.12458223849534988,
0.18542854487895966,
0.29070690274238586,
0.07086949050426483,
0.030425896868109703,
0.17198197543621063,
0.004650706425309181,
-0.32501575350761414,
-0.1570374071598053,
-0.02591838128864765,
-0.18347398936748505,
-0.283306360244751,
0.2645694613456726,
-0.023170441389083862,
0.1381748467683792,
0.26371708512306213,
0.3617739677429199,
-0.06237282603979111,
0.016979172825813293,
-0.04601193591952324,
-0.05579324811697006,
0.052964694797992706,
0.13327570259571075,
-0.27332866191864014,
0.023475095629692078,
-0.20552003383636475,
-0.03507601469755173,
0.21311165392398834,
-0.40233126282691956,
0.3729588985443115,
0.283985435962677,
0.0901375338435173,
0.06339165568351746,
-0.1754903793334961,
-0.10934203863143921,
0.16595342755317688,
0.3248943090438843,
0.05003974959254265,
-0.025024281814694405,
0.028835324570536613,
0.03850257396697998,
-0.02635469287633896,
-0.18142247200012207,
-0.23259291052818298,
-0.1281716525554657,
-0.2279425710439682,
0.33947908878326416,
-0.08786369860172272,
0.06884025037288666,
-0.19610533118247986,
0.0885334461927414,
-0.004667505621910095,
-0.21997374296188354,
-0.04827503114938736,
0.047559790313243866,
-0.3130383789539337,
-0.001855618553236127,
0.10890506953001022,
0.17435231804847717,
0.08872242271900177,
-0.27721577882766724,
0.3175387680530548,
-0.059172313660383224,
-0.037626929581165314,
0.3790092468261719,
-0.2433708906173706,
0.14041593670845032,
-0.38238269090652466,
0.3270106315612793,
-0.08044526726007462,
-0.378122478723526,
-0.4156147539615631,
0.05782375484704971,
-0.09507538378238678,
-0.005959231406450272,
-0.07302234321832657,
-0.17411749064922333,
0.1741994172334671,
-0.01317459624260664,
0.07948073744773865,
-0.10570788383483887,
-0.027588387951254845,
0.15259842574596405,
-0.37391194701194763,
-0.1473453789949417,
-0.02218540757894516,
-0.14566917717456818,
-0.20807962119579315,
-0.14153799414634705,
-0.07157906144857407,
0.147520050406456,
0.33804649114608765,
-0.022773172706365585,
-0.0483320876955986,
0.26901793479919434,
0.4524974226951599,
-0.053237058222293854,
0.004678171593695879,
-0.22330740094184875,
-0.4451393485069275,
0.14652928709983826,
-0.14830121397972107,
0.22780151665210724,
0.17116476595401764,
-0.2971513867378235,
-0.34774601459503174,
-0.09034410119056702,
-0.20724065601825714,
-0.0651380866765976,
0.2304868996143341,
-0.039751842617988586,
0.14911605417728424,
-0.02612333744764328,
-0.20375731587409973,
0.3204800486564636,
-0.3132999539375305,
0.2492963969707489,
-0.1145368218421936,
0.01173391379415989,
-0.22280769050121307,
0.005898214876651764,
0.010260622948408127,
0.001430325210094452,
0.08768431097269058,
-0.028563037514686584,
0.05610821396112442,
0.24095046520233154,
0.1624441146850586,
0.16579431295394897,
-0.09191282838582993,
0.18175671994686127,
0.41116201877593994,
-0.21313603222370148,
-0.33869075775146484,
-0.09982490539550781,
0.07667756080627441,
0.02303089201450348,
-0.34516942501068115,
0.24895040690898895,
-0.2087193727493286,
-0.08142555505037308,
-0.016801320016384125,
0.01260467804968357,
0.2891448736190796,
0.08713622391223907,
-0.10032211989164352,
-0.34716054797172546,
0.11817339062690735,
0.17144235968589783,
0.04467063769698143,
0.14604556560516357,
-0.1453319638967514,
0.23974299430847168,
0.4603738486766815,
0.241898775100708,
0.020694516599178314,
0.1542869210243225,
0.007500976324081421,
-0.012075519189238548,
0.19270068407058716,
0.2944793701171875,
0.26429855823516846,
0.17001010477542877,
0.0071646422147750854,
0.1487111747264862,
-0.20408740639686584,
-0.23788924515247345,
0.2634374499320984,
-0.05714212357997894,
-0.06981996446847916,
0.2015601396560669,
0.007875094190239906,
0.031588245183229446,
-0.4701763093471527,
0.22325894236564636,
0.11752771586179733,
0.11885865777730942,
-0.4394686222076416,
-0.13642668724060059,
-0.31873732805252075,
-0.29315805435180664,
-0.09770882874727249,
-0.3705669343471527,
-0.20302380621433258,
-0.34556853771209717,
0.21076227724552155,
0.3594704568386078,
-0.3241574466228485,
0.3513949513435364,
-0.010647907853126526,
0.11032027751207352,
-0.17528966069221497,
-0.06634560972452164,
-0.2183724194765091,
0.08772400766611099,
-0.12081723660230637,
0.1884772926568985,
0.22291751205921173,
-0.1322890669107437,
0.32552123069763184,
-0.25615358352661133,
-0.013908120803534985,
-0.3440484404563904,
-0.6190258860588074,
0.33646664023399353,
-0.23875309526920319,
0.10931090265512466,
0.4111848473548889,
0.19686082005500793,
-0.27674347162246704,
-0.0693943127989769,
0.18352572619915009,
-0.11505581438541412,
-0.3981413245201111,
-0.07296248525381088,
-0.06976040452718735,
-0.10489346832036972,
-0.4716019034385681,
-0.2579157054424286,
0.0868392363190651,
-0.34329894185066223,
0.4070410132408142,
-0.14281496405601501,
0.1380080282688141,
0.2945156693458557,
-0.016223086044192314,
-0.005249891895800829,
-0.6467402577400208,
-0.003592526540160179,
-0.38304609060287476,
-0.2717204689979553,
0.1271979659795761,
-0.21352018415927887,
-0.577483594417572,
0.10255512595176697,
0.2105305790901184,
0.4101991057395935,
-0.1533510535955429,
-0.014384035021066666,
-0.21024413406848907,
-0.023533618077635765,
0.07979561388492584,
0.040334928780794144,
0.005426356568932533,
0.24585916101932526,
-0.004795240703970194,
-0.13466651737689972,
-0.24413573741912842,
-0.1310114562511444,
0.18526244163513184,
-0.1582164168357849,
0.07406512647867203,
-0.08618796616792679,
-0.06896425783634186,
0.10375192761421204,
0.17347805202007294,
0.31085696816444397,
-0.1573045551776886,
0.40184125304222107,
-0.2004523128271103,
0.4400576949119568,
-0.05945805460214615,
-0.35031986236572266,
-0.044098030775785446,
0.1477423757314682,
0.22950361669063568,
0.18867528438568115,
0.048316508531570435,
0.304864764213562,
-0.00447043776512146,
0.12206299602985382,
-0.11026813089847565,
-0.22308309376239777,
0.1006716638803482,
0.15841026604175568,
-0.022654704749584198,
0.18803556263446808,
0.08791137486696243,
0.051051538437604904,
-0.08473612368106842,
0.16424117982387543,
0.303242027759552,
0.08043665438890457,
0.0584876574575901,
-0.20538629591464996,
-0.09321717172861099,
-0.2591851055622101,
0.05194792523980141,
0.12406934052705765,
0.11752581596374512,
-0.2220553308725357,
-0.16780051589012146,
-0.13668182492256165,
0.02590792626142502,
0.3866385221481323,
0.0817563459277153,
0.02527141012251377,
-0.04397136718034744,
-0.11898355931043625,
-0.21135365962982178,
0.06170323118567467,
-0.09406644105911255,
-0.19774869084358215,
0.25089335441589355,
0.4764469563961029,
-0.42761334776878357,
-0.2527722418308258,
-0.12469556927680969,
-0.2064695805311203,
0.06330002844333649,
0.08286433666944504,
-0.2682253420352936,
-0.2212345004081726,
-0.3146591782569885,
0.23228558897972107,
0.3834853172302246,
0.21872766315937042,
0.0070486487820744514,
-0.08224135637283325,
-0.04813321679830551,
-0.20732378959655762,
0.10961230844259262,
0.31323865056037903,
0.5027958750724792,
-0.0831327959895134,
0.2524188160896301,
0.01619887724518776,
0.38014453649520874,
0.42271578311920166,
0.4933127760887146,
-0.005211297422647476,
-0.17453420162200928,
0.14133751392364502,
-0.12392623722553253,
0.07726138830184937,
0.17703752219676971,
-0.01852543279528618,
0.3014064431190491,
0.026400744915008545,
0.09321879595518112,
-0.3929048180580139,
0.11337040364742279,
0.11296418309211731,
0.011800556443631649,
0.022007517516613007,
-0.15348057448863983,
0.22332924604415894,
0.2042340487241745,
-0.14860402047634125,
0.4597409665584564,
0.6714467406272888,
-0.22575707733631134,
-0.04873894155025482,
0.12059837579727173,
0.8528384566307068,
0.25188249349594116,
0.04291287064552307,
0.20610663294792175,
-0.2515713572502136,
0.6047801375389099,
-0.0015753917396068573,
0.06130930781364441,
-0.4119839072227478,
-0.17607629299163818,
-0.05715920776128769,
0.02055509015917778,
0.11473855376243591,
-0.1476961374282837,
-0.15535682439804077,
0.07735302299261093,
-0.018707871437072754,
0.3489993214607239,
-0.1196698248386383,
0.19764801859855652,
-0.4927356243133545,
-0.33215320110321045,
-0.42038896679878235,
0.22961100935935974,
0.002196710556745529,
0.2506381869316101,
-0.1023087128996849,
-0.1913052797317505,
-0.1941307634115219,
-0.4158700704574585,
-0.40109193325042725,
0.001109108328819275,
-0.2648986279964447,
-0.15332761406898499,
0.019120996817946434,
0.24209262430667877,
0.10266710817813873,
0.09323462843894958,
0.18665088713169098,
0.18717847764492035,
-0.4070735573768616,
0.1694573611021042,
-0.17734679579734802,
-0.049179933965206146,
-0.24525116384029388,
-0.08374273031949997,
0.25733309984207153,
-0.1417749673128128,
-0.06020892411470413,
-0.3352383077144623,
0.024506397545337677,
0.124664306640625,
-0.1660080999135971,
0.16085508465766907,
-0.19981782138347626,
-0.4368302524089813,
-0.1088140606880188,
-0.22433847188949585,
-0.0062484946101903915,
-0.2410564422607422,
0.21289478242397308,
0.13667039573192596,
-0.10504473000764847,
0.04265447333455086,
0.3543335795402527,
-0.11707994341850281,
-0.18657994270324707,
0.5430390238761902,
-0.22286644577980042,
-0.10680056363344193,
0.19421741366386414,
0.0060548968613147736,
-0.1462678611278534,
-0.31126898527145386,
-0.1158607006072998,
0.3337946832180023,
-0.5976511240005493,
-0.09301792085170746,
0.0441778227686882,
-0.3685709238052368,
0.1350216418504715,
0.3777250051498413,
0.289747953414917,
0.03334292024374008,
0.112433522939682,
-0.23711252212524414,
-0.31913119554519653,
0.37033867835998535,
-0.26997101306915283,
0.20674104988574982,
0.1580359935760498,
0.11086875200271606,
0.12841738760471344,
-0.09801917523145676,
-0.4358908236026764,
0.042948849499225616,
-0.12368576973676682,
-0.030934542417526245,
-0.07832752913236618,
-0.07627018541097641,
0.31244853138923645,
-0.3948107063770294,
0.1771312654018402,
0.4427638053894043,
-0.2185276448726654,
-0.289815753698349,
-0.2879902124404907,
0.06536257266998291,
0.17614394426345825,
0.06907285749912262,
-0.12996694445610046,
0.2524524927139282,
-0.1940789371728897,
-0.06183266639709473,
0.29202839732170105,
-0.06132081523537636,
0.16455838084220886,
0.053924646228551865,
0.02869078516960144,
0.07860973477363586,
0.08898916840553284,
-0.15267199277877808,
0.12072750180959702,
0.043514005839824677,
-0.06613658368587494,
-0.14106781780719757,
-0.34723392128944397,
-0.13104315102100372,
0.09119458496570587,
0.2085515558719635,
0.2953266501426697,
0.07942802459001541,
0.22617894411087036,
0.02680148184299469,
0.034031111747026443,
0.1275564432144165,
0.46988606452941895,
0.12761540710926056,
-0.034999746829271317,
-0.23627664148807526,
0.14456495642662048,
0.33082717657089233,
-0.2993367910385132,
-0.22583429515361786,
-0.042073462158441544,
0.16826403141021729,
0.13668888807296753,
0.11579200625419617,
0.4066579341888428,
0.023752152919769287,
-0.2918594479560852,
0.1389942169189453,
0.5619255900382996,
-0.22179530560970306,
0.1833282858133316,
0.3228203356266022,
-0.25001999735832214,
0.1605648696422577,
0.15839315950870514,
-0.06451737880706787,
0.2824791371822357,
0.10279004275798798,
-0.2184276282787323,
0.4639561176300049,
-0.0315665677189827,
0.038490891456604004,
0.314022034406662,
-0.33265823125839233,
0.009763669222593307,
0.32895928621292114,
0.03769811987876892,
0.10040056705474854,
0.000028364360332489014,
0.45690616965293884,
-0.2991240620613098,
-0.3918360769748688,
-0.2621476948261261,
0.2929898202419281,
-0.3528449833393097,
-0.04396112263202667,
-0.3250166177749634,
-0.09256510436534882,
-0.014086376875638962,
-0.08046688139438629,
0.09105785936117172,
0.04871409386396408,
0.22301113605499268,
-0.08863456547260284,
-0.1958416849374771,
-0.34469401836395264,
-0.3321562111377716,
0.4406455457210541,
0.2711195647716522,
-0.14407281577587128,
0.2791992127895355,
0.14152280986309052,
-0.247955322265625,
0.045806318521499634,
0.5025595426559448,
0.45639023184776306,
0.03940051421523094,
0.42441773414611816,
-0.008886939845979214,
-0.167917400598526,
-0.005867943167686462,
-0.06368730962276459,
0.290289044380188,
0.08276510238647461,
-0.014000441879034042,
0.25721532106399536,
0.2633149325847626,
-0.260303258895874,
-0.17553183436393738,
-0.18111927807331085,
0.34494128823280334,
0.09518024325370789,
0.14572516083717346,
-0.27921342849731445,
0.03662905842065811,
-0.1658555418252945,
0.08898370712995529,
-0.1691882312297821,
0.08269527554512024,
0.321026474237442,
0.12777204811573029,
0.26749351620674133,
-0.2640042304992676,
0.1302947700023651,
0.36485522985458374,
0.5020937919616699,
0.11437208950519562,
-0.3183475434780121,
-0.16897232830524445,
-0.12563270330429077,
-0.4871743321418762,
0.21675816178321838,
0.04946117103099823,
0.06443857401609421,
-0.12269474565982819,
-0.015415950678288937,
-0.07876823097467422,
-0.10747390985488892,
0.1898912638425827,
0.08178706467151642,
0.201026052236557,
-0.1532764583826065,
-0.16458097100257874,
0.16767223179340363,
-0.09980407357215881,
-0.18355022370815277,
0.1689995378255844,
-0.06710228323936462,
0.2642251253128052,
0.01789933070540428,
0.10489311069250107,
-0.1704394817352295,
0.21411949396133423,
-0.2935876250267029,
-0.13757099211215973,
0.13896438479423523,
0.3079677224159241,
0.27029818296432495,
-0.188563734292984,
-0.09547615051269531,
-0.2115517258644104,
-0.0749724805355072,
-0.30042552947998047,
0.3304066061973572,
-0.02438446879386902,
0.35735273361206055,
0.0393466055393219,
-0.25781115889549255,
-0.21300268173217773,
0.164242684841156,
0.2516409754753113,
0.02531709522008896,
-0.4320336580276489,
0.24509575963020325,
-0.06431108713150024,
-0.15156596899032593,
0.06944575905799866,
0.3356349468231201,
0.052963439375162125,
-0.0072171567007899284,
-0.24037577211856842,
-0.6630574464797974,
0.44920533895492554,
-0.219377800822258,
0.06415686011314392,
0.08679413050413132,
0.18187102675437927,
0.4167036712169647,
-0.2815217971801758,
-0.9825678467750549,
-0.007767967879772186,
0.06828359514474869,
-0.05652029067277908,
-0.15280449390411377,
0.07885628938674927,
-0.11255323886871338,
-0.014691714197397232,
-0.1797003298997879,
0.4986152946949005,
0.2802028954029083,
-0.3285660147666931,
0.387314110994339,
-0.007624231278896332
] |
https://github.com/huggingface/datasets/issues/4804 | streaming dataset with concatenating splits raises an error | Hi! Only the name of a particular split ("train", "test", ...) is supported as a split pattern if `streaming=True`. We plan to address this limitation soon. | ## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 26 | streaming dataset with concatenating splits raises an error
## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Hi! Only the name of a particular split ("train", "test", ...) is supported as a split pattern if `streaming=True`. We plan to address this limitation soon. | [
-0.6321982145309448,
-0.14114195108413696,
-0.04174860566854477,
0.08145271986722946,
0.20941485464572906,
0.05047117918729782,
0.479400634765625,
0.28783243894577026,
-0.2424594759941101,
0.17925235629081726,
-0.017328202724456787,
0.1898089498281479,
-0.09531179815530777,
0.3461282551288605,
-0.08713344484567642,
-0.31257113814353943,
0.1326899379491806,
0.09041334688663483,
0.08450498431921005,
0.14278283715248108,
-0.14351242780685425,
-0.023240460082888603,
-0.3679580092430115,
-0.09133197367191315,
-0.40218955278396606,
-0.04586217552423477,
-0.10513419657945633,
0.017850227653980255,
0.027569513767957687,
-0.20895890891551971,
0.01969047449529171,
-0.0005026273429393768,
0.164079487323761,
0.44774872064590454,
-0.00011095267836935818,
0.0779910683631897,
0.4131243824958801,
-0.10834360122680664,
-0.4984458088874817,
-0.055337563157081604,
-0.5506054759025574,
-0.07137715816497803,
-0.10943686217069626,
-0.12211977690458298,
-0.010247483849525452,
0.025884270668029785,
-0.07658500224351883,
-0.5291568040847778,
0.44097352027893066,
0.3007289469242096,
0.23769395053386688,
0.27913448214530945,
-0.09573502838611603,
-0.12944872677326202,
0.09867383539676666,
0.10195069760084152,
-0.07084842771291733,
0.13915441930294037,
-0.2634509801864624,
0.13526590168476105,
0.10904058068990707,
0.34543418884277344,
-0.11192815750837326,
-0.08768503367900848,
-0.1672039031982422,
0.12974333763122559,
-0.1927567422389984,
-0.4399513304233551,
0.15471504628658295,
0.15152564644813538,
0.17866311967372894,
-0.32986846566200256,
-0.30534395575523376,
-0.34011104702949524,
0.10557775944471359,
-0.5165420174598694,
0.10213608294725418,
0.28906261920928955,
-0.11278074979782104,
0.19496019184589386,
-0.23868748545646667,
0.07801830023527145,
-0.14517709612846375,
0.006375543773174286,
0.0594535693526268,
0.5142806768417358,
0.0010316185653209686,
0.07943762093782425,
-0.03506177291274071,
-0.02441547065973282,
0.2601577043533325,
-0.35200899839401245,
-0.2718842327594757,
0.03988027572631836,
-0.4475346803665161,
0.007109593600034714,
-0.28623825311660767,
-0.2309044897556305,
0.03416278213262558,
0.260595440864563,
0.1341441422700882,
-0.1459803581237793,
0.19300182163715363,
0.08796289563179016,
0.22253860533237457,
-0.006880636792629957,
0.050492167472839355,
0.44383662939071655,
0.048815108835697174,
0.2955577075481415,
0.2136889100074768,
-0.04920891672372818,
-0.0700337290763855,
-0.15503761172294617,
-0.08859692513942719,
0.10496045649051666,
0.2228563278913498,
0.10063478350639343,
-0.6612512469291687,
-0.0019809240475296974,
-0.5391613245010376,
-0.12718018889427185,
0.1993342638015747,
0.11154861748218536,
-0.015831343829631805,
0.26071271300315857,
-0.040660690516233444,
0.15236277878284454,
0.01464611105620861,
-0.22187848389148712,
-0.2896678149700165,
-0.11959320306777954,
-0.10523262619972229,
0.07047655433416367,
0.03576406463980675,
-0.519378662109375,
0.3007468581199646,
0.2353753000497818,
0.16311156749725342,
0.028164714574813843,
-0.148494154214859,
-0.25725504755973816,
-0.1265144944190979,
0.2497541606426239,
0.22382903099060059,
0.0023144353181123734,
-0.006653692573308945,
-0.1653691828250885,
0.15748411417007446,
0.08831379562616348,
-0.0898340716958046,
-0.3434041738510132,
-0.18862617015838623,
0.27090203762054443,
0.10785378515720367,
0.13533832132816315,
-0.09875278919935226,
0.2831834852695465,
0.4593622088432312,
-0.08375950902700424,
-0.05348043888807297,
-0.09785421192646027,
-0.3089084029197693,
-0.23020566999912262,
0.4010993540287018,
0.3424554169178009,
-0.29581236839294434,
-0.10230162739753723,
-0.26069140434265137,
0.009286386892199516,
0.477211058139801,
0.23707294464111328,
-0.16336724162101746,
0.12128214538097382,
-0.22712533175945282,
0.3221936821937561,
0.415292888879776,
0.07928533852100372,
-0.24931785464286804,
0.3368719518184662,
-0.10108227282762527,
0.06570747494697571,
0.28340375423431396,
-0.12940800189971924,
0.4828002452850342,
-0.13444273173809052,
0.343913733959198,
0.45693671703338623,
-0.21622882783412933,
-0.06800179928541183,
-0.24593961238861084,
-0.09055879712104797,
0.25305354595184326,
-0.03157318755984306,
-0.011802352964878082,
0.13431410491466522,
0.03047245740890503,
0.2878183126449585,
0.3522031903266907,
-0.07159756124019623,
0.06545254588127136,
-0.010369371622800827,
0.13698555529117584,
-0.20868615806102753,
-0.1686747819185257,
-0.15003223717212677,
-0.388465940952301,
-0.08859176933765411,
0.06989461928606033,
-0.123708575963974,
-0.12744465470314026,
-0.22886712849140167,
-0.26988211274147034,
0.17884641885757446,
-0.17927619814872742,
-0.09218624234199524,
0.17867720127105713,
0.38342761993408203,
-0.05136767029762268,
-0.1447424292564392,
-0.20937678217887878,
0.5001634359359741,
-0.21020784974098206,
0.04791037365794182,
-0.10369019210338593,
0.588805615901947,
-0.025010881945490837,
-0.25891539454460144,
-0.03466961532831192,
0.11959914863109589,
0.2442091703414917,
0.06219219043850899,
-0.22252896428108215,
0.5832313895225525,
0.0029613098595291376,
0.004172876477241516,
-0.2923477590084076,
-0.3430803418159485,
0.308335542678833,
-0.12237301468849182,
-0.04759205877780914,
0.17698653042316437,
0.0977313220500946,
-0.0538443960249424,
-0.04309458285570145,
0.15333735942840576,
-0.2686194181442261,
0.2295253872871399,
-0.01489647850394249,
0.13499638438224792,
0.18540288507938385,
0.06680215895175934,
-0.008723348379135132,
-0.3696154057979584,
0.2542189061641693,
-0.1677754670381546,
0.13775378465652466,
-0.05922825634479523,
-0.29148757457733154,
0.2581196129322052,
0.32370907068252563,
0.042216379195451736,
-0.05597250163555145,
0.11992765218019485,
-0.2054101824760437,
-0.0632973238825798,
0.13234807550907135,
0.4003637135028839,
0.6168562173843384,
0.1611463576555252,
0.04695857688784599,
0.2131185233592987,
-0.03197005018591881,
-0.24087031185626984,
0.4670230746269226,
0.13168379664421082,
0.02759767696261406,
0.3150327801704407,
0.10084233433008194,
-0.0029757963493466377,
-0.07357656210660934,
-0.19940690696239471,
0.1765262633562088,
0.13475856184959412,
-0.34393730759620667,
0.2438054233789444,
-0.3384513854980469,
-0.22435680031776428,
-0.2926764190196991,
-0.4012452960014343,
-0.08199019730091095,
-0.3557222783565521,
-0.026643410325050354,
0.338234007358551,
-0.22720849514007568,
0.2543138265609741,
-0.06360040605068207,
-0.01710467040538788,
0.27176928520202637,
0.03082147240638733,
-0.10186119377613068,
0.08965151757001877,
-0.16461879014968872,
0.1233443021774292,
0.24346201121807098,
0.05693760886788368,
0.2285364717245102,
-0.0632861778140068,
-0.2566004991531372,
-0.21886636316776276,
-0.09448325634002686,
0.10676932334899902,
-0.15501956641674042,
0.12074563652276993,
0.18275757133960724,
0.061237744987010956,
0.05801165848970413,
-0.7690391540527344,
0.1607552319765091,
0.1800794005393982,
-0.10407441854476929,
0.10896509885787964,
0.1644430011510849,
0.00704141054302454,
-0.3102668225765228,
-0.2802092730998993,
-0.267001211643219,
-0.48048651218414307,
-0.13582566380500793,
-0.12648791074752808,
0.13719859719276428,
0.19461920857429504,
0.18804168701171875,
0.03781528398394585,
0.22483719885349274,
-0.17842808365821838,
-0.27896660566329956,
-0.08943909406661987,
0.23005838692188263,
-0.20679187774658203,
-0.22069703042507172,
-0.059874583035707474,
-0.20348161458969116,
0.07288912683725357,
0.3061237335205078,
-0.30766528844833374,
0.2889643609523773,
-0.0049516428261995316,
0.01196211576461792,
-0.10222689807415009,
-0.023704832419753075,
-0.000026084482669830322,
0.024331482127308846,
-0.0031417682766914368,
-0.12257073819637299,
-0.07904785871505737,
0.03688402473926544,
-0.08856124430894852,
0.44953036308288574,
-0.04746458679437637,
0.4736979603767395,
-0.007629662752151489,
0.5301905870437622,
0.5804372429847717,
-0.12331339716911316,
0.24048909544944763,
0.01378623303025961,
0.2292431741952896,
-0.24466830492019653,
-0.40969017148017883,
0.06347756832838058,
-0.1663859486579895,
-0.14199411869049072,
0.16426363587379456,
-0.0641411617398262,
-0.19380895793437958,
-0.1602243036031723,
0.07374797761440277,
0.07102126628160477,
-0.2589398920536041,
0.08115687221288681,
-0.3646129071712494,
0.2762235701084137,
-0.06741631031036377,
0.16557100415229797,
0.0871015191078186,
-0.03987041860818863,
-0.2975805401802063,
0.005375944077968597,
0.03587133437395096,
-0.17089882493019104,
-0.03437717258930206,
-0.014945843257009983,
-0.3522477149963379,
0.1994679719209671,
0.32571643590927124,
0.5231634378433228,
-0.12891633808612823,
-0.08084631711244583,
-0.008034467697143555,
0.20304305851459503,
0.4523876905441284,
-0.2733081579208374,
-0.14703494310379028,
0.19016797840595245,
0.29503920674324036,
-0.08633024990558624,
-0.24115289747714996,
-0.21266591548919678,
0.23222073912620544,
0.37552115321159363,
0.20468270778656006,
-0.42690563201904297,
0.023436034098267555,
0.6041786670684814,
0.025245318189263344,
-0.014792017638683319,
-0.056408874690532684,
-0.3534018397331238,
-0.05746240168809891,
-0.28812217712402344,
-0.03546086698770523,
0.025128332898020744,
0.2678385376930237,
-0.24271821975708008,
0.12381234765052795,
-0.06184554845094681,
-0.27513572573661804,
0.03566955029964447,
0.01800592988729477,
0.41587650775909424,
0.0633154958486557,
0.32827916741371155,
0.021457180380821228,
0.21577951312065125,
0.26685819029808044,
0.46742236614227295,
0.12913745641708374,
-0.5032018423080444,
0.08085979521274567,
0.06014273688197136,
0.36980223655700684,
0.23490579426288605,
-0.18578019738197327,
0.15366841852664948,
0.09129639714956284,
0.25531983375549316,
-0.05576829984784126,
0.3269638121128082,
0.3865131735801697,
-0.030617933720350266,
-0.39755967259407043,
-0.4764212369918823,
0.3114227056503296,
0.08015179634094238,
0.08952419459819794,
0.32658618688583374,
-0.27588915824890137,
-0.4034024477005005,
0.2228097915649414,
-0.15993565320968628,
0.8058584928512573,
0.46266281604766846,
-0.03649646416306496,
0.41400569677352905,
-0.17681381106376648,
0.3964121639728546,
0.020929254591464996,
0.10234398394823074,
-0.20078104734420776,
-0.3187921941280365,
-0.013019813224673271,
-0.14442461729049683,
0.03216330334544182,
-0.2286764532327652,
-0.5951720476150513,
0.21916621923446655,
-0.4626978635787964,
0.3948855400085449,
0.028004415333271027,
-0.021911678835749626,
-0.2606979012489319,
-0.19974888861179352,
-0.42065176367759705,
0.1158556342124939,
-0.1702437400817871,
-0.058456066995859146,
-0.01801682822406292,
-0.23294493556022644,
0.1777074784040451,
-0.25629371404647827,
-0.4652646780014038,
0.3867843449115753,
-0.19169726967811584,
0.20774246752262115,
-0.22456994652748108,
-0.2530982494354248,
0.1696912944316864,
-0.03428902104496956,
0.13424372673034668,
0.12530003488063812,
0.00797412171959877,
-0.058358121663331985,
0.09612276405096054,
0.07938289642333984,
-0.1361183524131775,
-0.0799703523516655,
0.2686736285686493,
0.06690239906311035,
-0.1916966289281845,
0.21230804920196533,
0.11325065791606903,
-0.22939160466194153,
0.037004753947257996,
0.07542876899242401,
0.4487966299057007,
-0.37731918692588806,
0.12365061044692993,
0.15732495486736298,
0.08523999154567719,
-0.3589434325695038,
0.15070608258247375,
-0.14687567949295044,
-0.35021209716796875,
0.03006017580628395,
-0.1414206326007843,
-0.01603635400533676,
-0.17727643251419067,
0.2605476975440979,
0.211231529712677,
0.0872870534658432,
0.4170054793357849,
0.006453782320022583,
-0.18731360137462616,
-0.1979379653930664,
0.15604323148727417,
-0.28195157647132874,
-0.3373079299926758,
0.2997111678123474,
-0.11603749543428421,
-0.09783358871936798,
-0.24043196439743042,
0.07716693729162216,
-0.004327762871980667,
0.27825209498405457,
-0.19830374419689178,
-0.2984943985939026,
-0.23193655908107758,
-0.007459603250026703,
-0.2110607773065567,
0.25918048620224,
-0.09851406514644623,
0.4573480486869812,
-0.11472371220588684,
0.05342169478535652,
-0.32027146220207214,
-0.25194308161735535,
-0.06606213748455048,
0.15265297889709473,
-0.177877739071846,
-0.1280551254749298,
0.25175511837005615,
0.04425782710313797,
0.18423044681549072,
0.3637903332710266,
-0.03132036328315735,
-0.2227555513381958,
-0.07921253889799118,
0.09799961000680923,
0.1035732552409172,
-0.2779183089733124,
-0.18579290807247162,
0.01170634850859642,
-0.2587459981441498,
-0.13266997039318085,
0.12912717461585999,
-0.023715507239103317,
0.06840766221284866,
-0.2297123372554779,
0.3573857545852661,
0.05686953291296959,
-0.053442422300577164,
-0.0654265433549881,
-0.16103754937648773,
0.24536681175231934,
-0.2343636453151703,
0.356227844953537,
-0.1409565955400467,
-0.13001644611358643,
-0.2532438039779663,
-0.07421249896287918,
0.2414993792772293,
0.11215952783823013,
0.24731451272964478,
-0.49813520908355713,
-0.24365851283073425,
-0.2189672738313675,
0.3536674976348877,
0.41086050868034363,
-0.12076025456190109,
-0.14505131542682648,
0.17978304624557495,
0.20251592993736267,
-0.26670533418655396,
-0.045766666531562805,
0.016128240153193474,
0.12853308022022247,
0.034611497074365616,
0.20173700153827667,
-0.004785399883985519,
-0.06902137398719788,
-0.264254629611969,
0.18090283870697021,
0.06071910634636879,
0.10251981019973755,
0.5367286801338196,
0.6329730749130249,
-0.01127156987786293,
0.27299952507019043,
-0.1349080204963684,
-0.030642695724964142,
0.09335556626319885,
0.20323939621448517,
-0.1457754671573639,
0.4192807078361511,
0.15708047151565552,
-0.2792627513408661,
0.2592714726924896,
-0.22759291529655457,
-0.17281614243984222,
0.11088477075099945,
-0.23892489075660706,
0.2962202727794647,
0.08786151558160782,
0.20817913115024567,
-0.3181532621383667,
-0.150652676820755,
-0.3374267816543579,
0.11543889343738556,
-0.20396703481674194,
0.056861694902181625,
-0.15335002541542053,
-0.007176220417022705,
-0.2921881079673767,
-0.05915655940771103,
0.26410403847694397,
0.1432996541261673,
0.4045107066631317,
0.0012921392917633057,
-0.01631253957748413,
-0.13680163025856018,
-0.023909281939268112,
0.4646574556827545,
0.14825360476970673,
-0.3498161733150482,
0.26501700282096863,
0.42951488494873047,
0.06717901676893234,
0.14655978977680206,
0.33493703603744507,
0.5874294638633728,
0.3272944390773773,
0.05333578586578369,
-0.08764499425888062,
0.1400020271539688,
-0.061055801808834076,
0.1924738883972168,
0.189984530210495,
0.022789545357227325,
-0.10124893486499786,
0.29767724871635437,
0.16093061864376068,
-0.19997817277908325,
0.26589250564575195,
0.33890706300735474,
0.14320117235183716,
-0.24844495952129364,
0.3455140292644501,
-0.1566695123910904,
0.10125146061182022,
-0.10161703824996948,
-0.12921014428138733,
-0.3342631161212921,
0.09740395098924637,
0.5170649886131287,
-0.08059709519147873,
0.16415321826934814,
0.04898637533187866,
0.09697520732879639,
0.13395199179649353,
0.54996258020401,
0.21038663387298584,
0.07812332361936569,
-0.2744431495666504,
-0.1800885796546936,
-0.23281271755695343,
-0.012684665620326996,
0.07262793183326721,
0.08381577581167221,
-0.046202100813388824,
0.12779226899147034,
-0.0991099551320076,
0.29868870973587036,
0.10057874023914337,
0.0543108694255352,
-0.0715828612446785,
0.11927111446857452,
-0.39045238494873047,
-0.2265530377626419,
0.049492113292217255,
-0.08554013818502426,
0.06545983254909515,
-0.44153857231140137,
0.30783647298812866,
-0.23773492872714996,
0.05024257302284241,
0.15205058455467224,
-0.06348204612731934,
0.2696840465068817,
-0.05517397075891495,
-0.05760855972766876,
0.33022576570510864,
0.2599652409553528,
-0.16414985060691833,
-0.01412256620824337,
-0.2613568603992462,
-0.3359956741333008,
-0.2617741823196411,
0.1609172224998474,
0.331452876329422,
0.5197641849517822,
-0.15970773994922638,
-0.11935685575008392,
-0.2188529372215271,
0.26714369654655457,
0.21775569021701813,
-0.15578478574752808,
-0.21847715973854065,
0.11407410353422165,
-0.19730430841445923,
0.2426188737154007,
0.06339404731988907,
0.14740726351737976,
-0.2247309684753418,
0.19963964819908142,
0.0211789608001709,
-0.6850951910018921,
0.6629207730293274,
-0.39121755957603455,
-0.39193016290664673,
-0.1927276998758316,
0.20252195000648499,
0.40288981795310974,
0.0899529755115509,
-0.5504664778709412,
0.0017788782715797424,
0.28704777359962463,
-0.29463014006614685,
-0.10275629162788391,
0.21245177090168,
0.2310318946838379,
0.02797892317175865,
-0.0407988615334034,
0.3072230815887451,
0.08521687984466553,
-0.4225626289844513,
0.4449518620967865,
-0.3486725091934204
] |
https://github.com/huggingface/datasets/issues/4804 | streaming dataset with concatenating splits raises an error | yes, same error occurs.
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```python
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-3-a6ae02d63899>](https://localhost:8080/#) in <cell line: 5>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1265 splits_generator = splits_generators[split]
1266 else:
-> 1267 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1268
1269 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['train', 'validation']
```
google colab, `datasets==2.12.0`
```
- huggingface_hub version: 0.14.1
- Platform: Linux-5.10.147+-x86_64-with-glibc2.31
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: 2.7.12
- Tensorflow: 2.12.0
- Torch: 2.0.0+cu118
- Jinja2: 3.1.2
- Graphviz: 0.20.1
- Pydot: 1.4.2
- Pillow: 8.4.0
- hf_transfer: N/A
- gradio: N/A
- ENDPOINT: https://huggingface.co/
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| ## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 201 | streaming dataset with concatenating splits raises an error
## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
yes, same error occurs.
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```python
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-3-a6ae02d63899>](https://localhost:8080/#) in <cell line: 5>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.10/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1265 splits_generator = splits_generators[split]
1266 else:
-> 1267 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1268
1269 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['train', 'validation']
```
google colab, `datasets==2.12.0`
```
- huggingface_hub version: 0.14.1
- Platform: Linux-5.10.147+-x86_64-with-glibc2.31
- Python version: 3.10.11
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: 2.7.12
- Tensorflow: 2.12.0
- Torch: 2.0.0+cu118
- Jinja2: 3.1.2
- Graphviz: 0.20.1
- Pydot: 1.4.2
- Pillow: 8.4.0
- hf_transfer: N/A
- gradio: N/A
- ENDPOINT: https://huggingface.co/
- HUGGINGFACE_HUB_CACHE: /root/.cache/huggingface/hub
- HUGGINGFACE_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
```
| [
-0.6321982145309448,
-0.14114195108413696,
-0.04174860566854477,
0.08145271986722946,
0.20941485464572906,
0.05047117918729782,
0.479400634765625,
0.28783243894577026,
-0.2424594759941101,
0.17925235629081726,
-0.017328202724456787,
0.1898089498281479,
-0.09531179815530777,
0.3461282551288605,
-0.08713344484567642,
-0.31257113814353943,
0.1326899379491806,
0.09041334688663483,
0.08450498431921005,
0.14278283715248108,
-0.14351242780685425,
-0.023240460082888603,
-0.3679580092430115,
-0.09133197367191315,
-0.40218955278396606,
-0.04586217552423477,
-0.10513419657945633,
0.017850227653980255,
0.027569513767957687,
-0.20895890891551971,
0.01969047449529171,
-0.0005026273429393768,
0.164079487323761,
0.44774872064590454,
-0.00011095267836935818,
0.0779910683631897,
0.4131243824958801,
-0.10834360122680664,
-0.4984458088874817,
-0.055337563157081604,
-0.5506054759025574,
-0.07137715816497803,
-0.10943686217069626,
-0.12211977690458298,
-0.010247483849525452,
0.025884270668029785,
-0.07658500224351883,
-0.5291568040847778,
0.44097352027893066,
0.3007289469242096,
0.23769395053386688,
0.27913448214530945,
-0.09573502838611603,
-0.12944872677326202,
0.09867383539676666,
0.10195069760084152,
-0.07084842771291733,
0.13915441930294037,
-0.2634509801864624,
0.13526590168476105,
0.10904058068990707,
0.34543418884277344,
-0.11192815750837326,
-0.08768503367900848,
-0.1672039031982422,
0.12974333763122559,
-0.1927567422389984,
-0.4399513304233551,
0.15471504628658295,
0.15152564644813538,
0.17866311967372894,
-0.32986846566200256,
-0.30534395575523376,
-0.34011104702949524,
0.10557775944471359,
-0.5165420174598694,
0.10213608294725418,
0.28906261920928955,
-0.11278074979782104,
0.19496019184589386,
-0.23868748545646667,
0.07801830023527145,
-0.14517709612846375,
0.006375543773174286,
0.0594535693526268,
0.5142806768417358,
0.0010316185653209686,
0.07943762093782425,
-0.03506177291274071,
-0.02441547065973282,
0.2601577043533325,
-0.35200899839401245,
-0.2718842327594757,
0.03988027572631836,
-0.4475346803665161,
0.007109593600034714,
-0.28623825311660767,
-0.2309044897556305,
0.03416278213262558,
0.260595440864563,
0.1341441422700882,
-0.1459803581237793,
0.19300182163715363,
0.08796289563179016,
0.22253860533237457,
-0.006880636792629957,
0.050492167472839355,
0.44383662939071655,
0.048815108835697174,
0.2955577075481415,
0.2136889100074768,
-0.04920891672372818,
-0.0700337290763855,
-0.15503761172294617,
-0.08859692513942719,
0.10496045649051666,
0.2228563278913498,
0.10063478350639343,
-0.6612512469291687,
-0.0019809240475296974,
-0.5391613245010376,
-0.12718018889427185,
0.1993342638015747,
0.11154861748218536,
-0.015831343829631805,
0.26071271300315857,
-0.040660690516233444,
0.15236277878284454,
0.01464611105620861,
-0.22187848389148712,
-0.2896678149700165,
-0.11959320306777954,
-0.10523262619972229,
0.07047655433416367,
0.03576406463980675,
-0.519378662109375,
0.3007468581199646,
0.2353753000497818,
0.16311156749725342,
0.028164714574813843,
-0.148494154214859,
-0.25725504755973816,
-0.1265144944190979,
0.2497541606426239,
0.22382903099060059,
0.0023144353181123734,
-0.006653692573308945,
-0.1653691828250885,
0.15748411417007446,
0.08831379562616348,
-0.0898340716958046,
-0.3434041738510132,
-0.18862617015838623,
0.27090203762054443,
0.10785378515720367,
0.13533832132816315,
-0.09875278919935226,
0.2831834852695465,
0.4593622088432312,
-0.08375950902700424,
-0.05348043888807297,
-0.09785421192646027,
-0.3089084029197693,
-0.23020566999912262,
0.4010993540287018,
0.3424554169178009,
-0.29581236839294434,
-0.10230162739753723,
-0.26069140434265137,
0.009286386892199516,
0.477211058139801,
0.23707294464111328,
-0.16336724162101746,
0.12128214538097382,
-0.22712533175945282,
0.3221936821937561,
0.415292888879776,
0.07928533852100372,
-0.24931785464286804,
0.3368719518184662,
-0.10108227282762527,
0.06570747494697571,
0.28340375423431396,
-0.12940800189971924,
0.4828002452850342,
-0.13444273173809052,
0.343913733959198,
0.45693671703338623,
-0.21622882783412933,
-0.06800179928541183,
-0.24593961238861084,
-0.09055879712104797,
0.25305354595184326,
-0.03157318755984306,
-0.011802352964878082,
0.13431410491466522,
0.03047245740890503,
0.2878183126449585,
0.3522031903266907,
-0.07159756124019623,
0.06545254588127136,
-0.010369371622800827,
0.13698555529117584,
-0.20868615806102753,
-0.1686747819185257,
-0.15003223717212677,
-0.388465940952301,
-0.08859176933765411,
0.06989461928606033,
-0.123708575963974,
-0.12744465470314026,
-0.22886712849140167,
-0.26988211274147034,
0.17884641885757446,
-0.17927619814872742,
-0.09218624234199524,
0.17867720127105713,
0.38342761993408203,
-0.05136767029762268,
-0.1447424292564392,
-0.20937678217887878,
0.5001634359359741,
-0.21020784974098206,
0.04791037365794182,
-0.10369019210338593,
0.588805615901947,
-0.025010881945490837,
-0.25891539454460144,
-0.03466961532831192,
0.11959914863109589,
0.2442091703414917,
0.06219219043850899,
-0.22252896428108215,
0.5832313895225525,
0.0029613098595291376,
0.004172876477241516,
-0.2923477590084076,
-0.3430803418159485,
0.308335542678833,
-0.12237301468849182,
-0.04759205877780914,
0.17698653042316437,
0.0977313220500946,
-0.0538443960249424,
-0.04309458285570145,
0.15333735942840576,
-0.2686194181442261,
0.2295253872871399,
-0.01489647850394249,
0.13499638438224792,
0.18540288507938385,
0.06680215895175934,
-0.008723348379135132,
-0.3696154057979584,
0.2542189061641693,
-0.1677754670381546,
0.13775378465652466,
-0.05922825634479523,
-0.29148757457733154,
0.2581196129322052,
0.32370907068252563,
0.042216379195451736,
-0.05597250163555145,
0.11992765218019485,
-0.2054101824760437,
-0.0632973238825798,
0.13234807550907135,
0.4003637135028839,
0.6168562173843384,
0.1611463576555252,
0.04695857688784599,
0.2131185233592987,
-0.03197005018591881,
-0.24087031185626984,
0.4670230746269226,
0.13168379664421082,
0.02759767696261406,
0.3150327801704407,
0.10084233433008194,
-0.0029757963493466377,
-0.07357656210660934,
-0.19940690696239471,
0.1765262633562088,
0.13475856184959412,
-0.34393730759620667,
0.2438054233789444,
-0.3384513854980469,
-0.22435680031776428,
-0.2926764190196991,
-0.4012452960014343,
-0.08199019730091095,
-0.3557222783565521,
-0.026643410325050354,
0.338234007358551,
-0.22720849514007568,
0.2543138265609741,
-0.06360040605068207,
-0.01710467040538788,
0.27176928520202637,
0.03082147240638733,
-0.10186119377613068,
0.08965151757001877,
-0.16461879014968872,
0.1233443021774292,
0.24346201121807098,
0.05693760886788368,
0.2285364717245102,
-0.0632861778140068,
-0.2566004991531372,
-0.21886636316776276,
-0.09448325634002686,
0.10676932334899902,
-0.15501956641674042,
0.12074563652276993,
0.18275757133960724,
0.061237744987010956,
0.05801165848970413,
-0.7690391540527344,
0.1607552319765091,
0.1800794005393982,
-0.10407441854476929,
0.10896509885787964,
0.1644430011510849,
0.00704141054302454,
-0.3102668225765228,
-0.2802092730998993,
-0.267001211643219,
-0.48048651218414307,
-0.13582566380500793,
-0.12648791074752808,
0.13719859719276428,
0.19461920857429504,
0.18804168701171875,
0.03781528398394585,
0.22483719885349274,
-0.17842808365821838,
-0.27896660566329956,
-0.08943909406661987,
0.23005838692188263,
-0.20679187774658203,
-0.22069703042507172,
-0.059874583035707474,
-0.20348161458969116,
0.07288912683725357,
0.3061237335205078,
-0.30766528844833374,
0.2889643609523773,
-0.0049516428261995316,
0.01196211576461792,
-0.10222689807415009,
-0.023704832419753075,
-0.000026084482669830322,
0.024331482127308846,
-0.0031417682766914368,
-0.12257073819637299,
-0.07904785871505737,
0.03688402473926544,
-0.08856124430894852,
0.44953036308288574,
-0.04746458679437637,
0.4736979603767395,
-0.007629662752151489,
0.5301905870437622,
0.5804372429847717,
-0.12331339716911316,
0.24048909544944763,
0.01378623303025961,
0.2292431741952896,
-0.24466830492019653,
-0.40969017148017883,
0.06347756832838058,
-0.1663859486579895,
-0.14199411869049072,
0.16426363587379456,
-0.0641411617398262,
-0.19380895793437958,
-0.1602243036031723,
0.07374797761440277,
0.07102126628160477,
-0.2589398920536041,
0.08115687221288681,
-0.3646129071712494,
0.2762235701084137,
-0.06741631031036377,
0.16557100415229797,
0.0871015191078186,
-0.03987041860818863,
-0.2975805401802063,
0.005375944077968597,
0.03587133437395096,
-0.17089882493019104,
-0.03437717258930206,
-0.014945843257009983,
-0.3522477149963379,
0.1994679719209671,
0.32571643590927124,
0.5231634378433228,
-0.12891633808612823,
-0.08084631711244583,
-0.008034467697143555,
0.20304305851459503,
0.4523876905441284,
-0.2733081579208374,
-0.14703494310379028,
0.19016797840595245,
0.29503920674324036,
-0.08633024990558624,
-0.24115289747714996,
-0.21266591548919678,
0.23222073912620544,
0.37552115321159363,
0.20468270778656006,
-0.42690563201904297,
0.023436034098267555,
0.6041786670684814,
0.025245318189263344,
-0.014792017638683319,
-0.056408874690532684,
-0.3534018397331238,
-0.05746240168809891,
-0.28812217712402344,
-0.03546086698770523,
0.025128332898020744,
0.2678385376930237,
-0.24271821975708008,
0.12381234765052795,
-0.06184554845094681,
-0.27513572573661804,
0.03566955029964447,
0.01800592988729477,
0.41587650775909424,
0.0633154958486557,
0.32827916741371155,
0.021457180380821228,
0.21577951312065125,
0.26685819029808044,
0.46742236614227295,
0.12913745641708374,
-0.5032018423080444,
0.08085979521274567,
0.06014273688197136,
0.36980223655700684,
0.23490579426288605,
-0.18578019738197327,
0.15366841852664948,
0.09129639714956284,
0.25531983375549316,
-0.05576829984784126,
0.3269638121128082,
0.3865131735801697,
-0.030617933720350266,
-0.39755967259407043,
-0.4764212369918823,
0.3114227056503296,
0.08015179634094238,
0.08952419459819794,
0.32658618688583374,
-0.27588915824890137,
-0.4034024477005005,
0.2228097915649414,
-0.15993565320968628,
0.8058584928512573,
0.46266281604766846,
-0.03649646416306496,
0.41400569677352905,
-0.17681381106376648,
0.3964121639728546,
0.020929254591464996,
0.10234398394823074,
-0.20078104734420776,
-0.3187921941280365,
-0.013019813224673271,
-0.14442461729049683,
0.03216330334544182,
-0.2286764532327652,
-0.5951720476150513,
0.21916621923446655,
-0.4626978635787964,
0.3948855400085449,
0.028004415333271027,
-0.021911678835749626,
-0.2606979012489319,
-0.19974888861179352,
-0.42065176367759705,
0.1158556342124939,
-0.1702437400817871,
-0.058456066995859146,
-0.01801682822406292,
-0.23294493556022644,
0.1777074784040451,
-0.25629371404647827,
-0.4652646780014038,
0.3867843449115753,
-0.19169726967811584,
0.20774246752262115,
-0.22456994652748108,
-0.2530982494354248,
0.1696912944316864,
-0.03428902104496956,
0.13424372673034668,
0.12530003488063812,
0.00797412171959877,
-0.058358121663331985,
0.09612276405096054,
0.07938289642333984,
-0.1361183524131775,
-0.0799703523516655,
0.2686736285686493,
0.06690239906311035,
-0.1916966289281845,
0.21230804920196533,
0.11325065791606903,
-0.22939160466194153,
0.037004753947257996,
0.07542876899242401,
0.4487966299057007,
-0.37731918692588806,
0.12365061044692993,
0.15732495486736298,
0.08523999154567719,
-0.3589434325695038,
0.15070608258247375,
-0.14687567949295044,
-0.35021209716796875,
0.03006017580628395,
-0.1414206326007843,
-0.01603635400533676,
-0.17727643251419067,
0.2605476975440979,
0.211231529712677,
0.0872870534658432,
0.4170054793357849,
0.006453782320022583,
-0.18731360137462616,
-0.1979379653930664,
0.15604323148727417,
-0.28195157647132874,
-0.3373079299926758,
0.2997111678123474,
-0.11603749543428421,
-0.09783358871936798,
-0.24043196439743042,
0.07716693729162216,
-0.004327762871980667,
0.27825209498405457,
-0.19830374419689178,
-0.2984943985939026,
-0.23193655908107758,
-0.007459603250026703,
-0.2110607773065567,
0.25918048620224,
-0.09851406514644623,
0.4573480486869812,
-0.11472371220588684,
0.05342169478535652,
-0.32027146220207214,
-0.25194308161735535,
-0.06606213748455048,
0.15265297889709473,
-0.177877739071846,
-0.1280551254749298,
0.25175511837005615,
0.04425782710313797,
0.18423044681549072,
0.3637903332710266,
-0.03132036328315735,
-0.2227555513381958,
-0.07921253889799118,
0.09799961000680923,
0.1035732552409172,
-0.2779183089733124,
-0.18579290807247162,
0.01170634850859642,
-0.2587459981441498,
-0.13266997039318085,
0.12912717461585999,
-0.023715507239103317,
0.06840766221284866,
-0.2297123372554779,
0.3573857545852661,
0.05686953291296959,
-0.053442422300577164,
-0.0654265433549881,
-0.16103754937648773,
0.24536681175231934,
-0.2343636453151703,
0.356227844953537,
-0.1409565955400467,
-0.13001644611358643,
-0.2532438039779663,
-0.07421249896287918,
0.2414993792772293,
0.11215952783823013,
0.24731451272964478,
-0.49813520908355713,
-0.24365851283073425,
-0.2189672738313675,
0.3536674976348877,
0.41086050868034363,
-0.12076025456190109,
-0.14505131542682648,
0.17978304624557495,
0.20251592993736267,
-0.26670533418655396,
-0.045766666531562805,
0.016128240153193474,
0.12853308022022247,
0.034611497074365616,
0.20173700153827667,
-0.004785399883985519,
-0.06902137398719788,
-0.264254629611969,
0.18090283870697021,
0.06071910634636879,
0.10251981019973755,
0.5367286801338196,
0.6329730749130249,
-0.01127156987786293,
0.27299952507019043,
-0.1349080204963684,
-0.030642695724964142,
0.09335556626319885,
0.20323939621448517,
-0.1457754671573639,
0.4192807078361511,
0.15708047151565552,
-0.2792627513408661,
0.2592714726924896,
-0.22759291529655457,
-0.17281614243984222,
0.11088477075099945,
-0.23892489075660706,
0.2962202727794647,
0.08786151558160782,
0.20817913115024567,
-0.3181532621383667,
-0.150652676820755,
-0.3374267816543579,
0.11543889343738556,
-0.20396703481674194,
0.056861694902181625,
-0.15335002541542053,
-0.007176220417022705,
-0.2921881079673767,
-0.05915655940771103,
0.26410403847694397,
0.1432996541261673,
0.4045107066631317,
0.0012921392917633057,
-0.01631253957748413,
-0.13680163025856018,
-0.023909281939268112,
0.4646574556827545,
0.14825360476970673,
-0.3498161733150482,
0.26501700282096863,
0.42951488494873047,
0.06717901676893234,
0.14655978977680206,
0.33493703603744507,
0.5874294638633728,
0.3272944390773773,
0.05333578586578369,
-0.08764499425888062,
0.1400020271539688,
-0.061055801808834076,
0.1924738883972168,
0.189984530210495,
0.022789545357227325,
-0.10124893486499786,
0.29767724871635437,
0.16093061864376068,
-0.19997817277908325,
0.26589250564575195,
0.33890706300735474,
0.14320117235183716,
-0.24844495952129364,
0.3455140292644501,
-0.1566695123910904,
0.10125146061182022,
-0.10161703824996948,
-0.12921014428138733,
-0.3342631161212921,
0.09740395098924637,
0.5170649886131287,
-0.08059709519147873,
0.16415321826934814,
0.04898637533187866,
0.09697520732879639,
0.13395199179649353,
0.54996258020401,
0.21038663387298584,
0.07812332361936569,
-0.2744431495666504,
-0.1800885796546936,
-0.23281271755695343,
-0.012684665620326996,
0.07262793183326721,
0.08381577581167221,
-0.046202100813388824,
0.12779226899147034,
-0.0991099551320076,
0.29868870973587036,
0.10057874023914337,
0.0543108694255352,
-0.0715828612446785,
0.11927111446857452,
-0.39045238494873047,
-0.2265530377626419,
0.049492113292217255,
-0.08554013818502426,
0.06545983254909515,
-0.44153857231140137,
0.30783647298812866,
-0.23773492872714996,
0.05024257302284241,
0.15205058455467224,
-0.06348204612731934,
0.2696840465068817,
-0.05517397075891495,
-0.05760855972766876,
0.33022576570510864,
0.2599652409553528,
-0.16414985060691833,
-0.01412256620824337,
-0.2613568603992462,
-0.3359956741333008,
-0.2617741823196411,
0.1609172224998474,
0.331452876329422,
0.5197641849517822,
-0.15970773994922638,
-0.11935685575008392,
-0.2188529372215271,
0.26714369654655457,
0.21775569021701813,
-0.15578478574752808,
-0.21847715973854065,
0.11407410353422165,
-0.19730430841445923,
0.2426188737154007,
0.06339404731988907,
0.14740726351737976,
-0.2247309684753418,
0.19963964819908142,
0.0211789608001709,
-0.6850951910018921,
0.6629207730293274,
-0.39121755957603455,
-0.39193016290664673,
-0.1927276998758316,
0.20252195000648499,
0.40288981795310974,
0.0899529755115509,
-0.5504664778709412,
0.0017788782715797424,
0.28704777359962463,
-0.29463014006614685,
-0.10275629162788391,
0.21245177090168,
0.2310318946838379,
0.02797892317175865,
-0.0407988615334034,
0.3072230815887451,
0.08521687984466553,
-0.4225626289844513,
0.4449518620967865,
-0.3486725091934204
] |
https://github.com/huggingface/datasets/issues/4804 | streaming dataset with concatenating splits raises an error | Hi!, still not fixed this, the truth is that it is an important update for what we want to train the entire dataset because we want to train fast, also should be enabled the function "[train:18%]" for streaming | ## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 38 | streaming dataset with concatenating splits raises an error
## Describe the bug
streaming dataset with concatenating splits raises an error
## Steps to reproduce the bug
```python
from datasets import load_dataset
# no error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation")
```
```python
from datasets import load_dataset
# error
repo = "nateraw/ade20k-tiny"
dataset = load_dataset(repo, split="train+validation", streaming=True)
```
```sh
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
[<ipython-input-4-a6ae02d63899>](https://localhost:8080/#) in <module>()
3 # error
4 repo = "nateraw/ade20k-tiny"
----> 5 dataset = load_dataset(repo, split="train+validation", streaming=True)
1 frames
[/usr/local/lib/python3.7/dist-packages/datasets/builder.py](https://localhost:8080/#) in as_streaming_dataset(self, split, base_path)
1030 splits_generator = splits_generators[split]
1031 else:
-> 1032 raise ValueError(f"Bad split: {split}. Available splits: {list(splits_generators)}")
1033
1034 # Create a dataset for each of the given splits
ValueError: Bad split: train+validation. Available splits: ['validation', 'train']
```
[Colab](https://colab.research.google.com/drive/1wMj08_0bym9jnGgByib4lsBPu8NCZBG9?usp=sharing)
## Expected results
load successfully or throws an error saying it is not supported.
## Actual results
above
## Environment info
- `datasets` version: 2.4.0
- Platform: Windows-10-10.0.22000-SP0 (windows11 x64)
- Python version: 3.9.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Hi!, still not fixed this, the truth is that it is an important update for what we want to train the entire dataset because we want to train fast, also should be enabled the function "[train:18%]" for streaming | [
-0.6321982145309448,
-0.14114195108413696,
-0.04174860566854477,
0.08145271986722946,
0.20941485464572906,
0.05047117918729782,
0.479400634765625,
0.28783243894577026,
-0.2424594759941101,
0.17925235629081726,
-0.017328202724456787,
0.1898089498281479,
-0.09531179815530777,
0.3461282551288605,
-0.08713344484567642,
-0.31257113814353943,
0.1326899379491806,
0.09041334688663483,
0.08450498431921005,
0.14278283715248108,
-0.14351242780685425,
-0.023240460082888603,
-0.3679580092430115,
-0.09133197367191315,
-0.40218955278396606,
-0.04586217552423477,
-0.10513419657945633,
0.017850227653980255,
0.027569513767957687,
-0.20895890891551971,
0.01969047449529171,
-0.0005026273429393768,
0.164079487323761,
0.44774872064590454,
-0.00011095267836935818,
0.0779910683631897,
0.4131243824958801,
-0.10834360122680664,
-0.4984458088874817,
-0.055337563157081604,
-0.5506054759025574,
-0.07137715816497803,
-0.10943686217069626,
-0.12211977690458298,
-0.010247483849525452,
0.025884270668029785,
-0.07658500224351883,
-0.5291568040847778,
0.44097352027893066,
0.3007289469242096,
0.23769395053386688,
0.27913448214530945,
-0.09573502838611603,
-0.12944872677326202,
0.09867383539676666,
0.10195069760084152,
-0.07084842771291733,
0.13915441930294037,
-0.2634509801864624,
0.13526590168476105,
0.10904058068990707,
0.34543418884277344,
-0.11192815750837326,
-0.08768503367900848,
-0.1672039031982422,
0.12974333763122559,
-0.1927567422389984,
-0.4399513304233551,
0.15471504628658295,
0.15152564644813538,
0.17866311967372894,
-0.32986846566200256,
-0.30534395575523376,
-0.34011104702949524,
0.10557775944471359,
-0.5165420174598694,
0.10213608294725418,
0.28906261920928955,
-0.11278074979782104,
0.19496019184589386,
-0.23868748545646667,
0.07801830023527145,
-0.14517709612846375,
0.006375543773174286,
0.0594535693526268,
0.5142806768417358,
0.0010316185653209686,
0.07943762093782425,
-0.03506177291274071,
-0.02441547065973282,
0.2601577043533325,
-0.35200899839401245,
-0.2718842327594757,
0.03988027572631836,
-0.4475346803665161,
0.007109593600034714,
-0.28623825311660767,
-0.2309044897556305,
0.03416278213262558,
0.260595440864563,
0.1341441422700882,
-0.1459803581237793,
0.19300182163715363,
0.08796289563179016,
0.22253860533237457,
-0.006880636792629957,
0.050492167472839355,
0.44383662939071655,
0.048815108835697174,
0.2955577075481415,
0.2136889100074768,
-0.04920891672372818,
-0.0700337290763855,
-0.15503761172294617,
-0.08859692513942719,
0.10496045649051666,
0.2228563278913498,
0.10063478350639343,
-0.6612512469291687,
-0.0019809240475296974,
-0.5391613245010376,
-0.12718018889427185,
0.1993342638015747,
0.11154861748218536,
-0.015831343829631805,
0.26071271300315857,
-0.040660690516233444,
0.15236277878284454,
0.01464611105620861,
-0.22187848389148712,
-0.2896678149700165,
-0.11959320306777954,
-0.10523262619972229,
0.07047655433416367,
0.03576406463980675,
-0.519378662109375,
0.3007468581199646,
0.2353753000497818,
0.16311156749725342,
0.028164714574813843,
-0.148494154214859,
-0.25725504755973816,
-0.1265144944190979,
0.2497541606426239,
0.22382903099060059,
0.0023144353181123734,
-0.006653692573308945,
-0.1653691828250885,
0.15748411417007446,
0.08831379562616348,
-0.0898340716958046,
-0.3434041738510132,
-0.18862617015838623,
0.27090203762054443,
0.10785378515720367,
0.13533832132816315,
-0.09875278919935226,
0.2831834852695465,
0.4593622088432312,
-0.08375950902700424,
-0.05348043888807297,
-0.09785421192646027,
-0.3089084029197693,
-0.23020566999912262,
0.4010993540287018,
0.3424554169178009,
-0.29581236839294434,
-0.10230162739753723,
-0.26069140434265137,
0.009286386892199516,
0.477211058139801,
0.23707294464111328,
-0.16336724162101746,
0.12128214538097382,
-0.22712533175945282,
0.3221936821937561,
0.415292888879776,
0.07928533852100372,
-0.24931785464286804,
0.3368719518184662,
-0.10108227282762527,
0.06570747494697571,
0.28340375423431396,
-0.12940800189971924,
0.4828002452850342,
-0.13444273173809052,
0.343913733959198,
0.45693671703338623,
-0.21622882783412933,
-0.06800179928541183,
-0.24593961238861084,
-0.09055879712104797,
0.25305354595184326,
-0.03157318755984306,
-0.011802352964878082,
0.13431410491466522,
0.03047245740890503,
0.2878183126449585,
0.3522031903266907,
-0.07159756124019623,
0.06545254588127136,
-0.010369371622800827,
0.13698555529117584,
-0.20868615806102753,
-0.1686747819185257,
-0.15003223717212677,
-0.388465940952301,
-0.08859176933765411,
0.06989461928606033,
-0.123708575963974,
-0.12744465470314026,
-0.22886712849140167,
-0.26988211274147034,
0.17884641885757446,
-0.17927619814872742,
-0.09218624234199524,
0.17867720127105713,
0.38342761993408203,
-0.05136767029762268,
-0.1447424292564392,
-0.20937678217887878,
0.5001634359359741,
-0.21020784974098206,
0.04791037365794182,
-0.10369019210338593,
0.588805615901947,
-0.025010881945490837,
-0.25891539454460144,
-0.03466961532831192,
0.11959914863109589,
0.2442091703414917,
0.06219219043850899,
-0.22252896428108215,
0.5832313895225525,
0.0029613098595291376,
0.004172876477241516,
-0.2923477590084076,
-0.3430803418159485,
0.308335542678833,
-0.12237301468849182,
-0.04759205877780914,
0.17698653042316437,
0.0977313220500946,
-0.0538443960249424,
-0.04309458285570145,
0.15333735942840576,
-0.2686194181442261,
0.2295253872871399,
-0.01489647850394249,
0.13499638438224792,
0.18540288507938385,
0.06680215895175934,
-0.008723348379135132,
-0.3696154057979584,
0.2542189061641693,
-0.1677754670381546,
0.13775378465652466,
-0.05922825634479523,
-0.29148757457733154,
0.2581196129322052,
0.32370907068252563,
0.042216379195451736,
-0.05597250163555145,
0.11992765218019485,
-0.2054101824760437,
-0.0632973238825798,
0.13234807550907135,
0.4003637135028839,
0.6168562173843384,
0.1611463576555252,
0.04695857688784599,
0.2131185233592987,
-0.03197005018591881,
-0.24087031185626984,
0.4670230746269226,
0.13168379664421082,
0.02759767696261406,
0.3150327801704407,
0.10084233433008194,
-0.0029757963493466377,
-0.07357656210660934,
-0.19940690696239471,
0.1765262633562088,
0.13475856184959412,
-0.34393730759620667,
0.2438054233789444,
-0.3384513854980469,
-0.22435680031776428,
-0.2926764190196991,
-0.4012452960014343,
-0.08199019730091095,
-0.3557222783565521,
-0.026643410325050354,
0.338234007358551,
-0.22720849514007568,
0.2543138265609741,
-0.06360040605068207,
-0.01710467040538788,
0.27176928520202637,
0.03082147240638733,
-0.10186119377613068,
0.08965151757001877,
-0.16461879014968872,
0.1233443021774292,
0.24346201121807098,
0.05693760886788368,
0.2285364717245102,
-0.0632861778140068,
-0.2566004991531372,
-0.21886636316776276,
-0.09448325634002686,
0.10676932334899902,
-0.15501956641674042,
0.12074563652276993,
0.18275757133960724,
0.061237744987010956,
0.05801165848970413,
-0.7690391540527344,
0.1607552319765091,
0.1800794005393982,
-0.10407441854476929,
0.10896509885787964,
0.1644430011510849,
0.00704141054302454,
-0.3102668225765228,
-0.2802092730998993,
-0.267001211643219,
-0.48048651218414307,
-0.13582566380500793,
-0.12648791074752808,
0.13719859719276428,
0.19461920857429504,
0.18804168701171875,
0.03781528398394585,
0.22483719885349274,
-0.17842808365821838,
-0.27896660566329956,
-0.08943909406661987,
0.23005838692188263,
-0.20679187774658203,
-0.22069703042507172,
-0.059874583035707474,
-0.20348161458969116,
0.07288912683725357,
0.3061237335205078,
-0.30766528844833374,
0.2889643609523773,
-0.0049516428261995316,
0.01196211576461792,
-0.10222689807415009,
-0.023704832419753075,
-0.000026084482669830322,
0.024331482127308846,
-0.0031417682766914368,
-0.12257073819637299,
-0.07904785871505737,
0.03688402473926544,
-0.08856124430894852,
0.44953036308288574,
-0.04746458679437637,
0.4736979603767395,
-0.007629662752151489,
0.5301905870437622,
0.5804372429847717,
-0.12331339716911316,
0.24048909544944763,
0.01378623303025961,
0.2292431741952896,
-0.24466830492019653,
-0.40969017148017883,
0.06347756832838058,
-0.1663859486579895,
-0.14199411869049072,
0.16426363587379456,
-0.0641411617398262,
-0.19380895793437958,
-0.1602243036031723,
0.07374797761440277,
0.07102126628160477,
-0.2589398920536041,
0.08115687221288681,
-0.3646129071712494,
0.2762235701084137,
-0.06741631031036377,
0.16557100415229797,
0.0871015191078186,
-0.03987041860818863,
-0.2975805401802063,
0.005375944077968597,
0.03587133437395096,
-0.17089882493019104,
-0.03437717258930206,
-0.014945843257009983,
-0.3522477149963379,
0.1994679719209671,
0.32571643590927124,
0.5231634378433228,
-0.12891633808612823,
-0.08084631711244583,
-0.008034467697143555,
0.20304305851459503,
0.4523876905441284,
-0.2733081579208374,
-0.14703494310379028,
0.19016797840595245,
0.29503920674324036,
-0.08633024990558624,
-0.24115289747714996,
-0.21266591548919678,
0.23222073912620544,
0.37552115321159363,
0.20468270778656006,
-0.42690563201904297,
0.023436034098267555,
0.6041786670684814,
0.025245318189263344,
-0.014792017638683319,
-0.056408874690532684,
-0.3534018397331238,
-0.05746240168809891,
-0.28812217712402344,
-0.03546086698770523,
0.025128332898020744,
0.2678385376930237,
-0.24271821975708008,
0.12381234765052795,
-0.06184554845094681,
-0.27513572573661804,
0.03566955029964447,
0.01800592988729477,
0.41587650775909424,
0.0633154958486557,
0.32827916741371155,
0.021457180380821228,
0.21577951312065125,
0.26685819029808044,
0.46742236614227295,
0.12913745641708374,
-0.5032018423080444,
0.08085979521274567,
0.06014273688197136,
0.36980223655700684,
0.23490579426288605,
-0.18578019738197327,
0.15366841852664948,
0.09129639714956284,
0.25531983375549316,
-0.05576829984784126,
0.3269638121128082,
0.3865131735801697,
-0.030617933720350266,
-0.39755967259407043,
-0.4764212369918823,
0.3114227056503296,
0.08015179634094238,
0.08952419459819794,
0.32658618688583374,
-0.27588915824890137,
-0.4034024477005005,
0.2228097915649414,
-0.15993565320968628,
0.8058584928512573,
0.46266281604766846,
-0.03649646416306496,
0.41400569677352905,
-0.17681381106376648,
0.3964121639728546,
0.020929254591464996,
0.10234398394823074,
-0.20078104734420776,
-0.3187921941280365,
-0.013019813224673271,
-0.14442461729049683,
0.03216330334544182,
-0.2286764532327652,
-0.5951720476150513,
0.21916621923446655,
-0.4626978635787964,
0.3948855400085449,
0.028004415333271027,
-0.021911678835749626,
-0.2606979012489319,
-0.19974888861179352,
-0.42065176367759705,
0.1158556342124939,
-0.1702437400817871,
-0.058456066995859146,
-0.01801682822406292,
-0.23294493556022644,
0.1777074784040451,
-0.25629371404647827,
-0.4652646780014038,
0.3867843449115753,
-0.19169726967811584,
0.20774246752262115,
-0.22456994652748108,
-0.2530982494354248,
0.1696912944316864,
-0.03428902104496956,
0.13424372673034668,
0.12530003488063812,
0.00797412171959877,
-0.058358121663331985,
0.09612276405096054,
0.07938289642333984,
-0.1361183524131775,
-0.0799703523516655,
0.2686736285686493,
0.06690239906311035,
-0.1916966289281845,
0.21230804920196533,
0.11325065791606903,
-0.22939160466194153,
0.037004753947257996,
0.07542876899242401,
0.4487966299057007,
-0.37731918692588806,
0.12365061044692993,
0.15732495486736298,
0.08523999154567719,
-0.3589434325695038,
0.15070608258247375,
-0.14687567949295044,
-0.35021209716796875,
0.03006017580628395,
-0.1414206326007843,
-0.01603635400533676,
-0.17727643251419067,
0.2605476975440979,
0.211231529712677,
0.0872870534658432,
0.4170054793357849,
0.006453782320022583,
-0.18731360137462616,
-0.1979379653930664,
0.15604323148727417,
-0.28195157647132874,
-0.3373079299926758,
0.2997111678123474,
-0.11603749543428421,
-0.09783358871936798,
-0.24043196439743042,
0.07716693729162216,
-0.004327762871980667,
0.27825209498405457,
-0.19830374419689178,
-0.2984943985939026,
-0.23193655908107758,
-0.007459603250026703,
-0.2110607773065567,
0.25918048620224,
-0.09851406514644623,
0.4573480486869812,
-0.11472371220588684,
0.05342169478535652,
-0.32027146220207214,
-0.25194308161735535,
-0.06606213748455048,
0.15265297889709473,
-0.177877739071846,
-0.1280551254749298,
0.25175511837005615,
0.04425782710313797,
0.18423044681549072,
0.3637903332710266,
-0.03132036328315735,
-0.2227555513381958,
-0.07921253889799118,
0.09799961000680923,
0.1035732552409172,
-0.2779183089733124,
-0.18579290807247162,
0.01170634850859642,
-0.2587459981441498,
-0.13266997039318085,
0.12912717461585999,
-0.023715507239103317,
0.06840766221284866,
-0.2297123372554779,
0.3573857545852661,
0.05686953291296959,
-0.053442422300577164,
-0.0654265433549881,
-0.16103754937648773,
0.24536681175231934,
-0.2343636453151703,
0.356227844953537,
-0.1409565955400467,
-0.13001644611358643,
-0.2532438039779663,
-0.07421249896287918,
0.2414993792772293,
0.11215952783823013,
0.24731451272964478,
-0.49813520908355713,
-0.24365851283073425,
-0.2189672738313675,
0.3536674976348877,
0.41086050868034363,
-0.12076025456190109,
-0.14505131542682648,
0.17978304624557495,
0.20251592993736267,
-0.26670533418655396,
-0.045766666531562805,
0.016128240153193474,
0.12853308022022247,
0.034611497074365616,
0.20173700153827667,
-0.004785399883985519,
-0.06902137398719788,
-0.264254629611969,
0.18090283870697021,
0.06071910634636879,
0.10251981019973755,
0.5367286801338196,
0.6329730749130249,
-0.01127156987786293,
0.27299952507019043,
-0.1349080204963684,
-0.030642695724964142,
0.09335556626319885,
0.20323939621448517,
-0.1457754671573639,
0.4192807078361511,
0.15708047151565552,
-0.2792627513408661,
0.2592714726924896,
-0.22759291529655457,
-0.17281614243984222,
0.11088477075099945,
-0.23892489075660706,
0.2962202727794647,
0.08786151558160782,
0.20817913115024567,
-0.3181532621383667,
-0.150652676820755,
-0.3374267816543579,
0.11543889343738556,
-0.20396703481674194,
0.056861694902181625,
-0.15335002541542053,
-0.007176220417022705,
-0.2921881079673767,
-0.05915655940771103,
0.26410403847694397,
0.1432996541261673,
0.4045107066631317,
0.0012921392917633057,
-0.01631253957748413,
-0.13680163025856018,
-0.023909281939268112,
0.4646574556827545,
0.14825360476970673,
-0.3498161733150482,
0.26501700282096863,
0.42951488494873047,
0.06717901676893234,
0.14655978977680206,
0.33493703603744507,
0.5874294638633728,
0.3272944390773773,
0.05333578586578369,
-0.08764499425888062,
0.1400020271539688,
-0.061055801808834076,
0.1924738883972168,
0.189984530210495,
0.022789545357227325,
-0.10124893486499786,
0.29767724871635437,
0.16093061864376068,
-0.19997817277908325,
0.26589250564575195,
0.33890706300735474,
0.14320117235183716,
-0.24844495952129364,
0.3455140292644501,
-0.1566695123910904,
0.10125146061182022,
-0.10161703824996948,
-0.12921014428138733,
-0.3342631161212921,
0.09740395098924637,
0.5170649886131287,
-0.08059709519147873,
0.16415321826934814,
0.04898637533187866,
0.09697520732879639,
0.13395199179649353,
0.54996258020401,
0.21038663387298584,
0.07812332361936569,
-0.2744431495666504,
-0.1800885796546936,
-0.23281271755695343,
-0.012684665620326996,
0.07262793183326721,
0.08381577581167221,
-0.046202100813388824,
0.12779226899147034,
-0.0991099551320076,
0.29868870973587036,
0.10057874023914337,
0.0543108694255352,
-0.0715828612446785,
0.11927111446857452,
-0.39045238494873047,
-0.2265530377626419,
0.049492113292217255,
-0.08554013818502426,
0.06545983254909515,
-0.44153857231140137,
0.30783647298812866,
-0.23773492872714996,
0.05024257302284241,
0.15205058455467224,
-0.06348204612731934,
0.2696840465068817,
-0.05517397075891495,
-0.05760855972766876,
0.33022576570510864,
0.2599652409553528,
-0.16414985060691833,
-0.01412256620824337,
-0.2613568603992462,
-0.3359956741333008,
-0.2617741823196411,
0.1609172224998474,
0.331452876329422,
0.5197641849517822,
-0.15970773994922638,
-0.11935685575008392,
-0.2188529372215271,
0.26714369654655457,
0.21775569021701813,
-0.15578478574752808,
-0.21847715973854065,
0.11407410353422165,
-0.19730430841445923,
0.2426188737154007,
0.06339404731988907,
0.14740726351737976,
-0.2247309684753418,
0.19963964819908142,
0.0211789608001709,
-0.6850951910018921,
0.6629207730293274,
-0.39121755957603455,
-0.39193016290664673,
-0.1927276998758316,
0.20252195000648499,
0.40288981795310974,
0.0899529755115509,
-0.5504664778709412,
0.0017788782715797424,
0.28704777359962463,
-0.29463014006614685,
-0.10275629162788391,
0.21245177090168,
0.2310318946838379,
0.02797892317175865,
-0.0407988615334034,
0.3072230815887451,
0.08521687984466553,
-0.4225626289844513,
0.4449518620967865,
-0.3486725091934204
] |
https://github.com/huggingface/datasets/issues/4803 | Support `pipeline` argument in inspect.py functions | Now: the preview (first-rows) works, but not the conversion to parquet. See https://huggingface.co/datasets/wikipedia/viewer/20220301.de/train
```
_split_generators() missing 1 required positional argument: 'pipeline'
Error code: UnexpectedError
``` | **Is your feature request related to a problem? Please describe.**
The `wikipedia` dataset requires a `pipeline` argument to build the list of splits:
https://huggingface.co/datasets/wikipedia/blob/main/wikipedia.py#L937
But this is currently not supported in `get_dataset_config_info`:
https://github.com/huggingface/datasets/blob/main/src/datasets/inspect.py#L373-L375
which is called by other functions, e.g. `get_dataset_split_names`.
**Additional context**
The dataset viewer is not working out-of-the-box on `wikipedia` for this reason:
https://huggingface.co/datasets/wikipedia/viewer
<img width="637" alt="Capture d’écran 2022-08-08 à 12 01 16" src="https://user-images.githubusercontent.com/1676121/183461838-5330783b-0269-4ba7-a999-314cde2023d8.png">
| 25 | Support `pipeline` argument in inspect.py functions
**Is your feature request related to a problem? Please describe.**
The `wikipedia` dataset requires a `pipeline` argument to build the list of splits:
https://huggingface.co/datasets/wikipedia/blob/main/wikipedia.py#L937
But this is currently not supported in `get_dataset_config_info`:
https://github.com/huggingface/datasets/blob/main/src/datasets/inspect.py#L373-L375
which is called by other functions, e.g. `get_dataset_split_names`.
**Additional context**
The dataset viewer is not working out-of-the-box on `wikipedia` for this reason:
https://huggingface.co/datasets/wikipedia/viewer
<img width="637" alt="Capture d’écran 2022-08-08 à 12 01 16" src="https://user-images.githubusercontent.com/1676121/183461838-5330783b-0269-4ba7-a999-314cde2023d8.png">
Now: the preview (first-rows) works, but not the conversion to parquet. See https://huggingface.co/datasets/wikipedia/viewer/20220301.de/train
```
_split_generators() missing 1 required positional argument: 'pipeline'
Error code: UnexpectedError
``` | [
-0.37398821115493774,
0.004913255572319031,
0.029317721724510193,
0.11169767379760742,
0.12931519746780396,
0.1310645043849945,
0.06105368584394455,
0.29240500926971436,
0.25119781494140625,
0.02691756933927536,
0.012311053462326527,
0.3654104769229889,
-0.10572706162929535,
0.20848070085048676,
0.2369706630706787,
-0.34861961007118225,
0.03873264044523239,
0.11017114669084549,
0.03295772522687912,
0.2688065767288208,
-0.37729865312576294,
0.20270107686519623,
-0.30294346809387207,
-0.21099023520946503,
0.27162936329841614,
0.10285225510597229,
-0.07263177633285522,
-0.06298256665468216,
-0.05706046521663666,
-0.41567644476890564,
0.21399764716625214,
0.1500352919101715,
-0.028533445671200752,
0.27550289034843445,
-0.0001236376556335017,
0.13856616616249084,
0.5376095771789551,
-0.08050490915775299,
-0.24989764392375946,
-0.3599398732185364,
0.06251104176044464,
-0.38690295815467834,
0.1698920726776123,
-0.3187185823917389,
-0.2976284325122833,
-0.20214281976222992,
0.18457527458667755,
-0.3019673228263855,
0.4454042911529541,
0.1750432699918747,
0.0981777012348175,
0.23468142747879028,
0.15403243899345398,
-0.00024592969566583633,
0.5282915234565735,
0.4591560959815979,
-0.19490262866020203,
-0.258334219455719,
0.08067037165164948,
0.18133579194545746,
0.16124053299427032,
0.17186343669891357,
-0.05212145298719406,
-0.2907865345478058,
0.23438388109207153,
-0.17879770696163177,
0.0437752828001976,
-0.2975166440010071,
0.13208790123462677,
0.16256843507289886,
0.010799087584018707,
-0.3444145619869232,
-0.22722415626049042,
-0.44700124859809875,
-0.11776994168758392,
-0.3369215428829193,
-0.06368658691644669,
0.27381590008735657,
-0.23097394406795502,
0.06478346139192581,
-0.10778844356536865,
-0.4878656566143036,
-0.17389018833637238,
-0.05835045874118805,
-0.03293808177113533,
0.20423412322998047,
-0.13848572969436646,
0.19613587856292725,
0.2962261736392975,
-0.03312763571739197,
-0.02518412098288536,
0.026924557983875275,
-0.015981212258338928,
0.21187373995780945,
-0.39590203762054443,
-0.08454710990190506,
0.23403647541999817,
0.3760872483253479,
0.2547951340675354,
0.4180605411529541,
-0.4771541953086853,
0.06643092632293701,
0.17247897386550903,
0.22325384616851807,
0.33373984694480896,
-0.12095481157302856,
0.07589677721261978,
0.22760500013828278,
0.006291363388299942,
0.31223464012145996,
-0.029830805957317352,
-0.2578214406967163,
0.26296165585517883,
-0.16749811172485352,
-0.361359179019928,
0.04644165188074112,
0.3143135905265808,
-0.13186348974704742,
-0.09896688908338547,
0.05237266793847084,
0.021783456206321716,
-0.10342726111412048,
0.33342936635017395,
0.6835389137268066,
0.0678882896900177,
0.20652759075164795,
0.19752076268196106,
0.31920814514160156,
-0.03818574547767639,
-0.32770493626594543,
-0.15710052847862244,
0.2362586408853531,
-0.080645851790905,
0.1626114398241043,
0.0963834822177887,
-0.1027107685804367,
0.0739351436495781,
0.09990999102592468,
0.2321871519088745,
0.10653555393218994,
0.06892045587301254,
-0.2389470785856247,
0.41844138503074646,
0.1993647813796997,
0.042428065091371536,
-0.19754108786582947,
0.3219907581806183,
-0.13926421105861664,
-0.2703515291213989,
-0.06160362809896469,
-0.12806057929992676,
-0.32923611998558044,
0.1909562200307846,
-0.02213463932275772,
-0.27062392234802246,
0.18932415544986725,
-0.36576521396636963,
0.41407909989356995,
-0.019419215619564056,
-0.4245702922344208,
-0.12016338855028152,
-0.09752972424030304,
-0.14384329319000244,
-0.14598774909973145,
0.4747934341430664,
0.38485288619995117,
0.0289393849670887,
-0.15604645013809204,
-0.3169052302837372,
0.072700634598732,
0.34116438031196594,
-0.02822991833090782,
-0.009631404653191566,
-0.12765651941299438,
-0.17055463790893555,
0.060599908232688904,
0.6232976913452148,
-0.4496011734008789,
0.2512665390968323,
0.4162045419216156,
0.05452132970094681,
0.3073479235172272,
0.34307238459587097,
-0.380361407995224,
0.6455626487731934,
0.05288086459040642,
-0.24886950850486755,
0.2674466073513031,
-0.1427590399980545,
0.10117674618959427,
-0.17349182069301605,
-0.0095787663012743,
0.301067590713501,
0.0008586589246988297,
-0.10541464388370514,
-0.0018213316798210144,
-0.08568503707647324,
0.08390004932880402,
0.3036692440509796,
-0.22435763478279114,
0.019645698368549347,
0.04668036103248596,
0.24601612985134125,
0.3538273572921753,
0.17657925188541412,
-0.31092071533203125,
0.0068478696048259735,
0.017693236470222473,
-0.15560823678970337,
-0.08799931406974792,
-0.10616962611675262,
-0.2683888077735901,
-0.06474831700325012,
0.15476259589195251,
-0.07815949618816376,
-0.6677935123443604,
0.09544573724269867,
0.0892384946346283,
0.05973589047789574,
0.13294728100299835,
0.04540528729557991,
-0.09587275236845016,
-0.21110907196998596,
0.15599346160888672,
-0.3716485798358917,
0.4096601903438568,
0.19681261479854584,
-0.024013474583625793,
-0.1461370289325714,
0.10847459733486176,
0.2804509103298187,
-0.10725536197423935,
0.11692546308040619,
0.373502641916275,
0.6584685444831848,
0.18579906225204468,
0.09693805128335953,
-0.08277304470539093,
0.025515519082546234,
-0.3565586507320404,
0.014193832874298096,
0.07431749254465103,
-0.044926147907972336,
-0.05368178337812424,
-0.22946998476982117,
0.32367730140686035,
-0.039090629667043686,
0.5265253186225891,
0.15583595633506775,
0.02872307039797306,
0.35987332463264465,
0.03947669640183449,
-0.34450122714042664,
-0.20869508385658264,
0.03285614401102066,
0.07422056049108505,
0.013136960566043854,
-0.3771001696586609,
-0.5899456143379211,
-0.092546246945858,
0.3191051781177521,
0.25005343556404114,
0.00772520899772644,
0.16878417134284973,
-0.041570425033569336,
-0.22280558943748474,
0.28128311038017273,
0.022200938314199448,
0.23987959325313568,
0.2686420977115631,
0.04580564796924591,
0.18597842752933502,
-0.02699238806962967,
0.09653229266405106,
0.48199373483657837,
0.051710695028305054,
0.03826741501688957,
0.01952497288584709,
0.13967233896255493,
-0.044946685433387756,
-0.22221624851226807,
-0.1757388710975647,
-0.1218017041683197,
-0.012899665161967278,
-0.4131534993648529,
0.29700905084609985,
-0.21512211859226227,
-0.44482240080833435,
-0.3174769878387451,
0.021397482603788376,
-0.13915613293647766,
-0.4478660821914673,
-0.062228865921497345,
0.19734852015972137,
-0.11047528684139252,
0.29885104298591614,
-0.016387585550546646,
0.34971001744270325,
-0.01478600688278675,
-0.31446707248687744,
-0.3302907347679138,
-0.1269422471523285,
0.0465516559779644,
-0.0458034947514534,
0.09731724113225937,
0.31962037086486816,
0.34196749329566956,
0.09726070612668991,
-0.016053544357419014,
-0.5677832365036011,
-0.545581042766571,
0.23740878701210022,
-0.08647817373275757,
0.40876179933547974,
0.4787985682487488,
0.26036709547042847,
0.3315974473953247,
-0.32656729221343994,
0.29910969734191895,
-0.10446320474147797,
0.11917999386787415,
0.04156903922557831,
-0.016643574461340904,
-0.03165256604552269,
-0.23514017462730408,
0.020545020699501038,
-0.022625939920544624,
-0.44411757588386536,
0.5708796381950378,
0.25235405564308167,
-0.05240430682897568,
-0.22528885304927826,
-0.17129015922546387,
-0.08382929861545563,
-0.08325159549713135,
0.2537831664085388,
-0.12090194970369339,
-0.18239368498325348,
0.3137323558330536,
-0.44648686051368713,
-0.060343820601701736,
0.06772267818450928,
-0.11171279102563858,
0.23642569780349731,
0.3793208599090576,
-0.2261388599872589,
0.01707269251346588,
0.025579582899808884,
-0.1724107563495636,
0.1928083598613739,
0.08877629041671753,
0.17598336935043335,
-0.12658581137657166,
0.18946991860866547,
-0.2050410509109497,
-0.19316190481185913,
-0.1447029411792755,
-0.17936789989471436,
0.2713027000427246,
0.34933042526245117,
0.7331626415252686,
0.18067611753940582,
0.8081634640693665,
0.3993993103504181,
0.12809254229068756,
0.34777289628982544,
-0.3805024325847626,
0.4253275394439697,
-0.08371862024068832,
-0.5223415493965149,
0.08450362086296082,
-0.010323986411094666,
-0.21199318766593933,
0.11513683944940567,
-0.1409209966659546,
-0.26738494634628296,
-0.253440260887146,
0.15452884137630463,
-0.1658753752708435,
-0.3882002532482147,
0.0851944088935852,
0.033052437007427216,
0.5260428190231323,
-0.25475916266441345,
0.3026016354560852,
-0.30768752098083496,
-0.13036532700061798,
0.022067543119192123,
0.29047226905822754,
0.4289267659187317,
-0.10589905828237534,
0.07589244842529297,
-0.18018068373203278,
-0.39277446269989014,
0.21831336617469788,
0.015866832807660103,
0.1750452220439911,
0.03877117112278938,
-0.2544306218624115,
0.039029985666275024,
-0.031841013580560684,
0.7574318051338196,
-0.23977290093898773,
-0.10074688494205475,
0.07567377388477325,
-0.30521997809410095,
-0.7018285989761353,
0.16258081793785095,
-0.07915819436311722,
0.09163524210453033,
0.32434767484664917,
0.4651326835155487,
-0.7017443180084229,
-0.08618973940610886,
0.5247006416320801,
-0.049514271318912506,
-0.08482901751995087,
0.02198285609483719,
-0.11862309277057648,
0.09987961500883102,
-0.3579181134700775,
0.07254354655742645,
0.1229066476225853,
0.19780021905899048,
-0.010876691900193691,
0.0005302317440509796,
0.003295574337244034,
-0.1203506588935852,
0.02741825580596924,
0.2760503888130188,
0.4043951630592346,
-0.258800745010376,
0.08597594499588013,
0.10877415537834167,
-0.10964891314506531,
0.12903434038162231,
0.5013876557350159,
-0.026008740067481995,
-0.8141247034072876,
-0.09622219949960709,
0.2705398499965668,
0.29956692457199097,
0.33695781230926514,
-0.3212047815322876,
0.18039530515670776,
-0.09593631327152252,
0.186749666929245,
-0.2762560248374939,
0.05957615002989769,
0.4902522563934326,
-0.1992723047733307,
-0.12684790790081024,
-0.4482063353061676,
0.4363308846950531,
0.16221830248832703,
0.00856006145477295,
0.33121490478515625,
0.02455078810453415,
-0.3775031864643097,
0.22638720273971558,
0.20285168290138245,
0.9871731996536255,
0.1832679957151413,
-0.25759708881378174,
0.28723180294036865,
-0.38189250230789185,
0.3788529336452484,
-0.4523267149925232,
0.06595173478126526,
-0.40110424160957336,
-0.196315199136734,
-0.08002986758947372,
-0.18226487934589386,
0.27815693616867065,
-0.11875833570957184,
-0.3527306616306305,
0.22368015348911285,
0.2626687288284302,
0.0365857258439064,
-0.17301441729068756,
0.37647515535354614,
-0.04948786646127701,
-0.09162801504135132,
-0.24809959530830383,
0.027341965585947037,
0.06716670095920563,
-0.09158237278461456,
-0.008891898207366467,
-0.1963403970003128,
0.2954781949520111,
-0.13980574905872345,
-0.6440085768699646,
0.046160705387592316,
-0.2531620264053345,
0.00654117576777935,
0.21165016293525696,
-0.41557055711746216,
0.40775299072265625,
0.21108277142047882,
-0.2553233504295349,
0.22710128128528595,
-0.28657591342926025,
0.17635926604270935,
-0.11682633310556412,
-0.10600671172142029,
-0.13346926867961884,
0.08097680658102036,
0.22642464935779572,
-0.01757374405860901,
0.00000683218240737915,
0.01555519551038742,
-0.10639455169439316,
-0.453840970993042,
-0.18826313316822052,
0.014936130493879318,
0.21362361311912537,
-0.20770783722400665,
-0.19578132033348083,
0.08608075231313705,
-0.1149936318397522,
-0.11895440518856049,
0.05933694168925285,
-0.08262956142425537,
-0.1956910938024521,
-0.09266404062509537,
-0.1268116533756256,
-0.016993463039398193,
-0.03722317889332771,
0.14152097702026367,
-0.24854567646980286,
0.13229969143867493,
0.21995529532432556,
0.3257453739643097,
-0.43159276247024536,
-0.07184736430644989,
-0.24489206075668335,
-0.10643607378005981,
-0.10355308651924133,
0.3801576495170593,
-0.018938248977065086,
0.2357550710439682,
0.06617643684148788,
-0.3667256534099579,
-0.10904277861118317,
-0.09459350258111954,
-0.2392915040254593,
-0.37629884481430054,
0.26685330271720886,
0.41518086194992065,
-0.46686092019081116,
0.13582250475883484,
0.14686709642410278,
0.48090729117393494,
0.028409691527485847,
0.03152511268854141,
-0.2407059371471405,
0.08920567482709885,
-0.027048487216234207,
0.19830551743507385,
0.3766883611679077,
0.010537281632423401,
-0.05329345539212227,
0.08751091361045837,
-0.00722881406545639,
0.03288501128554344,
-0.06868554651737213,
-0.022456947714090347,
-0.034668464213609695,
0.1726766675710678,
-0.10565846413373947,
0.2289513647556305,
-0.20260730385780334,
-0.02455146238207817,
-0.19219307601451874,
-0.4349720776081085,
0.16360688209533691,
-0.08990462124347687,
-0.19239066541194916,
0.1407458335161209,
0.6348443031311035,
-0.09414727240800858,
-0.24123869836330414,
0.02844686433672905,
0.033543217927217484,
0.0900159552693367,
-0.1714400351047516,
0.34378334879875183,
-0.22114038467407227,
-0.21622316539287567,
-0.21876206994056702,
0.17893095314502716,
0.2871127724647522,
0.09684281051158905,
0.3680621385574341,
0.34639453887939453,
-0.17836393415927887,
0.21234281361103058,
0.3285503387451172,
0.5737535357475281,
0.12160301208496094,
0.24463321268558502,
0.21177086234092712,
0.014344491064548492,
-0.1782892495393753,
0.13829001784324646,
0.3442051112651825,
-0.024752210825681686,
0.0836525708436966,
0.17789536714553833,
0.047906775027513504,
0.28801780939102173,
0.33055931329727173,
0.12032335251569748,
0.30886515974998474,
-0.21968737244606018,
0.5434479713439941,
0.2951236069202423,
-0.14862550795078278,
0.08113545179367065,
0.0002662278711795807,
0.13976038992404938,
0.33870843052864075,
0.2501124143600464,
-0.019207343459129333,
0.3516702353954315,
0.1805594265460968,
-0.1329980045557022,
0.3342238962650299,
-0.21138142049312592,
-0.3432329595088959,
-0.05514347553253174,
-0.07149681448936462,
0.16508272290229797,
-0.15836356580257416,
0.4772289991378784,
0.24467313289642334,
-0.09768430888652802,
-0.2956557869911194,
0.6572652459144592,
-0.005904547870159149,
-0.0790199488401413,
0.04423942416906357,
-0.26648253202438354,
-0.1887514889240265,
-0.16144634783267975,
0.23566631972789764,
-0.21285827457904816,
0.014171324670314789,
-0.09675668179988861,
0.18274952471256256,
-0.13557745516300201,
0.2534622251987457,
-0.22386813163757324,
0.3065919578075409,
-0.22288461029529572,
0.015746859833598137,
0.11780782043933868,
0.09924831986427307,
0.22486744821071625,
0.039475128054618835,
0.40451356768608093,
0.20458857715129852,
-0.2327762097120285,
-0.29603585600852966,
-0.04666714742779732,
-0.06182476878166199,
0.006591292098164558,
0.12982653081417084,
-0.2118140161037445,
-0.07408478856086731,
0.25352513790130615,
0.0820036232471466,
-0.07136671990156174,
-0.16824254393577576,
0.031771108508110046,
0.09116965532302856,
-0.49860408902168274,
0.4235770106315613,
0.013480346649885178,
-0.02512761950492859,
-0.11742725968360901,
-0.34305447340011597,
-0.4136611521244049,
-0.11768877506256104,
0.031635601073503494,
0.06939735263586044,
-0.054725632071495056,
0.031288743019104004,
0.019079748541116714,
0.15360598266124725,
0.08735878765583038,
0.1445595771074295,
0.03191802650690079,
-0.13426925241947174,
-0.5589483380317688,
-0.34907495975494385,
-0.024865932762622833,
0.08597882091999054,
-0.4286747872829437,
0.25818678736686707,
0.23573224246501923,
0.0063024163246154785,
0.2875257730484009,
0.043608590960502625,
-0.385414183139801,
0.10551352798938751,
0.20995061099529266,
-0.2069033682346344,
-0.04561992362141609,
-0.07162916660308838,
-0.26196199655532837,
0.046386852860450745,
-0.06338147073984146,
-0.04293881729245186,
0.06506514549255371,
-0.06519852578639984,
0.041565991938114166,
-0.02271423116326332,
-0.027845386415719986,
-0.06725050508975983,
-0.01974032074213028,
0.15936055779457092,
0.4086836576461792,
-0.14660948514938354,
0.15951603651046753,
-0.0801222175359726,
-0.22930249571800232,
-0.16113536059856415,
0.47220975160598755,
-0.17130877077579498,
0.2365497648715973,
-0.08261649310588837,
-0.7633762359619141,
-0.33825793862342834,
0.2248082160949707,
0.1447838693857193,
-0.1513565480709076,
-0.20589064061641693,
0.0478229746222496,
-0.12096744775772095,
0.07687196135520935,
0.0031577711924910545,
0.2778184711933136,
-0.07499285042285919,
0.12137596309185028,
0.03719666600227356,
-0.41655218601226807,
0.4206278622150421,
-0.43874770402908325,
-0.33056527376174927,
-0.1854647994041443,
0.14692457020282745,
-0.12754759192466736,
-0.09645719826221466,
-0.39171120524406433,
-0.17958727478981018,
0.20999081432819366,
-0.07996601611375809,
0.1242748498916626,
0.19206278026103973,
-0.04532783851027489,
0.07242713868618011,
-0.18815051019191742,
-0.27523067593574524,
0.38048994541168213,
-0.004478925839066505,
-0.1407104730606079,
-0.22103846073150635
] |
https://github.com/huggingface/datasets/issues/4802 | `with_format` behavior is inconsistent on different datasets | Hi! You can get a `torch.Tensor` if you do the following:
```python
raw = load_dataset("beans", split="train")
raw = raw.select(range(100))
preprocessor = AutoFeatureExtractor.from_pretrained("nateraw/vit-base-beans")
from datasets import Array3D
features = raw.features.copy()
features["pixel_values"] = datasets.Array3D(shape=(3, 224, 224), dtype="float32")
def preprocess_func(examples):
imgs = [img.convert("RGB") for img in examples["image"]]
return preprocessor(imgs)
data = raw.map(preprocess_func, batched=True, features=features)
print(type(data[0]["pixel_values"]))
data = data.with_format("torch", columns=["pixel_values"])
print(type(data[0]["pixel_values"]))
```
The reason for this "inconsistency" in the default case is the way PyArrow infers the type of multi-dim arrays (in this case, the `pixel_values` column). If the type is not specified manually, PyArrow assumes it is a dynamic-length sequence (it needs to know the type before writing the first batch to a cache file, and it can't be sure the array is fixed ahead of time; `ArrayXD` is our way of telling that the dims are fixed), so it already fails to convert the corresponding array to NumPy properly (you get an array of `np.object` arrays). And `with_format("torch")` replaces NumPy arrays with Torch tensors, so this bad formatting propagates. | ## Describe the bug
I found a case where `with_format` does not transform the dataset to the requested format.
## Steps to reproduce the bug
Run:
```python
from transformers import AutoTokenizer, AutoFeatureExtractor
from datasets import load_dataset
raw = load_dataset("glue", "sst2", split="train")
raw = raw.select(range(100))
tokenizer = AutoTokenizer.from_pretrained("philschmid/tiny-bert-sst2-distilled")
def preprocess_func(examples):
return tokenizer(examples["sentence"], padding=True, max_length=256, truncation=True)
data = raw.map(preprocess_func, batched=True)
print(type(data[0]["input_ids"]))
data = data.with_format("torch", columns=["input_ids"])
print(type(data[0]["input_ids"]))
```
printing as expected:
```python
<class 'list'>
<class 'torch.Tensor'>
```
Then run:
```python
raw = load_dataset("beans", split="train")
raw = raw.select(range(100))
preprocessor = AutoFeatureExtractor.from_pretrained("nateraw/vit-base-beans")
def preprocess_func(examples):
imgs = [img.convert("RGB") for img in examples["image"]]
return preprocessor(imgs)
data = raw.map(preprocess_func, batched=True)
print(type(data[0]["pixel_values"]))
data = data.with_format("torch", columns=["pixel_values"])
print(type(data[0]["pixel_values"]))
```
Printing, unexpectedly
```python
<class 'list'>
<class 'list'>
```
## Expected results
`with_format` should transform into the requested format; it's not the case.
## Actual results
`type(data[0]["pixel_values"])` should be `torch.Tensor` in the example above
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: dev version, commit 44af3fafb527302282f6b6507b952de7435f0979
- Platform: Linux
- Python version: 3.9.12
- PyArrow version: 7.0.0
| 167 | `with_format` behavior is inconsistent on different datasets
## Describe the bug
I found a case where `with_format` does not transform the dataset to the requested format.
## Steps to reproduce the bug
Run:
```python
from transformers import AutoTokenizer, AutoFeatureExtractor
from datasets import load_dataset
raw = load_dataset("glue", "sst2", split="train")
raw = raw.select(range(100))
tokenizer = AutoTokenizer.from_pretrained("philschmid/tiny-bert-sst2-distilled")
def preprocess_func(examples):
return tokenizer(examples["sentence"], padding=True, max_length=256, truncation=True)
data = raw.map(preprocess_func, batched=True)
print(type(data[0]["input_ids"]))
data = data.with_format("torch", columns=["input_ids"])
print(type(data[0]["input_ids"]))
```
printing as expected:
```python
<class 'list'>
<class 'torch.Tensor'>
```
Then run:
```python
raw = load_dataset("beans", split="train")
raw = raw.select(range(100))
preprocessor = AutoFeatureExtractor.from_pretrained("nateraw/vit-base-beans")
def preprocess_func(examples):
imgs = [img.convert("RGB") for img in examples["image"]]
return preprocessor(imgs)
data = raw.map(preprocess_func, batched=True)
print(type(data[0]["pixel_values"]))
data = data.with_format("torch", columns=["pixel_values"])
print(type(data[0]["pixel_values"]))
```
Printing, unexpectedly
```python
<class 'list'>
<class 'list'>
```
## Expected results
`with_format` should transform into the requested format; it's not the case.
## Actual results
`type(data[0]["pixel_values"])` should be `torch.Tensor` in the example above
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: dev version, commit 44af3fafb527302282f6b6507b952de7435f0979
- Platform: Linux
- Python version: 3.9.12
- PyArrow version: 7.0.0
Hi! You can get a `torch.Tensor` if you do the following:
```python
raw = load_dataset("beans", split="train")
raw = raw.select(range(100))
preprocessor = AutoFeatureExtractor.from_pretrained("nateraw/vit-base-beans")
from datasets import Array3D
features = raw.features.copy()
features["pixel_values"] = datasets.Array3D(shape=(3, 224, 224), dtype="float32")
def preprocess_func(examples):
imgs = [img.convert("RGB") for img in examples["image"]]
return preprocessor(imgs)
data = raw.map(preprocess_func, batched=True, features=features)
print(type(data[0]["pixel_values"]))
data = data.with_format("torch", columns=["pixel_values"])
print(type(data[0]["pixel_values"]))
```
The reason for this "inconsistency" in the default case is the way PyArrow infers the type of multi-dim arrays (in this case, the `pixel_values` column). If the type is not specified manually, PyArrow assumes it is a dynamic-length sequence (it needs to know the type before writing the first batch to a cache file, and it can't be sure the array is fixed ahead of time; `ArrayXD` is our way of telling that the dims are fixed), so it already fails to convert the corresponding array to NumPy properly (you get an array of `np.object` arrays). And `with_format("torch")` replaces NumPy arrays with Torch tensors, so this bad formatting propagates. | [
-0.004753131419420242,
-0.291262686252594,
0.0034207236021757126,
0.3133130967617035,
0.44153374433517456,
-0.4274804890155792,
0.5510598421096802,
0.47599294781684875,
-0.21898864209651947,
-0.020153358578681946,
-0.009704445488750935,
0.5724509358406067,
-0.03235768526792526,
0.026017503812909126,
-0.006868395023047924,
-0.27524837851524353,
0.3532276451587677,
-0.0656827986240387,
-0.22376930713653564,
-0.09607884287834167,
0.03874631226062775,
-0.07545524835586548,
-0.265138179063797,
-0.06556326150894165,
-0.6778383255004883,
0.32627785205841064,
-0.05479040741920471,
-0.11903484910726547,
0.19844573736190796,
-0.19064347445964813,
0.18198855221271515,
-0.04195709899067879,
0.16850028932094574,
0.7613997459411621,
-0.00011906286090379581,
0.0686105489730835,
0.06017450988292694,
-0.07383416593074799,
-0.016716768965125084,
0.006790652871131897,
0.0375884547829628,
-0.20711453258991241,
0.06359613686800003,
-0.19474321603775024,
-0.4599059820175171,
-0.004949361085891724,
-0.2038680464029312,
-0.12921269237995148,
0.29320505261421204,
0.2433966100215912,
0.13878847658634186,
0.3848716616630554,
0.03967295214533806,
-0.044735055416822433,
-0.04330015927553177,
0.1028863936662674,
-0.10564266890287399,
-0.30410298705101013,
0.15166312456130981,
0.21687588095664978,
-0.04584396630525589,
0.340681254863739,
-0.08789321780204773,
-0.211348757147789,
0.03968279808759689,
0.14240781962871552,
-0.4158233404159546,
-0.22459542751312256,
0.05271626263856888,
0.11582036316394806,
0.4369625747203827,
-0.11809555441141129,
-0.29038816690444946,
0.025565318763256073,
-0.3783506453037262,
-0.08523184061050415,
0.1245083287358284,
0.15338368713855743,
0.12676964700222015,
0.11984722316265106,
-0.2507237493991852,
0.4325454533100128,
-0.25051891803741455,
0.23521669209003448,
-0.3715730309486389,
0.37050381302833557,
-0.10867905616760254,
0.15132351219654083,
-0.3519163131713867,
-0.13070499897003174,
-0.08578167855739594,
-0.23182636499404907,
-0.01517130434513092,
0.18234850466251373,
-0.21217261254787445,
-0.1404523253440857,
-0.10287771373987198,
-0.3663886785507202,
-0.1420728862285614,
0.2889289855957031,
0.008954716846346855,
0.14746887981891632,
-0.2268683761358261,
-0.02537667751312256,
0.17231185734272003,
0.2614070773124695,
0.04695605859160423,
0.4470599293708801,
0.06904582679271698,
-0.1895851194858551,
-0.09084315598011017,
-0.0703759640455246,
-0.06532728672027588,
-0.13297252357006073,
0.2692413926124573,
0.12964877486228943,
0.06680869311094284,
-0.28147682547569275,
-0.26505792140960693,
0.046896036714315414,
-0.35026273131370544,
-0.06478076428174973,
-0.11835508793592453,
-0.04940361529588699,
0.029355406761169434,
0.2910630702972412,
0.18302707374095917,
0.2936997413635254,
-0.19884242117404938,
0.13998137414455414,
-0.17656461894512177,
-0.25998857617378235,
-0.24286502599716187,
-0.20543354749679565,
-0.11205780506134033,
0.10459339618682861,
0.20996923744678497,
0.15984350442886353,
0.028292451053857803,
-0.1236071065068245,
-0.2590211033821106,
-0.21080061793327332,
0.6368114948272705,
0.1548788994550705,
-0.248966246843338,
0.4112357199192047,
0.03730909526348114,
0.06485383212566376,
-0.06228448450565338,
0.26299381256103516,
-0.19252756237983704,
0.00461176410317421,
-0.025445526465773582,
0.1654777079820633,
-0.20363342761993408,
-0.11247678101062775,
0.1416020691394806,
0.15254640579223633,
0.3355677127838135,
-0.01869041658937931,
0.14490030705928802,
-0.34506887197494507,
-0.26740148663520813,
-0.08744976669549942,
0.22942709922790527,
0.11488313972949982,
-0.48833271861076355,
-0.12483938038349152,
0.7076234221458435,
0.200372114777565,
0.24683403968811035,
0.30251002311706543,
-0.07284466177225113,
0.15213623642921448,
-0.21801920235157013,
0.14138926565647125,
0.3382778763771057,
-0.36476951837539673,
-0.46480053663253784,
-0.11855217814445496,
0.010203815996646881,
0.2773114740848541,
0.05884057283401489,
-0.10918276757001877,
0.14722228050231934,
-0.2197212278842926,
-0.21728095412254333,
0.3733043670654297,
0.17665593326091766,
0.06675459444522858,
-0.365794837474823,
-0.09165839850902557,
0.29036301374435425,
-0.1003677248954773,
0.021706392988562584,
-0.065973199903965,
-0.16624265909194946,
0.054914042353630066,
0.20360499620437622,
0.08022134006023407,
-0.11566464602947235,
-0.054694801568984985,
0.12285040318965912,
-0.05620342493057251,
0.17024144530296326,
-0.035351939499378204,
-0.0550268292427063,
0.02784670889377594,
0.16061270236968994,
0.10271060466766357,
-0.040636152029037476,
-0.1456640362739563,
-0.1594800353050232,
-0.3095986545085907,
-0.3678482174873352,
-0.34903043508529663,
0.11068031191825867,
0.20430342853069305,
0.08907535672187805,
-0.03148745372891426,
-0.050018370151519775,
-0.13214562833309174,
0.2465507835149765,
0.12055280804634094,
-0.1718195080757141,
0.15709169209003448,
0.09677819162607193,
-0.333622545003891,
-0.31393739581108093,
0.1944437325000763,
0.26370248198509216,
-0.13188700377941132,
-0.3177051842212677,
0.26744508743286133,
0.17230655252933502,
0.06109870970249176,
-0.7471880912780762,
0.2057631015777588,
0.30168524384498596,
0.003815930336713791,
-0.3814518451690674,
0.3596920669078827,
0.16383470594882965,
0.19119325280189514,
-0.3729493319988251,
0.18043451011180878,
0.1767539232969284,
0.17693208158016205,
-0.15455448627471924,
-0.07861004024744034,
0.16794627904891968,
-0.039381593465805054,
0.00904812291264534,
-0.19102740287780762,
-0.17612677812576294,
0.31411150097846985,
0.11913469433784485,
0.03150998428463936,
-0.26396533846855164,
0.3800812065601349,
0.5293642282485962,
-0.051813755184412,
-0.10380258411169052,
-0.0030060522258281708,
-0.3835475444793701,
0.11164780706167221,
0.04185142368078232,
-0.2903881072998047,
0.3410724699497223,
0.1768050491809845,
-0.2184421718120575,
-0.2412816286087036,
0.012671884149312973,
-0.26203781366348267,
0.2834850549697876,
0.24359425902366638,
-0.12554550170898438,
0.12017326056957245,
0.4138569235801697,
0.19283097982406616,
-0.1178024634718895,
0.08383102715015411,
-0.059230439364910126,
-0.13699749112129211,
-0.2823718786239624,
0.3012470602989197,
-0.2548409700393677,
0.037945330142974854,
-0.37720787525177,
-0.20249895751476288,
0.1657998263835907,
0.03677792847156525,
0.07234581559896469,
-0.018128950148820877,
-0.25198623538017273,
0.2543943226337433,
0.3323289752006531,
0.13920117914676666,
0.3572630286216736,
-0.28122109174728394,
-0.08991432934999466,
0.09354203939437866,
-0.3681791424751282,
0.008616242557764053,
0.07177092880010605,
-0.3416445255279541,
0.1745147705078125,
-0.048003800213336945,
0.05819424241781235,
-0.22501292824745178,
-0.4221879541873932,
0.26694613695144653,
-0.03362985700368881,
0.21055163443088531,
0.0398140624165535,
-0.18498779833316803,
0.15013234317302704,
-0.031170733273029327,
0.25462785363197327,
-0.056601591408252716,
-0.08774661272764206,
0.16929420828819275,
0.06624232232570648,
-0.02094997838139534,
-0.18231163918972015,
-0.2643432021141052,
0.07248681038618088,
-0.06375600397586823,
-0.06650468707084656,
0.02623700723052025,
0.06026056036353111,
0.13311199843883514,
0.1237868070602417,
-0.22334133088588715,
-0.09548556059598923,
0.00561194634065032,
-0.19742907583713531,
-0.07620485126972198,
0.42198094725608826,
0.008325666189193726,
-0.46865859627723694,
-0.34884440898895264,
-0.03509436175227165,
-0.08675266802310944,
0.28393280506134033,
-0.04090109467506409,
-0.32048356533050537,
-0.2684139609336853,
0.17369621992111206,
-0.07677410542964935,
0.3426929712295532,
0.4688095450401306,
0.016764771193265915,
0.02583800069987774,
-0.18975985050201416,
0.10146449506282806,
0.29177504777908325,
0.09183216094970703,
0.002246841788291931,
0.003531217575073242,
0.20347395539283752,
0.33063820004463196,
0.2687441110610962,
0.18967804312705994,
-0.6252298355102539,
-0.014890007674694061,
-0.12595120072364807,
0.034146737307310104,
-0.234724760055542,
-0.0759032741189003,
0.23991204798221588,
0.040717609226703644,
0.17309626936912537,
0.3379247486591339,
-0.01271311566233635,
-0.08765508979558945,
0.21785512566566467,
0.2067427635192871,
-0.3696511387825012,
-0.17504073679447174,
0.23748494684696198,
0.06418697535991669,
0.23241180181503296,
0.05066203698515892,
0.5520447492599487,
0.06246410682797432,
-0.20521673560142517,
0.2284063845872879,
0.03521836921572685,
0.3098917007446289,
-0.030597511678934097,
-0.24101600050926208,
-0.07050026208162308,
-0.2566986382007599,
0.3408423066139221,
0.17216618359088898,
0.49255073070526123,
-0.08572031557559967,
-0.2707751989364624,
0.03493070229887962,
0.09442662447690964,
0.6209513545036316,
-0.1939743608236313,
-0.07374581694602966,
0.1681051254272461,
-0.26964521408081055,
-0.21561071276664734,
-0.3527414798736572,
-0.3406541645526886,
-0.053154125809669495,
0.2643684446811676,
0.7308360934257507,
-0.1576509028673172,
-0.5001010894775391,
0.04688959941267967,
0.1780686378479004,
-0.11664929986000061,
-0.1535639464855194,
-0.09611041843891144,
0.05151776224374771,
-0.1522947996854782,
0.19604533910751343,
0.18394878506660461,
0.24207602441310883,
-0.2745617628097534,
-0.19904373586177826,
-0.3680597245693207,
-0.2769351899623871,
-0.037288859486579895,
-0.0012575248256325722,
0.47146594524383545,
0.02237643487751484,
0.13788463175296783,
0.16870775818824768,
0.27055394649505615,
0.06799660623073578,
0.0094226635992527,
-0.21640580892562866,
-0.1934511363506317,
0.1575651466846466,
-0.36671799421310425,
0.06381821632385254,
0.47379598021507263,
-0.013164432719349861,
0.133060023188591,
-0.5055696964263916,
0.18521222472190857,
-0.2792688012123108,
0.23747345805168152,
0.4573388695716858,
0.0764421597123146,
-0.2563360929489136,
-0.4392136037349701,
0.23674258589744568,
0.06040537729859352,
0.010367579758167267,
0.1253269910812378,
0.004492186009883881,
-0.4128967225551605,
0.597129762172699,
0.09314987063407898,
0.9174236059188843,
0.3982768654823303,
0.31192439794540405,
0.16614916920661926,
-0.26913952827453613,
0.43391135334968567,
-0.08566579222679138,
0.1825457513332367,
-0.4383555054664612,
-0.24231858551502228,
-0.03772798180580139,
-0.13199295103549957,
0.09637798368930817,
0.1823936551809311,
-0.21650534868240356,
0.30938926339149475,
-0.49590396881103516,
0.47381892800331116,
0.14081810414791107,
-0.03844081982970238,
0.24074821174144745,
-0.16207930445671082,
-0.2149169147014618,
0.10335209965705872,
0.04913618788123131,
0.04087063670158386,
0.03425253555178642,
-0.21396757662296295,
-0.19979174435138702,
-0.16514427959918976,
-0.0552850179374218,
0.0030270181596279144,
-0.5379269123077393,
-0.09610962867736816,
0.0949135571718216,
-0.6853106021881104,
0.16802121698856354,
0.23360675573349,
0.34462106227874756,
0.30176547169685364,
-0.007984789088368416,
0.08243673294782639,
0.24384388327598572,
0.5992368459701538,
0.14686885476112366,
-0.35638830065727234,
0.45498964190483093,
0.13170111179351807,
-0.0023363232612609863,
0.021521952003240585,
0.015378541313111782,
-0.012989681214094162,
-0.20223934948444366,
0.08782177418470383,
0.3681502342224121,
-0.5949456691741943,
-0.2773813307285309,
-0.07003261148929596,
0.040390077978372574,
-0.25425031781196594,
0.11728045344352722,
0.016558509320020676,
-0.18991148471832275,
0.4204779267311096,
0.03585265204310417,
-0.2743586301803589,
-0.07746662199497223,
0.25751879811286926,
0.0479728989303112,
-0.11936722695827484,
0.40431496500968933,
-0.0037029460072517395,
-0.0820399671792984,
-0.1551722288131714,
0.24056825041770935,
0.41294950246810913,
-0.7641181349754333,
0.16163690388202667,
-0.3377396762371063,
-0.0750216692686081,
-0.12006355077028275,
0.30852773785591125,
-0.06968256831169128,
-0.08927983790636063,
-0.19504334032535553,
-0.2447384148836136,
0.017239892855286598,
-0.12840555608272552,
0.05398574098944664,
0.29171058535575867,
0.06725173443555832,
0.363483726978302,
-0.3536868393421173,
-0.17552335560321808,
-0.3025000989437103,
0.06512314826250076,
0.26175570487976074,
0.4515230059623718,
-0.30056264996528625,
0.04287321865558624,
0.05180511623620987,
-0.3184744417667389,
0.049724727869033813,
0.4342108964920044,
-0.0491800494492054,
-0.26580384373664856,
-0.5533946752548218,
0.12854015827178955,
0.13707442581653595,
-0.23697219789028168,
-0.17309404909610748,
0.11145380139350891,
0.03826957195997238,
-0.2809358537197113,
0.2273263782262802,
-0.0000795610249042511,
0.06128447875380516,
0.20314501225948334,
0.1221005916595459,
0.2149585485458374,
0.12541304528713226,
-0.06921034306287766,
-0.1721617877483368,
0.39027291536331177,
0.32566937804222107,
0.22226788103580475,
-0.03424842283129692,
-0.0008012428879737854,
-0.07076836377382278,
0.08918192982673645,
0.20215144753456116,
0.3009386658668518,
0.12807893753051758,
-0.36818307638168335,
-0.049789536744356155,
0.05486647039651871,
0.2818778157234192,
0.17922306060791016,
-0.3407484292984009,
-0.42760780453681946,
0.17146828770637512,
0.25164398550987244,
-0.021896645426750183,
-0.2630593478679657,
-0.19011054933071136,
0.09933938086032867,
0.08024390041828156,
0.3467525243759155,
0.16126622259616852,
0.006873786449432373,
-0.1790897399187088,
0.24689072370529175,
0.28570032119750977,
0.027413249015808105,
0.2003818303346634,
0.35039520263671875,
0.11590737104415894,
0.23641549050807953,
0.05740245431661606,
-0.18241773545742035,
-0.14416176080703735,
0.07715770602226257,
0.4299931824207306,
0.4451236128807068,
0.5906835794448853,
-0.011183809489011765,
0.14250029623508453,
-0.09332405030727386,
-0.20846523344516754,
-0.08196713030338287,
0.02222796529531479,
0.38794806599617004,
0.08329243957996368,
-0.12261965125799179,
-0.1856955885887146,
-0.4331081807613373,
0.07084307819604874,
0.03117767721414566,
-0.18966037034988403,
-0.015970608219504356,
-0.07935209572315216,
-0.11151210963726044,
-0.11591456830501556,
0.06277495622634888,
-0.2717445492744446,
0.0579201765358448,
0.06573512405157089,
0.10728283226490021,
-0.11499136686325073,
-0.09532125294208527,
-0.1484087109565735,
0.18272069096565247,
0.23053967952728271,
-0.15245087444782257,
0.4770265221595764,
0.19073641300201416,
-0.15592694282531738,
0.153199702501297,
0.4230990409851074,
0.29171445965766907,
0.2839265763759613,
-0.25320059061050415,
-0.04286579787731171,
-0.014444414526224136,
-0.030711829662322998,
0.11403173208236694,
0.3108457922935486,
-0.10483686625957489,
-0.3225748836994171,
0.09168079495429993,
0.12248796224594116,
-0.1873529702425003,
0.012260343879461288,
0.12142353504896164,
0.19002828001976013,
-0.3163265585899353,
0.38175880908966064,
0.051770299673080444,
-0.21395066380500793,
0.02716418355703354,
-0.3929634690284729,
-0.2851192355155945,
0.009328048676252365,
0.3654620051383972,
0.29739493131637573,
0.3029179275035858,
0.013489381410181522,
0.0606694221496582,
0.211330384016037,
0.14327368140220642,
-0.015006598085165024,
-0.12217288464307785,
-0.3354727625846863,
-0.06164509057998657,
0.005114063620567322,
0.1838870346546173,
0.2565571069717407,
-0.03576104715466499,
-0.10649936646223068,
-0.038556791841983795,
0.11348317563533783,
-0.05043443292379379,
0.2649109661579132,
-0.08888330310583115,
0.38423633575439453,
0.5671130418777466,
-0.27864405512809753,
0.12972667813301086,
-0.16174620389938354,
0.2111198753118515,
-0.05171520635485649,
-0.43280476331710815,
0.11054709553718567,
-0.013881818391382694,
0.18073955178260803,
-0.0733402743935585,
-0.14632026851177216,
0.05497853830456734,
0.13209161162376404,
0.3498710095882416,
0.3863232731819153,
0.26353952288627625,
-0.1374666392803192,
-0.09541784971952438,
-0.19959530234336853,
0.021914677694439888,
-0.4287414848804474,
0.26436424255371094,
-0.17920245230197906,
0.4459012448787689,
0.07162170112133026,
-0.2029198706150055,
-0.28459325432777405,
0.16811494529247284,
0.07236400246620178,
-0.19168630242347717,
-0.18498271703720093,
0.10151967406272888,
-0.2786228656768799,
-0.3159557580947876,
0.2178877294063568,
0.601230263710022,
-0.1195714920759201,
0.10323921591043472,
-0.2500881552696228,
-0.35951077938079834,
0.3224117159843445,
-0.753481924533844,
-0.48488515615463257,
-0.08922849595546722,
0.06691325455904007,
0.17521953582763672,
0.27382561564445496,
-0.3086499571800232,
-0.19383230805397034,
0.30871859192848206,
-0.14790207147598267,
-0.16314777731895447,
0.22529372572898865,
0.30640819668769836,
0.04496130719780922,
-0.16763734817504883,
0.399781733751297,
0.3041743338108063,
-0.26480457186698914,
-0.14738211035728455,
-0.4300997257232666
] |
https://github.com/huggingface/datasets/issues/4799 | video dataset loader/parser | Hi! We've just started discussing the video support in `datasets` (decoding backends, video feature type, etc.), so I believe we should have something tangible by the end of this year.
Also, if you have additional video features in mind that you would like to see, feel free to let us know | you know how you can [use `load_dataset` with any arbitrary csv file](https://huggingface.co/docs/datasets/loading#csv)? and you can also [use it to load a local image dataset](https://huggingface.co/docs/datasets/image_load#local-files)?
could you please add functionality to load a video dataset? it would be really cool if i could point it to a bunch of video files and use pytorch to start looping through batches of videos. like if my batch size is 16, each sample in the batch is a frame from a video. i'm competing in the [minerl challenge](https://www.aicrowd.com/challenges/neurips-2022-minerl-basalt-competition), and it would be awesome to use the HF ecosystem. | 51 | video dataset loader/parser
you know how you can [use `load_dataset` with any arbitrary csv file](https://huggingface.co/docs/datasets/loading#csv)? and you can also [use it to load a local image dataset](https://huggingface.co/docs/datasets/image_load#local-files)?
could you please add functionality to load a video dataset? it would be really cool if i could point it to a bunch of video files and use pytorch to start looping through batches of videos. like if my batch size is 16, each sample in the batch is a frame from a video. i'm competing in the [minerl challenge](https://www.aicrowd.com/challenges/neurips-2022-minerl-basalt-competition), and it would be awesome to use the HF ecosystem.
Hi! We've just started discussing the video support in `datasets` (decoding backends, video feature type, etc.), so I believe we should have something tangible by the end of this year.
Also, if you have additional video features in mind that you would like to see, feel free to let us know | [
-0.36500874161720276,
-0.19072717428207397,
-0.11187003552913666,
-0.009493522346019745,
0.06855712831020355,
0.10973549634218216,
0.25044894218444824,
0.2389797419309616,
0.11081331968307495,
0.01804818958044052,
-0.05601777881383896,
0.04512060806155205,
-0.43462884426116943,
0.562821626663208,
0.46863362193107605,
-0.5941518545150757,
0.08390912413597107,
0.18128274381160736,
0.15590041875839233,
0.19785352051258087,
-0.019426090642809868,
-0.12263211607933044,
-0.06547362357378006,
-0.10675720870494843,
-0.4777791500091553,
0.3020224869251251,
-0.11933503299951553,
0.07711862027645111,
0.16931958496570587,
-0.7096790671348572,
-0.013168641366064548,
0.1324048489332199,
0.6992040872573853,
0.4494294226169586,
-0.00011212241952307522,
-0.20000357925891876,
0.2850891947746277,
-0.11370793730020523,
-0.3228907883167267,
-0.17339907586574554,
-0.008364208042621613,
-0.3991747200489044,
0.3173927068710327,
0.09368211776018143,
-0.01446828804910183,
-0.3745438754558563,
0.3339487910270691,
-0.5732752084732056,
0.2853615880012512,
-0.06833559274673462,
0.12359987199306488,
0.0796637162566185,
-0.2627543807029724,
0.05239357426762581,
0.2223513424396515,
0.47587114572525024,
-0.08508843928575516,
0.09095580875873566,
0.647139310836792,
-0.32711315155029297,
-0.3048929274082184,
0.13428114354610443,
-0.05598287284374237,
-0.024049770087003708,
0.39908137917518616,
0.18943992257118225,
-0.40075093507766724,
-0.568873405456543,
-0.3000616133213043,
0.1131904125213623,
0.48557886481285095,
-0.10551369935274124,
-0.30432212352752686,
-0.37269672751426697,
-0.010224469006061554,
-0.2514338493347168,
-0.23972472548484802,
0.42530137300491333,
-0.20835739374160767,
0.05088520795106888,
-0.10634138435125351,
-0.059878699481487274,
-0.32642775774002075,
0.09412974864244461,
0.309998482465744,
-0.07064597308635712,
-0.08922925591468811,
0.008578989654779434,
0.30667442083358765,
0.26881659030914307,
0.3059196174144745,
-0.04353657364845276,
0.07726582884788513,
0.4945130944252014,
-0.1454203873872757,
-0.14257647097110748,
-0.127101331949234,
0.1150393933057785,
0.09208044409751892,
0.07961556315422058,
-0.058935895562171936,
0.17128661274909973,
-0.23228353261947632,
0.21473360061645508,
0.28848156332969666,
-0.08184750378131866,
0.3062087595462799,
-0.02314385399222374,
0.16990336775779724,
0.003218489233404398,
0.02230822667479515,
-0.06772487610578537,
-0.14372935891151428,
-0.13947628438472748,
-0.2668253481388092,
-0.009957501664757729,
0.15408219397068024,
-0.04833265393972397,
-0.1616150140762329,
0.0005424739792943001,
-0.14084282517433167,
-0.19857315719127655,
0.03256431594491005,
0.17521801590919495,
-0.09317156672477722,
0.38176459074020386,
-0.03198620676994324,
0.13376744091510773,
-0.05382480472326279,
-0.4831564724445343,
0.018545402213931084,
0.02545131929218769,
-0.08880223333835602,
0.3633496165275574,
0.2705087959766388,
-0.379123717546463,
0.03630965203046799,
-0.19607670605182648,
0.18889692425727844,
0.12458193302154541,
0.2560432553291321,
-0.15084071457386017,
-0.027026541531085968,
-0.03706265613436699,
0.2017734795808792,
-0.1615610271692276,
0.1805998831987381,
0.2547197937965393,
-0.06211215257644653,
0.0186360701918602,
-0.1740264892578125,
-0.1630774289369583,
-0.19259516894817352,
0.09686169028282166,
0.16012412309646606,
-0.17250262200832367,
-0.4645853340625763,
0.5096572041511536,
-0.4651987850666046,
-0.10857042670249939,
-0.09854679554700851,
0.06121733412146568,
-0.2816260755062103,
-0.1496375948190689,
0.1790998876094818,
0.228554368019104,
-0.6653215885162354,
-0.17130520939826965,
-0.10724016278982162,
-0.17761604487895966,
-0.1986865997314453,
-0.0320223830640316,
-0.24773196876049042,
0.11978670954704285,
-0.23259322345256805,
0.024154052138328552,
0.06785977631807327,
-0.5440381169319153,
0.17738908529281616,
0.5830923914909363,
0.012547321617603302,
0.23060555756092072,
-0.019692987203598022,
0.4967825710773468,
0.46839579939842224,
-0.2829471826553345,
-0.013060659170150757,
0.6048390865325928,
-0.17188696563243866,
-0.2224416881799698,
0.135433629155159,
-0.11436587572097778,
0.08189176023006439,
0.5013169050216675,
0.11893177032470703,
0.13792850077152252,
0.10867235064506531,
-0.17544589936733246,
0.30595657229423523,
-0.15634338557720184,
0.40783223509788513,
0.12716792523860931,
0.2592211365699768,
0.3762437105178833,
-0.1379549652338028,
-0.2055414319038391,
-0.49149614572525024,
0.11370372027158737,
-0.08538366854190826,
-0.0628810003399849,
0.07800039649009705,
-0.14569929242134094,
0.1606076955795288,
-0.017730431631207466,
-0.25451862812042236,
-0.21844133734703064,
0.01799628883600235,
0.19935575127601624,
-0.19903481006622314,
-0.0214063823223114,
-0.5418309569358826,
0.5510097742080688,
-0.017672352492809296,
0.03316422551870346,
-0.09017591178417206,
0.4240238666534424,
0.17611980438232422,
0.12520043551921844,
-0.13618022203445435,
0.05174936354160309,
-0.05642136186361313,
-0.18826636672019958,
0.28288349509239197,
0.32871875166893005,
0.125287264585495,
0.11356295645236969,
0.3933664560317993,
-0.09960316121578217,
0.3257805109024048,
-0.6654359102249146,
0.26592177152633667,
-0.17643865942955017,
0.11517292261123657,
-0.3153555393218994,
-0.1503315269947052,
0.36249393224716187,
-0.20834636688232422,
0.26329535245895386,
0.036213360726833344,
0.05309972167015076,
0.09423965215682983,
0.12863212823867798,
-0.3721295893192291,
0.0353207066655159,
0.2726426124572754,
-0.19879233837127686,
0.30195456743240356,
-0.3087465763092041,
-0.3900638222694397,
-0.17112576961517334,
0.03473079577088356,
-0.1908169388771057,
-0.2527371942996979,
0.36335811018943787,
-0.3072298467159271,
0.23902824521064758,
-0.014062976464629173,
-0.11108176410198212,
0.2284403145313263,
0.1388368457555771,
-0.19809472560882568,
0.1285148710012436,
0.1102345883846283,
0.07165978848934174,
0.03728658705949783,
0.06877408921718597,
0.07011230289936066,
-0.0010843947529792786,
-0.12320520728826523,
0.024557318538427353,
-0.09639449417591095,
-0.3225495219230652,
-0.022749407216906548,
-0.1689910739660263,
-0.12898683547973633,
0.25306904315948486,
0.013457497581839561,
-0.2896858751773834,
0.05926555395126343,
-0.19502529501914978,
-0.1900377720594406,
-0.1908278912305832,
-0.017465777695178986,
0.29799556732177734,
0.19758586585521698,
0.24852141737937927,
-0.3304327130317688,
0.5377697944641113,
-0.04518730565905571,
-0.022281737998127937,
-0.042181942611932755,
-0.14641520380973816,
-0.07289954274892807,
0.10430486500263214,
0.27947190403938293,
-0.12040545791387558,
0.30040356516838074,
-0.015436406247317791,
0.1444808542728424,
-0.6236281394958496,
-0.15682382881641388,
0.3419977128505707,
-0.15404944121837616,
0.24838148057460785,
-0.07308056950569153,
0.1889398992061615,
0.03920985758304596,
-0.17439314723014832,
0.05153080075979233,
-0.19308075308799744,
0.03174223005771637,
-0.14429715275764465,
0.15852898359298706,
0.026804592460393906,
0.048554640263319016,
0.3486388623714447,
-0.4536657929420471,
-0.4709222614765167,
0.30842310190200806,
0.3723601996898651,
-0.04755660146474838,
-0.1626655012369156,
0.1561121642589569,
0.2506348192691803,
-0.21657101809978485,
-0.0973738431930542,
0.04499586671590805,
-0.46221551299095154,
0.22466635704040527,
-0.4219750761985779,
-0.33672651648521423,
0.07140514254570007,
0.029197361320257187,
-0.1354185789823532,
0.1507730931043625,
-0.3851889967918396,
-0.10500460863113403,
0.23084045946598053,
-0.0173074658960104,
0.02854928933084011,
-0.032434962689876556,
-0.12954244017601013,
-0.01769092120230198,
0.17733371257781982,
0.023432649672031403,
-0.19047485291957855,
-0.2401123344898224,
0.03190635144710541,
0.011677086353302002,
0.39862725138664246,
0.47612622380256653,
-0.02435067482292652,
0.8001507520675659,
0.02368844673037529,
-0.048813771456480026,
0.4946933388710022,
-0.047043927013874054,
0.303099125623703,
-0.20337626338005066,
-0.2734459936618805,
-0.16627395153045654,
-0.42088136076927185,
0.047541625797748566,
0.3061939477920532,
-0.16104164719581604,
-0.10376637428998947,
-0.3383408486843109,
0.05370941385626793,
-0.12998008728027344,
0.03717731311917305,
0.34539011120796204,
-0.4866301417350769,
0.2897298038005829,
-0.3060504198074341,
-0.1804923117160797,
-0.11640845239162445,
-0.029622746631503105,
0.01799912191927433,
0.07137767970561981,
0.591650128364563,
0.04857930913567543,
-0.2013687938451767,
0.4166000783443451,
-0.2095426619052887,
0.28349119424819946,
-0.043609797954559326,
0.06703056395053864,
-0.11740623414516449,
-0.2519521713256836,
0.05441445857286453,
0.14337654411792755,
0.44845491647720337,
-0.009116314351558685,
-0.1316169947385788,
-0.07450021803379059,
-0.37923046946525574,
-0.10876734554767609,
0.01156560331583023,
-0.1590079814195633,
0.05304050073027611,
-0.3725171387195587,
0.27468910813331604,
0.1101895347237587,
-0.3894352912902832,
0.3599845767021179,
-0.08875168114900589,
-0.11387510597705841,
-0.10427417606115341,
-0.007319074124097824,
0.3032000660896301,
-0.375116765499115,
-0.17485293745994568,
0.1348758488893509,
-0.010437128134071827,
-0.0797075629234314,
0.008828599005937576,
-0.2652244567871094,
-0.034961432218551636,
0.36537909507751465,
-0.2209618091583252,
0.07826078683137894,
0.05913100019097328,
0.182207852602005,
0.05949937552213669,
0.21412844955921173,
0.13045331835746765,
0.22443179786205292,
0.007240979000926018,
-0.583544135093689,
0.44530704617500305,
0.05558117851614952,
0.8668390512466431,
0.16133594512939453,
0.17921657860279083,
-0.0016124173998832703,
0.32622799277305603,
0.2884522080421448,
-0.6403315663337708,
0.21264486014842987,
0.4549497067928314,
-0.06013031303882599,
-0.4895113408565521,
-0.45356807112693787,
0.6988480091094971,
0.07632042467594147,
0.08936308324337006,
0.12911087274551392,
0.24520808458328247,
-0.21804633736610413,
0.18650515377521515,
0.19819356501102448,
0.7808159589767456,
0.0007885433733463287,
0.4664826989173889,
-0.0005082748830318451,
-0.026877284049987793,
0.23408308625221252,
-0.5132746696472168,
-0.023018691688776016,
-0.2765604555606842,
-0.35376256704330444,
-0.37373799085617065,
-0.047769736498594284,
0.06747376918792725,
0.2191280573606491,
-0.11163197457790375,
0.29446104168891907,
0.12845009565353394,
0.18435166776180267,
-0.044160790741443634,
0.1996837705373764,
0.028640542179346085,
-0.43433937430381775,
-0.2837187647819519,
0.1822410523891449,
-0.1846797615289688,
0.10397115349769592,
-0.16619697213172913,
-0.15638576447963715,
0.2843801975250244,
0.18883900344371796,
-0.2096206694841385,
0.016174953430891037,
0.015013521537184715,
0.008702769875526428,
-0.018524114042520523,
-0.13425366580486298,
0.04350392892956734,
0.03397132456302643,
-0.07523804903030396,
-0.33828800916671753,
0.0342528261244297,
0.14808744192123413,
-0.03924056142568588,
0.11330177634954453,
-0.05155200883746147,
-0.14761677384376526,
0.3917360305786133,
-0.04126647114753723,
0.06367885321378708,
0.467363566160202,
0.06469743698835373,
-0.6716902852058411,
-0.03179558366537094,
0.1030275970697403,
0.1763361245393753,
-0.09180217981338501,
-0.4490968883037567,
-0.11272925138473511,
-0.015800049528479576,
0.13287444412708282,
0.03620985150337219,
0.18904878199100494,
-0.256443589925766,
-0.22738942503929138,
0.21322961151599884,
-0.08865819871425629,
-0.08462469279766083,
0.19888868927955627,
-0.1808755099773407,
-0.19728216528892517,
0.28660768270492554,
0.49955934286117554,
-0.02383754774928093,
-0.05384580418467522,
0.09916537255048752,
0.3012746274471283,
-0.2564614713191986,
-0.057213228195905685,
0.06012778356671333,
-0.004701405763626099,
-0.00419878214597702,
-0.17740647494792938,
0.20100371539592743,
-0.3624429702758789,
-0.06381179392337799,
-0.3879706859588623,
-0.3129100501537323,
0.2524222731590271,
-0.2471807450056076,
0.2563920319080353,
-0.005113452672958374,
-0.011590668931603432,
0.06396029144525528,
-0.018423205241560936,
-0.24524004757404327,
-0.054916828870773315,
0.2646053433418274,
0.013899063691496849,
0.2660372257232666,
0.13016128540039062,
-0.020292647182941437,
0.20161712169647217,
0.0696796104311943,
0.027376187965273857,
-0.15791912376880646,
-0.07277360558509827,
-0.1317765861749649,
0.17448867857456207,
0.2709638774394989,
-0.13550721108913422,
-0.18696829676628113,
0.06462407857179642,
-0.18512922525405884,
-0.1472950279712677,
-0.05556902289390564,
0.07972285151481628,
0.09967446327209473,
0.3462689518928528,
0.13013072311878204,
-0.19998571276664734,
0.024340510368347168,
0.17527133226394653,
0.29147201776504517,
0.4539175033569336,
0.27301499247550964,
0.11388546228408813,
-0.0029873752500861883,
-0.061031848192214966,
-0.12562468647956848,
0.35821688175201416,
0.40826231241226196,
-0.03220141679048538,
0.3563339412212372,
-0.016226552426815033,
0.2065478265285492,
0.00663813715800643,
0.31505146622657776,
0.20472921431064606,
-0.14303965866565704,
0.009553162381052971,
0.27532556653022766,
0.1313627064228058,
-0.07992126047611237,
-0.00419596629217267,
0.11635047197341919,
-0.06479496508836746,
0.08365441858768463,
0.09522582590579987,
0.060451675206422806,
0.34761443734169006,
0.050979405641555786,
0.11397045105695724,
0.035078395158052444,
-0.08702720701694489,
0.3127661645412445,
-0.006526816636323929,
0.015939470380544662,
0.0850655809044838,
-0.006480233743786812,
0.3707309663295746,
0.1895945817232132,
0.12043627351522446,
-0.4880760908126831,
0.046125948429107666,
-0.19256460666656494,
0.08929891884326935,
0.4076959490776062,
-0.3242557942867279,
-0.16048161685466766,
0.37506791949272156,
-0.14018908143043518,
0.19326680898666382,
0.04438009113073349,
0.31999850273132324,
-0.03881198912858963,
-0.19900424778461456,
-0.3413263261318207,
0.37362366914749146,
0.08855642378330231,
-0.10032854974269867,
-0.05516696721315384,
-0.028829969465732574,
-0.2578187584877014,
0.24967196583747864,
-0.02848276123404503,
-0.27584612369537354,
0.011006474494934082,
0.23519733548164368,
0.07641357183456421,
-0.0927407369017601,
0.2577868700027466,
0.2651273012161255,
0.24149957299232483,
0.07315897941589355,
0.09626881778240204,
0.02710050344467163,
0.11606543511152267,
0.32148632407188416,
0.19134828448295593,
0.01999678835272789,
0.30577677488327026,
-0.33424249291419983,
0.2853301167488098,
-0.19210325181484222,
-0.04375370591878891,
0.21349367499351501,
0.12611371278762817,
-0.06490959227085114,
0.06804533302783966,
0.2719259262084961,
0.20050860941410065,
-0.01429565530270338,
0.021425403654575348,
-0.08184155821800232,
0.04569241404533386,
-0.45682892203330994,
0.082835353910923,
0.012754933908581734,
0.09642767161130905,
-0.15289781987667084,
0.08087992668151855,
-0.47700628638267517,
-0.4046211540699005,
0.4841286540031433,
-0.09414169192314148,
0.05032341182231903,
0.14881078898906708,
0.02275400608778,
-0.1845404952764511,
0.23444302380084991,
0.4032498300075531,
0.03645409643650055,
-0.18670253455638885,
-0.08647000044584274,
-0.5488290786743164,
0.06989829987287521,
0.10069674998521805,
-0.3433357775211334,
-0.15303795039653778,
0.08156075328588486,
0.21275638043880463,
0.3358915448188782,
-0.06431098282337189,
-0.15656214952468872,
0.029111817479133606,
0.04242875054478645,
-0.07547721266746521,
-0.044190745800733566,
-0.02201741933822632,
0.6387342810630798,
-0.21662510931491852,
-0.015325743705034256,
-0.010351929813623428,
-0.10353200882673264,
-0.037678033113479614,
0.03763323277235031,
-0.06211336702108383,
0.0479465089738369,
-0.3840593993663788,
0.4765509068965912,
-0.26822012662887573,
0.24421389400959015,
-0.07271316647529602,
-0.012917252257466316,
-0.23239094018936157,
-0.11205568164587021,
0.0030140457674860954,
-0.02470257133245468,
0.02803555317223072,
0.30511653423309326,
-0.1263071596622467,
-0.12535357475280762,
-0.33645951747894287,
0.3077419400215149,
-0.04432224854826927,
-0.275254487991333,
-0.3796669542789459,
0.057923659682273865,
-0.1644809991121292,
0.08042976260185242,
0.34159040451049805,
0.2154880166053772,
-0.11632062494754791,
0.022568130865693092,
-0.1714867353439331,
-0.03427024930715561,
0.1787799894809723,
-0.46998679637908936,
-0.23788835108280182,
0.23320581018924713,
-0.06273309886455536,
0.3918696343898773,
0.15433098375797272,
-0.16721829771995544,
-0.0749630555510521,
0.22817324101924896,
-0.1662362515926361,
0.2066589593887329,
0.36557623744010925,
0.016902092844247818,
0.04651016369462013,
-0.17074453830718994,
-0.2765282094478607,
0.09701808542013168,
-0.02353430911898613,
-0.15504181385040283,
-0.35327810049057007
] |
https://github.com/huggingface/datasets/issues/4799 | video dataset loader/parser | Hey @mariosasko, I was wondering if there's a way to load video data currently in the library?
Alternatively is there a way I could hack it through the dataset.from_dict() method? I tried to hack it, but the issue I run into is that earlier I was doing a `cast_column()` call for the `Image` feature, but now I'm not sure about to do if I want the dataset to have the following keys when I call from_dict on it:
`{"caption":[list of text captions], "video_frames": [list of image lists with one image list corresponding to one video]}`
Maybe something like `cast_column("video_frames", List(Image))` ..
(This is assuming I have already extracted frames from video) | you know how you can [use `load_dataset` with any arbitrary csv file](https://huggingface.co/docs/datasets/loading#csv)? and you can also [use it to load a local image dataset](https://huggingface.co/docs/datasets/image_load#local-files)?
could you please add functionality to load a video dataset? it would be really cool if i could point it to a bunch of video files and use pytorch to start looping through batches of videos. like if my batch size is 16, each sample in the batch is a frame from a video. i'm competing in the [minerl challenge](https://www.aicrowd.com/challenges/neurips-2022-minerl-basalt-competition), and it would be awesome to use the HF ecosystem. | 111 | video dataset loader/parser
you know how you can [use `load_dataset` with any arbitrary csv file](https://huggingface.co/docs/datasets/loading#csv)? and you can also [use it to load a local image dataset](https://huggingface.co/docs/datasets/image_load#local-files)?
could you please add functionality to load a video dataset? it would be really cool if i could point it to a bunch of video files and use pytorch to start looping through batches of videos. like if my batch size is 16, each sample in the batch is a frame from a video. i'm competing in the [minerl challenge](https://www.aicrowd.com/challenges/neurips-2022-minerl-basalt-competition), and it would be awesome to use the HF ecosystem.
Hey @mariosasko, I was wondering if there's a way to load video data currently in the library?
Alternatively is there a way I could hack it through the dataset.from_dict() method? I tried to hack it, but the issue I run into is that earlier I was doing a `cast_column()` call for the `Image` feature, but now I'm not sure about to do if I want the dataset to have the following keys when I call from_dict on it:
`{"caption":[list of text captions], "video_frames": [list of image lists with one image list corresponding to one video]}`
Maybe something like `cast_column("video_frames", List(Image))` ..
(This is assuming I have already extracted frames from video) | [
-0.2739097476005554,
-0.2916853129863739,
-0.025689247995615005,
0.28202104568481445,
0.10169997811317444,
0.06980840116739273,
0.2130122184753418,
0.17537906765937805,
0.15993660688400269,
-0.06503234803676605,
-0.22566282749176025,
0.0951714962720871,
-0.3376169502735138,
0.49277788400650024,
0.5026252269744873,
-0.5430178642272949,
0.066510871052742,
0.028850913047790527,
0.1206417828798294,
0.01806173473596573,
-0.02398521639406681,
0.0612364336848259,
-0.11321942508220673,
-0.004821248352527618,
-0.29766684770584106,
0.3082115352153778,
-0.12494894862174988,
0.21722909808158875,
0.17980538308620453,
-0.5723285675048828,
0.14433662593364716,
0.16956494748592377,
0.6358978748321533,
0.44615015387535095,
-0.00012083530600648373,
-0.2048039436340332,
0.20458991825580597,
-0.23235855996608734,
-0.1909848004579544,
-0.24838705360889435,
0.18109989166259766,
-0.28760695457458496,
0.3310545086860657,
0.03416875749826431,
-0.11551305651664734,
-0.3039397895336151,
0.2701396048069,
-0.4318476915359497,
0.3428252339363098,
-0.07942579686641693,
0.06994850933551788,
0.07862899452447891,
-0.17791691422462463,
0.18124058842658997,
0.2706927955150604,
0.5490210652351379,
-0.03776729106903076,
0.17113806307315826,
0.5656359195709229,
-0.2446112483739853,
-0.19424697756767273,
0.12429377436637878,
-0.0905878096818924,
-0.05910288915038109,
0.5831013917922974,
0.2615191638469696,
-0.5426262617111206,
-0.4941783845424652,
-0.2982814908027649,
0.2838306427001953,
0.4000670909881592,
-0.16514718532562256,
-0.2925085127353668,
-0.2966409921646118,
-0.05212892219424248,
-0.26055648922920227,
-0.11970136314630508,
0.4360247552394867,
-0.261806845664978,
-0.010156206786632538,
-0.11402617394924164,
-0.12579675018787384,
-0.3398296535015106,
0.15257711708545685,
0.22096696496009827,
-0.060228437185287476,
-0.11650418490171432,
0.079463429749012,
0.42743706703186035,
0.2152671068906784,
0.059175021946430206,
0.03426320105791092,
0.05977348983287811,
0.5571446418762207,
-0.13068728148937225,
-0.10029193758964539,
-0.24006995558738708,
0.14137540757656097,
0.14765453338623047,
0.08369729667901993,
-0.09008269757032394,
0.21663182973861694,
-0.2720170021057129,
0.1746433675289154,
0.41623279452323914,
-0.05916227772831917,
0.21454504132270813,
0.08627936244010925,
0.10451152920722961,
0.11392325907945633,
-0.01914561539888382,
-0.05852246284484863,
-0.16579049825668335,
-0.09015149623155594,
-0.3200709819793701,
-0.06579790264368057,
0.17186510562896729,
-0.1662205159664154,
-0.0796423852443695,
-0.13348478078842163,
-0.1491091251373291,
-0.17733709514141083,
0.10379882901906967,
0.32431265711784363,
-0.11643774062395096,
0.36240315437316895,
0.09112522006034851,
0.0590958446264267,
-0.1486949771642685,
-0.2909132242202759,
0.02306392788887024,
0.12316924333572388,
-0.03983544930815697,
0.2379491776227951,
0.23745878040790558,
-0.41403627395629883,
0.05140624940395355,
-0.15316568315029144,
0.2637366056442261,
0.0655200183391571,
0.1221051812171936,
-0.16204017400741577,
0.09345237910747528,
0.06258809566497803,
0.17462007701396942,
-0.06282059848308563,
0.16186390817165375,
0.19868384301662445,
-0.22459590435028076,
0.04225107282400131,
-0.19708603620529175,
-0.1565539389848709,
-0.19219738245010376,
-0.007709772326052189,
0.1449522078037262,
-0.1336764693260193,
-0.5475416779518127,
0.40529608726501465,
-0.3377951979637146,
-0.12161588668823242,
-0.037867628037929535,
0.012986937537789345,
-0.3320937752723694,
-0.2081233114004135,
0.3337094485759735,
0.33896657824516296,
-0.5972890257835388,
-0.21481065452098846,
0.014369048178195953,
-0.1674206554889679,
-0.16366654634475708,
0.10971473157405853,
-0.31104981899261475,
0.058314740657806396,
-0.2876061499118805,
0.0014784112572669983,
0.12619738280773163,
-0.6877211332321167,
0.12231743335723877,
0.5603613257408142,
0.1773757040500641,
0.3077588677406311,
-0.0025433525443077087,
0.5721849203109741,
0.48568493127822876,
-0.1637563556432724,
-0.019819162786006927,
0.6871220469474792,
-0.08305671811103821,
-0.27639105916023254,
0.11103548109531403,
-0.13099928200244904,
0.17743903398513794,
0.4108354151248932,
0.08076031506061554,
0.14436636865139008,
0.0330638624727726,
-0.07079380005598068,
0.43109387159347534,
-0.20428761839866638,
0.3392550051212311,
0.1550251841545105,
0.21882331371307373,
0.44427692890167236,
-0.05430418998003006,
-0.17404556274414062,
-0.4715433120727539,
0.18313583731651306,
-0.1282249093055725,
-0.006490219384431839,
0.02688668668270111,
-0.14646795392036438,
0.1306372880935669,
0.04788453131914139,
-0.29661688208580017,
-0.2125372290611267,
-0.10235099494457245,
0.1831953227519989,
-0.16445209085941315,
-0.11454465985298157,
-0.6659752726554871,
0.6375767588615417,
-0.057908061891794205,
0.05034356936812401,
-0.3098407983779907,
0.3561675548553467,
0.15961550176143646,
0.13244140148162842,
-0.22340185940265656,
0.060421742498874664,
0.055838629603385925,
-0.27735936641693115,
0.29451391100883484,
0.35231178998947144,
0.2233104556798935,
0.08035559952259064,
0.1195405051112175,
-0.08700703084468842,
0.3960847556591034,
-0.653550922870636,
0.17003695666790009,
-0.04286034777760506,
0.15609779953956604,
-0.21373909711837769,
-0.06825197488069534,
0.44769734144210815,
-0.14816798269748688,
0.3520106375217438,
0.09782950580120087,
0.1024499237537384,
0.09996359050273895,
0.1069478988647461,
-0.3421552777290344,
0.004304654896259308,
0.2930511236190796,
-0.1050155758857727,
0.2666187584400177,
-0.22661472856998444,
-0.46498286724090576,
-0.16874471306800842,
0.08255122601985931,
-0.1735609471797943,
-0.3492177724838257,
0.38652414083480835,
-0.2581576108932495,
0.20488578081130981,
0.033781711012125015,
-0.13589268922805786,
0.13680513203144073,
0.06420990824699402,
-0.3005303740501404,
0.1823524832725525,
0.028395600616931915,
0.09979105740785599,
0.011157780885696411,
0.07602913677692413,
0.014339974150061607,
-0.14500033855438232,
-0.1696956604719162,
0.09427244961261749,
-0.22025078535079956,
-0.25242799520492554,
-0.017072871327400208,
-0.159126877784729,
-0.26189836859703064,
0.41225993633270264,
0.038170844316482544,
-0.30712011456489563,
0.010239879600703716,
-0.24644698202610016,
-0.2619379162788391,
-0.1002691239118576,
-0.09675149619579315,
0.34453120827674866,
0.19125398993492126,
0.17232778668403625,
-0.2313445657491684,
0.38526681065559387,
-0.07363416254520416,
-0.14485707879066467,
-0.10867983102798462,
-0.11192719638347626,
-0.13638043403625488,
0.004400573670864105,
0.29702675342559814,
-0.010960187762975693,
0.2319839745759964,
-0.08065124601125717,
-0.10292647778987885,
-0.5357639193534851,
-0.20195329189300537,
0.27821779251098633,
-0.09640659391880035,
0.3258572220802307,
0.036801889538764954,
0.17895033955574036,
-0.08550126850605011,
-0.1958439201116562,
0.08299696445465088,
-0.23320157825946808,
-0.027595574036240578,
-0.09759397059679031,
0.09658589214086533,
0.11207474768161774,
0.003211256116628647,
0.2700878381729126,
-0.5319042801856995,
-0.3777448832988739,
0.3656100630760193,
0.5230989456176758,
0.11848200112581253,
-0.0229174941778183,
0.028875242918729782,
0.10922936350107193,
-0.26468056440353394,
-0.00004438869655132294,
-0.06441512703895569,
-0.3959881365299225,
0.24506902694702148,
-0.3249971270561218,
-0.3819000720977783,
0.06752476096153259,
-0.003746982663869858,
-0.12960723042488098,
0.1501263678073883,
-0.46756666898727417,
-0.23356576263904572,
0.24472232162952423,
-0.011209812015295029,
0.019832680001854897,
0.005863923579454422,
-0.09459646046161652,
-0.13281334936618805,
0.2509537935256958,
0.0892939493060112,
-0.18369151651859283,
-0.1001865342259407,
0.11504639685153961,
0.030397675931453705,
0.40094906091690063,
0.4840772747993469,
-0.10367891192436218,
0.773938775062561,
-0.05971459299325943,
-0.03452511504292488,
0.4752117097377777,
-0.1490819901227951,
0.34273308515548706,
-0.1706613004207611,
-0.290202260017395,
-0.21258969604969025,
-0.3613012731075287,
0.014588776975870132,
0.29029375314712524,
-0.13018667697906494,
-0.006907081231474876,
-0.3307202160358429,
0.06794314086437225,
-0.10669171810150146,
0.009690392762422562,
0.30714449286460876,
-0.38273918628692627,
0.13608673214912415,
-0.2741752862930298,
-0.10096542537212372,
-0.09781837463378906,
-0.120601125061512,
0.06319847702980042,
0.15474152565002441,
0.6046532392501831,
0.044527530670166016,
-0.18969351053237915,
0.3057330846786499,
-0.30342841148376465,
0.22293497622013092,
-0.06941808760166168,
0.09556994587182999,
-0.04634757712483406,
-0.12982118129730225,
0.1908707320690155,
0.041645556688308716,
0.6545155644416809,
0.16720682382583618,
-0.1406358778476715,
0.08209729194641113,
-0.49410149455070496,
-0.2614533007144928,
0.04812648519873619,
-0.2028435617685318,
-0.033789537847042084,
-0.25043436884880066,
0.2240571826696396,
-0.0610242560505867,
-0.42164346575737,
0.30145224928855896,
-0.00007331365486606956,
-0.21431440114974976,
-0.03226867690682411,
-0.10941655188798904,
0.02393743395805359,
-0.4679935574531555,
-0.22988373041152954,
0.10705064982175827,
0.0810132697224617,
0.10287050902843475,
0.07608902454376221,
-0.2088364064693451,
-0.025836624205112457,
0.40821051597595215,
-0.2281097173690796,
0.2554650604724884,
0.17122530937194824,
0.14007334411144257,
0.007324229925870895,
0.21568216383457184,
0.04477091133594513,
0.2823715806007385,
0.027010342106223106,
-0.5069660544395447,
0.2867051661014557,
0.16802950203418732,
0.756700873374939,
0.20657801628112793,
0.09787225723266602,
0.11335243284702301,
0.39913442730903625,
0.18159015476703644,
-0.6509617567062378,
0.18213725090026855,
0.3842385411262512,
-0.09799200296401978,
-0.33426347374916077,
-0.506120502948761,
0.7130239605903625,
0.1224900335073471,
-0.0004131197929382324,
0.08275925368070602,
0.4325050115585327,
-0.272690087556839,
0.31305181980133057,
0.22544553875923157,
1.0047001838684082,
-0.20289431512355804,
0.5605013370513916,
0.14305466413497925,
-0.07492978125810623,
0.34572166204452515,
-0.44831007719039917,
-0.08946473896503448,
-0.34762659668922424,
-0.28004369139671326,
-0.3859665095806122,
-0.012825209647417068,
-0.05387256294488907,
0.09748680144548416,
-0.011672433465719223,
0.3942500352859497,
-0.08719834685325623,
0.18311701714992523,
-0.07224806398153305,
0.19974929094314575,
0.07880506664514542,
-0.4951331913471222,
-0.3927476406097412,
0.08516561985015869,
-0.20876555144786835,
0.19495625793933868,
-0.09112116694450378,
-0.18644298613071442,
0.28778672218322754,
0.06285425275564194,
-0.1902225762605667,
0.012617439031600952,
-0.04898395761847496,
-0.01056700386106968,
0.039965011179447174,
-0.12170518189668655,
-0.08059631288051605,
0.08570544421672821,
0.0038698315620422363,
-0.36932286620140076,
0.07311763614416122,
0.21224209666252136,
-0.0469900518655777,
0.1053927093744278,
-0.028986254706978798,
-0.057730481028556824,
0.4672717750072479,
-0.09189626574516296,
0.07539590448141098,
0.3913494348526001,
0.04104702174663544,
-0.7323522567749023,
0.05918954312801361,
0.11900705099105835,
0.186730295419693,
-0.04662859067320824,
-0.5020449757575989,
-0.1270277500152588,
-0.0514306016266346,
0.1345052272081375,
-0.03424501046538353,
0.23645737767219543,
-0.35474878549575806,
-0.15108761191368103,
0.29315727949142456,
-0.13560214638710022,
-0.06338083744049072,
0.34095528721809387,
-0.03851543366909027,
-0.3119153082370758,
0.3196759521961212,
0.5231512784957886,
0.04469693452119827,
0.06267675757408142,
-0.001161813735961914,
0.36476442217826843,
-0.35862603783607483,
-0.012985297478735447,
0.1635606735944748,
0.022921130061149597,
-0.09081674367189407,
0.008853532373905182,
0.18299387395381927,
-0.272854745388031,
-0.14021936058998108,
-0.3682035207748413,
-0.35888490080833435,
0.36428678035736084,
-0.1702931821346283,
0.23144224286079407,
0.06324972957372665,
-0.02548760175704956,
-0.0023334622383117676,
0.04894757643342018,
-0.16762210428714752,
0.05749816447496414,
0.21347184479236603,
0.027668017894029617,
0.30411407351493835,
0.15438959002494812,
-0.020173152908682823,
0.23301494121551514,
-0.0008103139698505402,
-0.01775507628917694,
-0.09133058786392212,
0.009593483060598373,
-0.22902368009090424,
0.2192101776599884,
0.1701674461364746,
-0.18582604825496674,
-0.2682006359100342,
-0.07098305225372314,
-0.1988428831100464,
-0.15018261969089508,
0.033388979732990265,
0.17222392559051514,
0.1222028061747551,
0.2598177194595337,
0.1624314785003662,
-0.1705370843410492,
-0.19381773471832275,
0.24695660173892975,
0.2789408564567566,
0.48547351360321045,
0.23446384072303772,
0.09685809165239334,
-0.12585727870464325,
-0.12850508093833923,
-0.17352551221847534,
0.36693471670150757,
0.344576895236969,
-0.10803326219320297,
0.35704630613327026,
0.08057376742362976,
0.1815621554851532,
-0.00127863185480237,
0.42846763134002686,
0.2880593538284302,
-0.1340756118297577,
0.04308532923460007,
0.21195483207702637,
-0.012711571529507637,
-0.14281120896339417,
0.000566868984606117,
0.059972621500492096,
-0.20274299383163452,
0.02125054970383644,
0.19804883003234863,
0.031977828592061996,
0.3139422535896301,
0.08335728943347931,
0.04808320850133896,
0.13189105689525604,
-0.05458417534828186,
0.21319551765918732,
-0.0003741905093193054,
-0.11884231865406036,
0.11070992797613144,
0.016924113035202026,
0.3583125174045563,
0.21204343438148499,
0.24021317064762115,
-0.5860597491264343,
0.03268040344119072,
-0.21239745616912842,
0.16959148645401,
0.3849784731864929,
-0.36219021677970886,
-0.1346178501844406,
0.4929417371749878,
0.00444377213716507,
0.17293787002563477,
0.015469834208488464,
0.41301852464675903,
-0.05792511627078056,
-0.3068721890449524,
-0.30174368619918823,
0.5080212354660034,
0.07534159719944,
-0.15907318890094757,
-0.06922793388366699,
-0.03352117910981178,
-0.24689975380897522,
0.21106573939323425,
-0.0530555434525013,
-0.36730921268463135,
-0.0008798614144325256,
0.2795148491859436,
0.13406047224998474,
-0.04902828484773636,
0.09255091100931168,
0.1885453462600708,
0.2783183753490448,
0.04496650770306587,
0.1831539422273636,
0.06897220760583878,
0.2426432967185974,
0.32691076397895813,
0.10122691094875336,
-0.004808790981769562,
0.2774789035320282,
-0.24729052186012268,
0.30167651176452637,
-0.05623013153672218,
0.013978352770209312,
0.24476897716522217,
0.12349793314933777,
-0.026246055960655212,
0.23786284029483795,
0.24272339046001434,
0.08219511061906815,
0.04261690005660057,
-0.09842976927757263,
-0.06327967345714569,
0.1422480344772339,
-0.38602617383003235,
0.22760024666786194,
-0.06521902978420258,
0.06458462029695511,
-0.25166839361190796,
0.09437370300292969,
-0.39335688948631287,
-0.36352401971817017,
0.35441431403160095,
-0.07174551486968994,
0.0869925394654274,
0.22173504531383514,
-0.03862554579973221,
-0.1670549213886261,
0.2668626606464386,
0.3796164095401764,
0.10176919400691986,
-0.2151648849248886,
-0.06066924333572388,
-0.6865871548652649,
0.05007414519786835,
0.1737690567970276,
-0.3840554654598236,
-0.023149866610765457,
0.11007574200630188,
0.30756837129592896,
0.19972831010818481,
-0.06462158262729645,
-0.1878105103969574,
0.0884934663772583,
-0.01274140179157257,
-0.032770413905382156,
-0.0921655148267746,
-0.1403719037771225,
0.6000277400016785,
-0.2725430727005005,
-0.07751788198947906,
-0.012738112360239029,
-0.25861918926239014,
-0.1772116720676422,
0.08222904801368713,
-0.11184178292751312,
-0.05888102203607559,
-0.38624757528305054,
0.2828555703163147,
-0.2717783749103546,
0.32985949516296387,
-0.04215075448155403,
-0.004040414467453957,
-0.09710848331451416,
-0.1464119851589203,
0.007524802349507809,
-0.03701788932085037,
-0.04360609129071236,
0.3230932950973511,
-0.08358745276927948,
-0.00681912899017334,
-0.42762041091918945,
0.3293606638908386,
-0.019989538937807083,
-0.2904326617717743,
-0.3914421498775482,
0.1155390664935112,
-0.19227394461631775,
0.03560364991426468,
0.2892614006996155,
0.3138594329357147,
-0.09482264518737793,
0.05293183773756027,
-0.28184109926223755,
-0.021189173683524132,
0.4365292191505432,
-0.49992749094963074,
-0.18710942566394806,
0.1539621353149414,
-0.020133674144744873,
0.28345271944999695,
0.12590444087982178,
-0.34488439559936523,
0.02535654604434967,
0.18867622315883636,
-0.1474013328552246,
0.11349079012870789,
0.36075887084007263,
-0.11397644877433777,
0.05516807362437248,
-0.18822836875915527,
-0.24740442633628845,
0.13006223738193512,
-0.05182801932096481,
-0.13999967277050018,
-0.37443965673446655
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | @mariosasko I'm getting a similar issue when creating a Dataset from a Pandas dataframe, like so:
```
from datasets import Dataset, Features, Image, Value
import pandas as pd
import requests
import PIL
# we need to define the features ourselves
features = Features({
'a': Value(dtype='int32'),
'b': Image(),
})
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = PIL.Image.open(requests.get(url, stream=True).raw)
df = pd.DataFrame({"a": [1, 2],
"b": [image, image]})
dataset = Dataset.from_pandas(df, features=features)
```
results in
```
ArrowInvalid: ('Could not convert <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=640x480 at 0x7F7991A15C10> with type JpegImageFile: did not recognize Python value type when inferring an Arrow data type', 'Conversion failed for column b with type object')
```
Will the PR linked above also fix that? | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 113 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
@mariosasko I'm getting a similar issue when creating a Dataset from a Pandas dataframe, like so:
```
from datasets import Dataset, Features, Image, Value
import pandas as pd
import requests
import PIL
# we need to define the features ourselves
features = Features({
'a': Value(dtype='int32'),
'b': Image(),
})
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = PIL.Image.open(requests.get(url, stream=True).raw)
df = pd.DataFrame({"a": [1, 2],
"b": [image, image]})
dataset = Dataset.from_pandas(df, features=features)
```
results in
```
ArrowInvalid: ('Could not convert <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=640x480 at 0x7F7991A15C10> with type JpegImageFile: did not recognize Python value type when inferring an Arrow data type', 'Conversion failed for column b with type object')
```
Will the PR linked above also fix that? | [
-0.16127412021160126,
-0.40690404176712036,
-0.0032085739076137543,
0.25208738446235657,
0.09850870817899704,
0.09969864040613174,
0.329359769821167,
0.29973095655441284,
-0.21165382862091064,
0.0772438794374466,
0.133023202419281,
0.6992092728614807,
-0.03194902464747429,
-0.05089789628982544,
-0.19800980389118195,
-0.07683393359184265,
0.1169838160276413,
0.22046996653079987,
-0.07618959248065948,
-0.09730812907218933,
-0.40053558349609375,
0.030226415023207664,
0.03872393071651459,
0.07877630740404129,
-0.6151454448699951,
-0.2527994215488434,
-0.13982142508029938,
-0.031284525990486145,
-0.28069859743118286,
-0.2089827060699463,
0.2691381871700287,
-0.2968513071537018,
-0.043976329267024994,
0.03874034434556961,
-0.0001221762504428625,
-0.06545311212539673,
0.47547364234924316,
0.05504291504621506,
0.058500196784734726,
-0.4060765504837036,
-0.2789945900440216,
-0.2638298273086548,
0.20061317086219788,
-0.21331314742565155,
0.16251131892204285,
-0.26291409134864807,
0.015772951766848564,
0.28116005659103394,
0.031042195856571198,
0.3333269953727722,
0.1395232379436493,
0.34520983695983887,
0.17261971533298492,
-0.010961064137518406,
0.36259734630584717,
0.2739449441432953,
-0.3465874493122101,
0.16907452046871185,
0.1470699906349182,
0.1358102560043335,
0.15121248364448547,
0.40778428316116333,
0.190429225564003,
0.22136227786540985,
0.2965971529483795,
0.07653551548719406,
-0.07527748495340347,
-0.46331825852394104,
-0.14884912967681885,
-0.061509206891059875,
-0.045820705592632294,
-0.03065023571252823,
-0.4272998571395874,
-0.1430031806230545,
0.08352050930261612,
-0.07440046966075897,
0.24966028332710266,
0.16091009974479675,
-0.061947040259838104,
-0.04896514490246773,
0.2141953855752945,
-0.14459505677223206,
-0.22725141048431396,
0.19092026352882385,
-0.039335012435913086,
-0.04952716827392578,
0.015009327791631222,
0.25741052627563477,
-0.051675040274858475,
-0.18451954424381256,
0.3020327389240265,
-0.07034836709499359,
0.08124226331710815,
-0.15043802559375763,
0.019785188138484955,
0.13410715758800507,
-0.0319734662771225,
0.07594693452119827,
0.12914222478866577,
0.001765374094247818,
-0.11005592346191406,
-0.007282610982656479,
-0.5123403072357178,
0.4115945100784302,
0.1332300305366516,
0.032346099615097046,
-0.3615381419658661,
0.12957249581813812,
-0.03839422017335892,
-0.10540363192558289,
-0.05557091534137726,
-0.03856118768453598,
-0.13398103415966034,
-0.3687480092048645,
0.30905237793922424,
-0.0333164818584919,
0.5987802147865295,
-0.041776254773139954,
-0.3397051990032196,
0.005096298176795244,
-0.1751694679260254,
0.23686575889587402,
-0.16502612829208374,
0.20851221680641174,
0.14683979749679565,
0.21584948897361755,
0.2991606593132019,
0.4803507328033447,
-0.13804863393306732,
0.21560010313987732,
-0.03642158582806587,
0.22709695994853973,
-0.2642571032047272,
-0.22938592731952667,
-0.11365014314651489,
-0.23527315258979797,
0.0240430049598217,
0.045736223459243774,
0.2636123597621918,
-0.16626912355422974,
0.0664941743016243,
-0.26127123832702637,
0.4522257447242737,
0.138637974858284,
-0.23909710347652435,
0.04050566256046295,
0.13571830093860626,
0.01417049765586853,
-0.16011367738246918,
0.27468329668045044,
-0.40731173753738403,
-0.03718610107898712,
-0.4592542052268982,
0.04207742586731911,
-0.016577528789639473,
-0.1462918072938919,
-0.44172921776771545,
0.13954943418502808,
-0.04644448310136795,
0.051210466772317886,
0.09074372053146362,
-0.3227633833885193,
-0.035771239548921585,
-0.11975979059934616,
-0.17473186552524567,
0.2876076102256775,
-0.1488461047410965,
0.04204055666923523,
0.009531091898679733,
-0.0788128525018692,
0.00482594221830368,
0.10695730149745941,
-0.05476733297109604,
-0.028123654425144196,
-0.26759153604507446,
-0.0068049803376197815,
0.09831836819648743,
-0.36409643292427063,
-0.41886579990386963,
0.008531605824828148,
0.036727175116539,
0.018211370334029198,
-0.1272774636745453,
0.34406548738479614,
0.0269481111317873,
0.040771324187517166,
0.0416720025241375,
0.35364729166030884,
-0.057795241475105286,
0.17209523916244507,
-0.06494244933128357,
-0.5044094324111938,
0.16627635061740875,
0.09393128752708435,
0.2526557445526123,
0.24197983741760254,
0.17576348781585693,
-0.1794128715991974,
-0.14767977595329285,
-0.05107530578970909,
0.30033838748931885,
-0.09370642900466919,
0.46572327613830566,
-0.03441021591424942,
0.03543650358915329,
-0.21997615694999695,
0.00406242161989212,
-0.002658892422914505,
0.15468838810920715,
0.2479552924633026,
-0.5273355841636658,
-0.08095754683017731,
-0.3953019082546234,
0.1842353492975235,
-0.31143853068351746,
0.09112110733985901,
0.09128628671169281,
0.10148443281650543,
-0.3571087718009949,
-0.05595213919878006,
-0.1600431352853775,
0.43950775265693665,
0.11362604796886444,
0.2386268526315689,
-0.19634748995304108,
0.23632566630840302,
-0.05993176996707916,
-0.2961701452732086,
0.08344736695289612,
0.11078593134880066,
0.11859070509672165,
0.05218973383307457,
-0.41377493739128113,
0.2021007537841797,
0.05951974168419838,
0.42913931608200073,
0.11203315854072571,
-0.3003864288330078,
0.28606611490249634,
-0.489313542842865,
-0.1463719606399536,
0.0254225917160511,
0.4248511791229248,
0.21712225675582886,
0.002794131636619568,
0.3695836365222931,
-0.030725914984941483,
0.14158877730369568,
-0.17881877720355988,
0.24219191074371338,
0.12885813415050507,
0.21257612109184265,
-0.18843583762645721,
-0.2769114673137665,
-0.4443492889404297,
0.29379555583000183,
-0.0020731166005134583,
-0.08268124610185623,
-0.26068639755249023,
-0.0409109964966774,
0.11009339988231659,
0.08428433537483215,
0.3470911681652069,
0.1851080060005188,
-0.12411727756261826,
0.20975008606910706,
0.5378695726394653,
0.1620263010263443,
0.301135778427124,
0.09475172311067581,
-0.2433830201625824,
0.09187943488359451,
-0.3943769633769989,
0.08809594064950943,
0.24793994426727295,
0.28349316120147705,
0.49527859687805176,
-0.040610745549201965,
0.45928919315338135,
-0.08248607814311981,
-0.3586021065711975,
-0.06214074045419693,
0.09493196755647659,
0.08368141949176788,
-0.28200918436050415,
0.06168374419212341,
-0.41988369822502136,
0.035367682576179504,
-0.12555375695228577,
-0.1526470184326172,
0.05737859010696411,
-0.25056958198547363,
-0.12148267030715942,
0.15277892351150513,
-0.0636041983962059,
0.0434216633439064,
-0.1024528443813324,
0.05382917821407318,
0.26225435733795166,
-0.29480502009391785,
-0.11504101008176804,
-0.0006910865195095539,
-0.12157506495714188,
-0.04859123378992081,
0.06944625079631805,
0.14184290170669556,
0.5774625539779663,
0.11917095631361008,
0.4689154028892517,
-0.3225942850112915,
-0.28478604555130005,
-0.029832184314727783,
-0.23151226341724396,
0.3972078859806061,
0.08785643428564072,
0.0610976368188858,
-0.12454993277788162,
-0.07680981606245041,
0.26843851804733276,
0.14512836933135986,
-0.1916174441576004,
-0.04620786011219025,
-0.3501104712486267,
-0.179865300655365,
-0.13375473022460938,
-0.421340674161911,
-0.19490161538124084,
-0.15222442150115967,
0.0714753121137619,
0.18822535872459412,
0.054318785667419434,
-0.060184575617313385,
0.6192044019699097,
0.11441941559314728,
0.17244990170001984,
-0.09062264859676361,
-0.2734560966491699,
0.10539714992046356,
0.4149450659751892,
-0.18743471801280975,
-0.26587432622909546,
0.07124955952167511,
-0.4640389680862427,
0.10121271014213562,
0.19374500215053558,
-0.09909114241600037,
-0.5497812628746033,
-0.20095360279083252,
0.5963419675827026,
0.07306397706270218,
0.08966110646724701,
0.11772193759679794,
0.2473544180393219,
-0.02892872877418995,
-0.19348248839378357,
-0.12796716392040253,
0.014826200902462006,
0.12223398685455322,
0.21127626299858093,
0.19632640480995178,
0.23633018136024475,
0.10545966029167175,
0.17721623182296753,
-0.05846898630261421,
-0.3384714722633362,
0.6441131830215454,
-0.279411643743515,
0.2358504831790924,
-0.24144932627677917,
-0.3067481219768524,
-0.058749206364154816,
-0.15008917450904846,
0.06489631533622742,
-0.3909257650375366,
-0.11832083016633987,
-0.33173730969429016,
-0.006190679967403412,
-0.07845382392406464,
-0.5393650531768799,
-0.15188147127628326,
-0.049822740256786346,
-0.05136139690876007,
0.05953419208526611,
0.02154064178466797,
-0.21439847350120544,
-0.3648073077201843,
-0.034998707473278046,
0.1741631031036377,
0.3246597647666931,
0.13190075755119324,
-0.07516322284936905,
-0.023653248324990273,
-0.2811846435070038,
-0.1012066975235939,
0.1320425570011139,
0.20706558227539062,
0.5006103515625,
0.0904741883277893,
0.10076413303613663,
0.07325202226638794,
-0.10258996486663818,
0.6520023345947266,
-0.35298213362693787,
-0.22452296316623688,
-0.061924856156110764,
0.027267493307590485,
-0.31713271141052246,
0.03896930441260338,
-0.17259690165519714,
0.10979080945253372,
-0.220908060669899,
0.6335620284080505,
-0.12185139209032059,
0.17063166201114655,
0.09530315548181534,
-0.06786081194877625,
-0.07206432521343231,
0.029961280524730682,
-0.19045646488666534,
-0.267742782831192,
-0.5242595076560974,
0.008404500782489777,
0.26172691583633423,
0.17273446917533875,
0.11448074132204056,
-0.3324122130870819,
-0.447800874710083,
0.17477947473526,
0.09878946840763092,
0.09003135561943054,
0.269376277923584,
-0.08988261222839355,
0.06879593431949615,
-0.18746259808540344,
0.3279295563697815,
0.254757821559906,
0.48304685950279236,
0.04581926763057709,
-0.3019201457500458,
0.029042290523648262,
-0.04884720966219902,
0.07519470155239105,
0.25900861620903015,
-0.09384696930646896,
-0.0004897639155387878,
-0.2350931167602539,
0.0059587061405181885,
-0.29434990882873535,
0.19734899699687958,
0.32553961873054504,
-0.05184062570333481,
0.17911607027053833,
-0.15286771953105927,
0.6532509922981262,
-0.10711604356765747,
-0.0660477951169014,
0.27484142780303955,
0.5886427760124207,
-0.14209800958633423,
0.5766512155532837,
0.4800097346305847,
0.9603468775749207,
0.09700129926204681,
0.02014704793691635,
0.4603332579135895,
-0.49075841903686523,
0.2856479585170746,
0.5093352198600769,
0.03183651715517044,
-0.3023757040500641,
0.1138930544257164,
-0.10409937053918839,
-0.16144125163555145,
0.30432644486427307,
-0.11400030553340912,
-0.315350741147995,
-0.14685805141925812,
-0.014479398727416992,
0.023341551423072815,
-0.08010321110486984,
0.03776554763317108,
-0.6629338264465332,
-0.4177131652832031,
-0.048998281359672546,
0.17901058495044708,
0.09990634024143219,
0.14641804993152618,
0.03170741721987724,
-0.1923731565475464,
-0.6214495897293091,
0.040612541139125824,
-0.11980418860912323,
0.09025222808122635,
-0.20533707737922668,
0.1890910267829895,
0.12321846187114716,
-0.08748705685138702,
-0.04644819349050522,
0.03285533934831619,
0.26283174753189087,
-0.3122531771659851,
-0.056130990386009216,
0.22107061743736267,
0.19254019856452942,
0.031996674835681915,
0.03248002380132675,
-0.2573525309562683,
0.5452288389205933,
-0.0038410797715187073,
-0.34021520614624023,
-0.03921237587928772,
0.08790033310651779,
0.015085592865943909,
-0.029163561761379242,
0.08631636947393417,
-0.18592356145381927,
-0.17199154198169708,
-0.777699887752533,
-0.02051491290330887,
-0.20008577406406403,
-0.14100375771522522,
0.07087783515453339,
0.07463692128658295,
-0.012422977015376091,
0.280565083026886,
0.310217022895813,
-0.19786354899406433,
0.17091584205627441,
0.13226057589054108,
-0.13111799955368042,
0.12471058964729309,
0.29217225313186646,
-0.21213304996490479,
-0.15712426602840424,
-0.025715665891766548,
0.4871078133583069,
0.2289181649684906,
-0.6076945066452026,
0.06163531914353371,
-0.16667066514492035,
-0.23587805032730103,
-0.16521644592285156,
0.0900690034031868,
0.061899058520793915,
0.26456567645072937,
-0.10022774338722229,
-0.18711808323860168,
-0.21697095036506653,
0.1522538661956787,
-0.20497745275497437,
0.42485296726226807,
-0.3221016228199005,
-0.028451528400182724,
0.11521394550800323,
-0.17633339762687683,
-0.22512641549110413,
0.2579352557659149,
-0.05099485069513321,
0.34377366304397583,
-0.36672642827033997,
0.2706499695777893,
0.039906445890665054,
-0.10679124295711517,
0.030856912955641747,
0.4714093804359436,
-0.1073203906416893,
-0.042236328125,
-0.33142614364624023,
0.1903131902217865,
0.3286614716053009,
-0.05488429218530655,
-0.14791610836982727,
-0.15723417699337006,
-0.11527843773365021,
-0.10207930952310562,
0.11636215448379517,
0.1432228684425354,
-0.40655648708343506,
0.10219345986843109,
0.022483520209789276,
-0.17472821474075317,
0.2616391181945801,
0.01378210075199604,
0.15520058572292328,
0.40707337856292725,
-0.0658973976969719,
-0.003949642181396484,
-0.08648834377527237,
0.15574386715888977,
-0.07045074552297592,
0.13117483258247375,
-0.08255855739116669,
0.0583302266895771,
0.31402772665023804,
-0.07985290884971619,
0.03298461064696312,
0.014349045231938362,
0.17196519672870636,
-0.005999311804771423,
-0.20292089879512787,
0.03436083346605301,
-0.00018247216939926147,
0.115232914686203,
-0.2876185178756714,
0.055251412093639374,
-0.01443614810705185,
-0.2111038714647293,
0.14999611675739288,
0.199265718460083,
0.11630964279174805,
0.3500044047832489,
-0.6152434349060059,
-0.10235227644443512,
0.16875959932804108,
-0.4554704427719116,
-0.06073937192559242,
0.276700496673584,
-0.189169242978096,
0.21424774825572968,
0.4068303406238556,
0.11076891422271729,
0.21380668878555298,
0.5817112922668457,
0.22607961297035217,
0.3276781439781189,
0.44869494438171387,
0.1545456051826477,
0.5482282638549805,
-0.009685499593615532,
0.11148194968700409,
0.033207908272743225,
0.30098021030426025,
0.2978978753089905,
0.27376723289489746,
0.23723194003105164,
-0.3157001733779907,
-0.25025370717048645,
-0.05044303461909294,
-0.06045065447688103,
-0.03744044154882431,
-0.13585683703422546,
-0.27785712480545044,
-0.06341418623924255,
-0.5677843689918518,
-0.11181041598320007,
-0.11526866257190704,
-0.32677632570266724,
0.2016509473323822,
0.37839168310165405,
-0.10142986476421356,
0.09064308553934097,
-0.08491325378417969,
0.16582655906677246,
0.2694171369075775,
-0.19725735485553741,
-0.020366540178656578,
0.06049017235636711,
0.027402091771364212,
0.06710053235292435,
0.5170289278030396,
0.4509531557559967,
0.4450620412826538,
-0.1662398725748062,
0.15335054695606232,
0.2460830807685852,
-0.24912263453006744,
0.24342459440231323,
0.11665076017379761,
0.1494567096233368,
0.3524181842803955,
0.19659744203090668,
0.10578809678554535,
-0.04647771269083023,
0.03415069729089737,
0.010662131011486053,
0.1319398283958435,
-0.24903789162635803,
0.42505285143852234,
-0.41474971175193787,
-0.21152693033218384,
-0.14782467484474182,
-0.09568183869123459,
-0.4099118113517761,
-0.19786189496517181,
0.4200664758682251,
-0.3678535223007202,
0.1776181161403656,
-0.03109050542116165,
0.018327802419662476,
-0.22553937137126923,
0.18165895342826843,
0.37950748205184937,
0.007695496082305908,
-0.011822999455034733,
0.07042638957500458,
-0.7187594175338745,
-0.009002141654491425,
0.09093157947063446,
-0.3086272180080414,
0.18529292941093445,
0.15539923310279846,
-0.08258987218141556,
0.20273908972740173,
0.2762693166732788,
-0.21285074949264526,
0.49528050422668457,
0.44334879517555237,
-0.12292386591434479,
-0.1825185865163803,
0.30911070108413696,
-0.017909908667206764,
-0.002956582233309746,
-0.4871683716773987,
0.07192844152450562,
0.07888799160718918,
0.051610998809337616,
-0.058704622089862823,
-0.3409906327724457,
-0.17147992551326752,
-0.1379261314868927,
0.616783618927002,
0.34641873836517334,
0.17518250644207,
-0.20692619681358337,
-0.038540177047252655,
-0.21819940209388733,
-0.3474976718425751,
-0.19168376922607422,
0.054606299847364426,
-0.1109548807144165,
0.7808231115341187,
0.17156711220741272,
-0.039792146533727646,
-0.054196927696466446,
0.12393119931221008,
-0.02703791670501232,
-0.26829782128334045,
-0.32023027539253235,
0.26408129930496216,
-0.47317853569984436,
-0.23342640697956085,
-0.08793216943740845,
0.3217237591743469,
0.13036921620368958,
0.2869431972503662,
-0.05317063257098198,
-0.4936557114124298,
0.37518545985221863,
-0.17035910487174988,
-0.41622844338417053,
0.1927257925271988,
0.05512124300003052,
0.3614964485168457,
-0.011214172467589378,
-0.40039604902267456,
-0.11416912078857422,
0.10233887284994125,
0.09973279386758804,
-0.11933478713035583,
0.18955235183238983,
0.21296639740467072,
0.14921867847442627,
-0.1820145845413208,
0.35191452503204346,
-0.12306912988424301,
0.20601607859134674,
0.09458573162555695,
-0.16654865443706512
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | I would expect this to work, but it doesn't. Shouldn't be too hard to fix tho (in a subsequent PR). | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 20 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
I would expect this to work, but it doesn't. Shouldn't be too hard to fix tho (in a subsequent PR). | [
-0.2117660790681839,
-0.5029460191726685,
-0.013351897709071636,
0.2395038604736328,
-0.024524599313735962,
0.12014967948198318,
0.2301861196756363,
0.2871049642562866,
-0.1885230839252472,
0.07185448706150055,
0.15346845984458923,
0.6264151930809021,
-0.030290737748146057,
-0.12099803984165192,
-0.09916573017835617,
-0.013427771627902985,
0.10068999975919724,
0.13709133863449097,
-0.059919729828834534,
-0.17851310968399048,
-0.3720339238643646,
0.12472917884588242,
0.030533835291862488,
0.023622769862413406,
-0.6163688898086548,
-0.16390596330165863,
-0.13571250438690186,
0.06383761018514633,
-0.2873380184173584,
-0.22308610379695892,
0.23124919831752777,
-0.16424395143985748,
-0.00943602155894041,
0.029860928654670715,
-0.00012358062667772174,
-0.05480644851922989,
0.4234657883644104,
0.06862384080886841,
-0.017903873696923256,
-0.35496991872787476,
-0.193849116563797,
-0.22767572104930878,
0.02670401521027088,
-0.1817781925201416,
0.1570671796798706,
-0.21407151222229004,
0.058491453528404236,
0.3881988227367401,
-0.00035818666219711304,
0.2487977147102356,
0.13316090404987335,
0.27735015749931335,
0.1860446035861969,
-0.005221604369580746,
0.571125328540802,
0.31321796774864197,
-0.2751336991786957,
0.17698247730731964,
0.13125768303871155,
0.045635104179382324,
0.16510647535324097,
0.48259392380714417,
0.2365010678768158,
0.2195786088705063,
0.3426850140094757,
0.11742695420980453,
-0.08857812732458115,
-0.3760221600532532,
-0.11689000576734543,
-0.09937850385904312,
-0.020300842821598053,
-0.124003104865551,
-0.3801376521587372,
-0.09706060588359833,
0.12987345457077026,
-0.09131626039743423,
0.249775230884552,
0.1982901692390442,
-0.11147430539131165,
-0.09752196073532104,
0.2134638875722885,
-0.29289546608924866,
-0.2441636621952057,
0.1890164017677307,
0.009801194071769714,
0.028096355497837067,
0.11237699538469315,
0.20576956868171692,
-0.04884229972958565,
-0.14273801445960999,
0.376929372549057,
0.03276346996426582,
-0.02976766601204872,
-0.13958902657032013,
-0.0008095167577266693,
0.1021144688129425,
-0.0406239777803421,
0.15736642479896545,
0.25443243980407715,
-0.07755691558122635,
-0.161325603723526,
0.0937352254986763,
-0.4949062764644623,
0.39519432187080383,
0.14170503616333008,
0.010929984971880913,
-0.18466001749038696,
0.23719196021556854,
-0.03259254992008209,
-0.05436216667294502,
-0.08666688948869705,
0.0310809426009655,
-0.11059362441301346,
-0.33583158254623413,
0.32194745540618896,
-0.03132030740380287,
0.5409665107727051,
-0.16291765868663788,
-0.2924818694591522,
0.02674298733472824,
-0.14021199941635132,
0.17176708579063416,
-0.18466311693191528,
0.3381780982017517,
0.2131161093711853,
0.09905820339918137,
0.34895646572113037,
0.39284640550613403,
-0.1989191174507141,
0.0847044438123703,
-0.032768622040748596,
0.26726335287094116,
-0.2644241154193878,
-0.14852139353752136,
-0.13813644647598267,
-0.2450510561466217,
0.07103431969881058,
0.015176939778029919,
0.3323368430137634,
-0.08447839319705963,
0.06479494273662567,
-0.2035938799381256,
0.5234259963035583,
0.14287307858467102,
-0.23726212978363037,
-0.02057521976530552,
0.07168430089950562,
0.09555080533027649,
-0.15806476771831512,
0.3042217791080475,
-0.5297889709472656,
-0.12343700230121613,
-0.40807855129241943,
0.059433598071336746,
0.010430306196212769,
-0.17810815572738647,
-0.31710579991340637,
0.0937950611114502,
-0.10239139944314957,
-0.061357587575912476,
0.15085375308990479,
-0.425952672958374,
-0.139414444565773,
-0.0877225399017334,
-0.10598651319742203,
0.24456307291984558,
-0.1592356115579605,
0.03117920458316803,
-0.06784661114215851,
-0.07356056571006775,
-0.12640881538391113,
0.020261548459529877,
-0.08297445625066757,
0.1484191119670868,
-0.38822969794273376,
0.030382879078388214,
0.0794152244925499,
-0.42908382415771484,
-0.4649958312511444,
-0.07530713081359863,
0.022693626582622528,
0.04776352643966675,
-0.2380741536617279,
0.34334614872932434,
0.0534493550658226,
-0.026154013350605965,
0.1007356196641922,
0.2859271168708801,
-0.018190333619713783,
0.11276339739561081,
-0.198684960603714,
-0.40497925877571106,
0.060914210975170135,
0.22153975069522858,
0.25167831778526306,
0.1797306388616562,
0.25454196333885193,
-0.11123102903366089,
-0.0693201944231987,
-0.013127367943525314,
0.2783386707305908,
-0.03267306834459305,
0.5466398596763611,
-0.05434678494930267,
0.15391062200069427,
-0.134163498878479,
-0.0937601700425148,
0.007948275655508041,
-0.007328629493713379,
0.27969902753829956,
-0.38419216871261597,
-0.09349366277456284,
-0.3273814618587494,
0.2161155790090561,
-0.35435086488723755,
0.03701245039701462,
0.09424492716789246,
0.08544602990150452,
-0.4200361669063568,
-0.193189337849617,
-0.16234178841114044,
0.45645731687545776,
0.12346941232681274,
0.2325001209974289,
-0.15866847336292267,
0.28874698281288147,
-0.09340184181928635,
-0.32387712597846985,
0.011973198503255844,
0.04931727796792984,
0.14958544075489044,
0.02121010422706604,
-0.40294787287712097,
0.2850034236907959,
0.034950923174619675,
0.35523778200149536,
0.16353699564933777,
-0.2938804626464844,
0.29572349786758423,
-0.5931724905967712,
-0.07359166443347931,
-0.03167939931154251,
0.3734765946865082,
0.1465671956539154,
0.00901263952255249,
0.32868579030036926,
0.0091094970703125,
0.1820550560951233,
-0.19985315203666687,
0.14697718620300293,
-0.05204826593399048,
0.11175477504730225,
-0.12183269113302231,
-0.16700690984725952,
-0.20832394063472748,
0.19698666036128998,
-0.03151727095246315,
-0.23945395648479462,
-0.25375789403915405,
0.08550715446472168,
0.17719139158725739,
0.12646156549453735,
0.2927185595035553,
0.33043399453163147,
-0.1615327000617981,
0.23892182111740112,
0.5946409106254578,
0.05477835610508919,
0.33286455273628235,
0.15047699213027954,
-0.27380654215812683,
0.2572557330131531,
-0.34662216901779175,
0.11076116561889648,
0.18318161368370056,
0.1517144739627838,
0.4243515729904175,
0.013982236385345459,
0.45311760902404785,
-0.021743714809417725,
-0.4132784903049469,
-0.14827394485473633,
0.020132629200816154,
0.05821602791547775,
-0.3424183428287506,
-0.03840837627649307,
-0.35709840059280396,
0.0763087198138237,
-0.23306961357593536,
-0.15258868038654327,
-0.0011750385165214539,
-0.2766493558883667,
0.03561257943511009,
0.18630075454711914,
-0.10961548984050751,
-0.008187610656023026,
0.10463808476924896,
0.06360630691051483,
0.11823494732379913,
-0.2987690269947052,
-0.18257571756839752,
0.047342441976070404,
-0.1484028697013855,
-0.044104620814323425,
0.06104052811861038,
0.1886315792798996,
0.5748822093009949,
0.108322374522686,
0.32248950004577637,
-0.3462020754814148,
-0.33118027448654175,
0.030424853786826134,
-0.18328334391117096,
0.4061581492424011,
0.10559160262346268,
0.10621495544910431,
-0.1059919148683548,
-0.07170433551073074,
0.27837294340133667,
0.11869092285633087,
-0.16954295337200165,
-0.037974532693624496,
-0.34986966848373413,
-0.15369912981987,
-0.1431213915348053,
-0.4450778663158417,
-0.18551349639892578,
-0.1946900188922882,
-0.02687796950340271,
0.12093931436538696,
0.11640200018882751,
-0.04643376171588898,
0.5887184739112854,
0.11227784305810928,
0.09039783477783203,
-0.16738326847553253,
-0.16977481544017792,
0.04554804787039757,
0.35557088255882263,
-0.23393426835536957,
-0.2867622971534729,
0.13642477989196777,
-0.330774188041687,
0.04068082198500633,
0.1740981787443161,
-0.24637137353420258,
-0.5523689985275269,
-0.09274304658174515,
0.6284675002098083,
-0.07973848283290863,
0.08092354983091354,
0.13443192839622498,
0.2117694914340973,
-0.02393498830497265,
-0.1938270628452301,
-0.16789281368255615,
0.004605710506439209,
0.15227043628692627,
0.3085220456123352,
0.08976235240697861,
0.07999458909034729,
0.05558718368411064,
0.20276129245758057,
-0.04400446265935898,
-0.22853900492191315,
0.6232283115386963,
-0.21026182174682617,
0.18218600749969482,
-0.27782922983169556,
-0.24927778542041779,
0.04479940980672836,
-0.09723331034183502,
-0.02588975429534912,
-0.3021962642669678,
-0.13406923413276672,
-0.28915172815322876,
0.08253699541091919,
-0.1834246963262558,
-0.48881614208221436,
-0.1431228518486023,
0.04172040522098541,
0.009457971900701523,
0.00017996877431869507,
0.05527956411242485,
-0.28424325585365295,
-0.3013051152229309,
-0.09701821953058243,
0.27776291966438293,
0.32140839099884033,
0.03283379226922989,
-0.04019823297858238,
-0.14162631332874298,
-0.42891979217529297,
-0.036461591720581055,
0.19652476906776428,
0.13196717202663422,
0.42443931102752686,
-0.04282618314027786,
0.12456410378217697,
0.0822950005531311,
-0.2260567843914032,
0.6962680816650391,
-0.42763298749923706,
-0.11385509371757507,
-0.025857293978333473,
0.1252252608537674,
-0.25743362307548523,
-0.04098032787442207,
-0.17309726774692535,
0.02561013773083687,
-0.21606124937534332,
0.6166743636131287,
-0.13324525952339172,
0.22520750761032104,
0.15460923314094543,
-0.11435498297214508,
-0.05219913646578789,
-0.05452202633023262,
-0.16313254833221436,
-0.26631054282188416,
-0.542957603931427,
-0.07262253016233444,
0.1528448462486267,
0.12482438236474991,
0.12564539909362793,
-0.2873563766479492,
-0.24560464918613434,
0.22634810209274292,
0.04148862510919571,
0.05818807706236839,
0.31210753321647644,
-0.12470541894435883,
0.06036721542477608,
-0.1428421586751938,
0.29820388555526733,
0.33823397755622864,
0.5649169087409973,
0.01632472686469555,
-0.1493043452501297,
-0.02802230790257454,
-0.09441501647233963,
0.11585989594459534,
0.35615047812461853,
0.01190205942839384,
0.04448830336332321,
-0.2921726703643799,
0.08023619651794434,
-0.30082574486732483,
0.17843440175056458,
0.2415008246898651,
-0.06899243593215942,
0.23041877150535583,
-0.045601606369018555,
0.635166585445404,
-0.17595511674880981,
-0.039239127188920975,
0.3453083634376526,
0.5538365244865417,
-0.14985127747058868,
0.6893150210380554,
0.45689940452575684,
1.055248498916626,
0.19730383157730103,
-0.04075618460774422,
0.3445981740951538,
-0.5195788145065308,
0.15975438058376312,
0.2530546188354492,
0.019302111119031906,
-0.34410545229911804,
0.024846184998750687,
-0.06516445428133011,
-0.12653447687625885,
0.24585938453674316,
-0.1337670385837555,
-0.3375295102596283,
-0.10203005373477936,
0.05018424987792969,
-0.061677705496549606,
-0.14704389870166779,
0.05986037850379944,
-0.6668704748153687,
-0.3867506682872772,
0.07361826300621033,
0.20125611126422882,
0.08665372431278229,
0.24338267743587494,
-0.08252272009849548,
-0.15072977542877197,
-0.558002769947052,
-0.14685507118701935,
-0.14925788342952728,
0.15734660625457764,
-0.23805959522724152,
0.02707519382238388,
0.14956720173358917,
-0.03296804055571556,
-0.03601015359163284,
-0.07073123753070831,
0.2536056637763977,
-0.3111574351787567,
-0.09462705254554749,
0.22766363620758057,
0.18901726603507996,
0.0912383496761322,
0.06850002706050873,
-0.2413000464439392,
0.5199950933456421,
-0.12331823259592056,
-0.3997950553894043,
-0.1255965232849121,
0.07162017375230789,
0.022331275045871735,
0.03737060725688934,
0.03568501025438309,
-0.09618078172206879,
-0.10042497515678406,
-0.6875522136688232,
0.1660313904285431,
-0.2132529765367508,
-0.1381296068429947,
0.07875632494688034,
0.016037769615650177,
-0.11739317327737808,
0.3049091398715973,
0.3668099343776703,
-0.1830110400915146,
0.18317095935344696,
0.11738565564155579,
-0.1738404631614685,
0.12030394375324249,
0.33546003699302673,
-0.16381032764911652,
-0.042642392218112946,
-0.08548734337091446,
0.47501498460769653,
0.3108244836330414,
-0.6550375819206238,
-0.06836794316768646,
-0.20263288915157318,
-0.21230490505695343,
-0.12834444642066956,
0.14309778809547424,
0.017077801749110222,
0.1890876144170761,
-0.18072746694087982,
-0.2364954799413681,
-0.13570064306259155,
0.1644577533006668,
-0.21240030229091644,
0.4353400766849518,
-0.39308643341064453,
-0.002240976318717003,
0.15742257237434387,
-0.05721686780452728,
-0.25728943943977356,
0.2823961079120636,
-0.01149202324450016,
0.3454674482345581,
-0.4263083338737488,
0.37856143712997437,
0.036077830940485,
-0.12224957346916199,
0.03174827992916107,
0.5143982172012329,
-0.1592271327972412,
-0.05046685412526131,
-0.32511594891548157,
0.21141347289085388,
0.32080137729644775,
0.018688220530748367,
-0.1192895919084549,
-0.1673581898212433,
-0.08531290292739868,
-0.09254590421915054,
0.08790777623653412,
0.015501882880926132,
-0.42236214876174927,
0.1565673053264618,
0.11454634368419647,
-0.07807072252035141,
0.2878599762916565,
0.07135947048664093,
0.32189178466796875,
0.39892226457595825,
-0.09840860962867737,
-0.004048429429531097,
-0.20986926555633545,
0.15545709431171417,
-0.02757839672267437,
0.15047286450862885,
-0.025649383664131165,
0.11539166420698166,
0.26978522539138794,
-0.053633227944374084,
0.0838148444890976,
-0.09232650697231293,
0.16768759489059448,
-0.014096565544605255,
-0.3057311475276947,
0.024158483371138573,
-0.0679721087217331,
0.1392693668603897,
-0.2733984887599945,
0.08481892198324203,
0.03695804625749588,
-0.1524789035320282,
0.09553715586662292,
0.13200248777866364,
0.18744103610515594,
0.3997047543525696,
-0.5900678038597107,
-0.010664951987564564,
0.23452414572238922,
-0.5337079167366028,
-0.11815206706523895,
0.1729414463043213,
-0.2606847286224365,
0.2642221450805664,
0.28345897793769836,
-0.00900585949420929,
0.18679600954055786,
0.6190881729125977,
0.22242820262908936,
0.36679065227508545,
0.495699405670166,
0.1610184609889984,
0.5644869208335876,
-0.04797998443245888,
0.16583621501922607,
0.24757343530654907,
0.5241310596466064,
0.28685271739959717,
0.25331640243530273,
0.24666088819503784,
-0.21233391761779785,
-0.35415589809417725,
0.04182039201259613,
-0.08910718560218811,
0.027133535593748093,
0.038968008011579514,
-0.35477983951568604,
-0.01697826385498047,
-0.666940450668335,
-0.09346818923950195,
-0.09102921187877655,
-0.3537895679473877,
0.32085689902305603,
0.3882637619972229,
-0.1670082062482834,
0.07811254262924194,
-0.11469940096139908,
0.18045499920845032,
0.2033717930316925,
-0.2839631736278534,
0.06355718523263931,
0.10646521300077438,
-0.030254684388637543,
0.1472909152507782,
0.5428887009620667,
0.44482386112213135,
0.45984402298927307,
-0.14209888875484467,
0.15685079991817474,
0.14611588418483734,
-0.17963197827339172,
0.1995219737291336,
0.06357097625732422,
0.1097721979022026,
0.31741848587989807,
0.202592670917511,
0.1196402758359909,
-0.08074449002742767,
0.09123340994119644,
0.009307287633419037,
0.15982910990715027,
-0.1825692504644394,
0.36766883730888367,
-0.32599937915802,
-0.2649325728416443,
-0.1781255006790161,
-0.19736051559448242,
-0.39766210317611694,
-0.17790934443473816,
0.430091917514801,
-0.3142147660255432,
0.13326746225357056,
-0.007102718576788902,
0.016494855284690857,
-0.2951244115829468,
0.2073858380317688,
0.4041045606136322,
-0.03349114954471588,
-0.052183665335178375,
-0.08687353134155273,
-0.7093842625617981,
0.10572437942028046,
-0.01653161644935608,
-0.2673132121562958,
0.2532418370246887,
0.11494477093219757,
-0.00025134533643722534,
0.15192514657974243,
0.41320866346359253,
-0.3381841778755188,
0.5011125802993774,
0.44272202253341675,
-0.18367692828178406,
-0.12806780636310577,
0.3313382863998413,
0.05817490071058273,
0.023920726031064987,
-0.4647250175476074,
0.13273997604846954,
0.005983124487102032,
0.01899818331003189,
-0.023383311927318573,
-0.3094377815723419,
-0.08792911469936371,
-0.3294502794742584,
0.6847370266914368,
0.23224550485610962,
0.20936977863311768,
-0.27191469073295593,
-0.05455407127737999,
-0.2277335226535797,
-0.3305343687534332,
-0.23583684861660004,
-0.10206722468137741,
-0.08296041190624237,
0.812889814376831,
0.2417815625667572,
-0.0924021303653717,
-0.05467899516224861,
0.007037878967821598,
-0.06698379665613174,
-0.11525530368089676,
-0.25595521926879883,
0.37007075548171997,
-0.45672231912612915,
-0.1661619395017624,
-0.09176326543092728,
0.3135186433792114,
0.23186486959457397,
0.19698409736156464,
-0.2323603630065918,
-0.4736090302467346,
0.4322323799133301,
-0.049123115837574005,
-0.33824336528778076,
0.2024659961462021,
0.18119430541992188,
0.17505115270614624,
-0.08175262063741684,
-0.5511801242828369,
-0.18862001597881317,
0.09072232991456985,
0.10528196394443512,
-0.14580611884593964,
0.26019740104675293,
0.28635215759277344,
0.12236678600311279,
-0.12786351144313812,
0.4715823829174042,
-0.055810973048210144,
0.14043132960796356,
0.10032598674297333,
-0.17801626026630402
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | Hi @mariosasko just wanted to check in if there is a PR to follow for this. I was looking to create a demo app using this. If it's not working I can just use byte encoded images in the dataset which are not displayed. | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 44 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
Hi @mariosasko just wanted to check in if there is a PR to follow for this. I was looking to create a demo app using this. If it's not working I can just use byte encoded images in the dataset which are not displayed. | [
-0.19783848524093628,
-0.503277599811554,
-0.025165170431137085,
0.23628848791122437,
0.07377518713474274,
0.11654048413038254,
0.25312894582748413,
0.28388524055480957,
-0.2029329240322113,
0.07516364753246307,
0.25091004371643066,
0.6167120337486267,
-0.08183755725622177,
-0.04800649359822273,
-0.0877847969532013,
-0.04248030483722687,
0.13291224837303162,
0.15152950584888458,
0.06869801878929138,
-0.14684763550758362,
-0.3484089970588684,
0.10389745980501175,
-0.03246193006634712,
0.03050922229886055,
-0.5638564229011536,
-0.11892024427652359,
-0.17363183200359344,
0.052338823676109314,
-0.3356558084487915,
-0.2402866780757904,
0.2146921008825302,
-0.13261768221855164,
0.04833892732858658,
0.008752070367336273,
-0.00012654402235057205,
-0.07782730460166931,
0.46474331617355347,
-0.00333571620285511,
-0.004372309893369675,
-0.31527066230773926,
-0.24656811356544495,
-0.24281838536262512,
0.04523732513189316,
-0.21806180477142334,
0.09655613452196121,
-0.26649636030197144,
0.15514586865901947,
0.28262442350387573,
0.09446351230144501,
0.24047502875328064,
0.08025100082159042,
0.222087562084198,
0.22104258835315704,
0.05546721816062927,
0.5380735397338867,
0.40493088960647583,
-0.27533861994743347,
0.17651835083961487,
0.19941216707229614,
0.13215027749538422,
0.16697067022323608,
0.4045351445674896,
0.24969986081123352,
0.23454967141151428,
0.33146554231643677,
0.15776203572750092,
-0.06568969041109085,
-0.4420265853404999,
-0.07940370589494705,
-0.08007145673036575,
0.009200438857078552,
-0.14541620016098022,
-0.3985767662525177,
-0.12217988073825836,
0.107701875269413,
-0.2228611260652542,
0.2524225413799286,
0.31254199147224426,
-0.20300033688545227,
-0.050093602389097214,
0.11474843323230743,
-0.3060561418533325,
-0.3093147873878479,
0.17639872431755066,
-0.02040717750787735,
0.0072891488671302795,
0.09894486516714096,
0.21159270405769348,
-0.05268550291657448,
-0.13211143016815186,
0.4231092631816864,
-0.021149098873138428,
0.08368408679962158,
-0.16982291638851166,
0.07300961017608643,
0.05351211875677109,
-0.10909382253885269,
0.10827431082725525,
0.25692394375801086,
-0.11230309307575226,
-0.2593901455402374,
0.11065340042114258,
-0.4793128967285156,
0.38905414938926697,
0.09229029715061188,
0.0003154408186674118,
-0.13324764370918274,
0.25751981139183044,
0.010892912745475769,
-0.07228653132915497,
-0.030019352212548256,
0.07488223910331726,
-0.24208271503448486,
-0.221655011177063,
0.1885627955198288,
-0.0014271046966314316,
0.5024075508117676,
-0.21944908797740936,
-0.3348049521446228,
0.021794220432639122,
-0.18965676426887512,
0.16364163160324097,
-0.20161108672618866,
0.33583423495292664,
0.1817956417798996,
0.0814846083521843,
0.3280124068260193,
0.3919726014137268,
-0.17854976654052734,
0.026994049549102783,
0.06117863580584526,
0.2369726449251175,
-0.31115832924842834,
-0.13572144508361816,
-0.14641858637332916,
-0.20058536529541016,
0.09629353135824203,
-0.035930100828409195,
0.29700779914855957,
-0.026530036702752113,
0.1299663484096527,
-0.1621549278497696,
0.5438464283943176,
0.04155091941356659,
-0.23498445749282837,
-0.13176128268241882,
0.0685259997844696,
-0.0009469129145145416,
-0.16837668418884277,
0.3657691776752472,
-0.5327367186546326,
-0.0871814638376236,
-0.4656575620174408,
-0.003608602099120617,
-0.07608166337013245,
-0.1493634283542633,
-0.31363028287887573,
0.18496602773666382,
-0.0643594041466713,
-0.02982925996184349,
0.18358641862869263,
-0.40039539337158203,
-0.1140279620885849,
-0.06119632348418236,
-0.07753452658653259,
0.22286762297153473,
-0.21131981909275055,
-0.020264621824026108,
-0.014973258599638939,
-0.08862359821796417,
-0.07526937872171402,
-0.010101977735757828,
-0.08618112653493881,
0.11136682331562042,
-0.38303008675575256,
-0.027646686881780624,
0.08356845378875732,
-0.4117206931114197,
-0.42770418524742126,
-0.06715718656778336,
0.0670667290687561,
-0.06693952530622482,
-0.21574512124061584,
0.38780882954597473,
0.0222797691822052,
-0.06675391644239426,
0.09799739718437195,
0.3291475176811218,
-0.0326806902885437,
0.07722437381744385,
-0.17548854649066925,
-0.5199963450431824,
0.12778158485889435,
0.261443167924881,
0.2535078227519989,
0.155436173081398,
0.17112722992897034,
-0.12920022010803223,
-0.04801340401172638,
-0.05942387506365776,
0.28109005093574524,
-0.1224512904882431,
0.4943569004535675,
-0.08457989990711212,
0.12100644409656525,
-0.08318917453289032,
-0.00030522048473358154,
0.01221342384815216,
-0.05335548520088196,
0.2718505561351776,
-0.4531669020652771,
-0.13642972707748413,
-0.24002614617347717,
0.1942221224308014,
-0.3970353305339813,
0.029627876356244087,
0.043837301433086395,
0.09252603352069855,
-0.32075250148773193,
-0.1277175396680832,
-0.22037045657634735,
0.4052797257900238,
0.0879063755273819,
0.20462335646152496,
-0.22209413349628448,
0.2887166738510132,
-0.02359185926616192,
-0.3419714570045471,
-0.01667621172964573,
0.06014104560017586,
0.10717134177684784,
-0.025926798582077026,
-0.35935333371162415,
0.23970213532447815,
0.069066122174263,
0.3523252606391907,
0.21519649028778076,
-0.3135678172111511,
0.3370836079120636,
-0.6239206194877625,
-0.018676167353987694,
-0.027691252529621124,
0.33681243658065796,
0.22870934009552002,
-0.12588420510292053,
0.38324737548828125,
0.0921236127614975,
0.1228489950299263,
-0.19071170687675476,
0.18678340315818787,
-0.06748688966035843,
0.12311568856239319,
-0.18756407499313354,
-0.164077490568161,
-0.22820721566677094,
0.1899636834859848,
-0.05066367983818054,
-0.2992541193962097,
-0.25429898500442505,
0.07119810581207275,
0.2029411643743515,
0.05563869699835777,
0.3163726031780243,
0.336377888917923,
-0.14279940724372864,
0.25732386112213135,
0.5918110609054565,
0.055015597492456436,
0.3342006206512451,
0.15603895485401154,
-0.3099818229675293,
0.21980123221874237,
-0.3135814368724823,
0.119356170296669,
0.25444087386131287,
0.20790807902812958,
0.34277957677841187,
-0.035364121198654175,
0.41253459453582764,
-0.07147791236639023,
-0.3758023679256439,
-0.19884304702281952,
0.03757570683956146,
0.03635033220052719,
-0.3082484006881714,
-0.019705144688487053,
-0.39336836338043213,
0.03477130085229874,
-0.21532680094242096,
-0.177251398563385,
0.02186783030629158,
-0.22511591017246246,
0.08203436434268951,
0.07598048448562622,
-0.015705550089478493,
0.045226022601127625,
0.0033983495086431503,
0.1372995227575302,
0.07757958769798279,
-0.3156183660030365,
-0.1846114695072174,
0.04305194690823555,
-0.1624634861946106,
-0.04771032929420471,
0.1611030250787735,
0.22845983505249023,
0.646787703037262,
-0.03853959962725639,
0.3199915885925293,
-0.28444474935531616,
-0.3842178285121918,
0.08431901782751083,
-0.15079215168952942,
0.44329479336738586,
0.06297683715820312,
0.07480072975158691,
-0.15026049315929413,
-0.04051946476101875,
0.261557012796402,
0.1087246835231781,
-0.22362272441387177,
-0.09337040781974792,
-0.286109983921051,
-0.1760144680738449,
-0.12741361558437347,
-0.41655203700065613,
-0.22734472155570984,
-0.11291690170764923,
-0.010606415569782257,
0.172813281416893,
0.16745281219482422,
-0.09448608011007309,
0.5579962134361267,
0.2029520720243454,
0.15524987876415253,
-0.24334007501602173,
-0.18104515969753265,
-0.029573742300271988,
0.36112821102142334,
-0.2667299211025238,
-0.28288790583610535,
0.1128232330083847,
-0.373637855052948,
0.00815746933221817,
0.19385704398155212,
-0.25015538930892944,
-0.5470750331878662,
-0.045237310230731964,
0.6154307723045349,
-0.0017746537923812866,
0.018554657697677612,
0.1650688499212265,
0.23626647889614105,
0.02605252154171467,
-0.2265375256538391,
-0.14246152341365814,
-0.0010700151324272156,
0.11971044540405273,
0.35586750507354736,
0.22592633962631226,
0.08118605613708496,
0.057672303169965744,
0.268368661403656,
0.018363509327173233,
-0.2868885099887848,
0.6058324575424194,
-0.27427294850349426,
0.18188849091529846,
-0.19181367754936218,
-0.14903098344802856,
0.0710698813199997,
-0.04312945902347565,
-0.027043504640460014,
-0.32588618993759155,
-0.12340740114450455,
-0.2730671465396881,
0.05046874284744263,
-0.05772807449102402,
-0.5202681422233582,
-0.0977814793586731,
0.011775958351790905,
-0.01704951375722885,
0.022398918867111206,
-0.06067894026637077,
-0.2525354325771332,
-0.22370651364326477,
-0.10838218033313751,
0.26596614718437195,
0.2973470985889435,
0.06455075740814209,
-0.05500675365328789,
-0.09620165824890137,
-0.43194499611854553,
-0.07868509739637375,
0.18795740604400635,
0.09947483986616135,
0.3931258022785187,
-0.05154513940215111,
0.14584782719612122,
0.09098273515701294,
-0.2300775945186615,
0.6980815529823303,
-0.41902151703834534,
-0.0837070494890213,
-0.0759488120675087,
0.21791046857833862,
-0.19906029105186462,
-0.0422060564160347,
-0.2593519389629364,
0.09631380438804626,
-0.3114856779575348,
0.6321454644203186,
-0.11955463886260986,
0.20763473212718964,
0.12536481022834778,
-0.11521797627210617,
-0.05027936398983002,
-0.05313972011208534,
-0.16203932464122772,
-0.23309719562530518,
-0.5941941142082214,
0.013567827641963959,
0.1814500391483307,
0.08171948045492172,
0.06992285698652267,
-0.3055051565170288,
-0.29594290256500244,
0.2944178283214569,
0.09794189780950546,
0.11021198332309723,
0.2992653548717499,
-0.18321934342384338,
0.028348911553621292,
-0.09800590574741364,
0.26595598459243774,
0.33891618251800537,
0.5380375385284424,
0.1168224960565567,
-0.16147488355636597,
0.07091087102890015,
-0.05292901024222374,
0.14012332260608673,
0.3907398283481598,
0.03297624737024307,
-0.036871932446956635,
-0.2043565809726715,
0.06568916887044907,
-0.31491532921791077,
0.13812397420406342,
0.23337118327617645,
-0.09831304103136063,
0.14647376537322998,
-0.07590275257825851,
0.6271270513534546,
-0.1557711660861969,
-0.06541747599840164,
0.29046517610549927,
0.5216985940933228,
-0.16321563720703125,
0.5991333723068237,
0.5698323845863342,
1.1647411584854126,
0.19794228672981262,
-0.008214294910430908,
0.3074931204319,
-0.45997464656829834,
0.1693761795759201,
0.24097885191440582,
0.04201997071504593,
-0.32210373878479004,
0.09827983379364014,
-0.17143046855926514,
-0.15099109709262848,
0.28846555948257446,
-0.10525600612163544,
-0.42221537232398987,
-0.08372221887111664,
0.08410333096981049,
-0.131148561835289,
-0.10950346291065216,
0.080268993973732,
-0.7248403429985046,
-0.3474069833755493,
-0.02878478914499283,
0.1495485156774521,
0.11664886772632599,
0.2152165323495865,
-0.022171158343553543,
-0.20173557102680206,
-0.6300942301750183,
-0.10176275670528412,
-0.16985364258289337,
0.15949806571006775,
-0.18578292429447174,
0.019213682040572166,
0.1200987696647644,
-0.05624302849173546,
-0.011020264588296413,
0.026880383491516113,
0.26462411880493164,
-0.3167094886302948,
-0.16405479609966278,
0.22140154242515564,
0.13876420259475708,
0.04312184453010559,
0.11597388982772827,
-0.26239171624183655,
0.5051231384277344,
-0.1133979931473732,
-0.4375201165676117,
-0.06981716305017471,
0.09990669041872025,
0.08999191224575043,
0.019901499152183533,
-0.02802811563014984,
0.0213768407702446,
-0.048222191631793976,
-0.6393377780914307,
0.11256182938814163,
-0.21738053858280182,
-0.03276592120528221,
0.027073636651039124,
0.07522238790988922,
-0.09762442857027054,
0.2860407829284668,
0.4411974549293518,
-0.11108539998531342,
0.21831826865673065,
0.05524305999279022,
-0.14031639695167542,
0.10781244933605194,
0.29026317596435547,
-0.17164014279842377,
0.03379303961992264,
-0.05238983407616615,
0.5581749081611633,
0.2359546273946762,
-0.645949125289917,
-0.12402652949094772,
-0.183837890625,
-0.22093254327774048,
-0.14123284816741943,
0.08890479058027267,
0.02931249886751175,
0.17512980103492737,
-0.1756293922662735,
-0.2672285735607147,
-0.19348518550395966,
0.1673896312713623,
-0.20684398710727692,
0.48040270805358887,
-0.4327124059200287,
-0.08638487756252289,
0.2423897385597229,
-0.178732231259346,
-0.21030327677726746,
0.31735366582870483,
-0.008657258003950119,
0.3253967761993408,
-0.4457135498523712,
0.3992782235145569,
0.0005986774922348559,
-0.17916005849838257,
-0.030675189569592476,
0.45832353830337524,
-0.2273492068052292,
0.005746439099311829,
-0.33895817399024963,
0.24284644424915314,
0.3200227618217468,
-0.07142379879951477,
-0.06899811327457428,
-0.16050361096858978,
-0.07010918855667114,
-0.0234815813601017,
0.058348190039396286,
-0.023566510528326035,
-0.4421285390853882,
0.16423964500427246,
0.1226995661854744,
-0.030575484037399292,
0.2605953812599182,
0.03531913459300995,
0.3317396640777588,
0.4527345895767212,
-0.030705668032169342,
0.04671059921383858,
-0.1313863843679428,
0.1561620831489563,
-0.03766128793358803,
0.22486576437950134,
0.03548254072666168,
0.08931891620159149,
0.2715528607368469,
-0.12163764238357544,
0.14097732305526733,
-0.11541303247213364,
0.1741781234741211,
0.06936781108379364,
-0.36683377623558044,
0.043174728751182556,
0.028418004512786865,
0.08359427005052567,
-0.3017192780971527,
0.11434580385684967,
0.04991971701383591,
-0.2212430089712143,
0.04753034934401512,
0.1589777022600174,
0.19319160282611847,
0.4148607552051544,
-0.549087643623352,
-0.04366668313741684,
0.27244073152542114,
-0.5755093097686768,
-0.08170464634895325,
0.24219395220279694,
-0.3238539397716522,
0.2836420238018036,
0.24072381854057312,
0.03884260728955269,
0.2031497210264206,
0.5658036470413208,
0.15931406617164612,
0.37570348381996155,
0.5014798045158386,
0.20307034254074097,
0.5573703646659851,
0.005139593034982681,
0.2073381245136261,
0.2617626488208771,
0.45886173844337463,
0.3566615879535675,
0.30203330516815186,
0.3107992708683014,
-0.2603858709335327,
-0.3099234402179718,
-0.05968998372554779,
-0.05967475101351738,
0.09518519043922424,
-0.02050844207406044,
-0.3087306618690491,
-0.006097853183746338,
-0.7056833505630493,
-0.08667813241481781,
-0.108934685587883,
-0.3899078965187073,
0.320970356464386,
0.40325331687927246,
-0.13846351206302643,
0.04996829479932785,
-0.03406495600938797,
0.20304268598556519,
0.2984788715839386,
-0.25682175159454346,
0.09982557594776154,
0.10724126547574997,
-0.010495930910110474,
0.18890030682086945,
0.4899057447910309,
0.4587339162826538,
0.46455737948417664,
-0.1642768234014511,
0.15825137495994568,
0.11744603514671326,
-0.17283205687999725,
0.20871911942958832,
0.16596534848213196,
0.16862532496452332,
0.3245813250541687,
0.18111954629421234,
0.0761953592300415,
-0.021600475534796715,
0.11621533334255219,
0.06919528543949127,
0.09578751027584076,
-0.1720862239599228,
0.3795795142650604,
-0.33242109417915344,
-0.22021853923797607,
-0.1486244648694992,
-0.2070770561695099,
-0.41692787408828735,
-0.17859616875648499,
0.3637876510620117,
-0.28880515694618225,
0.08413130789995193,
0.05379539355635643,
-0.006552886217832565,
-0.3261508345603943,
0.175227552652359,
0.4000743627548218,
0.033558234572410583,
0.009647419676184654,
-0.03241738677024841,
-0.7256231904029846,
0.04810727387666702,
0.06786556541919708,
-0.3726583421230316,
0.25234198570251465,
0.10022588074207306,
0.04057827591896057,
0.2500036060810089,
0.31427180767059326,
-0.3124746084213257,
0.4815214276313782,
0.477373868227005,
-0.15259401500225067,
-0.10493291914463043,
0.4105178713798523,
0.20365408062934875,
0.012150201946496964,
-0.46713492274284363,
0.15860742330551147,
0.00667919684201479,
-0.07573235780000687,
-0.017080172896385193,
-0.24175700545310974,
-0.12277592718601227,
-0.42803359031677246,
0.7398742437362671,
0.2822854816913605,
0.2715911865234375,
-0.29847055673599243,
-0.0682319775223732,
-0.15499918162822723,
-0.2614749073982239,
-0.258281946182251,
-0.03187137842178345,
-0.014296405017375946,
0.7106517553329468,
0.15980324149131775,
-0.12519855797290802,
-0.0239728931337595,
0.007219851016998291,
-0.03767949715256691,
-0.10030557215213776,
-0.2568313479423523,
0.3138693571090698,
-0.5022095441818237,
-0.1399604231119156,
-0.13751119375228882,
0.21721667051315308,
0.18234388530254364,
0.15629954636096954,
-0.21009910106658936,
-0.4036268889904022,
0.4252946972846985,
-0.1284395009279251,
-0.28252050280570984,
0.2124640792608261,
0.12684151530265808,
0.18852192163467407,
-0.09370259940624237,
-0.5950189828872681,
-0.1564691960811615,
0.09598487615585327,
0.11822240799665451,
-0.10942971706390381,
0.3046395778656006,
0.26728591322898865,
0.13588765263557434,
-0.16661304235458374,
0.5707806348800659,
-0.16404327750205994,
0.13475118577480316,
0.13706475496292114,
-0.2591710090637207
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | I was just pointed here by @mariosasko, meanwhile I found a workaround using `encode_example` like so:
```
from datasets import load_from_disk, Dataset
DATASET_PATH = "/hf/m4-master/data/cm4/cm4-10000-v0.1"
ds1 = load_from_disk(DATASET_PATH)
ds2 = Dataset.from_dict(mapping={k: [] for k in ds1[99].keys()},
features=ds1.features
)
for i in range(2):
# could add several representative items here
row = ds1[99]
row_encoded = ds2.features.encode_example(row)
ds2 = ds2.add_item(row_encoded)
``` | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 59 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
I was just pointed here by @mariosasko, meanwhile I found a workaround using `encode_example` like so:
```
from datasets import load_from_disk, Dataset
DATASET_PATH = "/hf/m4-master/data/cm4/cm4-10000-v0.1"
ds1 = load_from_disk(DATASET_PATH)
ds2 = Dataset.from_dict(mapping={k: [] for k in ds1[99].keys()},
features=ds1.features
)
for i in range(2):
# could add several representative items here
row = ds1[99]
row_encoded = ds2.features.encode_example(row)
ds2 = ds2.add_item(row_encoded)
``` | [
-0.22391314804553986,
-0.4254264533519745,
-0.014295726083219051,
0.30249708890914917,
0.04177479445934296,
0.09449950605630875,
0.24505077302455902,
0.33873170614242554,
-0.21961276233196259,
0.15128777921199799,
0.1216961219906807,
0.6982002258300781,
-0.10216367989778519,
-0.006876001134514809,
-0.1416850984096527,
0.024736667051911354,
0.09838537126779556,
0.13945528864860535,
-0.10122033953666687,
-0.14491721987724304,
-0.33637750148773193,
0.09561096131801605,
-0.014388807117938995,
-0.07719017565250397,
-0.5878827571868896,
-0.11405805498361588,
-0.09250008314847946,
0.001243632286787033,
-0.22908896207809448,
-0.3205827474594116,
0.2176753729581833,
-0.22405967116355896,
-0.022060487419366837,
0.01296418160200119,
-0.00012574509310070425,
-0.012298289686441422,
0.4031463861465454,
-0.02611534669995308,
-0.11504988372325897,
-0.37157750129699707,
-0.2379450500011444,
-0.23387275636196136,
0.03523222357034683,
-0.21596509218215942,
0.129182368516922,
-0.2327418327331543,
0.01084035076200962,
0.22497880458831787,
0.007630273699760437,
0.21849501132965088,
0.10017882287502289,
0.2511384189128876,
0.18364210426807404,
0.02168525941669941,
0.5123948454856873,
0.33668994903564453,
-0.25742846727371216,
0.2174578458070755,
0.17278409004211426,
0.19167892634868622,
0.14787784218788147,
0.5358543395996094,
0.22744694352149963,
0.23376820981502533,
0.31528231501579285,
0.11132451146841049,
-0.0116029754281044,
-0.3817588686943054,
-0.10422541946172714,
-0.11615783721208572,
0.04440383240580559,
-0.09329444915056229,
-0.3761829137802124,
-0.10364557802677155,
0.12775520980358124,
-0.13029348850250244,
0.2150515913963318,
0.18867173790931702,
-0.16515159606933594,
-0.05193036422133446,
0.1115780770778656,
-0.23212479054927826,
-0.23600627481937408,
0.18984082341194153,
-0.004061341285705566,
0.023599497973918915,
0.04211927577853203,
0.21504449844360352,
-0.0050049275159835815,
-0.13510866463184357,
0.31872135400772095,
0.023405035957694054,
-0.016196515411138535,
-0.11577610671520233,
0.002140812575817108,
0.023234359920024872,
-0.1230882927775383,
0.15119263529777527,
0.19357267022132874,
-0.12179127335548401,
-0.1586032211780548,
0.09683270007371902,
-0.3989778459072113,
0.33920836448669434,
0.048727232962846756,
-0.016908932477235794,
-0.19362977147102356,
0.1394800990819931,
-0.05214089900255203,
0.011843489482998848,
-0.05231425538659096,
0.028699247166514397,
-0.17216315865516663,
-0.32250261306762695,
0.2625313699245453,
0.044502221047878265,
0.5133731961250305,
-0.10578367859125137,
-0.3503729999065399,
0.009542462415993214,
-0.22048693895339966,
0.16194577515125275,
-0.18733137845993042,
0.36733782291412354,
0.1805962175130844,
0.07085403800010681,
0.28843748569488525,
0.4156857132911682,
-0.1525362879037857,
0.04432088881731033,
0.020711056888103485,
0.23284059762954712,
-0.24552160501480103,
-0.21260103583335876,
-0.08747866749763489,
-0.21939586102962494,
0.03528076410293579,
0.03980393335223198,
0.38893938064575195,
-0.11693812161684036,
0.0618659108877182,
-0.20609387755393982,
0.6000286936759949,
0.11546686291694641,
-0.25260213017463684,
0.005269080400466919,
0.15083588659763336,
0.05274815112352371,
-0.13750119507312775,
0.27267205715179443,
-0.5414041876792908,
-0.0686405599117279,
-0.42302951216697693,
0.02506735548377037,
0.09203489869832993,
-0.15873977541923523,
-0.4917043149471283,
0.05783796310424805,
-0.08643529564142227,
-0.01359417662024498,
0.1569162756204605,
-0.3590748906135559,
-0.15209095180034637,
-0.12407611310482025,
-0.0803656354546547,
0.28615477681159973,
-0.18501624464988708,
0.016706369817256927,
-0.03473972901701927,
-0.0025094635784626007,
-0.04960773140192032,
0.009595541283488274,
-0.09911568462848663,
0.11250041425228119,
-0.39287957549095154,
0.00751689076423645,
0.08037170767784119,
-0.48357123136520386,
-0.4762956500053406,
-0.00938930083066225,
0.0557803213596344,
0.06923825293779373,
-0.14854669570922852,
0.27562734484672546,
0.16184303164482117,
-0.04015103727579117,
0.11465722322463989,
0.27343040704727173,
0.005080752074718475,
0.12026221305131912,
-0.13520881533622742,
-0.5027858018875122,
0.12111187726259232,
0.12058094143867493,
0.23119425773620605,
0.12633948028087616,
0.27979576587677,
-0.17050668597221375,
-0.0346267968416214,
-0.0787249505519867,
0.34504833817481995,
-0.05811717361211777,
0.4615858793258667,
-0.07694706320762634,
0.0937463715672493,
-0.1482706218957901,
-0.1291848123073578,
0.06466635316610336,
-0.0013587698340415955,
0.2839057445526123,
-0.5499550104141235,
-0.11764117330312729,
-0.31334221363067627,
0.15921182930469513,
-0.41090521216392517,
0.031112821772694588,
0.08228307962417603,
0.06363865733146667,
-0.40720075368881226,
-0.17004618048667908,
-0.12627145648002625,
0.4887205958366394,
0.18957072496414185,
0.21330222487449646,
-0.11597225069999695,
0.28810593485832214,
-0.06983020156621933,
-0.32642677426338196,
-0.006510511040687561,
0.08474444597959518,
0.22755193710327148,
-0.06444636732339859,
-0.3886149823665619,
0.25221729278564453,
0.06913181394338608,
0.3544233441352844,
0.07918681204319,
-0.3286552429199219,
0.3246344029903412,
-0.5830645561218262,
-0.045933790504932404,
0.07385022938251495,
0.4127510190010071,
0.17310258746147156,
0.023539885878562927,
0.35487431287765503,
0.0788867324590683,
0.15747129917144775,
-0.14402635395526886,
0.17652955651283264,
-0.04036838561296463,
0.17081709206104279,
-0.10292531549930573,
-0.30005210638046265,
-0.32600197196006775,
0.2182653695344925,
0.01888217031955719,
-0.2553510069847107,
-0.17787228524684906,
0.10834949463605881,
0.22705723345279694,
0.11241233348846436,
0.3015487492084503,
0.23473212122917175,
-0.18281695246696472,
0.2320002317428589,
0.5627113580703735,
0.10110406577587128,
0.3014768064022064,
0.14047256112098694,
-0.2790224254131317,
0.1937102973461151,
-0.2759811580181122,
0.17834626138210297,
0.26235345005989075,
0.17780381441116333,
0.5229591727256775,
0.04617077112197876,
0.47956547141075134,
-0.08590837568044662,
-0.37007978558540344,
-0.15510639548301697,
0.10737278312444687,
0.03515394777059555,
-0.3366190195083618,
-0.00530133955180645,
-0.48377734422683716,
0.1479170024394989,
-0.22726862132549286,
-0.13946357369422913,
0.03796781226992607,
-0.2260948270559311,
-0.03740795701742172,
0.11681985855102539,
-0.09173242747783661,
0.03114485926926136,
0.06496870517730713,
0.010087072849273682,
0.1333758383989334,
-0.2848838269710541,
-0.14005005359649658,
0.07036195695400238,
-0.13505515456199646,
-0.07606423646211624,
0.1086612120270729,
0.13394512236118317,
0.5714319348335266,
0.06307840347290039,
0.3103821873664856,
-0.3611251413822174,
-0.327999472618103,
0.1017141044139862,
-0.19099096953868866,
0.3571122884750366,
0.11573559045791626,
0.07284454256296158,
-0.12847289443016052,
-0.08023809641599655,
0.22398583590984344,
0.17055927217006683,
-0.21914970874786377,
-0.009250895120203495,
-0.35578134655952454,
-0.11464140564203262,
-0.11010976135730743,
-0.42524197697639465,
-0.2738551199436188,
-0.21362239122390747,
-0.06858262419700623,
0.11400070786476135,
0.1672501564025879,
-0.12125950306653976,
0.5286560654640198,
0.13635873794555664,
0.11333125084638596,
-0.14067097008228302,
-0.23444828391075134,
0.10518752038478851,
0.3730482757091522,
-0.26125478744506836,
-0.27493733167648315,
0.14203353226184845,
-0.4069446921348572,
0.07929220795631409,
0.2347632795572281,
-0.13795176148414612,
-0.44777360558509827,
-0.06763163954019547,
0.5982930064201355,
-0.06735273450613022,
0.0871300995349884,
0.13826406002044678,
0.2716953754425049,
0.005320372059941292,
-0.17720699310302734,
-0.0709528774023056,
0.032486796379089355,
0.13073423504829407,
0.23135194182395935,
0.11234014481306076,
0.10018569231033325,
0.13864143192768097,
0.20438140630722046,
-0.01792638748884201,
-0.1983141154050827,
0.637197732925415,
-0.1947181671857834,
0.16805052757263184,
-0.21894308924674988,
-0.2421524077653885,
0.0049098338931798935,
-0.13317173719406128,
0.010932758450508118,
-0.32511812448501587,
-0.16238686442375183,
-0.27362436056137085,
0.09388518333435059,
-0.16229580342769623,
-0.48464682698249817,
-0.15844592452049255,
0.030589085072278976,
-0.05617411434650421,
0.03612921014428139,
-0.03274857625365257,
-0.20247793197631836,
-0.2963588237762451,
-0.04876892268657684,
0.2808184325695038,
0.3403226137161255,
0.04377179965376854,
0.0032761511392891407,
-0.15336564183235168,
-0.4355238378047943,
-0.02938428521156311,
0.25810983777046204,
0.25360292196273804,
0.4405985176563263,
0.046649109572172165,
0.14247924089431763,
0.06486717611551285,
-0.2392614781856537,
0.7338122129440308,
-0.44049713015556335,
-0.09260901808738708,
0.0025940146297216415,
0.1196960061788559,
-0.20479798316955566,
-0.07671497762203217,
-0.18019065260887146,
-0.003468314651399851,
-0.21455925703048706,
0.6647619605064392,
-0.16707101464271545,
0.1292230486869812,
0.14033913612365723,
-0.07279779762029648,
-0.07441062480211258,
0.0003940435126423836,
-0.1161162257194519,
-0.21678271889686584,
-0.6119171977043152,
-0.05156635493040085,
0.2414163202047348,
0.18665629625320435,
0.13314104080200195,
-0.2786085307598114,
-0.2875741124153137,
0.22776612639427185,
0.0962308943271637,
0.0761650949716568,
0.33385372161865234,
-0.06819604337215424,
0.055320266634225845,
-0.1152772605419159,
0.3543344736099243,
0.4369104504585266,
0.5449464321136475,
0.020213987678289413,
-0.15702293813228607,
-0.012883562594652176,
-0.09716832637786865,
0.191460520029068,
0.38172000646591187,
-0.05150667577981949,
0.06795405596494675,
-0.2310945689678192,
0.046391427516937256,
-0.3310681879520416,
0.11034051328897476,
0.21749936044216156,
-0.07683468610048294,
0.1372663378715515,
-0.09938522428274155,
0.6017497181892395,
-0.22030523419380188,
-0.049910709261894226,
0.2955644428730011,
0.6008801460266113,
-0.17853550612926483,
0.634123682975769,
0.4569433331489563,
1.0307743549346924,
0.1992698460817337,
0.035566624253988266,
0.39926591515541077,
-0.5123101472854614,
0.08262356370687485,
0.27841341495513916,
0.0059601617977023125,
-0.25281617045402527,
0.13598424196243286,
-0.11461197584867477,
-0.15508705377578735,
0.273085355758667,
-0.035397008061409,
-0.39734140038490295,
-0.03588211163878441,
-0.05123719573020935,
-0.034536633640527725,
-0.19922775030136108,
-0.004685580730438232,
-0.6481841206550598,
-0.39949485659599304,
0.004291570745408535,
0.152542382478714,
0.1308116614818573,
0.18086884915828705,
-0.07061491906642914,
-0.231533020734787,
-0.5610426068305969,
-0.12692579627037048,
-0.13993912935256958,
0.10355112701654434,
-0.3506346046924591,
0.054550930857658386,
0.164226695895195,
-0.08327466249465942,
0.049814242869615555,
-0.12767459452152252,
0.22382602095603943,
-0.25342297554016113,
-0.019426653161644936,
0.17823870480060577,
0.20472463965415955,
0.15655960142612457,
0.09931575506925583,
-0.2857150733470917,
0.5372222065925598,
-0.06031598523259163,
-0.34154394268989563,
-0.07505358010530472,
0.0782971903681755,
0.003103680908679962,
0.11794066429138184,
0.061534613370895386,
-0.13976919651031494,
-0.07264333963394165,
-0.7166604399681091,
0.13179472088813782,
-0.21178580820560455,
-0.12957926094532013,
0.037354543805122375,
-0.02265246957540512,
-0.19138836860656738,
0.3138262927532196,
0.3373622000217438,
-0.180547833442688,
0.20714786648750305,
0.13160616159439087,
-0.11262135952711105,
0.03731805086135864,
0.3311772346496582,
-0.1851820945739746,
-0.0869792252779007,
-0.07988746464252472,
0.4527539014816284,
0.37384721636772156,
-0.6408389210700989,
-0.03297831863164902,
-0.21366791427135468,
-0.18764576315879822,
-0.14955957233905792,
0.12448088824748993,
-0.020817488431930542,
0.2588018476963043,
-0.18984262645244598,
-0.2530587315559387,
-0.1977701038122177,
0.20367446541786194,
-0.19208097457885742,
0.4017097055912018,
-0.3434862792491913,
0.05803465470671654,
0.013720104470849037,
-0.074913889169693,
-0.21909451484680176,
0.332881361246109,
0.015883738175034523,
0.34711843729019165,
-0.3924306333065033,
0.32025641202926636,
0.09067085385322571,
-0.09196765720844269,
0.013939814642071724,
0.523900032043457,
-0.23178628087043762,
-0.0021738670766353607,
-0.3891790509223938,
0.21880298852920532,
0.26210296154022217,
-0.006329406052827835,
-0.0667736604809761,
-0.1840117871761322,
-0.1257237046957016,
-0.08474790304899216,
0.13369159400463104,
0.021750643849372864,
-0.3906238079071045,
0.1333315670490265,
0.17287634313106537,
-0.08741792291402817,
0.2918155789375305,
0.03744744136929512,
0.3128916621208191,
0.4393162131309509,
-0.10496282577514648,
0.009548336267471313,
-0.21700677275657654,
0.17356202006340027,
-0.047991372644901276,
0.17903155088424683,
-0.03488317131996155,
0.0821755975484848,
0.31451815366744995,
-0.08285120129585266,
0.052925143390893936,
-0.07040722668170929,
0.1648300290107727,
-0.09063990414142609,
-0.28463947772979736,
-0.017835304141044617,
-0.033374276012182236,
0.09388861805200577,
-0.2690574824810028,
0.04929248243570328,
-0.04301700368523598,
-0.20544953644275665,
0.14944058656692505,
0.18755100667476654,
0.19339999556541443,
0.3606264293193817,
-0.6023616790771484,
-0.043057944625616074,
0.16509313881397247,
-0.49545907974243164,
-0.12681661546230316,
0.22270478308200836,
-0.2157537192106247,
0.2557522654533386,
0.28285521268844604,
0.017074542120099068,
0.22103199362754822,
0.585015594959259,
0.16204804182052612,
0.3369315564632416,
0.6141819953918457,
0.17222744226455688,
0.5398251414299011,
-0.05110648274421692,
0.18072427809238434,
0.26387661695480347,
0.4843194782733917,
0.34565484523773193,
0.31640228629112244,
0.08162444084882736,
-0.16148172318935394,
-0.3458941876888275,
0.055080778896808624,
-0.08591948449611664,
0.013017002493143082,
0.0043980758637189865,
-0.2477240413427353,
-0.047136340290308,
-0.6906472444534302,
-0.11198166012763977,
-0.14566566050052643,
-0.37359553575515747,
0.25374579429626465,
0.4666000008583069,
-0.10439486801624298,
0.10087621212005615,
-0.1617937684059143,
0.17894679307937622,
0.2394912838935852,
-0.30999594926834106,
0.10018051415681839,
0.1261748969554901,
0.03374875336885452,
0.10352455079555511,
0.4344933331012726,
0.4627770483493805,
0.4772057831287384,
-0.16875089704990387,
0.13738158345222473,
0.19324791431427002,
-0.16949880123138428,
0.1625244915485382,
0.023244580253958702,
0.12774412333965302,
0.2903994917869568,
0.18019944429397583,
0.06063113361597061,
-0.04767685756087303,
-0.005505215376615524,
0.07766848802566528,
0.15218539535999298,
-0.19413310289382935,
0.3670540750026703,
-0.3540971875190735,
-0.21544098854064941,
-0.13937179744243622,
-0.14717668294906616,
-0.43811845779418945,
-0.12134440243244171,
0.4808286428451538,
-0.3116709589958191,
0.16035917401313782,
0.05756692588329315,
0.007289420813322067,
-0.26992255449295044,
0.17987503111362457,
0.2952384054660797,
-0.008346989750862122,
-0.08110670000314713,
-0.0574398934841156,
-0.7357955574989319,
-0.008281916379928589,
0.010687511414289474,
-0.2585050165653229,
0.24928498268127441,
0.1453215479850769,
0.12705755233764648,
0.1860065758228302,
0.49389493465423584,
-0.29686886072158813,
0.5491024851799011,
0.47518613934516907,
-0.16515223681926727,
-0.13811475038528442,
0.4439527988433838,
0.07340651005506516,
0.011052995920181274,
-0.5492125749588013,
0.10010913014411926,
0.06021265313029289,
-0.00009867176413536072,
-0.10074077546596527,
-0.2542378902435303,
-0.11578120291233063,
-0.35122761130332947,
0.6349893808364868,
0.23596183955669403,
0.19659268856048584,
-0.27676114439964294,
-0.08725860714912415,
-0.1447204053401947,
-0.22717216610908508,
-0.2214527577161789,
-0.07198797911405563,
-0.0734393447637558,
0.8117297887802124,
0.23096388578414917,
-0.07945013046264648,
-0.09622853994369507,
0.03679540008306503,
-0.06682486832141876,
-0.14798997342586517,
-0.3194595277309418,
0.4218737781047821,
-0.46488454937934875,
-0.1572340428829193,
-0.1464337408542633,
0.301429808139801,
0.21872025728225708,
0.22592943906784058,
-0.2319529503583908,
-0.4550776779651642,
0.4214087724685669,
-0.13167881965637207,
-0.39574551582336426,
0.15195244550704956,
0.1630125492811203,
0.16703644394874573,
-0.007139647379517555,
-0.46588000655174255,
-0.12400902062654495,
0.12754715979099274,
0.07879678905010223,
-0.14560382068157196,
0.2699694037437439,
0.2864122688770294,
0.12148913741111755,
-0.1655501276254654,
0.4491715133190155,
-0.06995948404073715,
0.17800956964492798,
-0.022825106978416443,
-0.2500869035720825
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | Hmm, interesting. If I create the dataset on the fly:
```
from datasets import load_from_disk, Dataset
DATASET_PATH = "/hf/m4-master/data/cm4/cm4-10000-v0.1"
ds1 = load_from_disk(DATASET_PATH)
ds2 = Dataset.from_dict(mapping={k: [v]*2 for k, v in ds1[99].items()},
features=ds1.features)
```
it doesn't fail with the error in the OP, as `from_dict` performs `encode_batch`.
However if I try to use this dataset it fails now with:
```
Traceback (most recent call last):
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/multiprocess/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 524, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/fingerprint.py", line 480, in wrapper
out = func(self, *args, **kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2775, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2655, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2347, in decorated
result = f(decorated_item, *args, **kwargs)
File "debug_leak2.py", line 235, in split_pack_and_pad
images.append(image_transform(image.convert("RGB")))
AttributeError: 'dict' object has no attribute 'convert'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "debug_leak2.py", line 418, in <module>
train_loader, val_loader = get_dataloaders()
File "debug_leak2.py", line 348, in get_dataloaders
dataset = dataset.map(mapper, batch_size=32, batched=True, remove_columns=dataset.column_names, num_proc=4)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2500, in map
transformed_shards[index] = async_result.get()
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/multiprocess/pool.py", line 771, in get
raise self._value
AttributeError: 'dict' object has no attribute 'convert'
```
but if I create that same dataset one item at a time as in the previous comment's code snippet it doesn't fail.
The features of this dataset are set to:
```
{'texts': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None),
'images': Sequence(feature=Image(decode=True, id=None), length=-1, id=None)}
``` | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 264 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
Hmm, interesting. If I create the dataset on the fly:
```
from datasets import load_from_disk, Dataset
DATASET_PATH = "/hf/m4-master/data/cm4/cm4-10000-v0.1"
ds1 = load_from_disk(DATASET_PATH)
ds2 = Dataset.from_dict(mapping={k: [v]*2 for k, v in ds1[99].items()},
features=ds1.features)
```
it doesn't fail with the error in the OP, as `from_dict` performs `encode_batch`.
However if I try to use this dataset it fails now with:
```
Traceback (most recent call last):
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/multiprocess/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 557, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 524, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/fingerprint.py", line 480, in wrapper
out = func(self, *args, **kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2775, in _map_single
batch = apply_function_on_filtered_inputs(
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2655, in apply_function_on_filtered_inputs
processed_inputs = function(*fn_args, *additional_args, **fn_kwargs)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2347, in decorated
result = f(decorated_item, *args, **kwargs)
File "debug_leak2.py", line 235, in split_pack_and_pad
images.append(image_transform(image.convert("RGB")))
AttributeError: 'dict' object has no attribute 'convert'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "debug_leak2.py", line 418, in <module>
train_loader, val_loader = get_dataloaders()
File "debug_leak2.py", line 348, in get_dataloaders
dataset = dataset.map(mapper, batch_size=32, batched=True, remove_columns=dataset.column_names, num_proc=4)
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 2500, in map
transformed_shards[index] = async_result.get()
File "/home/stas/anaconda3/envs/py38-pt112/lib/python3.8/site-packages/multiprocess/pool.py", line 771, in get
raise self._value
AttributeError: 'dict' object has no attribute 'convert'
```
but if I create that same dataset one item at a time as in the previous comment's code snippet it doesn't fail.
The features of this dataset are set to:
```
{'texts': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None),
'images': Sequence(feature=Image(decode=True, id=None), length=-1, id=None)}
``` | [
-0.3208317160606384,
-0.3864695131778717,
0.014370642602443695,
0.26698410511016846,
0.10654259473085403,
0.08001408725976944,
0.3989081084728241,
0.18045632541179657,
-0.1433137059211731,
0.1974937617778778,
0.21877415478229523,
0.6241245269775391,
-0.10098988562822342,
0.056992270052433014,
-0.18264652788639069,
0.13222596049308777,
0.16090631484985352,
0.0606551468372345,
-0.15171882510185242,
-0.2682368755340576,
-0.4054555594921112,
0.0127357617020607,
-0.05433086305856705,
-0.07819958031177521,
-0.5829589366912842,
-0.13380451500415802,
-0.08091757446527481,
-0.02647870033979416,
-0.17477640509605408,
-0.2855101227760315,
0.2625875473022461,
-0.24376025795936584,
0.030057169497013092,
0.0959174707531929,
-0.00012951459211762995,
0.022359803318977356,
0.4112788438796997,
-0.04338821396231651,
-0.29070448875427246,
-0.22890980541706085,
-0.3989994525909424,
-0.2705623209476471,
0.06687885522842407,
-0.3134094476699829,
0.1316063404083252,
-0.11734754592180252,
0.10488741099834442,
-0.0753043070435524,
0.1242603063583374,
0.18852384388446808,
0.05933091416954994,
0.3194376230239868,
0.07005473971366882,
-0.04349413886666298,
0.432336688041687,
0.4450500011444092,
-0.3174167573451996,
0.17866885662078857,
0.11289765685796738,
0.1285260170698166,
0.09313807636499405,
0.41886106133461,
0.19208328425884247,
0.1742136925458908,
0.3103780448436737,
0.18655265867710114,
0.114193394780159,
-0.3772769570350647,
-0.12299931794404984,
-0.0372186079621315,
0.07196011394262314,
-0.06702623516321182,
-0.4483998119831085,
-0.26679423451423645,
-0.04516163468360901,
-0.1843063086271286,
0.14869347214698792,
0.17895810306072235,
-0.2836999297142029,
0.012949559837579727,
0.018039846792817116,
-0.18612223863601685,
-0.19313111901283264,
0.1435999721288681,
-0.13856452703475952,
-0.04358416795730591,
0.050045501440763474,
0.3033037483692169,
-0.02615084871649742,
-0.06370572745800018,
0.2518342137336731,
-0.0845387801527977,
0.0190154816955328,
-0.07926107197999954,
0.03988642990589142,
0.08266381919384003,
-0.02262469381093979,
0.017853736877441406,
0.0884714350104332,
-0.1654329001903534,
-0.24107162654399872,
0.011382397264242172,
-0.36597904562950134,
0.32514750957489014,
0.16152530908584595,
0.10141386091709137,
-0.128397136926651,
0.15453733503818512,
-0.05481891334056854,
-0.07277577370405197,
-0.1711115688085556,
0.05129358172416687,
-0.13107918202877045,
-0.3069759011268616,
0.28768160939216614,
0.011340427212417126,
0.4655308723449707,
-0.054505813866853714,
-0.46162909269332886,
0.048089537769556046,
-0.17503365874290466,
0.044263873249292374,
-0.18734318017959595,
0.25900596380233765,
0.1616092175245285,
0.11791165173053741,
0.20201897621154785,
0.48694247007369995,
-0.254688560962677,
0.07264620065689087,
0.0030336580239236355,
0.10384033620357513,
-0.26883286237716675,
-0.213898703455925,
-0.10652326047420502,
-0.08794267475605011,
0.03786345571279526,
0.050684213638305664,
0.3566288948059082,
-0.0730813518166542,
0.08906034380197525,
-0.26924842596054077,
0.5594382286071777,
0.12288515269756317,
-0.18666133284568787,
0.18796288967132568,
0.22562895715236664,
-0.1316322684288025,
-0.18667787313461304,
0.265097051858902,
-0.4595276117324829,
-0.005173105746507645,
-0.34548625349998474,
-0.0038222558796405792,
0.03932682424783707,
-0.1746593415737152,
-0.5325284600257874,
0.014735011383891106,
0.07451988011598587,
-0.025891326367855072,
0.11033235490322113,
-0.4386783838272095,
-0.05638398602604866,
-0.16481082141399384,
-0.12235554307699203,
0.4332340359687805,
-0.36562874913215637,
0.03888808190822601,
0.0025897473096847534,
-0.019625592976808548,
0.16941887140274048,
0.1395302563905716,
-0.17515312135219574,
0.23388513922691345,
-0.42614492774009705,
-0.04227159917354584,
0.06963943690061569,
-0.5568893551826477,
-0.3925737738609314,
0.1773863285779953,
-0.004094161093235016,
0.11605190485715866,
0.013319596648216248,
0.2844792306423187,
0.269819974899292,
-0.208532452583313,
0.08659490197896957,
0.3102126121520996,
-0.09481226652860641,
0.02478327788412571,
-0.07974179089069366,
-0.36735615134239197,
0.17943748831748962,
-0.03205430507659912,
0.1285184919834137,
0.19737808406352997,
0.26636385917663574,
-0.12276685982942581,
-0.08247587829828262,
-0.15797682106494904,
0.3264448046684265,
-0.0777202621102333,
0.3945649266242981,
-0.10097634792327881,
0.04934123903512955,
0.011275485157966614,
-0.1851443648338318,
0.11936452239751816,
-0.028328849002718925,
0.2320888340473175,
-0.5420712232589722,
-0.15779320895671844,
-0.27994027733802795,
0.277854859828949,
-0.493429034948349,
-0.02414470538496971,
-0.016596976667642593,
0.13508331775665283,
-0.3497379422187805,
-0.12677685916423798,
-0.23514415323734283,
0.48022428154945374,
0.1444445103406906,
0.18684275448322296,
-0.15472294390201569,
0.18371820449829102,
-0.02446594648063183,
-0.2731722295284271,
-0.16690418124198914,
0.1532723605632782,
0.16081476211547852,
-0.05447766184806824,
-0.3324223756790161,
0.24429666996002197,
0.18602102994918823,
0.3005251884460449,
-0.04629969596862793,
-0.3670904040336609,
0.30504310131073,
-0.521691083908081,
-0.014893608167767525,
0.0071175191551446915,
0.33381059765815735,
0.0765249952673912,
-0.050050802528858185,
0.39543741941452026,
0.16360346972942352,
0.35099026560783386,
-0.12329914420843124,
0.15991564095020294,
-0.03268131613731384,
0.21419000625610352,
-0.16051356494426727,
-0.4164378046989441,
-0.3462732136249542,
0.1530790477991104,
0.09741032123565674,
-0.22386376559734344,
-0.1340899020433426,
0.033674150705337524,
0.3189440369606018,
0.10028676688671112,
0.27224740386009216,
0.13838721811771393,
-0.13421103358268738,
0.17235016822814941,
0.44781118631362915,
0.18967057764530182,
0.34034454822540283,
0.032743681222200394,
-0.17564231157302856,
0.1495111882686615,
-0.4330807626247406,
0.08827876299619675,
0.20830507576465607,
0.15995684266090393,
0.4710959196090698,
0.041366174817085266,
0.380324125289917,
-0.04319017380475998,
-0.32104822993278503,
-0.184445321559906,
0.12433918565511703,
-0.04847400635480881,
-0.35942453145980835,
0.1968313306570053,
-0.37839722633361816,
0.05403889715671539,
-0.28066587448120117,
-0.21350225806236267,
0.02158801443874836,
-0.34458544850349426,
-0.12117324769496918,
0.10195790231227875,
-0.13057217001914978,
-0.0210771132260561,
-0.07888394594192505,
-0.007646873593330383,
0.11065977811813354,
-0.39744436740875244,
-0.057860855013132095,
0.01060846820473671,
-0.20610827207565308,
-0.1283179372549057,
0.11928260326385498,
-0.0017593724187463522,
0.5160419940948486,
-0.014507513493299484,
0.2544940710067749,
-0.30497539043426514,
-0.3630000948905945,
0.1396000236272812,
-0.16706582903862,
0.4145892560482025,
0.18301650881767273,
0.013949841260910034,
-0.16204361617565155,
-0.12526893615722656,
0.2907263934612274,
0.24500897526741028,
-0.22935061156749725,
-0.004686611704528332,
-0.2591667175292969,
-0.12774358689785004,
-0.0840938538312912,
-0.3513616621494293,
-0.1570986658334732,
-0.20584845542907715,
-0.10846802592277527,
0.15532943606376648,
0.1335878074169159,
0.02705886960029602,
0.44389644265174866,
0.129125714302063,
0.1919585019350052,
-0.07520271837711334,
-0.19879844784736633,
0.15953634679317474,
0.30562788248062134,
-0.2503078579902649,
-0.25820332765579224,
0.08992220461368561,
-0.4225103259086609,
0.1220678836107254,
0.4032246470451355,
-0.21173016726970673,
-0.39212843775749207,
-0.1240275651216507,
0.6143646836280823,
0.03917538747191429,
0.20496632158756256,
0.15861234068870544,
0.2806778848171234,
0.03133208304643631,
-0.2768472731113434,
-0.09588725864887238,
0.12549102306365967,
0.1272001415491104,
0.27636757493019104,
0.06750354170799255,
0.2722364664077759,
0.08342604339122772,
0.3674221634864807,
0.0487457700073719,
-0.1885472536087036,
0.6058129072189331,
-0.20340675115585327,
0.30113255977630615,
-0.3165004849433899,
-0.21058617532253265,
-0.009286745451390743,
-0.10775011777877808,
-0.1393161416053772,
-0.256105899810791,
-0.10502984374761581,
-0.3200196623802185,
0.06366509944200516,
-0.014295108616352081,
-0.473792165517807,
-0.2254338562488556,
0.006119878962635994,
-0.19397741556167603,
0.11436687409877777,
0.02222217246890068,
0.047069430351257324,
-0.28671762347221375,
0.10998651385307312,
0.21762323379516602,
0.16682147979736328,
0.17679516971111298,
-0.0873262882232666,
-0.18788586556911469,
-0.45639991760253906,
-0.12102416902780533,
0.20116394758224487,
0.19164323806762695,
0.5794135928153992,
0.005825962871313095,
0.008646950125694275,
0.11274436116218567,
-0.18995429575443268,
0.7773468494415283,
-0.2979862689971924,
-0.06879308074712753,
-0.032096780836582184,
0.08048355579376221,
-0.34431543946266174,
0.015149064362049103,
-0.22527433931827545,
0.05296690762042999,
-0.1706954538822174,
0.5490723848342896,
-0.2045864760875702,
0.042266421020030975,
0.1317221224308014,
0.09771778434515,
-0.09350820630788803,
0.14482425153255463,
-0.11662188172340393,
-0.2823795676231384,
-0.5208595395088196,
-0.07948856800794601,
0.26824602484703064,
0.1259693056344986,
0.09323054552078247,
-0.151203915476799,
-0.37160152196884155,
0.19783484935760498,
0.11903607100248337,
0.08588090538978577,
0.2758760154247284,
-0.14525295794010162,
0.024120569229125977,
-0.11087556183338165,
0.393811970949173,
0.32704487442970276,
0.6293960809707642,
-0.0605916865170002,
-0.28613486886024475,
0.05723290890455246,
-0.04878920689225197,
0.22555020451545715,
0.4442763328552246,
-0.00015615089796483517,
-0.04626529663801193,
-0.08951785415410995,
0.0006135702133178711,
-0.3334709405899048,
0.12300404906272888,
0.3801785111427307,
-0.07640329003334045,
-0.11200454831123352,
-0.2861405909061432,
0.6148780584335327,
-0.10286411643028259,
-0.06331667304039001,
0.19757956266403198,
0.5712358951568604,
-0.23890767991542816,
0.7692837119102478,
0.3830529749393463,
1.0156896114349365,
0.25305771827697754,
0.20484310388565063,
0.39296072721481323,
-0.27951937913894653,
0.16704759001731873,
0.3924750089645386,
-0.001692676916718483,
-0.21915161609649658,
0.284872829914093,
-0.16193430125713348,
-0.25163733959198,
0.27194464206695557,
0.012227781116962433,
-0.22921252250671387,
0.06814761459827423,
-0.1839659959077835,
0.06257007271051407,
-0.15476571023464203,
-0.06048152595758438,
-0.5991857647895813,
-0.3635519742965698,
0.08533472567796707,
0.07081052660942078,
0.2587161064147949,
0.27681976556777954,
-0.07025483250617981,
-0.22364875674247742,
-0.5740292072296143,
-0.21175973117351532,
-0.15085968375205994,
0.09313508868217468,
-0.24931776523590088,
0.16727600991725922,
0.09690822660923004,
-0.2417263686656952,
0.01902022957801819,
0.036159224808216095,
0.37479811906814575,
-0.2228303998708725,
0.04556296765804291,
0.09712715446949005,
0.2547685205936432,
0.2263127565383911,
0.18482404947280884,
-0.35069549083709717,
0.6885234117507935,
0.015723198652267456,
-0.2221219837665558,
-0.012584544718265533,
-0.029927507042884827,
-0.07267386466264725,
0.09022273123264313,
0.15390664339065552,
-0.07372026145458221,
-0.13082686066627502,
-0.5777592658996582,
0.07104971259832382,
-0.17991569638252258,
-0.12752436101436615,
-0.0227045975625515,
-0.008886858820915222,
-0.10349954664707184,
0.46426621079444885,
0.11357998847961426,
-0.20728865265846252,
0.08972633630037308,
0.05880209431052208,
-0.029705964028835297,
0.038598641753196716,
0.3865385055541992,
-0.2108374536037445,
-0.08898068964481354,
-0.04862736910581589,
0.4319389760494232,
0.3850080072879791,
-0.7238602042198181,
0.09679028391838074,
-0.17422547936439514,
-0.15166935324668884,
-0.0811578705906868,
0.21057255566120148,
-0.019999630749225616,
0.1591954529285431,
-0.29539939761161804,
-0.23155289888381958,
-0.17271670699119568,
0.20908865332603455,
-0.0588611401617527,
0.35778263211250305,
-0.25048545002937317,
0.10105869174003601,
0.008895734325051308,
-0.18282029032707214,
-0.17359796166419983,
0.1688593626022339,
0.09727085381746292,
0.3356931209564209,
-0.2553674876689911,
0.34487807750701904,
0.13805311918258667,
-0.0508725568652153,
-0.005224363878369331,
0.3879956603050232,
-0.23852699995040894,
0.030313648283481598,
-0.3230166435241699,
0.2472146451473236,
0.23870736360549927,
-0.06096518784761429,
-0.01439533568918705,
-0.2324274778366089,
-0.12794548273086548,
-0.16420850157737732,
0.19659209251403809,
0.12837031483650208,
-0.3981770873069763,
0.010099736042320728,
0.14910784363746643,
0.17065727710723877,
0.2964245676994324,
0.07179644703865051,
0.19410158693790436,
0.5193593502044678,
-0.11792547255754471,
0.06378285586833954,
-0.22265854477882385,
0.15047524869441986,
-0.0892094224691391,
0.14583203196525574,
-0.023349709808826447,
0.13613390922546387,
0.3282225430011749,
-0.2245086282491684,
0.05251605436205864,
-0.01704881340265274,
0.2459421455860138,
0.06078401580452919,
-0.19235800206661224,
-0.13245037198066711,
0.12195581197738647,
0.044751573354005814,
-0.17675980925559998,
0.047468289732933044,
-0.06172514334321022,
-0.29013511538505554,
0.18831734359264374,
0.3520434498786926,
0.20046520233154297,
0.27685004472732544,
-0.5808144807815552,
-0.039673447608947754,
0.17700135707855225,
-0.4815024733543396,
-0.03528302162885666,
0.35329893231391907,
-0.19974230229854584,
0.37870487570762634,
0.33548450469970703,
0.03216959908604622,
0.28519105911254883,
0.6808960437774658,
0.1513243317604065,
0.38479676842689514,
0.6283421516418457,
0.06667063385248184,
0.4616808593273163,
-0.12057262659072876,
0.31701600551605225,
0.21164585649967194,
0.34626275300979614,
0.4281131625175476,
0.2743959426879883,
0.069603830575943,
-0.3582530617713928,
-0.162482351064682,
-0.03033888339996338,
-0.027845945209264755,
-0.01950756087899208,
-0.07156634330749512,
-0.2705127000808716,
-0.04341268166899681,
-0.4152478873729706,
-0.19543740153312683,
-0.1925966441631317,
-0.3486045002937317,
0.1455800086259842,
0.34615516662597656,
0.005087442696094513,
0.07532390207052231,
-0.09266220778226852,
-0.018277142196893692,
0.2561570405960083,
-0.2481316328048706,
0.19752700626850128,
0.10145557671785355,
0.01882590726017952,
0.18090082705020905,
0.4522285759449005,
0.5520623922348022,
0.5701915621757507,
-0.2227432280778885,
0.054758958518505096,
0.16035474836826324,
-0.16866785287857056,
0.08403045684099197,
0.12334602326154709,
-0.041608721017837524,
0.26149439811706543,
0.3122883141040802,
0.033216409385204315,
-0.041751928627491,
-0.11457477509975433,
0.10349635779857635,
0.027311768382787704,
-0.18135841190814972,
0.47783172130584717,
-0.39910662174224854,
-0.14914506673812866,
-0.07078423351049423,
-0.09306987375020981,
-0.4133981764316559,
-0.18449659645557404,
0.49577778577804565,
-0.31278491020202637,
0.16979104280471802,
0.08207244426012039,
-0.019572993740439415,
-0.25261661410331726,
0.200983464717865,
0.43132275342941284,
0.1259048581123352,
-0.04057809337973595,
0.07889331877231598,
-0.7469432950019836,
0.07910551130771637,
-0.05588116869330406,
-0.33319517970085144,
0.057264719158411026,
0.2371741086244583,
0.1303689330816269,
0.2326866239309311,
0.47438037395477295,
-0.2500807046890259,
0.408267080783844,
0.508266806602478,
-0.03912491351366043,
-0.28724339604377747,
0.31305429339408875,
0.09376445412635803,
-0.1339537650346756,
-0.6228122115135193,
0.1325024962425232,
0.07718250155448914,
-0.03361329436302185,
-0.06267032027244568,
-0.17613354325294495,
-0.0314730666577816,
-0.454563707113266,
0.6092379689216614,
0.3485777974128723,
0.3188524842262268,
-0.25195592641830444,
-0.17673596739768982,
-0.1546832025051117,
-0.20913605391979218,
-0.1819983422756195,
-0.061785317957401276,
-0.09976650774478912,
0.8403080701828003,
0.08496683835983276,
-0.05895506963133812,
-0.060854651033878326,
-0.020810475572943687,
0.06688324362039566,
-0.1386486291885376,
-0.27212297916412354,
0.4309709668159485,
-0.555131733417511,
-0.22185662388801575,
-0.028385216370224953,
0.3288019895553589,
0.20275942981243134,
0.30020368099212646,
-0.2074214220046997,
-0.49590420722961426,
0.449118435382843,
-0.2861350178718567,
-0.4339844584465027,
0.0715668722987175,
0.19552645087242126,
0.09155723452568054,
-0.025017792358994484,
-0.30280303955078125,
-0.07702206820249557,
0.18093864619731903,
0.09787977486848831,
-0.16223914921283722,
0.2071528434753418,
0.21058601140975952,
0.025408457964658737,
-0.1540631800889969,
0.5701334476470947,
-0.20760858058929443,
0.04890373349189758,
0.08264382183551788,
-0.287891685962677
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | > @mariosasko I'm getting a similar issue when creating a Dataset from a Pandas dataframe, like so:
>
> ```
> from datasets import Dataset, Features, Image, Value
> import pandas as pd
> import requests
> import PIL
>
> # we need to define the features ourselves
> features = Features({
> 'a': Value(dtype='int32'),
> 'b': Image(),
> })
>
> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
> image = PIL.Image.open(requests.get(url, stream=True).raw)
>
> df = pd.DataFrame({"a": [1, 2],
> "b": [image, image]})
>
> dataset = Dataset.from_pandas(df, features=features)
> ```
>
> results in
>
> ```
> ArrowInvalid: ('Could not convert <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=640x480 at 0x7F7991A15C10> with type JpegImageFile: did not recognize Python value type when inferring an Arrow data type', 'Conversion failed for column b with type object')
> ```
>
> Will the PR linked above also fix that?
It looks like the problem still exists.
Any news ? Any good workaround ?
Thank you | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 159 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
> @mariosasko I'm getting a similar issue when creating a Dataset from a Pandas dataframe, like so:
>
> ```
> from datasets import Dataset, Features, Image, Value
> import pandas as pd
> import requests
> import PIL
>
> # we need to define the features ourselves
> features = Features({
> 'a': Value(dtype='int32'),
> 'b': Image(),
> })
>
> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
> image = PIL.Image.open(requests.get(url, stream=True).raw)
>
> df = pd.DataFrame({"a": [1, 2],
> "b": [image, image]})
>
> dataset = Dataset.from_pandas(df, features=features)
> ```
>
> results in
>
> ```
> ArrowInvalid: ('Could not convert <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=640x480 at 0x7F7991A15C10> with type JpegImageFile: did not recognize Python value type when inferring an Arrow data type', 'Conversion failed for column b with type object')
> ```
>
> Will the PR linked above also fix that?
It looks like the problem still exists.
Any news ? Any good workaround ?
Thank you | [
-0.17800284922122955,
-0.4027806520462036,
-0.0016966573894023895,
0.2543632686138153,
0.07100436091423035,
0.08462772518396378,
0.30354931950569153,
0.28193244338035583,
-0.22124244272708893,
0.06873466074466705,
0.1500566601753235,
0.6716852188110352,
-0.03752507269382477,
-0.08095704019069672,
-0.1783754527568817,
-0.07135916501283646,
0.12351730465888977,
0.20048342645168304,
-0.0771699845790863,
-0.0899520069360733,
-0.4036835730075836,
0.04886752367019653,
0.046462491154670715,
0.05590885877609253,
-0.5997370481491089,
-0.2355884313583374,
-0.15032897889614105,
-0.012189023196697235,
-0.294491708278656,
-0.20114269852638245,
0.2684321403503418,
-0.2772286534309387,
-0.0655839592218399,
0.028266020119190216,
-0.0001232499344041571,
-0.06692026555538177,
0.4916951060295105,
0.06294932961463928,
0.03049011155962944,
-0.40488743782043457,
-0.3021968901157379,
-0.2738827168941498,
0.17754581570625305,
-0.20657846331596375,
0.18053025007247925,
-0.2398485690355301,
0.033338576555252075,
0.3015406131744385,
0.01575782150030136,
0.31631791591644287,
0.12531794607639313,
0.3431575894355774,
0.167302668094635,
0.0010424427455291152,
0.40899550914764404,
0.29629772901535034,
-0.3422030806541443,
0.15945474803447723,
0.14119741320610046,
0.13940125703811646,
0.144947811961174,
0.4156050682067871,
0.2006714791059494,
0.22648856043815613,
0.2943224310874939,
0.07459265738725662,
-0.10633056610822678,
-0.4400719106197357,
-0.14221730828285217,
-0.08197259157896042,
-0.053630538284778595,
-0.04097628593444824,
-0.4382449686527252,
-0.1457427740097046,
0.09343298524618149,
-0.08253110200166702,
0.2717774212360382,
0.16950491070747375,
-0.04577483981847763,
-0.05659375712275505,
0.22609128057956696,
-0.17505361139774323,
-0.234347403049469,
0.21021051704883575,
-0.023438788950443268,
-0.06841781735420227,
0.027233239263296127,
0.24894386529922485,
-0.05574696138501167,
-0.19105584919452667,
0.3133002519607544,
-0.07114722579717636,
0.06891477853059769,
-0.14133915305137634,
0.009474463760852814,
0.15416133403778076,
-0.03322209417819977,
0.09948103129863739,
0.15235987305641174,
0.0016506612300872803,
-0.10553623735904694,
0.015469183214008808,
-0.53447026014328,
0.4062216877937317,
0.13592928647994995,
0.022563386708498,
-0.3412531316280365,
0.13183797895908356,
-0.03926096111536026,
-0.08755223453044891,
-0.0436583012342453,
-0.030724145472049713,
-0.11283978074789047,
-0.36481794714927673,
0.31575703620910645,
-0.016755428165197372,
0.6071715354919434,
-0.0429733544588089,
-0.3308583199977875,
0.0003811335191130638,
-0.18951964378356934,
0.21889078617095947,
-0.16479898989200592,
0.20404309034347534,
0.14494588971138,
0.19658377766609192,
0.3154894709587097,
0.46079498529434204,
-0.1596023142337799,
0.19172778725624084,
-0.026914378628134727,
0.21818341314792633,
-0.24543032050132751,
-0.20245841145515442,
-0.11834219098091125,
-0.2513728141784668,
0.026160718873143196,
0.04108032211661339,
0.2727999687194824,
-0.15208902955055237,
0.07415228337049484,
-0.23689857125282288,
0.4424121677875519,
0.15150047838687897,
-0.2337217777967453,
0.029975222423672676,
0.09616323560476303,
0.04308941215276718,
-0.14975735545158386,
0.27823761105537415,
-0.4334414601325989,
-0.04815317690372467,
-0.4231779873371124,
0.03139633312821388,
-0.02766837552189827,
-0.13526122272014618,
-0.42364421486854553,
0.13757102191448212,
-0.05304988473653793,
0.03724929317831993,
0.10863032937049866,
-0.3446584939956665,
-0.042655862867832184,
-0.10507897287607193,
-0.16908974945545197,
0.2878562808036804,
-0.1362152248620987,
0.031836509704589844,
-0.0278326403349638,
-0.10454156994819641,
-0.011758103966712952,
0.10068809986114502,
-0.052857592701911926,
-0.018403813242912292,
-0.27644866704940796,
0.0014482587575912476,
0.10317300260066986,
-0.35425832867622375,
-0.4519175589084625,
-0.011373603716492653,
0.03688209503889084,
0.02534070797264576,
-0.13324874639511108,
0.36021313071250916,
0.03803904354572296,
0.03636033087968826,
0.0451408214867115,
0.3469198942184448,
-0.049377359449863434,
0.17070519924163818,
-0.07876598834991455,
-0.4966591000556946,
0.13487902283668518,
0.10940182209014893,
0.26006168127059937,
0.22778460383415222,
0.1978776752948761,
-0.14333991706371307,
-0.15156519412994385,
-0.04464404657483101,
0.32635220885276794,
-0.09052644670009613,
0.4593861401081085,
-0.029967352747917175,
0.07025958597660065,
-0.20722034573554993,
0.00660652294754982,
-0.009762421250343323,
0.12787075340747833,
0.26223331689834595,
-0.5305188298225403,
-0.08356531709432602,
-0.3917641341686249,
0.20363584160804749,
-0.3157132863998413,
0.10567425191402435,
0.07885503768920898,
0.09992461651563644,
-0.3712712526321411,
-0.07401294261217117,
-0.1584879457950592,
0.45279544591903687,
0.11337496340274811,
0.24289561808109283,
-0.2095898687839508,
0.2278335988521576,
-0.06426495313644409,
-0.2896830141544342,
0.08511365950107574,
0.09746913611888885,
0.11229070276021957,
0.04521657153964043,
-0.40969744324684143,
0.21348318457603455,
0.07264860719442368,
0.42985105514526367,
0.11721748113632202,
-0.29030680656433105,
0.31275108456611633,
-0.5053226351737976,
-0.14993445575237274,
0.03704439103603363,
0.41702452301979065,
0.20500779151916504,
0.004640370607376099,
0.3459416329860687,
-0.01397256925702095,
0.15582619607448578,
-0.17771843075752258,
0.230099618434906,
0.11712077260017395,
0.21078914403915405,
-0.20239350199699402,
-0.2605040669441223,
-0.4063873291015625,
0.2691574990749359,
-0.004504214972257614,
-0.09738901257514954,
-0.26044708490371704,
-0.02526184171438217,
0.1145511195063591,
0.06901596486568451,
0.353048175573349,
0.20420396327972412,
-0.1264188289642334,
0.20535588264465332,
0.5421339273452759,
0.15918435156345367,
0.29431164264678955,
0.08363664895296097,
-0.23916083574295044,
0.1260715276002884,
-0.3943322002887726,
0.08243939280509949,
0.24900498986244202,
0.28170672059059143,
0.4679100215435028,
-0.042743682861328125,
0.4658811092376709,
-0.08454497903585434,
-0.3811596930027008,
-0.0805051326751709,
0.0985230877995491,
0.08075597137212753,
-0.29806849360466003,
0.047127820551395416,
-0.43196243047714233,
0.026666663587093353,
-0.1262744814157486,
-0.13805754482746124,
0.03860399127006531,
-0.2649890184402466,
-0.10045358538627625,
0.17188119888305664,
-0.06273025274276733,
0.03418705612421036,
-0.06444750726222992,
0.058702632784843445,
0.2654213309288025,
-0.3090680241584778,
-0.14349831640720367,
-0.004964707884937525,
-0.1132543608546257,
-0.05375819653272629,
0.06947213411331177,
0.13375361263751984,
0.5633628964424133,
0.10841276496648788,
0.4573933482170105,
-0.3447946608066559,
-0.2872222661972046,
-0.014321699738502502,
-0.2170233279466629,
0.3940465450286865,
0.09312373399734497,
0.07106886059045792,
-0.12702010571956635,
-0.05714412033557892,
0.26866862177848816,
0.16168169677257538,
-0.2098989635705948,
-0.0357828363776207,
-0.35354527831077576,
-0.16644588112831116,
-0.15412603318691254,
-0.42003241181373596,
-0.17559519410133362,
-0.14593324065208435,
0.06381627917289734,
0.16448432207107544,
0.0754157304763794,
-0.058007702231407166,
0.6225539445877075,
0.11148995161056519,
0.1693481206893921,
-0.10526587814092636,
-0.2663288414478302,
0.10268071293830872,
0.4249783158302307,
-0.1998055875301361,
-0.284975528717041,
0.07698173820972443,
-0.4506015181541443,
0.10050457715988159,
0.22610467672348022,
-0.11615614593029022,
-0.5322875380516052,
-0.17847678065299988,
0.6001849174499512,
0.0782669186592102,
0.08104898035526276,
0.11603325605392456,
0.24790705740451813,
-0.019585078582167625,
-0.19943633675575256,
-0.15035384893417358,
0.01157524436712265,
0.1395188868045807,
0.23814374208450317,
0.20332792401313782,
0.22412416338920593,
0.10422767698764801,
0.23047837615013123,
-0.07651866972446442,
-0.30244797468185425,
0.6516529321670532,
-0.2688531279563904,
0.2216106802225113,
-0.23951852321624756,
-0.2936405837535858,
-0.05036748945713043,
-0.13544917106628418,
0.04803014546632767,
-0.3836628794670105,
-0.111691914498806,
-0.32752299308776855,
0.0077309682965278625,
-0.09759145975112915,
-0.553604781627655,
-0.1675717830657959,
-0.043420545756816864,
-0.04653419554233551,
0.06821977347135544,
0.02979748696088791,
-0.22872674465179443,
-0.35370007157325745,
-0.04462376981973648,
0.19551408290863037,
0.3522164225578308,
0.1253112256526947,
-0.056746430695056915,
-0.035312965512275696,
-0.3090975284576416,
-0.10282918065786362,
0.1418357640504837,
0.19684220850467682,
0.512167751789093,
0.07430021464824677,
0.11455007642507553,
0.0769219622015953,
-0.12375327199697495,
0.6791887283325195,
-0.35463207960128784,
-0.20739556849002838,
-0.0646185427904129,
0.04396463930606842,
-0.3270738124847412,
0.03724771365523338,
-0.17968204617500305,
0.10711324214935303,
-0.2257094532251358,
0.6284109950065613,
-0.14083267748355865,
0.1943260282278061,
0.08294631540775299,
-0.061207663267850876,
-0.07960250973701477,
0.016759321093559265,
-0.1877564936876297,
-0.29958853125572205,
-0.5404980182647705,
-0.005978226661682129,
0.2381831556558609,
0.18002301454544067,
0.13257379829883575,
-0.32156527042388916,
-0.41591382026672363,
0.18601897358894348,
0.09154752641916275,
0.06640627980232239,
0.2647213041782379,
-0.08666330575942993,
0.06012440845370293,
-0.19317147135734558,
0.3003465235233307,
0.26079875230789185,
0.48192477226257324,
0.05516877397894859,
-0.29356035590171814,
0.03134266287088394,
-0.036654286086559296,
0.06428171694278717,
0.25360995531082153,
-0.08334063738584518,
0.0145844966173172,
-0.19309256970882416,
-0.0008584856986999512,
-0.27751418948173523,
0.19788037240505219,
0.30129167437553406,
-0.04878457263112068,
0.1834530234336853,
-0.16788849234580994,
0.6482211947441101,
-0.11334964632987976,
-0.06810173392295837,
0.2891339659690857,
0.5839308500289917,
-0.13934700191020966,
0.5851269960403442,
0.47503983974456787,
0.9637137055397034,
0.1043725460767746,
0.0017199665307998657,
0.45691579580307007,
-0.4954512119293213,
0.2949801981449127,
0.48171019554138184,
0.04544924944639206,
-0.29695865511894226,
0.1308034509420395,
-0.10666338354349136,
-0.16582614183425903,
0.29878875613212585,
-0.1171124279499054,
-0.307098925113678,
-0.14551430940628052,
-0.0014497041702270508,
-0.004684757441282272,
-0.0861000120639801,
0.048042066395282745,
-0.6820662021636963,
-0.41983726620674133,
-0.04145941883325577,
0.17819982767105103,
0.08705026656389236,
0.15761764347553253,
0.019149940460920334,
-0.18609817326068878,
-0.62599116563797,
0.03058469295501709,
-0.11754260212182999,
0.10411611944437027,
-0.2065502107143402,
0.1702924519777298,
0.09966099262237549,
-0.0802314355969429,
-0.06449467688798904,
0.00023150071501731873,
0.24371463060379028,
-0.339059442281723,
-0.056768253445625305,
0.23858559131622314,
0.1743439882993698,
0.039902083575725555,
0.03393316641449928,
-0.25610196590423584,
0.542815625667572,
-0.015249554067850113,
-0.33633124828338623,
-0.05815146863460541,
0.0830499604344368,
0.0042114220559597015,
-0.01172572374343872,
0.08435578644275665,
-0.185886412858963,
-0.14515407383441925,
-0.7559023499488831,
0.0156206414103508,
-0.20405586063861847,
-0.14150887727737427,
0.06032814458012581,
0.07735323160886765,
0.0028310969937592745,
0.28093838691711426,
0.3078412115573883,
-0.18951305747032166,
0.17595535516738892,
0.14135277271270752,
-0.1381397247314453,
0.12018965184688568,
0.29151299595832825,
-0.20127958059310913,
-0.1379796266555786,
-0.02145654521882534,
0.48654699325561523,
0.20163843035697937,
-0.6063961386680603,
0.04804404452443123,
-0.17661748826503754,
-0.2256949543952942,
-0.16872736811637878,
0.0725310891866684,
0.047439154237508774,
0.26826712489128113,
-0.1127336323261261,
-0.19971926510334015,
-0.19316710531711578,
0.15020184218883514,
-0.20775549113750458,
0.40623611211776733,
-0.3278173804283142,
-0.054000336676836014,
0.13750720024108887,
-0.18586580455303192,
-0.21304699778556824,
0.26214659214019775,
-0.033939480781555176,
0.3552146255970001,
-0.36878105998039246,
0.29927825927734375,
0.04406897723674774,
-0.10794305801391602,
0.01823912002146244,
0.4553983211517334,
-0.12118355929851532,
-0.033112894743680954,
-0.3447936773300171,
0.2003050148487091,
0.340896874666214,
-0.041526950895786285,
-0.17418348789215088,
-0.1668524146080017,
-0.08994823694229126,
-0.10680394619703293,
0.10771435499191284,
0.12117450684309006,
-0.42702585458755493,
0.09730061888694763,
0.022488366812467575,
-0.17089807987213135,
0.258892297744751,
0.018141884356737137,
0.18534383177757263,
0.4063011407852173,
-0.0767056867480278,
0.008208017796278,
-0.07865297794342041,
0.15977172553539276,
-0.06535446643829346,
0.13781005144119263,
-0.08397994935512543,
0.05457312986254692,
0.3299942910671234,
-0.07206684350967407,
0.03822629526257515,
-0.006335817277431488,
0.1684143841266632,
-0.013726375997066498,
-0.21375484764575958,
0.03937813639640808,
-0.026843693107366562,
0.10490506142377853,
-0.2754356265068054,
0.04964538663625717,
0.013916248455643654,
-0.19839036464691162,
0.13157255947589874,
0.16540253162384033,
0.11965656280517578,
0.3432241380214691,
-0.6005702614784241,
-0.09677846729755402,
0.1909300833940506,
-0.46361756324768066,
-0.05503449589014053,
0.2634499967098236,
-0.20716479420661926,
0.24312755465507507,
0.4109290838241577,
0.08546081185340881,
0.20717068016529083,
0.5888333916664124,
0.22502484917640686,
0.3464276194572449,
0.48074790835380554,
0.16667281091213226,
0.5536249279975891,
-0.009547360241413116,
0.1053222119808197,
0.06024456024169922,
0.3232291638851166,
0.3161012530326843,
0.2889212965965271,
0.24691343307495117,
-0.3069978654384613,
-0.24356059730052948,
-0.023200027644634247,
-0.06268873810768127,
-0.01897997036576271,
-0.11248834431171417,
-0.31588077545166016,
-0.0550667978823185,
-0.562206506729126,
-0.11425594985485077,
-0.10423573851585388,
-0.3439459800720215,
0.2391718626022339,
0.3791351318359375,
-0.09954708814620972,
0.08107311278581619,
-0.09156747907400131,
0.1809290647506714,
0.24357807636260986,
-0.21633534133434296,
-0.027103887870907784,
0.07106228172779083,
0.012430187314748764,
0.09053976088762283,
0.540444016456604,
0.4360371232032776,
0.4463743269443512,
-0.15056464076042175,
0.15412801504135132,
0.24832169711589813,
-0.23801733553409576,
0.22557395696640015,
0.12235157936811447,
0.14289189875125885,
0.336406409740448,
0.187807098031044,
0.09485496580600739,
-0.043011583387851715,
0.028340037912130356,
0.02748679742217064,
0.13115443289279938,
-0.24241416156291962,
0.40650445222854614,
-0.4347960352897644,
-0.2110280692577362,
-0.13181139528751373,
-0.09267202764749527,
-0.4207995533943176,
-0.2012224942445755,
0.44359123706817627,
-0.374189555644989,
0.17871332168579102,
-0.03986649587750435,
0.010108720511198044,
-0.23430171608924866,
0.19040308892726898,
0.3923064172267914,
-0.00429929792881012,
-0.00046892091631889343,
0.05585961043834686,
-0.7361173033714294,
-0.008947111666202545,
0.0824035182595253,
-0.27449166774749756,
0.19446636736392975,
0.155080184340477,
-0.08520207554101944,
0.20056138932704926,
0.2937130928039551,
-0.2488805651664734,
0.5019171237945557,
0.4374663531780243,
-0.11994247138500214,
-0.1770690679550171,
0.3437076210975647,
-0.005999390035867691,
-0.0044793132692575455,
-0.480228453874588,
0.10263422876596451,
0.045627839863300323,
0.03991349786520004,
-0.06766903400421143,
-0.35011956095695496,
-0.1497226506471634,
-0.1594957560300827,
0.6459954380989075,
0.36130017042160034,
0.1682194620370865,
-0.21415576338768005,
-0.05080702155828476,
-0.22280150651931763,
-0.3380811810493469,
-0.1689896434545517,
0.03336288779973984,
-0.1323329508304596,
0.7903568744659424,
0.18792687356472015,
-0.04924340173602104,
-0.04443987086415291,
0.1215735599398613,
-0.041369225829839706,
-0.2729673385620117,
-0.3132786750793457,
0.2852708697319031,
-0.5045459866523743,
-0.21973060071468353,
-0.1177888959646225,
0.30635812878608704,
0.14389446377754211,
0.27116096019744873,
-0.06651101261377335,
-0.49366137385368347,
0.36330968141555786,
-0.195338636636734,
-0.39556068181991577,
0.19953103363513947,
0.06619808077812195,
0.3352830708026886,
-0.01218155212700367,
-0.3959532082080841,
-0.12142300605773926,
0.10670547932386398,
0.08928905427455902,
-0.1227303147315979,
0.19153077900409698,
0.20753100514411926,
0.15352389216423035,
-0.17646123468875885,
0.3718215525150299,
-0.10619457811117172,
0.17765986919403076,
0.12253344058990479,
-0.16563297808170319
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | There is a workaround:
Create a loader python scrypt and upload the dataset to huggingface.
Here is an example how to do that:
https://huggingface.co/datasets/jamescalam/image-text-demo/tree/main
and Here are videos with explanations:
https://www.youtube.com/watch?v=lqK4ocAKveE and https://www.youtube.com/watch?v=ODdKC30dT8c | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 33 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
There is a workaround:
Create a loader python scrypt and upload the dataset to huggingface.
Here is an example how to do that:
https://huggingface.co/datasets/jamescalam/image-text-demo/tree/main
and Here are videos with explanations:
https://www.youtube.com/watch?v=lqK4ocAKveE and https://www.youtube.com/watch?v=ODdKC30dT8c | [
-0.17007660865783691,
-0.634972333908081,
0.0006580948829650879,
0.31334173679351807,
-0.040805377066135406,
0.10565967112779617,
0.10329051315784454,
0.22061453759670258,
-0.11078351736068726,
0.10120533406734467,
0.03682214766740799,
0.5722434520721436,
-0.05125032365322113,
-0.001174241304397583,
-0.1111413985490799,
-0.011768974363803864,
0.06734184175729752,
0.06932540982961655,
-0.1657564640045166,
-0.12706086039543152,
-0.2487005591392517,
0.20990101993083954,
0.0842830240726471,
-0.06871040165424347,
-0.6306208372116089,
-0.1285175383090973,
-0.20449046790599823,
0.1650944948196411,
-0.3236083388328552,
-0.229826882481575,
0.2646099328994751,
-0.15125009417533875,
-0.022302988916635513,
0.07266844809055328,
-0.00012110445823054761,
-0.009133674204349518,
0.3895512819290161,
0.020448753610253334,
-0.051996536552906036,
-0.4010370373725891,
-0.03569740802049637,
-0.183587446808815,
0.09178996831178665,
-0.10363838821649551,
0.0646355003118515,
-0.1226256713271141,
0.039278075098991394,
0.36604294180870056,
0.14802823960781097,
0.21252141892910004,
0.16658712923526764,
0.37075769901275635,
0.23280955851078033,
0.008043763227760792,
0.47405922412872314,
0.34910523891448975,
-0.28319254517555237,
0.2647407054901123,
0.11682599782943726,
0.060110338032245636,
0.09830769151449203,
0.4722033143043518,
0.22028394043445587,
0.21792417764663696,
0.42054224014282227,
0.1291046440601349,
-0.16296488046646118,
-0.3972158133983612,
-0.15809902548789978,
-0.0695275291800499,
-0.11946915835142136,
-0.10295572131872177,
-0.3995814621448517,
-0.1992206573486328,
0.1152253970503807,
-0.0639328882098198,
0.2649168372154236,
0.23779255151748657,
-0.14746548235416412,
-0.061722297221422195,
0.0933971032500267,
-0.2701670229434967,
-0.25559258460998535,
0.13751666247844696,
0.046261176466941833,
-0.004981197416782379,
-0.02712288498878479,
0.18462680280208588,
0.13543322682380676,
-0.12321098148822784,
0.20493532717227936,
0.05281501263380051,
-0.0320160873234272,
-0.1084032654762268,
-0.03719789907336235,
0.08500668406486511,
-0.09617070108652115,
0.19517239928245544,
0.351530522108078,
0.003210965543985367,
-0.10538908839225769,
0.11205163598060608,
-0.48121675848960876,
0.37947943806648254,
0.07013927400112152,
0.05166507139801979,
-0.17430448532104492,
0.10448465496301651,
-0.0007480941712856293,
0.030332352966070175,
0.03238017484545708,
0.014240507036447525,
-0.13400079309940338,
-0.2973186671733856,
0.17332319915294647,
-0.07911370694637299,
0.5324385166168213,
-0.16366276144981384,
-0.2910189628601074,
-0.05452461540699005,
-0.11669159680604935,
0.21294273436069489,
-0.19531433284282684,
0.4312170445919037,
0.14231179654598236,
0.06114833801984787,
0.3082541227340698,
0.3801140785217285,
-0.17922496795654297,
0.11466338485479355,
-0.050920646637678146,
0.23308564722537994,
-0.1812461018562317,
-0.056880079209804535,
-0.09500172734260559,
-0.40276437997817993,
0.11641495674848557,
0.00047250185161828995,
0.3586121201515198,
-0.051566220819950104,
-0.020212024450302124,
-0.12047289311885834,
0.4802723824977875,
0.1583930402994156,
-0.24023878574371338,
-0.07107284665107727,
0.12185192108154297,
0.12129881978034973,
-0.1434464454650879,
0.17881636321544647,
-0.5148852467536926,
-0.11980341374874115,
-0.41878047585487366,
0.062286168336868286,
-0.027416791766881943,
-0.19510439038276672,
-0.3976168632507324,
0.10081226378679276,
-0.1838023066520691,
0.0174076147377491,
0.21078848838806152,
-0.2791029214859009,
-0.2128811776638031,
-0.02630992792546749,
-0.053316205739974976,
0.2635742425918579,
-0.062120333313941956,
-0.05006140470504761,
0.065217524766922,
-0.15421606600284576,
-0.1592840850353241,
0.0441412515938282,
-0.06819581240415573,
0.01134461909532547,
-0.4100641906261444,
0.09507982432842255,
-0.0452558770775795,
-0.40713104605674744,
-0.4647446870803833,
-0.061960529536008835,
0.011177465319633484,
0.09894911199808121,
-0.16468098759651184,
0.29709893465042114,
-0.03845379129052162,
0.05403584986925125,
0.04383506998419762,
0.25650519132614136,
0.033958885818719864,
0.15991805493831635,
-0.19465184211730957,
-0.4637453556060791,
0.041946928948163986,
0.22496269643306732,
0.11807054281234741,
0.15495651960372925,
0.21278029680252075,
-0.1587846875190735,
-0.02805185317993164,
-0.036701541393995285,
0.2888656556606293,
0.04320549964904785,
0.5552029013633728,
0.04318244010210037,
0.10337913781404495,
-0.15843456983566284,
-0.2284507155418396,
0.0782879889011383,
0.023068740963935852,
0.31356674432754517,
-0.4767460823059082,
-0.1382724642753601,
-0.3511243462562561,
0.2038799524307251,
-0.3946801722049713,
-0.06321188807487488,
0.09798206388950348,
0.05943986773490906,
-0.26654669642448425,
-0.17166554927825928,
-0.14934872090816498,
0.5470283031463623,
0.08439501374959946,
0.3119044899940491,
-0.2967275381088257,
0.3137628138065338,
-0.06394553184509277,
-0.2914094924926758,
0.050088927149772644,
0.009653076529502869,
0.13977722823619843,
-0.04682755842804909,
-0.34801018238067627,
0.3551558554172516,
-0.04334503039717674,
0.402876615524292,
0.11205573379993439,
-0.24055342376232147,
0.3036400377750397,
-0.5628951191902161,
-0.10372766107320786,
-0.0045831650495529175,
0.37968307733535767,
0.20282119512557983,
-0.06788045912981033,
0.3532281219959259,
-0.0066951848566532135,
0.19213366508483887,
-0.1475757658481598,
0.14316363632678986,
-0.05781293660402298,
0.12908969819545746,
-0.12796199321746826,
-0.14357879757881165,
-0.154457226395607,
0.1417476087808609,
0.07812954485416412,
-0.19724783301353455,
-0.24196168780326843,
0.040113385766744614,
0.19211582839488983,
0.09624931216239929,
0.262539267539978,
0.361496239900589,
-0.23245719075202942,
0.23429608345031738,
0.5513623356819153,
0.045779671519994736,
0.2666512727737427,
0.17045380175113678,
-0.23969045281410217,
0.33148393034935,
-0.26719996333122253,
0.1148664653301239,
0.17306306958198547,
0.1600751280784607,
0.4694638252258301,
0.01731584221124649,
0.44506776332855225,
-0.10997564345598221,
-0.5163081288337708,
-0.12932619452476501,
-0.05786443501710892,
0.02605104073882103,
-0.31640350818634033,
-0.027182193472981453,
-0.29180607199668884,
0.03044304996728897,
-0.2467249631881714,
-0.1438879668712616,
-0.09194566309452057,
-0.3038623332977295,
0.01656828075647354,
0.24564333260059357,
-0.11005079746246338,
-0.02336740307509899,
0.136912539601326,
0.05588383972644806,
0.0840378999710083,
-0.28924617171287537,
-0.25525015592575073,
0.04291233420372009,
-0.09530463069677353,
-0.02280048094689846,
0.043890632688999176,
0.16098833084106445,
0.5825499892234802,
0.040299758315086365,
0.27986788749694824,
-0.3922291398048401,
-0.3612852990627289,
0.08335867524147034,
-0.24514083564281464,
0.36344730854034424,
0.12236963212490082,
0.12772813439369202,
-0.09162139892578125,
-0.11995840817689896,
0.33495911955833435,
0.003598257899284363,
-0.3099871277809143,
-0.08422760665416718,
-0.32896000146865845,
-0.06028909608721733,
-0.21044009923934937,
-0.39878135919570923,
-0.22840215265750885,
-0.2264326810836792,
0.19507867097854614,
0.15975603461265564,
0.08144453912973404,
0.036360979080200195,
0.5331671237945557,
0.1892378181219101,
-0.06135808303952217,
-0.07352707535028458,
-0.19524523615837097,
-0.07337862253189087,
0.35284584760665894,
-0.26291120052337646,
-0.3120070993900299,
0.12442788481712341,
-0.24111174046993256,
-0.00821702927350998,
0.09793449193239212,
-0.2879924178123474,
-0.6535055041313171,
-0.19072197377681732,
0.61212158203125,
-0.013868778944015503,
0.11366526037454605,
0.14212068915367126,
0.16349081695079803,
-0.03678274527192116,
-0.15787823498249054,
-0.1459004431962967,
0.01974838227033615,
0.0952296257019043,
0.1944851130247116,
0.12593284249305725,
0.11503145843744278,
0.09325912594795227,
0.286821186542511,
-0.017511943355202675,
-0.20985530316829681,
0.6427652835845947,
-0.26145264506340027,
0.22613634169101715,
-0.30044791102409363,
-0.23510944843292236,
0.0049531711265444756,
-0.15340527892112732,
0.087904192507267,
-0.24115882813930511,
-0.07890041172504425,
-0.08935325592756271,
0.04774165898561478,
-0.29790768027305603,
-0.4237067401409149,
-0.14661477506160736,
0.01615540310740471,
0.1294981837272644,
-0.05437939614057541,
-0.017596453428268433,
-0.3147105872631073,
-0.24674183130264282,
-0.1385500729084015,
0.3360736072063446,
0.35709643363952637,
-0.005388513207435608,
0.02014162391424179,
-0.23989398777484894,
-0.3296833634376526,
-0.2107965648174286,
0.21740081906318665,
0.1388179212808609,
0.2718621790409088,
-0.012739613652229309,
0.04203415662050247,
0.09484017640352249,
-0.23483973741531372,
0.7621907591819763,
-0.20393043756484985,
-0.11545686423778534,
-0.11092455685138702,
-0.06696727871894836,
-0.3260628581047058,
0.011546734720468521,
-0.16015112400054932,
0.028855234384536743,
-0.19432435929775238,
0.681633710861206,
-0.26549720764160156,
0.15746982395648956,
0.15827760100364685,
-0.07064749300479889,
-0.06288701295852661,
-0.02542433701455593,
-0.1963692158460617,
-0.3137498199939728,
-0.6092973947525024,
-0.1057944968342781,
0.2330465167760849,
0.20418667793273926,
0.13684457540512085,
-0.20024484395980835,
-0.22033484280109406,
0.12645208835601807,
0.0390193834900856,
0.05639059469103813,
0.3256987929344177,
-0.06483016908168793,
0.06261464953422546,
0.009588075801730156,
0.3662222623825073,
0.29054635763168335,
0.7188171148300171,
0.03781141713261604,
-0.24992749094963074,
-0.03158033266663551,
0.0023846328258514404,
0.12561239302158356,
0.3238975703716278,
0.020162981003522873,
0.0821625292301178,
-0.17576806247234344,
0.1475747525691986,
-0.41234609484672546,
0.21338795125484467,
0.16812723875045776,
-0.0119019765406847,
0.2610115706920624,
0.054192185401916504,
0.678429901599884,
-0.15254363417625427,
0.0010886415839195251,
0.2619275450706482,
0.6967970728874207,
-0.13836707174777985,
0.5604845285415649,
0.40145909786224365,
1.0451538562774658,
0.13118469715118408,
0.08713023364543915,
0.3693125247955322,
-0.45113706588745117,
0.23468215763568878,
0.24253539741039276,
-0.02216678112745285,
-0.28693971037864685,
0.008093180134892464,
-0.05401869863271713,
-0.11465029418468475,
0.2059205174446106,
-0.21595634520053864,
-0.2791507840156555,
-0.10578446835279465,
0.10872101783752441,
-0.05270891264081001,
-0.2066086381673813,
0.11938066780567169,
-0.7331467866897583,
-0.42250603437423706,
-0.04364767670631409,
0.19845470786094666,
0.14629307389259338,
0.28073304891586304,
-0.015009455382823944,
-0.1519591063261032,
-0.5003925561904907,
-0.15121009945869446,
-0.1428794264793396,
0.1299799084663391,
-0.3458566665649414,
-0.00981822982430458,
0.2671020030975342,
-0.021916978061199188,
-0.04791330546140671,
-0.0023889057338237762,
0.25793588161468506,
-0.2889971435070038,
-0.17639227211475372,
0.22464360296726227,
0.04760775715112686,
0.04761725664138794,
0.0063873035833239555,
-0.18531538546085358,
0.4442482888698578,
-0.1467410922050476,
-0.2985630929470062,
-0.11583959311246872,
0.07716944813728333,
0.016231507062911987,
0.060739025473594666,
-0.004909254610538483,
-0.20619390904903412,
-0.11043283343315125,
-0.6605374813079834,
0.10436294227838516,
-0.1657363772392273,
-0.153023824095726,
0.07996977865695953,
0.026239581406116486,
-0.15260274708271027,
0.10576806962490082,
0.46701982617378235,
-0.22916917502880096,
0.166213721036911,
0.21048057079315186,
-0.2511039674282074,
0.06467852741479874,
0.38785555958747864,
-0.0738101527094841,
-0.06080690026283264,
-0.06656873971223831,
0.4072685241699219,
0.34648314118385315,
-0.6865153908729553,
-0.038994744420051575,
-0.07723089307546616,
-0.2027217149734497,
-0.15353134274482727,
0.2687009572982788,
0.0360143780708313,
0.10910627245903015,
-0.10272166132926941,
-0.23529142141342163,
-0.22380730509757996,
0.18296471238136292,
-0.18016089498996735,
0.4524516761302948,
-0.26123952865600586,
-0.0025423336774110794,
0.12930746376514435,
-0.03851579874753952,
-0.2922500967979431,
0.30117589235305786,
-0.06109184771776199,
0.2728513181209564,
-0.2767517864704132,
0.2783982753753662,
0.17058438062667847,
-0.08364756405353546,
0.05413401126861572,
0.5719313025474548,
-0.16659042239189148,
-0.07074874639511108,
-0.35137689113616943,
0.18886852264404297,
0.2724855840206146,
-0.05718138813972473,
-0.08019299805164337,
-0.09558476507663727,
-0.09131209552288055,
-0.12433724105358124,
0.23076456785202026,
0.05702732503414154,
-0.3367772698402405,
0.1831887662410736,
0.06936326622962952,
-0.10258498042821884,
0.2252628058195114,
0.020381387323141098,
0.30938225984573364,
0.3737003803253174,
-0.09908632189035416,
-0.061680763959884644,
-0.28961893916130066,
0.12337936460971832,
0.08327506482601166,
0.18072107434272766,
0.07810948044061661,
-0.012127358466386795,
0.22216632962226868,
0.009709440171718597,
0.0009547621011734009,
-0.12513618171215057,
0.25337985157966614,
-0.041243791580200195,
-0.29732370376586914,
0.10065250843763351,
-0.004371225833892822,
0.14907284080982208,
-0.26483792066574097,
0.08805818110704422,
0.0007922612130641937,
-0.2694527208805084,
0.14064092934131622,
0.13070201873779297,
0.16351653635501862,
0.41562584042549133,
-0.4970341920852661,
-0.013516966253519058,
0.22825784981250763,
-0.41394102573394775,
-0.13501422107219696,
0.1015736311674118,
-0.30141130089759827,
0.19067999720573425,
0.35446518659591675,
0.02828056551516056,
0.21616235375404358,
0.4876411557197571,
0.0827445238828659,
0.4356828033924103,
0.2714599668979645,
0.23371095955371857,
0.6088634729385376,
-0.019863970577716827,
0.10961654782295227,
0.19807523488998413,
0.479194700717926,
0.2662942111492157,
0.15721121430397034,
0.4393046200275421,
-0.22137139737606049,
-0.3447834551334381,
0.03163039684295654,
0.01497519388794899,
0.01712009310722351,
-0.09414947032928467,
-0.3108581304550171,
-0.0694097951054573,
-0.6300809383392334,
-0.0007475800812244415,
-0.08416160941123962,
-0.47129225730895996,
0.3703415095806122,
0.3203623592853546,
-0.13954733312129974,
0.03296292573213577,
-0.18571877479553223,
0.20775794982910156,
0.258001446723938,
-0.24831467866897583,
0.10113325715065002,
0.17004333436489105,
-0.0278853178024292,
0.12493757903575897,
0.5777035355567932,
0.4896710216999054,
0.32024407386779785,
-0.08247540891170502,
0.20775291323661804,
0.13323648273944855,
-0.15723679959774017,
0.1793893426656723,
0.12444315105676651,
0.09033187478780746,
0.29300594329833984,
0.22415414452552795,
0.12911063432693481,
-0.1348295956850052,
0.017007790505886078,
-0.08428619801998138,
0.19106362760066986,
-0.2305939793586731,
0.2848072052001953,
-0.40600934624671936,
-0.22670066356658936,
-0.20940831303596497,
-0.1210000142455101,
-0.3956245481967926,
-0.1513672173023224,
0.352958619594574,
-0.32798078656196594,
0.14219295978546143,
-0.05470801144838333,
0.03265484794974327,
-0.24112293124198914,
0.32167336344718933,
0.39619335532188416,
-0.012276500463485718,
0.005346343852579594,
-0.0813722237944603,
-0.7000941038131714,
0.07711237668991089,
0.0641813799738884,
-0.22496405243873596,
0.19591876864433289,
0.051131948828697205,
0.03503026068210602,
0.19914864003658295,
0.31901752948760986,
-0.2870091497898102,
0.48600512742996216,
0.2855581045150757,
-0.11753688752651215,
-0.07490091025829315,
0.2848012447357178,
0.002222055569291115,
0.12674568593502045,
-0.4346134066581726,
0.14636172354221344,
-0.028485823422670364,
0.009412594139575958,
-0.054361388087272644,
-0.13409562408924103,
-0.19915719330310822,
-0.3484298288822174,
0.5435138940811157,
0.23968924582004547,
0.17538592219352722,
-0.3000980317592621,
-0.12186545133590698,
-0.18133065104484558,
-0.33131131529808044,
-0.25171083211898804,
-0.10568583756685257,
-0.09032715857028961,
0.8024159669876099,
0.2358158677816391,
-0.16284003853797913,
-0.09445855021476746,
0.06099849194288254,
-0.00026898086071014404,
-0.1532197743654251,
-0.2630845308303833,
0.3903307020664215,
-0.42236757278442383,
-0.18402133882045746,
-0.059344030916690826,
0.4171910285949707,
0.2307370901107788,
0.07366059720516205,
-0.2064979523420334,
-0.475023478269577,
0.43634819984436035,
-0.11694251000881195,
-0.2691226899623871,
0.27164268493652344,
0.1106313169002533,
0.30884549021720886,
-0.1696823686361313,
-0.6064377427101135,
-0.04936941713094711,
0.0372057668864727,
0.12368083000183105,
-0.1505299061536789,
0.31025075912475586,
0.24782633781433105,
0.08614353835582733,
-0.1181144118309021,
0.5049994587898254,
0.04726492241024971,
0.16172243654727936,
0.1293814778327942,
-0.18585507571697235
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | > Any update on this? I'm still facing this issure. Any workaround?
I was able to resolve my issue with a quick workaround:
```
from collections import defaultdict
from datasets import Dataset
data = defaultdict(list)
for idx in tqdm(range( len(dataloader)),desc="Captioning..."):
img = dataloader[idx]
data['image'].append(img)
data['text'].append(f"{img_{idx}})
dataset = Dataset.from_dict(data)
dataset = dataset.filter(lambda example: example['image'] is not None)
dataset = dataset.filter(lambda example: example['text'] is not None)
dataset.push_to_hub(path-to-repo', private=False)
```
Hope it helps!
Happy coding | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 72 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
> Any update on this? I'm still facing this issure. Any workaround?
I was able to resolve my issue with a quick workaround:
```
from collections import defaultdict
from datasets import Dataset
data = defaultdict(list)
for idx in tqdm(range( len(dataloader)),desc="Captioning..."):
img = dataloader[idx]
data['image'].append(img)
data['text'].append(f"{img_{idx}})
dataset = Dataset.from_dict(data)
dataset = dataset.filter(lambda example: example['image'] is not None)
dataset = dataset.filter(lambda example: example['text'] is not None)
dataset.push_to_hub(path-to-repo', private=False)
```
Hope it helps!
Happy coding | [
-0.21556289494037628,
-0.37681540846824646,
-0.003592759370803833,
0.17942631244659424,
0.04033011943101883,
0.045936353504657745,
0.24427945911884308,
0.30551138520240784,
-0.3000451326370239,
0.07468070089817047,
0.11448895186185837,
0.7439548969268799,
-0.05820801109075546,
-0.11969739943742752,
-0.14552845060825348,
-0.03939952701330185,
0.06217851862311363,
0.10114897787570953,
-0.11924082040786743,
-0.10230868309736252,
-0.33874255418777466,
0.18113793432712555,
-0.057048898190259933,
-0.05000723898410797,
-0.6045071482658386,
-0.20394395291805267,
-0.06208575516939163,
0.04984763264656067,
-0.24308626353740692,
-0.27396053075790405,
0.16067573428153992,
-0.1332981437444687,
-0.029756322503089905,
0.021903306245803833,
-0.000128332176245749,
-0.037975382059812546,
0.4115673303604126,
0.026459095999598503,
0.016715364530682564,
-0.2976166009902954,
-0.13131952285766602,
-0.25335097312927246,
0.09640218317508698,
-0.13257363438606262,
0.18190395832061768,
-0.10688193887472153,
0.0023379623889923096,
0.280402272939682,
0.01380004733800888,
0.23131228983402252,
0.08858295530080795,
0.36529242992401123,
0.1842825561761856,
0.07711388170719147,
0.5006179809570312,
0.25369131565093994,
-0.278847336769104,
0.16099947690963745,
0.3388170003890991,
0.0885392501950264,
0.14480017125606537,
0.5343934297561646,
0.19932353496551514,
0.2202703207731247,
0.279310017824173,
0.13506148755550385,
-0.05191677063703537,
-0.48365381360054016,
-0.11923984438180923,
-0.14808493852615356,
0.051566075533628464,
-0.08913186937570572,
-0.45772379636764526,
-0.07657302170991898,
0.10130354762077332,
-0.15323296189308167,
0.2782498896121979,
0.09591609984636307,
-0.17914550006389618,
-0.05751251056790352,
0.1077510342001915,
-0.2826613187789917,
-0.2396494299173355,
0.18179216980934143,
-0.14993268251419067,
-0.013712093234062195,
0.08893180638551712,
0.19593483209609985,
-0.09397253394126892,
-0.15402786433696747,
0.3582706153392792,
0.025681255385279655,
0.030879542231559753,
-0.08045665919780731,
0.01650111749768257,
0.04622582346200943,
-0.09025251120328903,
0.031182043254375458,
0.19046592712402344,
-0.02400984987616539,
-0.19158899784088135,
0.128290593624115,
-0.5060279369354248,
0.3236987590789795,
0.07363193482160568,
-0.019076257944107056,
-0.20498502254486084,
0.14413876831531525,
0.03339045122265816,
-0.07932162284851074,
-0.08754566311836243,
0.04369788244366646,
-0.1187627911567688,
-0.3709917962551117,
0.356798380613327,
-0.020759977400302887,
0.5560159087181091,
-0.1359042078256607,
-0.31072282791137695,
-0.027582086622714996,
-0.1470940113067627,
0.24181759357452393,
-0.1672029048204422,
0.27741941809654236,
0.26627564430236816,
0.09793026745319366,
0.2996220588684082,
0.4315890669822693,
-0.18003833293914795,
-0.0992649644613266,
0.04573795199394226,
0.13358889520168304,
-0.19259613752365112,
-0.19819287955760956,
-0.0817919448018074,
-0.21215344965457916,
-0.04881758242845535,
-0.021888745948672295,
0.3962506651878357,
-0.05090755596756935,
0.03791823983192444,
-0.19180986285209656,
0.5272336006164551,
0.15661700069904327,
-0.285076767206192,
0.038811519742012024,
0.10054212808609009,
-0.04242827743291855,
-0.14408841729164124,
0.35027793049812317,
-0.5320168137550354,
-0.08729515224695206,
-0.39899134635925293,
-0.010240874253213406,
0.0854550451040268,
-0.20808973908424377,
-0.40449199080467224,
0.13699908554553986,
-0.05748594552278519,
-0.06769362092018127,
0.07380995154380798,
-0.4083932638168335,
-0.16511137783527374,
-0.10884632915258408,
-0.13844157755374908,
0.2755310535430908,
-0.22411134839057922,
0.03538841754198074,
-0.1267276555299759,
-0.060052674263715744,
-0.06497756391763687,
0.027038700878620148,
-0.06228158250451088,
0.1647665798664093,
-0.38079583644866943,
0.0064606815576553345,
0.18826928734779358,
-0.45870259404182434,
-0.5521515607833862,
0.017659921199083328,
0.04719299077987671,
0.07346129417419434,
-0.2671799659729004,
0.3653503358364105,
0.16769422590732574,
-0.03741416335105896,
0.18158301711082458,
0.31337493658065796,
-0.09086374193429947,
0.17104825377464294,
-0.1760547161102295,
-0.4301672577857971,
0.10737030953168869,
0.156433567404747,
0.2909834682941437,
0.21080738306045532,
0.25728529691696167,
-0.2030315101146698,
-0.0690474733710289,
0.035290446132421494,
0.3155389726161957,
-0.06397160142660141,
0.4774100184440613,
-0.11120213568210602,
0.057067207992076874,
-0.16307970881462097,
-0.1606626808643341,
0.006028026342391968,
0.06291227042675018,
0.28700292110443115,
-0.535198450088501,
-0.0693315863609314,
-0.3621397018432617,
0.2106577455997467,
-0.3492259979248047,
0.10949434340000153,
0.04590211063623428,
0.0159592442214489,
-0.41108641028404236,
-0.1592995822429657,
-0.17305760085582733,
0.43853530287742615,
0.17313772439956665,
0.2722890377044678,
-0.0762609988451004,
0.2762587070465088,
0.023048100993037224,
-0.3749741017818451,
0.020172346383333206,
0.017673593014478683,
0.16269263625144958,
0.010075267404317856,
-0.4286457598209381,
0.26811400055885315,
0.09708689153194427,
0.36028265953063965,
0.1576668918132782,
-0.2714129686355591,
0.3126986622810364,
-0.571692168712616,
-0.09932633489370346,
0.01060150284320116,
0.3865021765232086,
0.1489802598953247,
0.020194124430418015,
0.3305022716522217,
0.016003867611289024,
0.1583366096019745,
-0.24558238685131073,
0.25672537088394165,
0.02043539099395275,
0.16805358231067657,
-0.19830188155174255,
-0.2152477204799652,
-0.3186818063259125,
0.2778994143009186,
-0.08395121991634369,
-0.24704842269420624,
-0.26872140169143677,
0.16159868240356445,
0.09003183245658875,
0.1296619176864624,
0.3090798258781433,
0.23170515894889832,
-0.13546448945999146,
0.3238053619861603,
0.4941314458847046,
0.09635697305202484,
0.3481450080871582,
0.11719238758087158,
-0.25409531593322754,
0.19917960464954376,
-0.329542338848114,
0.10008424520492554,
0.23069947957992554,
0.2667170763015747,
0.41272228956222534,
0.019659899175167084,
0.5573928952217102,
-0.046881020069122314,
-0.40876632928848267,
-0.07528887689113617,
0.15362980961799622,
0.036144375801086426,
-0.34182512760162354,
0.018754849210381508,
-0.4636554718017578,
0.06558933109045029,
-0.16983990371227264,
-0.12049917131662369,
-0.029996786266565323,
-0.3130081295967102,
0.035666339099407196,
0.19282810389995575,
-0.09160901606082916,
0.03996536135673523,
0.07521644234657288,
0.12123100459575653,
0.20411933958530426,
-0.4023754894733429,
-0.12842252850532532,
0.04548634588718414,
-0.11114112287759781,
-0.08695045113563538,
0.14855198562145233,
0.0594366081058979,
0.578824520111084,
0.046560630202293396,
0.3571295142173767,
-0.4438648521900177,
-0.39617204666137695,
-0.008652251213788986,
-0.1564997434616089,
0.5102636218070984,
0.05342720076441765,
0.0858859196305275,
-0.15048009157180786,
-0.01786135509610176,
0.27066224813461304,
0.1612408608198166,
-0.196022629737854,
-0.053977616131305695,
-0.3349566161632538,
-0.11958887428045273,
-0.10593210160732269,
-0.4208480417728424,
-0.20205368101596832,
-0.1728285253047943,
-0.16806189715862274,
0.07620866596698761,
0.14905370771884918,
-0.1344471126794815,
0.470297247171402,
0.0634448304772377,
0.058275073766708374,
-0.1791798323392868,
-0.19061949849128723,
0.05130976811051369,
0.44059517979621887,
-0.2319813072681427,
-0.28431373834609985,
0.1590358465909958,
-0.411127507686615,
0.13657397031784058,
0.22294262051582336,
-0.1711738258600235,
-0.46853694319725037,
-0.057504087686538696,
0.687105119228363,
-0.011130530387163162,
0.03307526558637619,
0.09858612716197968,
0.23442986607551575,
0.03012710250914097,
-0.13976335525512695,
-0.14541266858577728,
-0.06870564073324203,
0.1480417251586914,
0.3170398473739624,
0.17070791125297546,
0.11938933283090591,
0.09791015088558197,
0.3289845585823059,
-0.049989357590675354,
-0.18624529242515564,
0.5798661708831787,
-0.23626819252967834,
0.10992756485939026,
-0.22795984148979187,
-0.2760270833969116,
-0.07244972884654999,
-0.13116759061813354,
0.032665152102708817,
-0.38088780641555786,
-0.09797073155641556,
-0.21559672057628632,
0.07918701320886612,
-0.09163396060466766,
-0.4981008470058441,
-0.22872492671012878,
0.03829174116253853,
-0.06604298204183578,
0.10195354372262955,
0.06515464186668396,
-0.2552931010723114,
-0.28784340620040894,
-0.08728500455617905,
0.23949874937534332,
0.4106830358505249,
0.0709938108921051,
-0.05345907062292099,
-0.1372976154088974,
-0.3247085511684418,
-0.05205420404672623,
0.24500657618045807,
0.2231457531452179,
0.4645124077796936,
0.000749930739402771,
0.11857358366250992,
0.10298378020524979,
-0.1533435881137848,
0.7466636300086975,
-0.3805101215839386,
-0.16357561945915222,
0.01654765009880066,
-0.012672504410147667,
-0.2508600652217865,
-0.06471657752990723,
-0.152033731341362,
0.05772066116333008,
-0.21684576570987701,
0.6769233345985413,
-0.09038406610488892,
0.19510748982429504,
0.08311598002910614,
-0.0947086289525032,
-0.12015719711780548,
-0.011297713965177536,
-0.12373858690261841,
-0.25415998697280884,
-0.5499897599220276,
-0.0010422393679618835,
0.20829428732395172,
0.17434388399124146,
0.14736971259117126,
-0.27270203828811646,
-0.34743356704711914,
0.20651933550834656,
0.10400281846523285,
0.05967826768755913,
0.32444849610328674,
-0.06666556000709534,
0.15281756222248077,
-0.19766630232334137,
0.24782121181488037,
0.23830750584602356,
0.49176424741744995,
0.07061439752578735,
-0.21114858984947205,
-0.012515060603618622,
-0.04705164581537247,
0.16641752421855927,
0.4114053547382355,
-0.008786456659436226,
0.051171280443668365,
-0.23332422971725464,
-0.0013668462634086609,
-0.22212493419647217,
0.12396110594272614,
0.24122826755046844,
-0.07747195661067963,
0.22864660620689392,
0.012875264510512352,
0.6322838068008423,
-0.1757223904132843,
-0.08423610776662827,
0.3963606059551239,
0.5587889552116394,
-0.1132771223783493,
0.5487641096115112,
0.44643422961235046,
1.071997880935669,
0.15530449151992798,
-0.01482376828789711,
0.39919519424438477,
-0.44242018461227417,
0.11701866239309311,
0.34633690118789673,
0.09993235021829605,
-0.27746260166168213,
0.09729459136724472,
-0.10266420245170593,
-0.17452995479106903,
0.28513580560684204,
-0.10933099687099457,
-0.3484874665737152,
-0.06635058671236038,
0.021286480128765106,
-0.05759492143988609,
-0.09759852290153503,
-0.045555051416158676,
-0.6767331957817078,
-0.4418603479862213,
-0.018293898552656174,
0.11768440902233124,
0.12385004013776779,
0.1994028240442276,
-0.06778565049171448,
-0.20508763194084167,
-0.554867684841156,
-0.05903597176074982,
-0.11354102194309235,
0.026272140443325043,
-0.30328747630119324,
0.07597129046916962,
0.3000637888908386,
-0.07348043471574783,
0.03918464481830597,
-0.06292131543159485,
0.2314615398645401,
-0.3102700710296631,
-0.035055018961429596,
0.24222995340824127,
0.3024165630340576,
0.17823940515518188,
0.1229277104139328,
-0.26154854893684387,
0.5519786477088928,
-0.0800233781337738,
-0.34672150015830994,
-0.03751426190137863,
0.07409561425447464,
0.03834576904773712,
-0.01623213291168213,
0.058589011430740356,
-0.026257604360580444,
-0.12585754692554474,
-0.631842315196991,
0.13754454255104065,
-0.15279579162597656,
-0.14371120929718018,
0.019809043034911156,
0.0860062912106514,
-0.09383153915405273,
0.34575051069259644,
0.33454999327659607,
-0.19159573316574097,
0.25921645760536194,
0.13862164318561554,
-0.17658546566963196,
0.03533569723367691,
0.3535001277923584,
-0.16236288845539093,
-0.0453333854675293,
-0.047743745148181915,
0.5220341086387634,
0.12865659594535828,
-0.6518456935882568,
0.09440284222364426,
-0.2315531224012375,
-0.16980354487895966,
-0.14660662412643433,
0.23889543116092682,
-0.07468437403440475,
0.15148642659187317,
-0.2440847009420395,
-0.22533223032951355,
-0.15866661071777344,
0.19766908884048462,
-0.24062274396419525,
0.3592759668827057,
-0.3633817732334137,
0.01089264452457428,
0.058156877756118774,
-0.13560673594474792,
-0.19983164966106415,
0.30550283193588257,
0.047381170094013214,
0.36809056997299194,
-0.3627108931541443,
0.409219354391098,
0.019668664783239365,
-0.07871884107589722,
-0.03997227922081947,
0.492171049118042,
-0.186054989695549,
-0.004673775285482407,
-0.2908937335014343,
0.22323434054851532,
0.28403419256210327,
-0.06261884421110153,
-0.06233416870236397,
-0.17011670768260956,
-0.09975229203701019,
-0.0400015264749527,
0.11342029273509979,
0.016926512122154236,
-0.40880894660949707,
0.15478909015655518,
0.022860761731863022,
-0.11790380626916885,
0.32273054122924805,
0.1344907134771347,
0.29899436235427856,
0.4435412287712097,
-0.05731606110930443,
0.014949031174182892,
-0.1755865514278412,
0.13598528504371643,
-0.060461029410362244,
0.16199153661727905,
-0.0763746052980423,
0.01675635389983654,
0.3405113220214844,
-0.09910638630390167,
0.06436219811439514,
-0.0419476218521595,
0.08265420794487,
-0.008966334164142609,
-0.32290124893188477,
-0.034572385251522064,
-0.06081254035234451,
0.07372982800006866,
-0.28218942880630493,
0.04688107967376709,
0.00013880431652069092,
-0.1158287301659584,
0.12141413986682892,
0.14593268930912018,
0.1258472204208374,
0.36948320269584656,
-0.5744577050209045,
-0.005305481143295765,
0.20758841931819916,
-0.5379233360290527,
-0.12129531800746918,
0.2072809785604477,
-0.19686152040958405,
0.28290438652038574,
0.3111976385116577,
0.048229146748781204,
0.10559895634651184,
0.5824297666549683,
0.16119462251663208,
0.3096200227737427,
0.4570595920085907,
0.14797638356685638,
0.5442227125167847,
-0.02183079719543457,
0.13665622472763062,
0.166940376162529,
0.477413147687912,
0.28699275851249695,
0.3254292607307434,
0.09981023520231247,
-0.1408545821905136,
-0.360336035490036,
-0.006243448704481125,
-0.06039585545659065,
0.04078391194343567,
-0.009102602489292622,
-0.32005494832992554,
-0.030363287776708603,
-0.6077854633331299,
-0.07194606959819794,
-0.16647832095623016,
-0.33360809087753296,
0.2849019765853882,
0.431221067905426,
-0.08951888978481293,
-0.003735452890396118,
-0.11151183396577835,
0.14432883262634277,
0.21661531925201416,
-0.27720126509666443,
0.09453599900007248,
0.0699404925107956,
0.06707597523927689,
0.23943279683589935,
0.5406883358955383,
0.4444127082824707,
0.44529303908348083,
-0.15553458034992218,
0.1223425641655922,
0.08746758103370667,
-0.17391496896743774,
0.21820102632045746,
0.09252142906188965,
0.08335797488689423,
0.3247360289096832,
0.1861826479434967,
0.06012881547212601,
-0.008474910631775856,
0.03722549229860306,
0.06292573362588882,
0.1520126312971115,
-0.248397558927536,
0.38313060998916626,
-0.3682684898376465,
-0.17679095268249512,
-0.1414894312620163,
-0.18776851892471313,
-0.35050109028816223,
-0.23312586545944214,
0.47409525513648987,
-0.36618298292160034,
0.16595971584320068,
0.05204377323389053,
-0.011930531822144985,
-0.2354850172996521,
0.14712566137313843,
0.3846953511238098,
0.00721239298582077,
-0.09645306318998337,
-0.07918490469455719,
-0.8043724894523621,
0.00736333429813385,
0.15120817720890045,
-0.3091862201690674,
0.27578362822532654,
0.19343915581703186,
0.06478440761566162,
0.24713297188282013,
0.4562581777572632,
-0.43109288811683655,
0.44077497720718384,
0.4481121301651001,
-0.1897301822900772,
-0.12119856476783752,
0.381980299949646,
0.056252479553222656,
0.0034140050411224365,
-0.5269020795822144,
0.1599036157131195,
0.057178039103746414,
-0.01781206578016281,
0.029075177386403084,
-0.31621479988098145,
-0.057998377829790115,
-0.1463748812675476,
0.5894750356674194,
0.2832031548023224,
0.168018639087677,
-0.1775689721107483,
-0.028370972722768784,
-0.20323744416236877,
-0.32988104224205017,
-0.22047041356563568,
-0.032369449734687805,
-0.10811831057071686,
0.7636221647262573,
0.2153996080160141,
-0.025498922914266586,
-0.05302545428276062,
0.00013737566769123077,
-0.06884148716926575,
-0.1701374650001526,
-0.347491979598999,
0.3654519021511078,
-0.4327085018157959,
-0.10261550545692444,
-0.1453566551208496,
0.3157072961330414,
0.20157530903816223,
0.30410489439964294,
-0.2543795108795166,
-0.4874666929244995,
0.3934165835380554,
-0.14845019578933716,
-0.3906860649585724,
0.14024245738983154,
0.11748571693897247,
0.24486801028251648,
-0.03114093653857708,
-0.46860945224761963,
-0.22275859117507935,
0.12948182225227356,
0.04892076551914215,
-0.08955548703670502,
0.30088499188423157,
0.2993108332157135,
0.10704310238361359,
-0.17235645651817322,
0.42372772097587585,
-0.11566314846277237,
0.2150883823633194,
-0.04034298285841942,
-0.14244243502616882
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | > > Any update on this? I'm still facing this issure. Any workaround?
>
> I was able to resolve my issue with a quick workaround:
>
> ```
> from collections import defaultdict
> from datasets import Dataset
>
> data = defaultdict(list)
> for idx in tqdm(range( len(dataloader)),desc="Captioning..."):
> img = dataloader[idx]
> data['image'].append(img)
> data['text'].append(f"{img_{idx}})
>
> dataset = Dataset.from_dict(data)
> dataset = dataset.filter(lambda example: example['image'] is not None)
> dataset = dataset.filter(lambda example: example['text'] is not None)
>
> dataset.push_to_hub(path-to-repo', private=False)
> ```
>
> Hope it helps! Happy coding
It works!! | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 96 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
> > Any update on this? I'm still facing this issure. Any workaround?
>
> I was able to resolve my issue with a quick workaround:
>
> ```
> from collections import defaultdict
> from datasets import Dataset
>
> data = defaultdict(list)
> for idx in tqdm(range( len(dataloader)),desc="Captioning..."):
> img = dataloader[idx]
> data['image'].append(img)
> data['text'].append(f"{img_{idx}})
>
> dataset = Dataset.from_dict(data)
> dataset = dataset.filter(lambda example: example['image'] is not None)
> dataset = dataset.filter(lambda example: example['text'] is not None)
>
> dataset.push_to_hub(path-to-repo', private=False)
> ```
>
> Hope it helps! Happy coding
It works!! | [
-0.20946869254112244,
-0.38411784172058105,
-0.006247101351618767,
0.20440155267715454,
0.028693852946162224,
0.0638066753745079,
0.25298359990119934,
0.3120417594909668,
-0.2905447781085968,
0.0909748375415802,
0.13077376782894135,
0.7444420456886292,
-0.06099429726600647,
-0.12389092147350311,
-0.13432711362838745,
-0.029492750763893127,
0.06420332938432693,
0.09275497496128082,
-0.16446852684020996,
-0.08682072162628174,
-0.3387908637523651,
0.17894640564918518,
-0.05256909877061844,
-0.04873749613761902,
-0.6546952128410339,
-0.19452528655529022,
-0.07232370227575302,
0.04557560756802559,
-0.24945662915706635,
-0.28589504957199097,
0.19456841051578522,
-0.14557164907455444,
-0.0476665273308754,
0.0044518932700157166,
-0.0001277694827876985,
-0.031184077262878418,
0.40087318420410156,
0.04306487739086151,
0.016674213111400604,
-0.31775379180908203,
-0.1458793580532074,
-0.2476312816143036,
0.08689691871404648,
-0.12919241189956665,
0.17615514993667603,
-0.11363281309604645,
0.02478688955307007,
0.298069566488266,
0.002924889326095581,
0.2158254235982895,
0.09400580823421478,
0.36217203736305237,
0.18883439898490906,
0.057910989969968796,
0.5105946660041809,
0.2515028715133667,
-0.27482497692108154,
0.18286758661270142,
0.2874021530151367,
0.06565549969673157,
0.11875936388969421,
0.5349147319793701,
0.21788693964481354,
0.213467538356781,
0.31019097566604614,
0.1372697949409485,
-0.06341847032308578,
-0.4488098919391632,
-0.13811832666397095,
-0.1349010169506073,
0.05092698335647583,
-0.0943680927157402,
-0.4479618966579437,
-0.07492426037788391,
0.12760432064533234,
-0.1318100094795227,
0.28665435314178467,
0.0993458479642868,
-0.15115760266780853,
-0.0515829361975193,
0.12996874749660492,
-0.2764671742916107,
-0.2506641745567322,
0.16366803646087646,
-0.12201321870088577,
-0.045415714383125305,
0.08926302939653397,
0.1906816065311432,
-0.06621792912483215,
-0.16733711957931519,
0.34194496273994446,
0.05040803551673889,
0.012820988893508911,
-0.09873749315738678,
-0.009722139686346054,
0.03988692909479141,
-0.07871212810277939,
0.0349857360124588,
0.21510258316993713,
-0.036934830248355865,
-0.180619016289711,
0.11763325333595276,
-0.5244617462158203,
0.3322693705558777,
0.08663241565227509,
-0.004821759648621082,
-0.22609445452690125,
0.13595318794250488,
0.010805167257785797,
-0.07563872635364532,
-0.08487942814826965,
0.05095149576663971,
-0.1326843649148941,
-0.3815860450267792,
0.35741278529167175,
-0.007224997505545616,
0.5612360835075378,
-0.12073314189910889,
-0.30406489968299866,
-0.02498745545744896,
-0.10178986191749573,
0.23150542378425598,
-0.1808733493089676,
0.2890388071537018,
0.25233379006385803,
0.13232633471488953,
0.2815781235694885,
0.41687262058258057,
-0.17804867029190063,
-0.059622734785079956,
0.04096858948469162,
0.16512775421142578,
-0.19670164585113525,
-0.19103479385375977,
-0.07937049865722656,
-0.204489067196846,
-0.05462004244327545,
0.006261010654270649,
0.408885657787323,
-0.08042623102664948,
0.030043086037039757,
-0.20525173842906952,
0.5355639457702637,
0.12396484613418579,
-0.29804614186286926,
0.03324560075998306,
0.08081801235675812,
0.013705797493457794,
-0.14396414160728455,
0.3642579913139343,
-0.545279324054718,
-0.10023631155490875,
-0.4097675681114197,
0.00018395017832517624,
0.07566478103399277,
-0.21045592427253723,
-0.37032991647720337,
0.10870437324047089,
-0.08189357072114944,
-0.05975983291864395,
0.09740105271339417,
-0.41245347261428833,
-0.15509046614170074,
-0.0882173553109169,
-0.13407206535339355,
0.2571628987789154,
-0.19035056233406067,
0.0182792991399765,
-0.1072506383061409,
-0.05820382013916969,
-0.11041589826345444,
0.018380098044872284,
-0.07729937881231308,
0.17967835068702698,
-0.38858893513679504,
-0.00536375492811203,
0.17197509109973907,
-0.47748062014579773,
-0.5465872883796692,
-0.018021073192358017,
0.02811964601278305,
0.04593009501695633,
-0.2578045129776001,
0.3814229369163513,
0.16232913732528687,
-0.008893970400094986,
0.1394825279712677,
0.3077453374862671,
-0.05147988349199295,
0.16511189937591553,
-0.17013804614543915,
-0.45425140857696533,
0.11774984002113342,
0.16490010917186737,
0.29124367237091064,
0.16567197442054749,
0.22817260026931763,
-0.1819170117378235,
-0.07332300394773483,
0.04731767624616623,
0.33133894205093384,
-0.04987993836402893,
0.47330522537231445,
-0.1177511066198349,
0.07968872040510178,
-0.16501682996749878,
-0.15883612632751465,
0.02921031415462494,
0.07937666773796082,
0.2759784162044525,
-0.5109168887138367,
-0.06193173676729202,
-0.37612539529800415,
0.2165088653564453,
-0.36337780952453613,
0.0880471020936966,
0.05247555673122406,
0.028513170778751373,
-0.41969621181488037,
-0.16258582472801208,
-0.20217299461364746,
0.44704779982566833,
0.21549101173877716,
0.26514139771461487,
-0.09496650099754333,
0.25774604082107544,
-0.002107430249452591,
-0.3461644649505615,
0.013738732784986496,
0.04196487367153168,
0.147822767496109,
0.002801737515255809,
-0.4074106812477112,
0.28477197885513306,
0.09640618413686752,
0.36419546604156494,
0.14165106415748596,
-0.30409741401672363,
0.3163471221923828,
-0.6068122982978821,
-0.10271123796701431,
-0.03021608665585518,
0.3810177147388458,
0.147388756275177,
0.049073562026023865,
0.310172438621521,
-0.02333192154765129,
0.1759258359670639,
-0.2374018430709839,
0.24802914261817932,
-0.013856176286935806,
0.15382789075374603,
-0.17189453542232513,
-0.23082563281059265,
-0.33376818895339966,
0.2723582684993744,
-0.06111782789230347,
-0.24390973150730133,
-0.25136882066726685,
0.16253110766410828,
0.12719960510730743,
0.14669308066368103,
0.2916586995124817,
0.23590099811553955,
-0.13529840111732483,
0.31517431139945984,
0.49406081438064575,
0.10390891134738922,
0.33148515224456787,
0.11797051131725311,
-0.2548392117023468,
0.2248426228761673,
-0.31267768144607544,
0.12221096456050873,
0.2188747227191925,
0.25211676955223083,
0.42548635601997375,
0.025352008640766144,
0.5175906419754028,
-0.041066113859415054,
-0.37950053811073303,
-0.09275748580694199,
0.15139074623584747,
0.04251044988632202,
-0.3430229127407074,
-0.009886105544865131,
-0.4614498019218445,
0.08052962273359299,
-0.17777583003044128,
-0.16978026926517487,
-0.05154310539364815,
-0.28736183047294617,
0.03599780797958374,
0.1664988398551941,
-0.09198988974094391,
0.04236498475074768,
0.07798007130622864,
0.09710191935300827,
0.17811505496501923,
-0.3871404230594635,
-0.11216841638088226,
0.027629772201180458,
-0.09643664211034775,
-0.07744748890399933,
0.1390742063522339,
0.07255709916353226,
0.5710325241088867,
0.01783202402293682,
0.3520525097846985,
-0.4009082019329071,
-0.33256396651268005,
-0.0013758055865764618,
-0.17054492235183716,
0.4595556855201721,
0.054900966584682465,
0.0940462052822113,
-0.15695953369140625,
-0.01399482972919941,
0.27367597818374634,
0.15230676531791687,
-0.19491267204284668,
-0.05891704186797142,
-0.3329782485961914,
-0.11188643425703049,
-0.11864414811134338,
-0.4204069674015045,
-0.1853901594877243,
-0.15905945003032684,
-0.12795884907245636,
0.07866616547107697,
0.15323583781719208,
-0.10919800400733948,
0.4937880039215088,
0.0854695662856102,
0.03842334449291229,
-0.1713896542787552,
-0.18564189970493317,
0.026329752057790756,
0.4255862534046173,
-0.22677119076251984,
-0.2883647382259369,
0.1765226572751999,
-0.3877800703048706,
0.14888320863246918,
0.20489169657230377,
-0.1853412687778473,
-0.48730629682540894,
-0.055279530584812164,
0.708126962184906,
-0.041857026517391205,
0.03989877179265022,
0.1060892716050148,
0.25154244899749756,
0.022268975153565407,
-0.1374199390411377,
-0.16098247468471527,
-0.04502797871828079,
0.13730785250663757,
0.2934332489967346,
0.1501651406288147,
0.08883927762508392,
0.08316855132579803,
0.31555354595184326,
-0.05781161040067673,
-0.16989336907863617,
0.5728229284286499,
-0.2374139428138733,
0.14490291476249695,
-0.23478910326957703,
-0.25900527834892273,
-0.06507641077041626,
-0.12224271893501282,
0.030210167169570923,
-0.38436800241470337,
-0.11756078153848648,
-0.1516067385673523,
0.0718216747045517,
-0.09224030375480652,
-0.47978830337524414,
-0.22277326881885529,
0.03351915627717972,
-0.0788506418466568,
0.08992156386375427,
0.06202196702361107,
-0.2563316822052002,
-0.2899017035961151,
-0.08395706862211227,
0.2661970257759094,
0.3931194543838501,
0.05901867151260376,
-0.05352724716067314,
-0.1494702398777008,
-0.34305188059806824,
-0.03950737416744232,
0.20889662206172943,
0.209612175822258,
0.4926440715789795,
0.014312613755464554,
0.10870050638914108,
0.09088604152202606,
-0.153468519449234,
0.7452799677848816,
-0.34667709469795227,
-0.14834779500961304,
0.015176065266132355,
0.010752562433481216,
-0.2657337188720703,
-0.07179099321365356,
-0.13967324793338776,
0.01979171857237816,
-0.24716533720493317,
0.6782861351966858,
-0.09572725743055344,
0.19210468232631683,
0.12494707852602005,
-0.08260617405176163,
-0.10534267872571945,
-0.03941130265593529,
-0.13892754912376404,
-0.23513680696487427,
-0.546355664730072,
-0.034665800631046295,
0.20576485991477966,
0.18159465491771698,
0.14556071162223816,
-0.2614917457103729,
-0.32020971179008484,
0.20236611366271973,
0.09031731635332108,
0.0526113323867321,
0.3232062757015228,
-0.09365096688270569,
0.15927422046661377,
-0.1656729131937027,
0.22228175401687622,
0.25315481424331665,
0.5058786273002625,
0.05785280838608742,
-0.20043650269508362,
-0.029566127806901932,
-0.05012839287519455,
0.15866051614284515,
0.38325467705726624,
-0.014976320788264275,
0.06525776535272598,
-0.24866291880607605,
-0.010688044130802155,
-0.24524453282356262,
0.12455621361732483,
0.2346191704273224,
-0.07963542640209198,
0.2214382141828537,
0.017310721799731255,
0.6108629703521729,
-0.18101859092712402,
-0.06628838181495667,
0.36060574650764465,
0.5639309883117676,
-0.10157918184995651,
0.5455939769744873,
0.4326489567756653,
1.0624005794525146,
0.14076247811317444,
-0.008326832205057144,
0.3851369023323059,
-0.4540749788284302,
0.13073766231536865,
0.3531179428100586,
0.09009964019060135,
-0.29843229055404663,
0.1022813469171524,
-0.09259914606809616,
-0.18139158189296722,
0.2706049084663391,
-0.12048354744911194,
-0.34229782223701477,
-0.07022728770971298,
0.03877944499254227,
-0.03224902227520943,
-0.13922305405139923,
-0.04946887493133545,
-0.6795682311058044,
-0.45094263553619385,
0.03238260746002197,
0.12364400923252106,
0.10275845229625702,
0.196549192070961,
-0.08541996031999588,
-0.20116402208805084,
-0.5575419068336487,
-0.04772087559103966,
-0.11391476541757584,
0.04487798362970352,
-0.31692931056022644,
0.06812255084514618,
0.3048821985721588,
-0.073609858751297,
0.029255125671625137,
-0.06528548896312714,
0.22781309485435486,
-0.30980831384658813,
-0.04633414000272751,
0.2373698353767395,
0.24227002263069153,
0.15956006944179535,
0.12101850658655167,
-0.2572484314441681,
0.5318743586540222,
-0.07718897610902786,
-0.3654157817363739,
-0.06925191730260849,
0.07624728232622147,
0.07229255884885788,
0.024477437138557434,
0.07428036630153656,
-0.022208772599697113,
-0.09778892248868942,
-0.6462514400482178,
0.15753056108951569,
-0.14724406599998474,
-0.14935670793056488,
0.028802484273910522,
0.08678615093231201,
-0.08301397413015366,
0.3485736548900604,
0.3287770748138428,
-0.2064189314842224,
0.2682814300060272,
0.13880586624145508,
-0.19341883063316345,
0.03948367387056351,
0.3632093071937561,
-0.16775672137737274,
-0.05100751668214798,
-0.0486842542886734,
0.5357999801635742,
0.15380971133708954,
-0.6822664737701416,
0.05349269136786461,
-0.20538192987442017,
-0.1405268758535385,
-0.1560433804988861,
0.1860254555940628,
-0.043799132108688354,
0.15872246026992798,
-0.22786922752857208,
-0.21227796375751495,
-0.19342422485351562,
0.19752824306488037,
-0.24692220985889435,
0.3542737662792206,
-0.37597042322158813,
0.016771255061030388,
0.059290312230587006,
-0.13264991343021393,
-0.20484811067581177,
0.32151666283607483,
0.029757821932435036,
0.3600907623767853,
-0.3712046146392822,
0.3737773895263672,
0.018048163503408432,
-0.1067562997341156,
-0.029489168897271156,
0.4888823628425598,
-0.18391954898834229,
-0.010909147560596466,
-0.3210381865501404,
0.22028109431266785,
0.28949055075645447,
-0.057305820286273956,
-0.07997183501720428,
-0.18443746864795685,
-0.09452313184738159,
-0.04308786615729332,
0.1009451150894165,
0.02425064891576767,
-0.4220229983329773,
0.19844681024551392,
0.024033591151237488,
-0.11098451167345047,
0.28797948360443115,
0.14320744574069977,
0.3245464563369751,
0.4701310396194458,
-0.06541857868432999,
0.02362602762877941,
-0.18639838695526123,
0.14996616542339325,
-0.07500781118869781,
0.17296163737773895,
-0.07283748686313629,
0.004400040954351425,
0.323490172624588,
-0.0841006338596344,
0.06823837757110596,
-0.06462495028972626,
0.10263549536466599,
-0.011561229825019836,
-0.32734933495521545,
-0.03550248220562935,
-0.03915410488843918,
0.0840524286031723,
-0.2762223482131958,
0.06046319752931595,
-0.008130855858325958,
-0.1226854994893074,
0.11207874119281769,
0.1397881656885147,
0.13810138404369354,
0.354515016078949,
-0.5781981348991394,
0.0017474591732025146,
0.17822343111038208,
-0.5362683534622192,
-0.11115056276321411,
0.21287064254283905,
-0.21257762610912323,
0.2628922462463379,
0.32476893067359924,
0.05492837727069855,
0.12445225566625595,
0.5808382630348206,
0.15717041492462158,
0.33248427510261536,
0.5010648965835571,
0.14422795176506042,
0.5566642880439758,
-0.03534223511815071,
0.15883955359458923,
0.19278153777122498,
0.4932481646537781,
0.25168851017951965,
0.3115813136100769,
0.14669880270957947,
-0.1611478179693222,
-0.34049779176712036,
0.02236093394458294,
-0.0811430960893631,
0.03552151843905449,
0.010404186323285103,
-0.2659514248371124,
-0.033125266432762146,
-0.6310292482376099,
-0.06006689369678497,
-0.17860430479049683,
-0.3465263843536377,
0.29177016019821167,
0.44796961545944214,
-0.12144683301448822,
0.0010145632550120354,
-0.12468820065259933,
0.17537996172904968,
0.20931664109230042,
-0.2923043966293335,
0.07434222847223282,
0.0884556770324707,
0.05829761177301407,
0.22484232485294342,
0.581682026386261,
0.43209409713745117,
0.43193280696868896,
-0.15204861760139465,
0.12155193090438843,
0.10112251341342926,
-0.15107105672359467,
0.23133280873298645,
0.09854092448949814,
0.07212671637535095,
0.29907339811325073,
0.18792535364627838,
0.06296981871128082,
-0.012892995029687881,
0.018329259008169174,
0.0640280693769455,
0.15277761220932007,
-0.2429995983839035,
0.35953009128570557,
-0.3836556673049927,
-0.21045932173728943,
-0.15103040635585785,
-0.13985800743103027,
-0.3541988134384155,
-0.23649568855762482,
0.4879430830478668,
-0.35042425990104675,
0.14721697568893433,
0.023198947310447693,
-0.007950501516461372,
-0.24120676517486572,
0.18704459071159363,
0.4075816571712494,
-0.006365589797496796,
-0.092252217233181,
-0.09031404554843903,
-0.7988543510437012,
0.025051750242710114,
0.14567692577838898,
-0.29021498560905457,
0.28298622369766235,
0.17690402269363403,
0.02052900195121765,
0.2272660881280899,
0.49012356996536255,
-0.39844268560409546,
0.44840502738952637,
0.456527978181839,
-0.18909147381782532,
-0.10071603953838348,
0.3953137993812561,
0.040301211178302765,
0.009678825736045837,
-0.5189697742462158,
0.16673527657985687,
0.06928874552249908,
-0.02363506518304348,
0.017312778159976006,
-0.3023284077644348,
-0.06946149468421936,
-0.15865245461463928,
0.6160865426063538,
0.2757769823074341,
0.15779584646224976,
-0.15618690848350525,
-0.04199128970503807,
-0.21880918741226196,
-0.3296964168548584,
-0.19663426280021667,
-0.03781036287546158,
-0.0955747663974762,
0.7285970449447632,
0.23034723103046417,
-0.04134371504187584,
-0.04880686476826668,
-0.014123992063105106,
-0.0922292172908783,
-0.13916166126728058,
-0.34401753544807434,
0.3551534414291382,
-0.42404642701148987,
-0.11458178609609604,
-0.13454687595367432,
0.3080027401447296,
0.21614712476730347,
0.29170340299606323,
-0.27089327573776245,
-0.46932369470596313,
0.3628215789794922,
-0.08636631071567535,
-0.3945668041706085,
0.15610024333000183,
0.15099993348121643,
0.22667241096496582,
-0.058757565915584564,
-0.5138063430786133,
-0.19567367434501648,
0.12897968292236328,
0.07718650996685028,
-0.09055159986019135,
0.3016698658466339,
0.2662110924720764,
0.1390434354543686,
-0.15491332113742828,
0.47080349922180176,
-0.12232699245214462,
0.21650704741477966,
-0.01970563270151615,
-0.13137474656105042
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | I had a similar issue to @NielsRogge where I was unable to create a dataset from a Pandas DataFrame containing PIL.Images.
I found another workaround that works in this case which involves converting the DataFrame to a python dictionary, and then creating a dataset from said python dictionary.
This is a generic example of my workaround. The example assumes that you have your data in a Pandas DataFrame variable called "dataframe" plus a dictionary of your data's features in a variable called "features".
```
import datasets
dictionary = dataframe.to_dict(orient='list')
dataset = datasets.Dataset.from_dict(dictionary, features=features)
``` | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 94 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
I had a similar issue to @NielsRogge where I was unable to create a dataset from a Pandas DataFrame containing PIL.Images.
I found another workaround that works in this case which involves converting the DataFrame to a python dictionary, and then creating a dataset from said python dictionary.
This is a generic example of my workaround. The example assumes that you have your data in a Pandas DataFrame variable called "dataframe" plus a dictionary of your data's features in a variable called "features".
```
import datasets
dictionary = dataframe.to_dict(orient='list')
dataset = datasets.Dataset.from_dict(dictionary, features=features)
``` | [
-0.253017783164978,
-0.33836400508880615,
-0.015728265047073364,
0.2290961593389511,
0.028430582955479622,
0.13585340976715088,
0.26774609088897705,
0.35649606585502625,
-0.15451519191265106,
0.052685461938381195,
0.02554387040436268,
0.6401681303977966,
0.008616359904408455,
-0.07677444815635681,
-0.1265369951725006,
-0.04904283583164215,
0.047113873064517975,
0.21762055158615112,
-0.09068714082241058,
-0.09527846425771713,
-0.34294235706329346,
0.06686069071292877,
0.11260192096233368,
0.055113792419433594,
-0.6672213077545166,
-0.22427457571029663,
-0.24596244096755981,
0.08274063467979431,
-0.27966901659965515,
-0.2100995033979416,
0.2841721177101135,
-0.17441561818122864,
0.00022132322192192078,
0.07357889413833618,
-0.00011666636419249699,
-0.04183778166770935,
0.35557544231414795,
0.013160867616534233,
0.023230750113725662,
-0.37805551290512085,
-0.1714036762714386,
-0.2167317271232605,
0.0928993970155716,
-0.1402883678674698,
0.13467064499855042,
-0.25830015540122986,
0.05174720287322998,
0.35735729336738586,
0.07536628842353821,
0.3161887228488922,
0.1909966617822647,
0.3316222131252289,
0.19510449469089508,
-0.06146414950489998,
0.39126336574554443,
0.29308927059173584,
-0.3199586272239685,
0.10748061537742615,
0.0933452695608139,
-0.030605114996433258,
0.0855616107583046,
0.30883005261421204,
0.2541711926460266,
0.3098905384540558,
0.33388498425483704,
0.10042271018028259,
-0.10732180625200272,
-0.4246765375137329,
-0.10662095993757248,
0.07459057867527008,
-0.0394221767783165,
-0.15677088499069214,
-0.46504464745521545,
-0.16982465982437134,
0.1398266851902008,
-0.04244761914014816,
0.2335343062877655,
0.23200255632400513,
-0.12280866503715515,
-0.10646010935306549,
0.30735912919044495,
-0.23633277416229248,
-0.2515772581100464,
0.17491252720355988,
-0.030406268313527107,
-0.017445936799049377,
0.09522691369056702,
0.16041535139083862,
-0.003905758261680603,
-0.13512270152568817,
0.3335941731929779,
-0.024665340781211853,
-0.021236654371023178,
-0.09104245901107788,
-0.015957791358232498,
0.13012006878852844,
-0.031204089522361755,
0.05347348004579544,
0.2068099081516266,
-0.10962940752506256,
-0.15780489146709442,
0.03949012979865074,
-0.48655983805656433,
0.364554226398468,
0.08623310923576355,
-0.039769191294908524,
-0.3226717710494995,
0.20087985694408417,
0.011401955038309097,
-0.07374051958322525,
-0.03141019493341446,
-0.04109470546245575,
-0.1201271042227745,
-0.3732459247112274,
0.16012221574783325,
-0.09005586802959442,
0.4479539394378662,
-0.0713006779551506,
-0.3031952679157257,
-0.016869932413101196,
-0.12197539210319519,
0.18460291624069214,
-0.19433632493019104,
0.3584705591201782,
0.19989274442195892,
0.12604078650474548,
0.31009817123413086,
0.45227473974227905,
-0.1601351946592331,
0.22095490992069244,
-0.07218203693628311,
0.3354400098323822,
-0.2182285487651825,
-0.15424209833145142,
-0.06940598040819168,
-0.2826796770095825,
0.053398095071315765,
0.0089500667527318,
0.36561673879623413,
0.003176867961883545,
0.10184678435325623,
-0.2468043863773346,
0.43490543961524963,
0.20667409896850586,
-0.16099491715431213,
-0.03047918528318405,
0.14492325484752655,
0.027227021753787994,
-0.14584438502788544,
0.2274433970451355,
-0.3138021230697632,
-0.11775293201208115,
-0.45323053002357483,
0.08341652154922485,
-0.05205029994249344,
-0.10110384225845337,
-0.40122780203819275,
0.09840808808803558,
-0.15865695476531982,
0.05468394234776497,
0.10727313160896301,
-0.3090003728866577,
-0.09720247983932495,
-0.1177896112203598,
-0.13378648459911346,
0.2756270170211792,
-0.2311592549085617,
0.0916537195444107,
-0.04654024913907051,
-0.11670199036598206,
-0.17246708273887634,
0.03827092796564102,
-0.10209187865257263,
0.10264557600021362,
-0.3079032599925995,
0.0410715788602829,
0.012766547501087189,
-0.3352373242378235,
-0.4526731073856354,
-0.03180063143372536,
0.07809402048587799,
0.00536932609975338,
-0.12526318430900574,
0.3387662172317505,
0.0845324918627739,
-0.010508948005735874,
0.02458181604743004,
0.33246880769729614,
-0.022132935002446175,
0.16378562152385712,
-0.09728872030973434,
-0.4768206775188446,
0.04986086115241051,
0.232160285115242,
0.27199438214302063,
0.1882898509502411,
0.1652655005455017,
-0.10111106187105179,
-0.06204112619161606,
-0.09329414367675781,
0.3448607325553894,
-0.018110115081071854,
0.4932209849357605,
0.0026293396949768066,
0.07835029810667038,
-0.12411273270845413,
-0.07020523399114609,
0.029237478971481323,
0.04918798804283142,
0.355129212141037,
-0.4298012852668762,
-0.10624784231185913,
-0.3239690363407135,
0.14110228419303894,
-0.3001992404460907,
-0.029034029692411423,
0.14793755114078522,
0.08349797129631042,
-0.302927702665329,
-0.1835046112537384,
-0.19408711791038513,
0.5687052607536316,
0.10301589965820312,
0.22650639712810516,
-0.18582704663276672,
0.3592510223388672,
-0.0658302828669548,
-0.2617761492729187,
0.12999854981899261,
0.03627988323569298,
0.07839804142713547,
0.025669997557997704,
-0.3629877269268036,
0.29117491841316223,
0.061046406626701355,
0.3279355764389038,
0.20582693815231323,
-0.22355712950229645,
0.26876845955848694,
-0.47587141394615173,
-0.09117814153432846,
-0.04357724264264107,
0.36950767040252686,
0.2050660252571106,
-0.05605420470237732,
0.37184852361679077,
-0.031195681542158127,
0.1310693919658661,
-0.1111423522233963,
0.19629716873168945,
0.12313427031040192,
0.16188761591911316,
-0.16513782739639282,
-0.20599624514579773,
-0.28463444113731384,
0.3099583387374878,
0.01903967559337616,
-0.17282478511333466,
-0.26286089420318604,
0.005525648593902588,
0.09978365898132324,
0.1571645736694336,
0.2971954941749573,
0.23413220047950745,
-0.1465853750705719,
0.20973750948905945,
0.5462119579315186,
0.15898342430591583,
0.2877016067504883,
0.16336677968502045,
-0.31078892946243286,
0.21291738748550415,
-0.4913078248500824,
0.07463546097278595,
0.17044639587402344,
0.1905403435230255,
0.503303050994873,
-0.06328100711107254,
0.3870260417461395,
-0.08841188251972198,
-0.4737599790096283,
-0.1992087960243225,
0.070552758872509,
0.1534142941236496,
-0.22567163407802582,
-0.056354768574237823,
-0.294326514005661,
0.04071057587862015,
-0.06154008209705353,
-0.1726532280445099,
-0.03686712309718132,
-0.27661073207855225,
0.015615440905094147,
0.23925602436065674,
-0.0721583440899849,
0.003504311665892601,
-0.01643257588148117,
0.0542028546333313,
0.12535360455513,
-0.24888403713703156,
-0.17406734824180603,
-0.08604991436004639,
-0.075286366045475,
0.037460315972566605,
0.034540724009275436,
0.19635850191116333,
0.5927093625068665,
0.11442870646715164,
0.3510740399360657,
-0.38415899872779846,
-0.21681895852088928,
0.011551875621080399,
-0.2750781774520874,
0.40983331203460693,
0.11954429000616074,
0.18477681279182434,
-0.15714195370674133,
-0.06154227256774902,
0.26814237236976624,
0.07392806559801102,
-0.15697592496871948,
-0.09559468179941177,
-0.3395707309246063,
-0.14478258788585663,
-0.09787330031394958,
-0.407937228679657,
-0.16434888541698456,
-0.22650837898254395,
0.025128908455371857,
0.17341063916683197,
0.09136810898780823,
-0.04868319630622864,
0.6380091905593872,
0.1099364161491394,
0.1777239292860031,
-0.15741977095603943,
-0.27413782477378845,
0.0495455376803875,
0.3627678453922272,
-0.2884942293167114,
-0.3340747058391571,
0.15917056798934937,
-0.4145878553390503,
0.09544837474822998,
0.14827236533164978,
-0.24508751928806305,
-0.6155510544776917,
-0.172276109457016,
0.5910336375236511,
0.016735555604100227,
0.09722261130809784,
0.10899003595113754,
0.21402820944786072,
-0.07467097789049149,
-0.23534080386161804,
-0.14074616134166718,
0.03620000183582306,
0.1543431282043457,
0.24407151341438293,
0.09999305754899979,
0.13352270424365997,
0.056657832115888596,
0.15067163109779358,
-0.08389745652675629,
-0.23977239429950714,
0.6252923011779785,
-0.27604350447654724,
0.2782796025276184,
-0.3044135868549347,
-0.21639226377010345,
-0.006696231663227081,
-0.12154614925384521,
0.05228244513273239,
-0.2985360622406006,
-0.11544988304376602,
-0.24638308584690094,
0.014547672122716904,
-0.07567767798900604,
-0.4774087965488434,
-0.16301563382148743,
0.053067274391651154,
-0.011729378253221512,
0.010118827223777771,
0.077985480427742,
-0.21835929155349731,
-0.36434704065322876,
-0.07834724336862564,
0.15022751688957214,
0.25362375378608704,
0.12918251752853394,
-0.08071557432413101,
-0.027443593367934227,
-0.3262835443019867,
-0.1992986500263214,
0.15604224801063538,
0.14481770992279053,
0.43157216906547546,
0.080904021859169,
0.13023969531059265,
0.05062839016318321,
-0.20015369355678558,
0.7479956746101379,
-0.4194900393486023,
-0.2222696989774704,
0.08277586102485657,
-0.0771903321146965,
-0.424556702375412,
0.028819065541028976,
-0.1978188455104828,
0.026579365134239197,
-0.2866363227367401,
0.577112078666687,
-0.1736692488193512,
0.14636185765266418,
0.041447024792432785,
-0.05414370447397232,
-0.06257104873657227,
0.013213553465902805,
-0.15058587491512299,
-0.31260520219802856,
-0.605463445186615,
-0.07252078503370285,
0.2008839249610901,
0.14417430758476257,
0.14837251603603363,
-0.20645707845687866,
-0.33871981501579285,
0.16003677248954773,
0.07121284306049347,
0.14808139204978943,
0.3015889525413513,
-0.008344613015651703,
0.0897664874792099,
-0.09391611814498901,
0.29527682065963745,
0.3753235638141632,
0.5118167400360107,
-0.017565634101629257,
-0.2092151641845703,
0.029164116829633713,
-0.12510187923908234,
0.033148422837257385,
0.3410801589488983,
-0.021359343081712723,
0.04616481810808182,
-0.26905304193496704,
-0.0003131181001663208,
-0.3232628107070923,
0.20636184513568878,
0.2523128390312195,
-0.10880231857299805,
0.22442257404327393,
-0.1655372530221939,
0.5694608688354492,
-0.10891920328140259,
-0.020047999918460846,
0.3236352205276489,
0.5568826794624329,
-0.13720977306365967,
0.6752062439918518,
0.4737532138824463,
0.8724850416183472,
0.03338600695133209,
0.05638296902179718,
0.42299413681030273,
-0.46918582916259766,
0.28538820147514343,
0.375842809677124,
0.0423809289932251,
-0.32796710729599,
-0.023160528391599655,
-0.06268373876810074,
-0.13085344433784485,
0.2394970953464508,
-0.11091141402721405,
-0.1890697181224823,
-0.12968674302101135,
0.09407266974449158,
-0.048635032027959824,
-0.12592598795890808,
0.11404022574424744,
-0.6247862577438354,
-0.4633498191833496,
-0.12255820631980896,
0.25439736247062683,
0.0962306410074234,
0.11382061243057251,
-0.042756520211696625,
-0.08113889396190643,
-0.6160120368003845,
-0.0007231235504150391,
-0.14938120543956757,
0.10581380873918533,
-0.20463165640830994,
0.12989002466201782,
0.0938132256269455,
-0.018535196781158447,
-0.09912285208702087,
-0.05236485227942467,
0.30030474066734314,
-0.2954084873199463,
-0.10278433561325073,
0.29136157035827637,
0.11021158844232559,
-0.005094136111438274,
0.005237259436398745,
-0.242625892162323,
0.5322682857513428,
-0.06789065152406693,
-0.36430567502975464,
-0.0408724769949913,
0.0668783038854599,
0.01781930774450302,
0.043659403920173645,
0.00018209218978881836,
-0.14144225418567657,
-0.08424629271030426,
-0.628834068775177,
0.05179914832115173,
-0.26495790481567383,
-0.21808001399040222,
0.13009609282016754,
0.060006022453308105,
-0.06544133275747299,
0.25491955876350403,
0.3472616970539093,
-0.16856957972049713,
0.1180318295955658,
0.14425018429756165,
-0.12690874934196472,
0.13148675858974457,
0.29539963603019714,
-0.07671797275543213,
-0.09169216454029083,
-0.10656516999006271,
0.4376835823059082,
0.29948243498802185,
-0.6049328446388245,
0.03976783901453018,
-0.07338876277208328,
-0.26552537083625793,
-0.12494997680187225,
0.12068137526512146,
0.021388722583651543,
0.2138366997241974,
-0.09349652379751205,
-0.2382490336894989,
-0.26867949962615967,
0.16352596879005432,
-0.2004929929971695,
0.4938213527202606,
-0.3115333914756775,
0.054145682603120804,
0.10897259414196014,
-0.06846383213996887,
-0.2985075116157532,
0.2528758943080902,
-0.08165878802537918,
0.31513512134552,
-0.37243974208831787,
0.300552636384964,
0.10783153027296066,
-0.15067429840564728,
0.062075480818748474,
0.4771479368209839,
-0.1627444177865982,
-0.11153757572174072,
-0.3297553062438965,
0.17252235114574432,
0.32287490367889404,
-0.092042475938797,
-0.12055082619190216,
-0.19414207339286804,
-0.2135462611913681,
-0.1306750774383545,
0.12673594057559967,
0.1379096806049347,
-0.43407225608825684,
0.09085200726985931,
0.11985869705677032,
-0.1983739137649536,
0.23428480327129364,
-0.033512234687805176,
0.24870693683624268,
0.38828110694885254,
-0.0679246336221695,
-0.0176149383187294,
-0.199244424700737,
0.15310485661029816,
0.08446243405342102,
0.14344143867492676,
-0.11937747895717621,
0.07837393879890442,
0.2640804350376129,
0.007497891783714294,
0.022350046783685684,
-0.04570673033595085,
0.3096438944339752,
0.009553484618663788,
-0.199078768491745,
0.1269664466381073,
0.07213887572288513,
0.15552249550819397,
-0.3226601779460907,
0.11590514332056046,
0.037892043590545654,
-0.20363664627075195,
0.21966767311096191,
0.20919948816299438,
0.17878113687038422,
0.3378742039203644,
-0.599918782711029,
-0.040288928896188736,
0.23176482319831848,
-0.5032994747161865,
-0.1447238028049469,
0.2713034749031067,
-0.26768746972084045,
0.23965832591056824,
0.3504220247268677,
0.11478564143180847,
0.22715696692466736,
0.6445321440696716,
0.23428654670715332,
0.3297184705734253,
0.3608790338039398,
0.13134366273880005,
0.5435186624526978,
-0.04069983959197998,
0.13435183465480804,
0.13637328147888184,
0.43965721130371094,
0.1828795224428177,
0.17359104752540588,
0.2615075707435608,
-0.1948351413011551,
-0.2558387517929077,
0.014173904433846474,
-0.04695858433842659,
-0.03874225914478302,
-0.026395410299301147,
-0.3513067364692688,
-0.06476413458585739,
-0.5209791660308838,
-0.04786348342895508,
-0.05904565379023552,
-0.40880513191223145,
0.2428467720746994,
0.2947579026222229,
-0.05405507981777191,
0.10744965821504593,
-0.037309207022190094,
0.1465470790863037,
0.16806378960609436,
-0.18891771137714386,
-0.031136998906731606,
0.07810498774051666,
0.017012756317853928,
0.09315174072980881,
0.5586535930633545,
0.4384209215641022,
0.3122684061527252,
-0.13937802612781525,
0.16507096588611603,
0.15298451483249664,
-0.19980280101299286,
0.14780136942863464,
0.07749520242214203,
0.1218564510345459,
0.2341802716255188,
0.2692096531391144,
0.16489842534065247,
-0.11934594810009003,
0.021498845890164375,
0.006224449723958969,
0.17928430438041687,
-0.16857963800430298,
0.3409624993801117,
-0.31499215960502625,
-0.21745187044143677,
-0.15663839876651764,
-0.15921267867088318,
-0.3259008228778839,
-0.19273139536380768,
0.4283697307109833,
-0.37193554639816284,
0.1584841012954712,
-0.06482559442520142,
0.05056367814540863,
-0.2908482849597931,
0.2477102279663086,
0.422870934009552,
0.018045522272586823,
-0.0249929241836071,
-0.0248493030667305,
-0.7563233971595764,
0.011873185634613037,
-0.08456172049045563,
-0.25582849979400635,
0.18953783810138702,
0.14149940013885498,
0.02748912200331688,
0.15641117095947266,
0.35080355405807495,
-0.24897971749305725,
0.4475021958351135,
0.4286951422691345,
-0.16415190696716309,
-0.13415203988552094,
0.290427565574646,
0.01016096118837595,
-0.00041393935680389404,
-0.4729877710342407,
0.0812462866306305,
0.08870185911655426,
0.08570478111505508,
-0.023225251585245132,
-0.29181408882141113,
-0.11714869737625122,
-0.28399962186813354,
0.603821337223053,
0.24001501500606537,
0.17781215906143188,
-0.28090789914131165,
-0.07694783806800842,
-0.26583412289619446,
-0.3128766119480133,
-0.22752156853675842,
-0.03382907062768936,
-0.021961305290460587,
0.8573832511901855,
0.19286112487316132,
-0.1024453341960907,
-0.08015956729650497,
0.03638118878006935,
-0.013607695698738098,
-0.12013143301010132,
-0.3438278138637543,
0.38588401675224304,
-0.47446659207344055,
-0.21419985592365265,
-0.09844381362199783,
0.3818572759628296,
0.11471450328826904,
0.19286984205245972,
-0.15870442986488342,
-0.4631657600402832,
0.41737475991249084,
-0.1580009013414383,
-0.4183795750141144,
0.1917211264371872,
0.05590296536684036,
0.2186349332332611,
-0.07690993696451187,
-0.33093661069869995,
-0.038654740899801254,
0.03382827341556549,
0.12933509051799774,
-0.20232824981212616,
0.11456452310085297,
0.18997636437416077,
0.1542261689901352,
-0.1325451284646988,
0.3347519040107727,
-0.07494529336690903,
0.13592736423015594,
0.027947504073381424,
-0.14964249730110168
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | cc @mariosasko this issue has been open for 2 years, would be great to resolve it :) | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 17 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
cc @mariosasko this issue has been open for 2 years, would be great to resolve it :) | [
-0.24003681540489197,
-0.5063414573669434,
-0.017784323543310165,
0.26419374346733093,
-0.03489115834236145,
0.1166476234793663,
0.22508470714092255,
0.30731672048568726,
-0.17256486415863037,
0.0991419181227684,
0.15779849886894226,
0.6225147843360901,
-0.02979535609483719,
-0.1181052029132843,
-0.14993424713611603,
-0.006528176367282867,
0.11232099682092667,
0.14947324991226196,
-0.0720941573381424,
-0.16599716246128082,
-0.37642204761505127,
0.12892749905586243,
0.013974510133266449,
0.01103336364030838,
-0.6313982009887695,
-0.16874220967292786,
-0.10905000567436218,
0.021123439073562622,
-0.2949874997138977,
-0.2322024554014206,
0.23938514292240143,
-0.2111758589744568,
-0.01751423440873623,
0.047843605279922485,
-0.00012603233335539699,
-0.054393939673900604,
0.4486978054046631,
0.07809071987867355,
0.00031087081879377365,
-0.37115752696990967,
-0.24073931574821472,
-0.21340180933475494,
0.07127319276332855,
-0.1620955914258957,
0.16516128182411194,
-0.17485828697681427,
0.05754464492201805,
0.3851650655269623,
0.008080899715423584,
0.23857052624225616,
0.113079734146595,
0.26666563749313354,
0.20929549634456635,
-0.010875903069972992,
0.5539457201957703,
0.30816078186035156,
-0.2596406638622284,
0.19237162172794342,
0.1481129676103592,
0.05466209352016449,
0.18583282828330994,
0.4849148094654083,
0.25460654497146606,
0.2258935421705246,
0.30900055170059204,
0.07795291393995285,
-0.07724397629499435,
-0.3845827877521515,
-0.09020143002271652,
-0.11680149286985397,
-0.014539308845996857,
-0.0997668132185936,
-0.36301976442337036,
-0.07605387270450592,
0.11440467089414597,
-0.08992823958396912,
0.2572919726371765,
0.19615235924720764,
-0.10702942311763763,
-0.09722268581390381,
0.2220432460308075,
-0.3034280836582184,
-0.2511833906173706,
0.20533764362335205,
0.003939226269721985,
0.045818183571100235,
0.09108007699251175,
0.2202831506729126,
-0.021876167505979538,
-0.14844241738319397,
0.38632649183273315,
0.02297775261104107,
-0.01300562173128128,
-0.12266148626804352,
0.009475652128458023,
0.08284565806388855,
-0.10870418697595596,
0.1421203315258026,
0.2455187737941742,
-0.08924564719200134,
-0.1821882575750351,
0.06240679323673248,
-0.4932608902454376,
0.40136250853538513,
0.13934201002120972,
-0.002377972938120365,
-0.17809009552001953,
0.20309510827064514,
-0.019856639206409454,
-0.06986534595489502,
-0.08474770188331604,
0.018218204379081726,
-0.13646827638149261,
-0.3460838198661804,
0.32506343722343445,
-0.025758814066648483,
0.5477012991905212,
-0.1620466709136963,
-0.28632858395576477,
0.0005542859435081482,
-0.15957722067832947,
0.17417167127132416,
-0.1824222058057785,
0.3276295065879822,
0.20989800989627838,
0.116579569876194,
0.3276938199996948,
0.3975159525871277,
-0.1781165599822998,
0.09767068922519684,
-0.0123930424451828,
0.24994495511054993,
-0.25312837958335876,
-0.1693975329399109,
-0.13916714489459991,
-0.28812628984451294,
0.04422328621149063,
0.03165273368358612,
0.3043208718299866,
-0.11288909614086151,
0.0651877373456955,
-0.23747144639492035,
0.4986788034439087,
0.16191117465496063,
-0.22658509016036987,
-0.01551438681781292,
0.045849692076444626,
0.11208900809288025,
-0.1321544349193573,
0.3053620457649231,
-0.5807540416717529,
-0.1423128992319107,
-0.43344244360923767,
0.03490488976240158,
0.04604863375425339,
-0.1681506633758545,
-0.3452789783477783,
0.06205028295516968,
-0.10454647988080978,
-0.049873676151037216,
0.1217460036277771,
-0.40467000007629395,
-0.13743726909160614,
-0.08068546652793884,
-0.14636118710041046,
0.24047550559043884,
-0.12987451255321503,
0.041529491543769836,
-0.10181380808353424,
-0.0806008130311966,
-0.11381631344556808,
0.031126471236348152,
-0.09009894728660583,
0.11027231067419052,
-0.3894839584827423,
0.029229968786239624,
0.10191300511360168,
-0.44277679920196533,
-0.4785710871219635,
-0.0668092891573906,
0.04545406997203827,
-0.0026104729622602463,
-0.22909462451934814,
0.3438113033771515,
0.052369847893714905,
-0.013573849573731422,
0.10235345363616943,
0.2781309485435486,
0.007424492388963699,
0.1290978193283081,
-0.16361144185066223,
-0.4468679428100586,
0.07764632999897003,
0.21256235241889954,
0.2781563699245453,
0.1805320680141449,
0.256354957818985,
-0.11769421398639679,
-0.08120212703943253,
0.019609298557043076,
0.274117112159729,
-0.03186535835266113,
0.5497612357139587,
-0.04879268258810043,
0.1478687822818756,
-0.1606968343257904,
-0.08076084405183792,
-0.010423295199871063,
-0.002455674111843109,
0.23802858591079712,
-0.41027361154556274,
-0.06413550674915314,
-0.3265514373779297,
0.24081693589687347,
-0.36599457263946533,
0.10168907046318054,
0.06995956599712372,
0.07251257449388504,
-0.42526674270629883,
-0.17102663218975067,
-0.1618170589208603,
0.45565199851989746,
0.11846528947353363,
0.23425927758216858,
-0.1663261353969574,
0.30153295397758484,
-0.08096333593130112,
-0.31911009550094604,
0.029950767755508423,
0.033778123557567596,
0.17000551521778107,
0.024189749732613564,
-0.4179885685443878,
0.26289889216423035,
0.06658151745796204,
0.37810444831848145,
0.17754364013671875,
-0.3078498840332031,
0.2940099537372589,
-0.6129333972930908,
-0.07265080511569977,
-0.018755845725536346,
0.3942558169364929,
0.15634199976921082,
0.04155872017145157,
0.2677214741706848,
0.0008039772510528564,
0.1755804866552353,
-0.20640866458415985,
0.1678912192583084,
-0.04954133927822113,
0.12232643365859985,
-0.09941946715116501,
-0.18972885608673096,
-0.24454297125339508,
0.19783657789230347,
-0.02715495601296425,
-0.2190978229045868,
-0.24872899055480957,
0.04742708057165146,
0.19702908396720886,
0.13803249597549438,
0.3115011751651764,
0.352155476808548,
-0.16712981462478638,
0.23073244094848633,
0.5931752920150757,
0.059833724051713943,
0.3316521644592285,
0.1213192567229271,
-0.30524757504463196,
0.23625706136226654,
-0.33410337567329407,
0.11847391724586487,
0.21819241344928741,
0.17083954811096191,
0.48255863785743713,
0.033779121935367584,
0.48165926337242126,
-0.030832983553409576,
-0.42442312836647034,
-0.13346636295318604,
0.02492138184607029,
0.0704008936882019,
-0.3145250678062439,
-0.024599626660346985,
-0.36599934101104736,
0.10175365954637527,
-0.2364884316921234,
-0.1488935798406601,
-0.03137752786278725,
-0.2564806044101715,
0.012526670470833778,
0.1907993108034134,
-0.061878129839897156,
-0.03289543092250824,
0.12518393993377686,
0.058154359459877014,
0.1378277987241745,
-0.2872464060783386,
-0.19590409100055695,
0.023557310923933983,
-0.1254996359348297,
-0.07186956703662872,
0.07060269266366959,
0.1733425259590149,
0.5760195851325989,
0.0926859900355339,
0.32291871309280396,
-0.3489152193069458,
-0.3213307857513428,
0.01384500041604042,
-0.16757012903690338,
0.3843753933906555,
0.0937303826212883,
0.1299712359905243,
-0.09568032622337341,
-0.06730767339468002,
0.25996676087379456,
0.11068320274353027,
-0.18892240524291992,
-0.03994011506438255,
-0.3760716915130615,
-0.14263638854026794,
-0.10925893485546112,
-0.41342446208000183,
-0.21276366710662842,
-0.1623000204563141,
-0.03663879632949829,
0.10888712108135223,
0.12993822991847992,
-0.07106611877679825,
0.5966247320175171,
0.08795072883367538,
0.06191094592213631,
-0.1673010289669037,
-0.18601900339126587,
0.04050576314330101,
0.3545650243759155,
-0.23420289158821106,
-0.27280569076538086,
0.16357435286045074,
-0.3176870346069336,
0.055930543690919876,
0.17554126679897308,
-0.22527305781841278,
-0.555294394493103,
-0.1017524003982544,
0.6107265949249268,
-0.07968276739120483,
0.07623914629220963,
0.13558320701122284,
0.20601025223731995,
-0.0049126483500003815,
-0.1940244436264038,
-0.14931359887123108,
0.0043084025382995605,
0.14609414339065552,
0.29825687408447266,
0.12736353278160095,
0.09573867172002792,
0.03998982533812523,
0.2215866595506668,
-0.03232646733522415,
-0.23988918960094452,
0.6306467056274414,
-0.21902833878993988,
0.1536795198917389,
-0.2898849844932556,
-0.2756146788597107,
0.011415624059736729,
-0.07482093572616577,
0.00042833946645259857,
-0.34505409002304077,
-0.14662617444992065,
-0.26893550157546997,
0.06995247304439545,
-0.2062431424856186,
-0.5135526657104492,
-0.12623950839042664,
-0.005512794479727745,
0.0007242932915687561,
0.027712546288967133,
0.03860904648900032,
-0.3026936650276184,
-0.3013109862804413,
-0.12065006047487259,
0.27056610584259033,
0.36121273040771484,
0.0076714977622032166,
-0.019741564989089966,
-0.11786025762557983,
-0.4355720579624176,
-0.01697160303592682,
0.20447324216365814,
0.1495620608329773,
0.47022491693496704,
-0.03128644451498985,
0.17178979516029358,
0.10032901167869568,
-0.21633577346801758,
0.7233790159225464,
-0.42298027873039246,
-0.08497637510299683,
-0.06454562395811081,
0.11193433403968811,
-0.25223296880722046,
-0.022660767659544945,
-0.16265246272087097,
0.03172655776143074,
-0.2265341728925705,
0.6581918001174927,
-0.11205251514911652,
0.187414288520813,
0.16463716328144073,
-0.11359965056180954,
-0.042736418545246124,
-0.06416169553995132,
-0.17212718725204468,
-0.24298998713493347,
-0.5501312017440796,
-0.07542834430932999,
0.1656029224395752,
0.1499015837907791,
0.14554885029792786,
-0.3119220733642578,
-0.29480820894241333,
0.21901723742485046,
0.0386897474527359,
0.04794267192482948,
0.3220784366130829,
-0.11619161069393158,
0.0748634934425354,
-0.14577831327915192,
0.30540186166763306,
0.3686654269695282,
0.5328682065010071,
0.02218618616461754,
-0.17247945070266724,
-0.02293090894818306,
-0.06373287737369537,
0.13666072487831116,
0.3320385813713074,
-0.008309675380587578,
0.05806007236242294,
-0.29206520318984985,
0.0736437514424324,
-0.2905586063861847,
0.16004450619220734,
0.2569168210029602,
-0.03476640209555626,
0.19591793417930603,
-0.021814629435539246,
0.642539381980896,
-0.1579747498035431,
-0.030809435993433,
0.3692720830440521,
0.5306602716445923,
-0.11858311295509338,
0.6561872959136963,
0.46004733443260193,
1.0540629625320435,
0.16071313619613647,
-0.0442514531314373,
0.3245726525783539,
-0.5286597013473511,
0.14159703254699707,
0.28959792852401733,
0.020910469815135002,
-0.33980420231819153,
0.08749736100435257,
-0.07719753682613373,
-0.1484653651714325,
0.272739976644516,
-0.13390779495239258,
-0.32976609468460083,
-0.10513214021921158,
0.029051072895526886,
-0.0640060305595398,
-0.1624382585287094,
0.07452547550201416,
-0.6849046945571899,
-0.36320626735687256,
0.07145954668521881,
0.17620983719825745,
0.0638546422123909,
0.260282039642334,
-0.06715190410614014,
-0.1551399827003479,
-0.5225211977958679,
-0.12079119682312012,
-0.15063177049160004,
0.1331474781036377,
-0.2410551756620407,
0.05721869692206383,
0.16440510749816895,
-0.06316652148962021,
-0.004328366369009018,
-0.053898464888334274,
0.2526421546936035,
-0.29802682995796204,
-0.08319322764873505,
0.23613247275352478,
0.15966728329658508,
0.059061989188194275,
0.03621342405676842,
-0.19645267724990845,
0.46258920431137085,
-0.1195266991853714,
-0.4073010981082916,
-0.12354152649641037,
0.08094968646764755,
0.012744493782520294,
0.02073734998703003,
0.06058681011199951,
-0.0903567224740982,
-0.07698679715394974,
-0.7115583419799805,
0.1501409411430359,
-0.19758540391921997,
-0.13133545219898224,
0.05940700322389603,
0.023063652217388153,
-0.10252916812896729,
0.2940209209918976,
0.3871769607067108,
-0.20324690639972687,
0.2183888703584671,
0.15511265397071838,
-0.16015201807022095,
0.09692329168319702,
0.33514976501464844,
-0.17189331352710724,
-0.041678689420223236,
-0.08078277856111526,
0.5021052360534668,
0.2844158411026001,
-0.6551069617271423,
-0.04631344974040985,
-0.18491144478321075,
-0.19184036552906036,
-0.11014541983604431,
0.1331191509962082,
-0.008144792169332504,
0.2141362726688385,
-0.15853458642959595,
-0.2620622217655182,
-0.13994553685188293,
0.14094914495944977,
-0.24267973005771637,
0.41376304626464844,
-0.362687885761261,
-0.026798896491527557,
0.14774109423160553,
-0.08326062560081482,
-0.22197797894477844,
0.3375491797924042,
-0.006184758618474007,
0.3527272641658783,
-0.4422370195388794,
0.34470507502555847,
0.03394368290901184,
-0.11365179717540741,
0.011535292491316795,
0.49926894903182983,
-0.16089949011802673,
-0.02960117533802986,
-0.33337289094924927,
0.22227424383163452,
0.3021821081638336,
0.024933598935604095,
-0.14491599798202515,
-0.18867456912994385,
-0.102550208568573,
-0.051843855530023575,
0.08934646844863892,
0.04279500991106033,
-0.41691166162490845,
0.1645205169916153,
0.10391241312026978,
-0.12891367077827454,
0.27950406074523926,
0.07189184427261353,
0.33075791597366333,
0.41363412141799927,
-0.11926361918449402,
0.0035458728671073914,
-0.17253588140010834,
0.1584770679473877,
-0.06923236697912216,
0.13607728481292725,
-0.04149603843688965,
0.08359862118959427,
0.28137242794036865,
-0.06561869382858276,
0.10231129825115204,
-0.083944171667099,
0.13874517381191254,
-0.04731660336256027,
-0.30344265699386597,
0.03584403544664383,
-0.06796862930059433,
0.10730403661727905,
-0.27789217233657837,
0.05320486053824425,
0.02696901373565197,
-0.15061521530151367,
0.06319433450698853,
0.09963203966617584,
0.18571989238262177,
0.40278160572052,
-0.6112316846847534,
-0.014295952394604683,
0.2217671275138855,
-0.5176265835762024,
-0.10287202894687653,
0.20060716569423676,
-0.22273100912570953,
0.24747498333454132,
0.29068323969841003,
0.03336270898580551,
0.18283146619796753,
0.6340470910072327,
0.20231939852237701,
0.37415724992752075,
0.5095281600952148,
0.1394994854927063,
0.5809704065322876,
-0.05958378314971924,
0.14119327068328857,
0.26654794812202454,
0.49807649850845337,
0.2635018825531006,
0.25131893157958984,
0.2591535449028015,
-0.19696252048015594,
-0.357256144285202,
0.026073744520545006,
-0.1028984934091568,
0.020610934123396873,
0.02243220806121826,
-0.3620895743370056,
-0.011299140751361847,
-0.6539871692657471,
-0.07240982353687286,
-0.10522562265396118,
-0.34473150968551636,
0.30328088998794556,
0.4277970790863037,
-0.16933892667293549,
0.09249633550643921,
-0.09410957247018814,
0.2176426649093628,
0.20968392491340637,
-0.2866404056549072,
0.08053720742464066,
0.06294494867324829,
-0.0035715922713279724,
0.13547725975513458,
0.5604740381240845,
0.4506945312023163,
0.4559398591518402,
-0.12149995565414429,
0.1606692224740982,
0.16111259162425995,
-0.18634654581546783,
0.22978588938713074,
0.07228794693946838,
0.1320403814315796,
0.3439880311489105,
0.18497584760189056,
0.09804067015647888,
-0.046428319066762924,
0.08281776309013367,
0.006833311170339584,
0.1780957728624344,
-0.1905597448348999,
0.34870463609695435,
-0.3596268594264984,
-0.25622066855430603,
-0.17555290460586548,
-0.16932207345962524,
-0.3999759256839752,
-0.17357274889945984,
0.46111342310905457,
-0.3228971064090729,
0.12352385371923447,
-0.01776992157101631,
-0.0004708375781774521,
-0.3119371235370636,
0.19640102982521057,
0.4083767533302307,
-0.03974471986293793,
-0.04319686070084572,
-0.1183953508734703,
-0.6872984170913696,
0.07619906961917877,
0.0031735859811306,
-0.20775948464870453,
0.2524515688419342,
0.09994760155677795,
-0.03402375429868698,
0.17307373881340027,
0.4480109214782715,
-0.3344455063343048,
0.4836598336696625,
0.4345196485519409,
-0.15356799960136414,
-0.09983363747596741,
0.379091739654541,
0.04166467487812042,
0.028085771948099136,
-0.4935285151004791,
0.13517020642757416,
0.003192119300365448,
-0.005374569445848465,
-0.037231091409921646,
-0.28483158349990845,
-0.11311383545398712,
-0.3214775323867798,
0.6957533359527588,
0.2339532971382141,
0.19803979992866516,
-0.24055543541908264,
-0.026866650208830833,
-0.20118474960327148,
-0.3442257344722748,
-0.1891333907842636,
-0.0968761220574379,
-0.07941983640193939,
0.7900004386901855,
0.2286168932914734,
-0.06517532467842102,
-0.042105887085199356,
-0.011368409730494022,
-0.09663684666156769,
-0.12102055549621582,
-0.26956549286842346,
0.3263416290283203,
-0.45900288224220276,
-0.1661226898431778,
-0.08235260844230652,
0.3068313002586365,
0.2405424416065216,
0.1957792490720749,
-0.22521349787712097,
-0.4416055381298065,
0.3989405035972595,
-0.04566321149468422,
-0.36573049426078796,
0.1881570667028427,
0.17856574058532715,
0.2027081847190857,
-0.08425252884626389,
-0.5375962257385254,
-0.17883434891700745,
0.09826238453388214,
0.10142720490694046,
-0.12937670946121216,
0.26145967841148376,
0.2940632402896881,
0.12725649774074554,
-0.11686831712722778,
0.4562944769859314,
-0.04105322062969208,
0.1649128943681717,
0.10252401232719421,
-0.16003793478012085
] |
https://github.com/huggingface/datasets/issues/4796 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset | I have the same issue, my current workaround is saving the dataframe to a csv and then loading the dataset from the csv. Would also appreciate it a fix :) | ## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
| 30 | ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB when adding image to Dataset
## Describe the bug
When adding a Pillow image to an existing Dataset on the hub, `add_item` fails due to the Pillow image not being automatically converted into the Image feature.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from PIL import Image
dataset = load_dataset("hf-internal-testing/example-documents")
# load any random Pillow image
image = Image.open("/content/cord_example.png").convert("RGB")
new_image = {'image': image}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Expected results
The image should be automatically casted to the Image feature when using `add_item`. For now, this can be fixed by using `encode_example`:
```
import datasets
feature = datasets.Image(decode=False)
new_image = {'image': feature.encode_example(image)}
dataset['test'] = dataset['test'].add_item(new_image)
```
## Actual results
```
ArrowInvalid: Could not convert <PIL.Image.Image image mode=RGB size=576x864 at 0x7F7CCC4589D0> with type Image: did not recognize Python value type when inferring an Arrow data type
```
I have the same issue, my current workaround is saving the dataframe to a csv and then loading the dataset from the csv. Would also appreciate it a fix :) | [
-0.25443893671035767,
-0.4661736786365509,
-0.0017221234738826752,
0.24875161051750183,
0.006114210933446884,
0.1667240858078003,
0.23897339403629303,
0.34891921281814575,
-0.11823710799217224,
0.07658447325229645,
0.10348154604434967,
0.62934410572052,
-0.0017570210620760918,
-0.06838779896497726,
-0.13145245611667633,
-0.02959670126438141,
0.1051258072257042,
0.180758535861969,
-0.07708238065242767,
-0.18386536836624146,
-0.39240285754203796,
0.1136213093996048,
0.021305471658706665,
0.044283654540777206,
-0.5986643433570862,
-0.1968429982662201,
-0.13718503713607788,
0.011275433003902435,
-0.22406797111034393,
-0.20464210212230682,
0.24600990116596222,
-0.21133166551589966,
0.04689671844244003,
0.048062875866889954,
-0.00012425699969753623,
-0.05658650025725365,
0.3925281763076782,
0.04666789621114731,
0.020302247256040573,
-0.4193282127380371,
-0.20448976755142212,
-0.20554251968860626,
0.12228484451770782,
-0.17146769165992737,
0.15871170163154602,
-0.1762363612651825,
0.07842592149972916,
0.3607213497161865,
0.040947169065475464,
0.2623318135738373,
0.12923502922058105,
0.26883038878440857,
0.18443720042705536,
0.017420656979084015,
0.508037805557251,
0.3045729398727417,
-0.2569310665130615,
0.1742687225341797,
0.08848803490400314,
0.007321815937757492,
0.118400439620018,
0.4526379406452179,
0.24869990348815918,
0.24502001702785492,
0.35272061824798584,
0.10032737255096436,
-0.10327432304620743,
-0.40552207827568054,
-0.12778085470199585,
-0.07164842635393143,
-0.013419613242149353,
-0.08080916851758957,
-0.3892788290977478,
-0.08120980113744736,
0.16425006091594696,
-0.08836153149604797,
0.2408771514892578,
0.20987863838672638,
-0.07817137241363525,
-0.08275039494037628,
0.25347062945365906,
-0.28267964720726013,
-0.26438844203948975,
0.16212590038776398,
-0.0331561341881752,
0.007692813873291016,
0.07303120195865631,
0.22614982724189758,
0.02485709823668003,
-0.148774653673172,
0.3573911488056183,
0.0262193251401186,
0.0221040491014719,
-0.09339888393878937,
-0.002295929938554764,
0.10555228590965271,
-0.09072751551866531,
0.14761674404144287,
0.17710411548614502,
-0.10512882471084595,
-0.20577581226825714,
0.06448961794376373,
-0.4835525155067444,
0.3814796507358551,
0.10871420800685883,
0.0067301783710718155,
-0.27499860525131226,
0.21530427038669586,
0.019801318645477295,
-0.07710925489664078,
-0.10730409622192383,
-0.03375142812728882,
-0.158369243144989,
-0.3345335125923157,
0.2815602123737335,
-0.07075918465852737,
0.4488180875778198,
-0.18453936278820038,
-0.30492302775382996,
0.002557826228439808,
-0.13894689083099365,
0.16995228826999664,
-0.2153257578611374,
0.34612807631492615,
0.21699313819408417,
0.08439970761537552,
0.36149656772613525,
0.4115736484527588,
-0.17535197734832764,
0.1366909146308899,
-0.0220501609146595,
0.2641197144985199,
-0.2511746287345886,
-0.188536137342453,
-0.12749426066875458,
-0.29560771584510803,
0.06821899861097336,
0.06692876666784286,
0.31076353788375854,
-0.06902411580085754,
0.007396876811981201,
-0.24648714065551758,
0.47699689865112305,
0.18824326992034912,
-0.2248097062110901,
0.005935203284025192,
0.12625660002231598,
0.06936095654964447,
-0.13277427852153778,
0.24548521637916565,
-0.47318190336227417,
-0.12363937497138977,
-0.4687685966491699,
0.011819429695606232,
-0.001101044937968254,
-0.1777230203151703,
-0.3601909279823303,
0.07024054229259491,
-0.14144468307495117,
-0.04053425416350365,
0.08700613677501678,
-0.43164509534835815,
-0.11351000517606735,
-0.08177576214075089,
-0.1411125510931015,
0.2422834038734436,
-0.22654348611831665,
0.04709596186876297,
-0.024678422138094902,
-0.05272446200251579,
-0.10073689371347427,
0.06920497119426727,
-0.1074015349149704,
0.06312266737222672,
-0.35423997044563293,
0.04932837188243866,
0.0679074227809906,
-0.4427920877933502,
-0.4692085385322571,
-0.019783154129981995,
0.047435276210308075,
0.01429039053618908,
-0.2063564956188202,
0.34582749009132385,
0.06930862367153168,
-0.006672556046396494,
0.09263014793395996,
0.3272998332977295,
-0.02052747644484043,
0.12990282475948334,
-0.16967403888702393,
-0.4439152777194977,
0.11941840499639511,
0.22640420496463776,
0.2622261941432953,
0.17974773049354553,
0.21697258949279785,
-0.15843363106250763,
-0.056760527193546295,
-0.042695220559835434,
0.28161364793777466,
-0.037381045520305634,
0.5167149901390076,
0.02666560560464859,
0.1293334662914276,
-0.14143642783164978,
-0.06281229108572006,
-0.04231834411621094,
0.028210505843162537,
0.2586594223976135,
-0.4639720916748047,
-0.09532541036605835,
-0.3561018109321594,
0.1879734843969345,
-0.34029239416122437,
0.0941305011510849,
0.07325270771980286,
0.039581429213285446,
-0.41480734944343567,
-0.1403360813856125,
-0.17526468634605408,
0.5090886354446411,
0.07733171433210373,
0.25976571440696716,
-0.159664124250412,
0.32038620114326477,
-0.06893705576658249,
-0.3187486231327057,
0.10329481959342957,
0.07160839438438416,
0.16608278453350067,
-0.017460264265537262,
-0.43768027424812317,
0.27172979712486267,
0.03509562835097313,
0.37186169624328613,
0.15224768221378326,
-0.27149391174316406,
0.2816524803638458,
-0.5240765810012817,
-0.10372395068407059,
-0.020859625190496445,
0.4052811861038208,
0.18455490469932556,
-0.010242477059364319,
0.3413739800453186,
-0.057856928557157516,
0.17307829856872559,
-0.1890205293893814,
0.18621443212032318,
0.04483889788389206,
0.1582353562116623,
-0.14958694577217102,
-0.19755138456821442,
-0.26897498965263367,
0.24481603503227234,
-0.006511785089969635,
-0.1954200118780136,
-0.30224859714508057,
0.018016763031482697,
0.18287062644958496,
0.14700376987457275,
0.2956125736236572,
0.32012927532196045,
-0.2217026948928833,
0.22325751185417175,
0.6175370812416077,
0.11128570139408112,
0.3079582452774048,
0.13279031217098236,
-0.3414226770401001,
0.22269976139068604,
-0.40279313921928406,
0.10067226737737656,
0.18352507054805756,
0.1642138510942459,
0.5276911854743958,
-0.018526628613471985,
0.45274001359939575,
-0.004970603622496128,
-0.46955519914627075,
-0.16142921149730682,
0.022361701354384422,
0.09944677352905273,
-0.3197270333766937,
0.005348930135369301,
-0.3716770112514496,
0.05484085530042648,
-0.20703740417957306,
-0.15085181593894958,
-0.017508231103420258,
-0.3019568920135498,
-0.060170672833919525,
0.22896447777748108,
-0.051500409841537476,
-0.015540078282356262,
0.06477923691272736,
0.05961325764656067,
0.1482371836900711,
-0.25925275683403015,
-0.15628018975257874,
0.005405806936323643,
-0.13034138083457947,
-0.0658697560429573,
0.08084351569414139,
0.1839224249124527,
0.5228736996650696,
0.12157801538705826,
0.3823413848876953,
-0.3265799283981323,
-0.28849276900291443,
0.01038902997970581,
-0.23628859221935272,
0.4424971640110016,
0.08031177520751953,
0.19233137369155884,
-0.16849039494991302,
-0.10919611901044846,
0.24802851676940918,
0.11504977941513062,
-0.12937115132808685,
-0.055941998958587646,
-0.3511301875114441,
-0.1374824345111847,
-0.09226131439208984,
-0.4122912585735321,
-0.23111514747142792,
-0.16587507724761963,
-0.01513911783695221,
0.07780659198760986,
0.07385097444057465,
-0.06225590407848358,
0.5634613037109375,
0.08155857771635056,
0.068923719227314,
-0.20921175181865692,
-0.23530587553977966,
0.06778521835803986,
0.4327239990234375,
-0.24233373999595642,
-0.31217214465141296,
0.15735070407390594,
-0.3589822053909302,
0.08406279981136322,
0.12591898441314697,
-0.22616475820541382,
-0.5181354880332947,
-0.14774057269096375,
0.5885657072067261,
-0.09296193718910217,
0.12238041311502457,
0.12129087001085281,
0.20681710541248322,
0.0007456950843334198,
-0.19441065192222595,
-0.12946762144565582,
0.006145104765892029,
0.1340222805738449,
0.2834480404853821,
0.12612488865852356,
0.16666001081466675,
0.04882900044322014,
0.20865939557552338,
-0.06622309237718582,
-0.2823334038257599,
0.618202805519104,
-0.24577468633651733,
0.17876727879047394,
-0.24565371870994568,
-0.3101596534252167,
0.01497801672667265,
-0.15008485317230225,
0.037887029349803925,
-0.3242109417915344,
-0.1647706925868988,
-0.28939852118492126,
0.08122499287128448,
-0.18701079487800598,
-0.5050910115242004,
-0.16446800529956818,
0.04258781298995018,
0.018313653767108917,
0.027202382683753967,
0.09640789031982422,
-0.28106001019477844,
-0.32673749327659607,
-0.1305357813835144,
0.25388410687446594,
0.36665844917297363,
0.10638181865215302,
-0.07536422461271286,
-0.06461161375045776,
-0.4612422585487366,
-0.061055682599544525,
0.18247024714946747,
0.16002492606639862,
0.4777330160140991,
0.016072217375040054,
0.1835138499736786,
0.06823915988206863,
-0.16770361363887787,
0.7650616765022278,
-0.3924686312675476,
-0.13959959149360657,
-0.01171431690454483,
0.028968364000320435,
-0.310570627450943,
-0.03564605861902237,
-0.1800677329301834,
0.03745961934328079,
-0.231411412358284,
0.6004690527915955,
-0.06440601497888565,
0.17633186280727386,
0.1773001104593277,
-0.10897785425186157,
-0.08048851042985916,
-0.0797613263130188,
-0.16284938156604767,
-0.1918346881866455,
-0.569861650466919,
-0.041036345064640045,
0.18887662887573242,
0.16101551055908203,
0.11450880765914917,
-0.26988667249679565,
-0.3362717628479004,
0.16845417022705078,
0.06133102625608444,
0.11477485299110413,
0.2974320948123932,
-0.03414957597851753,
0.040317315608263016,
-0.0911625325679779,
0.26761797070503235,
0.3504766821861267,
0.45414668321609497,
0.0353824719786644,
-0.21093788743019104,
-0.030990563333034515,
-0.09851905703544617,
0.17502212524414062,
0.3085182309150696,
-0.0349574089050293,
0.0646456778049469,
-0.32850751280784607,
0.028306901454925537,
-0.30965372920036316,
0.17347054183483124,
0.2430991679430008,
-0.014199376106262207,
0.20824801921844482,
-0.06272962689399719,
0.687640905380249,
-0.13317912817001343,
-0.029571078717708588,
0.33656230568885803,
0.6113507151603699,
-0.13674238324165344,
0.6947778463363647,
0.43544602394104004,
1.0065683126449585,
0.13664758205413818,
-0.01784706488251686,
0.3583962619304657,
-0.49212563037872314,
0.20346921682357788,
0.31108546257019043,
0.05711991712450981,
-0.34826648235321045,
0.01120474748313427,
-0.09288275986909866,
-0.12304425239562988,
0.27554863691329956,
-0.1285264492034912,
-0.29630374908447266,
-0.06802396476268768,
0.06190614402294159,
-0.034507859498262405,
-0.16730855405330658,
0.052909255027770996,
-0.6114652752876282,
-0.4267316460609436,
-0.02377447485923767,
0.17290088534355164,
0.08087051659822464,
0.2547082006931305,
-0.05326991155743599,
-0.15575996041297913,
-0.5319092869758606,
-0.027134396135807037,
-0.13124988973140717,
0.10686375945806503,
-0.24483200907707214,
0.07352370768785477,
0.09450484812259674,
-0.028436485677957535,
0.032837141305208206,
-0.04915632680058479,
0.30947262048721313,
-0.27130773663520813,
-0.06876696646213531,
0.22050079703330994,
0.16788722574710846,
0.02421000972390175,
-0.009006763808429241,
-0.169093519449234,
0.4866172671318054,
-0.08093887567520142,
-0.4024851322174072,
-0.10548511892557144,
0.06916679441928864,
0.008070096373558044,
0.07208457589149475,
0.019513368606567383,
-0.12594261765480042,
-0.1483062207698822,
-0.6966553330421448,
0.12461456656455994,
-0.15064160525798798,
-0.1666523516178131,
0.060907769948244095,
0.010219711810350418,
-0.10123325884342194,
0.2946574091911316,
0.4173159897327423,
-0.21910011768341064,
0.2015383094549179,
0.17211562395095825,
-0.18749940395355225,
0.0920606255531311,
0.3677976727485657,
-0.14868156611919403,
-0.06521602720022202,
-0.04904574900865555,
0.4846872091293335,
0.31721851229667664,
-0.6537829041481018,
-0.003196198493242264,
-0.17189306020736694,
-0.19138537347316742,
-0.14165183901786804,
0.18069088459014893,
0.061160169541835785,
0.19262093305587769,
-0.14872224628925323,
-0.27090126276016235,
-0.19777168333530426,
0.1512962430715561,
-0.2381698042154312,
0.41725823283195496,
-0.30678579211235046,
0.008058957755565643,
0.1451762616634369,
-0.06939885020256042,
-0.22936609387397766,
0.30865734815597534,
-0.04389435425400734,
0.3532411456108093,
-0.3994581401348114,
0.34512126445770264,
0.03647642582654953,
-0.1028333455324173,
0.010725503787398338,
0.526465117931366,
-0.15068002045154572,
-0.03476319462060928,
-0.3272570073604584,
0.20785878598690033,
0.2870543301105499,
0.01775224879384041,
-0.151805579662323,
-0.19399581849575043,
-0.12023778259754181,
-0.08259910345077515,
0.08737760782241821,
0.051293082535266876,
-0.37758076190948486,
0.17353302240371704,
0.13161435723304749,
-0.17227110266685486,
0.2726362347602844,
0.005539260804653168,
0.3029268980026245,
0.4192986488342285,
-0.07200422883033752,
-0.005689021199941635,
-0.17039571702480316,
0.179523766040802,
-0.05026082322001457,
0.12559820711612701,
-0.0650152862071991,
0.12314727902412415,
0.2854398190975189,
-0.07709155976772308,
0.07321113348007202,
-0.012325954623520374,
0.1598842293024063,
-0.025335274636745453,
-0.24084939062595367,
0.039590299129486084,
-0.030213359743356705,
0.1013670414686203,
-0.31434014439582825,
0.1111171543598175,
0.05490953475236893,
-0.16184739768505096,
0.10316997766494751,
0.1326790750026703,
0.2566789984703064,
0.3947497010231018,
-0.5756734609603882,
-0.026563717052340508,
0.25385189056396484,
-0.5353265404701233,
-0.08280825614929199,
0.22412341833114624,
-0.21528366208076477,
0.22595100104808807,
0.3661212623119354,
0.0813244879245758,
0.20040401816368103,
0.6601718664169312,
0.21710434556007385,
0.29688727855682373,
0.4629668891429901,
0.1722075194120407,
0.5409172177314758,
-0.049121975898742676,
0.13903693854808807,
0.23955918848514557,
0.4657265543937683,
0.24754148721694946,
0.25526121258735657,
0.23818358778953552,
-0.20461004972457886,
-0.3678932189941406,
0.03751178830862045,
-0.042696308344602585,
-0.020361125469207764,
-0.03052450530230999,
-0.33884814381599426,
-0.03363260254263878,
-0.6347806453704834,
-0.03670061007142067,
-0.11062122881412506,
-0.3413071632385254,
0.2820912003517151,
0.39638978242874146,
-0.10706877708435059,
0.07914619892835617,
-0.06901460140943527,
0.2008368968963623,
0.25786662101745605,
-0.24850846827030182,
0.01901915669441223,
0.06337511539459229,
-0.0019830092787742615,
0.11934900283813477,
0.5298364162445068,
0.44275638461112976,
0.3935660123825073,
-0.1158524751663208,
0.151178240776062,
0.13315199315547943,
-0.1740998774766922,
0.25305402278900146,
0.03792669251561165,
0.1145198717713356,
0.3509733974933624,
0.21133247017860413,
0.0971059799194336,
-0.05325772613286972,
0.09111225605010986,
-0.00850651040673256,
0.1869002878665924,
-0.21437405049800873,
0.35142654180526733,
-0.3217169940471649,
-0.23898059129714966,
-0.20619438588619232,
-0.20075693726539612,
-0.3309258222579956,
-0.10733485221862793,
0.4645403027534485,
-0.37657326459884644,
0.13305628299713135,
0.013453925959765911,
0.00842052698135376,
-0.264714777469635,
0.17637857794761658,
0.4501144587993622,
-0.07336772233247757,
-0.07139754295349121,
-0.09564042836427689,
-0.748824417591095,
0.0030503198504447937,
0.011500287801027298,
-0.22232714295387268,
0.24308443069458008,
0.12882930040359497,
-0.012242347002029419,
0.13527056574821472,
0.4288390874862671,
-0.3094675540924072,
0.4715222716331482,
0.4421064853668213,
-0.15067452192306519,
-0.10955271124839783,
0.2683364450931549,
0.011489479802548885,
0.0059663765132427216,
-0.4391665756702423,
0.10610604286193848,
0.03740973770618439,
0.006892874836921692,
-0.0484100803732872,
-0.2785818576812744,
-0.17070305347442627,
-0.3408008813858032,
0.6929789185523987,
0.22282104194164276,
0.16533628106117249,
-0.2304408848285675,
0.016369087621569633,
-0.1869117021560669,
-0.33349376916885376,
-0.2168537974357605,
-0.0369754284620285,
-0.0798201709985733,
0.8462753295898438,
0.19530625641345978,
-0.07638581097126007,
-0.07039368152618408,
-0.03737720847129822,
-0.04751815274357796,
-0.14183667302131653,
-0.31080538034439087,
0.3491055965423584,
-0.4509182572364807,
-0.1937946230173111,
-0.08272573351860046,
0.3591170608997345,
0.20096921920776367,
0.23545204102993011,
-0.18481718003749847,
-0.4515691101551056,
0.3874835968017578,
-0.1272418349981308,
-0.42326539754867554,
0.2143031507730484,
0.12413713335990906,
0.21500900387763977,
-0.08069925755262375,
-0.5046476125717163,
-0.13877668976783752,
0.07982108741998672,
0.09841587394475937,
-0.1438697725534439,
0.2387971431016922,
0.2825438678264618,
0.1400071233510971,
-0.14973124861717224,
0.4328764081001282,
-0.01723630726337433,
0.18556144833564758,
0.038921061903238297,
-0.17400087416172028
] |
https://github.com/huggingface/datasets/issues/4795 | Missing MBPP splits | Thanks for reporting this as well, @stadlerb.
I suggest waiting for the answer of the data owners... | (@albertvillanova)
The [MBPP dataset on the Hub](https://huggingface.co/datasets/mbpp) has only a test split for both its "full" and its "sanitized" subset, while the [paper](https://arxiv.org/abs/2108.07732) states in subsection 2.1 regarding the full split:
> In the experiments described later in the paper, we hold out 10 problems for **few-shot prompting**, another 500 as our **test** dataset (which is used to evaluate both few-shot inference and fine-tuned models), 374 problems for **fine-tuning**, and the rest for **validation**.
If the dataset on the Hub should reproduce most closely what the original authors use, I guess this four-way split should be reflected.
The paper doesn't explicitly state the task_id ranges of the splits, but the [GitHub readme](https://github.com/google-research/google-research/tree/master/mbpp) referenced in the paper specifies exact task_id ranges, although it misstates the total number of samples:
> We specify a train and test split to use for evaluation. Specifically:
>
> * Task IDs 11-510 are used for evaluation.
> * Task IDs 1-10 and 511-1000 are used for training and/or prompting. We typically used 1-10 for few-shot prompting, although you can feel free to use any of the training examples.
I.e. the few-shot, train and validation splits are combined into one split, with a soft suggestion of using the first ten for few-shot prompting. It is not explicitly stated whether the 374 fine-tuning samples mentioned in the paper have task_id 511 to 784 or 601 to 974 or are randomly sampled from task_id 511 to 974.
Regarding the "sanitized" split the paper states the following:
> For evaluations involving the edited dataset, we perform comparisons with 100 problems that appear in both the original and edited dataset, using the same held out 10 problems for few-shot prompting and 374 problems for fine-tuning.
The statement doesn't appear to be very precise, as among the 10 few-shot problems, those with task_id 1, 5 and 10 are not even part of the sanitized variant, and many from the task_id range from 511 to 974 are missing (e.g. task_id 511 to 553). I suppose the idea the task_id ranges for each split remain the same, even if some of the task_ids are not present. That would result in 7 few-shot, 257 test, 141 train and 22 validation examples in the sanitized split. | 17 | Missing MBPP splits
(@albertvillanova)
The [MBPP dataset on the Hub](https://huggingface.co/datasets/mbpp) has only a test split for both its "full" and its "sanitized" subset, while the [paper](https://arxiv.org/abs/2108.07732) states in subsection 2.1 regarding the full split:
> In the experiments described later in the paper, we hold out 10 problems for **few-shot prompting**, another 500 as our **test** dataset (which is used to evaluate both few-shot inference and fine-tuned models), 374 problems for **fine-tuning**, and the rest for **validation**.
If the dataset on the Hub should reproduce most closely what the original authors use, I guess this four-way split should be reflected.
The paper doesn't explicitly state the task_id ranges of the splits, but the [GitHub readme](https://github.com/google-research/google-research/tree/master/mbpp) referenced in the paper specifies exact task_id ranges, although it misstates the total number of samples:
> We specify a train and test split to use for evaluation. Specifically:
>
> * Task IDs 11-510 are used for evaluation.
> * Task IDs 1-10 and 511-1000 are used for training and/or prompting. We typically used 1-10 for few-shot prompting, although you can feel free to use any of the training examples.
I.e. the few-shot, train and validation splits are combined into one split, with a soft suggestion of using the first ten for few-shot prompting. It is not explicitly stated whether the 374 fine-tuning samples mentioned in the paper have task_id 511 to 784 or 601 to 974 or are randomly sampled from task_id 511 to 974.
Regarding the "sanitized" split the paper states the following:
> For evaluations involving the edited dataset, we perform comparisons with 100 problems that appear in both the original and edited dataset, using the same held out 10 problems for few-shot prompting and 374 problems for fine-tuning.
The statement doesn't appear to be very precise, as among the 10 few-shot problems, those with task_id 1, 5 and 10 are not even part of the sanitized variant, and many from the task_id range from 511 to 974 are missing (e.g. task_id 511 to 553). I suppose the idea the task_id ranges for each split remain the same, even if some of the task_ids are not present. That would result in 7 few-shot, 257 test, 141 train and 22 validation examples in the sanitized split.
Thanks for reporting this as well, @stadlerb.
I suggest waiting for the answer of the data owners... | [
-0.10014323890209198,
-0.519787073135376,
-0.1537647545337677,
0.059523578733205795,
-0.28050148487091064,
-0.023506175726652145,
0.3523944616317749,
0.17772087454795837,
0.04495852068066597,
0.182694211602211,
-0.3087799847126007,
0.4114336371421814,
-0.1424715220928192,
0.23289574682712555,
0.05095415562391281,
-0.13960006833076477,
0.09523817151784897,
-0.045944735407829285,
-0.04489020258188248,
0.13958796858787537,
-0.07562466710805893,
0.16071096062660217,
-0.38784945011138916,
0.008541852235794067,
-0.12231768667697906,
-0.19388015568256378,
-0.1564764380455017,
0.403494268655777,
-0.12859927117824554,
-0.14010293781757355,
-0.014514194801449776,
0.03494963049888611,
-0.24966078996658325,
0.24064278602600098,
-0.00010415568249300122,
-0.05198602378368378,
0.13139677047729492,
-0.18413706123828888,
0.07842190563678741,
0.33246171474456787,
-0.011093996465206146,
-0.06776225566864014,
-0.07718463987112045,
-0.07646562159061432,
-0.06320640444755554,
0.32729485630989075,
-0.10224619507789612,
0.3202888071537018,
0.6320270895957947,
0.3446997106075287,
0.20912307500839233,
0.1986909955739975,
-0.18045160174369812,
-0.11412612348794937,
-0.0538586750626564,
0.030012097209692,
-0.004228152334690094,
-0.17896945774555206,
0.5331035852432251,
0.3226383328437805,
-0.08839461952447891,
0.17604483664035797,
0.22778576612472534,
0.08448334038257599,
-0.07337815314531326,
-0.264839231967926,
-0.08446710556745529,
-0.5284581184387207,
-0.03729701042175293,
0.28835204243659973,
0.07741838693618774,
0.3241427540779114,
-0.15136240422725677,
-0.3758466839790344,
-0.13186591863632202,
-0.07351582497358322,
-0.013927645981311798,
-0.0294522475451231,
-0.35240691900253296,
0.09991194307804108,
-0.2281186431646347,
-0.006743734702467918,
-0.1405045986175537,
-0.4085777997970581,
-0.12646877765655518,
0.4252365231513977,
-0.14546194672584534,
-0.03511769324541092,
-0.052387502044439316,
0.24089381098747253,
-0.03671251982450485,
0.01948986016213894,
0.15192103385925293,
-0.1020398661494255,
-0.03864428773522377,
-0.32158970832824707,
0.2346954643726349,
0.4028097093105316,
0.08873239159584045,
0.5492548942565918,
0.20428498089313507,
0.12126988172531128,
-0.03088676556944847,
-0.1750001609325409,
0.3784882426261902,
-0.01607481762766838,
0.15837246179580688,
0.15758667886257172,
0.1642405390739441,
0.21994414925575256,
0.24361583590507507,
0.40847650170326233,
-0.01752353459596634,
-0.34082475304603577,
-0.3952418863773346,
0.1955559253692627,
-0.3252982497215271,
-0.25009554624557495,
-0.47602617740631104,
0.1269514113664627,
0.03868807107210159,
-0.0680113360285759,
0.03511245921254158,
0.15263676643371582,
0.07208894193172455,
0.07423001527786255,
-0.23624998331069946,
-0.11628834903240204,
-0.36681067943573,
-0.19413639605045319,
-0.25175940990448,
0.060753047466278076,
-0.29463958740234375,
-0.04791498929262161,
0.19838333129882812,
-0.12548308074474335,
0.4336097836494446,
-0.10158023238182068,
-0.06221170723438263,
-0.03331807255744934,
-0.22592578828334808,
0.08395926654338837,
0.37528282403945923,
0.5185196995735168,
0.12839849293231964,
-0.06737612187862396,
-0.19588589668273926,
0.4672722816467285,
-0.2192438244819641,
0.17794936895370483,
-0.20386561751365662,
-0.17934943735599518,
0.3135683834552765,
0.2497531920671463,
-0.273095041513443,
0.03099793754518032,
-0.17708754539489746,
0.25754478573799133,
-0.10390355437994003,
-0.0011547468602657318,
0.23048299551010132,
-0.07781416177749634,
-0.06710216403007507,
-0.15761682391166687,
0.24960947036743164,
0.20834046602249146,
0.1931154727935791,
-0.1571984738111496,
-0.2099776715040207,
-0.13444767892360687,
0.10787541419267654,
0.17928466200828552,
-0.21969890594482422,
0.4349502623081207,
-0.27408739924430847,
0.6657384634017944,
-0.04187595099210739,
-0.28672489523887634,
-0.08665589988231659,
0.11307171732187271,
-0.15114399790763855,
0.2762818932533264,
-0.0008572190999984741,
-0.3619362413883209,
0.1643405258655548,
-0.2155577838420868,
0.18538197875022888,
-0.02287575602531433,
-0.13947294652462006,
0.0004782509058713913,
-0.27965229749679565,
-0.03278721123933792,
-0.03354109078645706,
0.024541079998016357,
0.20801298320293427,
-0.3054000437259674,
-0.010693646967411041,
-0.013176602311432362,
0.32297223806381226,
0.13475340604782104,
-0.03777574002742767,
0.08431346714496613,
-0.028995748609304428,
-0.10960309207439423,
0.15736164152622223,
-0.04934167116880417,
0.1831279844045639,
0.02032368630170822,
-0.05692654103040695,
0.280897855758667,
0.2859087586402893,
0.1310747116804123,
-0.23626509308815002,
-0.2065972238779068,
-0.006852183490991592,
-0.7531388401985168,
0.18554216623306274,
-0.19962766766548157,
-0.03190024942159653,
-0.5280658602714539,
-0.12727373838424683,
0.3122726082801819,
-0.11844807118177414,
0.08026190102100372,
-0.0743064135313034,
0.15247850120067596,
-0.2384616583585739,
-0.05105393007397652,
0.1306578516960144,
0.17363277077674866,
0.08903414756059647,
0.005219816230237484,
0.11175058037042618,
0.328652948141098,
0.4651629626750946,
0.07659266144037247,
0.08264698088169098,
0.033566832542419434,
0.2779819667339325,
-0.18152938783168793,
-0.1355966180562973,
-0.04786960408091545,
-0.06730073690414429,
0.15831288695335388,
-0.23558580875396729,
0.7212932109832764,
-0.4271330237388611,
0.05873109772801399,
0.05137164890766144,
-0.0013040434569120407,
-0.07943416386842728,
-0.14697809517383575,
-0.17329418659210205,
0.04530518501996994,
0.21682441234588623,
0.34049680829048157,
0.07887358963489532,
-0.08342855423688889,
-0.069132000207901,
0.2521124482154846,
0.1197294294834137,
-0.18993408977985382,
-0.2990875542163849,
-0.18847903609275818,
-0.10436662286520004,
-0.4804191291332245,
0.17291873693466187,
0.11623187363147736,
0.3918758034706116,
0.281907856464386,
0.28372499346733093,
0.11650290340185165,
-0.2171948105096817,
-0.2793142795562744,
0.26731887459754944,
0.182888925075531,
0.13781291246414185,
0.2806064188480377,
-0.14852192997932434,
0.07074014842510223,
-0.39159804582595825,
0.2207622528076172,
0.2650700807571411,
-0.01336299441754818,
-0.35188788175582886,
-0.15224425494670868,
-0.1378498673439026,
-0.07462824881076813,
-0.12038910388946533,
-0.17122657597064972,
0.1305275410413742,
-0.455519437789917,
0.3044014573097229,
-0.12371540069580078,
-0.2731349766254425,
0.16261634230613708,
0.2580735385417938,
0.7459710240364075,
-0.1907568722963333,
0.504533052444458,
-0.13824498653411865,
-0.007019854616373777,
-0.21165123581886292,
0.2579221725463867,
0.0966847613453865,
-0.08386865258216858,
0.37436890602111816,
-0.4017738699913025,
-0.23225630819797516,
0.1287764608860016,
-0.511859118938446,
0.22213968634605408,
-0.1943453997373581,
0.1535189300775528,
0.35802778601646423,
0.05348445847630501,
0.1261327862739563,
0.14850148558616638,
-0.27679458260536194,
-0.19663235545158386,
-0.3911307454109192,
-0.3426996171474457,
0.03453071415424347,
0.01029896829277277,
-0.28634539246559143,
-0.7201511859893799,
-0.12505018711090088,
-0.008855724707245827,
0.20894283056259155,
-0.026758503168821335,
0.2909319996833801,
0.07177586108446121,
-0.043982088565826416,
-0.04448944330215454,
-0.012262308970093727,
0.07261514663696289,
-0.23228900134563446,
-0.5153963565826416,
0.07043783366680145,
-0.36852899193763733,
-0.23332072794437408,
-0.01613619178533554,
0.1601327359676361,
0.16089855134487152,
-0.2680286169052124,
-0.13437998294830322,
-0.1933610439300537,
0.15638083219528198,
0.20185218751430511,
0.0828436017036438,
0.1836090087890625,
0.2864099442958832,
-0.31858715415000916,
-0.13399621844291687,
-0.4224168062210083,
-0.048428598791360855,
0.393046498298645,
0.04122154787182808,
0.0481196828186512,
-0.24871286749839783,
-0.2033090591430664,
0.16856060922145844,
0.4425642490386963,
0.4191022515296936,
0.26540231704711914,
-0.11366719007492065,
0.05834484100341797,
0.05904119461774826,
-0.049962349236011505,
0.31907975673675537,
0.597197949886322,
0.19270363450050354,
-0.163950115442276,
0.5791881680488586,
0.139251247048378,
-0.08434873819351196,
0.07334685325622559,
-0.1625446379184723,
-0.458731085062027,
-0.25545668601989746,
-0.15932071208953857,
-0.11664976179599762,
-0.17707955837249756,
0.12458056211471558,
0.18732726573944092,
-0.24070380628108978,
0.1849079132080078,
0.16476616263389587,
0.015314832329750061,
0.24368420243263245,
-0.13645896315574646,
-0.09452047944068909,
-0.01008569821715355,
-0.4923829436302185,
0.0687633603811264,
-0.05998794361948967,
0.2586652636528015,
0.05548907443881035,
-0.29157567024230957,
0.246210977435112,
-0.2525007426738739,
0.37164080142974854,
-0.532577633857727,
0.12424065172672272,
-0.18792413175106049,
-0.010641377419233322,
0.12742233276367188,
-0.2856524884700775,
-0.3115997016429901,
0.22715944051742554,
0.266964852809906,
0.3987363278865814,
-0.1938731074333191,
-0.20895779132843018,
0.15460525453090668,
-0.3390823304653168,
-0.02521982416510582,
0.3421180248260498,
0.05816664919257164,
-0.13528046011924744,
0.1005706638097763,
0.36637842655181885,
0.37369218468666077,
0.1932862550020218,
-0.2662164568901062,
0.09416314959526062,
0.25438690185546875,
0.10397111624479294,
0.16350342333316803,
0.27078455686569214,
0.023278528824448586,
-0.11758123338222504,
0.0032198168337345123,
0.15973544120788574,
0.1690310835838318,
0.37212663888931274,
0.5733540058135986,
-0.33023422956466675,
-0.01128658652305603,
0.26696082949638367,
-0.18916013836860657,
0.0041249096393585205,
0.48373639583587646,
0.04897211864590645,
-0.20582127571105957,
0.09025728702545166,
0.11349966377019882,
-0.45412588119506836,
0.22731918096542358,
0.17792591452598572,
0.010521835647523403,
-0.09872599691152573,
-0.05085872858762741,
0.0723784938454628,
0.1733487993478775,
-0.2822421193122864,
0.2563120722770691,
0.08931809663772583,
-0.22619017958641052,
-0.014134759083390236,
0.3856251537799835,
0.5357545018196106,
0.10576515644788742,
0.07779520004987717,
0.19207394123077393,
-0.5726898908615112,
0.18834605813026428,
-0.3067242503166199,
0.06451936066150665,
-0.23418903350830078,
-0.14913609623908997,
-0.032390810549259186,
-0.05962131917476654,
0.14771610498428345,
-0.05419763922691345,
-0.000048976391553878784,
-0.01429152674973011,
0.07261139154434204,
0.2146490514278412,
0.14310550689697266,
0.026257894933223724,
0.10176775604486465,
0.11000476777553558,
-0.09464343637228012,
0.17377768456935883,
0.035565152764320374,
0.19520318508148193,
0.1017584428191185,
-0.08926808089017868,
-0.3645235300064087,
-0.21497036516666412,
-0.48489904403686523,
0.06473472714424133,
-0.17094846069812775,
-0.32341837882995605,
0.11288024485111237,
-0.1069464460015297,
0.13802650570869446,
0.11851978302001953,
0.08230025321245193,
-0.1383761465549469,
-0.25626060366630554,
0.38889795541763306,
0.113996721804142,
0.1193072497844696,
0.08194911479949951,
0.04475868493318558,
0.612093448638916,
-0.1735788881778717,
0.06728822737932205,
-0.02502591907978058,
-0.13326896727085114,
-0.34871405363082886,
-0.13902011513710022,
0.28191184997558594,
0.2956058979034424,
-0.047197096049785614,
0.21831874549388885,
0.3014320135116577,
0.13921724259853363,
-0.3541213870048523,
0.15706408023834229,
0.004244215786457062,
-0.43084946274757385,
0.4017975628376007,
-0.09396196901798248,
-0.23934978246688843,
-0.18565243482589722,
0.21738654375076294,
0.15591779351234436,
-0.20234209299087524,
0.14278456568717957,
-0.002305585891008377,
-0.15083366632461548,
-0.4776885211467743,
0.11898041516542435,
0.5145730972290039,
-0.0484277568757534,
0.17432542145252228,
-0.2673068940639496,
-0.20669874548912048,
0.4550696015357971,
0.3447689116001129,
0.035942401736974716,
0.034342795610427856,
-0.30888083577156067,
-0.22889578342437744,
-0.033146366477012634,
0.12718398869037628,
-0.2885468602180481,
0.21915410459041595,
0.029697135090827942,
0.37678956985473633,
0.04241073876619339,
0.14115136861801147,
-0.41741302609443665,
0.2540646493434906,
-0.15342892706394196,
0.14368104934692383,
-0.6298025846481323,
-0.15803474187850952,
0.02049751579761505,
0.0007427185773849487,
0.05781133472919464,
0.09505955129861832,
-0.3548567593097687,
-0.24986058473587036,
-0.26346659660339355,
0.11375188827514648,
-0.11127898842096329,
-0.16711796820163727,
-0.035637032240629196,
0.08744899183511734,
-0.22505271434783936,
0.0927860215306282,
0.41921743750572205,
-0.10395058244466782,
0.15850910544395447,
-0.08867888152599335,
0.5829920172691345,
0.06811827421188354,
-0.15199440717697144,
-0.054968759417533875,
-0.05009637773036957,
0.12955203652381897,
0.057371851056814194,
0.1405581682920456,
-0.009612901136279106,
-0.11210732161998749,
0.03302473574876785,
0.38213932514190674,
0.2789592742919922,
0.0996154174208641,
0.23606553673744202,
-0.0224321112036705,
0.03836827352643013,
-0.22800244390964508,
0.328677237033844,
0.4875807464122772,
0.042329635471105576,
-0.3038291037082672,
-0.04247855767607689,
0.26640188694000244,
-0.22449077665805817,
-0.010821729898452759,
-0.23640546202659607,
-0.143599271774292,
-0.032035231590270996,
0.18876010179519653,
0.4392045736312866,
0.02094002068042755,
-0.17845721542835236,
0.009066363796591759,
0.23477007448673248,
0.2200240194797516,
0.23203665018081665,
0.5790866017341614,
-0.21254082024097443,
0.12400056421756744,
0.16958105564117432,
-0.41026759147644043,
0.03805934637784958,
0.09129710495471954,
0.09916654229164124,
0.6833835244178772,
0.08381269872188568,
0.2643548548221588,
0.12595221400260925,
-0.17812487483024597,
0.24377131462097168,
0.09789858758449554,
0.007488682866096497,
0.16126161813735962,
0.0021963417530059814,
0.430032342672348,
-0.4058029055595398,
-0.22154578566551208,
-0.30237430334091187,
0.21710270643234253,
-0.22417107224464417,
-0.2368309497833252,
-0.36832550168037415,
-0.2948790192604065,
-0.2902420461177826,
0.18876619637012482,
-0.074763223528862,
0.09291916340589523,
0.40933194756507874,
-0.09137745201587677,
-0.2765524387359619,
0.049728430807590485,
-0.35356494784355164,
-0.21030133962631226,
0.36504122614860535,
-0.29174160957336426,
0.2847002148628235,
-0.2200927585363388,
-0.15949800610542297,
0.34990331530570984,
0.19887429475784302,
0.28616002202033997,
-0.0198507122695446,
-0.15332376956939697,
-0.48371192812919617,
0.35531264543533325,
0.07065688073635101,
-0.07674495875835419,
0.17935366928577423,
0.3036482334136963,
0.07276472449302673,
0.17705906927585602,
0.1626986414194107,
-0.1318831592798233,
-0.06134944036602974,
0.15510666370391846,
-0.15156374871730804,
0.09760457277297974,
0.18688833713531494,
-0.14441382884979248,
-0.04734228923916817,
0.07168465852737427,
0.10951486229896545,
-0.09852339327335358,
-0.03384314104914665,
-0.3110511004924774,
-0.07021959871053696,
0.05551985651254654,
-0.0005470408359542489,
0.13292354345321655,
-0.16443711519241333,
0.5421860218048096,
-0.10478945076465607,
-0.2510837912559509,
-0.25871267914772034,
-0.2793656289577484,
-0.13051408529281616,
-0.005938410758972168,
0.3560914993286133,
-0.2456262707710266,
0.06895554065704346,
-0.014264892786741257,
0.2070837765932083,
0.018804039806127548,
0.1268579065799713,
-0.1372823864221573,
0.21607576310634613,
0.3777534067630768,
-0.4060506224632263,
0.3245939612388611,
0.21845026314258575,
0.07172245532274246,
-0.018981527537107468,
0.013804778456687927,
0.20727920532226562,
-0.022309189662337303,
-0.003334667533636093,
0.16810369491577148,
-0.17956581711769104,
0.49608123302459717,
0.2265222817659378,
-0.057408928871154785,
0.15238162875175476,
0.2522686719894409,
-0.11047128587961197,
-0.27067285776138306,
-0.2716212272644043,
0.16399438679218292,
-0.3892745077610016,
-0.0552578940987587,
-0.17202451825141907,
0.2142082005739212,
0.07811637967824936,
-0.16373097896575928,
0.16912078857421875,
-0.2544028162956238,
0.29602545499801636,
0.12516219913959503,
-0.23508624732494354,
-0.11537618935108185,
-0.09259289503097534,
-0.046198517084121704,
0.33342501521110535,
0.5228874087333679,
0.03222418576478958,
-0.19763252139091492,
-0.4064098596572876,
-0.06277257204055786,
0.2906959354877472,
-0.0037271492183208466,
0.11275491118431091,
-0.37159237265586853,
0.21962326765060425,
0.22836247086524963,
-0.03525848686695099,
-0.7675589919090271,
-0.33596569299697876,
0.1056845486164093,
-0.2780991792678833,
-0.2789597511291504,
0.440448135137558,
0.124614417552948,
-0.19361010193824768,
-0.003879137337207794,
-0.06189166009426117,
0.05158405005931854,
-0.1427290290594101,
-0.11213725805282593,
-0.11822205781936646
] |
https://github.com/huggingface/datasets/issues/4795 | Missing MBPP splits | @albertvillanova The first author of the paper responded to the upstream issue:
> Task IDs 11-510 are the 500 test problems. We use 90 problems (511-600) for validation and then remaining 374 for fine-tuning (601-974). The other problems can be used as desired, either for training or few-shot prompting (although this should be specified). | (@albertvillanova)
The [MBPP dataset on the Hub](https://huggingface.co/datasets/mbpp) has only a test split for both its "full" and its "sanitized" subset, while the [paper](https://arxiv.org/abs/2108.07732) states in subsection 2.1 regarding the full split:
> In the experiments described later in the paper, we hold out 10 problems for **few-shot prompting**, another 500 as our **test** dataset (which is used to evaluate both few-shot inference and fine-tuned models), 374 problems for **fine-tuning**, and the rest for **validation**.
If the dataset on the Hub should reproduce most closely what the original authors use, I guess this four-way split should be reflected.
The paper doesn't explicitly state the task_id ranges of the splits, but the [GitHub readme](https://github.com/google-research/google-research/tree/master/mbpp) referenced in the paper specifies exact task_id ranges, although it misstates the total number of samples:
> We specify a train and test split to use for evaluation. Specifically:
>
> * Task IDs 11-510 are used for evaluation.
> * Task IDs 1-10 and 511-1000 are used for training and/or prompting. We typically used 1-10 for few-shot prompting, although you can feel free to use any of the training examples.
I.e. the few-shot, train and validation splits are combined into one split, with a soft suggestion of using the first ten for few-shot prompting. It is not explicitly stated whether the 374 fine-tuning samples mentioned in the paper have task_id 511 to 784 or 601 to 974 or are randomly sampled from task_id 511 to 974.
Regarding the "sanitized" split the paper states the following:
> For evaluations involving the edited dataset, we perform comparisons with 100 problems that appear in both the original and edited dataset, using the same held out 10 problems for few-shot prompting and 374 problems for fine-tuning.
The statement doesn't appear to be very precise, as among the 10 few-shot problems, those with task_id 1, 5 and 10 are not even part of the sanitized variant, and many from the task_id range from 511 to 974 are missing (e.g. task_id 511 to 553). I suppose the idea the task_id ranges for each split remain the same, even if some of the task_ids are not present. That would result in 7 few-shot, 257 test, 141 train and 22 validation examples in the sanitized split. | 54 | Missing MBPP splits
(@albertvillanova)
The [MBPP dataset on the Hub](https://huggingface.co/datasets/mbpp) has only a test split for both its "full" and its "sanitized" subset, while the [paper](https://arxiv.org/abs/2108.07732) states in subsection 2.1 regarding the full split:
> In the experiments described later in the paper, we hold out 10 problems for **few-shot prompting**, another 500 as our **test** dataset (which is used to evaluate both few-shot inference and fine-tuned models), 374 problems for **fine-tuning**, and the rest for **validation**.
If the dataset on the Hub should reproduce most closely what the original authors use, I guess this four-way split should be reflected.
The paper doesn't explicitly state the task_id ranges of the splits, but the [GitHub readme](https://github.com/google-research/google-research/tree/master/mbpp) referenced in the paper specifies exact task_id ranges, although it misstates the total number of samples:
> We specify a train and test split to use for evaluation. Specifically:
>
> * Task IDs 11-510 are used for evaluation.
> * Task IDs 1-10 and 511-1000 are used for training and/or prompting. We typically used 1-10 for few-shot prompting, although you can feel free to use any of the training examples.
I.e. the few-shot, train and validation splits are combined into one split, with a soft suggestion of using the first ten for few-shot prompting. It is not explicitly stated whether the 374 fine-tuning samples mentioned in the paper have task_id 511 to 784 or 601 to 974 or are randomly sampled from task_id 511 to 974.
Regarding the "sanitized" split the paper states the following:
> For evaluations involving the edited dataset, we perform comparisons with 100 problems that appear in both the original and edited dataset, using the same held out 10 problems for few-shot prompting and 374 problems for fine-tuning.
The statement doesn't appear to be very precise, as among the 10 few-shot problems, those with task_id 1, 5 and 10 are not even part of the sanitized variant, and many from the task_id range from 511 to 974 are missing (e.g. task_id 511 to 553). I suppose the idea the task_id ranges for each split remain the same, even if some of the task_ids are not present. That would result in 7 few-shot, 257 test, 141 train and 22 validation examples in the sanitized split.
@albertvillanova The first author of the paper responded to the upstream issue:
> Task IDs 11-510 are the 500 test problems. We use 90 problems (511-600) for validation and then remaining 374 for fine-tuning (601-974). The other problems can be used as desired, either for training or few-shot prompting (although this should be specified). | [
-0.10014323890209198,
-0.519787073135376,
-0.1537647545337677,
0.059523578733205795,
-0.28050148487091064,
-0.023506175726652145,
0.3523944616317749,
0.17772087454795837,
0.04495852068066597,
0.182694211602211,
-0.3087799847126007,
0.4114336371421814,
-0.1424715220928192,
0.23289574682712555,
0.05095415562391281,
-0.13960006833076477,
0.09523817151784897,
-0.045944735407829285,
-0.04489020258188248,
0.13958796858787537,
-0.07562466710805893,
0.16071096062660217,
-0.38784945011138916,
0.008541852235794067,
-0.12231768667697906,
-0.19388015568256378,
-0.1564764380455017,
0.403494268655777,
-0.12859927117824554,
-0.14010293781757355,
-0.014514194801449776,
0.03494963049888611,
-0.24966078996658325,
0.24064278602600098,
-0.00010415568249300122,
-0.05198602378368378,
0.13139677047729492,
-0.18413706123828888,
0.07842190563678741,
0.33246171474456787,
-0.011093996465206146,
-0.06776225566864014,
-0.07718463987112045,
-0.07646562159061432,
-0.06320640444755554,
0.32729485630989075,
-0.10224619507789612,
0.3202888071537018,
0.6320270895957947,
0.3446997106075287,
0.20912307500839233,
0.1986909955739975,
-0.18045160174369812,
-0.11412612348794937,
-0.0538586750626564,
0.030012097209692,
-0.004228152334690094,
-0.17896945774555206,
0.5331035852432251,
0.3226383328437805,
-0.08839461952447891,
0.17604483664035797,
0.22778576612472534,
0.08448334038257599,
-0.07337815314531326,
-0.264839231967926,
-0.08446710556745529,
-0.5284581184387207,
-0.03729701042175293,
0.28835204243659973,
0.07741838693618774,
0.3241427540779114,
-0.15136240422725677,
-0.3758466839790344,
-0.13186591863632202,
-0.07351582497358322,
-0.013927645981311798,
-0.0294522475451231,
-0.35240691900253296,
0.09991194307804108,
-0.2281186431646347,
-0.006743734702467918,
-0.1405045986175537,
-0.4085777997970581,
-0.12646877765655518,
0.4252365231513977,
-0.14546194672584534,
-0.03511769324541092,
-0.052387502044439316,
0.24089381098747253,
-0.03671251982450485,
0.01948986016213894,
0.15192103385925293,
-0.1020398661494255,
-0.03864428773522377,
-0.32158970832824707,
0.2346954643726349,
0.4028097093105316,
0.08873239159584045,
0.5492548942565918,
0.20428498089313507,
0.12126988172531128,
-0.03088676556944847,
-0.1750001609325409,
0.3784882426261902,
-0.01607481762766838,
0.15837246179580688,
0.15758667886257172,
0.1642405390739441,
0.21994414925575256,
0.24361583590507507,
0.40847650170326233,
-0.01752353459596634,
-0.34082475304603577,
-0.3952418863773346,
0.1955559253692627,
-0.3252982497215271,
-0.25009554624557495,
-0.47602617740631104,
0.1269514113664627,
0.03868807107210159,
-0.0680113360285759,
0.03511245921254158,
0.15263676643371582,
0.07208894193172455,
0.07423001527786255,
-0.23624998331069946,
-0.11628834903240204,
-0.36681067943573,
-0.19413639605045319,
-0.25175940990448,
0.060753047466278076,
-0.29463958740234375,
-0.04791498929262161,
0.19838333129882812,
-0.12548308074474335,
0.4336097836494446,
-0.10158023238182068,
-0.06221170723438263,
-0.03331807255744934,
-0.22592578828334808,
0.08395926654338837,
0.37528282403945923,
0.5185196995735168,
0.12839849293231964,
-0.06737612187862396,
-0.19588589668273926,
0.4672722816467285,
-0.2192438244819641,
0.17794936895370483,
-0.20386561751365662,
-0.17934943735599518,
0.3135683834552765,
0.2497531920671463,
-0.273095041513443,
0.03099793754518032,
-0.17708754539489746,
0.25754478573799133,
-0.10390355437994003,
-0.0011547468602657318,
0.23048299551010132,
-0.07781416177749634,
-0.06710216403007507,
-0.15761682391166687,
0.24960947036743164,
0.20834046602249146,
0.1931154727935791,
-0.1571984738111496,
-0.2099776715040207,
-0.13444767892360687,
0.10787541419267654,
0.17928466200828552,
-0.21969890594482422,
0.4349502623081207,
-0.27408739924430847,
0.6657384634017944,
-0.04187595099210739,
-0.28672489523887634,
-0.08665589988231659,
0.11307171732187271,
-0.15114399790763855,
0.2762818932533264,
-0.0008572190999984741,
-0.3619362413883209,
0.1643405258655548,
-0.2155577838420868,
0.18538197875022888,
-0.02287575602531433,
-0.13947294652462006,
0.0004782509058713913,
-0.27965229749679565,
-0.03278721123933792,
-0.03354109078645706,
0.024541079998016357,
0.20801298320293427,
-0.3054000437259674,
-0.010693646967411041,
-0.013176602311432362,
0.32297223806381226,
0.13475340604782104,
-0.03777574002742767,
0.08431346714496613,
-0.028995748609304428,
-0.10960309207439423,
0.15736164152622223,
-0.04934167116880417,
0.1831279844045639,
0.02032368630170822,
-0.05692654103040695,
0.280897855758667,
0.2859087586402893,
0.1310747116804123,
-0.23626509308815002,
-0.2065972238779068,
-0.006852183490991592,
-0.7531388401985168,
0.18554216623306274,
-0.19962766766548157,
-0.03190024942159653,
-0.5280658602714539,
-0.12727373838424683,
0.3122726082801819,
-0.11844807118177414,
0.08026190102100372,
-0.0743064135313034,
0.15247850120067596,
-0.2384616583585739,
-0.05105393007397652,
0.1306578516960144,
0.17363277077674866,
0.08903414756059647,
0.005219816230237484,
0.11175058037042618,
0.328652948141098,
0.4651629626750946,
0.07659266144037247,
0.08264698088169098,
0.033566832542419434,
0.2779819667339325,
-0.18152938783168793,
-0.1355966180562973,
-0.04786960408091545,
-0.06730073690414429,
0.15831288695335388,
-0.23558580875396729,
0.7212932109832764,
-0.4271330237388611,
0.05873109772801399,
0.05137164890766144,
-0.0013040434569120407,
-0.07943416386842728,
-0.14697809517383575,
-0.17329418659210205,
0.04530518501996994,
0.21682441234588623,
0.34049680829048157,
0.07887358963489532,
-0.08342855423688889,
-0.069132000207901,
0.2521124482154846,
0.1197294294834137,
-0.18993408977985382,
-0.2990875542163849,
-0.18847903609275818,
-0.10436662286520004,
-0.4804191291332245,
0.17291873693466187,
0.11623187363147736,
0.3918758034706116,
0.281907856464386,
0.28372499346733093,
0.11650290340185165,
-0.2171948105096817,
-0.2793142795562744,
0.26731887459754944,
0.182888925075531,
0.13781291246414185,
0.2806064188480377,
-0.14852192997932434,
0.07074014842510223,
-0.39159804582595825,
0.2207622528076172,
0.2650700807571411,
-0.01336299441754818,
-0.35188788175582886,
-0.15224425494670868,
-0.1378498673439026,
-0.07462824881076813,
-0.12038910388946533,
-0.17122657597064972,
0.1305275410413742,
-0.455519437789917,
0.3044014573097229,
-0.12371540069580078,
-0.2731349766254425,
0.16261634230613708,
0.2580735385417938,
0.7459710240364075,
-0.1907568722963333,
0.504533052444458,
-0.13824498653411865,
-0.007019854616373777,
-0.21165123581886292,
0.2579221725463867,
0.0966847613453865,
-0.08386865258216858,
0.37436890602111816,
-0.4017738699913025,
-0.23225630819797516,
0.1287764608860016,
-0.511859118938446,
0.22213968634605408,
-0.1943453997373581,
0.1535189300775528,
0.35802778601646423,
0.05348445847630501,
0.1261327862739563,
0.14850148558616638,
-0.27679458260536194,
-0.19663235545158386,
-0.3911307454109192,
-0.3426996171474457,
0.03453071415424347,
0.01029896829277277,
-0.28634539246559143,
-0.7201511859893799,
-0.12505018711090088,
-0.008855724707245827,
0.20894283056259155,
-0.026758503168821335,
0.2909319996833801,
0.07177586108446121,
-0.043982088565826416,
-0.04448944330215454,
-0.012262308970093727,
0.07261514663696289,
-0.23228900134563446,
-0.5153963565826416,
0.07043783366680145,
-0.36852899193763733,
-0.23332072794437408,
-0.01613619178533554,
0.1601327359676361,
0.16089855134487152,
-0.2680286169052124,
-0.13437998294830322,
-0.1933610439300537,
0.15638083219528198,
0.20185218751430511,
0.0828436017036438,
0.1836090087890625,
0.2864099442958832,
-0.31858715415000916,
-0.13399621844291687,
-0.4224168062210083,
-0.048428598791360855,
0.393046498298645,
0.04122154787182808,
0.0481196828186512,
-0.24871286749839783,
-0.2033090591430664,
0.16856060922145844,
0.4425642490386963,
0.4191022515296936,
0.26540231704711914,
-0.11366719007492065,
0.05834484100341797,
0.05904119461774826,
-0.049962349236011505,
0.31907975673675537,
0.597197949886322,
0.19270363450050354,
-0.163950115442276,
0.5791881680488586,
0.139251247048378,
-0.08434873819351196,
0.07334685325622559,
-0.1625446379184723,
-0.458731085062027,
-0.25545668601989746,
-0.15932071208953857,
-0.11664976179599762,
-0.17707955837249756,
0.12458056211471558,
0.18732726573944092,
-0.24070380628108978,
0.1849079132080078,
0.16476616263389587,
0.015314832329750061,
0.24368420243263245,
-0.13645896315574646,
-0.09452047944068909,
-0.01008569821715355,
-0.4923829436302185,
0.0687633603811264,
-0.05998794361948967,
0.2586652636528015,
0.05548907443881035,
-0.29157567024230957,
0.246210977435112,
-0.2525007426738739,
0.37164080142974854,
-0.532577633857727,
0.12424065172672272,
-0.18792413175106049,
-0.010641377419233322,
0.12742233276367188,
-0.2856524884700775,
-0.3115997016429901,
0.22715944051742554,
0.266964852809906,
0.3987363278865814,
-0.1938731074333191,
-0.20895779132843018,
0.15460525453090668,
-0.3390823304653168,
-0.02521982416510582,
0.3421180248260498,
0.05816664919257164,
-0.13528046011924744,
0.1005706638097763,
0.36637842655181885,
0.37369218468666077,
0.1932862550020218,
-0.2662164568901062,
0.09416314959526062,
0.25438690185546875,
0.10397111624479294,
0.16350342333316803,
0.27078455686569214,
0.023278528824448586,
-0.11758123338222504,
0.0032198168337345123,
0.15973544120788574,
0.1690310835838318,
0.37212663888931274,
0.5733540058135986,
-0.33023422956466675,
-0.01128658652305603,
0.26696082949638367,
-0.18916013836860657,
0.0041249096393585205,
0.48373639583587646,
0.04897211864590645,
-0.20582127571105957,
0.09025728702545166,
0.11349966377019882,
-0.45412588119506836,
0.22731918096542358,
0.17792591452598572,
0.010521835647523403,
-0.09872599691152573,
-0.05085872858762741,
0.0723784938454628,
0.1733487993478775,
-0.2822421193122864,
0.2563120722770691,
0.08931809663772583,
-0.22619017958641052,
-0.014134759083390236,
0.3856251537799835,
0.5357545018196106,
0.10576515644788742,
0.07779520004987717,
0.19207394123077393,
-0.5726898908615112,
0.18834605813026428,
-0.3067242503166199,
0.06451936066150665,
-0.23418903350830078,
-0.14913609623908997,
-0.032390810549259186,
-0.05962131917476654,
0.14771610498428345,
-0.05419763922691345,
-0.000048976391553878784,
-0.01429152674973011,
0.07261139154434204,
0.2146490514278412,
0.14310550689697266,
0.026257894933223724,
0.10176775604486465,
0.11000476777553558,
-0.09464343637228012,
0.17377768456935883,
0.035565152764320374,
0.19520318508148193,
0.1017584428191185,
-0.08926808089017868,
-0.3645235300064087,
-0.21497036516666412,
-0.48489904403686523,
0.06473472714424133,
-0.17094846069812775,
-0.32341837882995605,
0.11288024485111237,
-0.1069464460015297,
0.13802650570869446,
0.11851978302001953,
0.08230025321245193,
-0.1383761465549469,
-0.25626060366630554,
0.38889795541763306,
0.113996721804142,
0.1193072497844696,
0.08194911479949951,
0.04475868493318558,
0.612093448638916,
-0.1735788881778717,
0.06728822737932205,
-0.02502591907978058,
-0.13326896727085114,
-0.34871405363082886,
-0.13902011513710022,
0.28191184997558594,
0.2956058979034424,
-0.047197096049785614,
0.21831874549388885,
0.3014320135116577,
0.13921724259853363,
-0.3541213870048523,
0.15706408023834229,
0.004244215786457062,
-0.43084946274757385,
0.4017975628376007,
-0.09396196901798248,
-0.23934978246688843,
-0.18565243482589722,
0.21738654375076294,
0.15591779351234436,
-0.20234209299087524,
0.14278456568717957,
-0.002305585891008377,
-0.15083366632461548,
-0.4776885211467743,
0.11898041516542435,
0.5145730972290039,
-0.0484277568757534,
0.17432542145252228,
-0.2673068940639496,
-0.20669874548912048,
0.4550696015357971,
0.3447689116001129,
0.035942401736974716,
0.034342795610427856,
-0.30888083577156067,
-0.22889578342437744,
-0.033146366477012634,
0.12718398869037628,
-0.2885468602180481,
0.21915410459041595,
0.029697135090827942,
0.37678956985473633,
0.04241073876619339,
0.14115136861801147,
-0.41741302609443665,
0.2540646493434906,
-0.15342892706394196,
0.14368104934692383,
-0.6298025846481323,
-0.15803474187850952,
0.02049751579761505,
0.0007427185773849487,
0.05781133472919464,
0.09505955129861832,
-0.3548567593097687,
-0.24986058473587036,
-0.26346659660339355,
0.11375188827514648,
-0.11127898842096329,
-0.16711796820163727,
-0.035637032240629196,
0.08744899183511734,
-0.22505271434783936,
0.0927860215306282,
0.41921743750572205,
-0.10395058244466782,
0.15850910544395447,
-0.08867888152599335,
0.5829920172691345,
0.06811827421188354,
-0.15199440717697144,
-0.054968759417533875,
-0.05009637773036957,
0.12955203652381897,
0.057371851056814194,
0.1405581682920456,
-0.009612901136279106,
-0.11210732161998749,
0.03302473574876785,
0.38213932514190674,
0.2789592742919922,
0.0996154174208641,
0.23606553673744202,
-0.0224321112036705,
0.03836827352643013,
-0.22800244390964508,
0.328677237033844,
0.4875807464122772,
0.042329635471105576,
-0.3038291037082672,
-0.04247855767607689,
0.26640188694000244,
-0.22449077665805817,
-0.010821729898452759,
-0.23640546202659607,
-0.143599271774292,
-0.032035231590270996,
0.18876010179519653,
0.4392045736312866,
0.02094002068042755,
-0.17845721542835236,
0.009066363796591759,
0.23477007448673248,
0.2200240194797516,
0.23203665018081665,
0.5790866017341614,
-0.21254082024097443,
0.12400056421756744,
0.16958105564117432,
-0.41026759147644043,
0.03805934637784958,
0.09129710495471954,
0.09916654229164124,
0.6833835244178772,
0.08381269872188568,
0.2643548548221588,
0.12595221400260925,
-0.17812487483024597,
0.24377131462097168,
0.09789858758449554,
0.007488682866096497,
0.16126161813735962,
0.0021963417530059814,
0.430032342672348,
-0.4058029055595398,
-0.22154578566551208,
-0.30237430334091187,
0.21710270643234253,
-0.22417107224464417,
-0.2368309497833252,
-0.36832550168037415,
-0.2948790192604065,
-0.2902420461177826,
0.18876619637012482,
-0.074763223528862,
0.09291916340589523,
0.40933194756507874,
-0.09137745201587677,
-0.2765524387359619,
0.049728430807590485,
-0.35356494784355164,
-0.21030133962631226,
0.36504122614860535,
-0.29174160957336426,
0.2847002148628235,
-0.2200927585363388,
-0.15949800610542297,
0.34990331530570984,
0.19887429475784302,
0.28616002202033997,
-0.0198507122695446,
-0.15332376956939697,
-0.48371192812919617,
0.35531264543533325,
0.07065688073635101,
-0.07674495875835419,
0.17935366928577423,
0.3036482334136963,
0.07276472449302673,
0.17705906927585602,
0.1626986414194107,
-0.1318831592798233,
-0.06134944036602974,
0.15510666370391846,
-0.15156374871730804,
0.09760457277297974,
0.18688833713531494,
-0.14441382884979248,
-0.04734228923916817,
0.07168465852737427,
0.10951486229896545,
-0.09852339327335358,
-0.03384314104914665,
-0.3110511004924774,
-0.07021959871053696,
0.05551985651254654,
-0.0005470408359542489,
0.13292354345321655,
-0.16443711519241333,
0.5421860218048096,
-0.10478945076465607,
-0.2510837912559509,
-0.25871267914772034,
-0.2793656289577484,
-0.13051408529281616,
-0.005938410758972168,
0.3560914993286133,
-0.2456262707710266,
0.06895554065704346,
-0.014264892786741257,
0.2070837765932083,
0.018804039806127548,
0.1268579065799713,
-0.1372823864221573,
0.21607576310634613,
0.3777534067630768,
-0.4060506224632263,
0.3245939612388611,
0.21845026314258575,
0.07172245532274246,
-0.018981527537107468,
0.013804778456687927,
0.20727920532226562,
-0.022309189662337303,
-0.003334667533636093,
0.16810369491577148,
-0.17956581711769104,
0.49608123302459717,
0.2265222817659378,
-0.057408928871154785,
0.15238162875175476,
0.2522686719894409,
-0.11047128587961197,
-0.27067285776138306,
-0.2716212272644043,
0.16399438679218292,
-0.3892745077610016,
-0.0552578940987587,
-0.17202451825141907,
0.2142082005739212,
0.07811637967824936,
-0.16373097896575928,
0.16912078857421875,
-0.2544028162956238,
0.29602545499801636,
0.12516219913959503,
-0.23508624732494354,
-0.11537618935108185,
-0.09259289503097534,
-0.046198517084121704,
0.33342501521110535,
0.5228874087333679,
0.03222418576478958,
-0.19763252139091492,
-0.4064098596572876,
-0.06277257204055786,
0.2906959354877472,
-0.0037271492183208466,
0.11275491118431091,
-0.37159237265586853,
0.21962326765060425,
0.22836247086524963,
-0.03525848686695099,
-0.7675589919090271,
-0.33596569299697876,
0.1056845486164093,
-0.2780991792678833,
-0.2789597511291504,
0.440448135137558,
0.124614417552948,
-0.19361010193824768,
-0.003879137337207794,
-0.06189166009426117,
0.05158405005931854,
-0.1427290290594101,
-0.11213725805282593,
-0.11822205781936646
] |
https://github.com/huggingface/datasets/issues/4795 | Missing MBPP splits | Thanks for the follow-up, @stadlerb.
Would you be willing to open a Pull Request to address this issue? :wink: | (@albertvillanova)
The [MBPP dataset on the Hub](https://huggingface.co/datasets/mbpp) has only a test split for both its "full" and its "sanitized" subset, while the [paper](https://arxiv.org/abs/2108.07732) states in subsection 2.1 regarding the full split:
> In the experiments described later in the paper, we hold out 10 problems for **few-shot prompting**, another 500 as our **test** dataset (which is used to evaluate both few-shot inference and fine-tuned models), 374 problems for **fine-tuning**, and the rest for **validation**.
If the dataset on the Hub should reproduce most closely what the original authors use, I guess this four-way split should be reflected.
The paper doesn't explicitly state the task_id ranges of the splits, but the [GitHub readme](https://github.com/google-research/google-research/tree/master/mbpp) referenced in the paper specifies exact task_id ranges, although it misstates the total number of samples:
> We specify a train and test split to use for evaluation. Specifically:
>
> * Task IDs 11-510 are used for evaluation.
> * Task IDs 1-10 and 511-1000 are used for training and/or prompting. We typically used 1-10 for few-shot prompting, although you can feel free to use any of the training examples.
I.e. the few-shot, train and validation splits are combined into one split, with a soft suggestion of using the first ten for few-shot prompting. It is not explicitly stated whether the 374 fine-tuning samples mentioned in the paper have task_id 511 to 784 or 601 to 974 or are randomly sampled from task_id 511 to 974.
Regarding the "sanitized" split the paper states the following:
> For evaluations involving the edited dataset, we perform comparisons with 100 problems that appear in both the original and edited dataset, using the same held out 10 problems for few-shot prompting and 374 problems for fine-tuning.
The statement doesn't appear to be very precise, as among the 10 few-shot problems, those with task_id 1, 5 and 10 are not even part of the sanitized variant, and many from the task_id range from 511 to 974 are missing (e.g. task_id 511 to 553). I suppose the idea the task_id ranges for each split remain the same, even if some of the task_ids are not present. That would result in 7 few-shot, 257 test, 141 train and 22 validation examples in the sanitized split. | 19 | Missing MBPP splits
(@albertvillanova)
The [MBPP dataset on the Hub](https://huggingface.co/datasets/mbpp) has only a test split for both its "full" and its "sanitized" subset, while the [paper](https://arxiv.org/abs/2108.07732) states in subsection 2.1 regarding the full split:
> In the experiments described later in the paper, we hold out 10 problems for **few-shot prompting**, another 500 as our **test** dataset (which is used to evaluate both few-shot inference and fine-tuned models), 374 problems for **fine-tuning**, and the rest for **validation**.
If the dataset on the Hub should reproduce most closely what the original authors use, I guess this four-way split should be reflected.
The paper doesn't explicitly state the task_id ranges of the splits, but the [GitHub readme](https://github.com/google-research/google-research/tree/master/mbpp) referenced in the paper specifies exact task_id ranges, although it misstates the total number of samples:
> We specify a train and test split to use for evaluation. Specifically:
>
> * Task IDs 11-510 are used for evaluation.
> * Task IDs 1-10 and 511-1000 are used for training and/or prompting. We typically used 1-10 for few-shot prompting, although you can feel free to use any of the training examples.
I.e. the few-shot, train and validation splits are combined into one split, with a soft suggestion of using the first ten for few-shot prompting. It is not explicitly stated whether the 374 fine-tuning samples mentioned in the paper have task_id 511 to 784 or 601 to 974 or are randomly sampled from task_id 511 to 974.
Regarding the "sanitized" split the paper states the following:
> For evaluations involving the edited dataset, we perform comparisons with 100 problems that appear in both the original and edited dataset, using the same held out 10 problems for few-shot prompting and 374 problems for fine-tuning.
The statement doesn't appear to be very precise, as among the 10 few-shot problems, those with task_id 1, 5 and 10 are not even part of the sanitized variant, and many from the task_id range from 511 to 974 are missing (e.g. task_id 511 to 553). I suppose the idea the task_id ranges for each split remain the same, even if some of the task_ids are not present. That would result in 7 few-shot, 257 test, 141 train and 22 validation examples in the sanitized split.
Thanks for the follow-up, @stadlerb.
Would you be willing to open a Pull Request to address this issue? :wink: | [
-0.10014323890209198,
-0.519787073135376,
-0.1537647545337677,
0.059523578733205795,
-0.28050148487091064,
-0.023506175726652145,
0.3523944616317749,
0.17772087454795837,
0.04495852068066597,
0.182694211602211,
-0.3087799847126007,
0.4114336371421814,
-0.1424715220928192,
0.23289574682712555,
0.05095415562391281,
-0.13960006833076477,
0.09523817151784897,
-0.045944735407829285,
-0.04489020258188248,
0.13958796858787537,
-0.07562466710805893,
0.16071096062660217,
-0.38784945011138916,
0.008541852235794067,
-0.12231768667697906,
-0.19388015568256378,
-0.1564764380455017,
0.403494268655777,
-0.12859927117824554,
-0.14010293781757355,
-0.014514194801449776,
0.03494963049888611,
-0.24966078996658325,
0.24064278602600098,
-0.00010415568249300122,
-0.05198602378368378,
0.13139677047729492,
-0.18413706123828888,
0.07842190563678741,
0.33246171474456787,
-0.011093996465206146,
-0.06776225566864014,
-0.07718463987112045,
-0.07646562159061432,
-0.06320640444755554,
0.32729485630989075,
-0.10224619507789612,
0.3202888071537018,
0.6320270895957947,
0.3446997106075287,
0.20912307500839233,
0.1986909955739975,
-0.18045160174369812,
-0.11412612348794937,
-0.0538586750626564,
0.030012097209692,
-0.004228152334690094,
-0.17896945774555206,
0.5331035852432251,
0.3226383328437805,
-0.08839461952447891,
0.17604483664035797,
0.22778576612472534,
0.08448334038257599,
-0.07337815314531326,
-0.264839231967926,
-0.08446710556745529,
-0.5284581184387207,
-0.03729701042175293,
0.28835204243659973,
0.07741838693618774,
0.3241427540779114,
-0.15136240422725677,
-0.3758466839790344,
-0.13186591863632202,
-0.07351582497358322,
-0.013927645981311798,
-0.0294522475451231,
-0.35240691900253296,
0.09991194307804108,
-0.2281186431646347,
-0.006743734702467918,
-0.1405045986175537,
-0.4085777997970581,
-0.12646877765655518,
0.4252365231513977,
-0.14546194672584534,
-0.03511769324541092,
-0.052387502044439316,
0.24089381098747253,
-0.03671251982450485,
0.01948986016213894,
0.15192103385925293,
-0.1020398661494255,
-0.03864428773522377,
-0.32158970832824707,
0.2346954643726349,
0.4028097093105316,
0.08873239159584045,
0.5492548942565918,
0.20428498089313507,
0.12126988172531128,
-0.03088676556944847,
-0.1750001609325409,
0.3784882426261902,
-0.01607481762766838,
0.15837246179580688,
0.15758667886257172,
0.1642405390739441,
0.21994414925575256,
0.24361583590507507,
0.40847650170326233,
-0.01752353459596634,
-0.34082475304603577,
-0.3952418863773346,
0.1955559253692627,
-0.3252982497215271,
-0.25009554624557495,
-0.47602617740631104,
0.1269514113664627,
0.03868807107210159,
-0.0680113360285759,
0.03511245921254158,
0.15263676643371582,
0.07208894193172455,
0.07423001527786255,
-0.23624998331069946,
-0.11628834903240204,
-0.36681067943573,
-0.19413639605045319,
-0.25175940990448,
0.060753047466278076,
-0.29463958740234375,
-0.04791498929262161,
0.19838333129882812,
-0.12548308074474335,
0.4336097836494446,
-0.10158023238182068,
-0.06221170723438263,
-0.03331807255744934,
-0.22592578828334808,
0.08395926654338837,
0.37528282403945923,
0.5185196995735168,
0.12839849293231964,
-0.06737612187862396,
-0.19588589668273926,
0.4672722816467285,
-0.2192438244819641,
0.17794936895370483,
-0.20386561751365662,
-0.17934943735599518,
0.3135683834552765,
0.2497531920671463,
-0.273095041513443,
0.03099793754518032,
-0.17708754539489746,
0.25754478573799133,
-0.10390355437994003,
-0.0011547468602657318,
0.23048299551010132,
-0.07781416177749634,
-0.06710216403007507,
-0.15761682391166687,
0.24960947036743164,
0.20834046602249146,
0.1931154727935791,
-0.1571984738111496,
-0.2099776715040207,
-0.13444767892360687,
0.10787541419267654,
0.17928466200828552,
-0.21969890594482422,
0.4349502623081207,
-0.27408739924430847,
0.6657384634017944,
-0.04187595099210739,
-0.28672489523887634,
-0.08665589988231659,
0.11307171732187271,
-0.15114399790763855,
0.2762818932533264,
-0.0008572190999984741,
-0.3619362413883209,
0.1643405258655548,
-0.2155577838420868,
0.18538197875022888,
-0.02287575602531433,
-0.13947294652462006,
0.0004782509058713913,
-0.27965229749679565,
-0.03278721123933792,
-0.03354109078645706,
0.024541079998016357,
0.20801298320293427,
-0.3054000437259674,
-0.010693646967411041,
-0.013176602311432362,
0.32297223806381226,
0.13475340604782104,
-0.03777574002742767,
0.08431346714496613,
-0.028995748609304428,
-0.10960309207439423,
0.15736164152622223,
-0.04934167116880417,
0.1831279844045639,
0.02032368630170822,
-0.05692654103040695,
0.280897855758667,
0.2859087586402893,
0.1310747116804123,
-0.23626509308815002,
-0.2065972238779068,
-0.006852183490991592,
-0.7531388401985168,
0.18554216623306274,
-0.19962766766548157,
-0.03190024942159653,
-0.5280658602714539,
-0.12727373838424683,
0.3122726082801819,
-0.11844807118177414,
0.08026190102100372,
-0.0743064135313034,
0.15247850120067596,
-0.2384616583585739,
-0.05105393007397652,
0.1306578516960144,
0.17363277077674866,
0.08903414756059647,
0.005219816230237484,
0.11175058037042618,
0.328652948141098,
0.4651629626750946,
0.07659266144037247,
0.08264698088169098,
0.033566832542419434,
0.2779819667339325,
-0.18152938783168793,
-0.1355966180562973,
-0.04786960408091545,
-0.06730073690414429,
0.15831288695335388,
-0.23558580875396729,
0.7212932109832764,
-0.4271330237388611,
0.05873109772801399,
0.05137164890766144,
-0.0013040434569120407,
-0.07943416386842728,
-0.14697809517383575,
-0.17329418659210205,
0.04530518501996994,
0.21682441234588623,
0.34049680829048157,
0.07887358963489532,
-0.08342855423688889,
-0.069132000207901,
0.2521124482154846,
0.1197294294834137,
-0.18993408977985382,
-0.2990875542163849,
-0.18847903609275818,
-0.10436662286520004,
-0.4804191291332245,
0.17291873693466187,
0.11623187363147736,
0.3918758034706116,
0.281907856464386,
0.28372499346733093,
0.11650290340185165,
-0.2171948105096817,
-0.2793142795562744,
0.26731887459754944,
0.182888925075531,
0.13781291246414185,
0.2806064188480377,
-0.14852192997932434,
0.07074014842510223,
-0.39159804582595825,
0.2207622528076172,
0.2650700807571411,
-0.01336299441754818,
-0.35188788175582886,
-0.15224425494670868,
-0.1378498673439026,
-0.07462824881076813,
-0.12038910388946533,
-0.17122657597064972,
0.1305275410413742,
-0.455519437789917,
0.3044014573097229,
-0.12371540069580078,
-0.2731349766254425,
0.16261634230613708,
0.2580735385417938,
0.7459710240364075,
-0.1907568722963333,
0.504533052444458,
-0.13824498653411865,
-0.007019854616373777,
-0.21165123581886292,
0.2579221725463867,
0.0966847613453865,
-0.08386865258216858,
0.37436890602111816,
-0.4017738699913025,
-0.23225630819797516,
0.1287764608860016,
-0.511859118938446,
0.22213968634605408,
-0.1943453997373581,
0.1535189300775528,
0.35802778601646423,
0.05348445847630501,
0.1261327862739563,
0.14850148558616638,
-0.27679458260536194,
-0.19663235545158386,
-0.3911307454109192,
-0.3426996171474457,
0.03453071415424347,
0.01029896829277277,
-0.28634539246559143,
-0.7201511859893799,
-0.12505018711090088,
-0.008855724707245827,
0.20894283056259155,
-0.026758503168821335,
0.2909319996833801,
0.07177586108446121,
-0.043982088565826416,
-0.04448944330215454,
-0.012262308970093727,
0.07261514663696289,
-0.23228900134563446,
-0.5153963565826416,
0.07043783366680145,
-0.36852899193763733,
-0.23332072794437408,
-0.01613619178533554,
0.1601327359676361,
0.16089855134487152,
-0.2680286169052124,
-0.13437998294830322,
-0.1933610439300537,
0.15638083219528198,
0.20185218751430511,
0.0828436017036438,
0.1836090087890625,
0.2864099442958832,
-0.31858715415000916,
-0.13399621844291687,
-0.4224168062210083,
-0.048428598791360855,
0.393046498298645,
0.04122154787182808,
0.0481196828186512,
-0.24871286749839783,
-0.2033090591430664,
0.16856060922145844,
0.4425642490386963,
0.4191022515296936,
0.26540231704711914,
-0.11366719007492065,
0.05834484100341797,
0.05904119461774826,
-0.049962349236011505,
0.31907975673675537,
0.597197949886322,
0.19270363450050354,
-0.163950115442276,
0.5791881680488586,
0.139251247048378,
-0.08434873819351196,
0.07334685325622559,
-0.1625446379184723,
-0.458731085062027,
-0.25545668601989746,
-0.15932071208953857,
-0.11664976179599762,
-0.17707955837249756,
0.12458056211471558,
0.18732726573944092,
-0.24070380628108978,
0.1849079132080078,
0.16476616263389587,
0.015314832329750061,
0.24368420243263245,
-0.13645896315574646,
-0.09452047944068909,
-0.01008569821715355,
-0.4923829436302185,
0.0687633603811264,
-0.05998794361948967,
0.2586652636528015,
0.05548907443881035,
-0.29157567024230957,
0.246210977435112,
-0.2525007426738739,
0.37164080142974854,
-0.532577633857727,
0.12424065172672272,
-0.18792413175106049,
-0.010641377419233322,
0.12742233276367188,
-0.2856524884700775,
-0.3115997016429901,
0.22715944051742554,
0.266964852809906,
0.3987363278865814,
-0.1938731074333191,
-0.20895779132843018,
0.15460525453090668,
-0.3390823304653168,
-0.02521982416510582,
0.3421180248260498,
0.05816664919257164,
-0.13528046011924744,
0.1005706638097763,
0.36637842655181885,
0.37369218468666077,
0.1932862550020218,
-0.2662164568901062,
0.09416314959526062,
0.25438690185546875,
0.10397111624479294,
0.16350342333316803,
0.27078455686569214,
0.023278528824448586,
-0.11758123338222504,
0.0032198168337345123,
0.15973544120788574,
0.1690310835838318,
0.37212663888931274,
0.5733540058135986,
-0.33023422956466675,
-0.01128658652305603,
0.26696082949638367,
-0.18916013836860657,
0.0041249096393585205,
0.48373639583587646,
0.04897211864590645,
-0.20582127571105957,
0.09025728702545166,
0.11349966377019882,
-0.45412588119506836,
0.22731918096542358,
0.17792591452598572,
0.010521835647523403,
-0.09872599691152573,
-0.05085872858762741,
0.0723784938454628,
0.1733487993478775,
-0.2822421193122864,
0.2563120722770691,
0.08931809663772583,
-0.22619017958641052,
-0.014134759083390236,
0.3856251537799835,
0.5357545018196106,
0.10576515644788742,
0.07779520004987717,
0.19207394123077393,
-0.5726898908615112,
0.18834605813026428,
-0.3067242503166199,
0.06451936066150665,
-0.23418903350830078,
-0.14913609623908997,
-0.032390810549259186,
-0.05962131917476654,
0.14771610498428345,
-0.05419763922691345,
-0.000048976391553878784,
-0.01429152674973011,
0.07261139154434204,
0.2146490514278412,
0.14310550689697266,
0.026257894933223724,
0.10176775604486465,
0.11000476777553558,
-0.09464343637228012,
0.17377768456935883,
0.035565152764320374,
0.19520318508148193,
0.1017584428191185,
-0.08926808089017868,
-0.3645235300064087,
-0.21497036516666412,
-0.48489904403686523,
0.06473472714424133,
-0.17094846069812775,
-0.32341837882995605,
0.11288024485111237,
-0.1069464460015297,
0.13802650570869446,
0.11851978302001953,
0.08230025321245193,
-0.1383761465549469,
-0.25626060366630554,
0.38889795541763306,
0.113996721804142,
0.1193072497844696,
0.08194911479949951,
0.04475868493318558,
0.612093448638916,
-0.1735788881778717,
0.06728822737932205,
-0.02502591907978058,
-0.13326896727085114,
-0.34871405363082886,
-0.13902011513710022,
0.28191184997558594,
0.2956058979034424,
-0.047197096049785614,
0.21831874549388885,
0.3014320135116577,
0.13921724259853363,
-0.3541213870048523,
0.15706408023834229,
0.004244215786457062,
-0.43084946274757385,
0.4017975628376007,
-0.09396196901798248,
-0.23934978246688843,
-0.18565243482589722,
0.21738654375076294,
0.15591779351234436,
-0.20234209299087524,
0.14278456568717957,
-0.002305585891008377,
-0.15083366632461548,
-0.4776885211467743,
0.11898041516542435,
0.5145730972290039,
-0.0484277568757534,
0.17432542145252228,
-0.2673068940639496,
-0.20669874548912048,
0.4550696015357971,
0.3447689116001129,
0.035942401736974716,
0.034342795610427856,
-0.30888083577156067,
-0.22889578342437744,
-0.033146366477012634,
0.12718398869037628,
-0.2885468602180481,
0.21915410459041595,
0.029697135090827942,
0.37678956985473633,
0.04241073876619339,
0.14115136861801147,
-0.41741302609443665,
0.2540646493434906,
-0.15342892706394196,
0.14368104934692383,
-0.6298025846481323,
-0.15803474187850952,
0.02049751579761505,
0.0007427185773849487,
0.05781133472919464,
0.09505955129861832,
-0.3548567593097687,
-0.24986058473587036,
-0.26346659660339355,
0.11375188827514648,
-0.11127898842096329,
-0.16711796820163727,
-0.035637032240629196,
0.08744899183511734,
-0.22505271434783936,
0.0927860215306282,
0.41921743750572205,
-0.10395058244466782,
0.15850910544395447,
-0.08867888152599335,
0.5829920172691345,
0.06811827421188354,
-0.15199440717697144,
-0.054968759417533875,
-0.05009637773036957,
0.12955203652381897,
0.057371851056814194,
0.1405581682920456,
-0.009612901136279106,
-0.11210732161998749,
0.03302473574876785,
0.38213932514190674,
0.2789592742919922,
0.0996154174208641,
0.23606553673744202,
-0.0224321112036705,
0.03836827352643013,
-0.22800244390964508,
0.328677237033844,
0.4875807464122772,
0.042329635471105576,
-0.3038291037082672,
-0.04247855767607689,
0.26640188694000244,
-0.22449077665805817,
-0.010821729898452759,
-0.23640546202659607,
-0.143599271774292,
-0.032035231590270996,
0.18876010179519653,
0.4392045736312866,
0.02094002068042755,
-0.17845721542835236,
0.009066363796591759,
0.23477007448673248,
0.2200240194797516,
0.23203665018081665,
0.5790866017341614,
-0.21254082024097443,
0.12400056421756744,
0.16958105564117432,
-0.41026759147644043,
0.03805934637784958,
0.09129710495471954,
0.09916654229164124,
0.6833835244178772,
0.08381269872188568,
0.2643548548221588,
0.12595221400260925,
-0.17812487483024597,
0.24377131462097168,
0.09789858758449554,
0.007488682866096497,
0.16126161813735962,
0.0021963417530059814,
0.430032342672348,
-0.4058029055595398,
-0.22154578566551208,
-0.30237430334091187,
0.21710270643234253,
-0.22417107224464417,
-0.2368309497833252,
-0.36832550168037415,
-0.2948790192604065,
-0.2902420461177826,
0.18876619637012482,
-0.074763223528862,
0.09291916340589523,
0.40933194756507874,
-0.09137745201587677,
-0.2765524387359619,
0.049728430807590485,
-0.35356494784355164,
-0.21030133962631226,
0.36504122614860535,
-0.29174160957336426,
0.2847002148628235,
-0.2200927585363388,
-0.15949800610542297,
0.34990331530570984,
0.19887429475784302,
0.28616002202033997,
-0.0198507122695446,
-0.15332376956939697,
-0.48371192812919617,
0.35531264543533325,
0.07065688073635101,
-0.07674495875835419,
0.17935366928577423,
0.3036482334136963,
0.07276472449302673,
0.17705906927585602,
0.1626986414194107,
-0.1318831592798233,
-0.06134944036602974,
0.15510666370391846,
-0.15156374871730804,
0.09760457277297974,
0.18688833713531494,
-0.14441382884979248,
-0.04734228923916817,
0.07168465852737427,
0.10951486229896545,
-0.09852339327335358,
-0.03384314104914665,
-0.3110511004924774,
-0.07021959871053696,
0.05551985651254654,
-0.0005470408359542489,
0.13292354345321655,
-0.16443711519241333,
0.5421860218048096,
-0.10478945076465607,
-0.2510837912559509,
-0.25871267914772034,
-0.2793656289577484,
-0.13051408529281616,
-0.005938410758972168,
0.3560914993286133,
-0.2456262707710266,
0.06895554065704346,
-0.014264892786741257,
0.2070837765932083,
0.018804039806127548,
0.1268579065799713,
-0.1372823864221573,
0.21607576310634613,
0.3777534067630768,
-0.4060506224632263,
0.3245939612388611,
0.21845026314258575,
0.07172245532274246,
-0.018981527537107468,
0.013804778456687927,
0.20727920532226562,
-0.022309189662337303,
-0.003334667533636093,
0.16810369491577148,
-0.17956581711769104,
0.49608123302459717,
0.2265222817659378,
-0.057408928871154785,
0.15238162875175476,
0.2522686719894409,
-0.11047128587961197,
-0.27067285776138306,
-0.2716212272644043,
0.16399438679218292,
-0.3892745077610016,
-0.0552578940987587,
-0.17202451825141907,
0.2142082005739212,
0.07811637967824936,
-0.16373097896575928,
0.16912078857421875,
-0.2544028162956238,
0.29602545499801636,
0.12516219913959503,
-0.23508624732494354,
-0.11537618935108185,
-0.09259289503097534,
-0.046198517084121704,
0.33342501521110535,
0.5228874087333679,
0.03222418576478958,
-0.19763252139091492,
-0.4064098596572876,
-0.06277257204055786,
0.2906959354877472,
-0.0037271492183208466,
0.11275491118431091,
-0.37159237265586853,
0.21962326765060425,
0.22836247086524963,
-0.03525848686695099,
-0.7675589919090271,
-0.33596569299697876,
0.1056845486164093,
-0.2780991792678833,
-0.2789597511291504,
0.440448135137558,
0.124614417552948,
-0.19361010193824768,
-0.003879137337207794,
-0.06189166009426117,
0.05158405005931854,
-0.1427290290594101,
-0.11213725805282593,
-0.11822205781936646
] |
https://github.com/huggingface/datasets/issues/4792 | Add DocVQA | Thanks for proposing, @NielsRogge.
Please, note this dataset requires registering in their website and their Terms and Conditions state we cannot distribute their URL:
```
1. You will NOT distribute the download URLs
...
``` | ## Adding a Dataset
- **Name:** DocVQA
- **Description:** Document Visual Question Answering (DocVQA) seeks to inspire a “purpose-driven” point of view in Document Analysis and Recognition research, where the document content is extracted and used to respond to high-level tasks defined by the human consumers of this information.
- **Paper:** https://arxiv.org/abs/2007.00398
- **Data:** https://www.docvqa.org/datasets/docvqa
- **Motivation:** Models like LayoutLM and Donut in the Transformers library are fine-tuned on DocVQA. Would be very handy to directly load this dataset from the hub.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
| 35 | Add DocVQA
## Adding a Dataset
- **Name:** DocVQA
- **Description:** Document Visual Question Answering (DocVQA) seeks to inspire a “purpose-driven” point of view in Document Analysis and Recognition research, where the document content is extracted and used to respond to high-level tasks defined by the human consumers of this information.
- **Paper:** https://arxiv.org/abs/2007.00398
- **Data:** https://www.docvqa.org/datasets/docvqa
- **Motivation:** Models like LayoutLM and Donut in the Transformers library are fine-tuned on DocVQA. Would be very handy to directly load this dataset from the hub.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
Thanks for proposing, @NielsRogge.
Please, note this dataset requires registering in their website and their Terms and Conditions state we cannot distribute their URL:
```
1. You will NOT distribute the download URLs
...
``` | [
-0.21714720129966736,
-0.2769107222557068,
-0.09589703381061554,
0.06519690155982971,
-0.12032856047153473,
0.06373164802789688,
0.2114846259355545,
0.3054947853088379,
0.13000580668449402,
0.059842828661203384,
0.03232497721910477,
0.23950688540935516,
-0.27115482091903687,
0.3302791118621826,
0.38628870248794556,
-0.31362754106521606,
0.020803533494472504,
0.07192985713481903,
0.12834449112415314,
-0.1958392858505249,
-0.06359902024269104,
0.08691184967756271,
0.030370116233825684,
-0.13948050141334534,
-0.55695641040802,
-0.15209603309631348,
-0.3845394551753998,
0.1020064502954483,
-0.35922524333000183,
-0.10115627944469452,
0.026504462584853172,
0.3105804920196533,
0.1865716576576233,
0.14101354777812958,
-0.00009943217446561903,
-0.10452255606651306,
-0.07065045833587646,
-0.15990038216114044,
-0.0552743561565876,
-0.1389930099248886,
-0.11271079629659653,
-0.05827338993549347,
-0.1734219342470169,
-0.1054454818367958,
-0.3501899838447571,
0.062233202159404755,
-0.015214061364531517,
0.23939865827560425,
0.27385830879211426,
0.2673656940460205,
0.23001669347286224,
0.35080522298812866,
0.07573497295379639,
-0.17873133718967438,
0.2073056995868683,
0.4576868414878845,
-0.4180562496185303,
0.3470955193042755,
0.5281639099121094,
-0.16753509640693665,
-0.31410887837409973,
0.3387051224708557,
-0.08664005249738693,
-0.10145503282546997,
0.265969455242157,
0.1469624787569046,
0.1854049414396286,
-0.2593552768230438,
0.025239381939172745,
0.3113687038421631,
0.45373377203941345,
-0.2664092779159546,
-0.08564676344394684,
-0.37948909401893616,
0.024131037294864655,
0.009160483255982399,
-0.25936347246170044,
0.12560322880744934,
-0.003455742262303829,
0.10964988172054291,
-0.02290092594921589,
-0.36406654119491577,
-0.2320060282945633,
0.0897355005145073,
-0.036025673151016235,
0.06300808489322662,
-0.14293727278709412,
-0.3256014883518219,
0.0793556272983551,
0.14862585067749023,
0.0018895501270890236,
-0.08698847144842148,
-0.14341914653778076,
0.0274927020072937,
-0.06407029926776886,
-0.3093419075012207,
0.2746279835700989,
0.005552850663661957,
0.23846396803855896,
0.009100556373596191,
0.4050583243370056,
0.015243579633533955,
-0.12971606850624084,
0.18581005930900574,
0.18417343497276306,
0.14084473252296448,
-0.05790217965841293,
0.2833446264266968,
-0.0822167694568634,
0.15370559692382812,
0.17942453920841217,
-0.04636121541261673,
-0.28241148591041565,
0.23371022939682007,
-0.4471201002597809,
-0.18956005573272705,
0.25554221868515015,
0.007506024092435837,
-0.22342534363269806,
-0.023221515119075775,
0.21605902910232544,
0.26872989535331726,
0.03272116929292679,
0.42592644691467285,
0.2321927845478058,
0.24280419945716858,
0.04017268121242523,
0.16639605164527893,
-0.2819693386554718,
-0.09417407959699631,
-0.0835464671254158,
0.23696190118789673,
-0.08019811660051346,
0.07154162973165512,
0.19461162388324738,
0.16772399842739105,
0.03108317218720913,
-0.2050822377204895,
0.08758914470672607,
-0.0006957165896892548,
0.07408016175031662,
-0.15164044499397278,
0.17437788844108582,
0.07703516632318497,
-0.15283675491809845,
-0.22219106554985046,
0.1035422533750534,
0.014543667435646057,
-0.27934688329696655,
0.01751551404595375,
-0.12201399356126785,
-0.08001386374235153,
-0.45689937472343445,
0.256916344165802,
0.06295637041330338,
-0.2662573456764221,
-0.020677775144577026,
0.621691882610321,
-0.2568250000476837,
0.04857637360692024,
0.13336464762687683,
0.22157558798789978,
-0.19563865661621094,
-0.03372037410736084,
-0.040077999234199524,
0.34399065375328064,
0.028593745082616806,
-0.16182148456573486,
0.20208963751792908,
0.11172880232334137,
-0.33631640672683716,
0.08769602328538895,
-0.0155857615172863,
0.4397669732570648,
-0.0128285251557827,
0.32933253049850464,
0.18128299713134766,
-0.6550579071044922,
-0.31021687388420105,
-0.11615684628486633,
-0.2711747884750366,
0.008128078654408455,
0.008787356317043304,
0.35162410140037537,
0.39141902327537537,
-0.009506596252322197,
-0.20723557472229004,
0.18012388050556183,
-0.0903969556093216,
0.07233386486768723,
-0.17522887885570526,
-0.30062392354011536,
-0.2785857319831848,
0.3283960521221161,
0.15124467015266418,
-0.1083340123295784,
-0.08605635911226273,
0.009186825715005398,
0.23339307308197021,
-0.19626924395561218,
-0.03281613439321518,
0.17081865668296814,
0.39709752798080444,
-0.15740938484668732,
0.1304093897342682,
-0.265344500541687,
-0.3004440367221832,
-0.09321623295545578,
0.08106835931539536,
0.15855389833450317,
0.09743932634592056,
-0.4076821208000183,
-0.2986999750137329,
-0.014387538656592369,
-0.19610963761806488,
-0.4945237934589386,
0.214867502450943,
0.02142447978258133,
-0.10505673289299011,
-0.05760812386870384,
-0.2665666341781616,
-0.06327972561120987,
-0.08281531184911728,
0.19968479871749878,
-0.2233247458934784,
0.15858307480812073,
-0.04802712798118591,
0.16914449632167816,
0.29138562083244324,
0.1912449598312378,
-0.1489901840686798,
0.1731969565153122,
0.28348982334136963,
0.044055093079805374,
-0.11127108335494995,
0.3332517147064209,
0.35168352723121643,
0.5252923369407654,
0.3128160536289215,
-0.33576518297195435,
0.37689006328582764,
0.1092246025800705,
0.10234113782644272,
0.05070409178733826,
-0.48197177052497864,
0.1646978110074997,
0.07891615480184555,
-0.1303921639919281,
0.010824639350175858,
0.19810932874679565,
0.1062040627002716,
-0.19033287465572357,
0.09352738410234451,
-0.32788392901420593,
0.2677590250968933,
0.33896297216415405,
0.26226651668548584,
-0.20239652693271637,
0.11972415447235107,
0.3333439528942108,
0.3969903588294983,
-0.011339562013745308,
0.43527498841285706,
0.09365105628967285,
-0.41642123460769653,
-0.1229112520813942,
-0.003356330096721649,
-0.12284697592258453,
-0.01771026849746704,
0.325975239276886,
-0.008729260414838791,
0.04438958317041397,
0.13959486782550812,
-0.16010648012161255,
0.0680554062128067,
-0.029608190059661865,
-0.19469086825847626,
0.3969697952270508,
0.06360702961683273,
-0.052292440086603165,
-0.5958048105239868,
0.025496091693639755,
-0.08051186800003052,
-0.15511581301689148,
0.05651111528277397,
-0.01500046718865633,
0.5278971791267395,
0.01715850457549095,
0.06724397838115692,
-0.24569527804851532,
0.009743666276335716,
-0.04797368496656418,
0.4595385789871216,
0.2815706133842468,
-0.07791833579540253,
-0.015600385144352913,
0.03646913543343544,
0.7444359660148621,
-0.062160104513168335,
0.14756478369235992,
-0.15095701813697815,
-0.3486209809780121,
-0.05199354141950607,
0.29959020018577576,
-0.03266829624772072,
0.179268017411232,
0.6375695466995239,
-0.17500722408294678,
0.6247329115867615,
-0.3318047821521759,
-0.41488054394721985,
0.3155379593372345,
-0.0929923802614212,
0.42167720198631287,
0.09866231679916382,
-0.10784117877483368,
0.17223894596099854,
-0.2038097381591797,
0.03321152925491333,
-0.1813611537218094,
-0.007065095938742161,
-0.2089235484600067,
-0.08098066598176956,
-0.19952073693275452,
-0.18120704591274261,
-0.2469780147075653,
0.018331214785575867,
-0.4313560724258423,
0.18072643876075745,
0.23247335851192474,
-0.044046662747859955,
0.08458592742681503,
0.0022262344136834145,
0.16974157094955444,
-0.0825151726603508,
0.05345045030117035,
-0.13089770078659058,
-0.20766234397888184,
0.14515940845012665,
-0.37237584590911865,
-0.3204960823059082,
-0.3119843602180481,
-0.38533341884613037,
0.07076133042573929,
-0.04704651981592178,
-0.26020169258117676,
-0.3218294382095337,
0.04554886370897293,
-0.034101471304893494,
0.2589702904224396,
-0.14180926978588104,
0.3563208281993866,
0.0048283422365784645,
-0.12058039009571075,
-0.1932424008846283,
0.11527813971042633,
0.07605898380279541,
0.28344234824180603,
0.010065920650959015,
-0.15828028321266174,
-0.22250589728355408,
0.23051691055297852,
0.2408691644668579,
-0.015576254576444626,
-0.02685244008898735,
0.4172874689102173,
0.10486163944005966,
0.3449482321739197,
-0.12511423230171204,
-0.33810386061668396,
0.06320516020059586,
-0.07796573638916016,
-0.09264086931943893,
0.5253653526306152,
0.36670559644699097,
-0.11814048141241074,
-0.11152216792106628,
-0.4129181206226349,
-0.34757107496261597,
-0.2950587868690491,
0.17829397320747375,
-0.08259798586368561,
0.23199185729026794,
-0.07823854684829712,
0.11611921340227127,
-0.24415536224842072,
-0.19296684861183167,
0.3026391565799713,
0.3189733624458313,
0.16230133175849915,
-0.2609390914440155,
-0.21154113113880157,
0.5293378829956055,
-0.5027776956558228,
0.2568247318267822,
0.15780918300151825,
-0.28810304403305054,
-0.21970506012439728,
-0.14807993173599243,
0.12373463809490204,
-0.08920751512050629,
0.645384669303894,
-0.1961594671010971,
-0.055283091962337494,
0.1573232114315033,
-0.04324685037136078,
0.08173076808452606,
0.18728743493556976,
-0.3633079528808594,
-0.19695980846881866,
-0.17644824087619781,
0.24975894391536713,
-0.2059328258037567,
-0.016675472259521484,
0.2707006335258484,
-0.26132893562316895,
-0.14114339649677277,
-0.004043815191835165,
0.027452100068330765,
-0.08305394649505615,
-0.47884801030158997,
0.1319345235824585,
0.014064831659197807,
0.0020184642635285854,
0.007548823952674866,
-0.16930420696735382,
-0.05010479688644409,
-0.09385097771883011,
0.09375426173210144,
0.3107367753982544,
0.09682594239711761,
-0.04132711887359619,
-0.026370281353592873,
0.3358213007450104,
0.10049088299274445,
0.18735145032405853,
0.2315385490655899,
-0.03626030310988426,
-0.428214967250824,
0.031175246462225914,
-0.3091755509376526,
0.09162024408578873,
0.33615052700042725,
0.2814091444015503,
0.09306754171848297,
-0.19521792232990265,
-0.04843263328075409,
-0.6770681142807007,
0.25371256470680237,
0.35536545515060425,
0.013921664096415043,
-0.25795304775238037,
-0.0014557819813489914,
0.3388381898403168,
-0.19445647299289703,
-0.08481057733297348,
0.05760738626122475,
0.15145772695541382,
-0.22147434949874878,
0.26339685916900635,
0.2590356767177582,
1.005112648010254,
-0.04626645892858505,
0.27894580364227295,
0.14999237656593323,
-0.2079920768737793,
0.30044540762901306,
-0.487759530544281,
0.15979750454425812,
-0.300752192735672,
-0.2163865864276886,
-0.17906999588012695,
-0.019553694874048233,
0.04714297875761986,
0.08333119750022888,
-0.24399334192276,
-0.19912955164909363,
0.09463798999786377,
0.44571632146835327,
-0.021687934175133705,
0.33003848791122437,
-0.23449084162712097,
-0.3412184715270996,
-0.20958662033081055,
0.21174836158752441,
0.1591702699661255,
0.09572964906692505,
-0.21056830883026123,
-0.13929370045661926,
-0.06583752483129501,
-0.18244537711143494,
-0.19318225979804993,
0.00803447887301445,
0.018379880115389824,
-0.0756545439362526,
-0.11459873616695404,
-0.17364239692687988,
-0.07207833230495453,
0.39131373167037964,
0.14044901728630066,
-0.025893043726682663,
-0.5591630339622498,
0.21616588532924652,
-0.21247947216033936,
-0.1574326604604721,
0.18629062175750732,
-0.06457539647817612,
0.2421586960554123,
-0.07331651449203491,
-0.02452673763036728,
0.09737526625394821,
0.1978127509355545,
-0.2661736011505127,
-0.4187612533569336,
-0.06462889909744263,
0.3415845036506653,
-0.14264650642871857,
-0.07623818516731262,
0.1569368839263916,
-0.2886447310447693,
-0.1328432559967041,
0.20940932631492615,
0.041297268122434616,
0.129202201962471,
0.0001831650733947754,
0.1307086944580078,
-0.03267917037010193,
0.07513473927974701,
0.04146589711308479,
0.14216819405555725,
-0.15243268013000488,
0.004551686346530914,
0.04371048882603645,
-0.3471672534942627,
-0.4722696542739868,
0.019013971090316772,
0.39032456278800964,
-0.3435722589492798,
0.09639421850442886,
0.15717920660972595,
-0.4285987615585327,
0.09601561725139618,
0.3949505090713501,
0.21402940154075623,
-0.3529987335205078,
-0.1755601316690445,
-0.11741285026073456,
-0.14219553768634796,
0.47656917572021484,
-0.37314683198928833,
0.3314947783946991,
0.19964811205863953,
0.08726941049098969,
0.037222832441329956,
0.27673056721687317,
-0.4697687327861786,
0.03380296379327774,
-0.23551742732524872,
0.09822125732898712,
0.014604590833187103,
-0.09928158670663834,
0.21478456258773804,
0.012065622955560684,
0.10659237205982208,
-0.06799086183309555,
-0.4407176077365875,
-0.2828352451324463,
-0.3013509213924408,
0.09930814802646637,
-0.08699772506952286,
0.18123802542686462,
0.03263453021645546,
-0.017054952681064606,
-0.1692296415567398,
-0.15842759609222412,
0.2780320644378662,
-0.02786886692047119,
0.022935066372156143,
-0.06089367717504501,
0.007442135363817215,
0.13971826434135437,
-0.10515254735946655,
0.06606688350439072,
0.005188852548599243,
0.004989698529243469,
0.0336492620408535,
-0.1593543291091919,
-0.28801000118255615,
0.013892367482185364,
0.3843376040458679,
0.4796440005302429,
0.7183908820152283,
-0.09227167814970016,
0.262662410736084,
0.3174818754196167,
0.27238142490386963,
0.030590640380978584,
0.19174644351005554,
-0.03740329295396805,
-0.18714597821235657,
0.14056788384914398,
0.0038118623197078705,
0.34541624784469604,
-0.3295811116695404,
-0.346353679895401,
-0.05610964074730873,
-0.5013911128044128,
0.2945682108402252,
0.11445789039134979,
0.2851702868938446,
0.07916763424873352,
-0.06275428831577301,
0.07793877273797989,
0.19370856881141663,
-0.14703235030174255,
-0.02557767555117607,
0.3448003828525543,
-0.08943590521812439,
0.11930710077285767,
0.21133151650428772,
0.07931998372077942,
0.15082550048828125,
0.20254626870155334,
-0.11014712601900101,
0.18124482035636902,
0.025954682379961014,
0.2859613001346588,
0.4351290464401245,
0.09584683179855347,
-0.021222557872533798,
-0.058411672711372375,
0.2883780002593994,
0.3298283815383911,
-0.01491498202085495,
-0.2211659848690033,
0.2007155567407608,
0.1450842022895813,
-0.4041626453399658,
0.11718252301216125,
0.0019897371530532837,
-0.010780938901007175,
-0.13070935010910034,
-0.25262847542762756,
-0.17481057345867157,
0.04982065036892891,
-0.07658766210079193,
-0.16247111558914185,
-0.18023955821990967,
-0.07106438279151917,
0.13237038254737854,
0.07837823033332825,
0.07974158972501755,
0.009159335866570473,
0.3303430378437042,
-0.31733784079551697,
0.17952677607536316,
-0.06805361807346344,
0.3606162667274475,
0.0923345535993576,
0.6297380328178406,
0.07905037701129913,
0.059063538908958435,
-0.18661591410636902,
0.07888876646757126,
-0.257401704788208,
-0.16067931056022644,
-0.14736030995845795,
0.1441488265991211,
0.2112800031900406,
0.10043635964393616,
0.20727355778217316,
0.20204214751720428,
-0.2059897482395172,
0.033625345677137375,
-0.02671598270535469,
-0.047766078263521194,
-0.11094328761100769,
-0.24883931875228882,
0.07514813542366028,
-0.06308043748140335,
-0.24239733815193176,
-0.0960896834731102,
-0.44330495595932007,
0.09039659798145294,
0.26328352093696594,
-0.3204125463962555,
0.10189944505691528,
0.024740640074014664,
0.13336364924907684,
0.1632121205329895,
0.10245602577924728,
0.337395578622818,
0.10626522451639175,
-0.007338319905102253,
-0.15119123458862305,
-0.3515194356441498,
0.16382984817028046,
0.2887210249900818,
-0.09184557944536209,
0.08704367280006409,
-0.03400544822216034,
0.22597670555114746,
0.36758846044540405,
-0.322223424911499,
-0.00325020425952971,
-0.055649567395448685,
0.05538531392812729,
-0.29796168208122253,
0.29928216338157654,
0.0608908012509346,
0.10428060591220856,
0.11440172791481018,
-0.31553009152412415,
0.03764224424958229,
0.32223331928253174,
0.06042236089706421,
-0.12402017414569855,
0.2399175763130188,
-0.06695088744163513,
0.06947680562734604,
0.1174415573477745,
-0.1191922277212143,
0.19170710444450378,
-0.3273507058620453,
-0.17928725481033325,
-0.245751291513443,
-0.1604854166507721,
-0.35303983092308044,
0.09809771925210953,
0.29490572214126587,
0.2612382173538208,
-0.09802152216434479,
-0.21488715708255768,
0.30344846844673157,
-0.09656597673892975,
0.18545284867286682,
0.27048972249031067,
-0.47614091634750366,
0.018435748293995857,
-0.03259408846497536,
-0.09150215238332748,
-0.010945666581392288,
0.5174697637557983,
0.031462088227272034,
-0.16805963218212128,
0.015349254012107849,
-0.29973432421684265,
0.3480952978134155,
-0.22669388353824615,
-0.13136230409145355,
0.17577330768108368,
0.14954738318920135,
0.27358633279800415,
-0.06173983961343765,
-0.6265015602111816,
-0.05432315543293953,
0.15733583271503448,
-0.08832313865423203,
0.05915755406022072,
0.42404693365097046,
0.3423996567726135,
-0.157319113612175,
-0.19864821434020996,
0.3350624740123749,
0.07799684256315231,
-0.09180725365877151,
-0.14959712326526642,
-0.41896623373031616
] |
https://github.com/huggingface/datasets/issues/4791 | Dataset Viewer issue for Team-PIXEL/rendered-wikipedia-english | Thanks for reporting. It's a known issue that should be fixed soon. Meanwhile, I had to manually trigger the dataset viewer. It's OK now.
Note that the extreme aspect ratio of the images generates another issue, that we're inspecting. | ### Link
https://huggingface.co/datasets/Team-PIXEL/rendered-wikipedia-english/viewer/rendered-wikipedia-en/train
### Description
The dataset can be loaded fine but the viewer shows this error:
```
Server Error
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
I'm guessing this is because I recently renamed the dataset. Based on related issues (e.g. https://github.com/huggingface/datasets/issues/4759) , is there something server-side that needs to be refreshed?
### Owner
Yes | 39 | Dataset Viewer issue for Team-PIXEL/rendered-wikipedia-english
### Link
https://huggingface.co/datasets/Team-PIXEL/rendered-wikipedia-english/viewer/rendered-wikipedia-en/train
### Description
The dataset can be loaded fine but the viewer shows this error:
```
Server Error
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
```
I'm guessing this is because I recently renamed the dataset. Based on related issues (e.g. https://github.com/huggingface/datasets/issues/4759) , is there something server-side that needs to be refreshed?
### Owner
Yes
Thanks for reporting. It's a known issue that should be fixed soon. Meanwhile, I had to manually trigger the dataset viewer. It's OK now.
Note that the extreme aspect ratio of the images generates another issue, that we're inspecting. | [
-0.16521969437599182,
-0.020517565310001373,
0.11151394248008728,
0.37648099660873413,
0.2187250554561615,
0.2173384428024292,
0.28199875354766846,
0.2595103085041046,
-0.2436506152153015,
-0.0343613475561142,
0.039637185633182526,
0.061710599809885025,
0.031158167868852615,
-0.07475249469280243,
0.14543163776397705,
-0.3017996847629547,
0.08541373908519745,
0.11110471189022064,
-0.3172832727432251,
-0.16778899729251862,
-0.25159358978271484,
0.13828732073307037,
-0.2568555772304535,
-0.07672902941703796,
-0.5024055242538452,
-0.047380752861499786,
-0.053803831338882446,
-0.035476431250572205,
-0.0016137417405843735,
-0.4098314046859741,
0.24565212428569794,
0.05282733589410782,
0.11559218168258667,
0.44677963852882385,
-0.00011781360080931336,
0.15633313357830048,
0.5437972545623779,
-0.03841591626405716,
-0.2645687460899353,
0.0017599165439605713,
-0.15980860590934753,
-0.21837982535362244,
0.21975865960121155,
-0.299119770526886,
-0.13308437168598175,
-0.17649269104003906,
0.2438010275363922,
-0.3043407201766968,
0.49125993251800537,
0.13188304007053375,
0.1982596218585968,
0.07197904586791992,
-0.0252535380423069,
-0.024274220690131187,
-0.07256300002336502,
0.21217548847198486,
-0.1582190841436386,
0.02988041192293167,
-0.06213842332363129,
0.10484244674444199,
-0.03626523166894913,
0.2705039083957672,
0.12977728247642517,
-0.023337967693805695,
0.13542905449867249,
-0.05156927555799484,
-0.35662010312080383,
-0.2694477438926697,
0.31474828720092773,
0.3756181001663208,
0.7798627614974976,
-0.09089931100606918,
-0.3987787365913391,
-0.06942509114742279,
0.18369174003601074,
0.042910732328891754,
0.5472909808158875,
0.13499413430690765,
0.015099409967660904,
0.18294298648834229,
-0.4704922139644623,
-0.3355553150177002,
-0.32674211263656616,
0.1647825539112091,
-0.4226316511631012,
0.13770246505737305,
-0.1958542913198471,
0.3316672742366791,
-0.10746562480926514,
0.012727489694952965,
0.05167695879936218,
-0.04005158692598343,
0.10469893366098404,
0.13032445311546326,
-0.18100130558013916,
0.009941644966602325,
0.20692777633666992,
0.0557054802775383,
0.07323373854160309,
0.007365630939602852,
-0.12715096771717072,
0.06884542107582092,
-0.01891329512000084,
0.013290181756019592,
0.24791458249092102,
-0.023019399493932724,
0.16573351621627808,
-0.01560424268245697,
0.40424084663391113,
0.2400050163269043,
-0.03789938613772392,
0.11061093956232071,
-0.09746143221855164,
-0.37116172909736633,
-0.2925654351711273,
-0.2003670632839203,
0.3763524889945984,
-0.02426823228597641,
-0.01429673284292221,
0.2770974636077881,
0.04003794491291046,
-0.1582699567079544,
-0.09410029649734497,
0.14629605412483215,
-0.027112118899822235,
0.15723763406276703,
0.1574345827102661,
-0.04680684953927994,
-0.24486759305000305,
-0.4849330484867096,
-0.04753497987985611,
-0.2801763415336609,
-0.3270930051803589,
0.1987019032239914,
0.23453377187252045,
-0.5736659169197083,
0.23588749766349792,
-0.003544985316693783,
0.1419588029384613,
0.02349279820919037,
-0.20738695561885834,
-0.18777622282505035,
-0.18221530318260193,
0.0988006442785263,
0.03602328523993492,
0.15203255414962769,
0.045597199350595474,
-0.4593515396118164,
0.10821691900491714,
0.26033276319503784,
-0.1376262903213501,
0.05124523118138313,
-0.47011512517929077,
0.026749882847070694,
-0.36342835426330566,
0.11568295955657959,
-0.2678736746311188,
0.35863983631134033,
0.09270013868808746,
-0.20964112877845764,
-0.09476587921380997,
0.06315147876739502,
-0.37027695775032043,
-0.05992778390645981,
0.10601482540369034,
0.6743267178535461,
-0.5852984189987183,
-0.1858673244714737,
-0.2861006557941437,
0.00788748636841774,
-0.37564048171043396,
0.24397912621498108,
-0.08988340944051743,
-0.058245398104190826,
-0.2395319938659668,
-0.09239019453525543,
0.19146347045898438,
-0.19131898880004883,
-0.39758339524269104,
0.2426932454109192,
-0.20569899678230286,
0.14958228170871735,
-0.03770900517702103,
-0.03924546763300896,
0.5380945205688477,
-0.02433922328054905,
-0.08291767537593842,
0.07199677079916,
-0.029785634949803352,
-0.07109128683805466,
-0.2642592489719391,
-0.259607195854187,
0.1138828694820404,
0.15701843798160553,
0.34317272901535034,
-0.09200268238782883,
0.21663612127304077,
0.03605608269572258,
0.19038645923137665,
-0.12823136150836945,
0.337715208530426,
0.10069362074136734,
0.10414613783359528,
0.3869321346282959,
0.14789614081382751,
-0.07067456841468811,
-0.5494465231895447,
0.17420491576194763,
0.10726335644721985,
0.28912419080734253,
-0.054113999009132385,
-0.02914341539144516,
-0.33178791403770447,
-0.05365368723869324,
-0.3916054368019104,
-0.18385916948318481,
0.010471120476722717,
0.12234154343605042,
-0.21797996759414673,
0.40505993366241455,
-0.1296801120042801,
-0.04112796485424042,
-0.23286913335323334,
0.06736071407794952,
-0.1381056010723114,
0.3910384774208069,
0.0071670375764369965,
0.0771123468875885,
-0.1772504597902298,
0.11653347313404083,
0.10537554323673248,
-0.08652272820472717,
-0.05733444541692734,
0.3125557601451874,
0.09819208085536957,
0.12671688199043274,
0.4728442132472992,
-0.3145252466201782,
0.47267886996269226,
-0.7604025602340698,
0.09872574359178543,
0.10212238132953644,
0.04576077684760094,
0.03158333897590637,
-0.35484495759010315,
-0.06656196713447571,
0.006234578788280487,
0.18982136249542236,
-0.21203850209712982,
0.22878292202949524,
0.3432026207447052,
0.10104764997959137,
-0.07695647329092026,
-0.27280521392822266,
0.04275164380669594,
0.10887067019939423,
0.3549922704696655,
-0.11900138854980469,
-0.34750109910964966,
-0.07558535784482956,
0.27677130699157715,
0.12110872566699982,
0.10673168301582336,
0.4393324851989746,
-0.25307291746139526,
-0.06360332667827606,
0.14932918548583984,
0.156372532248497,
0.08625709265470505,
0.20573312044143677,
-0.17100295424461365,
0.1482056826353073,
0.0574793815612793,
-0.03891940414905548,
-0.013347573578357697,
0.06756327301263809,
0.3485424816608429,
0.07018667459487915,
0.16661231219768524,
-0.0845627710223198,
-0.4804690480232239,
-0.015757856890559196,
0.2694055140018463,
0.09833163022994995,
-0.295831561088562,
-0.07820484042167664,
-0.15484139323234558,
-0.36012381315231323,
-0.18200944364070892,
0.31043338775634766,
-0.40104028582572937,
-0.19391854107379913,
0.01754690892994404,
0.12207834422588348,
-0.01996598020195961,
0.33804693818092346,
-0.1197422444820404,
0.1192215159535408,
-0.025484241545200348,
0.03752840682864189,
-0.22447773814201355,
-0.39692485332489014,
-0.22766801714897156,
0.014673646539449692,
0.3057681620121002,
-0.28283944725990295,
0.3419979214668274,
-0.4371575713157654,
0.21122275292873383,
-0.624858021736145,
-0.6886519193649292,
0.20546753704547882,
-0.22622664272785187,
0.46000492572784424,
-0.13847443461418152,
0.3555734157562256,
-0.09818261861801147,
0.21712720394134521,
0.313188374042511,
0.1387641578912735,
0.00243489071726799,
-0.025875676423311234,
0.10283517837524414,
-0.08543935418128967,
0.0734449177980423,
-0.3661138713359833,
-0.11951681226491928,
-0.13427239656448364,
0.19312886893749237,
-0.11564157903194427,
0.020654208958148956,
0.12740501761436462,
0.19932767748832703,
0.02259180322289467,
0.101805679500103,
-0.009747333824634552,
-0.34392860531806946,
-0.2843674421310425,
0.36048492789268494,
-0.4126299023628235,
-0.4329741299152374,
0.3509671092033386,
0.14425396919250488,
0.24550147354602814,
0.10050633549690247,
-0.6357280611991882,
-0.011621343903243542,
0.10407919436693192,
0.1744941622018814,
0.18845206499099731,
-0.13523553311824799,
0.27515357732772827,
0.13752137124538422,
0.07958138734102249,
-0.13956940174102783,
-0.32206112146377563,
-0.17362582683563232,
-0.09350452572107315,
0.2852589786052704,
0.04508492723107338,
0.5779821872711182,
0.045247215777635574,
0.8120306730270386,
0.344197154045105,
0.0304133128374815,
0.34435731172561646,
-0.1673116683959961,
0.6533029079437256,
-0.028312169015407562,
-0.2585877776145935,
0.18612170219421387,
-0.09481725096702576,
0.059055738151073456,
0.337538480758667,
0.10207841545343399,
-0.2769550383090973,
-0.27390581369400024,
0.08372502028942108,
-0.5132854580879211,
-0.32330790162086487,
-0.06872499734163284,
0.02650713548064232,
0.34626758098602295,
0.14145828783512115,
0.1982167363166809,
-0.03201071172952652,
-0.36610400676727295,
-0.1933644860982895,
0.2951303720474243,
0.25227096676826477,
-0.04143958166241646,
-0.007641002535820007,
0.02498669922351837,
-0.2725341022014618,
0.4420371651649475,
0.056214943528175354,
0.4579000174999237,
-0.20875033736228943,
0.19996678829193115,
0.22053101658821106,
0.17622511088848114,
0.6372358798980713,
-0.2804888188838959,
-0.09725147485733032,
-0.07313650101423264,
-0.10808981955051422,
-0.3394353985786438,
0.11721746623516083,
0.2945021092891693,
0.022966938093304634,
-0.14276911318302155,
0.2917839288711548,
-0.23545241355895996,
-0.22724130749702454,
0.4181298017501831,
-0.005293627735227346,
-0.3229456841945648,
-0.20533469319343567,
-0.24826927483081818,
-0.22378939390182495,
-0.1779327690601349,
-0.12291597574949265,
-0.26306578516960144,
0.032854773104190826,
0.13255362212657928,
0.020023781806230545,
-0.029784077778458595,
-0.05174728110432625,
0.0028987228870391846,
0.25970473885536194,
0.31502220034599304,
0.20762400329113007,
0.1924452930688858,
0.6050518751144409,
0.14141830801963806,
0.2507619857788086,
0.48160290718078613,
-0.20887547731399536,
-0.3617900609970093,
0.20015454292297363,
-0.06726714968681335,
0.06929565966129303,
0.40644028782844543,
-0.0023342205677181482,
-0.2639525532722473,
0.34808042645454407,
0.11684069037437439,
-0.33498454093933105,
-0.019543619826436043,
0.5091416239738464,
0.07463384419679642,
-0.4951794445514679,
-0.4327792823314667,
0.614084780216217,
0.1743258535861969,
0.17127041518688202,
0.24699890613555908,
0.6707228422164917,
-0.2828182578086853,
-0.07081066817045212,
-0.06945858150720596,
0.8142281770706177,
-0.2227911502122879,
0.11918354034423828,
0.22414100170135498,
-0.3233516216278076,
0.48063576221466064,
-0.013926010578870773,
0.11213376373052597,
-0.2866423726081848,
-0.08299326151609421,
-0.20718050003051758,
0.08404897153377533,
0.3427857756614685,
0.16912585496902466,
0.0646028220653534,
0.14281579852104187,
-0.11404664814472198,
0.020275291055440903,
0.12548208236694336,
0.16249163448810577,
0.07974115759134293,
-0.09821325540542603,
-0.12369738519191742,
0.09843578934669495,
-0.2951934337615967,
0.13402070105075836,
-0.15598884224891663,
0.07478668540716171,
-0.14951014518737793,
-0.0045026205480098724,
-0.4537131190299988,
-0.011311311274766922,
0.09779851138591766,
0.19487759470939636,
-0.11750346422195435,
-0.3973734378814697,
0.45401886105537415,
0.18725073337554932,
0.0014413520693778992,
-0.016047168523073196,
-0.43012869358062744,
0.4044210612773895,
-0.41309741139411926,
0.00349238864146173,
-0.06426826864480972,
0.17458775639533997,
0.3813634216785431,
0.0660180076956749,
-0.26669859886169434,
0.1656384915113449,
-0.08050202578306198,
0.026573382318019867,
-0.25566813349723816,
0.16337084770202637,
-0.2090630680322647,
-0.24082119762897491,
0.053574688732624054,
-0.12288518249988556,
-0.04363931715488434,
-0.257364422082901,
0.0799105167388916,
-0.15316511690616608,
0.09747926890850067,
0.11962320655584335,
0.2112886756658554,
-0.10168487578630447,
0.022989332675933838,
0.42787906527519226,
-0.07340128719806671,
-0.06346064060926437,
0.35741370916366577,
0.34256982803344727,
-0.2640048563480377,
-0.04006657004356384,
0.16749748587608337,
-0.36107438802719116,
-0.7053489685058594,
-0.0143358139321208,
0.04829101264476776,
0.252374529838562,
-0.10866110771894455,
-0.0957636684179306,
-0.030826985836029053,
-0.1774599850177765,
0.12283973395824432,
-0.18266038596630096,
-0.02525845542550087,
0.244267076253891,
-0.25239160656929016,
0.1988551765680313,
0.2882053554058075,
0.23868542909622192,
0.2664962112903595,
-0.08852016180753708,
-0.18727725744247437,
0.15053300559520721,
-0.11821963638067245,
0.19768807291984558,
0.23044797778129578,
0.19014936685562134,
0.07695316523313522,
-0.3742389976978302,
0.0010851100087165833,
0.07537876069545746,
-0.006648523733019829,
-0.08269424736499786,
-0.07605937123298645,
0.17274589836597443,
0.10176463425159454,
-0.14030127227306366,
-0.010559405200183392,
-0.10799092799425125,
-0.17322073876857758,
-0.08471271395683289,
-0.014326512813568115,
0.10450492054224014,
-0.10100385546684265,
0.07737946510314941,
-0.055352989584207535,
-0.15761294960975647,
-0.04398973658680916,
0.2994549870491028,
0.15343162417411804,
0.6165298223495483,
-0.0443686917424202,
0.18865367770195007,
0.14183646440505981,
0.10903553664684296,
-0.2960928678512573,
0.2664041817188263,
0.04514105245471001,
0.028678834438323975,
0.4582732021808624,
-0.4643438458442688,
0.28208085894584656,
0.2809881269931793,
0.3116772472858429,
0.11774633824825287,
-0.23879286646842957,
-0.3180033564567566,
0.192170649766922,
0.05848211050033569,
-0.4889948070049286,
0.08118122816085815,
0.4733128547668457,
0.08703511953353882,
-0.014255903661251068,
-0.013856329023838043,
-0.048282090574502945,
0.11497591435909271,
-0.1473671793937683,
0.22649326920509338,
0.30475130677223206,
-0.29888081550598145,
0.5010535717010498,
0.13008560240268707,
-0.066532202064991,
0.27615663409233093,
0.18440476059913635,
0.1410321742296219,
-0.12187298387289047,
0.5961585640907288,
-0.06452403217554092,
-0.05979153513908386,
-0.19616425037384033,
0.12953756749629974,
0.1723850965499878,
-0.3284039795398712,
0.2151649296283722,
0.008724108338356018,
-0.09924070537090302,
0.10917041450738907,
-0.04157720506191254,
0.5319937467575073,
0.09132902324199677,
-0.10875628888607025,
-0.3372173309326172,
0.19345808029174805,
-0.05036383122205734,
0.2060796469449997,
-0.19501477479934692,
-0.26352623105049133,
-0.06367339193820953,
0.24822288751602173,
-0.09285785257816315,
-0.2504533529281616,
0.18460674583911896,
0.14083532989025116,
-0.28415095806121826,
-0.4372597634792328,
0.03534632921218872,
0.10076109319925308,
0.19204837083816528,
-0.08842556923627853,
0.12697163224220276,
0.39197516441345215,
-0.1435609608888626,
0.20382249355316162,
0.49313241243362427,
0.17647960782051086,
0.009375803172588348,
0.04093032330274582,
-0.1270277202129364,
0.06271951645612717,
0.042762503027915955,
0.1627737432718277,
0.1864255666732788,
0.2110234946012497,
-0.2677781581878662,
0.16012799739837646,
0.03380303084850311,
-0.0231070164591074,
0.008567631244659424,
0.11561153829097748,
0.1693553775548935,
-0.3032722473144531,
-0.16821572184562683,
-0.5013644695281982,
-0.0004379376769065857,
-0.1417067050933838,
-0.3089684844017029,
-0.3615834712982178,
0.386803537607193,
0.5560770034790039,
0.016499517485499382,
-0.12469324469566345,
-0.3593181073665619,
-0.02364780753850937,
0.14040334522724152,
0.4433775246143341,
0.402920663356781,
-0.1188114657998085,
-0.18018709123134613,
-0.3239269554615021,
-0.7567061185836792,
0.17265817523002625,
-0.1187640130519867,
0.04740335792303085,
0.15256036818027496,
0.12072266638278961,
-0.07377246767282486,
0.04744396731257439,
0.49023759365081787,
-0.07245786488056183,
0.0909801796078682,
0.14946994185447693,
-0.20186319947242737,
-0.1949891597032547,
-0.02021344006061554,
0.03618305176496506,
-0.19414395093917847,
-0.2899828553199768,
0.26913928985595703,
-0.05773776024580002,
-0.09800571203231812,
-0.27229809761047363,
0.11229820549488068,
-0.15592795610427856,
-0.2830561101436615,
0.241529643535614,
0.1410963088274002,
0.4708118736743927,
0.17277535796165466,
0.009365634992718697,
-0.2903944253921509,
-0.4122558534145355,
-0.04099755734205246,
0.5717185735702515,
0.225494384765625,
0.22797420620918274,
-0.1006014496088028,
-0.35285118222236633,
-0.1615854948759079,
0.3068428635597229,
0.01647123694419861,
0.36521968245506287,
-0.5511111617088318,
-0.20184728503227234,
-0.16187703609466553,
-0.012285717763006687,
0.228693887591362,
0.3645714819431305,
-0.045363105833530426,
0.17586538195610046,
-0.16532361507415771,
-0.3516922891139984,
0.4825180768966675,
-0.5383816957473755,
-0.33905625343322754,
0.048161134123802185,
0.08665905892848969,
0.24948975443840027,
-0.22403256595134735,
-0.31267058849334717,
0.06352076679468155,
0.36273834109306335,
0.11484893411397934,
-0.08735311031341553,
0.03134329989552498,
-0.16162167489528656,
-0.10794771462678909,
0.03883005306124687,
0.21455231308937073,
0.063753142952919,
-0.11531225591897964,
0.15104509890079498,
-0.08660736680030823
] |
https://github.com/huggingface/datasets/issues/4784 | Add Multiface dataset | Hey @nandwalritik! Thanks for offering to help!
This dataset might be somewhat complex and I'm concerned about it being 65 TB, which would be quite expensive to host. @lhoestq @mariosasko I would love your input if you think it's worth adding this dataset. | ## Adding a Dataset
- **Name:** Multiface dataset
- **Description:** f high quality recordings of the faces of 13 identities, each captured in a multi-view capture stage performing various facial expressions. An average of 12,200 (v1 scripts) to 23,000 (v2 scripts) frames per subject with capture rate at 30 fps
- **Data:** https://github.com/facebookresearch/multiface
The whole dataset is 65TB though, so I'm not sure
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
| 43 | Add Multiface dataset
## Adding a Dataset
- **Name:** Multiface dataset
- **Description:** f high quality recordings of the faces of 13 identities, each captured in a multi-view capture stage performing various facial expressions. An average of 12,200 (v1 scripts) to 23,000 (v2 scripts) frames per subject with capture rate at 30 fps
- **Data:** https://github.com/facebookresearch/multiface
The whole dataset is 65TB though, so I'm not sure
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
Hey @nandwalritik! Thanks for offering to help!
This dataset might be somewhat complex and I'm concerned about it being 65 TB, which would be quite expensive to host. @lhoestq @mariosasko I would love your input if you think it's worth adding this dataset. | [
-0.346452534198761,
-0.014385707676410675,
-0.13856108486652374,
0.00020969659090042114,
-0.1225498616695404,
0.1296854317188263,
0.3332798480987549,
0.07630888372659683,
0.257561057806015,
-0.008361995220184326,
-0.16959241032600403,
-0.47519344091415405,
-0.20964425802230835,
0.7228807806968689,
0.13797055184841156,
-0.28654298186302185,
0.01877187192440033,
-0.09683084487915039,
0.09225868433713913,
0.03008730709552765,
-0.03112347424030304,
0.14390888810157776,
0.06387649476528168,
-0.25115644931793213,
-0.43483346700668335,
-0.050759412348270416,
-0.0828230157494545,
0.20429116487503052,
-0.17667745053768158,
-0.10764873027801514,
-0.40978720784187317,
0.07107087969779968,
0.07039611041545868,
0.5786040425300598,
-0.00010295519314240664,
-0.2125651240348816,
-0.12108932435512543,
-0.1378801167011261,
0.014163771644234657,
0.4075521230697632,
0.21652457118034363,
-0.2491142898797989,
-0.375790536403656,
-0.06034429371356964,
-0.07769505679607391,
-0.2055215835571289,
0.017252186313271523,
-0.17143598198890686,
0.316128134727478,
0.23020847141742706,
0.2740298807621002,
0.03704797476530075,
-0.13256075978279114,
-0.03898433595895767,
-0.043928198516368866,
0.4348708987236023,
-0.08984064310789108,
-0.17718739807605743,
0.012053556740283966,
-0.1586437225341797,
-0.012709520757198334,
0.6722723841667175,
-0.01991588994860649,
-0.25902336835861206,
0.14051657915115356,
-0.0017659077420830727,
0.00373850017786026,
-0.3986544907093048,
-0.028632454574108124,
0.31689226627349854,
-0.08812768012285233,
0.24393323063850403,
-0.3189099133014679,
-0.24766820669174194,
0.004683490842580795,
-0.14130163192749023,
-0.06792289763689041,
0.25329622626304626,
-0.139907106757164,
0.07761937379837036,
-0.4857449531555176,
-0.0811833068728447,
-0.028807207942008972,
0.006508182734251022,
0.02760373055934906,
-0.2482682168483734,
-0.01752527430653572,
0.04351486638188362,
0.14652104675769806,
-0.22460030019283295,
-0.40197715163230896,
0.12429797649383545,
-0.02704397216439247,
-0.1858453005552292,
-0.2402489334344864,
-0.19765973091125488,
0.034497059881687164,
-0.05040845274925232,
0.21229544281959534,
0.04866455867886543,
0.04121200367808342,
-0.08294244110584259,
-0.2858777344226837,
-0.11559552699327469,
0.01635723188519478,
-0.05325563997030258,
-0.2969343960285187,
-0.5189711451530457,
0.28826984763145447,
0.0315917432308197,
0.022442732006311417,
0.1651391088962555,
0.15329475700855255,
0.06109466403722763,
-0.13077497482299805,
-0.21002197265625,
-0.200285866856575,
0.09937427937984467,
-0.19179989397525787,
0.017053939402103424,
-0.10284171998500824,
-0.16948986053466797,
0.02895389311015606,
0.45098423957824707,
0.04732724279165268,
0.4568406641483307,
0.1894947737455368,
-0.03042672947049141,
-0.002359822392463684,
-0.6283480525016785,
-0.17696651816368103,
0.058845460414886475,
-0.0842924416065216,
0.2888626456260681,
0.29197779297828674,
-0.015485655516386032,
-0.13743412494659424,
-0.17099981009960175,
0.18733423948287964,
0.2954019606113434,
0.16174370050430298,
0.06728674471378326,
0.2730501890182495,
0.08876466751098633,
0.12032860517501831,
-0.1744900792837143,
-0.15326252579689026,
0.07391902804374695,
-0.1302272379398346,
-0.009943440556526184,
0.260421484708786,
-0.20198819041252136,
-0.28007903695106506,
0.2289104461669922,
0.13854120671749115,
-0.18569041788578033,
-0.3275095522403717,
0.5836069583892822,
-0.08995696157217026,
-0.10726587474346161,
0.169753298163414,
0.1371847689151764,
-0.11443094909191132,
-0.17574450373649597,
0.07951166480779648,
0.44222068786621094,
-0.09183726459741592,
-0.07034100592136383,
0.28876012563705444,
0.09643107652664185,
-0.061064355075359344,
0.36254772543907166,
0.04413951188325882,
-0.21571576595306396,
-0.07458125054836273,
-0.055054645985364914,
-0.03868808597326279,
-0.32764920592308044,
-0.046769388020038605,
0.24373969435691833,
-0.1107756644487381,
-0.03404897078871727,
0.26962679624557495,
0.39072340726852417,
0.030754679813981056,
-0.14774470031261444,
-0.01594138890504837,
0.5524166226387024,
-0.26828110218048096,
0.3100140392780304,
-0.12351252138614655,
-0.46146517992019653,
0.1875726282596588,
0.4673437476158142,
-0.06878583133220673,
-0.2749774158000946,
-0.022936567664146423,
-0.039387546479701996,
0.14329153299331665,
-0.38426244258880615,
0.08896052092313766,
-0.16239504516124725,
0.11803396046161652,
0.02781682088971138,
-0.05968068167567253,
-0.07940779626369476,
-0.2924451231956482,
-0.09517206251621246,
-0.14539913833141327,
0.15004326403141022,
0.3697861433029175,
-0.37409907579421997,
0.41582560539245605,
-0.35036203265190125,
-0.009525496512651443,
-0.2490655481815338,
0.16736266016960144,
0.37610185146331787,
0.04996674135327339,
-0.23964634537696838,
-0.3536916673183441,
0.2924667000770569,
0.3183281719684601,
-0.05503929406404495,
-0.2356666773557663,
0.16956530511379242,
-0.21025623381137848,
-0.019364628940820694,
0.07297396659851074,
0.04234190285205841,
-0.045418597757816315,
-0.06702925264835358,
0.24168336391448975,
0.17684587836265564,
-0.18359890580177307,
0.1767963320016861,
0.46919986605644226,
0.381181538105011,
0.25479263067245483,
-0.30235615372657776,
0.22467823326587677,
-0.021993335336446762,
-0.17410887777805328,
-0.09130706638097763,
-0.03715652972459793,
0.1079779788851738,
0.0053407251834869385,
0.15216083824634552,
-0.12083415687084198,
-0.039677638560533524,
0.34953442215919495,
0.1563965529203415,
0.05704294890165329,
-0.17853176593780518,
0.17123104631900787,
0.25054019689559937,
-0.22703444957733154,
-0.09603941440582275,
-0.5012816190719604,
0.339895635843277,
0.1419914960861206,
0.04786491021513939,
0.2808516323566437,
0.11508073657751083,
0.026432186365127563,
-0.25665363669395447,
-0.040596917271614075,
-0.3742309808731079,
0.24282558262348175,
0.37548574805259705,
-0.16113197803497314,
-0.022715626284480095,
0.38941583037376404,
-0.03181980550289154,
-0.015345968306064606,
-0.1196146309375763,
-0.054279625415802,
-0.008427664637565613,
0.3618861436843872,
0.13674920797348022,
-0.39201897382736206,
-0.38473695516586304,
0.09069696068763733,
-0.20920392870903015,
-0.005093514919281006,
0.11301697045564651,
0.20107513666152954,
-0.2461186647415161,
0.21642599999904633,
-0.3366067707538605,
-0.22236976027488708,
0.08987228572368622,
0.08339633047580719,
0.07667692005634308,
-0.110481858253479,
0.10818410664796829,
0.08508665859699249,
0.7191938161849976,
-0.19436900317668915,
0.07334064692258835,
-0.2165982574224472,
0.06774396449327469,
0.07010170817375183,
0.16014829277992249,
0.279354065656662,
-0.055724646896123886,
0.26702696084976196,
-0.17285166680812836,
0.10196712613105774,
-0.42087075114250183,
-0.5790773034095764,
0.07616105675697327,
-0.29682934284210205,
-0.006453186273574829,
0.1218564584851265,
0.15818260610103607,
0.03683196008205414,
-0.03182847052812576,
-0.0003630799474194646,
-0.24798297882080078,
-0.17778347432613373,
-0.2067367136478424,
-0.17484407126903534,
0.11215385049581528,
0.046012092381715775,
0.16133421659469604,
-0.39138519763946533,
-0.3889290690422058,
0.6069550514221191,
0.10994918644428253,
0.006980393081903458,
0.01148760411888361,
-0.19900719821453094,
0.004910611547529697,
-0.34423187375068665,
0.12657219171524048,
-0.4007064700126648,
-0.24609921872615814,
0.15392452478408813,
-0.43962934613227844,
-0.3192921578884125,
0.13862097263336182,
-0.0713689997792244,
-0.11493121087551117,
-0.2815190553665161,
-0.5386292338371277,
-0.2999887764453888,
-0.11293071508407593,
0.021111037582159042,
0.04857407510280609,
-0.0057118553668260574,
0.28682827949523926,
-0.08648555725812912,
-0.21886585652828217,
0.022883839905261993,
-0.3856230676174164,
-0.004431471228599548,
0.28925275802612305,
0.16623301804065704,
-0.3165070116519928,
0.14875859022140503,
0.05977341905236244,
0.4662438631057739,
0.36045897006988525,
0.019253043457865715,
0.4037879407405853,
-0.06915649026632309,
0.13320313394069672,
-0.16429674625396729,
-0.2972201108932495,
0.3435004949569702,
-0.02844350039958954,
0.016893532127141953,
0.19929054379463196,
-0.013408351689577103,
-0.04799676686525345,
-0.235484316945076,
-0.13403013348579407,
-0.2805279493331909,
-0.1614048033952713,
0.19328553974628448,
0.32003793120384216,
0.04066215455532074,
-0.3298662304878235,
-0.44075584411621094,
-0.187383234500885,
-0.14296552538871765,
0.23578403890132904,
0.2947345972061157,
0.08674926310777664,
-0.07643193751573563,
-0.32827088236808777,
0.05659173056483269,
-0.2932525873184204,
0.2139965295791626,
-0.006125510670244694,
-0.1432553380727768,
-0.2991301119327545,
-0.0397062748670578,
-0.16032229363918304,
0.00719852838665247,
0.6540336608886719,
-0.2439427226781845,
-0.10276564955711365,
-0.1963433027267456,
-0.2390967309474945,
-0.2772904932498932,
0.24247555434703827,
0.024879958480596542,
-0.2811996340751648,
0.21877507865428925,
0.190812885761261,
-0.17446421086788177,
0.15208879113197327,
0.8276433944702148,
0.17321723699569702,
-0.03634816035628319,
0.01537268329411745,
-0.2528301179409027,
-0.20865383744239807,
-0.2699211537837982,
0.012473419308662415,
0.043004103004932404,
-0.020748844370245934,
0.3142705261707306,
-0.02594970352947712,
0.02504190243780613,
-0.25190868973731995,
0.178282231092453,
0.1439381092786789,
-0.04268284887075424,
0.4073839485645294,
0.3038574159145355,
0.16466788947582245,
-0.08945260941982269,
0.19070841372013092,
0.7428231239318848,
0.11823141574859619,
-0.29383575916290283,
0.24251225590705872,
0.1646069884300232,
0.24111130833625793,
0.403190553188324,
0.2716017961502075,
-0.13565483689308167,
0.1907527595758438,
0.4369957447052002,
-0.22299958765506744,
0.24365653097629547,
0.16951288282871246,
0.13619060814380646,
-0.24532268941402435,
-0.05599943548440933,
0.3965980112552643,
0.005923693999648094,
0.08733400702476501,
-0.01582726091146469,
0.2457282394170761,
-0.05609574168920517,
0.1963927000761032,
0.06587826460599899,
1.0210970640182495,
0.11331278085708618,
0.36338159441947937,
-0.1521662175655365,
-0.007663115859031677,
0.05901374667882919,
-0.10741925239562988,
-0.008868413046002388,
-0.0389191135764122,
-0.13756756484508514,
-0.07051657140254974,
-0.0027801990509033203,
-0.09842244535684586,
-0.013340957462787628,
-0.20100700855255127,
-0.1530645489692688,
0.2993847727775574,
-0.05919352546334267,
-0.19740545749664307,
0.6524028182029724,
-0.0590389147400856,
-0.45215097069740295,
-0.10355175286531448,
0.23036983609199524,
-0.05684506148099899,
0.07153446972370148,
0.11732596904039383,
-0.09937527775764465,
-0.015151336789131165,
0.09246249496936798,
-0.24586515128612518,
-0.05835750326514244,
-0.4086138606071472,
-0.03909739479422569,
-0.12053340673446655,
-0.14136074483394623,
-0.09857037663459778,
0.15149135887622833,
-0.005461394786834717,
-0.19718630611896515,
-0.15848560631275177,
0.21388429403305054,
-0.00344838947057724,
-0.12039388716220856,
-0.05569135397672653,
-0.29980525374412537,
0.15116414427757263,
-0.24875101447105408,
-0.25201743841171265,
0.2642267346382141,
0.21280920505523682,
-0.14874662458896637,
-0.21160952746868134,
0.16429036855697632,
0.06460079550743103,
-0.03272562474012375,
0.06159345433115959,
0.20276176929473877,
-0.21127185225486755,
-0.07359128445386887,
0.1578674465417862,
0.22035522758960724,
-0.05685855820775032,
0.013572447001934052,
0.06289888173341751,
0.0052289292216300964,
-0.2144702523946762,
0.111366868019104,
-0.008255474269390106,
-0.21919211745262146,
0.12498199939727783,
0.37565943598747253,
-0.0839633196592331,
-0.2328292727470398,
0.1933794617652893,
0.3928380310535431,
-0.25193145871162415,
0.012624824419617653,
0.07486853003501892,
-0.38032060861587524,
0.08515547960996628,
0.5303555130958557,
0.18868553638458252,
0.003992386162281036,
-0.00014752894639968872,
-0.05156705528497696,
-0.3057285249233246,
0.44008201360702515,
-0.03048921748995781,
0.12639085948467255,
0.22294098138809204,
-0.004096018150448799,
0.13704586029052734,
0.24616369605064392,
-0.44517219066619873,
0.10522738844156265,
0.1251753717660904,
-0.04928332567214966,
-0.1464156210422516,
-0.3909726142883301,
0.36916589736938477,
0.10459873080253601,
0.12174719572067261,
0.08218604326248169,
-0.10170623660087585,
-0.21968132257461548,
0.006228018552064896,
0.10625781118869781,
0.16042238473892212,
-0.23178893327713013,
0.08216256648302078,
0.03615614399313927,
-0.26378756761550903,
-0.07578041404485703,
0.2860187292098999,
0.06927153468132019,
-0.06394714117050171,
-0.1582244634628296,
-0.13741299510002136,
-0.509739339351654,
0.11127173900604248,
0.018025271594524384,
0.14237025380134583,
0.3107162117958069,
0.22321034967899323,
0.1291537582874298,
0.025357326492667198,
-0.32389914989471436,
0.12836810946464539,
0.4147879481315613,
0.12859775125980377,
0.17339301109313965,
0.04860273376107216,
-0.1006544828414917,
-0.08139771223068237,
0.2991599440574646,
0.3454040288925171,
-0.15276603400707245,
-0.3724871277809143,
0.2894935607910156,
-0.10835639387369156,
0.28770557045936584,
-0.3186759054660797,
0.048216886818408966,
0.10868966579437256,
-0.12173939496278763,
0.39270639419555664,
0.4522683620452881,
0.270574152469635,
0.2578992545604706,
-0.000027060508728027344,
0.010433875024318695,
-0.07188064604997635,
0.1648823767900467,
0.014991074800491333,
-0.3457765579223633,
-0.31750303506851196,
-0.03225689008831978,
0.4061185419559479,
0.3719547986984253,
0.19340145587921143,
0.06686855107545853,
-0.15297099947929382,
0.3099019229412079,
-0.08165522664785385,
0.09842820465564728,
0.42238834500312805,
-0.0664476752281189,
0.19429545104503632,
-0.14295527338981628,
-0.039261698722839355,
0.28027981519699097,
-0.06370389461517334,
0.34174543619155884,
-0.20311355590820312,
-0.1921650618314743,
-0.23703737556934357,
0.33236458897590637,
0.157157301902771,
0.15044677257537842,
0.09944608807563782,
-0.07530184835195541,
-0.22191791236400604,
0.12553416192531586,
-0.05046975985169411,
-0.3663679361343384,
0.2728379964828491,
0.20650936663150787,
-0.09754535555839539,
0.08477818220853806,
-0.08525846153497696,
-0.01692577451467514,
0.5005654096603394,
-0.011998336762189865,
0.22427134215831757,
0.6138036847114563,
-0.21638956665992737,
0.4496077001094818,
0.5670793652534485,
0.2685658931732178,
-0.11105389893054962,
-0.009760415181517601,
0.44286108016967773,
-0.19419948756694794,
-0.14362524449825287,
-0.191024050116539,
0.16020849347114563,
0.035458825528621674,
0.12714821100234985,
0.02696995809674263,
0.21723659336566925,
-0.3199605345726013,
-0.28382623195648193,
-0.08660812675952911,
0.14306330680847168,
-0.22310969233512878,
-0.0349230095744133,
-0.2344522476196289,
-0.025653909891843796,
-0.4884263575077057,
0.02341310679912567,
-0.4855876863002777,
-0.44259485602378845,
0.1583506017923355,
-0.3780069053173065,
-0.08631627261638641,
-0.12359844893217087,
0.13034234941005707,
-0.12188741564750671,
0.522504448890686,
0.18873368203639984,
0.17801490426063538,
0.09359817951917648,
-0.005194313824176788,
-0.22201688587665558,
0.07156192511320114,
0.03886481374502182,
-0.0379260890185833,
-0.08462675660848618,
0.4252301752567291,
0.18121203780174255,
0.3402782082557678,
0.4297257661819458,
0.04060870781540871,
-0.09360943734645844,
0.07464045286178589,
-0.20730692148208618,
0.44953206181526184,
0.08497999608516693,
0.40378811955451965,
0.1924401968717575,
0.006725858896970749,
0.5031467080116272,
0.09904474765062332,
0.13636648654937744,
-0.10551361739635468,
-0.34240350127220154,
-0.23968608677387238,
-0.14016394317150116,
0.2618381381034851,
-0.018723463639616966,
0.3280300796031952,
-0.23273250460624695,
-0.5470522046089172,
0.012394055724143982,
0.06282016634941101,
-0.25152188539505005,
0.256634920835495,
0.3156815767288208,
0.49423882365226746,
0.005890039727091789,
0.03136417269706726,
-0.027169013395905495,
0.16757729649543762,
-0.1381109207868576,
-0.23928458988666534,
-0.23985043168067932,
0.17367924749851227,
0.1996673047542572,
0.05355675145983696,
0.1195869892835617,
0.2899141013622284,
0.019120384007692337,
-0.19003672897815704,
-0.23420700430870056,
-0.23664402961730957,
0.34999555349349976,
-0.180669903755188,
0.005683794617652893,
-0.07881089299917221,
0.17048850655555725,
0.06356365233659744,
0.2159164696931839,
-0.7161117792129517,
0.11934158951044083,
-0.009588086046278477,
0.1473846137523651,
-0.01862320303916931,
0.27912193536758423,
-0.45211824774742126,
-0.27044498920440674,
-0.10276637226343155,
0.07554639875888824,
0.05655035004019737,
-0.007667206227779388,
-0.050545353442430496,
-0.032660555094480515
] |
https://github.com/huggingface/datasets/issues/4784 | Add Multiface dataset | Thanks for proposing this interesting dataset, @osanseviero.
Please note that the data files are already hosted in a third-party server: e.g. the index of data files for entity "6795937" is at https://fb-baas-f32eacb9-8abb-11eb-b2b8-4857dd089e15.s3.amazonaws.com/MugsyDataRelease/v0.0/identities/6795937/index.html
- audio.tar: https://fb-baas-f32eacb9-8abb-11eb-b2b8-4857dd089e15.s3.amazonaws.com/MugsyDataRelease/v0.0/identities/6795937/audio.tar
- ...
Therefore, in principle, we don't need to host them on our Hub: it would be enough to just implement a loading script in the corresponding Hub dataset repo, e.g. "facebook/multiface"... | ## Adding a Dataset
- **Name:** Multiface dataset
- **Description:** f high quality recordings of the faces of 13 identities, each captured in a multi-view capture stage performing various facial expressions. An average of 12,200 (v1 scripts) to 23,000 (v2 scripts) frames per subject with capture rate at 30 fps
- **Data:** https://github.com/facebookresearch/multiface
The whole dataset is 65TB though, so I'm not sure
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
| 67 | Add Multiface dataset
## Adding a Dataset
- **Name:** Multiface dataset
- **Description:** f high quality recordings of the faces of 13 identities, each captured in a multi-view capture stage performing various facial expressions. An average of 12,200 (v1 scripts) to 23,000 (v2 scripts) frames per subject with capture rate at 30 fps
- **Data:** https://github.com/facebookresearch/multiface
The whole dataset is 65TB though, so I'm not sure
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/main/ADD_NEW_DATASET.md).
Thanks for proposing this interesting dataset, @osanseviero.
Please note that the data files are already hosted in a third-party server: e.g. the index of data files for entity "6795937" is at https://fb-baas-f32eacb9-8abb-11eb-b2b8-4857dd089e15.s3.amazonaws.com/MugsyDataRelease/v0.0/identities/6795937/index.html
- audio.tar: https://fb-baas-f32eacb9-8abb-11eb-b2b8-4857dd089e15.s3.amazonaws.com/MugsyDataRelease/v0.0/identities/6795937/audio.tar
- ...
Therefore, in principle, we don't need to host them on our Hub: it would be enough to just implement a loading script in the corresponding Hub dataset repo, e.g. "facebook/multiface"... | [
-0.4024711549282074,
-0.016814619302749634,
-0.12537623941898346,
-0.03847888857126236,
-0.12090109288692474,
0.08127067238092422,
0.439380943775177,
0.12573690712451935,
0.2306147813796997,
0.08893826603889465,
-0.25027236342430115,
-0.29963943362236023,
-0.17815382778644562,
0.6216028332710266,
0.0906348004937172,
-0.08692002296447754,
0.009938813745975494,
0.02586507797241211,
0.14435116946697235,
0.05586536228656769,
-0.016312656924128532,
0.16972985863685608,
0.06928551197052002,
-0.19256745278835297,
-0.5969617366790771,
0.07166064530611038,
-0.11536159366369247,
0.26233744621276855,
-0.127590149641037,
-0.09675789624452591,
-0.25728726387023926,
0.2326945662498474,
-0.049271125346422195,
0.5071226954460144,
-0.00010136945638805628,
-0.15474744141101837,
-0.0557163804769516,
-0.11789143830537796,
-0.04346467927098274,
0.3750661015510559,
0.052757628262043,
-0.1346425712108612,
-0.3295900821685791,
-0.08739898353815079,
-0.160640150308609,
-0.11211808770895004,
0.008194269612431526,
-0.09930978715419769,
0.3397625982761383,
0.21818722784519196,
0.2664187252521515,
-0.06509120017290115,
-0.2414001226425171,
-0.07859637588262558,
0.014428578317165375,
0.46129220724105835,
-0.0581258162856102,
-0.2711038887500763,
0.09989068657159805,
-0.17674963176250458,
-0.10905110090970993,
0.5178837180137634,
-0.06059720367193222,
-0.14181937277317047,
0.07402580976486206,
-0.019559483975172043,
0.013661883771419525,
-0.36026448011398315,
-0.03759540617465973,
0.41978025436401367,
0.014738038182258606,
0.16316871345043182,
-0.37721359729766846,
-0.1961463987827301,
0.05663561075925827,
-0.03091192990541458,
-0.036457955837249756,
0.29697945713996887,
-0.17431050539016724,
0.01970280520617962,
-0.47647348046302795,
-0.043449290096759796,
-0.018918566405773163,
0.11712779104709625,
0.018778450787067413,
-0.11055676639080048,
0.02542593702673912,
-0.01008526235818863,
0.0028289705514907837,
-0.2723562717437744,
-0.09346538037061691,
0.04142265021800995,
0.05639975517988205,
-0.1994563639163971,
-0.28442177176475525,
-0.21559157967567444,
0.06299611926078796,
0.07286082953214645,
0.16198840737342834,
0.1693965047597885,
0.12751074135303497,
0.06777536869049072,
-0.3622274100780487,
0.07031457871198654,
-0.03207000344991684,
-0.11674997210502625,
-0.12145737558603287,
-0.42573270201683044,
0.37996524572372437,
0.09273156523704529,
0.05006852373480797,
0.19829466938972473,
-0.06588035076856613,
0.2180892676115036,
-0.14913871884346008,
-0.021351978182792664,
-0.2265401929616928,
0.139292910695076,
-0.3531772494316101,
-0.05395226180553436,
-0.03623820096254349,
0.05448904633522034,
0.1841515451669693,
0.4137345254421234,
-0.049825675785541534,
0.4295766055583954,
0.1720021665096283,
0.0555545873939991,
-0.06424811482429504,
-0.567387580871582,
-0.20064066350460052,
0.12286387383937836,
-0.03570909425616264,
0.29900938272476196,
0.3668050169944763,
-0.011426618322730064,
0.004017021507024765,
-0.19492818415164948,
0.3263837695121765,
0.17401070892810822,
0.16679511964321136,
-0.003775053657591343,
0.182125985622406,
0.05007041245698929,
0.2500373423099518,
-0.18153253197669983,
-0.11478720605373383,
-0.009075533598661423,
-0.13771192729473114,
-0.11089947074651718,
0.13489358127117157,
-0.1600392460823059,
-0.20327870547771454,
0.26481252908706665,
-0.0035698097199201584,
-0.09421347081661224,
-0.3153817057609558,
0.5535681247711182,
-0.1218017116189003,
-0.320910781621933,
0.0797000601887703,
0.09888028353452682,
-0.16251523792743683,
-0.13139253854751587,
0.0582108348608017,
0.3839150071144104,
0.020961958914995193,
-0.1573827564716339,
0.23227094113826752,
0.16980011761188507,
-0.12170613557100296,
0.2258630394935608,
0.04550311714410782,
-0.12929365038871765,
-0.13340602815151215,
0.20244048535823822,
-0.05079149454832077,
-0.4975137412548065,
-0.06209874898195267,
0.1176869347691536,
-0.07647436112165451,
0.03532296419143677,
0.22686374187469482,
0.3436644375324249,
0.21279041469097137,
-0.2105642706155777,
0.03182378038764,
0.6058017015457153,
-0.22478294372558594,
0.3276037573814392,
-0.00680914893746376,
-0.45360037684440613,
-0.08192003518342972,
0.467258483171463,
-0.1332891881465912,
-0.27129048109054565,
0.04662136733531952,
0.21327000856399536,
0.14668533205986023,
-0.33485060930252075,
0.1576988399028778,
-0.12559153139591217,
-0.03226533904671669,
-0.03806140273809433,
-0.10897991061210632,
-0.17374926805496216,
-0.19271403551101685,
0.0017078220844268799,
-0.17052975296974182,
0.14504483342170715,
0.2826932668685913,
-0.49900203943252563,
0.29094383120536804,
-0.2756529450416565,
-0.06088162586092949,
-0.13840822875499725,
0.25831368565559387,
0.39768293499946594,
-0.012608634307980537,
-0.2899909019470215,
-0.32213157415390015,
0.36848682165145874,
0.33812180161476135,
-0.13632836937904358,
-0.3420291543006897,
0.33984604477882385,
-0.09383746236562729,
0.013841320760548115,
0.118168905377388,
0.04296840727329254,
0.09205473959445953,
0.023885108530521393,
0.24323809146881104,
0.28887975215911865,
-0.09593988955020905,
0.4284021258354187,
0.5116132497787476,
0.4268420338630676,
0.21873638033866882,
-0.263642281293869,
0.315592497587204,
-0.10195909440517426,
-0.14439409971237183,
-0.17063382267951965,
-0.03726011514663696,
0.08015266805887222,
0.057414352893829346,
0.15528282523155212,
-0.10309385508298874,
-0.04004567489027977,
0.3403349816799164,
0.12845322489738464,
-0.06936497986316681,
-0.1796678602695465,
0.09151344746351242,
0.22183680534362793,
-0.28562989830970764,
-0.17712727189064026,
-0.28447940945625305,
0.3558804988861084,
0.316932737827301,
-0.011907204985618591,
0.4083522856235504,
0.08976313471794128,
-0.12246472388505936,
-0.3425045311450958,
-0.038451001048088074,
-0.3028475344181061,
0.1844693422317505,
0.3150026798248291,
-0.0275849811732769,
-0.06038251519203186,
0.4008335769176483,
-0.1179785206913948,
0.0021172240376472473,
-0.06504462659358978,
-0.032094694674015045,
0.19479405879974365,
0.3266606628894806,
-0.06564021110534668,
-0.4351115822792053,
-0.49252575635910034,
0.2020915001630783,
-0.24856287240982056,
-0.10288271307945251,
0.07830560207366943,
-0.004959661513566971,
-0.07283078134059906,
0.2527652382850647,
-0.4641962945461273,
-0.1660451740026474,
0.07713861763477325,
0.27317434549331665,
0.31983456015586853,
-0.11690159142017365,
0.10172037780284882,
0.15014317631721497,
0.732850193977356,
-0.16013936698436737,
0.10926210135221481,
-0.2533125579357147,
0.08687567710876465,
0.11572574824094772,
0.18583820760250092,
0.25249582529067993,
0.11544127017259598,
0.1575857698917389,
-0.23888853192329407,
0.1813534051179886,
-0.3445889949798584,
-0.29787224531173706,
0.09797012805938721,
-0.12379762530326843,
-0.03735125809907913,
0.14377951622009277,
0.06743316352367401,
0.034111201763153076,
-0.1238057091832161,
0.042153771966695786,
-0.1961284577846527,
-0.1257445514202118,
-0.10022001713514328,
-0.10965076833963394,
0.14302244782447815,
0.1585191786289215,
0.21430861949920654,
-0.365103155374527,
-0.46078240871429443,
0.3747120499610901,
0.11482101678848267,
0.053425006568431854,
-0.10457712411880493,
-0.1773952692747116,
0.028876490890979767,
-0.19621536135673523,
0.16975244879722595,
-0.45762982964515686,
-0.27553802728652954,
0.23693613708019257,
-0.5205173492431641,
-0.2695692181587219,
0.09262816607952118,
-0.12376907467842102,
0.007565055042505264,
-0.32859450578689575,
-0.40970832109451294,
-0.47001954913139343,
0.05610748380422592,
-0.04067833349108696,
0.08695560693740845,
-0.04836159944534302,
0.3353094458580017,
-0.07864903658628464,
-0.21406209468841553,
0.008591081947088242,
-0.3376900553703308,
-0.10335380584001541,
0.32175126671791077,
0.0012197121977806091,
-0.24429330229759216,
0.054042793810367584,
0.06484733521938324,
0.38917750120162964,
0.4703867435455322,
0.060331910848617554,
0.39444205164909363,
-0.026576178148388863,
-0.0061503686010837555,
-0.15704166889190674,
-0.108664371073246,
0.18311376869678497,
-0.055629923939704895,
0.033139947801828384,
0.3629752993583679,
0.12958893179893494,
-0.038664311170578,
-0.251345157623291,
-0.05394294857978821,
-0.38820746541023254,
-0.2211826741695404,
0.16875101625919342,
0.11795344203710556,
0.030015725642442703,
-0.2392420768737793,
-0.2484278678894043,
-0.2028774619102478,
-0.12389634549617767,
0.2771868109703064,
0.10286398977041245,
0.05609791353344917,
-0.13184501230716705,
-0.3192234933376312,
-0.01953830197453499,
-0.2797274589538574,
0.279188334941864,
0.08470074087381363,
-0.08094225823879242,
-0.2629094421863556,
-0.06846386939287186,
-0.11678415536880493,
-0.059455785900354385,
0.5920555591583252,
-0.43166017532348633,
-0.00471888855099678,
-0.18659871816635132,
-0.2139732986688614,
-0.3056546151638031,
0.1973465234041214,
-0.03843957185745239,
-0.24935127794742584,
-0.03333489969372749,
0.18160194158554077,
-0.20529475808143616,
0.07457827031612396,
0.5763226747512817,
0.001999420579522848,
-0.05304891616106033,
0.031786806881427765,
-0.1274290829896927,
-0.1750507354736328,
-0.32606953382492065,
-0.08981173485517502,
0.056458696722984314,
-0.03818454593420029,
0.1665503829717636,
-0.16098669171333313,
0.08792517334222794,
-0.17776280641555786,
0.11592502892017365,
0.16211147606372833,
-0.03281143307685852,
0.4111846685409546,
0.21578532457351685,
0.22090831398963928,
-0.26695334911346436,
0.17485475540161133,
0.7767126560211182,
0.2243105173110962,
-0.2971816658973694,
0.3262444734573364,
0.12108126282691956,
-0.03025820106267929,
0.46567732095718384,
0.37772682309150696,
-0.03855521231889725,
0.1760893613100052,
0.3504543900489807,
-0.30720341205596924,
0.2587319016456604,
0.19543768465518951,
0.06588021665811539,
-0.08651580661535263,
-0.025545384734869003,
0.462981253862381,
-0.03661111369729042,
0.003773890435695648,
-0.03309062868356705,
0.19480282068252563,
-0.09580375999212265,
0.2175038456916809,
0.0242367684841156,
0.9226150512695312,
0.19652141630649567,
0.2009364515542984,
-0.2012695074081421,
-0.029141293838620186,
0.0022959287744015455,
-0.4068431854248047,
0.05682170018553734,
-0.0806417316198349,
-0.17715469002723694,
-0.15074008703231812,
0.047797393053770065,
-0.19952726364135742,
0.09270687401294708,
-0.2595587968826294,
-0.20253311097621918,
0.29206550121307373,
0.0943092405796051,
-0.21401333808898926,
0.6179991364479065,
-0.259781152009964,
-0.5387834906578064,
-0.1062680333852768,
0.29610490798950195,
-0.08822531998157501,
0.06562086939811707,
0.1202097162604332,
-0.03906966373324394,
-0.020574532449245453,
0.08169056475162506,
-0.2378571629524231,
0.042333416640758514,
-0.20881927013397217,
-0.053847238421440125,
-0.18535518646240234,
-0.07069452852010727,
-0.16976530849933624,
0.10026024281978607,
-0.00985746830701828,
-0.16144917905330658,
-0.26379555463790894,
0.1807771772146225,
0.059475578367710114,
-0.016778945922851562,
-0.049582984298467636,
-0.2902762293815613,
0.1506403088569641,
-0.22628158330917358,
-0.30476224422454834,
0.28670579195022583,
0.28697341680526733,
-0.17327186465263367,
0.06165479123592377,
0.06879197061061859,
0.13844797015190125,
-0.05199991911649704,
0.08963838219642639,
0.15982478857040405,
-0.24042531847953796,
-0.16295243799686432,
0.18949100375175476,
0.22756808996200562,
-0.22450372576713562,
0.07668542861938477,
0.13925640285015106,
0.09647805988788605,
-0.10764186084270477,
0.24978145956993103,
-0.007883593440055847,
-0.2091899812221527,
0.13588741421699524,
0.2978271245956421,
-0.06366805732250214,
-0.28952425718307495,
0.22143206000328064,
0.39537501335144043,
-0.29769229888916016,
-0.026206348091363907,
-0.011324774473905563,
-0.49961698055267334,
0.10699799656867981,
0.4432299733161926,
0.03959869220852852,
0.10713431239128113,
-0.12399725615978241,
-0.16704298555850983,
-0.18419192731380463,
0.512146532535553,
0.06812794506549835,
0.14608559012413025,
0.2235633134841919,
-0.11692497134208679,
0.039153940975666046,
0.2313101887702942,
-0.45224106311798096,
0.08476895838975906,
-0.06529092788696289,
-0.06991101801395416,
-0.38744238018989563,
-0.3696390688419342,
0.31522104144096375,
0.09480337798595428,
0.13748399913311005,
0.09238172322511673,
-0.2106497436761856,
-0.2698313593864441,
0.007759148254990578,
0.11047832667827606,
0.2112867832183838,
-0.09364829957485199,
-0.06327036023139954,
0.041786618530750275,
-0.2917358875274658,
-0.1965499073266983,
0.37896889448165894,
0.0704386755824089,
-0.07812055945396423,
-0.17375831305980682,
-0.02019883319735527,
-0.42201709747314453,
0.058775730431079865,
-0.09122715890407562,
0.2808762490749359,
0.1272483468055725,
0.1072600856423378,
0.13159281015396118,
-0.04098521173000336,
-0.2845572531223297,
0.17624452710151672,
0.5367251038551331,
0.24896538257598877,
0.09265336394309998,
0.19792219996452332,
-0.0582217276096344,
-0.021301135420799255,
0.29722172021865845,
0.34896039962768555,
-0.11498682200908661,
-0.3724501132965088,
0.15984058380126953,
-0.09299921244382858,
0.31655991077423096,
-0.2869738042354584,
-0.07818157225847244,
0.08415621519088745,
-0.1808369755744934,
0.4876199960708618,
0.43103283643722534,
0.26742589473724365,
0.13469508290290833,
-0.014011852443218231,
0.06474138051271439,
-0.04474979266524315,
0.1193738728761673,
0.020248157903552055,
-0.18351374566555023,
-0.4114040732383728,
0.06638108193874359,
0.3457363545894623,
0.17289035022258759,
0.16560733318328857,
0.19289138913154602,
-0.0895974263548851,
0.380348265171051,
-0.05409841984510422,
0.05618585646152496,
0.5401592254638672,
-0.08410142362117767,
0.11899513006210327,
-0.2826409339904785,
0.009327217936515808,
0.27425438165664673,
-0.043693944811820984,
0.22888511419296265,
-0.38054370880126953,
-0.10457047075033188,
-0.4315577745437622,
0.24164800345897675,
0.1491183489561081,
0.13224264979362488,
-0.014091864228248596,
-0.012621194124221802,
-0.24956713616847992,
-0.007798856124281883,
-0.06763657927513123,
-0.28687596321105957,
0.1715916395187378,
0.07896391302347183,
-0.012740269303321838,
0.08764541894197464,
-0.08178702741861343,
-0.033012084662914276,
0.45627906918525696,
-0.11240403354167938,
0.2133568972349167,
0.6492590308189392,
-0.13624198734760284,
0.3934062719345093,
0.4130897521972656,
0.2708907127380371,
-0.17503607273101807,
-0.06525787711143494,
0.3759308159351349,
-0.2440430074930191,
-0.1693170964717865,
-0.1411893367767334,
0.18861502408981323,
0.15439239144325256,
0.1246839165687561,
0.055791791528463364,
0.26868268847465515,
-0.3353149890899658,
-0.30598780512809753,
-0.08644019067287445,
0.14475016295909882,
-0.11581675708293915,
0.1554460972547531,
-0.21665877103805542,
0.03784532845020294,
-0.4031296670436859,
0.040583543479442596,
-0.4809345304965973,
-0.5013075470924377,
0.15049795806407928,
-0.4028286933898926,
-0.005813222378492355,
-0.16448915004730225,
0.15831628441810608,
-0.19950740039348602,
0.45241621136665344,
0.06530138850212097,
0.11387227475643158,
0.17512249946594238,
-0.06334754824638367,
-0.1018892228603363,
0.1994052231311798,
0.07064604759216309,
-0.1631915420293808,
-0.14045052230358124,
0.3363388776779175,
0.21376803517341614,
0.35165274143218994,
0.15838319063186646,
-0.07934068143367767,
0.06952664256095886,
0.18972857296466827,
-0.2293645441532135,
0.4271858334541321,
0.006934422999620438,
0.42322561144828796,
0.18045787513256073,
-0.19072851538658142,
0.39941710233688354,
0.18690471351146698,
0.1318778097629547,
0.07865884155035019,
-0.397722065448761,
-0.16203626990318298,
-0.3580079972743988,
0.2873757779598236,
-0.06214466691017151,
0.370808482170105,
-0.326558381319046,
-0.2885691821575165,
-0.032139699906110764,
0.03902896121144295,
-0.2725158929824829,
0.11375147104263306,
0.2443852424621582,
0.555108904838562,
0.12641611695289612,
0.09933483600616455,
0.09970168769359589,
0.018897881731390953,
-0.17298148572444916,
-0.12150785326957703,
-0.22895954549312592,
0.1640034317970276,
-0.06243159621953964,
0.13340289890766144,
0.035482630133628845,
0.19637370109558105,
0.05672134459018707,
-0.24430176615715027,
-0.20609498023986816,
-0.26976388692855835,
0.4959576427936554,
-0.11870516091585159,
-0.10941043496131897,
-0.14915351569652557,
0.3349897861480713,
-0.039688996970653534,
0.15529458224773407,
-0.5580740571022034,
0.17348051071166992,
-0.04142386093735695,
0.16522443294525146,
-0.025842860341072083,
0.3205203413963318,
-0.4311893880367279,
-0.31390994787216187,
-0.13599702715873718,
-0.0740584135055542,
0.12484545260667801,
-0.05395132303237915,
-0.13607175648212433,
-0.1705678254365921
] |
https://github.com/huggingface/datasets/issues/4782 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648 | Thanks for reporting @conceptofmind.
Could you please give details about your environment?
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform:
- Python version:
- PyArrow version:
``` | ## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
``` | 42 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
```
Thanks for reporting @conceptofmind.
Could you please give details about your environment?
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version:
- Platform:
- Python version:
- PyArrow version:
``` | [
-0.1611001342535019,
0.047698602080345154,
-0.050540030002593994,
0.3585401773452759,
0.16585665941238403,
-0.006226278841495514,
0.2806347906589508,
0.31342485547065735,
-0.15238699316978455,
0.2098603993654251,
0.08780544996261597,
0.5031485557556152,
-0.06874771416187286,
0.047830529510974884,
0.2984030246734619,
-0.21466884016990662,
-0.08045374602079391,
0.2456899881362915,
-0.18512102961540222,
0.21946953237056732,
0.030002325773239136,
-0.10997810959815979,
-0.3023236393928528,
0.03248785063624382,
-0.20612509548664093,
0.1705627143383026,
-0.011660782620310783,
0.07469382882118225,
-0.27078598737716675,
-0.5119693279266357,
0.35633584856987,
-0.16330666840076447,
-0.04315417259931564,
0.21716368198394775,
-0.00012047931522829458,
-0.05457424372434616,
0.2791890501976013,
-0.06181998550891876,
0.016048505902290344,
0.22496169805526733,
-0.04989331588149071,
-0.4473165273666382,
0.1782439947128296,
-0.08342094719409943,
0.36918216943740845,
-0.48013249039649963,
-0.265529066324234,
-0.012535762041807175,
0.2447493076324463,
0.17124642431735992,
0.1563175618648529,
0.3384600877761841,
0.5315955281257629,
0.048692841082811356,
0.26190266013145447,
0.0008082315325737,
-0.11494305729866028,
0.7334134578704834,
0.298191100358963,
-0.24212448298931122,
-0.14237672090530396,
-0.11361260712146759,
0.06722310185432434,
0.2546883821487427,
0.0144612155854702,
-0.041674233973026276,
-0.04914595186710358,
-0.17734767496585846,
0.02716299705207348,
0.3089095950126648,
0.30900391936302185,
-0.6033368110656738,
-0.27511316537857056,
-0.07885866612195969,
-0.003684507217258215,
-0.2250295728445053,
-0.014449603855609894,
0.4395693242549896,
-0.07296417653560638,
0.1303204596042633,
-0.3408772051334381,
0.27591583132743835,
-0.42229029536247253,
0.03483392670750618,
0.002679377794265747,
-0.2539539933204651,
0.1415463238954544,
0.22854667901992798,
0.3456190526485443,
-0.09089647233486176,
0.10648030787706375,
0.15062779188156128,
0.11156429350376129,
0.18766266107559204,
-0.21544067561626434,
-0.12666219472885132,
-0.15901416540145874,
-0.3526715040206909,
0.5748202800750732,
0.19826184213161469,
0.3511635363101959,
0.14619942009449005,
0.22016514837741852,
0.1796179711818695,
0.17138659954071045,
0.1833343505859375,
-0.45008033514022827,
-0.07971634715795517,
-0.045526571571826935,
0.06369566917419434,
0.17172269523143768,
0.06921083480119705,
-0.09479013085365295,
-0.26896852254867554,
0.3636624813079834,
-0.1470956802368164,
0.26181691884994507,
-0.1251721978187561,
-0.2671765685081482,
0.1998516470193863,
-0.5554063320159912,
-0.032040778547525406,
-0.020065777003765106,
0.0539250373840332,
0.22899016737937927,
0.05686188489198685,
-0.23334872722625732,
0.23386690020561218,
-0.11754930019378662,
-0.2557840943336487,
-0.18451914191246033,
0.08635507524013519,
-0.09012672305107117,
0.0012962175533175468,
0.14713440835475922,
0.05451535806059837,
0.09595946967601776,
0.12305248528718948,
0.38048845529556274,
-0.19818128645420074,
0.15982668101787567,
-0.3213040232658386,
0.037150830030441284,
0.1407766342163086,
-0.09122796356678009,
-0.1474919468164444,
-0.042761821299791336,
0.027500607073307037,
-0.06874170899391174,
0.35945868492126465,
-0.09373442083597183,
-0.312103807926178,
-0.4073508679866791,
0.15544180572032928,
-0.14255979657173157,
0.16806210577487946,
-0.34012410044670105,
-0.06473128497600555,
0.3038299083709717,
-0.04440024495124817,
0.11122354865074158,
-0.2531290054321289,
0.1396166980266571,
-0.4418802857398987,
0.15297232568264008,
0.11777669936418533,
-0.6769008040428162,
0.26233717799186707,
0.06252053380012512,
-0.10738338530063629,
0.35370296239852905,
0.4219230115413666,
-0.37419965863227844,
0.1008191779255867,
-0.20600810647010803,
0.30673444271087646,
0.1427449882030487,
0.18843424320220947,
-0.7261329293251038,
0.16098953783512115,
-0.048920609056949615,
-0.0875048115849495,
0.07859878242015839,
-0.09098735451698303,
0.046020641922950745,
0.13626110553741455,
0.0032189711928367615,
0.1701422929763794,
-0.09066085517406464,
-0.07487303018569946,
-0.29719632863998413,
-0.4757012128829956,
0.03432946652173996,
0.010447178035974503,
0.00011568143963813782,
-0.31902754306793213,
0.21948716044425964,
-0.16361595690250397,
0.3097439110279083,
-0.1680135875940323,
0.006373777985572815,
0.33665746450424194,
0.3052575886249542,
-0.4018341302871704,
0.14494480192661285,
-0.32549992203712463,
-0.2170773148536682,
0.16128391027450562,
-0.3062423765659332,
-0.2586267590522766,
-0.17477618157863617,
-0.15051481127738953,
-0.3154483139514923,
0.34122562408447266,
0.06140049174427986,
0.09744450449943542,
0.07751806825399399,
-0.17863523960113525,
0.22939017415046692,
-0.2759167551994324,
0.020381402224302292,
0.007246491499245167,
-0.21888621151447296,
0.11692360043525696,
-0.11058641970157623,
0.6047541499137878,
-0.21984538435935974,
-0.47247931361198425,
-0.022098740562796593,
0.05650246888399124,
-0.11505668610334396,
-0.23683442175388336,
-0.16761162877082825,
0.24800598621368408,
0.10213861614465714,
0.07488064467906952,
-0.26984578371047974,
-0.19808770716190338,
0.24816575646400452,
-0.6128565073013306,
0.14632512629032135,
0.21836069226264954,
0.12066416442394257,
0.00964636355638504,
0.19960933923721313,
0.057327479124069214,
-0.11892303824424744,
-0.06411511451005936,
0.008998565375804901,
-0.044753290712833405,
0.06324052065610886,
-0.007953472435474396,
0.3929233253002167,
-0.22332657873630524,
-0.056380774825811386,
0.14537131786346436,
0.23874284327030182,
0.061316102743148804,
0.012610562145709991,
0.020339012145996094,
0.25040650367736816,
-0.0985405445098877,
0.03507598489522934,
0.11222768574953079,
-0.17071974277496338,
-0.16516491770744324,
0.2124049812555313,
-0.11491535604000092,
0.38368821144104004,
0.2122727483510971,
-0.05758759751915932,
-0.14152169227600098,
0.005653864238411188,
0.020743701606988907,
0.07504547387361526,
0.10986986011266708,
0.23395828902721405,
0.09539654850959778,
0.3304152190685272,
-0.11239489167928696,
-0.3045411705970764,
-0.31238311529159546,
0.1603328436613083,
0.21743851900100708,
-0.18254625797271729,
0.09118060767650604,
-0.37456947565078735,
-0.12356961518526077,
-0.1911369413137436,
-0.11311633139848709,
0.03369361534714699,
-0.026055634021759033,
-0.042504698038101196,
0.0711139440536499,
-0.223012775182724,
-0.0046749720349907875,
-0.08072972297668457,
-0.15067221224308014,
0.28816738724708557,
-0.006362689658999443,
0.24582549929618835,
0.0860520750284195,
-0.1504414975643158,
0.03382010757923126,
0.3117058277130127,
-0.18504877388477325,
0.26960229873657227,
0.23696459829807281,
-0.07892786711454391,
-0.19825415313243866,
-0.40841415524482727,
0.04154795780777931,
0.022678058594465256,
0.1842292845249176,
0.060332708060741425,
0.08665889501571655,
-0.12318607419729233,
-0.28386202454566956,
0.0811903327703476,
-0.04980861395597458,
-0.34658777713775635,
0.24357730150222778,
0.10278699547052383,
0.2880852222442627,
-0.20256052911281586,
-0.1041550561785698,
-0.1213483139872551,
-0.2554737329483032,
0.3014106750488281,
0.0827874094247818,
0.2911228537559509,
0.09042562544345856,
0.43751826882362366,
0.27866384387016296,
0.1070418432354927,
-0.13759246468544006,
-0.05146501958370209,
0.2875218391418457,
0.18352052569389343,
0.06874919682741165,
-0.4483600854873657,
-0.2979379892349243,
-0.26093733310699463,
0.1503848135471344,
0.2855339050292969,
-0.35166025161743164,
-0.35075995326042175,
-0.22390446066856384,
0.037989292293787,
-0.26031896471977234,
-0.08092515915632248,
0.17525315284729004,
-0.03219855949282646,
-0.07886044681072235,
0.11010131984949112,
-0.30877673625946045,
0.016652874648571014,
0.3449951708316803,
0.09349878132343292,
-0.11919277161359787,
0.370379775762558,
0.11793248355388641,
0.6576650738716125,
0.3985961675643921,
-0.12920421361923218,
0.3649003803730011,
-0.12732402980327606,
0.08018706738948822,
-0.044159673154354095,
-0.0376671627163887,
0.11012851446866989,
-0.13209128379821777,
-0.0470992848277092,
-0.00883067399263382,
-0.2507832944393158,
-0.2965579330921173,
0.297749787569046,
-0.10679508745670319,
-0.012459054589271545,
-0.05226929858326912,
0.23468446731567383,
0.03140884265303612,
0.007992386817932129,
-0.11058159172534943,
-0.13881181180477142,
0.005528980866074562,
-0.08677122741937637,
-0.21716825664043427,
-0.4191494584083557,
-0.09286662191152573,
0.019241319969296455,
-0.0637940838932991,
-0.23613999783992767,
0.02390454337000847,
0.2854190170764923,
0.26528170704841614,
0.3362092971801758,
0.14628615975379944,
-0.22885870933532715,
0.15354309976100922,
-0.10808584094047546,
0.34346893429756165,
-0.004746096208691597,
-0.1001172810792923,
0.014813903719186783,
0.23499611020088196,
-0.49667009711265564,
-0.23731710016727448,
-0.10490623116493225,
0.2597326636314392,
0.04370737075805664,
-0.09433311223983765,
-0.3144007921218872,
0.11533426493406296,
0.35949429869651794,
0.5425181984901428,
0.08111409842967987,
0.063979871571064,
-0.23891681432724,
-0.3307245671749115,
-0.36750656366348267,
0.1923106461763382,
0.0659467875957489,
0.3799940049648285,
0.11913412064313889,
-0.3472721576690674,
-0.0480978786945343,
-0.44917964935302734,
-0.13296079635620117,
0.19769074022769928,
0.3084886968135834,
-0.33281341195106506,
0.2197381854057312,
-0.3921489417552948,
-0.2609279453754425,
0.671129584312439,
0.4538242816925049,
0.31607359647750854,
-0.041214704513549805,
0.04709365963935852,
-0.00868911948055029,
0.4043774902820587,
0.17966397106647491,
-0.15608112514019012,
0.13475489616394043,
-0.16590939462184906,
0.25200045108795166,
-0.019774742424488068,
-0.06072892248630524,
0.08878190815448761,
-0.26223140954971313,
-0.09392078965902328,
0.11419524252414703,
0.3873864710330963,
0.08827193081378937,
0.2967955470085144,
0.4041305482387543,
0.2585812211036682,
0.09056379646062851,
0.31869077682495117,
0.2067122459411621,
1.0121984481811523,
-0.3126027584075928,
-0.06483300030231476,
0.04029500484466553,
-0.3716919422149658,
0.1260761320590973,
0.06963997334241867,
0.17528598010540009,
-0.30307120084762573,
-0.028420884162187576,
0.048409536480903625,
-0.4624902009963989,
0.13130253553390503,
0.06786645948886871,
-0.14206108450889587,
0.04374781996011734,
-0.07525356858968735,
0.4062110185623169,
0.13286232948303223,
0.16842004656791687,
-0.2902907729148865,
0.03962470218539238,
-0.06705324351787567,
0.022815819829702377,
-0.22586886584758759,
-0.26133477687835693,
-0.09373514354228973,
-0.3481453061103821,
-0.0705195963382721,
-0.11630439013242722,
-0.32723987102508545,
0.20644181966781616,
-0.3344394564628601,
0.2844820022583008,
0.19086255133152008,
-0.627183198928833,
0.12484164535999298,
-0.06259900331497192,
-0.3767644762992859,
0.08215239644050598,
-0.1569712907075882,
-0.2828800678253174,
-0.1123194769024849,
-0.11746754497289658,
-0.015373683534562588,
-0.04648933932185173,
0.01977863907814026,
0.0042694248259067535,
-0.1584210991859436,
0.053849391639232635,
0.08502115309238434,
-0.24156633019447327,
0.31286701560020447,
0.46609920263290405,
0.16857971251010895,
-0.2863349914550781,
-0.04785659536719322,
-0.33742964267730713,
-0.3903566598892212,
-0.27437615394592285,
0.05436469614505768,
0.10384280979633331,
-0.21983671188354492,
0.2587786316871643,
0.143807053565979,
-0.1381591111421585,
-0.1934877336025238,
0.2241797149181366,
0.39141231775283813,
0.1939348727464676,
0.2976430058479309,
-0.11519472301006317,
0.00005334243178367615,
-0.1497434824705124,
-0.18637870252132416,
0.12922416627407074,
-0.7438056468963623,
0.1258229911327362,
-0.3829326629638672,
0.13279081881046295,
-0.00288208550773561,
-0.20582088828086853,
0.2308318316936493,
0.37653282284736633,
-0.25927457213401794,
-0.3032250702381134,
-0.4927689731121063,
0.26636409759521484,
-0.15616847574710846,
0.26022955775260925,
-0.05374925211071968,
0.19200114905834198,
-0.05669042468070984,
0.31497955322265625,
-0.20830897986888885,
0.2534714639186859,
-0.1461363285779953,
0.07767781615257263,
-0.21796393394470215,
-0.2559814751148224,
-0.08027562499046326,
-0.05102737247943878,
0.04597023129463196,
0.4697142243385315,
-0.0437801219522953,
-0.17430108785629272,
0.17645560204982758,
0.08489343523979187,
-0.05426934361457825,
-0.20736797153949738,
-0.003610508982092142,
0.012395359575748444,
-0.040583159774541855,
-0.05039067193865776,
0.22535501420497894,
-0.2842101454734802,
-0.04424910247325897,
-0.17945179343223572,
0.42496299743652344,
-0.21118786931037903,
-0.31621724367141724,
0.006495669484138489,
-0.20569279789924622,
0.4448774456977844,
0.18520736694335938,
0.2493932545185089,
0.1701449453830719,
0.011277593672275543,
-0.16687831282615662,
-0.03710172325372696,
0.06283925473690033,
-0.31059202551841736,
0.05851836875081062,
-0.2851291298866272,
-0.32413721084594727,
-0.12160421162843704,
0.43393057584762573,
0.4801054894924164,
-0.275010883808136,
-0.006846478208899498,
0.06375373154878616,
0.10353530943393707,
-0.2069120556116104,
-0.19251979887485504,
0.26443371176719666,
0.08564376831054688,
-0.0779939666390419,
0.35927364230155945,
0.4498163163661957,
-0.2278585135936737,
-0.013922169804573059,
0.19797265529632568,
0.10855905711650848,
0.4254905581474304,
-0.1626480370759964,
0.6909154653549194,
-0.011526551097631454,
-0.16494043171405792,
0.2923547923564911,
0.07303082942962646,
0.7053662538528442,
0.12198889255523682,
-0.26702895760536194,
0.42292606830596924,
0.0632236897945404,
-0.05174378678202629,
0.21272310614585876,
-0.2211173176765442,
-0.2540237307548523,
0.24051900207996368,
0.34867578744888306,
0.02572256699204445,
0.10064065456390381,
0.48229676485061646,
0.30881404876708984,
0.002837488893419504,
-0.11827071756124496,
-0.10089096426963806,
-0.22354388236999512,
0.24258655309677124,
0.30557581782341003,
0.04656936973333359,
-0.08424621820449829,
-0.08036410808563232,
0.05467377230525017,
-0.36775732040405273,
0.5763329267501831,
-0.07780821621417999,
-0.21052782237529755,
-0.16941724717617035,
0.3936115503311157,
0.4866582155227661,
-0.03316301852464676,
-0.26440858840942383,
0.25630444288253784,
0.37587928771972656,
-0.2171522080898285,
-0.3168383836746216,
0.42582619190216064,
0.6403588056564331,
0.1116042509675026,
-0.13528282940387726,
0.03063199669122696,
0.15181559324264526,
-0.028339972719550133,
-0.1260673999786377,
0.11047926545143127,
0.07146840542554855,
0.12478646636009216,
0.30507493019104004,
0.07629019767045975,
-0.0520072840154171,
-0.333149254322052,
0.3891414701938629,
-0.0008979663252830505,
-0.3112688660621643,
0.1177583858370781,
-0.15502390265464783,
-0.372058629989624,
-0.009044170379638672,
-0.20609116554260254,
-0.22702950239181519,
0.013780155219137669,
0.5050788521766663,
0.01612854190170765,
0.016363244503736496,
0.11399661004543304,
0.02390829473733902,
-0.26512610912323,
0.49882882833480835,
0.34741711616516113,
0.2041204869747162,
-0.17158809304237366,
-0.07114893198013306,
-0.4232446849346161,
0.4626238942146301,
-0.6139341592788696,
-0.07979027926921844,
0.3261285126209259,
0.4899709224700928,
-0.030566170811653137,
0.15476971864700317,
0.26949089765548706,
0.2837907671928406,
0.059115439653396606,
0.36905384063720703,
-0.4519526958465576,
-0.18667657673358917,
0.124102383852005,
-0.31353759765625,
0.03436688333749771,
-0.41382554173469543,
0.4480353891849518,
-0.29446426033973694,
-0.0009565651416778564,
-0.05753287672996521,
-0.06303323805332184,
0.14979714155197144,
0.20919939875602722,
0.6059349179267883,
-0.06570128351449966,
0.3306007385253906,
0.2229834794998169,
0.15946631133556366,
-0.09591241180896759,
-0.044569578021764755,
-0.009157889522612095,
0.42605751752853394,
0.07955566048622131,
0.1267874538898468,
-0.09206531941890717,
0.05292744189500809,
-0.08801683038473129,
0.3675268590450287,
-0.1104070246219635,
0.002833584090694785,
0.14371106028556824,
-0.1025865375995636,
-0.17633432149887085,
0.009012861177325249,
-0.0007570711895823479,
-0.030392341315746307,
0.026643972843885422,
-0.01842770352959633,
-0.19036118686199188,
-0.6495462656021118,
0.35112231969833374,
0.027505163103342056,
-0.26822981238365173,
0.11383799463510513,
0.22591310739517212,
0.08156723529100418,
-0.19365809857845306,
-0.5490385293960571,
0.12625190615653992,
0.351265013217926,
-0.028899356722831726,
-0.22037078440189362,
0.16897627711296082,
-0.1781456023454666,
0.09036885201931,
-0.09379161894321442,
0.37759271264076233,
-0.04798855632543564,
-0.21409714221954346,
0.02665797993540764,
-0.2770220637321472
] |
https://github.com/huggingface/datasets/issues/4782 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648 | Hi @albertvillanova ,
Here is the environment information:
```
- `datasets` version: 2.3.2
- Platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.27
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
```
Thanks,
Enrico | ## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
``` | 31 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
```
Hi @albertvillanova ,
Here is the environment information:
```
- `datasets` version: 2.3.2
- Platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.27
- Python version: 3.9.12
- PyArrow version: 7.0.0
- Pandas version: 1.4.2
```
Thanks,
Enrico | [
-0.12226594984531403,
0.07334493100643158,
-0.04566896706819534,
0.3679642081260681,
0.1909770667552948,
-0.02895296737551689,
0.3065476715564728,
0.29477015137672424,
-0.17574293911457062,
0.18962258100509644,
0.07779772579669952,
0.49761074781417847,
-0.055663131177425385,
0.026189396157860756,
0.28158554434776306,
-0.21753057837486267,
-0.08287692815065384,
0.234299898147583,
-0.1916956603527069,
0.20718969404697418,
0.03297669440507889,
-0.08685978502035141,
-0.33077532052993774,
0.031044699251651764,
-0.2390819638967514,
0.18847589194774628,
0.022525494918227196,
0.09384842216968536,
-0.26488691568374634,
-0.5007418990135193,
0.38624560832977295,
-0.1643679141998291,
-0.056925881654024124,
0.20367573201656342,
-0.00012196604075143114,
-0.04511554539203644,
0.28317153453826904,
-0.06986221671104431,
0.020717013627290726,
0.21822747588157654,
-0.05390530452132225,
-0.4288298189640045,
0.17888812720775604,
-0.06304822862148285,
0.38027188181877136,
-0.4832773506641388,
-0.25536584854125977,
0.009299173951148987,
0.22655662894248962,
0.17170146107673645,
0.14015379548072815,
0.3520040214061737,
0.5385324954986572,
0.05065900459885597,
0.26332348585128784,
0.02192649245262146,
-0.1406252384185791,
0.7379629015922546,
0.27752989530563354,
-0.23747479915618896,
-0.1403663158416748,
-0.09710729122161865,
0.08580179512500763,
0.2722074091434479,
-0.0016261301934719086,
-0.04944964870810509,
-0.07782640308141708,
-0.15500296652317047,
0.030988868325948715,
0.3023562431335449,
0.29626232385635376,
-0.6058390140533447,
-0.28215575218200684,
-0.0934094786643982,
-0.01665852963924408,
-0.21097934246063232,
0.00910545140504837,
0.42805927991867065,
-0.04932204261422157,
0.1294456124305725,
-0.35041165351867676,
0.3113507926464081,
-0.42131125926971436,
0.03540335223078728,
0.011453546583652496,
-0.2726258933544159,
0.1418927013874054,
0.2492527961730957,
0.3207807242870331,
-0.0801975429058075,
0.09084254503250122,
0.11961767822504044,
0.12545952200889587,
0.1825581043958664,
-0.2047165483236313,
-0.11446315050125122,
-0.14230689406394958,
-0.36285868287086487,
0.5711625814437866,
0.19674251973628998,
0.33425676822662354,
0.14570707082748413,
0.2133883684873581,
0.14847135543823242,
0.16924788057804108,
0.1741245687007904,
-0.4536573886871338,
-0.08264736086130142,
-0.059823960065841675,
0.07673858851194382,
0.15109333395957947,
0.07945970445871353,
-0.0918695256114006,
-0.2464301884174347,
0.3636234998703003,
-0.11414306610822678,
0.30600619316101074,
-0.1184116080403328,
-0.295587420463562,
0.23990602791309357,
-0.5519466996192932,
-0.018780991435050964,
-0.005738257430493832,
0.026974905282258987,
0.23136009275913239,
0.0617244690656662,
-0.25466951727867126,
0.23551756143569946,
-0.13001684844493866,
-0.23354241251945496,
-0.18023742735385895,
0.09894967079162598,
-0.07422921061515808,
-0.007907206192612648,
0.15759634971618652,
0.0663309395313263,
0.1112254187464714,
0.10711948573589325,
0.40228980779647827,
-0.22938485443592072,
0.14821757376194,
-0.3689190149307251,
0.0429081954061985,
0.1378670036792755,
-0.08509998023509979,
-0.10734403878450394,
-0.03475743904709816,
0.016424275934696198,
-0.061677172780036926,
0.3497655391693115,
-0.08541654795408249,
-0.3237261176109314,
-0.3835733234882355,
0.13912393152713776,
-0.15091046690940857,
0.19571655988693237,
-0.3521227240562439,
-0.06693492829799652,
0.3145686089992523,
-0.04867143556475639,
0.1130221039056778,
-0.2574785351753235,
0.10428333282470703,
-0.4256858229637146,
0.13146251440048218,
0.12401524186134338,
-0.654323160648346,
0.2734644114971161,
0.07887834310531616,
-0.10344153642654419,
0.3704227805137634,
0.42931103706359863,
-0.3550867736339569,
0.09461356699466705,
-0.20915915071964264,
0.30311089754104614,
0.12597519159317017,
0.1924760341644287,
-0.7306386828422546,
0.1526084989309311,
-0.03288013115525246,
-0.051286324858665466,
0.0748540610074997,
-0.09540951251983643,
0.05539623275399208,
0.1246357187628746,
0.023128587752580643,
0.17600607872009277,
-0.09928885102272034,
-0.08544602245092392,
-0.2963433563709259,
-0.4616110026836395,
0.02998613566160202,
-0.010116014629602432,
0.007062628865242004,
-0.3281902074813843,
0.234291672706604,
-0.14851436018943787,
0.2931782603263855,
-0.14824779331684113,
0.01927536353468895,
0.3291114568710327,
0.2956443428993225,
-0.4065793752670288,
0.15261323750019073,
-0.310429185628891,
-0.22416391968727112,
0.1740916669368744,
-0.29117852449417114,
-0.25750210881233215,
-0.17411084473133087,
-0.15034815669059753,
-0.3219209611415863,
0.3382260501384735,
0.073486328125,
0.10237398743629456,
0.06317993253469467,
-0.15283726155757904,
0.23601940274238586,
-0.2498915195465088,
0.03953716531395912,
0.018458126112818718,
-0.23544274270534515,
0.10193760693073273,
-0.12752145528793335,
0.5944613814353943,
-0.20108333230018616,
-0.46139878034591675,
-0.055600643157958984,
0.06997556239366531,
-0.11612726002931595,
-0.24714374542236328,
-0.17706725001335144,
0.2508091330528259,
0.1360224187374115,
0.07778538763523102,
-0.28509992361068726,
-0.24383153021335602,
0.22413000464439392,
-0.6004616022109985,
0.1021827906370163,
0.21274980902671814,
0.14401714503765106,
0.011379152536392212,
0.20515650510787964,
0.0714540183544159,
-0.12627705931663513,
-0.07399071007966995,
0.0032669976353645325,
-0.05313806235790253,
0.06877996772527695,
0.017374861985445023,
0.38079574704170227,
-0.24014972150325775,
-0.07292711734771729,
0.16372928023338318,
0.23554764688014984,
0.07376536726951599,
0.013514794409275055,
0.022266261279582977,
0.26722750067710876,
-0.09739048779010773,
0.009090453386306763,
0.11009299010038376,
-0.1490819752216339,
-0.16083696484565735,
0.21146100759506226,
-0.0884006917476654,
0.40310364961624146,
0.18587280809879303,
-0.03218652680516243,
-0.13876459002494812,
0.007895134389400482,
0.021890483796596527,
0.0680028647184372,
0.12528276443481445,
0.23632819950580597,
0.11291718482971191,
0.3334719240665436,
-0.10580652207136154,
-0.2969190776348114,
-0.30603763461112976,
0.18435883522033691,
0.21809004247188568,
-0.18663884699344635,
0.08896458148956299,
-0.36582058668136597,
-0.10474927723407745,
-0.19132675230503082,
-0.1087954193353653,
0.0473448745906353,
-0.01102867629379034,
-0.03584092855453491,
0.06144868955016136,
-0.23640631139278412,
0.005251121707260609,
-0.08341377973556519,
-0.16905198991298676,
0.3024789094924927,
-0.016924461349844933,
0.26390162110328674,
0.1135544627904892,
-0.1627013087272644,
0.019819974899291992,
0.3098328113555908,
-0.2094518542289734,
0.24593189358711243,
0.21970632672309875,
-0.09745698422193527,
-0.17707397043704987,
-0.4046730101108551,
0.04491780698299408,
0.01463361270725727,
0.1834394633769989,
0.0762256532907486,
0.027173928916454315,
-0.11750565469264984,
-0.2710772454738617,
0.09205658733844757,
-0.04840097576379776,
-0.35076189041137695,
0.2366746962070465,
0.09688390791416168,
0.2955150306224823,
-0.21645987033843994,
-0.09100054949522018,
-0.11434286087751389,
-0.25488704442977905,
0.3149392008781433,
0.07171621918678284,
0.2885165810585022,
0.10319611430168152,
0.4286489486694336,
0.2708684206008911,
0.11851484328508377,
-0.14301447570323944,
-0.07373030483722687,
0.3067263662815094,
0.19229760766029358,
0.08557326346635818,
-0.45826783776283264,
-0.2889055013656616,
-0.26175445318222046,
0.14756068587303162,
0.30299538373947144,
-0.34890347719192505,
-0.38472434878349304,
-0.23396949470043182,
0.019475989043712616,
-0.2583308517932892,
-0.09302660077810287,
0.16580632328987122,
-0.06356073915958405,
-0.0620669424533844,
0.08473611623048782,
-0.32377004623413086,
0.016015462577342987,
0.3635498881340027,
0.05836281552910805,
-0.12311501055955887,
0.3674187660217285,
0.1504460722208023,
0.6369324922561646,
0.4156033992767334,
-0.11345341801643372,
0.3623264729976654,
-0.10041557997465134,
0.09650734066963196,
-0.03632684051990509,
-0.028133172541856766,
0.10609443485736847,
-0.12278732657432556,
-0.048225246369838715,
-0.0063551366329193115,
-0.2509865462779999,
-0.2860209345817566,
0.31261423230171204,
-0.10068796575069427,
-0.0164549108594656,
-0.04301951453089714,
0.23816606402397156,
0.015363441780209541,
0.000978223979473114,
-0.07960115373134613,
-0.11379998922348022,
0.02417369931936264,
-0.07988818734884262,
-0.24714848399162292,
-0.4118204116821289,
-0.06878910213708878,
0.043323591351509094,
-0.03977494686841965,
-0.2033267319202423,
-0.002670295536518097,
0.27333036065101624,
0.28193798661231995,
0.3705422282218933,
0.15780456364154816,
-0.22312474250793457,
0.1789749562740326,
-0.08106275647878647,
0.3269847631454468,
-0.005392512306571007,
-0.0824449211359024,
0.008705563843250275,
0.2145780324935913,
-0.5144398808479309,
-0.24977605044841766,
-0.10355627536773682,
0.26582926511764526,
0.040425002574920654,
-0.09314298629760742,
-0.31691068410873413,
0.10449887812137604,
0.3613598644733429,
0.516857385635376,
0.09928469359874725,
0.06868291646242142,
-0.22235524654388428,
-0.3559599816799164,
-0.35935530066490173,
0.21209517121315002,
0.07639595866203308,
0.39340177178382874,
0.10327140241861343,
-0.33871990442276,
-0.06040003150701523,
-0.4273849427700043,
-0.13247188925743103,
0.19476792216300964,
0.28751030564308167,
-0.3368729054927826,
0.2213767170906067,
-0.40281519293785095,
-0.27028509974479675,
0.6626312732696533,
0.4596679210662842,
0.3053724467754364,
-0.029695339500904083,
0.05516035109758377,
0.005683427676558495,
0.3629918098449707,
0.1949286311864853,
-0.1761164367198944,
0.1250470131635666,
-0.1775413155555725,
0.23544955253601074,
-0.021724645048379898,
-0.04051655903458595,
0.08983572572469711,
-0.27394625544548035,
-0.1036968007683754,
0.10000930726528168,
0.37824365496635437,
0.06965306401252747,
0.2909663915634155,
0.3993220329284668,
0.2769717574119568,
0.07354949414730072,
0.3118489384651184,
0.16976255178451538,
0.9721953272819519,
-0.3072505593299866,
-0.05040319636464119,
0.057509951293468475,
-0.3721470832824707,
0.13507327437400818,
0.08155412971973419,
0.1788754016160965,
-0.28389543294906616,
-0.03397238999605179,
0.03618901968002319,
-0.44937777519226074,
0.1114446371793747,
0.04213093966245651,
-0.11500625312328339,
0.04005130007863045,
-0.014141291379928589,
0.40830370783805847,
0.12968865036964417,
0.11873497068881989,
-0.31607693433761597,
0.04049123078584671,
-0.08602012693881989,
0.005810998380184174,
-0.2062666267156601,
-0.25656694173812866,
-0.079936683177948,
-0.3445627689361572,
-0.08931021392345428,
-0.15060357749462128,
-0.3147379755973816,
0.17099007964134216,
-0.3486443758010864,
0.2832813858985901,
0.22757528722286224,
-0.6471928954124451,
0.12470848858356476,
-0.0822887271642685,
-0.40199947357177734,
0.057945720851421356,
-0.14819984138011932,
-0.27922549843788147,
-0.12366367131471634,
-0.06676682829856873,
-0.008771056309342384,
-0.06779853999614716,
0.015965387225151062,
0.03744716942310333,
-0.10378187149763107,
0.034200821071863174,
0.060257360339164734,
-0.24052225053310394,
0.31087666749954224,
0.4886777997016907,
0.1522415578365326,
-0.27632954716682434,
-0.0702759325504303,
-0.3718428313732147,
-0.3977252244949341,
-0.28229114413261414,
0.04136543720960617,
0.09950049221515656,
-0.22038741409778595,
0.26709434390068054,
0.10149874538183212,
-0.15012788772583008,
-0.1855575293302536,
0.23598653078079224,
0.3866271674633026,
0.2218928039073944,
0.2864087224006653,
-0.13302519917488098,
0.009104110300540924,
-0.12155796587467194,
-0.18290945887565613,
0.14973613619804382,
-0.7880908846855164,
0.1271355301141739,
-0.40633657574653625,
0.148955300450325,
-0.012901416048407555,
-0.222468763589859,
0.22231414914131165,
0.37383875250816345,
-0.25697818398475647,
-0.32520830631256104,
-0.48736411333084106,
0.2578507661819458,
-0.1661367416381836,
0.25642624497413635,
-0.0523466132581234,
0.19182291626930237,
-0.06629399210214615,
0.29616454243659973,
-0.18546022474765778,
0.2604916989803314,
-0.13465699553489685,
0.07594512403011322,
-0.20383703708648682,
-0.24479511380195618,
-0.08209210634231567,
-0.05174095556139946,
0.02159102074801922,
0.4960591793060303,
-0.053281500935554504,
-0.15027132630348206,
0.1549997329711914,
0.09302163124084473,
-0.04970909655094147,
-0.2300596833229065,
-0.021934453397989273,
0.02907601371407509,
-0.04276539757847786,
-0.06325992196798325,
0.23129227757453918,
-0.2657882273197174,
-0.06786344945430756,
-0.18059679865837097,
0.4085569977760315,
-0.18399012088775635,
-0.30651551485061646,
0.017970748245716095,
-0.21944579482078552,
0.4545520544052124,
0.19971272349357605,
0.26175999641418457,
0.18344688415527344,
0.030880868434906006,
-0.16243597865104675,
-0.06026781350374222,
0.046536874026060104,
-0.315781831741333,
0.05939183011651039,
-0.29410308599472046,
-0.31256726384162903,
-0.1262238770723343,
0.4554523825645447,
0.47226348519325256,
-0.28594937920570374,
-0.042277947068214417,
0.0368083193898201,
0.0816987007856369,
-0.17443975806236267,
-0.20727761089801788,
0.2602887749671936,
0.11170900613069534,
-0.0792047381401062,
0.37091532349586487,
0.4529072940349579,
-0.23851537704467773,
-0.022513896226882935,
0.21321895718574524,
0.08491797745227814,
0.4475710391998291,
-0.16853977739810944,
0.6798911690711975,
-0.019100092351436615,
-0.1349254697561264,
0.2561079263687134,
0.04004942625761032,
0.6909589767456055,
0.17053823173046112,
-0.25009194016456604,
0.4548201560974121,
0.04705389589071274,
-0.04382135346531868,
0.1907052993774414,
-0.2511462867259979,
-0.25398629903793335,
0.23565784096717834,
0.33322638273239136,
0.055740971118211746,
0.12093579024076462,
0.4365770220756531,
0.2889247536659241,
0.0324174202978611,
-0.1300908327102661,
-0.13453063368797302,
-0.23042955994606018,
0.2018957883119583,
0.3283318877220154,
0.04813089221715927,
-0.07400264590978622,
-0.07114972174167633,
0.044348035007715225,
-0.3402820825576782,
0.5957221984863281,
-0.09663540124893188,
-0.22312210500240326,
-0.1723954677581787,
0.3789634108543396,
0.4793606698513031,
-0.03575814515352249,
-0.2562794089317322,
0.28205010294914246,
0.3928975462913513,
-0.2142154574394226,
-0.32028883695602417,
0.4017498195171356,
0.6363589763641357,
0.1244242936372757,
-0.1071559488773346,
0.008911856450140476,
0.16250932216644287,
-0.019701287150382996,
-0.15095089375972748,
0.1636212170124054,
0.04830651730298996,
0.13387911021709442,
0.2987268567085266,
0.06043683737516403,
-0.037300724536180496,
-0.3335803151130676,
0.4002246558666229,
-0.028714802116155624,
-0.3235810697078705,
0.14269690215587616,
-0.18556971848011017,
-0.35753333568573,
0.009298639371991158,
-0.17704826593399048,
-0.19136452674865723,
-0.009766577742993832,
0.4934287369251251,
0.039160583168268204,
0.04957640916109085,
0.10858681052923203,
0.013266704976558685,
-0.2853786051273346,
0.48965370655059814,
0.3569123446941376,
0.18780040740966797,
-0.1754862666130066,
-0.05683886259794235,
-0.4098067283630371,
0.4830801486968994,
-0.6144104599952698,
-0.06856002658605576,
0.3424171805381775,
0.4803282916545868,
-0.045051656663417816,
0.12499859184026718,
0.279850572347641,
0.298583447933197,
0.08649839460849762,
0.38954609632492065,
-0.4374887943267822,
-0.21058590710163116,
0.1309816539287567,
-0.35409629344940186,
0.031269025057554245,
-0.4269108772277832,
0.44402602314949036,
-0.28370824456214905,
-0.017319735139608383,
-0.07234393805265427,
-0.060576219111680984,
0.15102048218250275,
0.21683093905448914,
0.594997763633728,
-0.03848320245742798,
0.3384089469909668,
0.21983811259269714,
0.1641809344291687,
-0.11608617007732391,
-0.02826737053692341,
0.01453512255102396,
0.43504470586776733,
0.04112295061349869,
0.14832188189029694,
-0.077208012342453,
0.047572698444128036,
-0.05671049281954765,
0.37287643551826477,
-0.12100516259670258,
-0.005744660273194313,
0.1632433831691742,
-0.0762401595711708,
-0.23896822333335876,
0.029316948726773262,
0.007637348957359791,
-0.025789864361286163,
0.032844074070453644,
-0.01635073684155941,
-0.1765509843826294,
-0.6729843616485596,
0.3517117500305176,
0.010016814805567265,
-0.2835613489151001,
0.09924713522195816,
0.21160706877708435,
0.10504455119371414,
-0.20976728200912476,
-0.5537965297698975,
0.12220344692468643,
0.35107988119125366,
-0.03925931453704834,
-0.22193948924541473,
0.15744265913963318,
-0.1809106469154358,
0.0850343257188797,
-0.10086055099964142,
0.3872744143009186,
-0.06454245746135712,
-0.2328277975320816,
0.06579148769378662,
-0.2859158515930176
] |
https://github.com/huggingface/datasets/issues/4782 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648 | I think this issue is solved here https://discuss.huggingface.co/t/minhash-deduplication/19992/12?u=loubnabnl, this only happens for very large datasets we will update it in CodeParrot code | ## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
``` | 22 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
```
I think this issue is solved here https://discuss.huggingface.co/t/minhash-deduplication/19992/12?u=loubnabnl, this only happens for very large datasets we will update it in CodeParrot code | [
-0.06517191976308823,
0.03707914054393768,
-0.054094262421131134,
0.3319741487503052,
0.15671859681606293,
-0.037929169833660126,
0.2668175995349884,
0.29228436946868896,
-0.18059410154819489,
0.21585214138031006,
0.07281449437141418,
0.5009046792984009,
0.0007561733946204185,
-0.016357794404029846,
0.24995118379592896,
-0.20046347379684448,
-0.05055094510316849,
0.20253172516822815,
-0.15432751178741455,
0.20003999769687653,
0.06944222003221512,
-0.07967410981655121,
-0.33289843797683716,
-0.028338976204395294,
-0.14273275434970856,
0.21576720476150513,
0.005940137431025505,
0.09070120006799698,
-0.27326712012290955,
-0.48204997181892395,
0.3317872881889343,
-0.12187539041042328,
-0.06274749338626862,
0.155863955616951,
-0.00012221232464071363,
-0.0633794367313385,
0.26373055577278137,
-0.07263969630002975,
-0.01764839142560959,
0.29597043991088867,
0.008346766233444214,
-0.41687166690826416,
0.22227972745895386,
-0.017674028873443604,
0.41369715332984924,
-0.4440101087093353,
-0.24734444916248322,
0.04028799384832382,
0.2623027563095093,
0.14960862696170807,
0.14678096771240234,
0.30619847774505615,
0.5187432765960693,
0.07204596698284149,
0.28137922286987305,
0.052286624908447266,
-0.1315782368183136,
0.7525141835212708,
0.3636254370212555,
-0.20991995930671692,
-0.1705072820186615,
-0.06936833262443542,
0.06419240683317184,
0.23622219264507294,
-0.02128469944000244,
-0.08520053327083588,
0.024191666394472122,
-0.19504894316196442,
0.05284404382109642,
0.3371414840221405,
0.2439044713973999,
-0.6135088205337524,
-0.31662827730178833,
-0.07804746180772781,
0.07107049226760864,
-0.160843625664711,
-0.06066090613603592,
0.3791735768318176,
-0.06533025205135345,
0.11586962640285492,
-0.2503540515899658,
0.27837255597114563,
-0.4012659192085266,
-0.025794781744480133,
-0.006453339010477066,
-0.3716438114643097,
0.14798226952552795,
0.23862746357917786,
0.32148265838623047,
-0.09281247854232788,
0.07666344940662384,
0.12300189584493637,
0.09855078905820847,
0.2203385829925537,
-0.1631719321012497,
-0.142794668674469,
-0.14874479174613953,
-0.360717236995697,
0.5601519346237183,
0.24360014498233795,
0.3685811161994934,
0.18372505903244019,
0.24658435583114624,
0.17281098663806915,
0.15508514642715454,
0.17121119797229767,
-0.47791963815689087,
-0.17974421381950378,
-0.009353525936603546,
0.0439615435898304,
0.1831723004579544,
0.10598157346248627,
-0.08435436338186264,
-0.26338160037994385,
0.3326592445373535,
-0.13535788655281067,
0.19763460755348206,
-0.1591002196073532,
-0.2985765337944031,
0.18560053408145905,
-0.6206761002540588,
-0.026930946856737137,
-0.042529504746198654,
0.0005444660782814026,
0.2639490067958832,
0.09803309291601181,
-0.246713787317276,
0.2091369926929474,
-0.1685880571603775,
-0.24158626794815063,
-0.17253220081329346,
0.08032773435115814,
-0.013683848083019257,
-0.01759965531527996,
0.1586681455373764,
0.057525210082530975,
0.07571233808994293,
0.14602112770080566,
0.38701122999191284,
-0.23159824311733246,
0.11804959177970886,
-0.3022244870662689,
0.06664891541004181,
0.16897764801979065,
-0.09215304255485535,
-0.1915891021490097,
-0.03619074448943138,
0.04127483814954758,
-0.055473655462265015,
0.3724657893180847,
-0.06262656301259995,
-0.28596311807632446,
-0.3659851551055908,
0.13768526911735535,
-0.12152010947465897,
0.17055945098400116,
-0.36313921213150024,
-0.016119513660669327,
0.26876285672187805,
-0.04073094204068184,
0.10285835713148117,
-0.2689182162284851,
0.207607239484787,
-0.44404470920562744,
0.16270801424980164,
0.10915818810462952,
-0.6335702538490295,
0.2646547555923462,
0.06756361573934555,
-0.129170224070549,
0.39374756813049316,
0.3943476676940918,
-0.35632604360580444,
0.07057425379753113,
-0.1989433914422989,
0.2938184142112732,
0.13874126970767975,
0.204305499792099,
-0.6865939497947693,
0.15746577084064484,
-0.022503003478050232,
-0.0008548181504011154,
0.07084628194570541,
-0.09245838224887848,
0.019585855305194855,
0.10474508255720139,
-0.044264696538448334,
0.1649538278579712,
-0.09083457291126251,
-0.0946711078286171,
-0.2901707887649536,
-0.477349191904068,
0.049077313393354416,
-0.007345268502831459,
-0.009721077978610992,
-0.3129105567932129,
0.2236575484275818,
-0.16713902354240417,
0.3029370903968811,
-0.11249223351478577,
-0.03593031316995621,
0.2994379997253418,
0.32411229610443115,
-0.4345976710319519,
0.185183584690094,
-0.20818397402763367,
-0.1656113564968109,
0.1847628355026245,
-0.325818806886673,
-0.2262493073940277,
-0.18269924819469452,
-0.16497766971588135,
-0.22025588154792786,
0.333219438791275,
0.04844718426465988,
0.058406632393598557,
0.06581051647663116,
-0.21094653010368347,
0.2850261926651001,
-0.2024432271718979,
0.06212015077471733,
-0.0712735578417778,
-0.24048741161823273,
0.09001973271369934,
-0.10936246812343597,
0.5855845808982849,
-0.18922996520996094,
-0.39736995100975037,
-0.04062600061297417,
0.09581992030143738,
-0.13863521814346313,
-0.2265009880065918,
-0.175169438123703,
0.1693679541349411,
0.1712985336780548,
0.10591325163841248,
-0.29491519927978516,
-0.21119807660579681,
0.250580757856369,
-0.5529925227165222,
0.14243051409721375,
0.2732217311859131,
0.13584154844284058,
0.009958945214748383,
0.2455812394618988,
0.017994359135627747,
-0.0802517980337143,
-0.0627809688448906,
0.048557624220848083,
-0.0480530709028244,
0.12335945665836334,
0.031532127410173416,
0.406421959400177,
-0.23704823851585388,
-0.12769640982151031,
0.1943303942680359,
0.25832435488700867,
0.09016115218400955,
0.016575783491134644,
0.07788197696208954,
0.21404407918453217,
-0.11349315941333771,
-0.011132098734378815,
0.0923076719045639,
-0.16766175627708435,
-0.18222370743751526,
0.2470317929983139,
-0.1016596108675003,
0.35665154457092285,
0.19004781544208527,
-0.028123240917921066,
-0.14657148718833923,
0.031853947788476944,
0.007476946339011192,
0.08515197783708572,
0.1366414576768875,
0.22534465789794922,
0.11061336100101471,
0.3024946451187134,
-0.0888994112610817,
-0.3340621590614319,
-0.32914116978645325,
0.20462168753147125,
0.18935997784137726,
-0.13795678317546844,
0.0430709645152092,
-0.3720264434814453,
-0.15386033058166504,
-0.22911573946475983,
-0.0611867792904377,
-0.00868617370724678,
-0.0553782656788826,
0.03334685415029526,
0.06928978860378265,
-0.2968462109565735,
-0.016544697806239128,
-0.014107326976954937,
-0.11900646984577179,
0.2792683243751526,
-0.02601962722837925,
0.2251577079296112,
0.1244632825255394,
-0.1840473711490631,
0.02238410711288452,
0.34249481558799744,
-0.22909510135650635,
0.2411518692970276,
0.22156982123851776,
-0.14777693152427673,
-0.22250491380691528,
-0.5029037594795227,
0.04309318959712982,
0.026197146624326706,
0.1326124519109726,
0.023485369980335236,
0.04366178810596466,
-0.10334160923957825,
-0.24644337594509125,
0.015592381358146667,
-0.004755226895213127,
-0.3892478346824646,
0.2419453263282776,
0.08734181523323059,
0.338384747505188,
-0.24492116272449493,
-0.114878349006176,
-0.09734014421701431,
-0.25339311361312866,
0.341724693775177,
-0.00009969621896743774,
0.2947906255722046,
0.0759197250008583,
0.42764198780059814,
0.27140092849731445,
0.1112658903002739,
-0.11343152821063995,
-0.09110230952501297,
0.3186699450016022,
0.15612052381038666,
0.10003799945116043,
-0.4418441355228424,
-0.32415395975112915,
-0.20384740829467773,
0.10421700030565262,
0.285338819026947,
-0.41271448135375977,
-0.37519872188568115,
-0.17812702059745789,
0.011324871331453323,
-0.2125646471977234,
-0.1014021784067154,
0.1558944284915924,
-0.029048079624772072,
-0.06791791319847107,
0.14992967247962952,
-0.2383766919374466,
0.006020382046699524,
0.36630016565322876,
0.09038145840167999,
-0.12311311811208725,
0.3599192202091217,
0.1418706774711609,
0.654058039188385,
0.472655326128006,
-0.08030861616134644,
0.3284076452255249,
-0.026793016120791435,
0.09540068358182907,
-0.053523190319538116,
0.04927778244018555,
0.09655959904193878,
-0.15551131963729858,
-0.00679350458085537,
0.03889157623052597,
-0.23108556866645813,
-0.2745266854763031,
0.3186492919921875,
-0.1357765793800354,
0.07680103927850723,
-0.09373076260089874,
0.23087649047374725,
-0.0694599375128746,
-0.05840819329023361,
-0.11006782948970795,
-0.10298208892345428,
0.07880745828151703,
-0.056729864329099655,
-0.22540175914764404,
-0.4360731840133667,
-0.054477058351039886,
0.061875004321336746,
0.04643977805972099,
-0.2706868052482605,
-0.07307661324739456,
0.2689521014690399,
0.26807570457458496,
0.37790796160697937,
0.18942852318286896,
-0.2952120304107666,
0.1815359890460968,
-0.1063893586397171,
0.2954217195510864,
-0.0015864912420511246,
-0.08689102530479431,
0.01118927076458931,
0.19643186032772064,
-0.504783034324646,
-0.2770662009716034,
-0.06531581282615662,
0.2580469846725464,
0.08598140627145767,
-0.10200005769729614,
-0.3485177159309387,
0.12131823599338531,
0.3099368214607239,
0.5424976348876953,
0.1385134607553482,
0.08076409250497818,
-0.21231906116008759,
-0.32767826318740845,
-0.3447757363319397,
0.1842496544122696,
0.07272400707006454,
0.38614022731781006,
0.07506534457206726,
-0.3298746645450592,
-0.03560534119606018,
-0.4649927616119385,
-0.11922402679920197,
0.20295089483261108,
0.2659876346588135,
-0.3879029452800751,
0.25159797072410583,
-0.41469746828079224,
-0.26692116260528564,
0.6681771874427795,
0.4732895493507385,
0.2603398859500885,
-0.058259427547454834,
0.03355833888053894,
0.011296347714960575,
0.39056459069252014,
0.21052929759025574,
-0.15326976776123047,
0.17839780449867249,
-0.22618284821510315,
0.1989055871963501,
-0.012522266246378422,
-0.09848736971616745,
0.006404904183000326,
-0.22110870480537415,
-0.04200313240289688,
0.18099774420261383,
0.3414827585220337,
0.10720102488994598,
0.2939758896827698,
0.4470537602901459,
0.2874952554702759,
0.09179498255252838,
0.337691068649292,
0.16503828763961792,
0.9682552218437195,
-0.3046841025352478,
0.0022079981863498688,
-0.009430326521396637,
-0.3826274871826172,
0.10342368483543396,
0.04215099662542343,
0.20054155588150024,
-0.29705846309661865,
-0.011845058761537075,
0.05876436084508896,
-0.4086432456970215,
0.11983239650726318,
0.0013581812381744385,
-0.09649658203125,
0.03313511610031128,
-0.02727842703461647,
0.47251027822494507,
0.15761274099349976,
0.1429128348827362,
-0.3502267301082611,
0.04682492837309837,
-0.042656317353248596,
-0.00040767155587673187,
-0.15356162190437317,
-0.2994455397129059,
-0.05018424615263939,
-0.3527136445045471,
-0.053497329354286194,
-0.13832414150238037,
-0.3024148941040039,
0.17926156520843506,
-0.37306126952171326,
0.3381041884422302,
0.16999518871307373,
-0.6240676045417786,
0.09935328364372253,
-0.13028563559055328,
-0.4515950679779053,
0.06254546344280243,
-0.1257249116897583,
-0.29073747992515564,
-0.016347631812095642,
-0.0853666439652443,
0.004615019075572491,
-0.08222400397062302,
0.041523367166519165,
0.01071932166814804,
-0.09356704354286194,
-0.006131216883659363,
0.05335428565740585,
-0.24337993562221527,
0.2288426160812378,
0.4967237114906311,
0.16528591513633728,
-0.1489112377166748,
-0.02752210758626461,
-0.2776002585887909,
-0.43290361762046814,
-0.2778664529323578,
0.048719584941864014,
0.10121741145849228,
-0.295767217874527,
0.2817271053791046,
0.06008090451359749,
-0.14823424816131592,
-0.17678019404411316,
0.257548987865448,
0.4114219546318054,
0.20340874791145325,
0.26287996768951416,
-0.16503450274467468,
0.0022943243384361267,
-0.12465782463550568,
-0.19171226024627686,
0.13009347021579742,
-0.7511264085769653,
0.17044134438037872,
-0.4638137221336365,
0.09400838613510132,
-0.007800004445016384,
-0.23851469159126282,
0.16847795248031616,
0.3702555000782013,
-0.32098594307899475,
-0.3051643371582031,
-0.4640112817287445,
0.24353039264678955,
-0.15174397826194763,
0.27224013209342957,
-0.04007592424750328,
0.2034260630607605,
-0.08972268551588058,
0.29831403493881226,
-0.17926859855651855,
0.2661898136138916,
-0.07759823650121689,
0.06612084060907364,
-0.34428441524505615,
-0.2465803623199463,
-0.07327443361282349,
-0.00227738032117486,
0.019391627982258797,
0.5600963830947876,
-0.019198190420866013,
-0.14876069128513336,
0.1913173347711563,
0.10827085375785828,
-0.06869136542081833,
-0.216731995344162,
0.032084446400403976,
0.028278108686208725,
-0.055578891187906265,
-0.030361700803041458,
0.26295316219329834,
-0.2890045940876007,
-0.07376974821090698,
-0.2641851007938385,
0.3982256352901459,
-0.18930059671401978,
-0.2810676693916321,
0.030874785035848618,
-0.17523401975631714,
0.48230844736099243,
0.20281623303890228,
0.22204044461250305,
0.12306327372789383,
0.027396053075790405,
-0.18687935173511505,
-0.07115235179662704,
0.002264179289340973,
-0.3662351369857788,
0.0770958885550499,
-0.2173185497522354,
-0.3610342741012573,
-0.2023545801639557,
0.39583060145378113,
0.48144251108169556,
-0.26490578055381775,
-0.0742991641163826,
0.06746237725019455,
0.07423101365566254,
-0.19258245825767517,
-0.22724606096744537,
0.22551023960113525,
0.0703824833035469,
-0.08931419253349304,
0.3348093628883362,
0.4932478964328766,
-0.2410973459482193,
0.0014702081680297852,
0.16960427165031433,
0.07431695610284805,
0.45078039169311523,
-0.16926002502441406,
0.6496549248695374,
-0.026276949793100357,
-0.16939572989940643,
0.1809341013431549,
-0.00638357549905777,
0.6660394668579102,
0.10439859330654144,
-0.2932756543159485,
0.4987261891365051,
0.01490967720746994,
-0.07423259317874908,
0.23776453733444214,
-0.2116101086139679,
-0.23166753351688385,
0.2832391858100891,
0.3263578414916992,
0.07674551010131836,
0.13996650278568268,
0.44450488686561584,
0.3280545175075531,
0.01798645593225956,
-0.11764869093894958,
-0.10446615517139435,
-0.2689361870288849,
0.2434670329093933,
0.3973490297794342,
0.03242560476064682,
-0.06918482482433319,
-0.09101586043834686,
0.09344834834337234,
-0.405345618724823,
0.5908143520355225,
-0.05938391387462616,
-0.20581351220607758,
-0.1656157523393631,
0.3594578206539154,
0.44674965739250183,
0.029828619211912155,
-0.24290034174919128,
0.23411430418491364,
0.40957969427108765,
-0.2309080958366394,
-0.30816155672073364,
0.3174157738685608,
0.6194667816162109,
0.07713708281517029,
-0.15119794011116028,
-0.036279935389757156,
0.16328363120555878,
0.020886624231934547,
-0.13098835945129395,
0.14615559577941895,
0.012065291404724121,
0.12761420011520386,
0.32070192694664,
0.026614515110850334,
-0.008644476532936096,
-0.4440416395664215,
0.443854957818985,
0.011116914451122284,
-0.31225255131721497,
0.1709918975830078,
-0.161701038479805,
-0.3157191276550293,
0.0009403787553310394,
-0.12560981512069702,
-0.1768241822719574,
-0.025535859167575836,
0.4494779109954834,
0.005314620211720467,
-0.007802192121744156,
0.09347269684076309,
0.019524190574884415,
-0.3066990077495575,
0.4869229197502136,
0.36989957094192505,
0.1613233983516693,
-0.15167276561260223,
-0.058991480618715286,
-0.39317068457603455,
0.45699775218963623,
-0.6030176281929016,
-0.06168268620967865,
0.339395672082901,
0.5351695418357849,
-0.024651862680912018,
0.10132893174886703,
0.24768254160881042,
0.3181719481945038,
0.10636430978775024,
0.3378588557243347,
-0.44879743456840515,
-0.21747861802577972,
0.11019933223724365,
-0.39489462971687317,
0.02582940086722374,
-0.45271822810173035,
0.42968714237213135,
-0.2709994912147522,
-0.008725941181182861,
-0.035558659583330154,
-0.07295824587345123,
0.14888855814933777,
0.2858904004096985,
0.5482442378997803,
-0.03973160684108734,
0.27006587386131287,
0.2682235836982727,
0.11014268547296524,
-0.06784160435199738,
0.029664775356650352,
-0.008494901470839977,
0.44681480526924133,
0.022874945774674416,
0.06374746561050415,
-0.07862605899572372,
0.011518321931362152,
-0.044705793261528015,
0.3845961093902588,
-0.14406320452690125,
-0.025694169104099274,
0.1145966574549675,
-0.11977733671665192,
-0.1786808967590332,
0.09901928901672363,
-0.035619042813777924,
0.017275217920541763,
0.03901964798569679,
-0.04754868149757385,
-0.1981164515018463,
-0.6118700504302979,
0.30967557430267334,
-0.0009296834468841553,
-0.20569346845149994,
0.06801912188529968,
0.2215941697359085,
0.09663371741771698,
-0.16193754971027374,
-0.6241074204444885,
0.10616316646337509,
0.32529696822166443,
-0.04305282235145569,
-0.19154873490333557,
0.20807316899299622,
-0.17816734313964844,
0.10159388184547424,
-0.11359761655330658,
0.36664700508117676,
-0.04790700227022171,
-0.18162459135055542,
0.04933483526110649,
-0.31141573190689087
] |
https://github.com/huggingface/datasets/issues/4782 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648 | Hi @loubnabnl,
Yes, the issue is solved in the discussion thread.
I will close this issue.
Thank you again for all of your help.
Enrico | ## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
``` | 25 | pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
## Describe the bug
Following the example in CodeParrot, I receive an array size limitation error when deduplicating larger datasets.
## Steps to reproduce the bug
```python
dataset_name = "the_pile"
ds = load_dataset(dataset_name, split="train")
ds = ds.map(preprocess, num_proc=num_workers)
uniques = set(ds.unique("hash"))
```
Gists for minimum reproducible example:
https://gist.github.com/conceptofmind/c5804428ea1bd89767815f9cd5f02d9a
https://gist.github.com/conceptofmind/feafb07e236f28d79c2d4b28ffbdb6e2
## Expected results
Chunking and writing out a deduplicated dataset.
## Actual results
```
return dataset._data.column(column).unique().to_pylist()
File "pyarrow/table.pxi", line 394, in pyarrow.lib.ChunkedArray.unique
File "pyarrow/_compute.pyx", line 531, in pyarrow._compute.call_function
File "pyarrow/_compute.pyx", line 330, in pyarrow._compute.Function.call
File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 124, in pyarrow.lib.check_status
pyarrow.lib.ArrowCapacityError: array cannot contain more than 2147483646 bytes, have 2147483648
```
Hi @loubnabnl,
Yes, the issue is solved in the discussion thread.
I will close this issue.
Thank you again for all of your help.
Enrico | [
-0.10459886491298676,
0.0047159940004348755,
-0.05382324755191803,
0.38536959886550903,
0.16545060276985168,
-0.02828454226255417,
0.2812250256538391,
0.3220089375972748,
-0.16077037155628204,
0.21095740795135498,
0.10079135000705719,
0.4835177958011627,
-0.07366732507944107,
0.06690037995576859,
0.3104635179042816,
-0.24924293160438538,
-0.08230219036340714,
0.2389829009771347,
-0.1951880156993866,
0.24795173108577728,
0.027539119124412537,
-0.0868515819311142,
-0.32094722986221313,
0.041335348039865494,
-0.21045726537704468,
0.2109738290309906,
-0.009779810905456543,
0.07433464378118515,
-0.26995617151260376,
-0.5285118818283081,
0.33711645007133484,
-0.2012963891029358,
-0.04111488163471222,
0.18821163475513458,
-0.0001208853063872084,
-0.07317420840263367,
0.2944377660751343,
-0.08255468308925629,
0.04471560940146446,
0.20562279224395752,
-0.025014616549015045,
-0.39489617943763733,
0.20346207916736603,
-0.0384390763938427,
0.37671929597854614,
-0.4575943350791931,
-0.2656886875629425,
0.07320944964885712,
0.25636646151542664,
0.16358114778995514,
0.15315504372119904,
0.3136812746524811,
0.5504714250564575,
0.05122500658035278,
0.25815868377685547,
-0.0031903982162475586,
-0.1499047577381134,
0.7759639620780945,
0.3255726993083954,
-0.23694731295108795,
-0.1289803385734558,
-0.12123805284500122,
0.10236792266368866,
0.2411254346370697,
0.021445821970701218,
-0.07066237181425095,
-0.020820051431655884,
-0.19486603140830994,
0.013334104791283607,
0.30305978655815125,
0.30670857429504395,
-0.5668161511421204,
-0.2612554728984833,
-0.058441709727048874,
0.03244813159108162,
-0.2045423686504364,
-0.0061141327023506165,
0.45696672797203064,
-0.0740753635764122,
0.11367028951644897,
-0.3224024772644043,
0.2514202892780304,
-0.4431404769420624,
0.02961862087249756,
0.02756589651107788,
-0.31200656294822693,
0.1402202993631363,
0.22488150000572205,
0.3615899384021759,
-0.09999585151672363,
0.10733594745397568,
0.14722327888011932,
0.11272433400154114,
0.18010739982128143,
-0.22050736844539642,
-0.12158689647912979,
-0.18936976790428162,
-0.34011566638946533,
0.5574291944503784,
0.1758880764245987,
0.3736545741558075,
0.18391838669776917,
0.2249351441860199,
0.15889330208301544,
0.17130401730537415,
0.18043725192546844,
-0.44412845373153687,
-0.09084543585777283,
-0.051948145031929016,
0.0696815550327301,
0.1629180759191513,
0.06136791408061981,
-0.11024913936853409,
-0.25339242815971375,
0.3334471583366394,
-0.13918113708496094,
0.2280573695898056,
-0.11679907143115997,
-0.21852970123291016,
0.1723501831293106,
-0.5498073697090149,
-0.02813314087688923,
-0.017263390123844147,
0.05063887685537338,
0.2696602940559387,
0.05274432152509689,
-0.22974111139774323,
0.2688031792640686,
-0.07794898748397827,
-0.261734277009964,
-0.1802360862493515,
0.0821121409535408,
-0.05945655703544617,
0.022449836134910583,
0.16080228984355927,
0.04318938031792641,
0.09040750563144684,
0.11083538085222244,
0.4058399796485901,
-0.25144633650779724,
0.1542474627494812,
-0.31964561343193054,
0.02564138174057007,
0.12488578259944916,
-0.09400947391986847,
-0.16975581645965576,
-0.056398529559373856,
0.0558762326836586,
-0.047720346599817276,
0.4119020998477936,
-0.11142265051603317,
-0.3178084194660187,
-0.38963261246681213,
0.1378491371870041,
-0.11682269722223282,
0.17567327618598938,
-0.368418425321579,
-0.06809966266155243,
0.2845987379550934,
-0.041553739458322525,
0.0880851149559021,
-0.26470446586608887,
0.16075794398784637,
-0.4396149218082428,
0.10712587088346481,
0.07169923186302185,
-0.632683277130127,
0.2699272036552429,
0.0831429585814476,
-0.11812163889408112,
0.35390427708625793,
0.4242987632751465,
-0.3840005397796631,
0.0985550731420517,
-0.2114877700805664,
0.3183158040046692,
0.14163005352020264,
0.19707971811294556,
-0.6927719116210938,
0.13479681313037872,
-0.012502700090408325,
-0.05814550071954727,
0.049717310816049576,
-0.09632488340139389,
0.059759724885225296,
0.12808328866958618,
-0.014959849417209625,
0.14174410700798035,
-0.07534373551607132,
-0.048672497272491455,
-0.3048439919948578,
-0.46730029582977295,
0.06177361682057381,
0.021920111030340195,
-0.01210198923945427,
-0.29026350378990173,
0.16799399256706238,
-0.17989948391914368,
0.3179835379123688,
-0.16759605705738068,
-0.0009226580150425434,
0.33432167768478394,
0.28410816192626953,
-0.4047096371650696,
0.16469044983386993,
-0.29074323177337646,
-0.17007794976234436,
0.1565335988998413,
-0.34008392691612244,
-0.21068629622459412,
-0.14237229526042938,
-0.12545165419578552,
-0.2909493148326874,
0.31719785928726196,
0.07673951238393784,
0.10695940256118774,
0.06679137796163559,
-0.22800931334495544,
0.21491694450378418,
-0.27259284257888794,
0.025000344961881638,
0.0032532503828406334,
-0.23038141429424286,
0.11250230669975281,
-0.09244208037853241,
0.6159075498580933,
-0.23040752112865448,
-0.4678274095058441,
-0.006945323199033737,
0.035462938249111176,
-0.11442885547876358,
-0.24919983744621277,
-0.1904657781124115,
0.21621516346931458,
0.11859527230262756,
0.05600942298769951,
-0.27307307720184326,
-0.22799243032932281,
0.25067421793937683,
-0.6303008794784546,
0.13726137578487396,
0.21032552421092987,
0.10553175956010818,
-0.015870701521635056,
0.26170483231544495,
0.06099770963191986,
-0.10160551965236664,
-0.07279903441667557,
-0.0004940666258335114,
-0.041987329721450806,
0.048482246696949005,
0.0007568188011646271,
0.38663825392723083,
-0.2104932814836502,
-0.05729908123612404,
0.12537293136119843,
0.2171504944562912,
0.053354084491729736,
0.005602240562438965,
0.016987688839435577,
0.2467018961906433,
-0.0700339749455452,
0.02116120606660843,
0.13372710347175598,
-0.15988633036613464,
-0.15067780017852783,
0.1887575387954712,
-0.14761297404766083,
0.38339293003082275,
0.19435274600982666,
-0.0838293582201004,
-0.14700716733932495,
0.036740273237228394,
0.015732426196336746,
0.09791946411132812,
0.11185672879219055,
0.2584805488586426,
0.06400386244058609,
0.33150336146354675,
-0.13074976205825806,
-0.2994635999202728,
-0.2608749568462372,
0.17030397057533264,
0.21760325133800507,
-0.18486253917217255,
0.04379566013813019,
-0.35618966817855835,
-0.13286080956459045,
-0.18735386431217194,
-0.12757812440395355,
0.009847916662693024,
-0.0037228763103485107,
-0.015672452747821808,
0.08010637015104294,
-0.2226777970790863,
-0.009157940745353699,
-0.03564950451254845,
-0.14614810049533844,
0.2809355556964874,
0.03353523835539818,
0.24023139476776123,
0.08944614231586456,
-0.13485655188560486,
0.028265994042158127,
0.3154110312461853,
-0.21676580607891083,
0.2239089012145996,
0.24203182756900787,
-0.08963779360055923,
-0.1611473709344864,
-0.4095357060432434,
0.012524962425231934,
0.017428526654839516,
0.1287412792444229,
0.028707899153232574,
0.10158641636371613,
-0.11577127873897552,
-0.26523351669311523,
0.07962297648191452,
-0.05932590365409851,
-0.3390221893787384,
0.25220078229904175,
0.10159854590892792,
0.2926825284957886,
-0.20746183395385742,
-0.06986729055643082,
-0.12697528302669525,
-0.25277289748191833,
0.31910932064056396,
0.076314777135849,
0.30914032459259033,
0.05389883369207382,
0.44108277559280396,
0.2554026246070862,
0.07872240245342255,
-0.1637210100889206,
-0.04445313289761543,
0.29098430275917053,
0.18942756950855255,
0.056824762374162674,
-0.46837714314460754,
-0.2831590175628662,
-0.22585542500019073,
0.15605567395687103,
0.2472410947084427,
-0.34798669815063477,
-0.36484870314598083,
-0.16892392933368683,
-0.005447298288345337,
-0.2705555558204651,
-0.1351468861103058,
0.13132093846797943,
-0.037373967468738556,
-0.05648375675082207,
0.13178321719169617,
-0.2915734350681305,
0.037189215421676636,
0.3673347234725952,
0.10510320216417313,
-0.10556962341070175,
0.3484884202480316,
0.11105333268642426,
0.6381701231002808,
0.40735432505607605,
-0.09642304480075836,
0.34766507148742676,
-0.09530657529830933,
0.021069392561912537,
-0.058150358498096466,
0.00014203600585460663,
0.11530380696058273,
-0.1454727053642273,
-0.016857320442795753,
0.0028252899646759033,
-0.2586686611175537,
-0.3144105076789856,
0.2809921205043793,
-0.11667560040950775,
-0.016130954027175903,
-0.043091919273138046,
0.2528899312019348,
0.02230891026556492,
0.0030549317598342896,
-0.09425562620162964,
-0.1592007875442505,
0.008198888972401619,
-0.08798374980688095,
-0.22458627820014954,
-0.4619157910346985,
-0.06948856264352798,
0.017481638118624687,
-0.021434839814901352,
-0.26494720578193665,
0.02272592857480049,
0.29783546924591064,
0.2673867642879486,
0.342877060174942,
0.15376274287700653,
-0.21031513810157776,
0.1717219352722168,
-0.07817073166370392,
0.3402367830276489,
0.01702706143260002,
-0.1373193860054016,
0.0155499167740345,
0.21918100118637085,
-0.4846208691596985,
-0.2597961723804474,
-0.06546303629875183,
0.27380093932151794,
0.058026231825351715,
-0.11103309690952301,
-0.3042680621147156,
0.11377546936273575,
0.3465718924999237,
0.5377678275108337,
0.09236988425254822,
0.057463180273771286,
-0.23064585030078888,
-0.3022809624671936,
-0.35612815618515015,
0.1937202513217926,
0.0588856041431427,
0.38314181566238403,
0.06214957684278488,
-0.3689916431903839,
-0.004339627921581268,
-0.43374332785606384,
-0.17267267405986786,
0.18168677389621735,
0.320853590965271,
-0.3591670095920563,
0.2259443700313568,
-0.3981263041496277,
-0.27633994817733765,
0.6900476813316345,
0.4305999279022217,
0.3491111695766449,
-0.017061084508895874,
0.049413688480854034,
-0.027530502527952194,
0.385330468416214,
0.19714462757110596,
-0.15407705307006836,
0.17239511013031006,
-0.1828112006187439,
0.25269603729248047,
0.00011792127043008804,
-0.11953815072774887,
0.09303820133209229,
-0.28487128019332886,
-0.08678250759840012,
0.14502693712711334,
0.37980473041534424,
0.04385223612189293,
0.30949634313583374,
0.4087120294570923,
0.24884550273418427,
0.10115265846252441,
0.3290208578109741,
0.159039705991745,
1.0247012376785278,
-0.3194533586502075,
-0.06911596655845642,
0.004661407321691513,
-0.3777613639831543,
0.11111197620630264,
0.08579196035861969,
0.19650067389011383,
-0.33337733149528503,
-0.01552921999245882,
0.04606571048498154,
-0.4676203429698944,
0.14031603932380676,
0.06667116284370422,
-0.15209327638149261,
0.003757958998903632,
-0.05627770721912384,
0.40098458528518677,
0.11725867539644241,
0.1373094916343689,
-0.2821345329284668,
0.05732960253953934,
-0.05020631104707718,
0.017821460962295532,
-0.2384338229894638,
-0.27592796087265015,
-0.08770706504583359,
-0.3768306374549866,
-0.07424350827932358,
-0.1227504163980484,
-0.3488178849220276,
0.2008545696735382,
-0.35051995515823364,
0.28102701902389526,
0.19809742271900177,
-0.6166689395904541,
0.1456039696931839,
-0.09720304608345032,
-0.4179023504257202,
0.042438656091690063,
-0.17614281177520752,
-0.2596164643764496,
-0.09792228788137436,
-0.12939508259296417,
-0.035464752465486526,
-0.011358161456882954,
-0.00023103877902030945,
-0.021919650956988335,
-0.15711915493011475,
0.07715734839439392,
0.07775551825761795,
-0.24751539528369904,
0.28270453214645386,
0.47662103176116943,
0.16829369962215424,
-0.261206716299057,
-0.07352712750434875,
-0.34760019183158875,
-0.3960022032260895,
-0.286618709564209,
0.05725942179560661,
0.10970193147659302,
-0.23710012435913086,
0.27256226539611816,
0.1572931706905365,
-0.13208544254302979,
-0.1714448481798172,
0.22795215249061584,
0.404869943857193,
0.19567641615867615,
0.2964446544647217,
-0.10793723165988922,
0.009935330599546432,
-0.12946373224258423,
-0.1827826201915741,
0.10886222124099731,
-0.7714115977287292,
0.13110977411270142,
-0.3598930239677429,
0.15564177930355072,
-0.006456702947616577,
-0.20291075110435486,
0.21973060071468353,
0.41415923833847046,
-0.2609352767467499,
-0.2857033610343933,
-0.5055161118507385,
0.24496935307979584,
-0.16806793212890625,
0.26488107442855835,
-0.07678215205669403,
0.22329626977443695,
-0.05153656750917435,
0.32713520526885986,
-0.20087790489196777,
0.288310170173645,
-0.15061168372631073,
0.07540268450975418,
-0.22458140552043915,
-0.2631135880947113,
-0.09519567340612411,
-0.04715104028582573,
0.030221330001950264,
0.5068088173866272,
-0.04766694828867912,
-0.16215896606445312,
0.1970568299293518,
0.09153211116790771,
-0.04879727214574814,
-0.21881620585918427,
-0.03408452495932579,
-0.004061153158545494,
-0.0512230210006237,
-0.01268850639462471,
0.19388903677463531,
-0.29877424240112305,
-0.05321265012025833,
-0.19483552873134613,
0.42768043279647827,
-0.21609267592430115,
-0.28239208459854126,
0.02046407014131546,
-0.1894751489162445,
0.4925895929336548,
0.20042838156223297,
0.20947177708148956,
0.17332138121128082,
0.012033753097057343,
-0.17937062680721283,
-0.052635230123996735,
0.018322251737117767,
-0.32780522108078003,
0.0723513662815094,
-0.2857227325439453,
-0.3174639642238617,
-0.16696345806121826,
0.4176233410835266,
0.486068993806839,
-0.27911126613616943,
0.007096311077475548,
0.04211397469043732,
0.09231530129909515,
-0.17521381378173828,
-0.18183866143226624,
0.278903990983963,
0.08450017869472504,
-0.13591869175434113,
0.3337119221687317,
0.47265520691871643,
-0.2215293049812317,
-0.00660298764705658,
0.1990472972393036,
0.09606087952852249,
0.4267783761024475,
-0.16916249692440033,
0.6207029223442078,
-0.021929394453763962,
-0.18847407400608063,
0.25130370259284973,
0.058701351284980774,
0.6789379715919495,
0.08088418841362,
-0.27627378702163696,
0.3981320559978485,
0.04072035849094391,
-0.0831490308046341,
0.23222500085830688,
-0.21568915247917175,
-0.28311434388160706,
0.2555363178253174,
0.3334919214248657,
0.026979506015777588,
0.08466563373804092,
0.47186529636383057,
0.3166133165359497,
-0.010481983423233032,
-0.110167495906353,
-0.10863290727138519,
-0.22247016429901123,
0.26064813137054443,
0.3262080252170563,
0.04872102290391922,
-0.09422019869089127,
-0.09653683006763458,
0.06104022264480591,
-0.3447255492210388,
0.5965602397918701,
-0.04581607133150101,
-0.21224211156368256,
-0.16681648790836334,
0.3452107608318329,
0.5024845600128174,
-0.03950811177492142,
-0.2621442973613739,
0.25286543369293213,
0.3828304409980774,
-0.19633692502975464,
-0.2969377636909485,
0.4018435776233673,
0.6224586367607117,
0.12074172496795654,
-0.14224135875701904,
0.013676399365067482,
0.15527905523777008,
-0.0064754728227853775,
-0.09740639477968216,
0.10345759242773056,
0.13102132081985474,
0.1332114338874817,
0.31099236011505127,
0.06026335805654526,
-0.03513066843152046,
-0.34041741490364075,
0.397219181060791,
0.029286157339811325,
-0.298543244600296,
0.11172138154506683,
-0.19215011596679688,
-0.38235756754875183,
-0.02661389857530594,
-0.2001999318599701,
-0.21812674403190613,
0.0325402207672596,
0.47419169545173645,
0.034580547362565994,
-0.0003241244703531265,
0.11778255552053452,
0.019591551274061203,
-0.2912712097167969,
0.5284222364425659,
0.34504684805870056,
0.21450024843215942,
-0.19288267195224762,
-0.09430120885372162,
-0.3485194742679596,
0.4830201268196106,
-0.6063892841339111,
-0.01827857457101345,
0.33901190757751465,
0.4979679584503174,
-0.015698671340942383,
0.13710230588912964,
0.2827281355857849,
0.2751811444759369,
0.09192417562007904,
0.4075338542461395,
-0.4485224783420563,
-0.16828331351280212,
0.13979962468147278,
-0.31826621294021606,
0.049928128719329834,
-0.3684680759906769,
0.4450472295284271,
-0.2955154478549957,
-0.00681767612695694,
-0.06306267529726028,
-0.06622054427862167,
0.1416999101638794,
0.25528502464294434,
0.6312620639801025,
-0.08433188498020172,
0.3300617039203644,
0.25432974100112915,
0.15269941091537476,
-0.04807344451546669,
-0.08744634687900543,
0.031836096197366714,
0.42448627948760986,
0.09411770850419998,
0.11691482365131378,
-0.07061494886875153,
0.029452845454216003,
-0.09544076025485992,
0.34590891003608704,
-0.1836964637041092,
0.002481729257851839,
0.17333225905895233,
-0.1392008662223816,
-0.1601816862821579,
0.00842785369604826,
0.005800857208669186,
-0.03551346808671951,
0.014384444802999496,
-0.043296169489622116,
-0.21086448431015015,
-0.6150515079498291,
0.3595196008682251,
0.06877709925174713,
-0.27517181634902954,
0.12639369070529938,
0.22034019231796265,
0.08068080991506577,
-0.18108156323432922,
-0.5885469317436218,
0.10991834849119186,
0.3437948524951935,
-0.024710621684789658,
-0.19609475135803223,
0.17958097159862518,
-0.18178944289684296,
0.10803209245204926,
-0.0871826708316803,
0.3787582516670227,
-0.04559209942817688,
-0.18803083896636963,
-0.0030424632132053375,
-0.2644858956336975
] |
https://github.com/huggingface/datasets/issues/4776 | RuntimeError when using torchaudio 0.12.0 to load MP3 audio file | Requiring torchaudio<0.12.0 isn't really a viable solution because that implies torch<0.12.0 which means no sm_86 CUDA support which means no RTX 3090 support in PyTorch.
But in my case, the error only occurs if `_fallback_load` resolves to `_fail_load` inside torchaudio 0.12.0 which is only the case if FFMPEG initialization failed: https://github.com/pytorch/audio/blob/b1f510fa5681e92ee82bdc6b2d1ed896799fc32c/torchaudio/backend/sox_io_backend.py#L36-L47
That means the proper solution for torchaudio>=0.12.0 is to check `torchaudio._extension._FFMPEG_INITIALIZED` and if it is False, then we need to remind the user to install a dynamically linked ffmpeg 4.1.8 and then maybe call `torchaudio._extension._init_ffmpeg()` to force a user-visible exception showing the missing ffmpeg dynamic library name.
On my system, installing
- libavcodec.so.58
- libavdevice.so.58
- libavfilter.so.7
- libavformat.so.58
- libavutil.so.56
- libswresample.so.3
- libswscale.so.5
from ffmpeg 4.1.8 made HF datasets 2.3.2 work just fine with torchaudio 0.12.1+cu116:
```python3
import sox, torchaudio, datasets
print('torchaudio', torchaudio.__version__)
print('datasets', datasets.__version__)
torchaudio._extension._init_ffmpeg()
print(torchaudio._extension._FFMPEG_INITIALIZED)
waveform, sample_rate = torchaudio.load('/workspace/.cache/huggingface/datasets/downloads/extracted/8e5aa88585efa2a4c74c6664b576550d32b7ff9c3d1d17cc04f44f11338c3dc6/cv-corpus-8.0-2022-01-19/en/clips/common_voice_en_100038.mp3', format='mp3')
print(waveform.shape)
```
```
torchaudio 0.12.1+cu116
datasets 2.3.2
True
torch.Size([1, 369792])
``` | Current version of `torchaudio` (0.12.0) raises a RuntimeError when trying to use `sox_io` backend but non-Python dependency `sox` is not installed:
https://github.com/pytorch/audio/blob/2e1388401c434011e9f044b40bc8374f2ddfc414/torchaudio/backend/sox_io_backend.py#L21-L29
```python
def _fail_load(
filepath: str,
frame_offset: int = 0,
num_frames: int = -1,
normalize: bool = True,
channels_first: bool = True,
format: Optional[str] = None,
) -> Tuple[torch.Tensor, int]:
raise RuntimeError("Failed to load audio from {}".format(filepath))
```
Maybe we should raise a more actionable error message so that the user knows how to fix it.
UPDATE:
- this is an incompatibility of latest torchaudio (0.12.0) and the sox backend
TODO:
- [x] as a temporary solution, we should recommend installing torchaudio<0.12.0
- #4777
- #4785
- [ ] however, a stable solution must be found for torchaudio>=0.12.0
Related to:
- https://github.com/huggingface/transformers/issues/18379 | 156 | RuntimeError when using torchaudio 0.12.0 to load MP3 audio file
Current version of `torchaudio` (0.12.0) raises a RuntimeError when trying to use `sox_io` backend but non-Python dependency `sox` is not installed:
https://github.com/pytorch/audio/blob/2e1388401c434011e9f044b40bc8374f2ddfc414/torchaudio/backend/sox_io_backend.py#L21-L29
```python
def _fail_load(
filepath: str,
frame_offset: int = 0,
num_frames: int = -1,
normalize: bool = True,
channels_first: bool = True,
format: Optional[str] = None,
) -> Tuple[torch.Tensor, int]:
raise RuntimeError("Failed to load audio from {}".format(filepath))
```
Maybe we should raise a more actionable error message so that the user knows how to fix it.
UPDATE:
- this is an incompatibility of latest torchaudio (0.12.0) and the sox backend
TODO:
- [x] as a temporary solution, we should recommend installing torchaudio<0.12.0
- #4777
- #4785
- [ ] however, a stable solution must be found for torchaudio>=0.12.0
Related to:
- https://github.com/huggingface/transformers/issues/18379
Requiring torchaudio<0.12.0 isn't really a viable solution because that implies torch<0.12.0 which means no sm_86 CUDA support which means no RTX 3090 support in PyTorch.
But in my case, the error only occurs if `_fallback_load` resolves to `_fail_load` inside torchaudio 0.12.0 which is only the case if FFMPEG initialization failed: https://github.com/pytorch/audio/blob/b1f510fa5681e92ee82bdc6b2d1ed896799fc32c/torchaudio/backend/sox_io_backend.py#L36-L47
That means the proper solution for torchaudio>=0.12.0 is to check `torchaudio._extension._FFMPEG_INITIALIZED` and if it is False, then we need to remind the user to install a dynamically linked ffmpeg 4.1.8 and then maybe call `torchaudio._extension._init_ffmpeg()` to force a user-visible exception showing the missing ffmpeg dynamic library name.
On my system, installing
- libavcodec.so.58
- libavdevice.so.58
- libavfilter.so.7
- libavformat.so.58
- libavutil.so.56
- libswresample.so.3
- libswscale.so.5
from ffmpeg 4.1.8 made HF datasets 2.3.2 work just fine with torchaudio 0.12.1+cu116:
```python3
import sox, torchaudio, datasets
print('torchaudio', torchaudio.__version__)
print('datasets', datasets.__version__)
torchaudio._extension._init_ffmpeg()
print(torchaudio._extension._FFMPEG_INITIALIZED)
waveform, sample_rate = torchaudio.load('/workspace/.cache/huggingface/datasets/downloads/extracted/8e5aa88585efa2a4c74c6664b576550d32b7ff9c3d1d17cc04f44f11338c3dc6/cv-corpus-8.0-2022-01-19/en/clips/common_voice_en_100038.mp3', format='mp3')
print(waveform.shape)
```
```
torchaudio 0.12.1+cu116
datasets 2.3.2
True
torch.Size([1, 369792])
``` | [
-0.4879215359687805,
-0.2076202630996704,
0.079262375831604,
0.11577180027961731,
0.05602937191724777,
-0.14573261141777039,
0.44489559531211853,
0.143636092543602,
-0.10682991147041321,
0.35547006130218506,
0.007712907157838345,
0.6597689986228943,
-0.2022406905889511,
-0.5119498372077942,
-0.27463048696517944,
-0.2581707835197449,
-0.1610085368156433,
0.29857009649276733,
-0.25082865357398987,
0.07651148736476898,
-0.2255721390247345,
0.20365604758262634,
-0.21058835089206696,
0.223970428109169,
-0.07255269587039948,
-0.0038593951612710953,
0.18217606842517853,
0.3038908839225769,
-0.2143206149339676,
-0.18675051629543304,
0.22777573764324188,
-0.3066636621952057,
0.10756423324346542,
0.49620234966278076,
-0.00011022004036931321,
-0.061896082013845444,
0.5776890516281128,
-0.20527304708957672,
-0.1521712839603424,
-0.4093649983406067,
0.10451038926839828,
0.05746615678071976,
-0.1025850847363472,
0.15225180983543396,
0.10594568401575089,
0.08614414930343628,
-0.047601304948329926,
0.06320348381996155,
0.22210657596588135,
0.19510330259799957,
0.15442776679992676,
0.5062267780303955,
0.2866022288799286,
-0.04381473362445831,
0.3090740740299225,
0.15736952424049377,
-0.15685050189495087,
0.15570780634880066,
0.44935837388038635,
0.019160520285367966,
-0.13583725690841675,
0.26439276337623596,
-0.34596148133277893,
0.07165823876857758,
-0.046379201114177704,
-0.2792743146419525,
0.0779937356710434,
-0.04408779740333557,
0.016184572130441666,
0.40673914551734924,
0.34397321939468384,
-0.17172285914421082,
-0.12049378454685211,
-0.04991208016872406,
-0.015514158643782139,
-0.34351396560668945,
0.5294663310050964,
0.1149834394454956,
-0.33799150586128235,
-0.12361155450344086,
0.09395623207092285,
0.14616186916828156,
-0.06016966328024864,
0.14532573521137238,
0.03759755939245224,
0.36242005228996277,
0.05037466809153557,
0.10095624625682831,
0.36214715242385864,
-0.14282412827014923,
0.11456135660409927,
0.1078958734869957,
-0.15717053413391113,
0.13893865048885345,
0.026452068239450455,
-0.03258639574050903,
-0.09539522975683212,
-0.34602776169776917,
0.03320875018835068,
-0.14435067772865295,
0.07742656767368317,
0.11106595396995544,
-0.13628332316875458,
0.3060458302497864,
-0.0486314557492733,
-0.180758997797966,
-0.058112405240535736,
0.028867945075035095,
0.27803656458854675,
0.06954237818717957,
0.28916603326797485,
-0.0153675377368927,
-0.15722273290157318,
-0.27085986733436584,
-0.4462740421295166,
0.20786044001579285,
0.19354751706123352,
-0.25226154923439026,
-0.5022972226142883,
0.016247890889644623,
-0.3284223675727844,
-0.008574538864195347,
0.2538769841194153,
0.1943511664867401,
0.1759643405675888,
0.14510312676429749,
0.46782350540161133,
0.2620527744293213,
-0.15052098035812378,
0.016408614814281464,
0.10852184891700745,
-0.0018759220838546753,
-0.010777074843645096,
0.11770859360694885,
0.05624699220061302,
-0.5112164616584778,
0.43149298429489136,
0.07043693214654922,
0.5871574282646179,
0.11104974150657654,
-0.03780032694339752,
-0.10428912937641144,
-0.20782870054244995,
0.2927122414112091,
-0.028471646830439568,
-0.06025892496109009,
0.10249462723731995,
0.6468746066093445,
-0.21152976155281067,
0.3018818795681,
-0.2972779870033264,
-0.19034411013126373,
-0.14022289216518402,
0.1974145472049713,
0.005045432597398758,
0.03391982242465019,
-0.02804567664861679,
-0.20664583146572113,
-0.03283517807722092,
-0.5482452511787415,
0.1327887326478958,
-0.13712196052074432,
-0.36814069747924805,
0.1396087259054184,
-0.012324237264692783,
0.23364216089248657,
-0.07039772719144821,
-0.13964083790779114,
0.24320697784423828,
0.0635736733675003,
0.025492094457149506,
-0.13490808010101318,
-0.24930372834205627,
0.21343594789505005,
-0.38320192694664,
-0.4944601058959961,
0.7181318998336792,
-0.6141123175621033,
-0.08013414591550827,
0.17778466641902924,
-0.1540781855583191,
0.12644273042678833,
0.05165166035294533,
0.08645223826169968,
-0.0076541658490896225,
-0.26350146532058716,
0.10705803334712982,
0.06522848457098007,
-0.08501879870891571,
0.18617884814739227,
-0.21501465141773224,
-0.3558487594127655,
0.08672106266021729,
0.2819158136844635,
0.12986738979816437,
-0.0420135036110878,
-0.24048420786857605,
0.2118781954050064,
0.0663059800863266,
0.14658071100711823,
-0.30777037143707275,
0.05852723866701126,
-0.026173990219831467,
0.048601165413856506,
-0.11999113857746124,
-0.23928263783454895,
0.4980025589466095,
0.026252977550029755,
-0.09680891782045364,
0.32396647334098816,
-0.030104920268058777,
0.09580008685588837,
-0.09073054045438766,
-0.12692172825336456,
-0.2461441308259964,
0.15959516167640686,
0.06762228906154633,
0.12374655902385712,
-0.06809840351343155,
0.08447881042957306,
-0.07962208986282349,
0.1040583923459053,
0.005594274029135704,
0.014533588662743568,
-0.2603602111339569,
-0.0593283474445343,
-0.15242421627044678,
-0.16780713200569153,
0.13926024734973907,
0.2132880687713623,
0.22000136971473694,
0.08904828876256943,
-0.147487610578537,
0.39739465713500977,
-0.08627814799547195,
0.13873372972011566,
-0.6095384955406189,
-0.09446747601032257,
0.23596225678920746,
0.1308348923921585,
0.2838360667228699,
0.34118902683258057,
0.18046964704990387,
-0.09914347529411316,
0.10963507741689682,
0.2502792477607727,
0.3824634552001953,
0.17223893105983734,
-0.14249590039253235,
-0.10234006494283676,
0.02014419250190258,
0.33546382188796997,
-0.29519352316856384,
0.3677998185157776,
0.06956593692302704,
0.1979416310787201,
0.26577693223953247,
-0.3085874021053314,
-0.16267573833465576,
-0.37309905886650085,
0.3402285575866699,
0.11156216263771057,
0.17379547655582428,
0.25167012214660645,
-0.004449374973773956,
0.09999193996191025,
0.08344809710979462,
-0.4453679919242859,
0.2525043785572052,
0.23507186770439148,
-0.32830318808555603,
-0.19151341915130615,
-0.2726411819458008,
-0.04949274659156799,
0.11806387454271317,
0.35028380155563354,
0.27765271067619324,
0.26346755027770996,
0.04694349691271782,
0.038002293556928635,
-0.14585992693901062,
-0.25856679677963257,
-0.2096545696258545,
0.11056133359670639,
-0.32673898339271545,
0.004236558452248573,
0.0013035386800765991,
0.13902315497398376,
-0.29767370223999023,
-0.3043009340763092,
-0.4320228099822998,
-0.052725277841091156,
0.3172371983528137,
0.6044730544090271,
-0.11872322857379913,
0.25857606530189514,
0.10366913676261902,
0.2428235560655594,
0.08805963397026062,
-0.19895164668560028,
-0.031235795468091965,
-0.11233855783939362,
-0.3251316249370575,
0.09555718302726746,
0.0977763682603836,
0.050710927695035934,
0.23312339186668396,
-0.1378951370716095,
-0.17818884551525116,
0.1739524006843567,
0.0031328946352005005,
0.13076266646385193,
0.02828986942768097,
-0.4643876552581787,
0.2463255673646927,
-0.045728057622909546,
0.18558792769908905,
-0.7020105719566345,
0.11131353676319122,
-0.027489136904478073,
-0.011569072492420673,
0.2383498251438141,
0.0015128464438021183,
0.4480243921279907,
-0.011903507634997368,
-0.27101847529411316,
0.20673681795597076,
-0.5436437726020813,
-0.014365926384925842,
-0.23284178972244263,
0.15526509284973145,
0.1962248533964157,
0.26575160026550293,
0.1051674336194992,
0.07964461296796799,
0.3816162049770355,
-0.09815862029790878,
-0.40087997913360596,
0.023301295936107635,
0.03246865049004555,
-0.14269974827766418,
0.15720714628696442,
0.21059411764144897,
0.1631140559911728,
0.17650802433490753,
-0.18478912115097046,
-0.5768886208534241,
0.43797656893730164,
-0.4520004093647003,
-0.2220008671283722,
-0.13727477192878723,
0.4471212327480316,
0.13968642055988312,
-0.017698414623737335,
-0.012154139578342438,
-0.13196347653865814,
-0.15016886591911316,
-0.27939701080322266,
0.48398059606552124,
0.12509509921073914,
0.9444130063056946,
-0.10901831090450287,
0.564330518245697,
-0.0745563805103302,
-0.1177903562784195,
0.11142458021640778,
0.1833765059709549,
0.2973279654979706,
-0.35741856694221497,
0.04293046146631241,
-0.008094043470919132,
0.25639790296554565,
-0.10849101841449738,
-0.08877953886985779,
-0.020704224705696106,
0.010903250426054,
-0.3258959949016571,
0.05387278273701668,
0.04643077403306961,
-0.15808828175067902,
-0.1023583859205246,
0.14432938396930695,
-0.00913596898317337,
-0.3160855174064636,
0.42438313364982605,
0.1307615339756012,
0.23524761199951172,
0.28869783878326416,
0.26889750361442566,
0.175327330827713,
-0.09538085013628006,
0.045186180621385574,
0.2307693362236023,
-0.1471942663192749,
0.17644715309143066,
0.15912878513336182,
0.6075360178947449,
-0.17573273181915283,
-0.2812572121620178,
-0.2679615616798401,
0.008670054376125336,
-0.029267743229866028,
0.12651202082633972,
0.19756294786930084,
0.29095667600631714,
0.04245422035455704,
-0.18102096021175385,
-0.21207892894744873,
-0.1708153933286667,
0.34128618240356445,
0.16498208045959473,
0.0651448592543602,
0.0460553839802742,
-0.18359097838401794,
0.252169668674469,
0.0714416354894638,
0.09787677228450775,
-0.114174023270607,
-0.3796476721763611,
-0.23395514488220215,
-0.19652993977069855,
0.2948375642299652,
0.10263616591691971,
0.4496418237686157,
0.13844238221645355,
-0.12047623097896576,
0.22178831696510315,
-0.07953082025051117,
-0.008693523705005646,
-0.16859827935695648,
0.029769454151391983,
-0.09877317398786545,
0.09366507828235626,
-0.10016967356204987,
-0.0017033480107784271,
0.405193030834198,
0.08178205043077469,
-0.03550567850470543,
-0.2553168833255768,
0.3236624002456665,
0.08739544451236725,
-0.014159493148326874,
0.19232574105262756,
0.21273957192897797,
-0.10147660225629807,
-0.4573687016963959,
-0.12039746344089508,
-0.3866528570652008,
0.05732186511158943,
0.3418983817100525,
-0.04765765741467476,
-0.07804333418607712,
-0.08961261063814163,
0.3610706925392151,
-0.05991721153259277,
-0.019700922071933746,
0.637355387210846,
0.014605559408664703,
-0.043615199625492096,
0.1212335079908371,
0.2078312337398529,
0.7979110479354858,
0.055161766707897186,
-0.013694431632757187,
0.5256547331809998,
-0.22029408812522888,
-0.10471539199352264,
-0.2525380849838257,
0.19281841814517975,
0.06226461008191109,
0.22503496706485748,
0.02186492644250393,
0.11078333854675293,
0.14365661144256592,
-0.20601294934749603,
-0.08829768747091293,
0.2563318610191345,
0.053156569600105286,
-0.05114683136343956,
-0.0662437453866005,
0.0328398197889328,
-0.35733139514923096,
-0.40945205092430115,
-0.2521072030067444,
0.1283903270959854,
0.06784095615148544,
0.1311623752117157,
-0.0819343701004982,
-0.1348409354686737,
0.4977981150150299,
-0.415662944316864,
-0.4304608702659607,
0.11050219088792801,
-0.20828965306282043,
-0.24031399190425873,
-0.29893213510513306,
-0.4892139434814453,
0.2953149676322937,
-0.08801153302192688,
-0.06141775846481323,
0.042774707078933716,
0.053138043731451035,
0.16511224210262299,
-0.41097936034202576,
0.027556737884879112,
-0.06939216703176498,
0.15872728824615479,
-0.03678044676780701,
-0.0272193755954504,
0.06317039579153061,
0.31887105107307434,
-0.1352081298828125,
-0.16073033213615417,
0.35011956095695496,
0.008439674973487854,
0.2580346465110779,
0.0013583553954958916,
0.05210915207862854,
0.053871333599090576,
-0.02951817214488983,
-0.11329138278961182,
0.16352951526641846,
-0.13968147337436676,
-0.3160053491592407,
-0.19741350412368774,
-0.18719255924224854,
-0.1300346553325653,
0.173725888133049,
0.513543426990509,
-0.14876815676689148,
-0.18330436944961548,
0.16494160890579224,
0.12508222460746765,
-0.11291343718767166,
-0.20528703927993774,
0.14336228370666504,
-0.08554600179195404,
-0.1726897656917572,
-0.07676835358142853,
0.159054234623909,
-0.31115323305130005,
0.18466044962406158,
0.1005617082118988,
-0.26460790634155273,
-0.030932165682315826,
-0.14772719144821167,
-0.06222831457853317,
-0.44884827733039856,
0.35995256900787354,
0.03312768414616585,
0.06329850852489471,
0.11187351495027542,
-0.30255287885665894,
-0.04091180860996246,
-0.31382718682289124,
-0.2774669826030731,
0.025056028738617897,
0.0451391339302063,
0.006899578496813774,
-0.37507104873657227,
0.056170474737882614,
0.4239526391029358,
0.12307672202587128,
0.04900365322828293,
0.2553139925003052,
-0.07694071531295776,
-0.047445811331272125,
0.1404712200164795,
0.12837722897529602,
-0.006418699398636818,
-0.15343144536018372,
-0.004829087760299444,
-0.28885185718536377,
-0.07085512578487396,
0.0021828124299645424,
0.2733759582042694,
0.5879837274551392,
-0.24350537359714508,
-0.18841210007667542,
0.03536299616098404,
0.4625891149044037,
-0.01811836287379265,
0.03672967478632927,
-0.2549571692943573,
-0.03351913392543793,
0.24332942068576813,
-0.05821070075035095,
-0.02937321737408638,
-0.09760262072086334,
-0.2200758159160614,
0.2630481719970703,
0.2902229130268097,
-0.13537746667861938,
0.28786349296569824,
-0.019561879336833954,
-0.01574450358748436,
0.1849699318408966,
0.02803288772702217,
-0.03400246053934097,
-0.07601501047611237,
-0.14876839518547058,
0.16370800137519836,
0.19419589638710022,
-0.054408960044384,
-0.22368383407592773,
-0.5444432497024536,
-0.3276669979095459,
-0.02843046560883522,
0.17312826216220856,
-0.1299363374710083,
-0.12531596422195435,
0.32793858647346497,
0.2100200355052948,
0.3008633852005005,
-0.027481116354465485,
0.08226121962070465,
0.30797314643859863,
-0.2469649612903595,
0.05112538859248161,
0.0885646715760231,
-0.0519283153116703,
0.3606940805912018,
-0.250251829624176,
-0.4230049252510071,
0.3399001359939575,
0.3237420320510864,
-0.13172924518585205,
0.16641417145729065,
-0.27295225858688354,
-0.5518325567245483,
0.03380744159221649,
0.3516790270805359,
-0.043500080704689026,
-0.03247079998254776,
0.13612769544124603,
-0.359773188829422,
0.012616144493222237,
-0.2229326069355011,
-0.3362194895744324,
0.006005162373185158,
0.09484195709228516,
0.011601313948631287,
-0.05617301166057587,
-0.08690840005874634,
-0.03832416608929634,
0.15490585565567017,
-0.010709397494792938,
-0.3069964647293091,
-0.10158887505531311,
-0.007689878344535828,
0.23493625223636627,
-0.5208274722099304,
0.2112087607383728,
0.1084197610616684,
-0.14145782589912415,
0.11765272170305252,
0.19679465889930725,
0.025540515780448914,
0.43412232398986816,
0.17418548464775085,
0.5310848355293274,
0.2848708927631378,
-0.05912283435463905,
0.09761917591094971,
-0.2749362587928772,
0.2207290083169937,
0.18053464591503143,
0.08840862661600113,
-0.07433626055717468,
0.383294016122818,
0.24104700982570648,
0.2018287628889084,
-0.08574489504098892,
-0.007168274372816086,
-0.022944781929254532,
-0.06075741723179817,
-0.07746373116970062,
0.1429571509361267,
-0.1704765260219574,
0.20490428805351257,
-0.23419520258903503,
0.01936609297990799,
-0.14562775194644928,
-0.24094972014427185,
0.20100481808185577,
0.3276280164718628,
-0.1537896692752838,
0.26338574290275574,
0.07538054138422012,
-0.22835424542427063,
0.05956026166677475,
0.3468230962753296,
-0.32071569561958313,
-0.06131001561880112,
0.01699674129486084,
-0.19119620323181152,
0.17365604639053345,
-0.21894630789756775,
-0.09122113883495331,
0.008521591313183308,
-0.1556972712278366,
0.2914055287837982,
0.09099739789962769,
-0.0706849992275238,
-0.12421506643295288,
0.3722609877586365,
0.10596334934234619,
-0.03992421552538872,
-0.0860505998134613,
0.17238587141036987,
-0.016264313831925392,
-0.061227668076753616,
-0.3286878168582916,
-0.23969970643520355,
0.3777671754360199,
0.08013280481100082,
-0.1382104456424713,
-0.11204821616411209,
-0.35315635800361633,
-0.02014266699552536,
0.15451262891292572,
-0.18205887079238892,
0.24211949110031128,
-0.10973886400461197,
-0.2370232492685318,
-0.1584792286157608,
-0.10762640833854675,
0.07084242254495621,
-0.34657022356987,
-0.08828997611999512,
0.08949049562215805,
0.00011614430695772171,
0.038606345653533936,
-0.5290322303771973,
0.5812383890151978,
-0.5776835680007935,
-0.18260690569877625,
-0.6203722357749939,
0.08450095355510712,
-0.17020803689956665,
0.08779590576887131,
-0.18406446278095245,
-0.12952131032943726,
0.18185105919837952,
-0.10497444868087769,
-0.5808476209640503,
-0.13463334739208221,
0.5428445339202881,
-0.030667390674352646,
0.08365048468112946,
-0.2946265637874603,
0.3548576235771179,
0.38731813430786133,
0.42746472358703613,
-0.8813395500183105,
0.1717739999294281,
-0.003566102124750614,
0.15498748421669006,
-0.046242885291576385,
-0.2020796686410904,
-0.07189096510410309,
-0.18643410503864288,
-0.029670000076293945,
-0.453440397977829,
-0.004894562065601349,
0.07740693539381027,
0.2437818944454193,
-0.28525376319885254
] |
https://github.com/huggingface/datasets/issues/4775 | Streaming not supported in Theivaprakasham/wildreceipt | Thanks for reporting @NitishkKarra.
The root source of the issue is that streaming mode is not supported out-of-the-box for that dataset, because it contains a TAR file.
We have opened a discussion in the corresponding Hub dataset page, pointing out this issue: https://huggingface.co/datasets/Theivaprakasham/wildreceipt/discussions/1
I'm closing this issue here, so this discussion is transferred there instead. | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 55 | Streaming not supported in Theivaprakasham/wildreceipt
### Link
_No response_
### Description
_No response_
### Owner
_No response_
Thanks for reporting @NitishkKarra.
The root source of the issue is that streaming mode is not supported out-of-the-box for that dataset, because it contains a TAR file.
We have opened a discussion in the corresponding Hub dataset page, pointing out this issue: https://huggingface.co/datasets/Theivaprakasham/wildreceipt/discussions/1
I'm closing this issue here, so this discussion is transferred there instead. | [
-0.727268636226654,
-0.49570825695991516,
-0.02410900592803955,
-0.04121273010969162,
0.005545085296034813,
0.001970142126083374,
-0.25505200028419495,
0.38084176182746887,
0.023801878094673157,
0.10956598818302155,
-0.07464773952960968,
0.3970089852809906,
-0.016623690724372864,
0.2204316407442093,
-0.04298277944326401,
-0.1997305154800415,
-0.008666597306728363,
0.10129185020923615,
0.1364544779062271,
0.009899936616420746,
0.14439354836940765,
0.04995911195874214,
-0.14845043420791626,
-0.10803478956222534,
-0.26508596539497375,
0.1439693570137024,
0.14214029908180237,
0.23443377017974854,
-0.2030390501022339,
-0.14580410718917847,
0.13299329578876495,
0.15963494777679443,
0.2764751613140106,
0.24549520015716553,
-0.00009689897706266493,
0.12242323160171509,
0.45300954580307007,
-0.10223976522684097,
0.015113040804862976,
0.01889651268720627,
-0.3000030815601349,
0.42475125193595886,
0.10236428678035736,
0.15697389841079712,
-0.2851633131504059,
-0.01047950517386198,
0.21481508016586304,
0.06869600713253021,
0.17249707877635956,
0.1590803861618042,
0.31781089305877686,
0.3128938674926758,
0.09832152724266052,
-0.25685182213783264,
0.25093212723731995,
-0.04095916450023651,
-0.18363620340824127,
0.10554084181785583,
0.3180275559425354,
0.23611250519752502,
-0.09560365229845047,
0.24612702429294586,
0.058377087116241455,
0.11537078022956848,
0.03795495629310608,
-0.15850703418254852,
-0.4823475480079651,
-0.15068118274211884,
0.05724004656076431,
0.2978702187538147,
0.40152186155319214,
0.007084406912326813,
-0.14369691908359528,
0.18969154357910156,
-0.14041386544704437,
-0.447493314743042,
0.16005834937095642,
0.2349444180727005,
0.03572782501578331,
0.3117716908454895,
0.11962119489908218,
-0.1375817209482193,
-0.2866252064704895,
-0.13439808785915375,
0.00008147582411766052,
0.22877167165279388,
0.03875172883272171,
-0.007525786757469177,
-0.02558107301592827,
0.0017285160720348358,
0.25502169132232666,
0.02395414561033249,
-0.2911096215248108,
-0.19683054089546204,
-0.295922189950943,
-0.12427107244729996,
-0.1372475028038025,
0.35969308018684387,
0.09343022853136063,
0.3778655529022217,
0.27811917662620544,
0.4209057688713074,
-0.1723402887582779,
0.13397058844566345,
0.09464362263679504,
0.0470939502120018,
-0.08024885505437851,
-0.06779694557189941,
0.5159633159637451,
0.2398611456155777,
-0.017732946202158928,
-0.29156145453453064,
0.07398685067892075,
-0.0592324361205101,
-0.39072269201278687,
-0.0761556550860405,
0.20999367535114288,
-0.3158246576786041,
-0.3176887035369873,
-0.1553345024585724,
0.22459053993225098,
0.0864284560084343,
0.02108415588736534,
0.14153409004211426,
-0.021650034934282303,
0.0628853589296341,
-0.11064649373292923,
0.13512098789215088,
-0.09511760622262955,
-0.37635862827301025,
-0.37878572940826416,
-0.005793165415525436,
0.013899143785238266,
-0.05680301785469055,
0.11104980111122131,
-0.27539390325546265,
0.2189018279314041,
-0.06223289296030998,
0.21845725178718567,
0.09451083838939667,
-0.03009825199842453,
-0.10182882845401764,
-0.0579291507601738,
0.2803645730018616,
0.12591536343097687,
-0.045978449285030365,
0.13047604262828827,
0.20101715624332428,
0.09854397922754288,
-0.11341399699449539,
-0.12122192233800888,
-0.32161858677864075,
0.07763654738664627,
0.30024129152297974,
-0.1983388215303421,
-0.023489996790885925,
-0.2766081690788269,
0.0580989271402359,
-0.1269989311695099,
-0.265043705701828,
-0.2510609030723572,
0.06115645915269852,
-0.03233858942985535,
0.014131260104477406,
0.015665704384446144,
0.14743438363075256,
-0.2215292751789093,
0.09772874414920807,
0.033531785011291504,
0.0009110383689403534,
0.27874407172203064,
0.1464664340019226,
-0.1796245574951172,
0.04034067690372467,
-0.10672066360712051,
0.3380998969078064,
0.28777897357940674,
-0.36600351333618164,
-0.3437585234642029,
0.15981359779834747,
-0.21520981192588806,
-0.03427944704890251,
0.1621772050857544,
-0.022148367017507553,
0.48465248942375183,
-0.05627086013555527,
0.26106780767440796,
0.24668125808238983,
0.15034741163253784,
0.026038790121674538,
-0.3170355260372162,
-0.1793164163827896,
-0.39141303300857544,
0.2260560244321823,
-0.04240347072482109,
-0.022809773683547974,
0.13004466891288757,
0.13082493841648102,
0.30739402770996094,
0.10999494791030884,
0.31282103061676025,
0.07808922231197357,
0.346451073884964,
0.030772224068641663,
-0.11064399778842926,
-0.21932771801948547,
0.12677091360092163,
0.11476508527994156,
-0.11750247329473495,
0.1581304967403412,
0.06997664272785187,
-0.11577282845973969,
-0.2379031777381897,
-0.1502627730369568,
-0.23038847744464874,
-0.05969038978219032,
0.36047399044036865,
0.08746717125177383,
-0.1771942526102066,
0.06907288730144501,
-0.3102879524230957,
0.26872944831848145,
-0.06511948257684708,
-0.000668482156470418,
-0.31358763575553894,
0.4037266969680786,
-0.10848886519670486,
-0.2449546754360199,
0.2627885043621063,
-0.2784363627433777,
0.1361549347639084,
0.067630834877491,
-0.04909283667802811,
0.31544554233551025,
-0.21064680814743042,
0.4943119287490845,
0.4333798885345459,
0.128988116979599,
0.28937655687332153,
-0.7116875052452087,
0.11107196658849716,
0.3318972587585449,
0.2368782013654709,
0.10427644103765488,
-0.2522169053554535,
0.03969397395849228,
0.052592597901821136,
-0.0385272279381752,
0.08785215020179749,
0.07932505756616592,
0.35809338092803955,
-0.04920308291912079,
-0.03560098260641098,
0.010181441903114319,
0.13098973035812378,
0.072670578956604,
-0.19257213175296783,
-0.35234305262565613,
-0.08364935219287872,
0.21756818890571594,
0.15596553683280945,
0.15243034064769745,
-0.05275346338748932,
0.19200298190116882,
-0.29353442788124084,
-0.23296532034873962,
0.2083718627691269,
0.06325751543045044,
0.33779799938201904,
0.23888827860355377,
0.41629064083099365,
0.04044749215245247,
-0.08196306973695755,
-0.2859565317630768,
0.1231197640299797,
0.002204686403274536,
-0.15816865861415863,
0.2360704243183136,
0.11282843351364136,
-0.22935333847999573,
-0.6438450813293457,
-0.23563729226589203,
0.1505863219499588,
0.14758330583572388,
0.0675743818283081,
-0.12301179021596909,
-0.25213494896888733,
0.06462825834751129,
0.25780370831489563,
-0.13695649802684784,
-0.020914718508720398,
-0.47464457154273987,
0.21714147925376892,
0.591301441192627,
-0.07234489172697067,
0.1415831297636032,
0.15224480628967285,
0.0845668613910675,
0.13616490364074707,
0.1330314576625824,
-0.39801591634750366,
-0.1461162269115448,
-0.10370417684316635,
0.27651286125183105,
0.06653978675603867,
0.01902930811047554,
0.2779562175273895,
-0.182979553937912,
0.05208665877580643,
-0.355344295501709,
-0.033235788345336914,
0.1708979457616806,
-0.0963432788848877,
0.12826906144618988,
-0.06211090087890625,
0.4455721974372864,
0.2407139092683792,
0.02842496708035469,
0.1014351174235344,
-0.36489439010620117,
0.049957238137722015,
-0.09425729513168335,
-0.06498712301254272,
-0.06298629194498062,
-0.1530178189277649,
-0.14455223083496094,
-0.039091646671295166,
-0.5477149486541748,
0.10012513399124146,
-0.016923805698752403,
-0.14891394972801208,
-0.1413429230451584,
0.0586387999355793,
-0.061767008155584335,
-0.0715678483247757,
-0.11138316243886948,
-0.383099764585495,
-0.3730628788471222,
0.2576599717140198,
-0.3363170921802521,
-0.4756053388118744,
0.3677762746810913,
0.3821982145309448,
0.12387122213840485,
0.047397371381521225,
-0.25001150369644165,
-0.09559287130832672,
-0.2496977597475052,
0.029165472835302353,
0.010331910103559494,
0.09009044617414474,
0.3742372691631317,
-0.18265938758850098,
-0.27141255140304565,
-0.1694573312997818,
-0.011759458109736443,
-0.03161796182394028,
0.2512180209159851,
-0.011668801307678223,
0.04049588739871979,
0.06839843094348907,
0.053516145795583725,
0.23489823937416077,
0.33949214220046997,
0.16308274865150452,
0.5348516702651978,
-0.03241796791553497,
0.23385746777057648,
-0.2393256425857544,
0.23226475715637207,
0.07576192170381546,
-0.08737166225910187,
-0.11538376659154892,
0.40841400623321533,
0.20364931225776672,
-0.20460209250450134,
-0.3751380145549774,
-0.08657669275999069,
0.05612335354089737,
-0.18485473096370697,
-0.22587096691131592,
0.16448307037353516,
0.009904615581035614,
0.13798952102661133,
-0.013640955090522766,
-0.0024770423769950867,
-0.2683106064796448,
0.19317816197872162,
0.3398835062980652,
0.19646599888801575,
0.022364454343914986,
-0.3941161036491394,
0.006889821030199528,
-0.4043803811073303,
0.14754171669483185,
-0.14680418372154236,
0.24893736839294434,
-0.36131200194358826,
-0.13026246428489685,
0.2809840142726898,
-0.05515560507774353,
0.3090318441390991,
-0.34067487716674805,
0.19390805065631866,
-0.02931053936481476,
0.0024135708808898926,
-0.01765253022313118,
-0.10757409036159515,
-0.31652766466140747,
0.07451789081096649,
-0.23350240290164948,
0.2870636284351349,
-0.3333725035190582,
0.02455070987343788,
-0.1018388569355011,
-0.15774033963680267,
-0.08994631469249725,
0.04945774003863335,
-0.19461394846439362,
-0.15876328945159912,
-0.18473473191261292,
0.001388557255268097,
0.23426289856433868,
-0.034896060824394226,
-0.46370813250541687,
-0.051666855812072754,
-0.01812938041985035,
0.09211598336696625,
0.05046020448207855,
0.13896214962005615,
0.5176622271537781,
-0.06962108612060547,
0.06645239889621735,
0.1575334072113037,
-0.07271745800971985,
0.0686478540301323,
0.5988383293151855,
0.36627620458602905,
-0.15152250230312347,
0.16739246249198914,
-0.061121392995119095,
-0.05658490210771561,
0.41139963269233704,
0.019867952913045883,
0.06350202858448029,
0.03021591529250145,
0.12451934069395065,
-0.2884288430213928,
0.16229405999183655,
0.15276481211185455,
-0.1514468789100647,
0.02989109605550766,
-0.10641337186098099,
0.4242513179779053,
0.029711764305830002,
0.008117511868476868,
0.26366958022117615,
0.04716607183218002,
0.06470981240272522,
0.25108301639556885,
0.06574006378650665,
0.8950295448303223,
0.004369053989648819,
0.11573672294616699,
0.07012559473514557,
-0.33063673973083496,
-0.09034451842308044,
-0.33049607276916504,
0.1258927583694458,
-0.3278059959411621,
-0.3919198215007782,
-0.09913495182991028,
0.1339690089225769,
0.07792585343122482,
-0.2002035528421402,
-0.27955612540245056,
0.0640249252319336,
0.30591893196105957,
0.4800223112106323,
0.1036849394440651,
0.012481674551963806,
-0.38495177030563354,
-0.056170325726270676,
-0.13373522460460663,
0.29754838347435,
-0.05853965878486633,
0.10284137725830078,
-0.10134363919496536,
-0.2799004316329956,
0.08902527391910553,
-0.06943470984697342,
-0.3205341100692749,
0.14017632603645325,
0.20928767323493958,
-0.0731019601225853,
-0.4223310649394989,
-0.20145566761493683,
-0.26057490706443787,
0.2633538842201233,
0.10345565527677536,
-0.08983685076236725,
-0.5813503265380859,
0.3260633945465088,
0.03864823281764984,
-0.1462455540895462,
-0.13401533663272858,
0.18995261192321777,
0.00421719066798687,
-0.35311752557754517,
-0.10539231449365616,
0.2518925368785858,
-0.003241239581257105,
-0.18446815013885498,
-0.14003708958625793,
0.002492256462574005,
0.2079736441373825,
-0.15552657842636108,
-0.0922480970621109,
-0.030792199075222015,
-0.2686905264854431,
-0.29068949818611145,
0.2241201251745224,
-0.06977598369121552,
-0.25878506898880005,
-0.012733899056911469,
0.32201075553894043,
-0.13116437196731567,
-0.1345159411430359,
0.4894648492336273,
0.06379429996013641,
0.21682459115982056,
0.08764128386974335,
0.03624187782406807,
-0.30304890871047974,
-0.26312410831451416,
-0.08103284984827042,
0.0011854488402605057,
-0.5134808421134949,
0.07377249002456665,
0.028767075389623642,
-0.03871177136898041,
0.20527853071689606,
0.26654818654060364,
-0.12409134209156036,
-0.1381852626800537,
-0.2682926058769226,
-0.22545327246189117,
-0.15988986194133759,
0.10197872668504715,
-0.26761096715927124,
0.29825082421302795,
-0.20399987697601318,
0.011166691780090332,
0.08427358418703079,
-0.16929669678211212,
-0.4571928381919861,
0.09750252962112427,
-0.1444922685623169,
0.0709010511636734,
-0.5099568367004395,
-0.19894260168075562,
0.338863730430603,
0.12958763539791107,
0.19439947605133057,
0.17885839939117432,
-0.3766378164291382,
-0.3138613998889923,
0.0830407440662384,
0.079831063747406,
0.17869484424591064,
-0.1395181268453598,
-0.3822163939476013,
-0.1570468544960022,
-0.3342939615249634,
0.06372411549091339,
0.36807650327682495,
0.06593132764101028,
-0.06020855903625488,
-0.012705187313258648,
0.641559898853302,
0.04729994758963585,
-0.07064048200845718,
0.10850455611944199,
0.14442408084869385,
0.22242270410060883,
-0.3399680256843567,
-0.2735632359981537,
-0.20563997328281403,
-0.1858992725610733,
-0.013083860278129578,
0.07036697119474411,
0.23946593701839447,
0.25858157873153687,
0.47835037112236023,
-0.0991978645324707,
0.08428885042667389,
-0.16526493430137634,
0.44135433435440063,
0.2910167872905731,
0.03775015100836754,
-0.14079596102237701,
-0.00444589089602232,
0.3549470007419586,
-0.21082176268100739,
-0.23548272252082825,
-0.03738800808787346,
-0.02772809937596321,
0.16028207540512085,
-0.1904306709766388,
0.38360774517059326,
-0.15263837575912476,
-0.21235917508602142,
0.25524136424064636,
0.3001706004142761,
-0.1160767525434494,
-0.03772769495844841,
0.30663809180259705,
-0.0072517432272434235,
0.07707063853740692,
-0.15055441856384277,
-0.08338552713394165,
-0.0333961620926857,
0.3397616744041443,
-0.045988284051418304,
0.2983934283256531,
0.13034269213676453,
0.02548515796661377,
0.0063255056738853455,
-0.3305276930332184,
-0.23170559108257294,
-0.10865405201911926,
0.1986994743347168,
0.15768206119537354,
0.04674062877893448,
0.16212555766105652,
-0.21066074073314667,
0.10920212417840958,
-0.39499038457870483,
-0.026742558926343918,
0.06288737803697586,
-0.0674208328127861,
-0.06768174469470978,
-0.10876888781785965,
0.038726866245269775,
0.18376518785953522,
0.014227177947759628,
0.5703571438789368,
0.09513923525810242,
0.009062208235263824,
0.1284395009279251,
0.11583653837442398,
-0.2364884912967682,
0.05692075192928314,
0.22050738334655762,
-0.08380751311779022,
0.25295042991638184,
0.21731747686862946,
0.06566885858774185,
0.41781553626060486,
0.22435958683490753,
0.2348615974187851,
-0.07837625592947006,
-0.22546491026878357,
0.15026724338531494,
0.10551419854164124,
-0.19676965475082397,
0.03358792886137962,
0.2865298092365265,
0.2689085602760315,
0.14087899029254913,
0.25062766671180725,
0.27750688791275024,
-0.21115589141845703,
0.21335816383361816,
-0.3579094409942627,
0.2485426515340805,
0.1970166712999344,
0.1024257019162178,
0.07441453635692596,
-0.03784779831767082,
-0.0979655385017395,
-0.22879892587661743,
-0.3587115705013275,
0.024255726486444473,
0.005160284228622913,
-0.35119813680648804,
0.07574717700481415,
-0.19304578006267548,
0.1548617035150528,
-0.19810952246189117,
0.5098814964294434,
0.26447638869285583,
-0.3972012996673584,
0.021270811557769775,
-0.3291162848472595,
-0.28584176301956177,
0.3159909248352051,
-0.043263379484415054,
-0.10106179863214493,
-0.06151942163705826,
-0.09482864290475845,
0.13563238084316254,
0.16480752825737,
-0.0689639002084732,
-0.2565211355686188,
-0.01690163090825081,
0.22820945084095,
-0.3727864623069763,
-0.035244498401880264,
0.2621959149837494,
0.19198651611804962,
-0.0661715641617775,
-0.15628165006637573,
0.3513953387737274,
0.07693980634212494,
0.2565504312515259,
0.10571063309907913,
-0.11713206768035889,
-0.0781184658408165,
-0.26644399762153625,
0.3771774470806122,
0.07234565913677216,
0.11668876558542252,
-0.2293601930141449,
-0.10213952511548996,
-0.31400591135025024,
-0.15676245093345642,
-0.18984635174274445,
-0.1947886347770691,
-0.10121840238571167,
0.4307660758495331,
0.12936152517795563,
-0.058483611792325974,
-0.038287583738565445,
0.20880596339702606,
-0.06675121933221817,
0.08641543239355087,
-0.2642327547073364,
-0.04209836944937706,
-0.2616601288318634,
0.16868816316127777,
0.08976703882217407,
0.27816078066825867,
0.019778400659561157,
-0.25129133462905884,
-0.17999222874641418,
-0.604975163936615,
0.7423989176750183,
-0.20027029514312744,
-0.35676810145378113,
-0.00044340360909700394,
-0.05528905987739563,
0.34234368801116943,
-0.04593546688556671,
-0.20760799944400787,
0.18642973899841309,
-0.010336914099752903,
-0.15641584992408752,
-0.017707334831357002,
0.3145325183868408,
0.04842844605445862,
0.019403714686632156,
-0.038203902542591095,
0.38322222232818604,
0.2050609588623047,
-0.1338903307914734,
-0.003932449966669083,
-0.05748007446527481
] |
https://github.com/huggingface/datasets/issues/4772 | AssertionError when using label_cols in to_tf_dataset | Hi @lehrig, this is caused by the data collator renaming "label" to "labels". If you set `label_cols=["labels"]` in the call it will work correctly. However, I agree that the cause of the bug is not obvious, so I'll see if I can make a PR to clarify things when the collator renames columns. | ## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
| 53 | AssertionError when using label_cols in to_tf_dataset
## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
Hi @lehrig, this is caused by the data collator renaming "label" to "labels". If you set `label_cols=["labels"]` in the call it will work correctly. However, I agree that the cause of the bug is not obvious, so I'll see if I can make a PR to clarify things when the collator renames columns. | [
0.09022931754589081,
0.05867615342140198,
0.07491619884967804,
0.2682400643825531,
0.3147228956222534,
0.22435206174850464,
0.7236326932907104,
0.27399417757987976,
-0.16925710439682007,
0.21495488286018372,
-0.006875986233353615,
0.4143609404563904,
-0.1195538118481636,
-0.0682562068104744,
-0.041292704641819,
-0.043455325067043304,
-0.021154388785362244,
0.08883010596036911,
0.21856345236301422,
-0.023624639958143234,
-0.29255181550979614,
0.19678212702274323,
-0.37943142652511597,
0.28448450565338135,
-0.5004829168319702,
-0.2727912962436676,
0.11408613622188568,
-0.18644550442695618,
0.05208277702331543,
-0.45782434940338135,
0.28797996044158936,
-0.08940854668617249,
-0.044000670313835144,
0.6746620535850525,
-0.00011245015048189089,
-0.02016512304544449,
0.20080609619617462,
0.04262905567884445,
-0.20052766799926758,
-0.0009446591138839722,
-0.2024991512298584,
0.13268108665943146,
-0.03330919146537781,
-0.2327302098274231,
0.08402742445468903,
-0.3205590546131134,
-0.31205034255981445,
-0.02342243865132332,
-0.11636658012866974,
0.35959067940711975,
0.17573893070220947,
0.3342546820640564,
0.21133001148700714,
-0.1485815942287445,
0.23632913827896118,
-0.3978767395019531,
-0.03906036540865898,
0.3070058226585388,
-0.1778683066368103,
-0.08557813614606857,
0.020876169204711914,
0.389386385679245,
0.05994069576263428,
0.03678087145090103,
0.001988448202610016,
0.0195479616522789,
-0.15528655052185059,
-0.23139458894729614,
-0.03191611170768738,
0.3924042880535126,
0.5526749491691589,
-0.39903199672698975,
-0.44575196504592896,
-0.002298392355442047,
-0.18460285663604736,
-0.2633150815963745,
0.1519203931093216,
0.01923230290412903,
0.03025675192475319,
0.07268474251031876,
0.1476956307888031,
-0.014474061317741871,
-0.013338625431060791,
-0.005129523575305939,
-0.46823784708976746,
0.5907957553863525,
-0.2047433704137802,
0.24518632888793945,
0.133258655667305,
-0.12821534276008606,
0.21737229824066162,
-0.04186210781335831,
-0.0696834921836853,
0.21346959471702576,
-0.7419047951698303,
-0.1532672941684723,
-0.04568345844745636,
-0.295154333114624,
0.04283858835697174,
0.04949801042675972,
-0.1407373696565628,
-0.3070431351661682,
0.004792502149939537,
0.13871806859970093,
0.01977897807955742,
0.4125998318195343,
0.16332915425300598,
0.42280933260917664,
0.16423405706882477,
0.0016110410215333104,
-0.0338863842189312,
-0.21048647165298462,
-0.04075842350721359,
-0.36644527316093445,
0.34808728098869324,
0.014046411961317062,
0.4073066711425781,
-0.14258667826652527,
-0.2822669446468353,
0.17608721554279327,
-0.4060378074645996,
-0.048994146287441254,
0.009758012369275093,
0.07264461368322372,
0.08525475114583969,
0.27693602442741394,
0.136495441198349,
0.18502993881702423,
0.18597355484962463,
-0.09852451086044312,
-0.3458985686302185,
0.07484212517738342,
-0.09196188300848007,
0.015221421606838703,
0.04431386664509773,
0.059103768318891525,
0.035883694887161255,
-0.09050744771957397,
0.06432339549064636,
-0.10253660380840302,
-0.14486323297023773,
-0.15388040244579315,
0.18270912766456604,
0.1095510870218277,
-0.27870306372642517,
0.3900163173675537,
0.23503710329532623,
-0.26653310656547546,
-0.06066816300153732,
0.0042211636900901794,
-0.34951430559158325,
-0.3555987477302551,
-0.11464941501617432,
0.15054230391979218,
0.02402263507246971,
-0.12405572831630707,
-0.16808167099952698,
-0.12665873765945435,
0.3109641373157501,
0.11438269913196564,
0.3223308324813843,
0.011432064697146416,
0.03249240294098854,
-0.13169945776462555,
0.18503911793231964,
-0.05387282371520996,
-0.5436693429946899,
0.012725971639156342,
0.15217192471027374,
-0.015051133930683136,
0.0024317726492881775,
0.3196479082107544,
0.025627633556723595,
0.24550512433052063,
-0.14688289165496826,
0.06526298820972443,
0.08783546090126038,
-0.6041815876960754,
-0.30320191383361816,
0.047810789197683334,
-0.04728817939758301,
0.034325942397117615,
-0.05355874449014664,
-0.19085121154785156,
0.01857064664363861,
-0.15856751799583435,
0.45127496123313904,
0.08883897215127945,
0.03059612214565277,
-0.03908824548125267,
-0.23969927430152893,
0.1347145289182663,
0.11613244563341141,
-0.12917815148830414,
-0.17114922404289246,
0.11750364303588867,
-0.08304306119680405,
-0.22242166101932526,
0.06321458518505096,
-0.1664637327194214,
0.0635489672422409,
0.16476687788963318,
0.4695757329463959,
-0.3260616064071655,
0.0635313168168068,
0.060213252902030945,
-0.4673101305961609,
0.3277457654476166,
0.30935171246528625,
0.22566917538642883,
-0.12072992324829102,
-0.2899166941642761,
-0.1768912672996521,
0.21029570698738098,
0.1184045672416687,
-0.22121131420135498,
0.04754959046840668,
-0.047381237149238586,
0.09357252717018127,
0.12384769320487976,
-0.07689628005027771,
-0.12311909347772598,
-0.24510541558265686,
0.26200440526008606,
0.14428797364234924,
0.22208687663078308,
0.16493186354637146,
0.009439516812562943,
-0.21692994236946106,
0.2507181167602539,
0.03935353085398674,
-0.126699298620224,
-0.2694723904132843,
0.585557758808136,
0.034901730716228485,
0.005772709846496582,
-0.19693690538406372,
-0.09475712478160858,
-0.015724489465355873,
-0.3379288613796234,
-0.362614244222641,
-0.2807193994522095,
0.04727843776345253,
0.028407327830791473,
0.19216260313987732,
0.15969473123550415,
-0.11124388873577118,
0.3981970548629761,
-0.0006309188902378082,
0.1923995018005371,
0.10625316202640533,
0.030824463814496994,
-0.15716135501861572,
-0.09693627804517746,
-0.0972537249326706,
-0.2448006123304367,
0.0991009771823883,
0.06193384528160095,
-0.30690452456474304,
0.04699540510773659,
0.43263521790504456,
0.15152640640735626,
-0.05933218449354172,
0.08755746483802795,
-0.3922606408596039,
0.25056755542755127,
0.2642434537410736,
0.35324862599372864,
0.2926263213157654,
0.1729186326265335,
-0.1629991978406906,
-0.08115405589342117,
-0.1117451936006546,
0.011000344529747963,
0.186903178691864,
0.2740691900253296,
0.1774493157863617,
0.11554612219333649,
0.10696789622306824,
0.16356278955936432,
-0.035388972610235214,
-0.2657506763935089,
-0.03257650509476662,
0.26197609305381775,
-0.4956939220428467,
0.07329588383436203,
-0.28146424889564514,
-0.1889926791191101,
-0.22713974118232727,
-0.4292839467525482,
-0.21217572689056396,
-0.4583742022514343,
-0.13371998071670532,
0.019417475908994675,
-0.09619809687137604,
0.3796689808368683,
-0.1344596892595291,
0.21951211988925934,
0.16786102950572968,
-0.1729346662759781,
-0.077887624502182,
-0.30735456943511963,
-0.07956357300281525,
0.04749307408928871,
-0.057181548327207565,
-0.22174304723739624,
0.16517899930477142,
0.01749110408127308,
0.14789608120918274,
-0.060419194400310516,
-0.4430449903011322,
0.18567059934139252,
-0.38065195083618164,
0.08754231780767441,
0.13135597109794617,
0.13547317683696747,
0.03878994286060333,
-0.3614649474620819,
0.10394114255905151,
-0.06781940907239914,
-0.17928177118301392,
0.2103143185377121,
0.15470020473003387,
-0.24058935046195984,
-0.133276104927063,
-0.23085907101631165,
-0.09718827158212662,
-0.2867369055747986,
0.35732775926589966,
0.09250062704086304,
-0.11397378146648407,
0.30342820286750793,
-0.05027121677994728,
0.2289433628320694,
0.051940158009529114,
0.08548843115568161,
-0.1982233226299286,
-0.06614750623703003,
0.12518753111362457,
-0.013610458001494408,
-0.08738620579242706,
-0.10609006136655807,
-0.28804469108581543,
0.3081884980201721,
-0.0780581384897232,
-0.3542402386665344,
-0.26982077956199646,
-0.39282697439193726,
0.1713467538356781,
0.015383411198854446,
0.07270669937133789,
0.037534814327955246,
0.11612197756767273,
0.002369305118918419,
-0.20515316724777222,
-0.17408514022827148,
0.3065953254699707,
-0.0001344718039035797,
0.028431057929992676,
-0.004012923687696457,
0.21192756295204163,
0.20884205400943756,
0.360973060131073,
0.025615155696868896,
-0.3724091649055481,
0.15351876616477966,
-0.24280625581741333,
0.2481563687324524,
-0.031134866178035736,
-0.3412208557128906,
0.10846814513206482,
-0.00519619882106781,
0.16587844491004944,
-0.0065704211592674255,
-0.40526145696640015,
0.1974537968635559,
0.07196027785539627,
0.3667656183242798,
0.008747119456529617,
-0.3263438940048218,
-0.15873613953590393,
-0.22343245148658752,
0.23560553789138794,
0.1919245719909668,
-0.11304953694343567,
-0.1726481020450592,
-0.0946083515882492,
0.07479669153690338,
-0.09191073477268219,
0.027686558663845062,
-0.10876620560884476,
-0.3567306697368622,
-0.15696518123149872,
-0.445415735244751,
0.39938998222351074,
0.2994208037853241,
0.6240503787994385,
0.1818801909685135,
-0.08688563108444214,
-0.060332342982292175,
0.25097090005874634,
0.6908951997756958,
-0.2110525369644165,
-0.2606525421142578,
0.26425668597221375,
0.30916303396224976,
-0.465008407831192,
-0.20472881197929382,
-0.3485426604747772,
-0.03054775297641754,
-0.04214012995362282,
0.8319365978240967,
-0.24033093452453613,
-0.07880322635173798,
0.3718939423561096,
-0.013885482214391232,
0.043819572776556015,
-0.08236397802829742,
-0.17036601901054382,
-0.01983795501291752,
-0.25673210620880127,
0.2195431888103485,
0.3720318675041199,
0.32924169301986694,
-0.12432322651147842,
0.011989038437604904,
-0.03451114147901535,
-0.16760489344596863,
-0.01391959935426712,
0.21541708707809448,
0.28683969378471375,
-0.14483240246772766,
0.22354629635810852,
-0.16731230914592743,
0.029208311811089516,
0.42972156405448914,
0.4803965389728546,
-0.23935887217521667,
-0.6404180526733398,
-0.08866377174854279,
0.042263951152563095,
0.5173929333686829,
0.10994245111942291,
-0.2840004861354828,
0.2839801609516144,
-0.47508272528648376,
0.16418537497520447,
-0.13710111379623413,
0.15742339193820953,
0.357022762298584,
0.19685590267181396,
-0.34322911500930786,
0.12555870413780212,
0.3334662914276123,
0.2556041181087494,
0.009899817407131195,
0.3234756886959076,
0.6430525779724121,
-0.38491153717041016,
0.2667483687400818,
0.016306333243846893,
0.8847955465316772,
0.06302212923765182,
0.016026075929403305,
0.31380370259284973,
-0.07479868829250336,
0.748893678188324,
0.08931204676628113,
0.030526667833328247,
-0.37860143184661865,
-0.5704063177108765,
0.006818389520049095,
-0.17113950848579407,
-0.0683383122086525,
0.12112750858068466,
-0.35312655568122864,
0.22116465866565704,
-0.22504059970378876,
0.014388538897037506,
0.11451974511146545,
0.006510745733976364,
0.20623864233493805,
-0.3438883423805237,
-0.021539602428674698,
0.07919513434171677,
0.04461001977324486,
0.12623803317546844,
-0.08756783604621887,
0.06454939395189285,
-0.30606797337532043,
-0.3547140955924988,
-0.14416253566741943,
0.10512519627809525,
-0.24257470667362213,
-0.01698906347155571,
0.5005146265029907,
0.07349646091461182,
0.1450677514076233,
-0.04323321208357811,
0.6183183789253235,
0.20748326182365417,
0.013156678527593613,
0.14957258105278015,
0.16591918468475342,
0.22084946930408478,
0.29669293761253357,
0.04511053487658501,
0.46144863963127136,
0.22354015707969666,
-0.2647802531719208,
-0.0015504881739616394,
-0.18871934711933136,
-0.15844815969467163,
0.09093427658081055,
-0.0882178544998169,
-0.07716833055019379,
-0.27656838297843933,
-0.145884171128273,
0.11448168754577637,
-0.14000064134597778,
-0.18569593131542206,
0.1299341917037964,
-0.23341034352779388,
-0.23111161589622498,
0.19069519639015198,
-0.023628536611795425,
-0.4469708800315857,
0.1366521269083023,
0.33196011185646057,
-0.24323594570159912,
0.4785405099391937,
0.43564194440841675,
-0.01402050256729126,
-0.11373533308506012,
-0.050197795033454895,
-0.15308892726898193,
0.31832095980644226,
-0.8611646294593811,
0.24835610389709473,
-0.1865522414445877,
0.07445350289344788,
-0.15543010830879211,
0.2964708209037781,
0.22011052072048187,
0.19650304317474365,
-0.052123963832855225,
-0.19556941092014313,
-0.1131882518529892,
0.3666660189628601,
-0.19330407679080963,
0.19749334454536438,
-0.00039853155612945557,
0.6102982759475708,
-0.3572683334350586,
0.2487058788537979,
-0.2904551029205322,
0.04910385608673096,
-0.3246792256832123,
0.18886493146419525,
0.21632803976535797,
-0.07242286950349808,
0.19704419374465942,
-0.10953320562839508,
0.15051047503948212,
0.43087631464004517,
0.20655673742294312,
-0.23664721846580505,
-0.28530430793762207,
0.11418835073709488,
0.3856402039527893,
-0.13313525915145874,
0.1327754408121109,
0.024180546402931213,
-0.05574657395482063,
-0.2084016352891922,
0.10292398929595947,
0.047248877584934235,
-0.07736581563949585,
0.2981468439102173,
-0.2544855773448944,
0.24195706844329834,
-0.17846807837486267,
0.2021629959344864,
0.029691528528928757,
-0.09858646988868713,
0.031765859574079514,
0.29827237129211426,
-0.2867256700992584,
-0.011760696768760681,
-0.3109566271305084,
0.06767881661653519,
-0.18743662536144257,
-0.032320670783519745,
-0.0538938045501709,
-0.31013959646224976,
-0.13441140949726105,
-0.13838285207748413,
0.3519259989261627,
0.07006391882896423,
-0.23741158843040466,
-0.2476266622543335,
0.32899734377861023,
0.20108582079410553,
-0.22255165874958038,
0.029671359807252884,
0.07211539894342422,
-0.017236020416021347,
0.16838623583316803,
0.3176519572734833,
0.08378414809703827,
0.02675069123506546,
-0.10017438232898712,
-0.11645393073558807,
0.17629371583461761,
-0.0473833903670311,
0.009770894423127174,
0.3890201449394226,
-0.2534341812133789,
0.3296678364276886,
0.5886697769165039,
0.03808359429240227,
0.39291587471961975,
-0.03637954592704773,
0.02973545715212822,
-0.18380357325077057,
0.16802722215652466,
-0.12867037951946259,
0.21190020442008972,
-0.21894066035747528,
0.18561601638793945,
-0.17587319016456604,
0.05952182039618492,
0.04269355162978172,
-0.047747403383255005,
0.46642112731933594,
-0.2869761288166046,
-0.21676179766654968,
-0.07573629915714264,
0.1591629981994629,
-0.2405966818332672,
-0.11625269055366516,
-0.05368863046169281,
0.050043635070323944,
-0.08303064107894897,
-0.3320245146751404,
-0.08623142540454865,
-0.34883832931518555,
0.039711348712444305,
-0.09398765861988068,
-0.06027819216251373,
-0.44928106665611267,
-0.43400150537490845,
0.25990062952041626,
0.33519795536994934,
-0.09459345042705536,
0.31565067172050476,
-0.032513633370399475,
-0.09095953404903412,
0.15070012211799622,
0.35161373019218445,
0.36206090450286865,
0.13483485579490662,
0.15658597648143768,
-0.04441366344690323,
-0.14984960854053497,
-0.02883135713636875,
0.31128019094467163,
0.09741310030221939,
-0.057625219225883484,
-0.242900088429451,
0.4015073776245117,
0.1240948736667633,
-0.18840350210666656,
-0.04396471008658409,
-0.03771748021245003,
0.3585481643676758,
-0.32383546233177185,
0.2538686990737915,
-0.042076475918293,
-0.24440738558769226,
-0.19687388837337494,
0.20218077301979065,
-0.13262593746185303,
0.10840266942977905,
0.2522534430027008,
-0.19291092455387115,
0.20774832367897034,
-0.03885878250002861,
0.0953792929649353,
-0.10979461669921875,
0.28167518973350525,
0.4694369435310364,
-0.016627073287963867,
-0.12626564502716064,
0.07295750081539154,
-0.4482857882976532,
0.21541760861873627,
0.1002560555934906,
-0.2501913607120514,
0.04323861375451088,
0.034024678170681,
0.0764743983745575,
0.1035575270652771,
0.28936976194381714,
-0.11503559350967407,
0.01982860267162323,
0.04577604681253433,
-0.37094438076019287,
-0.07113678753376007,
-0.09503094851970673,
-0.18717175722122192,
0.0996549129486084,
-0.22777053713798523,
0.06715857982635498,
0.09727984666824341,
-0.021802686154842377,
0.0279395654797554,
0.03229009360074997,
0.14899460971355438,
-0.027793914079666138,
0.3853861093521118,
0.13014981150627136,
0.4099210202693939,
0.07117676734924316,
0.2245837301015854,
-0.0751398354768753,
-0.3554892838001251,
-0.35157328844070435,
0.0710606798529625,
-0.0897335410118103,
0.19943590462207794,
0.11764257401227951,
-0.16652871668338776,
-0.12991857528686523,
0.2900930345058441,
0.2009855955839157,
0.10489372164011002,
-0.2254267930984497,
0.4353663921356201,
-0.26046890020370483,
-0.06409068405628204,
0.35226351022720337,
0.14398975670337677,
0.08522004634141922,
0.3917129635810852,
-0.12820470333099365,
-0.7384459376335144,
0.6628276109695435,
-0.35283079743385315,
-0.15703542530536652,
0.26046022772789,
0.22215871512889862,
0.28246885538101196,
-0.4160803258419037,
-0.41752395033836365,
-0.12689673900604248,
0.4336938261985779,
-0.1942257583141327,
-0.4001277983188629,
0.13571707904338837,
-0.14951179921627045,
0.40116703510284424,
-0.0029637813568115234,
0.17720654606819153,
-0.06625742465257645,
-0.04401490464806557,
0.0989992618560791,
-0.03974742442369461
] |
https://github.com/huggingface/datasets/issues/4772 | AssertionError when using label_cols in to_tf_dataset | Thanks - and wow, that appears like a strange side-effect of the data collator. Is that really needed?
Why not make it more explicit? For example, extend `DefaultDataCollator` with an optional property `label_col_name` to be used as label column; only when it is not provided default to `labels` (and document that this happens) for backwards-compatibility? | ## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
| 55 | AssertionError when using label_cols in to_tf_dataset
## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
Thanks - and wow, that appears like a strange side-effect of the data collator. Is that really needed?
Why not make it more explicit? For example, extend `DefaultDataCollator` with an optional property `label_col_name` to be used as label column; only when it is not provided default to `labels` (and document that this happens) for backwards-compatibility? | [
0.08114537596702576,
0.1701888144016266,
0.09567870199680328,
0.22990332543849945,
0.2721518874168396,
0.1384037733078003,
0.7091570496559143,
0.15918731689453125,
-0.23340512812137604,
0.29326513409614563,
0.11378087103366852,
0.36120152473449707,
-0.1787453591823578,
-0.11207465082406998,
-0.1080075278878212,
0.009772870689630508,
-0.015140920877456665,
0.13645830750465393,
0.2405932992696762,
-0.01882098615169525,
-0.25526878237724304,
0.1781596541404724,
-0.3462940454483032,
0.18562790751457214,
-0.46573197841644287,
-0.22778981924057007,
0.14945092797279358,
-0.22182899713516235,
0.008491503074765205,
-0.4394690990447998,
0.3762022852897644,
0.013439057394862175,
0.016431525349617004,
0.6520146131515503,
-0.00011676377471303567,
-0.014003288000822067,
0.20368392765522003,
-0.0005041398108005524,
-0.2574538588523865,
0.08829356729984283,
-0.1927194595336914,
0.0019645914435386658,
0.002016846090555191,
-0.2209954559803009,
0.10978182405233383,
-0.2722298502922058,
-0.3230634927749634,
-0.04743567481637001,
-0.16631858050823212,
0.2758076786994934,
0.12101900577545166,
0.33657437562942505,
0.16870643198490143,
-0.08459731191396713,
0.31470897793769836,
-0.39006394147872925,
-0.052510250359773636,
0.4001246690750122,
-0.15043824911117554,
-0.06599561125040054,
-0.04891090840101242,
0.39114952087402344,
0.09469402581453323,
0.005492633208632469,
-0.006188035011291504,
0.02669733390212059,
-0.12018343061208725,
-0.2299313247203827,
-0.05226308852434158,
0.4814486801624298,
0.5590343475341797,
-0.3425995409488678,
-0.42498260736465454,
-0.033399082720279694,
-0.2754718065261841,
-0.19970737397670746,
0.16974173486232758,
0.01935991272330284,
0.07892514765262604,
0.06379344314336777,
0.15163442492485046,
0.003696231869980693,
-0.029304139316082,
0.054114580154418945,
-0.5666854381561279,
0.6120345592498779,
-0.24043750762939453,
0.2436378002166748,
0.15986330807209015,
-0.051324374973773956,
0.27030831575393677,
-0.07913589477539062,
-0.04804426059126854,
0.22455406188964844,
-0.7368407845497131,
-0.20686718821525574,
-0.030984506011009216,
-0.25440090894699097,
0.03781958669424057,
0.11329220980405807,
-0.13009807467460632,
-0.34524473547935486,
-0.010270551778376102,
0.11074110865592957,
0.06351622939109802,
0.32881373167037964,
0.1714152991771698,
0.36893028020858765,
0.1780673861503601,
0.027328308671712875,
-0.014970716089010239,
-0.18924742937088013,
0.04683005437254906,
-0.382117360830307,
0.3855383098125458,
0.02592846192419529,
0.4762014150619507,
-0.18106546998023987,
-0.28139054775238037,
0.22766456007957458,
-0.494665265083313,
-0.05407364293932915,
-0.03578300401568413,
-0.009799160063266754,
0.06534609198570251,
0.36266711354255676,
0.037245169281959534,
0.19642990827560425,
0.24159391224384308,
-0.20789746940135956,
-0.2976357638835907,
0.089185431599617,
0.027332480996847153,
0.02949180081486702,
0.07206080853939056,
0.043730370700359344,
-0.04617574065923691,
-0.07004604488611221,
0.054252393543720245,
-0.04787212982773781,
-0.04118599370121956,
-0.2560916244983673,
0.24658265709877014,
0.149421826004982,
-0.22232182323932648,
0.40796515345573425,
0.21025970578193665,
-0.2849869430065155,
-0.1351122260093689,
-0.025392800569534302,
-0.28303927183151245,
-0.4311738610267639,
-0.11935921013355255,
0.11858833581209183,
-0.05968984588980675,
-0.097455695271492,
-0.1694902777671814,
-0.10173903405666351,
0.25173014402389526,
0.14016641676425934,
0.3110535740852356,
-0.014250658452510834,
0.027245882898569107,
-0.13515707850456238,
0.1787932962179184,
-0.04973064363002777,
-0.6150121688842773,
0.045486629009246826,
0.11791931092739105,
-0.08428440988063812,
0.03347653150558472,
0.26826098561286926,
-0.01577734388411045,
0.2963143289089203,
-0.1579417586326599,
-0.06330866366624832,
0.12411186844110489,
-0.5909106731414795,
-0.41243845224380493,
0.044717807322740555,
-0.07664290070533752,
0.18809428811073303,
0.004537701606750488,
-0.19970372319221497,
0.06492535024881363,
-0.2472866177558899,
0.44001948833465576,
0.13801246881484985,
-0.044131942093372345,
-0.057875968515872955,
-0.19793665409088135,
0.1749173253774643,
0.3008626699447632,
-0.062187086790800095,
-0.19596430659294128,
0.14484283328056335,
-0.08166707307100296,
-0.1941825896501541,
-0.004739396274089813,
-0.17992259562015533,
0.031581103801727295,
0.17038016021251678,
0.5274232625961304,
-0.38597142696380615,
0.0151757150888443,
0.12301596254110336,
-0.46091169118881226,
0.29361918568611145,
0.39541736245155334,
0.26110363006591797,
-0.06835930049419403,
-0.35290801525115967,
-0.06753480434417725,
0.2521061301231384,
0.14004099369049072,
-0.168260857462883,
0.02128947526216507,
-0.06751054525375366,
0.09819422662258148,
0.15819144248962402,
-0.02163533866405487,
-0.10701636224985123,
-0.3584011495113373,
0.26209956407546997,
0.14330744743347168,
0.1860506683588028,
0.1748153269290924,
0.07720548659563065,
-0.20686224102973938,
0.23442590236663818,
-0.01580214500427246,
-0.1631486415863037,
-0.20031777024269104,
0.5492412447929382,
0.10520503669977188,
-0.017198801040649414,
-0.2746550738811493,
-0.020003780722618103,
-0.02514210157096386,
-0.2747696340084076,
-0.38314497470855713,
-0.2933008372783661,
-0.02110588550567627,
0.04140467196702957,
0.2780783772468567,
0.17860451340675354,
-0.04000535234808922,
0.41084298491477966,
0.031276971101760864,
0.14677919447422028,
0.1082417368888855,
0.06464099884033203,
-0.21895405650138855,
-0.05611499771475792,
-0.10569500923156738,
-0.14894257485866547,
0.06965719163417816,
0.07621835172176361,
-0.28269538283348083,
0.015690721571445465,
0.31760966777801514,
0.15047799050807953,
-0.04733707755804062,
0.09645639359951019,
-0.41247645020484924,
0.19686204195022583,
0.2921251952648163,
0.38373345136642456,
0.3167133927345276,
0.13536925613880157,
-0.1182575523853302,
-0.12121696025133133,
-0.08275919407606125,
0.011324062943458557,
0.14388726651668549,
0.3079320788383484,
0.14821244776248932,
0.13907748460769653,
0.15249933302402496,
0.24640211462974548,
-0.04584404453635216,
-0.3409205377101898,
-0.10145590454339981,
0.26165395975112915,
-0.4694347381591797,
0.0661369264125824,
-0.29189354181289673,
-0.18395274877548218,
-0.16468366980552673,
-0.3587799668312073,
-0.24338579177856445,
-0.47794198989868164,
-0.15668833255767822,
0.008954312652349472,
-0.15263138711452484,
0.29642391204833984,
-0.13146844506263733,
0.3588622808456421,
0.1526259332895279,
-0.1919538527727127,
-0.02358585223555565,
-0.2835294008255005,
-0.13519999384880066,
0.022681795060634613,
-0.09931118786334991,
-0.3084685802459717,
0.14194577932357788,
0.04390232264995575,
0.12508724629878998,
-0.09716013073921204,
-0.47932106256484985,
0.2029929757118225,
-0.26056867837905884,
0.08515319228172302,
0.16122907400131226,
0.10913552343845367,
0.10530225932598114,
-0.3927180767059326,
0.027739407494664192,
0.05347947031259537,
-0.14028772711753845,
0.18476177752017975,
0.08551865816116333,
-0.21821534633636475,
-0.06587572395801544,
-0.10348445922136307,
-0.14324583113193512,
-0.2402413934469223,
0.3451361656188965,
0.11320275068283081,
-0.1593734472990036,
0.23131713271141052,
-0.097657211124897,
0.1498953104019165,
0.053343918174505234,
0.10155578702688217,
-0.1847560852766037,
-0.04024393856525421,
0.19327807426452637,
0.048361849039793015,
-0.06860634684562683,
-0.09883466362953186,
-0.3757774829864502,
0.2809653878211975,
-0.02840154618024826,
-0.44719791412353516,
-0.30603036284446716,
-0.4089563488960266,
0.15304769575595856,
-0.04041420668363571,
0.10679855197668076,
0.03729016333818436,
0.10562105476856232,
0.08070308715105057,
-0.16038267314434052,
-0.20669636130332947,
0.27821722626686096,
-0.0025136619806289673,
-0.051647670567035675,
-0.060143373906612396,
0.19256305694580078,
0.2335992157459259,
0.30379241704940796,
-0.01781233213841915,
-0.4548991024494171,
0.0916038528084755,
-0.1873280107975006,
0.36888396739959717,
0.06186293065547943,
-0.2878686189651489,
0.1325317919254303,
0.025175034999847412,
0.10520555078983307,
-0.013585418462753296,
-0.45498278737068176,
0.23512215912342072,
0.09418970346450806,
0.35859793424606323,
0.144729346036911,
-0.3929693400859833,
-0.15528686344623566,
-0.2358343005180359,
0.2490772008895874,
0.1698322296142578,
-0.17653977870941162,
-0.1136191338300705,
-0.08119689673185349,
0.07956062257289886,
-0.049711182713508606,
0.012519516050815582,
-0.08743485808372498,
-0.30373257398605347,
-0.16434727609157562,
-0.4151137173175812,
0.33946651220321655,
0.3104051649570465,
0.6739195585250854,
0.23016668856143951,
-0.07275710254907608,
-0.1501767486333847,
0.2395569086074829,
0.7219152450561523,
-0.2614850401878357,
-0.28301453590393066,
0.20722319185733795,
0.24349740147590637,
-0.4125404953956604,
-0.21564744412899017,
-0.38547733426094055,
-0.07011781632900238,
-0.0805290937423706,
0.8304720520973206,
-0.19430573284626007,
-0.006909290328621864,
0.4239652156829834,
0.11705607920885086,
0.081106036901474,
-0.08089669793844223,
-0.17706333100795746,
0.016835838556289673,
-0.16552552580833435,
0.25267091393470764,
0.33107635378837585,
0.29064416885375977,
-0.08692795038223267,
0.04675593599677086,
-0.01648380048573017,
-0.20388802886009216,
-0.0024939030408859253,
0.2365792840719223,
0.20019128918647766,
-0.16581669449806213,
0.22712433338165283,
-0.2347324788570404,
-0.008833244442939758,
0.44637414813041687,
0.4554648995399475,
-0.1715497374534607,
-0.7058790922164917,
-0.007061006501317024,
0.04034741595387459,
0.5578244924545288,
0.13118845224380493,
-0.2691809833049774,
0.33704766631126404,
-0.5589268207550049,
0.060494862496852875,
-0.10473679006099701,
0.18438424170017242,
0.2939344644546509,
0.15034018456935883,
-0.3271545469760895,
0.20198142528533936,
0.3025921583175659,
0.2599724233150482,
0.011810697615146637,
0.3021049201488495,
0.6619235277175903,
-0.38119885325431824,
0.1840178668498993,
0.08118178695440292,
0.9004286527633667,
0.1915838122367859,
0.04099389910697937,
0.2726006805896759,
-0.08307236433029175,
0.7875052690505981,
-0.05206604301929474,
-0.0282653346657753,
-0.295760840177536,
-0.6528972387313843,
-0.014004962518811226,
-0.20300522446632385,
-0.004426822066307068,
0.117625392973423,
-0.38306644558906555,
0.16067920625209808,
-0.20122003555297852,
0.06842143088579178,
0.16934038698673248,
0.0645129382610321,
0.15484295785427094,
-0.37246859073638916,
-0.014392644166946411,
0.019520241767168045,
0.10195410251617432,
0.07252038270235062,
-0.16775095462799072,
0.1282922923564911,
-0.2546365559101105,
-0.33113545179367065,
-0.14372989535331726,
0.05435778945684433,
-0.30908989906311035,
-0.03551768511533737,
0.6038857698440552,
0.011055029928684235,
0.2074856013059616,
-0.06111110374331474,
0.6476405262947083,
0.25677260756492615,
0.03400711715221405,
0.10361906886100769,
0.11680356413125992,
0.26424044370651245,
0.38808685541152954,
-0.034256450831890106,
0.46446192264556885,
0.2496006190776825,
-0.16107454895973206,
0.01428944617509842,
-0.22119687497615814,
-0.18475061655044556,
0.1369343101978302,
-0.08426126837730408,
-0.11171959340572357,
-0.2423621118068695,
-0.15206538140773773,
0.12837468087673187,
-0.1194392591714859,
-0.13337716460227966,
0.09130717813968658,
-0.22034497559070587,
-0.19495953619480133,
0.11826570332050323,
-0.07060304284095764,
-0.4409148693084717,
0.13099446892738342,
0.2958592176437378,
-0.22592604160308838,
0.47838374972343445,
0.390972375869751,
-0.08841405808925629,
-0.07801106572151184,
-0.0388747975230217,
-0.0821302980184555,
0.37645676732063293,
-0.8032313585281372,
0.20020785927772522,
-0.2733958661556244,
0.051219284534454346,
-0.20889107882976532,
0.3544505834579468,
0.25885337591171265,
0.1425030529499054,
-0.05997554212808609,
-0.2329394668340683,
-0.0385739803314209,
0.34107738733291626,
-0.2037264108657837,
0.1605224758386612,
0.03631560504436493,
0.6261714100837708,
-0.4208150804042816,
0.23473931849002838,
-0.24623601138591766,
0.00945243053138256,
-0.24299828708171844,
0.14554491639137268,
0.13774386048316956,
-0.004034370183944702,
0.15907928347587585,
-0.1032140851020813,
0.09256588667631149,
0.41988128423690796,
0.19560375809669495,
-0.20277705788612366,
-0.2880214750766754,
0.14782610535621643,
0.44286781549453735,
-0.13640059530735016,
0.1583620309829712,
0.06878703832626343,
-0.03443625196814537,
-0.21342134475708008,
0.1312950849533081,
-0.056471087038517,
-0.09272797405719757,
0.2449236661195755,
-0.3610188663005829,
0.27392926812171936,
-0.2927984595298767,
0.1995580643415451,
-0.033053383231163025,
-0.08235307037830353,
0.09577611833810806,
0.33498910069465637,
-0.2550983726978302,
-0.019989948719739914,
-0.2901846766471863,
0.12569403648376465,
-0.20451043546199799,
-0.021044310182332993,
-0.06440261006355286,
-0.25991159677505493,
-0.12463608384132385,
-0.15901696681976318,
0.2964414656162262,
0.07355111837387085,
-0.3510039746761322,
-0.25158441066741943,
0.3473814129829407,
0.1574019491672516,
-0.18681737780570984,
0.03411993756890297,
0.14533014595508575,
-0.027985647320747375,
0.1962038278579712,
0.36951324343681335,
0.10814668238162994,
0.0018249750137329102,
0.05697577819228172,
-0.14813834428787231,
0.21809065341949463,
-0.05926185101270676,
0.04707774147391319,
0.36509987711906433,
-0.27615630626678467,
0.4177655279636383,
0.5195370316505432,
0.07110950350761414,
0.47783011198043823,
-0.12858058512210846,
0.049578454345464706,
-0.20715993642807007,
0.23023739457130432,
-0.17413422465324402,
0.22385859489440918,
-0.2710973620414734,
0.22128094732761383,
-0.13948628306388855,
0.03960956633090973,
0.02194429188966751,
0.03171658515930176,
0.36361610889434814,
-0.3387746512889862,
-0.15034471452236176,
-0.12672032415866852,
0.02687363512814045,
-0.18434786796569824,
-0.03586375713348389,
-0.023792827501893044,
0.046873368322849274,
-0.157454252243042,
-0.2771110534667969,
-0.04783058539032936,
-0.3461042642593384,
-0.07260048389434814,
-0.1373651921749115,
-0.060767680406570435,
-0.44160744547843933,
-0.3221760094165802,
0.2161569595336914,
0.31751546263694763,
-0.10527832806110382,
0.3006138801574707,
-0.11908087134361267,
-0.12874367833137512,
0.1355016678571701,
0.3577415347099304,
0.3187395930290222,
0.18900159001350403,
0.22432510554790497,
-0.08641038089990616,
-0.11457130312919617,
-0.04050563648343086,
0.2818582355976105,
0.0725809782743454,
-0.07630683481693268,
-0.21623851358890533,
0.4399479627609253,
0.10276404023170471,
-0.1784595400094986,
-0.021531086415052414,
0.01911342144012451,
0.259265273809433,
-0.3819023668766022,
0.1495601087808609,
0.05906790867447853,
-0.21385735273361206,
-0.113480344414711,
0.21984943747520447,
-0.04982023686170578,
0.035172902047634125,
0.18159161508083344,
-0.19226455688476562,
0.20940595865249634,
-0.008576969616115093,
0.06681796163320541,
-0.06794248521327972,
0.2849483788013458,
0.5558747053146362,
-0.014417663216590881,
-0.07968617230653763,
0.01598459482192993,
-0.446889191865921,
0.24018514156341553,
0.02438478171825409,
-0.38088923692703247,
0.08121100068092346,
0.09636466950178146,
0.15230463445186615,
0.22294387221336365,
0.18146240711212158,
-0.060942478477954865,
-0.008191223256289959,
-0.11039215326309204,
-0.33289581537246704,
-0.1563851684331894,
-0.025618620216846466,
-0.25237131118774414,
0.00006031617522239685,
-0.2590431272983551,
0.092465840280056,
0.1201944351196289,
-0.035046786069869995,
0.07607125490903854,
0.007943056523799896,
0.09539932012557983,
-0.05673212558031082,
0.3918668329715729,
0.16157904267311096,
0.4229713976383209,
0.08048497140407562,
0.20402203500270844,
-0.05934160575270653,
-0.2601495385169983,
-0.39809924364089966,
0.015380963683128357,
-0.11208349466323853,
0.14951369166374207,
0.15370520949363708,
-0.11288364231586456,
-0.11773031949996948,
0.3885992169380188,
0.24930955469608307,
0.27234870195388794,
-0.23404794931411743,
0.5351807475090027,
-0.29895126819610596,
-0.0189739428460598,
0.33664533495903015,
0.030772319063544273,
0.11880512535572052,
0.3600976765155792,
-0.11436625570058823,
-0.6402583718299866,
0.5026201605796814,
-0.43488770723342896,
-0.08631351590156555,
0.19223430752754211,
0.1974565088748932,
0.23673734068870544,
-0.36962029337882996,
-0.32969188690185547,
-0.13703219592571259,
0.45964115858078003,
-0.18561306595802307,
-0.41501662135124207,
0.2042558193206787,
-0.12117709219455719,
0.36736252903938293,
0.022666212171316147,
0.13695085048675537,
-0.13312211632728577,
-0.03312790393829346,
0.01936168223619461,
-0.09141580760478973
] |
https://github.com/huggingface/datasets/issues/4772 | AssertionError when using label_cols in to_tf_dataset | Haha, I honestly have no idea why our data collators rename `"label"` (the standard label column name in our datasets) to `"labels"` (the standard label column name input to our models). It's been a pain point when I design TF data pipelines, though, because I don't want to hardcode things like that - especially in `datasets`, because the renaming is something that happens purely at the `transformers` end. I don't think I could make the change in the data collators themselves at this point, because it would break backward compatibility for everything in PyTorch as well as TF.
In the most recent version of `transformers` we added a [prepare_tf_dataset](https://huggingface.co/docs/transformers/main_classes/model#transformers.TFPreTrainedModel.prepare_tf_dataset) method to our models which takes care of these details for you, and even chooses appropriate columns and labels for the model you're using. In future we might make that the officially recommended way to convert HF datasets to `tf.data.Dataset`. | ## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
| 149 | AssertionError when using label_cols in to_tf_dataset
## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
Haha, I honestly have no idea why our data collators rename `"label"` (the standard label column name in our datasets) to `"labels"` (the standard label column name input to our models). It's been a pain point when I design TF data pipelines, though, because I don't want to hardcode things like that - especially in `datasets`, because the renaming is something that happens purely at the `transformers` end. I don't think I could make the change in the data collators themselves at this point, because it would break backward compatibility for everything in PyTorch as well as TF.
In the most recent version of `transformers` we added a [prepare_tf_dataset](https://huggingface.co/docs/transformers/main_classes/model#transformers.TFPreTrainedModel.prepare_tf_dataset) method to our models which takes care of these details for you, and even chooses appropriate columns and labels for the model you're using. In future we might make that the officially recommended way to convert HF datasets to `tf.data.Dataset`. | [
0.19720184803009033,
0.13782697916030884,
0.06203187629580498,
0.21990785002708435,
0.3263667821884155,
0.23189198970794678,
0.7796977162361145,
0.21121565997600555,
-0.18252956867218018,
0.2845122218132019,
0.010953271761536598,
0.3895106613636017,
-0.11095575243234634,
-0.07815439254045486,
-0.11453533172607422,
-0.05028899759054184,
0.03161582350730896,
0.0954480916261673,
0.20852455496788025,
-0.05845361948013306,
-0.2881860136985779,
0.13429756462574005,
-0.3242339491844177,
0.2740381360054016,
-0.407561719417572,
-0.1805497258901596,
0.13791587948799133,
-0.2578362226486206,
-0.018136782571673393,
-0.4611125588417053,
0.28502705693244934,
-0.060995567589998245,
-0.07418527454137802,
0.7012057900428772,
-0.00011646740313153714,
-0.03833334892988205,
0.270511269569397,
0.06100964546203613,
-0.22809192538261414,
0.01565677672624588,
-0.2601361870765686,
0.10246868431568146,
-0.04307657480239868,
-0.2732390761375427,
0.16897353529930115,
-0.3181033432483673,
-0.254928857088089,
-0.09021423757076263,
-0.24144257605075836,
0.2537509799003601,
0.14549046754837036,
0.31481149792671204,
0.10944293439388275,
-0.09250101447105408,
0.27050846815109253,
-0.3993731737136841,
-0.09584987908601761,
0.32286301255226135,
-0.13669879734516144,
-0.07407328486442566,
0.000448763370513916,
0.42438358068466187,
0.08434336632490158,
0.030336400493979454,
0.04326140135526657,
0.014919270761311054,
-0.13580352067947388,
-0.21336933970451355,
0.038570210337638855,
0.3935767114162445,
0.5476185083389282,
-0.35591283440589905,
-0.4183686375617981,
0.0015615224838256836,
-0.2463143914937973,
-0.22634796798229218,
0.13410329818725586,
-0.04042365401983261,
0.11205700039863586,
0.06842483580112457,
0.1529461294412613,
-0.03216753527522087,
0.02040065824985504,
-0.03770536929368973,
-0.5063251256942749,
0.6318122148513794,
-0.19673454761505127,
0.2808917462825775,
0.08180534839630127,
-0.09744022786617279,
0.3052445352077484,
-0.08435454219579697,
-0.019214805215597153,
0.183546245098114,
-0.7438939809799194,
-0.15940529108047485,
-0.06115519255399704,
-0.24324840307235718,
-0.01711353100836277,
0.10556720197200775,
-0.1839788854122162,
-0.37262865900993347,
0.06641563028097153,
0.1304737627506256,
-0.042488452047109604,
0.363662987947464,
0.2671141028404236,
0.40903034806251526,
0.16958415508270264,
0.025179816409945488,
-0.06412135064601898,
-0.2093760371208191,
-0.00008428562432527542,
-0.31717196106910706,
0.31431546807289124,
-0.005117671564221382,
0.42861342430114746,
-0.1352798491716385,
-0.27389267086982727,
0.2434903383255005,
-0.40573203563690186,
-0.0671505257487297,
-0.0009065661579370499,
0.02137487381696701,
0.12126021087169647,
0.37760457396507263,
0.053672708570957184,
0.15034520626068115,
0.25928881764411926,
-0.0820608139038086,
-0.2842136323451996,
0.08176369965076447,
-0.046902336180210114,
-0.00265488401055336,
-0.003426533192396164,
0.050091952085494995,
-0.008243138901889324,
-0.1325768530368805,
0.05130700021982193,
-0.05207078531384468,
-0.12947586178779602,
-0.14742513000965118,
0.20154079794883728,
0.11583947390317917,
-0.32525792717933655,
0.42050793766975403,
0.2224656343460083,
-0.38863605260849,
-0.06470933556556702,
-0.05713615566492081,
-0.3931567668914795,
-0.26749157905578613,
-0.1350255310535431,
0.12223564088344574,
0.07554364949464798,
-0.12826794385910034,
-0.18654265999794006,
-0.20350824296474457,
0.32730552554130554,
0.11784243583679199,
0.34208041429519653,
0.014155594632029533,
0.12185807526111603,
-0.10383447259664536,
0.09417197108268738,
-0.08177268505096436,
-0.5697709918022156,
0.02798563987016678,
0.13277919590473175,
0.0006989501416683197,
0.026658855378627777,
0.296756774187088,
0.08207988739013672,
0.20590126514434814,
-0.08866646140813828,
0.02064671367406845,
0.10225342214107513,
-0.6146019697189331,
-0.2656198740005493,
0.015968788415193558,
-0.09933732450008392,
0.03415314853191376,
0.06088633090257645,
-0.21839022636413574,
0.008123666979372501,
-0.17777985334396362,
0.435252845287323,
-0.022657062858343124,
-0.004662191495299339,
-0.04255983978509903,
-0.19106589257717133,
0.10846078395843506,
0.1458553969860077,
-0.14174309372901917,
-0.1587482988834381,
0.13367530703544617,
-0.07855693250894547,
-0.21654032170772552,
0.014935716986656189,
-0.23428097367286682,
0.055668532848358154,
0.19224916398525238,
0.4655579626560211,
-0.3042343258857727,
0.08859486877918243,
0.15131992101669312,
-0.43459373712539673,
0.3007177412509918,
0.3375283479690552,
0.1966400444507599,
-0.09850245714187622,
-0.34886854887008667,
-0.22089314460754395,
0.24887718260288239,
0.09755514562129974,
-0.12680493295192719,
0.017021622508764267,
0.04437963664531708,
0.06847995519638062,
0.12884528934955597,
-0.07171322405338287,
-0.12472490221261978,
-0.2938379645347595,
0.2730563282966614,
0.06611636281013489,
0.1642153263092041,
0.1914457082748413,
0.09200861304998398,
-0.26970580220222473,
0.20254388451576233,
0.055011119693517685,
-0.15624065697193146,
-0.21863573789596558,
0.5496485829353333,
0.10501499474048615,
0.021138198673725128,
-0.12729284167289734,
-0.021722689270973206,
-0.06010427325963974,
-0.25221017003059387,
-0.31153666973114014,
-0.31904837489128113,
0.056329723447561264,
0.01910092681646347,
0.2355448305606842,
0.11315173655748367,
-0.07858578860759735,
0.4647301733493805,
-0.01073521003127098,
0.17894066870212555,
0.10973499715328217,
0.005140993744134903,
-0.23691147565841675,
-0.08090020716190338,
-0.09336169064044952,
-0.2418966442346573,
0.10993996262550354,
0.08920064568519592,
-0.29079413414001465,
-0.022409670054912567,
0.4764372706413269,
0.14595448970794678,
-0.1183982864022255,
0.04846835508942604,
-0.36086463928222656,
0.21328669786453247,
0.2834680676460266,
0.4159547984600067,
0.2932050824165344,
0.10767991840839386,
-0.148860901594162,
-0.11964910477399826,
-0.1053936630487442,
-0.023350918665528297,
0.18266801536083221,
0.3578927516937256,
0.10674448311328888,
0.10515840351581573,
0.1260046809911728,
0.1704142838716507,
-0.08567772060632706,
-0.2932806611061096,
-0.00350215844810009,
0.2254820466041565,
-0.43800055980682373,
0.06815534085035324,
-0.2619142532348633,
-0.16847634315490723,
-0.19782587885856628,
-0.41583195328712463,
-0.21991083025932312,
-0.5738579630851746,
-0.15529802441596985,
0.0043575577437877655,
-0.11163671314716339,
0.3418704867362976,
-0.12603174149990082,
0.2658423185348511,
0.15051622688770294,
-0.13789482414722443,
-0.14524662494659424,
-0.35926347970962524,
-0.05038556456565857,
0.03228278458118439,
-0.1011122390627861,
-0.36575520038604736,
0.17042231559753418,
-0.06312989443540573,
0.12174530327320099,
-0.1347818523645401,
-0.5115658640861511,
0.19595879316329956,
-0.383129358291626,
0.07521741092205048,
0.14018681645393372,
0.09063243120908737,
0.026101291179656982,
-0.38677510619163513,
0.006546798162162304,
0.0279808659106493,
-0.12576352059841156,
0.19904683530330658,
0.12771537899971008,
-0.24914368987083435,
-0.12557335197925568,
-0.17568841576576233,
-0.13031013309955597,
-0.18911193311214447,
0.3604157567024231,
0.03962322697043419,
-0.1675972193479538,
0.3012309670448303,
-0.17534974217414856,
0.19307416677474976,
0.0607757493853569,
0.12018393725156784,
-0.20937442779541016,
-0.05565671622753143,
0.11371128261089325,
0.02065228298306465,
-0.0299171544611454,
-0.1416495144367218,
-0.25676918029785156,
0.3175268769264221,
-0.09801442176103592,
-0.33627086877822876,
-0.3199671804904938,
-0.42497503757476807,
0.13807138800621033,
0.09432119131088257,
0.09273768216371536,
-0.03961026668548584,
0.16910284757614136,
0.042030707001686096,
-0.1850755512714386,
-0.1848727911710739,
0.22547703981399536,
0.025253038853406906,
0.01507086306810379,
-0.00046673789620399475,
0.23075294494628906,
0.17567503452301025,
0.32527005672454834,
-0.06085599958896637,
-0.3774099051952362,
0.161815345287323,
-0.21340526640415192,
0.2637718617916107,
-0.031139157712459564,
-0.3321550190448761,
0.1456807404756546,
-0.028564348816871643,
0.11777496337890625,
-0.0026605725288391113,
-0.4476284682750702,
0.19806820154190063,
0.08568550646305084,
0.5068848133087158,
0.08760450035333633,
-0.30370965600013733,
-0.2069680094718933,
-0.23168808221817017,
0.1999417394399643,
0.24700912833213806,
-0.09515484422445297,
-0.1960165947675705,
-0.12703052163124084,
0.07493060827255249,
-0.06967727839946747,
-0.06938733905553818,
-0.0925649031996727,
-0.401585191488266,
-0.13212066888809204,
-0.3805510699748993,
0.45849621295928955,
0.34495556354522705,
0.7007693648338318,
0.21848003566265106,
-0.10494328290224075,
-0.07659539580345154,
0.228271946310997,
0.6889708638191223,
-0.1953064203262329,
-0.2513290047645569,
0.26953697204589844,
0.36703380942344666,
-0.35864323377609253,
-0.25100138783454895,
-0.3574680685997009,
-0.07193056493997574,
-0.0344020314514637,
0.8797716498374939,
-0.22304126620292664,
-0.10220349580049515,
0.3871557116508484,
0.06689856201410294,
0.07493740320205688,
-0.018917813897132874,
-0.17012058198451996,
-0.027304530143737793,
-0.1642943173646927,
0.1671293079853058,
0.3012125790119171,
0.32074806094169617,
-0.1754818856716156,
0.05717964097857475,
-0.03130543977022171,
-0.12880206108093262,
0.04146309569478035,
0.29797837138175964,
0.20289215445518494,
-0.11591482162475586,
0.1764548420906067,
-0.21873772144317627,
0.061707932502031326,
0.3785269856452942,
0.4677684009075165,
-0.30762186646461487,
-0.7061706781387329,
-0.026237502694129944,
0.028893079608678818,
0.5493503212928772,
0.11849479377269745,
-0.2607724964618683,
0.3516599237918854,
-0.5108703374862671,
0.17093577980995178,
-0.12448970228433609,
0.1855267435312271,
0.39141175150871277,
0.22463499009609222,
-0.41849327087402344,
0.11063528060913086,
0.29829055070877075,
0.29676541686058044,
-0.04319199547171593,
0.3156300485134125,
0.6505478024482727,
-0.3448026180267334,
0.23374110460281372,
-0.014108747243881226,
0.8279053568840027,
0.0708162933588028,
0.025205763056874275,
0.28249526023864746,
-0.1319173276424408,
0.7546008825302124,
0.011292912065982819,
-0.039782389998435974,
-0.37832504510879517,
-0.6075707077980042,
-0.019475122913718224,
-0.17902299761772156,
0.039278995245695114,
0.1421007364988327,
-0.29950690269470215,
0.26949188113212585,
-0.20000708103179932,
0.0628516674041748,
0.12255927920341492,
-0.002561405301094055,
0.17086347937583923,
-0.32735633850097656,
0.013812733814120293,
0.03065020591020584,
0.05778305605053902,
0.10865435004234314,
-0.08995776623487473,
0.1780308336019516,
-0.32581400871276855,
-0.33825552463531494,
-0.12276783585548401,
0.08633681386709213,
-0.17682749032974243,
-0.00785200484097004,
0.538809597492218,
0.050623610615730286,
0.103358194231987,
-0.051608260720968246,
0.6833362579345703,
0.2376423329114914,
0.03907441720366478,
0.21741913259029388,
0.17624139785766602,
0.2800041139125824,
0.3645539879798889,
0.035175323486328125,
0.43649402260780334,
0.2957189083099365,
-0.16422387957572937,
-0.02716078609228134,
-0.20441767573356628,
-0.20792540907859802,
-0.021222516894340515,
-0.06192508339881897,
0.015023481100797653,
-0.2632843554019928,
-0.1649690419435501,
0.08695487678050995,
-0.09585252404212952,
-0.16117604076862335,
0.08507145941257477,
-0.27728772163391113,
-0.17285647988319397,
0.20694422721862793,
-0.09260155260562897,
-0.47958505153656006,
0.16482412815093994,
0.31215405464172363,
-0.24507281184196472,
0.4624696671962738,
0.4099501669406891,
-0.07951265573501587,
-0.12007708102464676,
-0.0003788210451602936,
-0.0765625536441803,
0.32921284437179565,
-0.860970675945282,
0.20714575052261353,
-0.16558527946472168,
-0.02219570428133011,
-0.1864239126443863,
0.2892998456954956,
0.2233768105506897,
0.17428937554359436,
-0.1185242235660553,
-0.19182230532169342,
-0.10622972249984741,
0.3615666627883911,
-0.17522285878658295,
0.1263003647327423,
0.1064753457903862,
0.5705835819244385,
-0.4200124740600586,
0.17870649695396423,
-0.23149864375591278,
0.030475901439785957,
-0.34212368726730347,
0.21748338639736176,
0.18246881663799286,
-0.09022528678178787,
0.19799919426441193,
-0.1178777664899826,
0.1331930309534073,
0.337857723236084,
0.21611905097961426,
-0.20654189586639404,
-0.300091415643692,
0.13605529069900513,
0.3935355246067047,
-0.08568887412548065,
0.09811128675937653,
0.0192328542470932,
-0.023284949362277985,
-0.18435220420360565,
0.11717922985553741,
0.09241453558206558,
-0.03303118050098419,
0.3258945047855377,
-0.33013245463371277,
0.2904594838619232,
-0.11640807241201401,
0.20869089663028717,
0.007355727255344391,
-0.10528901219367981,
0.03274654597043991,
0.32707008719444275,
-0.2770863175392151,
-0.024405919015407562,
-0.348244309425354,
0.09916431456804276,
-0.20276524126529694,
-0.06559222936630249,
-0.037423960864543915,
-0.27165746688842773,
-0.11391489207744598,
-0.10659855604171753,
0.2829686999320984,
0.16891086101531982,
-0.25006115436553955,
-0.35068413615226746,
0.3566822409629822,
0.1521497219800949,
-0.14745378494262695,
-0.029935024678707123,
0.09225814044475555,
0.05000779405236244,
0.17658276855945587,
0.31576621532440186,
0.11127404868602753,
0.027481086552143097,
-0.06646914780139923,
-0.14879262447357178,
0.20390059053897858,
-0.05813894420862198,
0.048824042081832886,
0.455862820148468,
-0.19775426387786865,
0.38161155581474304,
0.5978974103927612,
0.07403317838907242,
0.2906807065010071,
-0.1206357330083847,
0.08600053936243057,
-0.19649943709373474,
0.22627344727516174,
-0.1178516298532486,
0.25602054595947266,
-0.13010652363300323,
0.22293169796466827,
-0.17476341128349304,
0.021156661212444305,
0.1466783881187439,
0.06013203412294388,
0.40787315368652344,
-0.2872790992259979,
-0.1825147420167923,
-0.10498996078968048,
0.07672490179538727,
-0.19976267218589783,
-0.1961079090833664,
-0.06343279778957367,
0.07965118438005447,
-0.10540573298931122,
-0.30624130368232727,
-0.10846447944641113,
-0.278685986995697,
0.038312818855047226,
-0.12181548774242401,
-0.0485774427652359,
-0.4419673979282379,
-0.4511946737766266,
0.213972806930542,
0.3332374691963196,
-0.10020624101161957,
0.29948440194129944,
-0.04964128136634827,
-0.02347775548696518,
0.16491806507110596,
0.333871454000473,
0.3184524476528168,
0.14099577069282532,
0.21850189566612244,
-0.14994604885578156,
-0.12453792989253998,
-0.07259912043809891,
0.31874072551727295,
0.08393269032239914,
-0.11916138231754303,
-0.23337866365909576,
0.4419800341129303,
0.10810481011867523,
-0.14679771661758423,
-0.057378750294446945,
0.030242500826716423,
0.3387284278869629,
-0.32646605372428894,
0.20726904273033142,
-0.03882524371147156,
-0.21917685866355896,
-0.146703839302063,
0.2503512501716614,
-0.18802395462989807,
0.06705250591039658,
0.24075622856616974,
-0.19882407784461975,
0.21146714687347412,
-0.0634913370013237,
0.07458124309778214,
-0.08150520920753479,
0.2693089246749878,
0.5048493146896362,
-0.06966138631105423,
-0.0886046290397644,
0.04377664625644684,
-0.38540783524513245,
0.15702256560325623,
0.154380202293396,
-0.31376194953918457,
0.04008685424923897,
0.027656449005007744,
0.12280449271202087,
0.11799541860818863,
0.20714181661605835,
-0.1664205938577652,
-0.056449901312589645,
0.0188339501619339,
-0.36912691593170166,
-0.08053512871265411,
-0.00009685009717941284,
-0.21089978516101837,
0.0965854749083519,
-0.28353095054626465,
0.10425439476966858,
0.17003704607486725,
-0.07667046785354614,
-0.014397960156202316,
0.06827236711978912,
0.18100793659687042,
-0.03313475102186203,
0.34207314252853394,
0.09514650702476501,
0.4260301887989044,
0.07335875928401947,
0.17071574926376343,
-0.06745192408561707,
-0.40049293637275696,
-0.37880784273147583,
0.07441633194684982,
-0.17093010246753693,
0.13431014120578766,
0.17561942338943481,
-0.14684589207172394,
-0.018621742725372314,
0.34072110056877136,
0.19025608897209167,
0.19579079747200012,
-0.24367766082286835,
0.46572598814964294,
-0.23352277278900146,
-0.05088057741522789,
0.30847907066345215,
0.08012954145669937,
0.1605764627456665,
0.4517216384410858,
-0.06340611726045609,
-0.7400668859481812,
0.6549407243728638,
-0.32657748460769653,
-0.20898447930812836,
0.25197041034698486,
0.1510419249534607,
0.2523881793022156,
-0.42259830236434937,
-0.3802916705608368,
-0.15758730471134186,
0.43855181336402893,
-0.20451468229293823,
-0.37928876280784607,
0.1467798352241516,
-0.1267555207014084,
0.39756569266319275,
-0.03851154446601868,
0.1688166856765747,
-0.0539412721991539,
-0.022376593202352524,
0.07188931107521057,
-0.04548995569348335
] |
https://github.com/huggingface/datasets/issues/4772 | AssertionError when using label_cols in to_tf_dataset | Interesting, that'd be great especially for clarity. https://huggingface.co/docs/datasets/use_with_tensorflow#data-loading already improved clarity, yet, all those options will still confuse people. Looking forward to those advances in the hope there'll be only 1 way in the future ;)
Anyways, I am happy for the time being with the work-around you provided. Thank you! | ## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
| 51 | AssertionError when using label_cols in to_tf_dataset
## Describe the bug
An incorrect `AssertionError` is raised when using `label_cols` in `to_tf_dataset` and the label's key name is `label`.
The assertion is in this line:
https://github.com/huggingface/datasets/blob/2.4.0/src/datasets/arrow_dataset.py#L475
## Steps to reproduce the bug
```python
from datasets import load_dataset
from transformers import DefaultDataCollator
dataset = load_dataset('glue', 'mrpc', split='train')
tf_dataset = dataset.to_tf_dataset(
columns=["sentence1", "sentence2", "idx"],
label_cols=["label"],
batch_size=16,
collate_fn=DefaultDataCollator(return_tensors="tf"),
)
```
## Expected results
No assertion error.
## Actual results
```
AssertionError: in user code:
File "/opt/conda/lib/python3.8/site-packages/datasets/arrow_dataset.py", line 475, in split_features_and_labels *
assert set(features.keys()).union(labels.keys()) == set(input_batch.keys())
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.18.0-305.45.1.el8_4.ppc64le-ppc64le-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 7.0.0
- Pandas version: 1.4.3
Interesting, that'd be great especially for clarity. https://huggingface.co/docs/datasets/use_with_tensorflow#data-loading already improved clarity, yet, all those options will still confuse people. Looking forward to those advances in the hope there'll be only 1 way in the future ;)
Anyways, I am happy for the time being with the work-around you provided. Thank you! | [
0.0172334723174572,
-0.1237061470746994,
0.07336010038852692,
0.2765328288078308,
0.27082011103630066,
0.18258807063102722,
0.6481465697288513,
0.2578235864639282,
-0.05115589499473572,
0.2621188461780548,
-0.06051237881183624,
0.3850279152393341,
-0.14136449992656708,
-0.03756694495677948,
0.007858391851186752,
-0.03136035054922104,
-0.014628849923610687,
0.012892648577690125,
0.17382177710533142,
-0.03298286348581314,
-0.21787214279174805,
0.19331909716129303,
-0.37423473596572876,
0.18349111080169678,
-0.386113703250885,
-0.27586469054222107,
0.16234053671360016,
-0.17160725593566895,
0.05926036089658737,
-0.41266918182373047,
0.2970171272754669,
-0.04993194714188576,
-0.05880579724907875,
0.609434187412262,
-0.00011417188216000795,
0.05043291300535202,
0.17907002568244934,
0.03921279311180115,
-0.20303946733474731,
-0.08290441334247589,
-0.1782274842262268,
0.15525609254837036,
-0.022983180359005928,
-0.16899241507053375,
0.05480489879846573,
-0.2765299379825592,
-0.28582143783569336,
0.06693274527788162,
-0.028371870517730713,
0.33193516731262207,
0.13565286993980408,
0.4605579972267151,
0.21932421624660492,
-0.12629199028015137,
0.14179383218288422,
-0.3669183850288391,
-0.04819287359714508,
0.3604961931705475,
-0.1201057881116867,
-0.05115552246570587,
0.05676480382680893,
0.44528013467788696,
0.09608843177556992,
0.03518321365118027,
0.07642755657434464,
0.014570859260857105,
-0.19697898626327515,
-0.23078063130378723,
-0.09720221906900406,
0.4641035199165344,
0.49612507224082947,
-0.3413356840610504,
-0.491340309381485,
-0.15586800873279572,
-0.1475178748369217,
-0.26343148946762085,
0.13812372088432312,
0.03162873536348343,
-0.02396209165453911,
0.125849649310112,
-0.048431865870952606,
-0.03807446360588074,
-0.09783272445201874,
0.09712722152471542,
-0.3432222306728363,
0.5298998355865479,
-0.2600580155849457,
0.24932989478111267,
0.1871635466814041,
-0.043441854417324066,
0.049736712127923965,
-0.008014190942049026,
0.025269651785492897,
0.24134181439876556,
-0.7458680272102356,
-0.14460092782974243,
0.041511666029691696,
-0.2766149938106537,
0.11575388163328171,
0.021951887756586075,
-0.10541114956140518,
-0.27201443910598755,
-0.0414394810795784,
0.18948262929916382,
-0.008122928440570831,
0.4109247922897339,
0.164793461561203,
0.3327539265155792,
0.15721452236175537,
0.08524241298437119,
0.01998673751950264,
-0.18446174263954163,
-0.08427666127681732,
-0.3125888705253601,
0.26331835985183716,
-0.05057322233915329,
0.4062976837158203,
-0.11292071640491486,
-0.4180326461791992,
0.18872793018817902,
-0.4282013177871704,
-0.08791334182024002,
0.07227633893489838,
0.11770807951688766,
0.06292724609375,
0.20907697081565857,
0.1434280425310135,
0.17472068965435028,
0.13800247013568878,
-0.14926065504550934,
-0.3486711084842682,
0.1169871836900711,
-0.024885114282369614,
0.10096759349107742,
0.07795116305351257,
-0.01229875162243843,
0.03758590668439865,
-0.048591408878564835,
0.0792606770992279,
-0.10570846498012543,
-0.1447049230337143,
-0.11435586214065552,
0.21080544590950012,
0.13743023574352264,
-0.288106232881546,
0.34686633944511414,
0.23357291519641876,
-0.21708737313747406,
-0.057339511811733246,
-0.0809558555483818,
-0.3525428771972656,
-0.44024935364723206,
-0.08491427451372147,
0.13030728697776794,
-0.0659046322107315,
-0.17655590176582336,
-0.2132931351661682,
-0.026329364627599716,
0.2476668357849121,
0.2079428732395172,
0.2939751148223877,
0.0808292031288147,
-0.0661623477935791,
-0.10468964278697968,
0.22814898192882538,
-0.0095444917678833,
-0.5486440062522888,
-0.01407800242304802,
0.151804581284523,
-0.04377451166510582,
0.0006811395287513733,
0.36986464262008667,
0.04522400349378586,
0.29493746161460876,
-0.10466599464416504,
0.04700419306755066,
0.0712624043226242,
-0.6344835162162781,
-0.3145124018192291,
0.08414153009653091,
-0.010387640446424484,
0.12515424191951752,
-0.027869604527950287,
-0.21153034269809723,
-0.03854313865303993,
-0.15369652211666107,
0.4969710111618042,
0.02496316097676754,
0.0055610258132219315,
-0.08048367500305176,
-0.22051548957824707,
0.13525936007499695,
0.034263066947460175,
-0.06264767050743103,
-0.24450768530368805,
0.024845309555530548,
-0.1401207447052002,
-0.1538086086511612,
0.09673726558685303,
-0.21489790081977844,
-0.04274524748325348,
0.2005337029695511,
0.48061004281044006,
-0.27366530895233154,
-0.0353887565433979,
0.011497825384140015,
-0.5421382784843445,
0.38221514225006104,
0.3745304048061371,
0.2834060788154602,
-0.11697439849376678,
-0.27860623598098755,
-0.11252685636281967,
0.24137617647647858,
0.14212928712368011,
-0.22765642404556274,
0.02365966886281967,
-0.07387784123420715,
0.11583739519119263,
0.14073531329631805,
-0.11391705274581909,
-0.14547553658485413,
-0.401513010263443,
0.23128743469715118,
0.08608914911746979,
0.1969943344593048,
0.19566233456134796,
0.008113592863082886,
-0.21660086512565613,
0.2661606967449188,
-0.04215800762176514,
-0.19174674153327942,
-0.19549956917762756,
0.5415022373199463,
-0.03780704736709595,
0.10446803271770477,
-0.28128889203071594,
-0.021607443690299988,
0.01994588039815426,
-0.2686414420604706,
-0.4414902329444885,
-0.32863616943359375,
-0.002637644996866584,
0.04730270802974701,
0.057058148086071014,
0.1799163520336151,
-0.06500129401683807,
0.3697526156902313,
0.046675726771354675,
0.07185935229063034,
0.018217505887150764,
0.10381755232810974,
-0.18277938663959503,
-0.1397307962179184,
0.021921956911683083,
-0.30169859528541565,
0.09980380535125732,
0.04540645703673363,
-0.38836610317230225,
0.07451383769512177,
0.51011723279953,
0.1639808863401413,
-0.03738788515329361,
0.11411602795124054,
-0.31141015887260437,
0.2185814380645752,
0.31343165040016174,
0.28760313987731934,
0.23098260164260864,
0.16486388444900513,
-0.14688730239868164,
-0.03856206685304642,
-0.1576923280954361,
-0.003132350742816925,
0.17253999412059784,
0.2628937363624573,
0.16093164682388306,
0.10011887550354004,
0.08379103243350983,
0.21107979118824005,
-0.11610551923513412,
-0.2336105853319168,
-0.1082872822880745,
0.2517351806163788,
-0.5590134263038635,
0.05098462104797363,
-0.2532445788383484,
-0.2781790792942047,
-0.16395752131938934,
-0.343649685382843,
-0.2649115025997162,
-0.5081459283828735,
-0.11782138049602509,
0.07743623852729797,
-0.13804447650909424,
0.31953194737434387,
-0.0345735140144825,
0.24876172840595245,
0.15048199892044067,
-0.2025355100631714,
-0.08982929587364197,
-0.24714140594005585,
-0.05948645621538162,
0.023298006504774094,
0.01730687916278839,
-0.2899867296218872,
0.24831664562225342,
0.014651840552687645,
0.08509352058172226,
-0.06840857863426208,
-0.4999907314777374,
0.2066662311553955,
-0.42147117853164673,
0.08493446558713913,
0.10151989758014679,
0.1577841341495514,
-0.004956647753715515,
-0.3564152121543884,
0.1542704850435257,
-0.05848170071840286,
-0.18290182948112488,
0.15625202655792236,
0.14735038578510284,
-0.24201016128063202,
-0.15207821130752563,
-0.23464152216911316,
-0.02828732319176197,
-0.3208092749118805,
0.4446134567260742,
0.0687050074338913,
-0.1094934493303299,
0.38914838433265686,
-0.021336596459150314,
0.21658779680728912,
-0.017586128786206245,
0.18547582626342773,
-0.2251865714788437,
-0.17283709347248077,
0.16109606623649597,
-0.024165555834770203,
-0.12800759077072144,
-0.1977502554655075,
-0.23650231957435608,
0.37603995203971863,
-0.06542801856994629,
-0.40276414155960083,
-0.3422316610813141,
-0.41507720947265625,
0.21244865655899048,
-0.032464414834976196,
0.07766632735729218,
-0.006332919001579285,
-0.013632522895932198,
0.015209095552563667,
-0.19395455718040466,
-0.14578798413276672,
0.2709629535675049,
-0.02733353152871132,
-0.013940379023551941,
0.03448076173663139,
0.24033114314079285,
0.3106062114238739,
0.4388046860694885,
0.11408849060535431,
-0.3940858542919159,
0.1598367691040039,
-0.2505075931549072,
0.3116047978401184,
-0.016114242374897003,
-0.32673513889312744,
0.14634032547473907,
0.028344109654426575,
0.21854600310325623,
-0.0017565488815307617,
-0.36833107471466064,
0.2984321415424347,
0.02858804166316986,
0.3475682735443115,
-0.01241523027420044,
-0.3463415801525116,
-0.09592533111572266,
-0.16764402389526367,
0.1630057692527771,
0.1465376615524292,
-0.07429538667201996,
-0.12972939014434814,
-0.09538969397544861,
0.0835690051317215,
-0.07206800580024719,
0.15156850218772888,
-0.10124239325523376,
-0.28775835037231445,
-0.10688105970621109,
-0.5458495020866394,
0.3620227575302124,
0.2912338078022003,
0.5566198229789734,
0.05963077023625374,
-0.07793425023555756,
-0.04837772250175476,
0.2780907154083252,
0.7265257835388184,
-0.1841195970773697,
-0.2573007345199585,
0.14088740944862366,
0.20943155884742737,
-0.554870069026947,
-0.11537390947341919,
-0.34695643186569214,
-0.11293689906597137,
0.022172097116708755,
0.8861633539199829,
-0.2869216501712799,
-0.12855255603790283,
0.36152219772338867,
-0.005911664105951786,
0.05859797075390816,
-0.17361603677272797,
-0.09659253060817719,
0.0276864692568779,
-0.2600395977497101,
0.16821247339248657,
0.42469796538352966,
0.269214004278183,
-0.08591490983963013,
0.031188633292913437,
0.0462067537009716,
-0.07626304030418396,
0.040590088814496994,
0.2217257171869278,
0.1923522651195526,
-0.11716889590024948,
0.20019207894802094,
-0.06674734503030777,
-0.042276352643966675,
0.4310333728790283,
0.4963792860507965,
-0.23639801144599915,
-0.6867019534111023,
-0.15052849054336548,
0.12102426588535309,
0.450781911611557,
0.1723632514476776,
-0.24744434654712677,
0.26996296644210815,
-0.39736753702163696,
0.19489726424217224,
-0.26726195216178894,
0.19826366007328033,
0.35474222898483276,
0.24865242838859558,
-0.33158934116363525,
0.11458702385425568,
0.4463629126548767,
0.28330379724502563,
0.027716264128684998,
0.38893210887908936,
0.7327165007591248,
-0.36343881487846375,
0.16990776360034943,
0.02075805515050888,
0.8521720767021179,
0.021801069378852844,
0.0437411293387413,
0.4153302311897278,
0.0013146325945854187,
0.869387149810791,
-0.007568821310997009,
0.037553951144218445,
-0.2326708436012268,
-0.5197436213493347,
-0.008986307308077812,
-0.13098418712615967,
-0.14128649234771729,
0.11896733194589615,
-0.2933066189289093,
0.2200019806623459,
-0.14583468437194824,
0.015722893178462982,
0.14218169450759888,
0.08197475969791412,
0.14218585193157196,
-0.3364934027194977,
-0.09566591680049896,
0.04005992412567139,
0.08235453069210052,
0.22912468016147614,
-0.09398438781499863,
0.041672565042972565,
-0.2765885591506958,
-0.2665565609931946,
-0.23602838814258575,
0.047982342541217804,
-0.20885509252548218,
-0.022059813141822815,
0.5371890068054199,
0.0737989991903305,
0.1787453293800354,
0.04259034991264343,
0.5921106338500977,
0.19259653985500336,
-0.03895474225282669,
0.08684797585010529,
0.054209623485803604,
0.16677774488925934,
0.24058043956756592,
0.023027274757623672,
0.5261602997779846,
0.17789557576179504,
-0.2822411358356476,
-0.09193114191293716,
-0.17609620094299316,
-0.13637571036815643,
0.03646555542945862,
-0.09317204356193542,
-0.08737222850322723,
-0.22735744714736938,
-0.20177601277828217,
0.07654537260532379,
-0.17164352536201477,
-0.12982885539531708,
0.10324917733669281,
-0.16773545742034912,
-0.18471089005470276,
0.10196775197982788,
0.04786891117691994,
-0.42813846468925476,
0.134450763463974,
0.38654929399490356,
-0.3387240767478943,
0.42905744910240173,
0.4024741053581238,
0.011947233229875565,
-0.14160007238388062,
-0.03932695463299751,
-0.1933479607105255,
0.42462965846061707,
-0.8101766109466553,
0.2082754373550415,
-0.15180444717407227,
0.13350312411785126,
-0.1968085765838623,
0.299904465675354,
0.2699967920780182,
0.06860557943582535,
-0.01031164824962616,
-0.20251551270484924,
-0.10273124277591705,
0.41827279329299927,
-0.17901907861232758,
0.19660323858261108,
0.02896948903799057,
0.5607293844223022,
-0.2972807288169861,
0.1957285851240158,
-0.27940958738327026,
0.027017027139663696,
-0.2886103689670563,
0.11767122894525528,
0.2586641013622284,
-0.024436987936496735,
0.31751325726509094,
-0.14174163341522217,
0.12559258937835693,
0.3955155611038208,
0.09133078902959824,
-0.2156226634979248,
-0.2822396457195282,
0.1330641210079193,
0.33822065591812134,
-0.17854923009872437,
0.21677954494953156,
0.0837739109992981,
-0.00552033819258213,
-0.244716614484787,
0.20185178518295288,
0.13256055116653442,
-0.05160170793533325,
0.30347970128059387,
-0.2827760875225067,
0.26938802003860474,
-0.1640339493751526,
0.17735891044139862,
0.027530048042535782,
-0.04322868585586548,
0.00848945789039135,
0.24679352343082428,
-0.25596919655799866,
-0.03591157868504524,
-0.3288387358188629,
0.050696611404418945,
-0.20378096401691437,
-0.06438812613487244,
-0.05359189957380295,
-0.24494214355945587,
-0.10357260704040527,
-0.19937872886657715,
0.38290897011756897,
0.048685431480407715,
-0.28144916892051697,
-0.18787191808223724,
0.3075113892555237,
0.17455795407295227,
-0.14559520781040192,
0.0822821706533432,
0.05392489209771156,
0.01867891103029251,
0.22185885906219482,
0.29675817489624023,
0.059549350291490555,
0.06422100961208344,
-0.09254540503025055,
-0.1462925672531128,
0.12758947908878326,
-0.09989714622497559,
0.013063554652035236,
0.3384692370891571,
-0.269423246383667,
0.30540674924850464,
0.5190801024436951,
0.06254670768976212,
0.43408164381980896,
-0.15347152948379517,
0.0021692663431167603,
-0.15851308405399323,
0.05315064638853073,
-0.0999666303396225,
0.25811582803726196,
-0.21638470888137817,
0.15985099971294403,
-0.09885790944099426,
-0.04076647758483887,
0.06121690198779106,
-0.10172633826732635,
0.4922340512275696,
-0.22121235728263855,
-0.18621943891048431,
-0.05007200688123703,
0.17764467000961304,
-0.18272247910499573,
-0.1406315118074417,
-0.10659518092870712,
0.04764675348997116,
-0.05523817241191864,
-0.3092484474182129,
-0.047205861657857895,
-0.4896519184112549,
-0.014722585678100586,
-0.05838495492935181,
-0.008598566055297852,
-0.43799787759780884,
-0.414339154958725,
0.2124113142490387,
0.4104821979999542,
-0.046489451080560684,
0.35583317279815674,
-0.004666440188884735,
-0.0964643657207489,
0.10779425501823425,
0.33457276225090027,
0.4433162808418274,
0.10996236652135849,
0.30084359645843506,
0.013707452453672886,
-0.11844159662723541,
-0.0096060112118721,
0.26556679606437683,
0.12592008709907532,
-0.05539123713970184,
-0.24526472389698029,
0.43593406677246094,
0.10834787786006927,
-0.188090518116951,
0.0111752450466156,
-0.14459316432476044,
0.3466244637966156,
-0.3630698621273041,
0.21642960608005524,
-0.10370020568370819,
-0.2170964777469635,
-0.20572929084300995,
0.1648728847503662,
-0.09848804771900177,
0.14726264774799347,
0.261635959148407,
-0.21788619458675385,
0.19521617889404297,
-0.04042777791619301,
0.07482242584228516,
-0.1012808084487915,
0.3175964951515198,
0.4931776821613312,
0.003716457635164261,
-0.07297088950872421,
0.11937843263149261,
-0.43490344285964966,
0.18695297837257385,
0.1108214259147644,
-0.22327546775341034,
0.04082154110074043,
0.10341476649045944,
0.04886578768491745,
0.16534505784511566,
0.28975939750671387,
-0.25082698464393616,
0.0181022547185421,
0.028553083539009094,
-0.3615506887435913,
-0.02557167038321495,
-0.1262526959180832,
-0.2518554627895355,
0.13206347823143005,
-0.1377621591091156,
0.08804216980934143,
0.023539818823337555,
-0.0552256740629673,
-0.002760661765933037,
0.2449464499950409,
0.06445154547691345,
0.0007227100431919098,
0.35517048835754395,
0.13575387001037598,
0.4504932463169098,
0.016671765595674515,
0.11032890528440475,
-0.057870496064424515,
-0.3022814691066742,
-0.34631720185279846,
0.16146822273731232,
-0.15902185440063477,
0.20906434953212738,
0.12685929238796234,
-0.28499460220336914,
-0.0982213094830513,
0.3107454478740692,
0.16727887094020844,
-0.0842161774635315,
-0.18848614394664764,
0.3881527781486511,
-0.2456456422805786,
-0.05192730948328972,
0.3522428572177887,
0.16697217524051666,
0.06456148624420166,
0.30187755823135376,
-0.131133034825325,
-0.736412525177002,
0.6897692680358887,
-0.3929722011089325,
-0.06400460004806519,
0.2799343168735504,
0.14700691401958466,
0.3357701003551483,
-0.4248058497905731,
-0.5738604664802551,
-0.06623777747154236,
0.4492466151714325,
-0.23884907364845276,
-0.39940470457077026,
0.21356120705604553,
-0.12922298908233643,
0.32683196663856506,
0.019841283559799194,
0.24626806378364563,
-0.06221909075975418,
-0.08975262194871902,
0.19462142884731293,
-0.08986198902130127
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | And I don't see any speed up when increasing the number of GPUs while calling `get_nearest_examples_batch`. | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 16 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
And I don't see any speed up when increasing the number of GPUs while calling `get_nearest_examples_batch`. | [
-0.180458202958107,
-0.6893144249916077,
-0.13762085139751434,
0.09218783676624298,
-0.4365417957305908,
-0.010441318154335022,
0.11597269773483276,
0.023757249116897583,
0.5270456075668335,
0.054458677768707275,
-0.2896807789802551,
-0.2646551728248596,
0.5140131115913391,
-0.21462833881378174,
-0.14600542187690735,
-0.06944843381643295,
0.3925471603870392,
-0.24762120842933655,
0.020105641335248947,
-0.21117731928825378,
-0.4957412779331207,
0.16700255870819092,
-0.361697256565094,
-0.15462329983711243,
-0.23830930888652802,
0.17728464305400848,
-0.22217388451099396,
0.00045152008533477783,
0.10464265942573547,
-0.20652730762958527,
-0.3478185832500458,
0.18857739865779877,
0.1045563593506813,
0.4551796615123749,
-0.00012488351785577834,
-0.2057943195104599,
-0.06506970524787903,
0.07606936246156693,
0.23016463220119476,
0.2637197971343994,
-0.08253800868988037,
0.14958542585372925,
-0.026093797758221626,
0.0336248055100441,
-0.43726205825805664,
-0.07605592161417007,
0.19349762797355652,
-0.6088345050811768,
-0.10214658081531525,
0.0193428173661232,
0.023139359429478645,
-0.10545755922794342,
-0.006838250905275345,
-0.186026468873024,
-0.06068522483110428,
-0.3833200931549072,
0.0027313847094774246,
-0.056359585374593735,
0.5284497737884521,
-0.07320121675729752,
0.05487815663218498,
0.39912867546081543,
0.0821177214384079,
0.07183858752250671,
-0.0834769532084465,
0.07847811281681061,
0.35039615631103516,
-0.3015100061893463,
0.07122380286455154,
-0.11064068228006363,
-0.12799108028411865,
-0.028070881962776184,
-0.284898966550827,
-0.37763774394989014,
-0.19173388183116913,
0.005764728412032127,
-0.15449309349060059,
0.06567849963903427,
-0.2504628598690033,
-0.1968093067407608,
0.0890716165304184,
-0.188632071018219,
0.02513115108013153,
-0.003727234899997711,
0.21657541394233704,
0.5903652906417847,
0.0656387135386467,
0.2143435776233673,
0.29147031903266907,
0.12348660826683044,
-0.30770936608314514,
-0.25622281432151794,
0.31866002082824707,
0.1498451828956604,
-0.9475895762443542,
0.18561169505119324,
0.22628366947174072,
-0.22952911257743835,
0.13926070928573608,
-0.07386785000562668,
-0.3160635828971863,
0.08275958150625229,
0.055386099964380264,
0.1822299361228943,
-0.02777237817645073,
-0.023405365645885468,
-0.017151743173599243,
-0.20590828359127045,
-0.19986115396022797,
-0.19791461527347565,
-0.039314378052949905,
0.08704394102096558,
0.052721016108989716,
-0.30633482336997986,
-0.7722588181495667,
-0.10747551172971725,
-0.01602727547287941,
0.10491535067558289,
-0.09769019484519958,
-0.09144490957260132,
-0.004844840615987778,
-0.2679620087146759,
0.15689414739608765,
0.3182276785373688,
-0.0026680161245167255,
-0.01165265217423439,
-0.23703007400035858,
0.0728154331445694,
-0.2087472826242447,
-0.08445632457733154,
-0.07216709107160568,
-0.18835854530334473,
-0.10413268208503723,
0.26099318265914917,
0.04258387163281441,
-0.15040676295757294,
0.03006185032427311,
0.09596802294254303,
0.1461484134197235,
0.1792532056570053,
0.10283492505550385,
-0.406094491481781,
0.2828628718852997,
0.15239620208740234,
0.20672409236431122,
-0.01710161194205284,
0.057171016931533813,
0.2741977572441101,
-0.28339987993240356,
0.15215659141540527,
-0.16851410269737244,
0.03231450542807579,
0.11446287482976913,
0.010785510763525963,
0.3133028745651245,
-0.1680246889591217,
-0.1670839488506317,
0.6094971299171448,
-0.09509458392858505,
0.2544980049133301,
0.2716864347457886,
-0.10468150675296783,
-0.04601908102631569,
-0.20818325877189636,
0.316895067691803,
0.2070881873369217,
-0.09887106716632843,
-0.10097163915634155,
0.45575961470603943,
-0.14202113449573517,
0.0006358474493026733,
0.5946588516235352,
0.0824923887848854,
-0.14985069632530212,
-0.16763916611671448,
0.5298154950141907,
0.2986045479774475,
-0.47440412640571594,
0.20270976424217224,
-0.020589863881468773,
-0.11136101186275482,
-0.006955709308385849,
0.3115817904472351,
0.10922366380691528,
0.045121725648641586,
0.062278203666210175,
0.3799900412559509,
0.5143902897834778,
-0.08595290780067444,
-0.013090036809444427,
-0.14053577184677124,
0.05490872263908386,
0.05379139631986618,
0.17505426704883575,
0.03576356917619705,
-0.11804033070802689,
-0.08420165628194809,
-1.0162023305892944,
0.45484668016433716,
-0.041707295924425125,
-0.012837667018175125,
-0.08528450131416321,
0.47874850034713745,
0.3541921377182007,
0.44514039158821106,
0.1704622209072113,
0.10690996050834656,
0.22439497709274292,
-0.28761807084083557,
-0.015430442988872528,
0.2886331379413605,
-0.10921400040388107,
0.49683505296707153,
-0.10254419595003128,
-0.2568889856338501,
0.08095221221446991,
-0.07067535817623138,
-0.009619936347007751,
0.05307179316878319,
-0.23309238255023956,
-0.28083837032318115,
0.16897746920585632,
0.021688027307391167,
-0.00023247097851708531,
-0.3605273365974426,
0.07533679157495499,
-0.12130733579397202,
-0.039953310042619705,
-0.37111446261405945,
-0.07736692577600479,
0.223618745803833,
-0.36727362871170044,
0.07029768079519272,
0.3830814063549042,
0.3205857276916504,
-0.2347639948129654,
0.4968554377555847,
0.20778894424438477,
0.10966993123292923,
0.17887985706329346,
0.12737932801246643,
0.022314341738820076,
0.020809408277273178,
-0.15976625680923462,
-0.06821513921022415,
0.25600671768188477,
0.14318645000457764,
0.3556611239910126,
0.0024081096053123474,
-0.31667742133140564,
0.1539919376373291,
0.12210056185722351,
0.17874829471111298,
0.17274171113967896,
0.08437713980674744,
0.006563544273376465,
0.04278605058789253,
-0.11804509162902832,
-0.640432596206665,
0.4159995913505554,
-0.15655693411827087,
0.000452214851975441,
-0.007832475006580353,
-0.1239515170454979,
-0.033913783729076385,
-0.00804026611149311,
-0.039979808032512665,
-0.30466172099113464,
0.14535090327262878,
0.20156355202198029,
0.15551048517227173,
-0.10501693934202194,
-0.023656148463487625,
-0.1272810995578766,
0.08221516013145447,
0.09779906272888184,
-0.04174267128109932,
-0.003034628927707672,
-0.2676335573196411,
-0.13232457637786865,
0.011867005378007889,
-0.3620102107524872,
0.08922325074672699,
-0.11781468987464905,
-0.13611043989658356,
-0.00817491952329874,
0.2655482292175293,
-0.2158588171005249,
-0.3205113410949707,
-0.06684566289186478,
-0.06981079280376434,
0.09203670918941498,
0.17211821675300598,
0.074589304625988,
0.008633479475975037,
0.18755601346492767,
-0.22791688144207,
0.6042030453681946,
0.05253290385007858,
-0.2862274944782257,
-0.08246660232543945,
0.05755845457315445,
-0.013685844838619232,
-0.010778233408927917,
0.07667674869298935,
0.10015806555747986,
0.029031241312623024,
0.12422969192266464,
-0.038609158247709274,
-0.19377511739730835,
-0.007013015449047089,
-0.09497478604316711,
-0.1150045394897461,
-0.02996974252164364,
-0.13688132166862488,
-0.29614579677581787,
-0.06703902781009674,
0.24610291421413422,
0.10379134863615036,
-0.2699393332004547,
-0.00326552614569664,
-0.3819425404071808,
-0.13133551180362701,
-0.3674200177192688,
0.07808002829551697,
-0.17998501658439636,
-0.03142908215522766,
-0.05304107815027237,
0.26139968633651733,
0.07692988216876984,
0.17945756018161774,
-0.163054421544075,
0.27177122235298157,
0.025882340967655182,
-0.15711794793605804,
-0.07109960913658142,
-0.27407339215278625,
-0.16725505888462067,
0.03376900777220726,
-0.10055319964885712,
-0.1613241583108902,
-0.02031153440475464,
0.17084400355815887,
0.08164612948894501,
0.29511189460754395,
0.24183516204357147,
0.061998795717954636,
0.09442254900932312,
-0.03408566862344742,
0.13461905717849731,
0.637144148349762,
0.08392370492219925,
-0.3203434348106384,
-0.07281184196472168,
0.08417101949453354,
-0.05697815120220184,
0.15125468373298645,
0.13256675004959106,
0.2109849750995636,
0.057893481105566025,
0.05613815784454346,
-0.03392866998910904,
0.8468532562255859,
0.09802539646625519,
0.13227559626102448,
0.14181628823280334,
0.09114871919155121,
0.11285598576068878,
0.09957842528820038,
-0.0400230847299099,
0.2745620012283325,
0.308298796415329,
-0.044965460896492004,
0.05808091536164284,
0.024082038551568985,
-0.06316030025482178,
-0.012494489550590515,
0.03365809842944145,
-0.29010164737701416,
0.006069745868444443,
0.07887351512908936,
0.06658467650413513,
0.21393507719039917,
-0.24972142279148102,
-0.1143409013748169,
-0.1618153601884842,
0.20600220561027527,
-0.15215758979320526,
0.18322956562042236,
0.07476778328418732,
-0.13772721588611603,
-0.0689559280872345,
-0.28167399764060974,
-0.24863657355308533,
0.5091082453727722,
-0.1753629893064499,
0.3318655490875244,
0.17121869325637817,
-0.18638679385185242,
0.36382484436035156,
-0.013737102970480919,
0.7675071954727173,
0.23529052734375,
-0.4202638864517212,
0.017898045480251312,
-0.2427128255367279,
-0.20879065990447998,
-0.2286337912082672,
-0.12451457977294922,
0.0480634942650795,
0.3989570736885071,
0.15441679954528809,
0.03764646500349045,
-0.48309409618377686,
0.01239826437085867,
-0.36051809787750244,
-0.04334478825330734,
-0.317427396774292,
-0.4575473666191101,
0.010971415787935257,
0.10151185095310211,
0.4976324141025543,
-0.021297428756952286,
-0.00556775601580739,
-0.10198726505041122,
0.14596915245056152,
-0.06743021309375763,
-0.07646670937538147,
0.10203198343515396,
0.125113844871521,
-0.11704439669847488,
0.12520542740821838,
0.047573257237672806,
0.47225502133369446,
0.11485055088996887,
0.25460484623908997,
-0.056476615369319916,
-0.09649723768234253,
0.025004610419273376,
-0.031932782381772995,
0.21829752624034882,
0.4033486545085907,
0.056783296167850494,
0.07040281593799591,
0.3438853621482849,
-0.13525919616222382,
0.2264484465122223,
0.08139864355325699,
-0.12674419581890106,
0.2333821952342987,
0.37900733947753906,
-0.21732938289642334,
-0.3472137153148651,
0.5030524134635925,
-0.0025708600878715515,
-0.26628246903419495,
0.10960584878921509,
0.23963382840156555,
-0.015135474503040314,
0.4082184433937073,
0.13225021958351135,
0.3797890543937683,
-0.10663427412509918,
-0.05206825211644173,
-0.14205709099769592,
-0.11521491408348083,
0.16052605211734772,
-0.463257372379303,
0.5313577651977539,
-0.2840900123119354,
0.07426659017801285,
0.048469461500644684,
-0.11398378014564514,
0.3977278172969818,
0.15510247647762299,
0.09790767729282379,
0.3222011625766754,
0.15847590565681458,
-0.38286474347114563,
-0.2195637822151184,
-0.0015788115561008453,
0.33310195803642273,
-0.09970740973949432,
0.2824176251888275,
-0.015538868494331837,
0.2870781421661377,
0.07745673507452011,
0.10401204973459244,
0.15445122122764587,
0.05929986760020256,
0.17331066727638245,
-0.17235341668128967,
-0.05943123996257782,
-0.140991672873497,
-0.028883755207061768,
0.26174306869506836,
0.00852147489786148,
0.15649989247322083,
-0.3011242151260376,
0.11877897381782532,
-0.42207959294319153,
-0.02041659690439701,
0.10797266662120819,
0.15778951346874237,
-0.16156713664531708,
-0.031027888879179955,
-0.6012329459190369,
0.10758743435144424,
0.053012482821941376,
-0.4066997766494751,
0.18094497919082642,
0.2802719175815582,
-0.4469122290611267,
-0.5664716958999634,
0.24439454078674316,
-0.19594158232212067,
0.3368561565876007,
-0.2065247744321823,
0.2001773715019226,
0.17394240200519562,
0.08836117386817932,
-0.009798826649785042,
0.18750321865081787,
-0.42737892270088196,
0.786785364151001,
-0.4109664857387543,
0.0036690011620521545,
-0.08305436372756958,
0.2044457197189331,
0.3193749785423279,
-0.5406742095947266,
-0.11504320800304413,
0.18929830193519592,
-0.03387819230556488,
0.07201126217842102,
-0.6295926570892334,
0.3859739303588867,
0.3701741397380829,
-0.11049839109182358,
0.014762086793780327,
-0.1154744029045105,
0.4618823230266571,
-0.1037134975194931,
0.08245164901018143,
-0.006436556577682495,
-0.3465085029602051,
0.06658250093460083,
0.08586278557777405,
-0.04652625322341919,
-0.1456562727689743,
0.1754927933216095,
0.2607996165752411,
-0.0693865567445755,
0.2146756947040558,
0.1547435075044632,
-0.1516224592924118,
0.08987214416265488,
-0.047987937927246094,
0.11734993010759354,
-0.09705458581447601,
0.1731286644935608,
-0.09762026369571686,
0.25426185131073,
-0.027232665568590164,
-0.20115533471107483,
-0.06317272037267685,
-0.09039361029863358,
0.154377281665802,
0.1495710015296936,
0.12571877241134644,
0.13859069347381592,
-0.21160274744033813,
-0.12037409096956253,
-0.24837732315063477,
-0.0619124174118042,
0.11059306561946869,
0.20749104022979736,
-0.2001875787973404,
-0.02384369447827339,
0.08880973607301712,
-0.4739762246608734,
0.05356425791978836,
0.2590045928955078,
0.2771303951740265,
-0.020835265517234802,
0.2486099749803543,
0.282361775636673,
-0.2950310707092285,
-0.09118945896625519,
-0.18546977639198303,
0.12928485870361328,
0.3625220060348511,
-0.006677068769931793,
-0.12076925486326218,
-0.08091005682945251,
-0.26544636487960815,
-0.09656204283237457,
0.3240003287792206,
0.2946838140487671,
0.16497927904129028,
-0.16477088630199432,
0.0644100159406662,
0.08695784956216812,
-0.1256529688835144,
-0.20131488144397736,
0.46763116121292114,
0.056356463581323624,
0.2942686975002289,
0.37089258432388306,
0.5588659048080444,
0.4426339864730835,
0.10931326448917389,
0.0003942493349313736,
0.27298593521118164,
0.4483987092971802,
-0.040350206196308136,
-0.5538935661315918,
0.40988031029701233,
0.0436973050236702,
0.21859803795814514,
0.2137598693370819,
0.13485534489154816,
0.48346179723739624,
-0.1823538839817047,
0.4163747727870941,
-0.061227887868881226,
-0.10177682340145111,
0.06656920164823532,
-0.32016676664352417,
0.36939874291419983,
0.04462722688913345,
-0.3777851462364197,
0.1196042001247406,
-0.29322290420532227,
0.18418702483177185,
-0.10387115925550461,
-0.34116455912590027,
-0.09539719671010971,
0.2186177670955658,
-0.057358868420124054,
-0.20184391736984253,
-0.022795505821704865,
-0.10972006618976593,
0.05738160014152527,
-0.04283897951245308,
0.21698884665966034,
-0.14054115116596222,
0.24136489629745483,
-0.13985933363437653,
0.18455198407173157,
0.23840422928333282,
-0.299867182970047,
0.352080762386322,
0.2575669288635254,
0.12442022562026978,
-0.03893445432186127,
-0.14630909264087677,
-0.17929312586784363,
0.1392917037010193,
0.15675459802150726,
0.23909080028533936,
0.29299643635749817,
-0.23539018630981445,
0.21168318390846252,
0.09719613194465637,
0.15099558234214783,
0.11251619458198547,
-0.10405513644218445,
0.020576082170009613,
-0.39959463477134705,
0.012055955827236176,
-0.011291474103927612,
0.03991256281733513,
-0.15393467247486115,
-0.06895986199378967,
0.0957273542881012,
-0.18934571743011475,
-0.200424462556839,
-0.4264685809612274,
-0.016081340610980988,
0.00021101906895637512,
0.1571541428565979,
-0.5345792770385742,
-0.04510745406150818,
0.3397083878517151,
-0.41444650292396545,
-0.12663647532463074,
0.07977451384067535,
-0.019402258098125458,
0.0859324038028717,
0.47526654601097107,
0.13345885276794434,
0.4678424894809723,
-0.2128678262233734,
-0.125944584608078,
-0.11483623087406158,
0.16939309239387512,
-0.07126425206661224,
0.16337260603904724,
0.012985168024897575,
0.6754266023635864,
-0.1259186565876007,
-0.18875089287757874,
0.5705519318580627,
0.21792620420455933,
0.3451805114746094,
0.7359471321105957,
0.05238191410899162,
0.2954805791378021,
-0.5614216327667236,
0.030341295525431633,
0.23207595944404602,
0.09419218450784683,
0.24213628470897675,
-0.25406402349472046,
-0.16690683364868164,
-0.21509824693202972,
0.23980313539505005,
0.3951708972454071,
-0.28833022713661194,
0.20391128957271576,
-0.025671502575278282,
0.1512461155653,
0.1494024395942688,
0.0965401902794838,
-0.2190125286579132,
0.20158782601356506,
-0.30145782232284546,
-0.297331303358078,
-0.09092143177986145,
-0.27745622396469116,
-0.14894390106201172,
-0.5878936648368835,
0.08814102411270142,
0.5046358108520508,
0.1354048103094101,
-0.44159650802612305,
0.15999062359333038,
0.04861736297607422,
-0.3023112714290619,
0.08209928870201111,
0.2810264229774475,
0.19523516297340393,
0.09006787836551666,
0.15699370205402374,
-0.3595295548439026,
0.21296857297420502,
0.14245863258838654,
-0.31853678822517395,
-0.14501670002937317,
-0.9662349820137024,
0.2949830889701843,
0.183394193649292,
0.2460106611251831,
-0.36756452918052673,
-0.2353726029396057,
0.09863505512475967,
0.2905646860599518,
-0.12628021836280823,
0.26492759585380554,
-0.049617700278759,
-0.22283485531806946,
-0.21203400194644928,
-0.687145471572876,
0.14781427383422852,
0.039441511034965515,
-0.038910362869501114,
-0.17555992305278778
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Hi ! Yes search_batch uses FAISS search which happens in parallel across the GPUs
> And I don't see any speed up when increasing the number of GPUs while calling get_nearest_examples_batch.
That's unexpected, can you share the code you're running ? | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 41 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Hi ! Yes search_batch uses FAISS search which happens in parallel across the GPUs
> And I don't see any speed up when increasing the number of GPUs while calling get_nearest_examples_batch.
That's unexpected, can you share the code you're running ? | [
-0.15467223525047302,
-0.7159871459007263,
-0.1338510811328888,
0.09435795992612839,
-0.3862565755844116,
-0.005067966878414154,
0.12590447068214417,
0.03864043951034546,
0.5229251980781555,
0.043653860688209534,
-0.25043079257011414,
-0.25392279028892517,
0.5126692056655884,
-0.18531039357185364,
-0.12711995840072632,
-0.1051214337348938,
0.44590798020362854,
-0.2907266914844513,
0.07569807022809982,
-0.25487759709358215,
-0.5102324485778809,
0.17282240092754364,
-0.3847532272338867,
-0.15646058320999146,
-0.24577896296977997,
0.19558016955852509,
-0.2504595220088959,
-0.04023563861846924,
0.11532749235630035,
-0.19739246368408203,
-0.32568639516830444,
0.17617881298065186,
0.11566539108753204,
0.508743166923523,
-0.0001239278499269858,
-0.22333385050296783,
-0.04164927452802658,
0.04735404998064041,
0.23121856153011322,
0.2460152804851532,
-0.11933788657188416,
0.15129363536834717,
-0.0462346151471138,
-0.00905396044254303,
-0.4496460556983948,
-0.03765510022640228,
0.19030988216400146,
-0.6122380495071411,
-0.15237031877040863,
0.024058599025011063,
0.0577487051486969,
-0.10610681772232056,
-0.013334676623344421,
-0.1459871381521225,
-0.06537923961877823,
-0.3491594195365906,
0.008931515738368034,
-0.05714833363890648,
0.5473130941390991,
-0.11466377228498459,
0.050277773290872574,
0.4145728349685669,
0.05554533004760742,
0.03700634464621544,
-0.09510894864797592,
0.10491146147251129,
0.3914238214492798,
-0.31645286083221436,
0.07778045535087585,
-0.1104743555188179,
-0.10317931324243546,
0.009932935237884521,
-0.2743939757347107,
-0.35617968440055847,
-0.19894477725028992,
-0.00683409720659256,
-0.14294502139091492,
0.12693524360656738,
-0.262163370847702,
-0.22749507427215576,
0.046005766838788986,
-0.18913671374320984,
0.00886499136686325,
0.005192860960960388,
0.23771920800209045,
0.544348955154419,
0.035578738898038864,
0.19305840134620667,
0.2394191175699234,
0.16272112727165222,
-0.28519684076309204,
-0.23542317748069763,
0.30723193287849426,
0.1472487598657608,
-0.932154655456543,
0.2180297076702118,
0.1645488142967224,
-0.1461358666419983,
0.14254260063171387,
-0.08058524876832962,
-0.33345848321914673,
0.06236960366368294,
0.09994366019964218,
0.16340945661067963,
0.03391863405704498,
-0.038766637444496155,
0.02702278271317482,
-0.1326953023672104,
-0.21287031471729279,
-0.17601023614406586,
-0.0952470600605011,
0.06962760537862778,
0.06243152916431427,
-0.3259327709674835,
-0.6529196500778198,
-0.057975105941295624,
0.0035442188382148743,
0.05159146711230278,
-0.049059346318244934,
-0.11595719307661057,
-0.050553690642118454,
-0.2602066993713379,
0.13830529153347015,
0.3391769826412201,
0.039854470640420914,
-0.010424450039863586,
-0.2595946788787842,
0.10183632373809814,
-0.1718776524066925,
-0.07586189359426498,
-0.07657632976770401,
-0.2230764627456665,
-0.08979223668575287,
0.29847216606140137,
0.027326177805662155,
-0.19063156843185425,
-0.011819785460829735,
0.09709466993808746,
0.16731777787208557,
0.1372705101966858,
0.04952999949455261,
-0.404594361782074,
0.3118857741355896,
0.14092832803726196,
0.17450177669525146,
0.04173550754785538,
0.05004509165883064,
0.26313143968582153,
-0.2868705093860626,
0.2402830719947815,
-0.23232463002204895,
-0.005182273685932159,
0.16363279521465302,
0.014764552935957909,
0.2936943769454956,
-0.2003251016139984,
-0.19828802347183228,
0.6022658348083496,
-0.02592381089925766,
0.27446502447128296,
0.3006410598754883,
-0.15187019109725952,
-0.05097007751464844,
-0.22930417954921722,
0.30358612537384033,
0.23836833238601685,
-0.1411604881286621,
-0.10513032972812653,
0.40702930092811584,
-0.1790534406900406,
0.041952282190322876,
0.6042368412017822,
0.10661313682794571,
-0.09492265433073044,
-0.18426696956157684,
0.5459069609642029,
0.27598971128463745,
-0.47542086243629456,
0.14467544853687286,
0.011681211180984974,
-0.13314956426620483,
0.009347924962639809,
0.2827919125556946,
0.14690639078617096,
0.030468296259641647,
0.06896259635686874,
0.3407857418060303,
0.5399976372718811,
-0.09247098118066788,
0.03974375128746033,
-0.21273303031921387,
0.06262397766113281,
0.07739117741584778,
0.1940591037273407,
0.047439709305763245,
-0.08018273860216141,
-0.10985911637544632,
-0.9981244802474976,
0.46751806139945984,
-0.029573913663625717,
-0.03356730937957764,
-0.06229044497013092,
0.5449064373970032,
0.3647984266281128,
0.4154358506202698,
0.1864738166332245,
0.17796994745731354,
0.21441879868507385,
-0.2595983147621155,
0.0016363225877285004,
0.28873002529144287,
-0.1343044638633728,
0.48308265209198,
-0.11609339714050293,
-0.31161463260650635,
0.06592127680778503,
-0.06183674558997154,
-0.024975508451461792,
0.027086567133665085,
-0.20005372166633606,
-0.2619345486164093,
0.15240231156349182,
0.04145212471485138,
-0.0535491406917572,
-0.3343023955821991,
0.07292832434177399,
-0.16085274517536163,
-0.004013051278889179,
-0.4059847593307495,
-0.10423504561185837,
0.26088008284568787,
-0.36201396584510803,
0.05540449917316437,
0.391268253326416,
0.26001647114753723,
-0.22178535163402557,
0.4436386823654175,
0.198346346616745,
0.08002234995365143,
0.14844168722629547,
0.09623446315526962,
-0.03214477002620697,
0.017868027091026306,
-0.19830924272537231,
0.018143177032470703,
0.26143911480903625,
0.12207642197608948,
0.3869655728340149,
-0.0030460990965366364,
-0.29803526401519775,
0.1133025586605072,
0.10902097821235657,
0.17401057481765747,
0.17565900087356567,
0.09102127701044083,
-0.09152436256408691,
0.023732908070087433,
-0.1547021120786667,
-0.6504324078559875,
0.4170294404029846,
-0.12950576841831207,
-0.01671680063009262,
-0.0004904866218566895,
-0.11817269772291183,
-0.06977943331003189,
0.009022824466228485,
-0.0534568727016449,
-0.3128722012042999,
0.16707874834537506,
0.22037336230278015,
0.13486619293689728,
-0.07202214002609253,
0.05362439155578613,
-0.12687772512435913,
0.11570145189762115,
0.15400031208992004,
-0.03310671076178551,
-0.03863448649644852,
-0.24986809492111206,
-0.0936298742890358,
0.040725842118263245,
-0.289590448141098,
0.07833515107631683,
-0.15931111574172974,
-0.1673397719860077,
0.052782751619815826,
0.25493088364601135,
-0.22642233967781067,
-0.3312080502510071,
-0.0851440504193306,
-0.0937640517950058,
0.07841267436742783,
0.16296207904815674,
0.02602505311369896,
0.05608919635415077,
0.15187957882881165,
-0.2143334597349167,
0.5973562598228455,
0.04961155354976654,
-0.3592865467071533,
-0.07972167432308197,
0.01153015810996294,
-0.033868975937366486,
-0.012620529159903526,
0.10636293888092041,
0.11684363335371017,
0.048576172441244125,
0.13826291263103485,
-0.02793649211525917,
-0.21191321313381195,
0.01364985853433609,
-0.1216396689414978,
-0.18878358602523804,
-0.007791411131620407,
-0.20029380917549133,
-0.3032268285751343,
-0.12043996155261993,
0.246641144156456,
0.10228443890810013,
-0.3253389596939087,
-0.028848350048065186,
-0.3892688453197479,
-0.11925654113292694,
-0.343457967042923,
0.06831316649913788,
-0.14257076382637024,
-0.040952615439891815,
-0.06796998530626297,
0.26736605167388916,
0.05805729702115059,
0.2019684910774231,
-0.14842797815799713,
0.20910488069057465,
0.006665749475359917,
-0.17901355028152466,
-0.06414583325386047,
-0.27862587571144104,
-0.17986421287059784,
0.044858478009700775,
-0.0723876878619194,
-0.20095014572143555,
-0.02804870717227459,
0.1505645364522934,
0.06067502126097679,
0.2763955593109131,
0.17249761521816254,
0.09856443107128143,
0.13082371652126312,
-0.023550592362880707,
0.11364497989416122,
0.5772022604942322,
0.11949406564235687,
-0.34068048000335693,
-0.06707268208265305,
0.1128992959856987,
-0.057992640882730484,
0.10245668888092041,
0.1286751925945282,
0.25503841042518616,
0.023202339187264442,
0.06637956947088242,
-0.053298160433769226,
0.8648144006729126,
0.06891117990016937,
0.17630420625209808,
0.15744104981422424,
0.08128398656845093,
0.09248489141464233,
0.07988528162240982,
-0.09408540278673172,
0.27517473697662354,
0.23663868010044098,
-0.10223685950040817,
0.032726749777793884,
0.016092227771878242,
-0.07440280169248581,
-0.054042670875787735,
-0.02247196063399315,
-0.3148226737976074,
0.00042458251118659973,
0.0859258621931076,
0.058835506439208984,
0.2124689221382141,
-0.2536085546016693,
-0.0789542868733406,
-0.12359622120857239,
0.16951477527618408,
-0.14370526373386383,
0.19589462876319885,
0.10831110924482346,
-0.1718539446592331,
-0.06429142504930496,
-0.24595172703266144,
-0.31518086791038513,
0.5276297926902771,
-0.18580618500709534,
0.3415635824203491,
0.15501652657985687,
-0.20143553614616394,
0.3746033310890198,
-0.011740542948246002,
0.8306583762168884,
0.2467740774154663,
-0.4186643362045288,
0.06687602400779724,
-0.2852753698825836,
-0.19860465824604034,
-0.27076247334480286,
-0.13999561965465546,
0.018088869750499725,
0.44912898540496826,
0.11337878555059433,
0.1253293752670288,
-0.44540148973464966,
0.014643736183643341,
-0.3250264823436737,
-0.026316439732909203,
-0.3668014705181122,
-0.4909721612930298,
-0.0156656876206398,
0.17246395349502563,
0.5089630484580994,
-0.031681887805461884,
0.0034405789338052273,
-0.17065170407295227,
0.20882223546504974,
-0.05950026214122772,
-0.020899858325719833,
0.09300242364406586,
0.031217996031045914,
-0.07813452929258347,
0.1005927249789238,
0.033191610127687454,
0.4767743945121765,
0.1209283173084259,
0.27289050817489624,
-0.06214235723018646,
-0.10150587558746338,
0.06946499645709991,
-0.07781999558210373,
0.17600317299365997,
0.4117877185344696,
0.10299085825681686,
0.11439059674739838,
0.3416368067264557,
-0.13937799632549286,
0.19925834238529205,
0.046318791806697845,
-0.18205317854881287,
0.2378903180360794,
0.3798152506351471,
-0.2669024169445038,
-0.324568510055542,
0.5210744738578796,
0.033065758645534515,
-0.25937098264694214,
0.16953302919864655,
0.25098463892936707,
-0.04505929350852966,
0.4457881450653076,
0.11427576094865799,
0.4394269585609436,
-0.09326303005218506,
-0.04970667138695717,
-0.14755737781524658,
-0.07536637037992477,
0.16876231133937836,
-0.4174497723579407,
0.5680997967720032,
-0.32170993089675903,
0.02469729259610176,
0.018298553302884102,
-0.15262295305728912,
0.3911396861076355,
0.16974502801895142,
0.08406254649162292,
0.33727729320526123,
0.09517446160316467,
-0.3678109645843506,
-0.23082177340984344,
-0.05534029379487038,
0.33345064520835876,
-0.09241229295730591,
0.3050970435142517,
0.009443007409572601,
0.29095470905303955,
0.1859724521636963,
0.07645002752542496,
0.1230766624212265,
-0.006196185946464539,
0.15886399149894714,
-0.1547738015651703,
-0.03400709107518196,
-0.08802814036607742,
-0.03737856447696686,
0.23375140130519867,
-0.02206616848707199,
0.21525609493255615,
-0.3132742643356323,
0.16938750445842743,
-0.45166268944740295,
-0.040362268686294556,
0.1324935406446457,
0.2636255919933319,
-0.13698682188987732,
0.03142886981368065,
-0.6385831236839294,
0.11996862292289734,
0.04040660709142685,
-0.4293919801712036,
0.14256365597248077,
0.2679130434989929,
-0.4916398525238037,
-0.5969363451004028,
0.2881706953048706,
-0.18949761986732483,
0.33156540989875793,
-0.2443423867225647,
0.2035588026046753,
0.17935635149478912,
0.10522657632827759,
0.004844550043344498,
0.126051127910614,
-0.389207661151886,
0.7905147671699524,
-0.3959270417690277,
-0.024946648627519608,
-0.08365930616855621,
0.25736406445503235,
0.3016130328178406,
-0.5706115961074829,
-0.04602968692779541,
0.15390914678573608,
-0.05265568196773529,
0.04543604701757431,
-0.5661801695823669,
0.3506183326244354,
0.349055677652359,
-0.18460167944431305,
-0.0009380171541124582,
-0.01951546221971512,
0.47317302227020264,
-0.08349353075027466,
0.047847848385572433,
-0.012204647064208984,
-0.35063713788986206,
0.055471524596214294,
0.09794881939888,
-0.09662219882011414,
-0.15211014449596405,
0.13164937496185303,
0.25210127234458923,
-0.08016523718833923,
0.26063254475593567,
0.16027608513832092,
-0.16571611166000366,
0.0809866338968277,
-0.0271163210272789,
0.11535046249628067,
-0.11706805229187012,
0.20247316360473633,
-0.0384274385869503,
0.20054157078266144,
-0.018025599420070648,
-0.15402621030807495,
-0.04310465604066849,
-0.11402875930070877,
0.19432471692562103,
0.15712440013885498,
0.15210914611816406,
0.14691703021526337,
-0.20117147266864777,
-0.11338720470666885,
-0.2531995177268982,
-0.03420623019337654,
0.06995214521884918,
0.25710123777389526,
-0.18771441280841827,
-0.02943143993616104,
0.09820064902305603,
-0.46139833331108093,
0.07500210404396057,
0.2776184678077698,
0.23429447412490845,
0.027537383139133453,
0.255653977394104,
0.23973135650157928,
-0.24189645051956177,
-0.05155440419912338,
-0.18526805937290192,
0.12190559506416321,
0.32077836990356445,
0.048037730157375336,
-0.0806158110499382,
-0.1000434160232544,
-0.23870757222175598,
-0.07711518555879593,
0.2855500280857086,
0.3056255578994751,
0.09009300917387009,
-0.13929113745689392,
0.061961494386196136,
0.10990060120820999,
-0.11546468734741211,
-0.1653318852186203,
0.48543474078178406,
0.09207843989133835,
0.2391766905784607,
0.37573832273483276,
0.549957275390625,
0.4009784162044525,
0.07762061059474945,
0.017439693212509155,
0.27744242548942566,
0.4415724277496338,
0.02382863685488701,
-0.5163687467575073,
0.4318163990974426,
0.06219720467925072,
0.23637525737285614,
0.21552516520023346,
0.07131727039813995,
0.4634326100349426,
-0.12736636400222778,
0.3787728250026703,
-0.05757737159729004,
-0.13708196580410004,
0.05911250412464142,
-0.32547712326049805,
0.3359118700027466,
0.008269965648651123,
-0.39221668243408203,
0.11499734967947006,
-0.3155842423439026,
0.18604278564453125,
-0.1410117894411087,
-0.3760451078414917,
-0.1110818162560463,
0.18159101903438568,
-0.05886191874742508,
-0.11535583436489105,
-0.05214365944266319,
-0.07730092108249664,
0.10434553027153015,
-0.04505445435643196,
0.2063993364572525,
-0.1307196021080017,
0.19795580208301544,
-0.08134572207927704,
0.1698789894580841,
0.2375056892633438,
-0.35919126868247986,
0.3468003273010254,
0.3285578191280365,
0.07797613739967346,
-0.09429707378149033,
-0.15811406075954437,
-0.16129837930202484,
0.19976790249347687,
0.15974746644496918,
0.2258499711751938,
0.3717882037162781,
-0.23390942811965942,
0.20195536315441132,
0.0769202783703804,
0.1362469643354416,
0.16932211816310883,
-0.06501586735248566,
0.05185040831565857,
-0.3906790316104889,
0.03856002539396286,
-0.0036983471363782883,
0.05273591727018356,
-0.060838405042886734,
-0.029258210211992264,
0.16611303389072418,
-0.1998269259929657,
-0.19892334938049316,
-0.45411863923072815,
-0.04385757818818092,
-0.050474613904953,
0.11414362490177155,
-0.49889981746673584,
0.007236468605697155,
0.36436283588409424,
-0.3990703821182251,
-0.09259220212697983,
0.05400614067912102,
-0.015050560235977173,
0.09230509400367737,
0.480597585439682,
0.1817125380039215,
0.45092612504959106,
-0.26822057366371155,
-0.1374262571334839,
-0.14239321649074554,
0.15568456053733826,
-0.09706549346446991,
0.22502067685127258,
0.007018484640866518,
0.6475414633750916,
-0.07554738968610764,
-0.1773623824119568,
0.5349228382110596,
0.1597122848033905,
0.30001112818717957,
0.7447770833969116,
0.04796895757317543,
0.2882186472415924,
-0.5527173280715942,
0.05708771198987961,
0.21098284423351288,
0.07234078645706177,
0.2954600751399994,
-0.2668275535106659,
-0.14787742495536804,
-0.20988285541534424,
0.2470780909061432,
0.3975366950035095,
-0.2398352324962616,
0.20824682712554932,
-0.07062142342329025,
0.17172664403915405,
0.1549738049507141,
0.09868019074201584,
-0.2010926604270935,
0.19196346402168274,
-0.3115547299385071,
-0.2477630376815796,
-0.0879700630903244,
-0.3060647249221802,
-0.12475546449422836,
-0.6099233031272888,
0.05804891139268875,
0.49271512031555176,
0.096108078956604,
-0.45817074179649353,
0.13206255435943604,
-0.00997496210038662,
-0.27092185616493225,
0.046494051814079285,
0.29605045914649963,
0.1481916755437851,
0.0695582702755928,
0.15286976099014282,
-0.3972702622413635,
0.19238685071468353,
0.18571968376636505,
-0.3353327512741089,
-0.14877906441688538,
-0.9851630926132202,
0.3234030306339264,
0.17909979820251465,
0.25722476840019226,
-0.36865755915641785,
-0.24971026182174683,
0.14734391868114471,
0.32686692476272583,
-0.129335418343544,
0.2467491626739502,
-0.06919924914836884,
-0.20071448385715485,
-0.21369095146656036,
-0.6262872219085693,
0.0940103754401207,
0.08926517516374588,
-0.050065699964761734,
-0.17343397438526154
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | here is the code snippet
```python
# add faiss index
source_dataset = load_dataset(source_path)
queries = load_dataset(query_path)
gpu = [0,1,2,3]
source_dataset.add_faiss_index(
"embedding",
device=gpu,
)
# batch query
batch_size = 32
for i in tqdm(range(0, len(queries), batch_size)):
if i + batch_size >= len(queries):
batched_queries = queries[i:]
else:
batched_queries = queries[i:i+batch_size]
batched_query_embeddings = np.stack([i for i in batched_queries['embedding']], axis=0)
scores, candidates = source_dataset.get_nearest_examples_batch(
"embedding",
batched_query_embeddings,
k=5
)
``` | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 65 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
here is the code snippet
```python
# add faiss index
source_dataset = load_dataset(source_path)
queries = load_dataset(query_path)
gpu = [0,1,2,3]
source_dataset.add_faiss_index(
"embedding",
device=gpu,
)
# batch query
batch_size = 32
for i in tqdm(range(0, len(queries), batch_size)):
if i + batch_size >= len(queries):
batched_queries = queries[i:]
else:
batched_queries = queries[i:i+batch_size]
batched_query_embeddings = np.stack([i for i in batched_queries['embedding']], axis=0)
scores, candidates = source_dataset.get_nearest_examples_batch(
"embedding",
batched_query_embeddings,
k=5
)
``` | [
-0.20685411989688873,
-0.6374272108078003,
-0.16138027608394623,
0.07671567797660828,
-0.3966125249862671,
0.06628788262605667,
0.12914201617240906,
0.10195738077163696,
0.6137714982032776,
0.07456554472446442,
-0.20291566848754883,
-0.17052660882472992,
0.5054278373718262,
-0.1362493634223938,
-0.13221141695976257,
0.004394881427288055,
0.40040844678878784,
-0.18561357259750366,
0.0711088478565216,
-0.18026642501354218,
-0.5938422083854675,
0.10579457879066467,
-0.3156263828277588,
-0.1370689421892166,
-0.15197518467903137,
0.13110537827014923,
-0.23458687961101532,
-0.06109736114740372,
0.13927733898162842,
-0.22453829646110535,
-0.2895793914794922,
0.15281812846660614,
0.19044727087020874,
0.46138036251068115,
-0.00012577381858136505,
-0.12455068528652191,
-0.11033356189727783,
-0.0058771762996912,
0.1504320353269577,
0.3383648097515106,
-0.052244290709495544,
0.18363632261753082,
0.053713828325271606,
-0.05688171088695526,
-0.38837847113609314,
-0.11897691339254379,
0.22319307923316956,
-0.7245956063270569,
-0.15721164643764496,
-0.005236491560935974,
0.03456682711839676,
0.06625520437955856,
-0.07942654192447662,
-0.17776745557785034,
-0.09124987572431564,
-0.424437940120697,
-0.030359821394085884,
-0.10535094141960144,
0.4555957615375519,
-0.06314753741025925,
0.0057688429951667786,
0.4405937194824219,
0.030794957652688026,
0.082534059882164,
-0.10100739449262619,
0.08533455431461334,
0.5185161828994751,
-0.3784262239933014,
0.09587375819683075,
-0.1885644495487213,
-0.16334643959999084,
-0.07232886552810669,
-0.2900640368461609,
-0.388698548078537,
-0.20845697820186615,
-0.06675867736339569,
-0.19677221775054932,
0.09428708255290985,
-0.2421787530183792,
-0.2093910276889801,
0.2178025096654892,
-0.16775277256965637,
0.037949539721012115,
-0.010242842137813568,
0.1836317628622055,
0.4764055013656616,
0.08614308387041092,
0.24303790926933289,
0.21932850778102875,
0.1843845546245575,
-0.23530668020248413,
-0.2141495794057846,
0.3190593719482422,
0.12242580950260162,
-0.9413267970085144,
0.20379415154457092,
0.22231215238571167,
-0.3816118538379669,
0.10351712256669998,
-0.0770290270447731,
-0.29270192980766296,
0.11334015429019928,
0.0973852127790451,
0.14431113004684448,
0.06705578416585922,
-0.11250440776348114,
-0.040530018508434296,
-0.2015576958656311,
-0.24547971785068512,
-0.18467900156974792,
-0.05758175253868103,
0.08323265612125397,
0.13701646029949188,
-0.2834440767765045,
-0.5978192687034607,
-0.049122631549835205,
0.023256614804267883,
0.13720878958702087,
-0.1735464632511139,
-0.04456965625286102,
-0.02057487703859806,
-0.1517251878976822,
0.15299250185489655,
0.33025848865509033,
0.08588497340679169,
-0.0024203211069107056,
-0.18818819522857666,
0.24127276241779327,
-0.22411198914051056,
-0.001003640703856945,
-0.08542792499065399,
-0.2541021704673767,
0.0017389953136444092,
0.30419906973838806,
-0.0005174092948436737,
-0.2434842884540558,
-0.0027861003763973713,
0.056161873042583466,
0.19458705186843872,
0.1413620412349701,
0.12717191874980927,
-0.3370552361011505,
0.3738362491130829,
0.2177075445652008,
0.310953825712204,
0.03784161061048508,
0.12606771290302277,
0.27338963747024536,
-0.29026517271995544,
0.2201920449733734,
-0.16129231452941895,
0.055435869842767715,
0.20210854709148407,
0.015058513730764389,
0.32677745819091797,
-0.17062781751155853,
-0.05898072570562363,
0.5309311151504517,
0.043783754110336304,
0.2723785638809204,
0.3362721800804138,
-0.177128866314888,
-0.036767370998859406,
-0.23119841516017914,
0.2660648226737976,
0.1528383493423462,
-0.03592218831181526,
-0.15599939227104187,
0.40110984444618225,
-0.11406528949737549,
-0.031232498586177826,
0.6142581105232239,
0.17505767941474915,
-0.11366865783929825,
-0.24068745970726013,
0.6398398876190186,
0.3152898848056793,
-0.5500611066818237,
0.20784923434257507,
-0.10371935367584229,
-0.1290961503982544,
-0.009665437042713165,
0.20134449005126953,
0.1565922349691391,
0.02587106265127659,
0.05347491800785065,
0.3810458779335022,
0.4993857741355896,
-0.12477613985538483,
0.04319935292005539,
-0.09293825924396515,
0.06917087733745575,
0.1706215888261795,
0.1951933205127716,
0.15054509043693542,
-0.08363207429647446,
-0.09525247663259506,
-1.0355610847473145,
0.4587692618370056,
-0.08027224242687225,
0.04273831099271774,
-0.1725264936685562,
0.4733820855617523,
0.4077882766723633,
0.40455183386802673,
0.17793330550193787,
0.11794125288724899,
0.19785603880882263,
-0.3176436126232147,
0.007336389273405075,
0.2183859497308731,
-0.17527715861797333,
0.48659372329711914,
-0.02690225839614868,
-0.28969958424568176,
0.15645469725131989,
-0.06938272714614868,
0.06771344691514969,
-0.007449427619576454,
-0.1746387630701065,
-0.3034876585006714,
0.08495522290468216,
0.01683305762708187,
-0.03235580772161484,
-0.4545615017414093,
0.08097560703754425,
-0.05510847270488739,
-0.0504130981862545,
-0.36220264434814453,
-0.012394137680530548,
0.34769001603126526,
-0.30644553899765015,
0.10998733341693878,
0.3545529842376709,
0.21204835176467896,
-0.29502010345458984,
0.414400577545166,
0.19418972730636597,
0.029894277453422546,
0.10608695447444916,
0.04242103919386864,
0.06815031170845032,
0.07586400210857391,
-0.17450520396232605,
0.19980540871620178,
0.3618541955947876,
0.11509726941585541,
0.4043820798397064,
-0.03729555755853653,
-0.2835873067378998,
0.10376353561878204,
0.13232165575027466,
0.05899147689342499,
0.134574756026268,
-0.08416591584682465,
-0.09458835422992706,
-0.020731918513774872,
-0.22528864443302155,
-0.6232767105102539,
0.3871798813343048,
-0.12014670670032501,
0.02884819731116295,
0.08959178626537323,
-0.22198405861854553,
-0.07323556393384933,
0.06383445858955383,
-0.08114194124937057,
-0.47283121943473816,
0.1848519742488861,
0.19271065294742584,
0.2139621078968048,
-0.09357251226902008,
-0.01250146608799696,
-0.10732710361480713,
0.13742011785507202,
0.16127744317054749,
0.0027844335418194532,
0.08823727816343307,
-0.18976938724517822,
-0.12141517549753189,
-0.04601644352078438,
-0.18858109414577484,
0.014518588781356812,
-0.19407738745212555,
-0.1503327637910843,
0.06738089770078659,
0.23874220252037048,
-0.09639805555343628,
-0.2475757598876953,
-0.1367512047290802,
-0.02335512265563011,
0.01717943511903286,
0.18093307316303253,
0.021030908450484276,
-0.09462141245603561,
0.17332765460014343,
-0.23600448668003082,
0.5652759075164795,
0.20201367139816284,
-0.3317797780036926,
-0.08773507177829742,
-0.004727949853986502,
-0.015338294208049774,
-0.02997618354856968,
0.030771534889936447,
0.0862622857093811,
0.11731305718421936,
0.12050869315862656,
-0.058600202202796936,
-0.35542088747024536,
0.034794509410858154,
-0.11984489858150482,
-0.18124200403690338,
-0.06260202825069427,
-0.1463685929775238,
-0.26690876483917236,
-0.09423269331455231,
0.24108947813510895,
0.06457503139972687,
-0.24607355892658234,
0.0034398995339870453,
-0.3730415403842926,
-0.059720054268836975,
-0.3006197214126587,
0.03707883879542351,
-0.13755756616592407,
-0.004752965644001961,
-0.10794442892074585,
0.15843413770198822,
-0.0004409216344356537,
0.18900126218795776,
-0.06354229897260666,
0.2520771622657776,
-0.026231996715068817,
-0.13925686478614807,
-0.1537301242351532,
-0.359343022108078,
-0.03439629077911377,
0.03702365607023239,
-0.10922026634216309,
-0.13656261563301086,
-0.0033098533749580383,
0.10336039960384369,
0.03802550956606865,
0.4099630117416382,
0.15928901731967926,
0.04922725632786751,
0.13373547792434692,
0.09075142443180084,
0.09019974619150162,
0.6331669688224792,
0.09058687835931778,
-0.2795993685722351,
-0.044002097100019455,
0.0910322442650795,
-0.010950131341814995,
0.14888030290603638,
0.14894728362560272,
0.17108094692230225,
0.0022425632923841476,
0.09904170781373978,
-0.0453529953956604,
0.7542966604232788,
0.08783164620399475,
0.0324510894715786,
0.2597029209136963,
0.008948054164648056,
0.14289961755275726,
0.08774811029434204,
-0.05210418999195099,
0.21369315683841705,
0.2503482401371002,
-0.07617799937725067,
0.048289090394973755,
-0.09409079700708389,
-0.061193108558654785,
0.030219875276088715,
0.05061858519911766,
-0.33069396018981934,
-0.06101076677441597,
0.0893673226237297,
0.037847600877285004,
0.3231603801250458,
-0.2454751878976822,
-0.007515348494052887,
-0.13754065334796906,
0.2227240800857544,
-0.14753364026546478,
0.16898959875106812,
0.1387028992176056,
-0.10672582685947418,
0.018705200403928757,
-0.25142717361450195,
-0.28665706515312195,
0.4977291226387024,
-0.18505901098251343,
0.38089361786842346,
0.17963539063930511,
-0.2875259518623352,
0.3458479046821594,
-0.047785401344299316,
0.8706555962562561,
0.15300880372524261,
-0.31105589866638184,
-0.043425194919109344,
-0.1778704971075058,
-0.30404648184776306,
-0.20217637717723846,
-0.13412922620773315,
0.16572313010692596,
0.3417930006980896,
0.14058275520801544,
0.026652522385120392,
-0.42940255999565125,
-0.012141909450292587,
-0.2996225953102112,
-0.05760248005390167,
-0.3255275785923004,
-0.5510751008987427,
-0.13967746496200562,
0.0976518765091896,
0.5396304130554199,
0.07072176784276962,
0.0005991426296532154,
-0.10946988314390182,
0.13675180077552795,
-0.2160755842924118,
-0.04282744228839874,
0.09756968915462494,
0.1310729682445526,
-0.07508961856365204,
0.13463221490383148,
0.013773016631603241,
0.3677901029586792,
0.05059152841567993,
0.2582018971443176,
-0.041637830436229706,
-0.05339200422167778,
0.010810181498527527,
0.020560050383210182,
0.1673256903886795,
0.36648479104042053,
0.15427926182746887,
0.13005287945270538,
0.3705936670303345,
-0.13619087636470795,
0.1775742918252945,
0.042849794030189514,
-0.17170082032680511,
0.22531557083129883,
0.35071566700935364,
-0.22624088823795319,
-0.36823928356170654,
0.5100325345993042,
-0.08203431963920593,
-0.28342634439468384,
0.03181687742471695,
0.2714557647705078,
-0.0472782626748085,
0.5411624908447266,
0.1069202646613121,
0.36036232113838196,
-0.025479719042778015,
-0.027716662734746933,
0.08920430392026901,
-0.04032827168703079,
0.16680093109607697,
-0.43861979246139526,
0.5456516146659851,
-0.33814913034439087,
0.10494647175073624,
-0.009761659428477287,
-0.1388997733592987,
0.32614943385124207,
0.13326624035835266,
0.13253474235534668,
0.29668131470680237,
0.1625024825334549,
-0.3713400959968567,
-0.1907152384519577,
-0.026775915175676346,
0.22798550128936768,
-0.11429394781589508,
0.22727437317371368,
-0.025859924033284187,
0.2753426134586334,
0.07323160767555237,
0.04202795401215553,
0.12133052200078964,
0.06467641890048981,
0.1010826975107193,
-0.1190834641456604,
-0.09286662936210632,
-0.03732313588261604,
0.012087227776646614,
0.26202327013015747,
0.022208355367183685,
0.09580822288990021,
-0.3296065032482147,
0.2448607236146927,
-0.416268914937973,
0.08447843790054321,
0.1032835841178894,
0.24211028218269348,
-0.13072867691516876,
-0.07008229196071625,
-0.6499015092849731,
0.18466515839099884,
0.0913071408867836,
-0.3685290217399597,
0.1999596655368805,
0.260885626077652,
-0.4499484896659851,
-0.5253982543945312,
0.38226544857025146,
-0.21143649518489838,
0.273646742105484,
-0.2451237291097641,
0.1765623390674591,
0.19839811325073242,
0.042851660400629044,
-0.04379435256123543,
0.13069194555282593,
-0.4151917099952698,
0.7072919011116028,
-0.3891693353652954,
-0.06659196317195892,
-0.04415033385157585,
0.1576569527387619,
0.30079659819602966,
-0.4530797600746155,
-0.033737264573574066,
0.12680111825466156,
-0.09278136491775513,
-0.02621457725763321,
-0.6441051959991455,
0.3176296651363373,
0.3764783442020416,
-0.03926025703549385,
0.06496597826480865,
-0.06037265807390213,
0.3638696074485779,
-0.1673252284526825,
-0.03271816670894623,
-0.05197250843048096,
-0.3706000745296478,
0.011202208697795868,
0.14215129613876343,
-0.09098117053508759,
-0.09239727258682251,
0.2608179748058319,
0.34924280643463135,
-0.06713314354419708,
0.10674889385700226,
0.08251700550317764,
-0.14324086904525757,
0.11722320318222046,
-0.017685243859887123,
0.18051324784755707,
-0.12458884716033936,
0.16493305563926697,
-0.07126403599977493,
0.20554953813552856,
-0.027088038623332977,
-0.12046423554420471,
-0.08657830208539963,
-0.10109113901853561,
0.20238833129405975,
0.1478673219680786,
0.1582636535167694,
0.1996850222349167,
-0.22402258217334747,
-0.13667508959770203,
-0.2553187906742096,
-0.06873375922441483,
0.2361738383769989,
0.22610118985176086,
-0.20429708063602448,
-0.03782805800437927,
0.17879745364189148,
-0.31387317180633545,
0.045250676572322845,
0.30175819993019104,
0.21771295368671417,
0.03969613462686539,
0.23323318362236023,
0.28648772835731506,
-0.3278639018535614,
0.028537586331367493,
-0.15648908913135529,
0.12691539525985718,
0.5348151922225952,
-0.04558423161506653,
-0.11277002841234207,
-0.1153557151556015,
-0.347915917634964,
-0.1753999888896942,
0.2705666422843933,
0.3351653516292572,
0.08529642224311829,
-0.23467512428760529,
0.0005164714530110359,
0.09656268358230591,
-0.17688162624835968,
-0.008868027478456497,
0.4539988040924072,
0.00929076038300991,
0.3159977197647095,
0.4204399883747101,
0.5651062726974487,
0.32431548833847046,
0.02253371849656105,
-0.01641956903040409,
0.3000873327255249,
0.5378022193908691,
0.006142959930002689,
-0.5458564162254333,
0.40551090240478516,
0.04370342195034027,
0.23476646840572357,
0.1298714131116867,
0.1202387586236,
0.4712564945220947,
-0.2233341932296753,
0.4132724404335022,
-0.043377406895160675,
-0.24769163131713867,
-0.10823192447423935,
-0.2843126356601715,
0.3498413562774658,
0.03698872774839401,
-0.2902073264122009,
0.15859831869602203,
-0.20429575443267822,
0.137239009141922,
-0.12097538262605667,
-0.3339554965496063,
-0.1152326911687851,
0.22131197154521942,
-0.1261969804763794,
-0.1672232300043106,
-0.04117564111948013,
-0.0860704705119133,
0.04184293746948242,
-0.006208786740899086,
0.21389834582805634,
-0.1265474557876587,
0.07229101657867432,
-0.04595976322889328,
0.16661491990089417,
0.23559193313121796,
-0.2630214989185333,
0.3929380476474762,
0.18094703555107117,
0.09991884231567383,
-0.06774765253067017,
-0.03851050138473511,
-0.141556516289711,
0.1654181033372879,
0.1933305263519287,
0.2665735185146332,
0.3401418626308441,
-0.3239855170249939,
0.19268837571144104,
0.09342099726200104,
0.08685105293989182,
0.02640772983431816,
-0.23970994353294373,
-0.08062610030174255,
-0.318234384059906,
0.15685416758060455,
0.005508739501237869,
0.024856094270944595,
-0.16156607866287231,
-0.006488729268312454,
0.2203400433063507,
-0.2105892300605774,
-0.2412710189819336,
-0.44481757283210754,
0.058742955327034,
-0.012242503464221954,
0.09537573903799057,
-0.573715090751648,
-0.04331018775701523,
0.32751205563545227,
-0.46283721923828125,
-0.07564836740493774,
0.05373367667198181,
-0.019716501235961914,
0.02011125348508358,
0.47221049666404724,
0.14487841725349426,
0.36334294080734253,
-0.23597201704978943,
-0.02881714701652527,
-0.20026065409183502,
0.26493191719055176,
-0.08383281528949738,
0.12217594683170319,
0.014332219026982784,
0.6891952157020569,
-0.03844640403985977,
-0.15967492759227753,
0.528346836566925,
0.1653321534395218,
0.3352719843387604,
0.7621440887451172,
0.036084938794374466,
0.32593676447868347,
-0.5766115188598633,
-0.0020615719258785248,
0.218771830201149,
-0.024002250283956528,
0.1546374410390854,
-0.21037445962429047,
-0.15336501598358154,
-0.15367890894412994,
0.16529202461242676,
0.32692503929138184,
-0.2950771749019623,
0.40171003341674805,
-0.015363866463303566,
0.13170576095581055,
0.010799892246723175,
0.021943384781479836,
-0.20291918516159058,
0.1911228597164154,
-0.3481898307800293,
-0.19932624697685242,
-0.1716458797454834,
-0.19839608669281006,
-0.17270253598690033,
-0.5799766778945923,
0.06863253563642502,
0.46419402956962585,
0.10466793179512024,
-0.48299017548561096,
0.17488132417201996,
0.16975487768650055,
-0.3716757595539093,
0.06755518168210983,
0.2361791878938675,
0.14874860644340515,
0.11863996833562851,
0.2730403244495392,
-0.355540931224823,
0.10152028501033783,
0.18088433146476746,
-0.3976806104183197,
-0.260722815990448,
-0.8614660501480103,
0.29729461669921875,
0.2415471076965332,
0.28417566418647766,
-0.4401949942111969,
-0.20177581906318665,
0.11151169240474701,
0.29243984818458557,
-0.151604562997818,
0.18225285410881042,
-0.12999173998832703,
-0.2662607431411743,
-0.22558730840682983,
-0.6055550575256348,
0.16725662350654602,
0.02688107080757618,
-0.023374658077955246,
-0.24556052684783936
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | The code looks all good to me, do you see all the GPUs being utilized ? What version of faiss are you using ? | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 24 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
The code looks all good to me, do you see all the GPUs being utilized ? What version of faiss are you using ? | [
-0.10110102593898773,
-0.6452791690826416,
-0.1425655335187912,
0.12754398584365845,
-0.3974350690841675,
0.025289833545684814,
0.14260101318359375,
0.011892853304743767,
0.5171631574630737,
0.030707240104675293,
-0.241022527217865,
-0.2427918165922165,
0.5606644749641418,
-0.17487183213233948,
-0.20539377629756927,
-0.018016844987869263,
0.41877177357673645,
-0.26921549439430237,
-0.016373947262763977,
-0.2029067724943161,
-0.47735103964805603,
0.18902039527893066,
-0.4076696038246155,
-0.1454448252916336,
-0.3056826591491699,
0.1585756540298462,
-0.2163211852312088,
-0.04062110185623169,
0.12433670461177826,
-0.08114054799079895,
-0.33656859397888184,
0.25046563148498535,
0.08649713546037674,
0.44029301404953003,
-0.00012007181794615462,
-0.20223571360111237,
-0.056983575224876404,
-0.031154921278357506,
0.1688573956489563,
0.33091896772384644,
-0.14986009895801544,
0.28066572546958923,
-0.0048139882273972034,
0.003389321267604828,
-0.4199780821800232,
-0.034300800412893295,
0.1607247143983841,
-0.6082789301872253,
-0.12158016860485077,
0.010413792915642262,
0.10567384213209152,
-0.18286244571208954,
0.0921345204114914,
-0.11322277784347534,
-0.10804177075624466,
-0.34054404497146606,
0.019976487383246422,
-0.1246785968542099,
0.4365970492362976,
-0.05713219940662384,
0.007334202527999878,
0.4344691038131714,
0.12398616969585419,
0.0797567367553711,
-0.15612366795539856,
0.055049747228622437,
0.31222835183143616,
-0.35763171315193176,
0.08322903513908386,
-0.15929454565048218,
-0.1237945482134819,
-0.038514889776706696,
-0.16129043698310852,
-0.357461154460907,
-0.22543224692344666,
0.05060775578022003,
-0.13594138622283936,
0.09543024748563766,
-0.2250702679157257,
-0.12172521650791168,
0.17138810455799103,
-0.24712179601192474,
0.05453026294708252,
-0.023964285850524902,
0.1854773908853531,
0.5114307999610901,
-0.02091158553957939,
0.2084963619709015,
0.2159983217716217,
0.18117135763168335,
-0.3171785771846771,
-0.2657266855239868,
0.2527207136154175,
0.13329575955867767,
-0.950962483882904,
0.22139185667037964,
0.15405544638633728,
-0.3322070837020874,
0.11102338880300522,
-0.02628355473279953,
-0.34464752674102783,
0.08167247474193573,
0.0518469400703907,
0.25825610756874084,
-0.000310014933347702,
-0.05964023247361183,
0.0013928860425949097,
-0.18461115658283234,
-0.2419208139181137,
-0.19570793211460114,
-0.07233981043100357,
-0.0021736323833465576,
0.04295123741030693,
-0.2808037996292114,
-0.7178255319595337,
-0.1326957643032074,
0.06750493496656418,
0.018232587724924088,
-0.1446298360824585,
-0.1136649027466774,
-0.08758769184350967,
-0.2871021628379822,
0.15509401261806488,
0.3614160120487213,
0.05589231103658676,
0.020892728120088577,
-0.20277810096740723,
0.07845468819141388,
-0.20732472836971283,
-0.12215888500213623,
-0.12178918719291687,
-0.19882814586162567,
-0.07839326560497284,
0.2515874207019806,
0.044103119522333145,
-0.1949983537197113,
-0.049026310443878174,
0.15323281288146973,
0.13375040888786316,
0.003718361258506775,
0.11835677921772003,
-0.35174262523651123,
0.3404107987880707,
0.1842559427022934,
0.21724295616149902,
-0.02177160605788231,
0.10882352292537689,
0.31117379665374756,
-0.2198815941810608,
0.25344419479370117,
-0.17878380417823792,
0.028715070337057114,
0.1601368486881256,
0.06139219552278519,
0.24829865992069244,
-0.2510529160499573,
-0.066899873316288,
0.6178331971168518,
-0.0012028664350509644,
0.27345046401023865,
0.30644989013671875,
-0.04217977821826935,
0.029047701507806778,
-0.2171824723482132,
0.36917197704315186,
0.18870705366134644,
-0.10741697996854782,
-0.12060792744159698,
0.38864123821258545,
-0.1918155699968338,
0.02588428556919098,
0.5435725450515747,
0.1781838834285736,
-0.13905689120292664,
-0.19135726988315582,
0.5985490083694458,
0.25841277837753296,
-0.38492900133132935,
0.22122175991535187,
-0.14671902358531952,
-0.06472364813089371,
0.0024339985102415085,
0.23080480098724365,
0.0612531416118145,
-0.026509635150432587,
0.04394051432609558,
0.2942267656326294,
0.47651243209838867,
-0.10768245160579681,
-0.00988905318081379,
-0.17154163122177124,
0.09425462782382965,
0.12652212381362915,
0.2116856724023819,
0.10894986987113953,
-0.09214449673891068,
-0.07813643664121628,
-1.0313663482666016,
0.46928727626800537,
0.012723524123430252,
0.00591587508097291,
-0.16335995495319366,
0.556267261505127,
0.4823606014251709,
0.3910205662250519,
0.1681985855102539,
0.18743863701820374,
0.19442251324653625,
-0.18119442462921143,
-0.05753748118877411,
0.2555994391441345,
-0.1347489058971405,
0.48314663767814636,
-0.14375019073486328,
-0.3163858950138092,
0.07417009025812149,
-0.004013609141111374,
0.032295506447553635,
0.002921830862760544,
-0.1603706181049347,
-0.2778488099575043,
0.17485438287258148,
0.011204464361071587,
-0.030817648395895958,
-0.4010513722896576,
0.11684176325798035,
-0.13760551810264587,
-0.03866696357727051,
-0.4194142520427704,
-0.10424787551164627,
0.3191126585006714,
-0.35336625576019287,
0.03590858727693558,
0.39778104424476624,
0.2552785873413086,
-0.28841328620910645,
0.46802809834480286,
0.24710068106651306,
0.012940912507474422,
0.1120649129152298,
-0.019312983378767967,
0.0275445356965065,
0.04873201623558998,
-0.18159426748752594,
0.09217208623886108,
0.24620166420936584,
0.0842939019203186,
0.37024304270744324,
-0.0015155896544456482,
-0.2531157433986664,
0.13206300139427185,
0.10161256790161133,
0.15195880830287933,
0.2260204553604126,
-0.03209364041686058,
-0.14605550467967987,
-0.025554802268743515,
-0.17742206156253815,
-0.6759063005447388,
0.38699087500572205,
-0.07958751916885376,
0.058529388159513474,
0.04148310422897339,
-0.2022205889225006,
-0.07496244460344315,
0.08298497647047043,
0.0026702936738729477,
-0.31289535760879517,
0.11333633959293365,
0.2189541757106781,
0.11993876099586487,
-0.09618736803531647,
-0.014512096531689167,
-0.09382427483797073,
0.08317246288061142,
0.14865970611572266,
-0.011433648876845837,
0.0023220106959342957,
-0.241285502910614,
-0.11710276454687119,
-0.01593632996082306,
-0.21801188588142395,
0.09538185596466064,
-0.13349848985671997,
-0.164958655834198,
0.07624229788780212,
0.232058584690094,
-0.17739629745483398,
-0.31007274985313416,
-0.11233720928430557,
-0.089445099234581,
0.006173815578222275,
0.17337505519390106,
0.10302577167749405,
-0.005175437778234482,
0.22868993878364563,
-0.24804489314556122,
0.6022288799285889,
0.06355299055576324,
-0.23336781561374664,
-0.15523532032966614,
0.10111524909734726,
-0.04570532590150833,
0.04129252955317497,
0.11256373673677444,
0.09100383520126343,
0.0995037704706192,
0.12455769628286362,
-0.03627803921699524,
-0.17721639573574066,
0.009401090443134308,
-0.054081909358501434,
-0.19103801250457764,
-0.10374055802822113,
-0.25546014308929443,
-0.3106386661529541,
-0.09003463387489319,
0.2681691348552704,
0.05734359472990036,
-0.27816832065582275,
-0.025067072361707687,
-0.322764128446579,
-0.07491961866617203,
-0.29732421040534973,
0.026651937514543533,
-0.2143460214138031,
0.0021536126732826233,
-0.13035331666469574,
0.25026896595954895,
-0.01884732022881508,
0.1902068704366684,
-0.15489251911640167,
0.25686877965927124,
0.022335141897201538,
-0.19394506514072418,
-0.09166465699672699,
-0.3474104404449463,
-0.049172259867191315,
0.02380502223968506,
-0.08907311409711838,
-0.16265170276165009,
0.0798855721950531,
0.2502739429473877,
0.08228479325771332,
0.21888847649097443,
0.23133064806461334,
0.08233042806386948,
0.0973954126238823,
-0.046714916825294495,
0.0514952726662159,
0.5937474370002747,
0.15838831663131714,
-0.33333492279052734,
-0.0689038336277008,
0.06425612419843674,
-0.036654677242040634,
0.16508781909942627,
0.08011066913604736,
0.2586236298084259,
-0.06317165493965149,
-0.01584760844707489,
0.0578107126057148,
0.7362197041511536,
0.12971165776252747,
0.14528904855251312,
0.21959054470062256,
0.03841043636202812,
0.14315783977508545,
0.13442382216453552,
-0.06568809598684311,
0.2617093324661255,
0.21844454109668732,
-0.022936109453439713,
0.020805835723876953,
0.004418320953845978,
-0.056208036839962006,
-0.06936352699995041,
0.02338220179080963,
-0.35273900628089905,
-0.04634137451648712,
0.040235623717308044,
0.03703252971172333,
0.24580010771751404,
-0.25467443466186523,
-0.056378718465566635,
-0.024632737040519714,
0.21280637383460999,
-0.1288219690322876,
0.20151203870773315,
0.15078504383563995,
-0.15503184497356415,
0.02228713408112526,
-0.23830777406692505,
-0.25645557045936584,
0.5301267504692078,
-0.2686869204044342,
0.38568684458732605,
0.1358518898487091,
-0.256104052066803,
0.3834453225135803,
-0.03888668864965439,
0.8100400567054749,
0.228738471865654,
-0.4179435968399048,
0.008489120751619339,
-0.21188153326511383,
-0.15289734303951263,
-0.23949404060840607,
-0.1394517719745636,
0.058251574635505676,
0.4705781936645508,
0.027819272130727768,
0.012567363679409027,
-0.45687320828437805,
0.02625344507396221,
-0.42423567175865173,
-0.09013944864273071,
-0.4644741415977478,
-0.5090078711509705,
-0.02875622548162937,
0.07846185564994812,
0.49670863151550293,
0.0894455686211586,
-0.01381482183933258,
-0.18386201560497284,
0.18628458678722382,
-0.14545823633670807,
-0.09337572008371353,
0.14561323821544647,
0.09798866510391235,
-0.08495032787322998,
0.07010912895202637,
-0.025701317936182022,
0.5306366682052612,
0.1106659397482872,
0.22286811470985413,
0.008736863732337952,
0.004434151574969292,
0.04166071489453316,
0.02673911117017269,
0.206580251455307,
0.42744216322898865,
0.07724431902170181,
0.1386512666940689,
0.35013532638549805,
-0.1386646032333374,
0.12616077065467834,
0.01479832548648119,
-0.0968661978840828,
0.2295643538236618,
0.3817695379257202,
-0.2063114494085312,
-0.3262772560119629,
0.423429399728775,
-0.08458535373210907,
-0.2994629144668579,
0.11813054233789444,
0.27478712797164917,
-0.07496365904808044,
0.38196510076522827,
0.10705026984214783,
0.4787225127220154,
-0.10168065130710602,
-0.11892066895961761,
-0.10058804601430893,
-0.13960367441177368,
0.16304655373096466,
-0.4756385087966919,
0.545163631439209,
-0.3711412847042084,
0.06553072482347488,
0.04013343155384064,
-0.13443082571029663,
0.3551010489463806,
0.12527233362197876,
0.07588090002536774,
0.35400518774986267,
0.0892239511013031,
-0.344393253326416,
-0.1322564035654068,
-0.010588925331830978,
0.3456253111362457,
-0.05580758675932884,
0.3363857567310333,
0.032562002539634705,
0.2634961009025574,
0.1138903796672821,
0.025252047926187515,
0.1305639147758484,
0.08572612702846527,
0.14705917239189148,
-0.13444814085960388,
-0.05021848529577255,
-0.05269544571638107,
-0.09025678783655167,
0.26462846994400024,
0.07292166352272034,
0.1256769895553589,
-0.34916457533836365,
0.13397032022476196,
-0.39009326696395874,
0.0034640952944755554,
0.13281100988388062,
0.24174410104751587,
-0.17455068230628967,
-0.0832456573843956,
-0.5450206995010376,
0.11519242078065872,
0.06226551532745361,
-0.4462883472442627,
0.1637808233499527,
0.28717145323753357,
-0.46779149770736694,
-0.6156065464019775,
0.31467700004577637,
-0.18496249616146088,
0.2804901599884033,
-0.18158285319805145,
0.18807774782180786,
0.202885240316391,
0.06643922626972198,
0.03980439156293869,
0.17455258965492249,
-0.49592557549476624,
0.7307314276695251,
-0.42220816016197205,
0.021029137074947357,
-0.08551205694675446,
0.18131206929683685,
0.24061539769172668,
-0.4484691917896271,
-0.10765671730041504,
0.18413423001766205,
-0.046993862837553024,
0.018392693251371384,
-0.6430252194404602,
0.3724158704280853,
0.32931461930274963,
-0.18243548274040222,
-0.0105588398873806,
-0.07931078970432281,
0.3888007700443268,
-0.13207343220710754,
0.022405624389648438,
-0.007991738617420197,
-0.37834903597831726,
0.03056282550096512,
0.1477605551481247,
-0.11101274192333221,
-0.13761357963085175,
0.18429113924503326,
0.2619611322879791,
-0.05035722628235817,
0.21233916282653809,
0.18165645003318787,
-0.2059744894504547,
0.09345380961894989,
-0.05045837536454201,
0.11267150938510895,
-0.11799317598342896,
0.121576689183712,
-0.05847971886396408,
0.2185899317264557,
0.03581751137971878,
-0.08386395871639252,
-0.0530552938580513,
-0.14264142513275146,
0.1798873394727707,
0.13328516483306885,
0.16008150577545166,
0.25320255756378174,
-0.23910869657993317,
-0.10094299912452698,
-0.26629409193992615,
-0.05027090758085251,
0.02568495273590088,
0.22684279084205627,
-0.22215701639652252,
0.07599549740552902,
0.12211620062589645,
-0.4881606996059418,
0.03595016896724701,
0.21800220012664795,
0.2421189844608307,
-0.016554534435272217,
0.250607430934906,
0.2533538341522217,
-0.2667311429977417,
-0.011183582246303558,
-0.23830001056194305,
0.10367058217525482,
0.4127854108810425,
-0.005332939326763153,
-0.10464786738157272,
-0.07550966739654541,
-0.21698328852653503,
-0.19850750267505646,
0.2796875536441803,
0.32172274589538574,
0.09839433431625366,
-0.1572544127702713,
0.03370934724807739,
0.17378951609134674,
-0.09682171791791916,
-0.05472692847251892,
0.45840394496917725,
0.07128865271806717,
0.27529728412628174,
0.4304977357387543,
0.5273681879043579,
0.33234161138534546,
0.12306056916713715,
0.06607259064912796,
0.25448980927467346,
0.47535449266433716,
-0.012215396389365196,
-0.571574866771698,
0.30583077669143677,
0.049866050481796265,
0.3620609939098358,
0.2019300013780594,
0.05115535482764244,
0.47809720039367676,
-0.13367688655853271,
0.3348219394683838,
-0.10388388484716415,
-0.20893418788909912,
0.0009516850113868713,
-0.298430472612381,
0.3782653510570526,
0.05216943472623825,
-0.31946253776550293,
0.14653676748275757,
-0.31232360005378723,
0.16951251029968262,
-0.0815645083785057,
-0.3578356206417084,
-0.10805103927850723,
0.18038499355316162,
-0.09851066023111343,
-0.08692504465579987,
-0.014044348150491714,
-0.15669025480747223,
0.05707041919231415,
-0.10478654503822327,
0.26720568537712097,
-0.11778765916824341,
0.2572088837623596,
-0.11446972191333771,
0.11059629172086716,
0.16571712493896484,
-0.28210917115211487,
0.4263918995857239,
0.31825557351112366,
0.07681871950626373,
-0.00667920894920826,
-0.12110191583633423,
-0.2406068742275238,
0.21786028146743774,
0.12374700605869293,
0.20996733009815216,
0.2978765070438385,
-0.2111324816942215,
0.16760478913784027,
0.0858476310968399,
0.10248421132564545,
0.10353805869817734,
-0.09071162343025208,
0.031108248978853226,
-0.3324662446975708,
0.039714839309453964,
0.03389459848403931,
0.008510914631187916,
-0.09145195782184601,
-0.04222686216235161,
0.19161953032016754,
-0.2752501964569092,
-0.18867206573486328,
-0.4349851608276367,
0.025138430297374725,
-0.023801244795322418,
0.1277092546224594,
-0.5729033946990967,
-0.00309962872415781,
0.34318864345550537,
-0.4517097473144531,
-0.08669406920671463,
0.030978750437498093,
0.01009715162217617,
0.09959369897842407,
0.4412902593612671,
0.10875687003135681,
0.4347345232963562,
-0.2114405632019043,
-0.13139790296554565,
-0.1768193542957306,
0.26208600401878357,
-0.0635879635810852,
0.198795884847641,
0.007041498553007841,
0.6498749256134033,
-0.04578021913766861,
-0.1737319529056549,
0.526550829410553,
0.11373278498649597,
0.33387359976768494,
0.7530382871627808,
-0.004036713391542435,
0.24490971863269806,
-0.4968438148498535,
0.025475312024354935,
0.2252572774887085,
0.06900675594806671,
0.2702377736568451,
-0.23065708577632904,
-0.1037568673491478,
-0.1404019147157669,
0.21228620409965515,
0.30096888542175293,
-0.29135531187057495,
0.2854337692260742,
0.0395062230527401,
0.14154157042503357,
0.0715242326259613,
0.11138749867677689,
-0.16599534451961517,
0.24652312695980072,
-0.39642465114593506,
-0.2746869623661041,
-0.11196650564670563,
-0.251049280166626,
-0.09853768348693848,
-0.6029497385025024,
0.020839959383010864,
0.4918762147426605,
0.10011731088161469,
-0.4660746455192566,
0.14321768283843994,
0.016788430511951447,
-0.25977858901023865,
0.03332473337650299,
0.2781353294849396,
0.2300087809562683,
0.08123006671667099,
0.14690907299518585,
-0.3834834694862366,
0.17962442338466644,
0.1850263476371765,
-0.30528366565704346,
-0.27337646484375,
-0.9010305404663086,
0.3319212794303894,
0.2570402920246124,
0.21722815930843353,
-0.3971438407897949,
-0.2420910894870758,
0.12398563325405121,
0.26274046301841736,
-0.14068175852298737,
0.25451940298080444,
-0.06660991907119751,
-0.2527206540107727,
-0.19380460679531097,
-0.6527659893035889,
0.14308799803256989,
0.1281776875257492,
0.010326113551855087,
-0.20127016305923462
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | I can see the memory usage of all the GPUs.
My version of `faiss-gpu` is `1.7.2` | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 16 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
I can see the memory usage of all the GPUs.
My version of `faiss-gpu` is `1.7.2` | [
-0.10703255236148834,
-0.6442115306854248,
-0.15060338377952576,
0.17503702640533447,
-0.39375030994415283,
0.0413370355963707,
0.11456802487373352,
0.02614108845591545,
0.5348204970359802,
0.07835784554481506,
-0.22934526205062866,
-0.2848074436187744,
0.5310181975364685,
-0.21422229707241058,
-0.18869704008102417,
-0.03561931848526001,
0.4237980842590332,
-0.2627176344394684,
0.005784511566162109,
-0.22204135358333588,
-0.5041346549987793,
0.19046033918857574,
-0.36022162437438965,
-0.12672415375709534,
-0.2101922333240509,
0.19819197058677673,
-0.22211870551109314,
-0.06595330685377121,
0.09878125041723251,
-0.18642283976078033,
-0.36616209149360657,
0.23293030261993408,
0.06084074825048447,
0.393182635307312,
-0.0001262412843061611,
-0.18897730112075806,
-0.07876837253570557,
0.0013787727802991867,
0.23717212677001953,
0.36647534370422363,
-0.12315462529659271,
0.24796870350837708,
0.022986382246017456,
0.035729460418224335,
-0.33452171087265015,
-0.04326364025473595,
0.22806662321090698,
-0.6559703946113586,
-0.1461390107870102,
-0.011186525225639343,
0.0269631277769804,
-0.1669425517320633,
0.023733001202344894,
-0.11653093993663788,
-0.029690273106098175,
-0.407600998878479,
0.013088105246424675,
-0.12120558321475983,
0.38083285093307495,
-0.11398555338382721,
-0.03441896289587021,
0.46851301193237305,
0.125578373670578,
0.11815153062343597,
-0.1282300055027008,
0.033157020807266235,
0.29864123463630676,
-0.2803475260734558,
0.14890487492084503,
-0.18744000792503357,
-0.15266138315200806,
-0.09584368020296097,
-0.15173596143722534,
-0.3794932961463928,
-0.22008270025253296,
0.04381193220615387,
-0.11326753348112106,
0.1170864850282669,
-0.21863460540771484,
-0.19564735889434814,
0.17314878106117249,
-0.24253489077091217,
0.008652903139591217,
-0.022040635347366333,
0.14342834055423737,
0.5190916657447815,
0.025997422635555267,
0.2678971290588379,
0.29867804050445557,
0.1622006595134735,
-0.34456315636634827,
-0.2580173909664154,
0.2255834937095642,
0.09855516999959946,
-0.9204941987991333,
0.22723329067230225,
0.21072840690612793,
-0.4545165002346039,
0.12016487866640091,
-0.11048419773578644,
-0.3084961175918579,
0.06467704474925995,
0.08388656377792358,
0.2076830267906189,
0.04714754968881607,
-0.006761604454368353,
-0.055688031017780304,
-0.1747637242078781,
-0.19883941113948822,
-0.24528054893016815,
-0.12514114379882812,
0.019749337807297707,
0.05692346394062042,
-0.21067537367343903,
-0.6873829960823059,
-0.14753404259681702,
0.0016990434378385544,
0.1070258766412735,
-0.16299627721309662,
-0.06611977517604828,
-0.04361169412732124,
-0.24890808761119843,
0.13841594755649567,
0.3802047073841095,
-0.005982245318591595,
0.0398838184773922,
-0.2219543606042862,
0.025016291067004204,
-0.2171151041984558,
-0.07769519090652466,
-0.09633414447307587,
-0.17809507250785828,
-0.060799214988946915,
0.2614342272281647,
-0.02663443796336651,
-0.15171989798545837,
-0.05361385643482208,
0.015105067752301693,
0.12461201846599579,
0.0493512898683548,
0.18558672070503235,
-0.4480447769165039,
0.3796384930610657,
0.1968686878681183,
0.24023529887199402,
-0.007780766114592552,
0.08909711241722107,
0.3234425187110901,
-0.2556493282318115,
0.249799907207489,
-0.18504536151885986,
0.01935684308409691,
0.17427924275398254,
-0.006608546711504459,
0.34778404235839844,
-0.16775861382484436,
-0.11518489569425583,
0.6205122470855713,
0.004884079098701477,
0.26340988278388977,
0.30743277072906494,
-0.10174943506717682,
-0.01004185900092125,
-0.245159313082695,
0.3128594160079956,
0.23374447226524353,
-0.06430315971374512,
-0.21206246316432953,
0.42408204078674316,
-0.21195337176322937,
0.00731205940246582,
0.6031787991523743,
0.1820835918188095,
-0.16022637486457825,
-0.19179807603359222,
0.5950374007225037,
0.23259294033050537,
-0.447726845741272,
0.19760377705097198,
-0.16727210581302643,
-0.052607081830501556,
-0.005743067711591721,
0.2346401810646057,
0.09375306218862534,
-0.056068457663059235,
0.09859112650156021,
0.3580910265445709,
0.43676358461380005,
-0.07427556812763214,
0.04146809130907059,
-0.0664411187171936,
0.04325331002473831,
0.07573789358139038,
0.12279579043388367,
0.17866644263267517,
-0.1439412236213684,
-0.09258551150560379,
-0.9465048909187317,
0.4199209213256836,
0.008688654750585556,
-0.009879986755549908,
-0.09401221573352814,
0.5700785517692566,
0.4217795133590698,
0.4462585151195526,
0.15646618604660034,
0.2083764672279358,
0.18983647227287292,
-0.24586740136146545,
-0.08919508755207062,
0.2773418426513672,
-0.1461898684501648,
0.5076439380645752,
-0.05961406230926514,
-0.23654471337795258,
0.12297217547893524,
-0.05695746839046478,
0.09878307580947876,
0.027254272252321243,
-0.19078899919986725,
-0.2598101794719696,
0.17515252530574799,
-0.0481007881462574,
-0.025967787951231003,
-0.3371257483959198,
0.06717851012945175,
-0.08436177670955658,
-0.05519552528858185,
-0.37999171018600464,
-0.08407296985387802,
0.26410719752311707,
-0.3239351511001587,
0.036444634199142456,
0.3964686393737793,
0.30994150042533875,
-0.285480260848999,
0.4686479866504669,
0.2614832818508148,
0.03489462658762932,
0.1425892859697342,
0.044703103601932526,
0.040740031749010086,
0.05079144984483719,
-0.18363624811172485,
0.09853902459144592,
0.17127351462841034,
0.18148721754550934,
0.37402403354644775,
0.023099660873413086,
-0.3057959973812103,
0.13227112591266632,
0.15272361040115356,
0.21181941032409668,
0.16875095665454865,
-0.04066118970513344,
-0.11330847442150116,
0.0013256184756755829,
-0.1470298171043396,
-0.6751129031181335,
0.326020210981369,
0.001440335065126419,
0.10644625127315521,
0.09380451589822769,
-0.14258313179016113,
-0.11543820053339005,
0.0005797483026981354,
0.003495262935757637,
-0.3548295199871063,
0.14500543475151062,
0.13950999081134796,
0.17949914932250977,
-0.058432042598724365,
0.0474243201315403,
-0.0616004653275013,
0.06873805075883865,
0.16411124169826508,
-0.032184701412916183,
0.04619627818465233,
-0.20186197757720947,
-0.15298090875148773,
-0.002642381936311722,
-0.20938710868358612,
0.09286472201347351,
-0.1555892527103424,
-0.12683947384357452,
0.037175655364990234,
0.28332677483558655,
-0.1556447446346283,
-0.2784840762615204,
-0.03823984041810036,
-0.09128303825855255,
0.039136774837970734,
0.1490909457206726,
0.07394948601722717,
-0.014086272567510605,
0.19204550981521606,
-0.1997070014476776,
0.6402996182441711,
0.10630691051483154,
-0.2565920054912567,
-0.1013181209564209,
0.01857134699821472,
-0.017756536602973938,
-0.017588645219802856,
0.06819609552621841,
0.07204867154359818,
0.030258091166615486,
0.08255697786808014,
-0.03444208949804306,
-0.190268412232399,
-0.02521633729338646,
-0.013360463082790375,
-0.1216227263212204,
-0.1411752849817276,
-0.20359095931053162,
-0.3314365744590759,
-0.09376128017902374,
0.2989966571331024,
0.07383379340171814,
-0.269756942987442,
-0.04391954094171524,
-0.33021119236946106,
-0.08611944317817688,
-0.3529195785522461,
0.09067533910274506,
-0.13666242361068726,
0.02773527428507805,
-0.0818319320678711,
0.30976569652557373,
0.0193839892745018,
0.20462502539157867,
-0.17710690200328827,
0.2504044771194458,
0.01816485822200775,
-0.2380388081073761,
-0.05879635363817215,
-0.34320032596588135,
-0.05137645825743675,
-0.10498622059822083,
-0.07236557453870773,
-0.11092217266559601,
0.07594354450702667,
0.2489824742078781,
0.09833051264286041,
0.34073829650878906,
0.19033144414424896,
0.11627595871686935,
0.07309067994356155,
-0.08311037719249725,
0.10272082686424255,
0.6312984228134155,
0.12929895520210266,
-0.28332582116127014,
-0.020305076614022255,
0.08070788532495499,
-0.09732614457607269,
0.14173844456672668,
0.1597546935081482,
0.18548443913459778,
-0.015826061367988586,
-0.005250211805105209,
0.06579962372779846,
0.747965931892395,
0.09231071174144745,
0.15351559221744537,
0.19603267312049866,
0.0625867173075676,
0.156663179397583,
0.11098282784223557,
-0.005900743417441845,
0.272624135017395,
0.2247876226902008,
-0.015320384874939919,
0.05771320313215256,
-0.005030803382396698,
-0.07239078730344772,
-0.011230181902647018,
0.05248252674937248,
-0.3120677173137665,
-0.04242868348956108,
0.09497509151697159,
0.05466118082404137,
0.26994335651397705,
-0.2455308735370636,
-0.11999675631523132,
-0.11340929567813873,
0.19848287105560303,
-0.1576039046049118,
0.16409114003181458,
0.0718945637345314,
-0.12010233104228973,
-0.03300674259662628,
-0.2872898578643799,
-0.19751432538032532,
0.4943457245826721,
-0.22845318913459778,
0.35550254583358765,
0.10468728840351105,
-0.23456504940986633,
0.36052775382995605,
-0.07670857012271881,
0.7855752110481262,
0.26177874207496643,
-0.43408864736557007,
-0.03952251374721527,
-0.27714043855667114,
-0.15641246736049652,
-0.20614014565944672,
-0.14141501486301422,
0.02984502911567688,
0.44704923033714294,
0.04328553006052971,
-0.006245635449886322,
-0.4655265510082245,
0.032183777540922165,
-0.3589620292186737,
-0.09099313616752625,
-0.348166823387146,
-0.5535038113594055,
-0.019299054518342018,
0.10403381288051605,
0.5216584205627441,
0.07106782495975494,
-0.054314207285642624,
-0.06589727103710175,
0.14994433522224426,
-0.18729960918426514,
-0.14347326755523682,
0.11378920078277588,
0.09378564357757568,
-0.05413906276226044,
0.06241137906908989,
-0.04402158409357071,
0.44920089840888977,
0.0011843331158161163,
0.2556321322917938,
-0.021219544112682343,
-0.018057815730571747,
0.043531130999326706,
0.028807085007429123,
0.25601819157600403,
0.40661630034446716,
0.0748666450381279,
0.0579545684158802,
0.31888851523399353,
-0.1364482194185257,
0.1958950310945511,
0.018823737278580666,
-0.05696137621998787,
0.23413123190402985,
0.389963835477829,
-0.21364587545394897,
-0.37928277254104614,
0.4109610319137573,
0.008243167772889137,
-0.2976098954677582,
0.14001047611236572,
0.2465089112520218,
-0.06852706521749496,
0.4189082980155945,
0.13738003373146057,
0.4220925569534302,
-0.14414677023887634,
-0.025460321456193924,
-0.09748493880033493,
-0.12694638967514038,
0.10497205704450607,
-0.4935912489891052,
0.5917489528656006,
-0.3119879961013794,
0.0976465716958046,
-0.0014545135200023651,
-0.15346364676952362,
0.3660837411880493,
0.12267424166202545,
0.17352084815502167,
0.33022189140319824,
0.157504141330719,
-0.32446083426475525,
-0.15500764548778534,
-0.004383832216262817,
0.301221638917923,
-0.028274066746234894,
0.3815818428993225,
-0.010123124346137047,
0.260896772146225,
0.07543972134590149,
0.06774351000785828,
0.19052903354167938,
0.12824201583862305,
0.14553764462471008,
-0.18511174619197845,
-0.060191020369529724,
-0.08349283039569855,
-0.016969140619039536,
0.20883958041667938,
0.08672371506690979,
0.036385972052812576,
-0.32654935121536255,
0.08600140362977982,
-0.3618558645248413,
0.09192203730344772,
0.14212903380393982,
0.1808699369430542,
-0.2080291360616684,
-0.07956258952617645,
-0.48059922456741333,
0.11253564804792404,
0.08101218938827515,
-0.37053820490837097,
0.20471134781837463,
0.24469557404518127,
-0.49476873874664307,
-0.6490094661712646,
0.36956965923309326,
-0.22165437042713165,
0.33680352568626404,
-0.24820484220981598,
0.1974610984325409,
0.11812292039394379,
0.1324087679386139,
-0.01943463832139969,
0.16801220178604126,
-0.45363864302635193,
0.7782618403434753,
-0.4056627154350281,
-0.013974234461784363,
-0.05504703149199486,
0.08923200517892838,
0.36653491854667664,
-0.4152642786502838,
-0.1238848865032196,
0.10568873584270477,
-0.02066143974661827,
0.04406091570854187,
-0.7234471440315247,
0.37356629967689514,
0.421115517616272,
-0.06405279040336609,
-0.01815962791442871,
-0.13592933118343353,
0.3832544982433319,
-0.21779963374137878,
-0.007831994444131851,
0.009218044579029083,
-0.34240129590034485,
0.0742788165807724,
0.12978576123714447,
-0.05849917232990265,
-0.15613879263401031,
0.20264829695224762,
0.3613995611667633,
-0.096192866563797,
0.1491476595401764,
0.1865096390247345,
-0.127383291721344,
0.08211234956979752,
-0.0982431024312973,
0.09439917653799057,
-0.1175871193408966,
0.21380767226219177,
-0.04887353628873825,
0.19934572279453278,
-0.050004057586193085,
-0.08400221914052963,
-0.0482037179172039,
-0.07571826875209808,
0.22137512266635895,
0.14918123185634613,
0.16015282273292542,
0.2613433301448822,
-0.237137570977211,
-0.1293017566204071,
-0.24547570943832397,
-0.08649022877216339,
0.1354486644268036,
0.25676098465919495,
-0.2323828786611557,
0.06909433007240295,
0.12698136270046234,
-0.4858528673648834,
0.06250663101673126,
0.27671608328819275,
0.27847346663475037,
-0.0248032808303833,
0.23578454554080963,
0.312274307012558,
-0.27727895975112915,
-0.009434536099433899,
-0.25554993748664856,
0.10691939294338226,
0.419491708278656,
-0.02539445459842682,
-0.16311877965927124,
-0.04097502678632736,
-0.3027973175048828,
-0.21865057945251465,
0.26213744282722473,
0.3188468813896179,
0.1343822330236435,
-0.1427191197872162,
0.021015191450715065,
0.08110361546278,
-0.0880814641714096,
-0.10121104121208191,
0.3949989676475525,
0.04952738806605339,
0.2603863477706909,
0.38683614134788513,
0.5716020464897156,
0.4321839213371277,
0.07558122277259827,
0.06733790040016174,
0.2674424946308136,
0.47403520345687866,
0.0076273903250694275,
-0.6141294240951538,
0.40196913480758667,
0.09600740671157837,
0.28288862109184265,
0.26789045333862305,
0.10235849022865295,
0.494708776473999,
-0.12363588064908981,
0.3665183186531067,
-0.07074114680290222,
-0.20057523250579834,
-0.016038984060287476,
-0.29610589146614075,
0.29266273975372314,
0.14347706735134125,
-0.3200545907020569,
0.16234710812568665,
-0.2975432872772217,
0.10259658843278885,
-0.021853439509868622,
-0.40464434027671814,
-0.10003049671649933,
0.2259570211172104,
-0.08069934695959091,
-0.14535243809223175,
0.02175707370042801,
-0.09543375670909882,
0.05774097144603729,
-0.015790706500411034,
0.2945100963115692,
-0.18440057337284088,
0.23704402148723602,
-0.09089058637619019,
0.15201407670974731,
0.23620103299617767,
-0.27242639660835266,
0.4230998456478119,
0.25062114000320435,
0.0722050815820694,
-0.047078587114810944,
-0.17250584065914154,
-0.16644372045993805,
0.1593550592660904,
0.08729764074087143,
0.2558630704879761,
0.3099421560764313,
-0.23496133089065552,
0.17787478864192963,
0.084810271859169,
0.09474192559719086,
0.0523233562707901,
-0.13136622309684753,
0.045765504240989685,
-0.27531835436820984,
-0.013660799711942673,
-0.003733583725988865,
0.05109436810016632,
-0.16585591435432434,
-0.019314434379339218,
0.20974226295948029,
-0.2657763957977295,
-0.21122226119041443,
-0.48548296093940735,
0.032609567046165466,
0.011770203709602356,
0.14633643627166748,
-0.6196495294570923,
-0.02720913663506508,
0.3506632149219513,
-0.4617977738380432,
-0.08269189298152924,
0.043643515557050705,
-0.03357447683811188,
0.10738036036491394,
0.3678310811519623,
0.052172478288412094,
0.439593106508255,
-0.14623625576496124,
-0.1393779069185257,
-0.15316414833068848,
0.2168796956539154,
-0.1068369448184967,
0.1792079508304596,
0.010987937450408936,
0.6924856305122375,
-0.13905107975006104,
-0.2268020659685135,
0.5361939072608948,
0.15864987671375275,
0.3101419508457184,
0.6941757202148438,
0.012267302721738815,
0.2626040279865265,
-0.5529350638389587,
0.015500525012612343,
0.25301221013069153,
0.028798989951610565,
0.19321073591709137,
-0.1890604943037033,
-0.18985342979431152,
-0.15332940220832825,
0.2133958637714386,
0.27866896986961365,
-0.25513848662376404,
0.3028656840324402,
-0.024549955502152443,
0.15629076957702637,
0.04143352061510086,
0.08980164676904678,
-0.14462068676948547,
0.1930389553308487,
-0.37507161498069763,
-0.290382444858551,
-0.14171327650547028,
-0.25030016899108887,
-0.19141261279582977,
-0.5486269593238831,
0.08759402483701706,
0.499672532081604,
0.10053101181983948,
-0.4704846441745758,
0.19657179713249207,
0.07858777791261673,
-0.2641584277153015,
0.058252930641174316,
0.307690292596817,
0.23224586248397827,
0.0968744307756424,
0.13961170613765717,
-0.4033510088920593,
0.20024307072162628,
0.14078375697135925,
-0.29880544543266296,
-0.23402829468250275,
-0.8785074353218079,
0.2635458707809448,
0.24512353539466858,
0.1676546186208725,
-0.4487701952457428,
-0.1899738609790802,
0.11866914480924606,
0.27894556522369385,
-0.11766941845417023,
0.20154933631420135,
-0.10217989981174469,
-0.23331600427627563,
-0.21786275506019592,
-0.6584638357162476,
0.1263207197189331,
0.03335634618997574,
0.04437414929270744,
-0.2174840122461319
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | It looks all good to me then ^^ though you said you didn't experienced speed improvements by adding more GPUs ? What size is your source dataset and what time differences did you experience ? | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 35 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
It looks all good to me then ^^ though you said you didn't experienced speed improvements by adding more GPUs ? What size is your source dataset and what time differences did you experience ? | [
-0.1954076737165451,
-0.5493392944335938,
-0.19500628113746643,
0.0717109739780426,
-0.3401581645011902,
-0.09153155982494354,
0.11930117011070251,
0.09034474939107895,
0.500456690788269,
0.04198215901851654,
-0.2722722291946411,
-0.14196830987930298,
0.4037453234195709,
-0.1517157256603241,
-0.20284540951251984,
-0.06859023869037628,
0.3441007733345032,
-0.3299233913421631,
0.011773616075515747,
-0.09767983853816986,
-0.40967899560928345,
0.11993645131587982,
-0.20231661200523376,
-0.251811146736145,
-0.30077677965164185,
0.16141358017921448,
-0.2244761437177658,
0.006834819912910461,
0.11016654968261719,
-0.24712823331356049,
-0.38788527250289917,
0.2801453769207001,
-0.021692581474781036,
0.4366268813610077,
-0.00010959531937260181,
-0.18200460076332092,
-0.06954056024551392,
0.019207509234547615,
0.08740980923175812,
0.36783725023269653,
-0.07125671952962875,
0.13630355894565582,
-0.006320871412754059,
-0.012762166559696198,
-0.4964892566204071,
-0.10699060559272766,
0.0045808348804712296,
-0.5698638558387756,
-0.14095152914524078,
0.08190838992595673,
0.2181253731250763,
-0.0727180764079094,
0.13197310268878937,
-0.24664455652236938,
-0.009816929697990417,
-0.3345293402671814,
-0.0840720608830452,
-0.01762561872601509,
0.49924105405807495,
-0.03084125742316246,
0.037364788353443146,
0.43559321761131287,
0.1240534782409668,
0.016577690839767456,
-0.15085572004318237,
0.11226529628038406,
0.2927345037460327,
-0.26206696033477783,
0.09836746752262115,
-0.036172471940517426,
-0.17017275094985962,
0.05830962210893631,
-0.3310951292514801,
-0.38129013776779175,
-0.15006987750530243,
-0.04410938918590546,
-0.12741759419441223,
0.0230875127017498,
-0.1669825315475464,
-0.11390919983386993,
0.20847120881080627,
-0.20368221402168274,
0.05147688090801239,
-0.07742853462696075,
0.17957501113414764,
0.4821711778640747,
0.08618554472923279,
0.0640285462141037,
0.24373699724674225,
0.13202470541000366,
-0.3461635112762451,
-0.1532226800918579,
0.2546413540840149,
0.008877863176167011,
-0.8507382869720459,
0.18381094932556152,
0.21033820509910583,
-0.3120996654033661,
0.05457589775323868,
-0.02841958776116371,
-0.22088052332401276,
0.1475067138671875,
0.0329526923596859,
0.07765928655862808,
-0.17603063583374023,
-0.011176482774317265,
-0.1744314730167389,
-0.2005331814289093,
-0.1963774412870407,
-0.1983911544084549,
-0.04481566324830055,
-0.05908532440662384,
0.09529566764831543,
-0.2868557870388031,
-0.7131750583648682,
-0.09331858903169632,
0.05097600817680359,
0.028510387986898422,
-0.07288748770952225,
-0.07071192562580109,
-0.014406085014343262,
-0.3132152557373047,
0.11559826880693436,
0.428171306848526,
0.09434781968593597,
0.05532973259687424,
-0.16712965071201324,
0.08311375975608826,
-0.2397376298904419,
-0.14013060927391052,
-0.1739223152399063,
-0.13887494802474976,
-0.11510656774044037,
0.21495014429092407,
0.11081291735172272,
-0.16845890879631042,
-0.04419528692960739,
0.13622523844242096,
0.08803407847881317,
0.07137458026409149,
0.0944371446967125,
-0.3345935642719269,
0.29546111822128296,
0.13111449778079987,
0.15096880495548248,
-0.07238584756851196,
-0.044649604707956314,
0.22594399750232697,
-0.20605874061584473,
0.18275970220565796,
-0.07516177743673325,
-0.06726326793432236,
0.07434776425361633,
0.17772726714611053,
0.20761528611183167,
-0.27245032787323,
0.0034786537289619446,
0.6498567461967468,
-0.07904394716024399,
0.29591643810272217,
0.19436027109622955,
0.006135266274213791,
-0.03881416469812393,
-0.23357173800468445,
0.36609596014022827,
0.19662542641162872,
-0.11178441345691681,
-0.05376414209604263,
0.2802194058895111,
-0.08014343678951263,
-0.08521685749292374,
0.5998327136039734,
0.03849663585424423,
-0.15392020344734192,
-0.13850755989551544,
0.4606461524963379,
0.269708514213562,
-0.36585095524787903,
0.11533461511135101,
-0.1319619119167328,
-0.058402303606271744,
0.1735914945602417,
0.33772581815719604,
0.09218461066484451,
0.06776294112205505,
0.12102405726909637,
0.3216981291770935,
0.3530750274658203,
-0.017078692093491554,
0.06484457105398178,
-0.29382646083831787,
0.006607698276638985,
0.17692656815052032,
0.33045053482055664,
0.10323387384414673,
-0.1775968074798584,
-0.10832121223211288,
-1.043794870376587,
0.42227351665496826,
-0.18815161287784576,
0.004206682089716196,
-0.13282757997512817,
0.5388262271881104,
0.34838932752609253,
0.29863786697387695,
0.1808965802192688,
0.1558687537908554,
0.2507900297641754,
-0.20637759566307068,
0.15859664976596832,
0.2516293227672577,
-0.12036575376987457,
0.4703894257545471,
-0.19389879703521729,
-0.2589349150657654,
-0.0237528495490551,
0.12773878872394562,
0.010407142341136932,
0.012446995824575424,
-0.14423741400241852,
-0.1613168716430664,
0.2467343956232071,
0.06549718976020813,
-0.014108053408563137,
-0.2114313393831253,
0.16290949285030365,
-0.2171662300825119,
-0.1083635464310646,
-0.3178243041038513,
-0.04549019783735275,
0.2660098075866699,
-0.30990052223205566,
-0.009921496734023094,
0.2861033082008362,
0.21898022294044495,
-0.12528614699840546,
0.54466313123703,
0.16834574937820435,
0.16883906722068787,
0.1359228491783142,
0.07336577773094177,
0.11951708793640137,
-0.0174774881452322,
-0.13131891191005707,
-0.06408228725194931,
0.24428948760032654,
0.17288585007190704,
0.24996578693389893,
0.051352471113204956,
-0.2842482626438141,
0.19925208389759064,
0.015814613550901413,
0.14428460597991943,
0.2181532084941864,
0.09970889985561371,
-0.07650776207447052,
-0.021044235676527023,
-0.12053720653057098,
-0.6734673976898193,
0.5198262929916382,
-0.046609263867139816,
0.12743209302425385,
-0.039602503180503845,
-0.09995593875646591,
0.06734707951545715,
-0.03573565557599068,
-0.0257625263184309,
-0.25584521889686584,
0.1830122023820877,
0.36220043897628784,
0.10123048722743988,
-0.10517334192991257,
-0.09243447333574295,
-0.11556968837976456,
0.08419264853000641,
0.021413449198007584,
-0.07293151319026947,
0.10255565494298935,
-0.13381782174110413,
-0.1384383887052536,
-0.08161237835884094,
-0.34085071086883545,
0.05849920213222504,
-0.07728038728237152,
-0.15515750646591187,
-0.028946610167622566,
0.22823402285575867,
-0.19831940531730652,
-0.17719614505767822,
-0.07321449369192123,
-0.13971249759197235,
0.015107708051800728,
0.28460800647735596,
0.09246540069580078,
-0.08582887798547745,
0.25119665265083313,
-0.20455414056777954,
0.5380327105522156,
0.01793360523879528,
-0.19946296513080597,
-0.15971240401268005,
0.0547226145863533,
0.009319400414824486,
0.12913234531879425,
0.1499316245317459,
0.13100995123386383,
0.22640781104564667,
0.16979281604290009,
0.02871590480208397,
-0.18722878396511078,
-0.09968474507331848,
-0.1663019359111786,
-0.1377955824136734,
-0.08515355736017227,
-0.2932796776294708,
-0.3136904239654541,
-0.0012649297714233398,
0.1352895200252533,
0.15427637100219727,
-0.2843742072582245,
0.018927710130810738,
-0.374777615070343,
-0.1380971074104309,
-0.2919186055660248,
0.05575162544846535,
-0.3363002836704254,
-0.07473833113908768,
-0.29226142168045044,
0.2637364864349365,
0.05050942674279213,
0.11914260685443878,
-0.15725752711296082,
0.2924525737762451,
0.05752359703183174,
-0.10383394360542297,
0.07760808616876602,
-0.32161152362823486,
0.006683763116598129,
0.0015237368643283844,
-0.13164745271205902,
-0.23302625119686127,
-0.020980417728424072,
0.1531844437122345,
0.1340499222278595,
0.19693954288959503,
0.23927588760852814,
0.054259564727544785,
-0.022249700501561165,
-0.03759240359067917,
0.036806486546993256,
0.4343104362487793,
0.24641431868076324,
-0.2958633303642273,
-0.19602319598197937,
0.0929357185959816,
-0.13505993783473969,
0.17265728116035461,
0.10912951081991196,
0.19582200050354004,
-0.19863560795783997,
0.004106838256120682,
0.09480693936347961,
0.7877364754676819,
0.09613579511642456,
0.09411655366420746,
0.16568955779075623,
-0.004338318482041359,
0.09021207690238953,
0.005001276731491089,
-0.19160152971744537,
0.2105596959590912,
0.09547673165798187,
-0.020986251533031464,
-0.049805283546447754,
-0.028082944452762604,
-0.1023034155368805,
-0.09770841896533966,
0.07189252972602844,
-0.21111354231834412,
-0.09894724190235138,
0.16180656850337982,
0.15558016300201416,
0.23753106594085693,
-0.20309433341026306,
-0.013572894036769867,
-0.16221284866333008,
0.22367870807647705,
-0.11638838052749634,
0.1428399384021759,
0.04935535043478012,
-0.3099399209022522,
-0.07131507992744446,
-0.11919307708740234,
-0.43416303396224976,
0.5087451934814453,
-0.1746649295091629,
0.24905700981616974,
0.17307591438293457,
-0.26560699939727783,
0.2825510501861572,
-0.03779185935854912,
0.6745171546936035,
0.14185452461242676,
-0.554757833480835,
0.10999275743961334,
-0.32118919491767883,
-0.2590785026550293,
-0.21857963502407074,
-0.12750345468521118,
-0.020240887999534607,
0.487556129693985,
0.187776118516922,
-0.06448213756084442,
-0.36710163950920105,
0.07654526829719543,
-0.4042907953262329,
-0.007838841527700424,
-0.40777015686035156,
-0.4317164719104767,
-0.021816151216626167,
0.004520883783698082,
0.4984939396381378,
-0.07980819046497345,
0.07880400121212006,
-0.14817264676094055,
0.12507383525371552,
-0.07208503782749176,
-0.012729166075587273,
0.16862715780735016,
0.0780269205570221,
-0.023737434297800064,
0.10297510772943497,
0.1550072729587555,
0.3988184928894043,
0.0917820930480957,
0.20334471762180328,
0.0828687995672226,
-0.05077162757515907,
0.09634140133857727,
-0.028236161917448044,
0.13924676179885864,
0.2898438572883606,
0.21620428562164307,
0.22060373425483704,
0.4565187096595764,
-0.17120355367660522,
0.27675455808639526,
-0.07004816085100174,
-0.10128434747457504,
0.1885092854499817,
0.2997211813926697,
-0.17522038519382477,
-0.3035210967063904,
0.3549369275569916,
-0.08290614187717438,
-0.1952500343322754,
0.12009654939174652,
0.2693507671356201,
-0.12426581978797913,
0.44504988193511963,
0.11424493789672852,
0.523675799369812,
-0.16810917854309082,
-0.03772331401705742,
-0.03242100775241852,
-0.31157374382019043,
0.09768471121788025,
-0.4441360831260681,
0.4474360942840576,
-0.3145672082901001,
0.028040461242198944,
0.19296573102474213,
-0.05784822627902031,
0.3487165570259094,
0.009805016219615936,
-0.056731704622507095,
0.2439534217119217,
0.21138827502727509,
-0.2997041344642639,
-0.26009297370910645,
0.2036290466785431,
0.33056074380874634,
-0.17312796413898468,
0.2051868587732315,
0.14459723234176636,
0.22928842902183533,
-0.012396953999996185,
0.0933920294046402,
0.05221739783883095,
-0.03203710913658142,
0.14773476123809814,
-0.1234663724899292,
-0.0408039316534996,
-0.02388226054608822,
-0.04443207383155823,
0.19562824070453644,
-0.09013523906469345,
0.19942650198936462,
-0.4773484468460083,
0.11711576581001282,
-0.39543628692626953,
-0.0841057300567627,
0.19241726398468018,
0.0853935033082962,
-0.05370515584945679,
0.03207315132021904,
-0.6201786398887634,
0.08127178996801376,
0.06154409795999527,
-0.46129119396209717,
0.12906815111637115,
0.2360176295042038,
-0.48652809858322144,
-0.5040931701660156,
0.20692697167396545,
-0.1971995085477829,
0.18681523203849792,
-0.12766146659851074,
0.20489278435707092,
0.050346117466688156,
0.003467988222837448,
0.16203837096691132,
0.21329791843891144,
-0.3956356942653656,
0.7014315128326416,
-0.29874271154403687,
-0.054403193295001984,
-0.19218021631240845,
0.33812642097473145,
0.19179382920265198,
-0.33645930886268616,
-0.1269155889749527,
0.1667645275592804,
-0.09093141555786133,
-0.040291957557201385,
-0.6791932582855225,
0.2840147316455841,
0.20659127831459045,
-0.19949914515018463,
-0.03082241304218769,
-0.17461638152599335,
0.3802754282951355,
-0.16999439895153046,
0.08249924331903458,
0.08258360624313354,
-0.22688330709934235,
0.18409129977226257,
0.03559152036905289,
-0.046861618757247925,
-0.15467078983783722,
0.2743144631385803,
0.11214751750230789,
-0.0530887134373188,
0.16030678153038025,
0.17038102447986603,
-0.350969135761261,
0.09164001047611237,
-0.0039903391152620316,
0.09678144752979279,
-0.10978667438030243,
-0.12990671396255493,
-0.004144901409745216,
0.18589188158512115,
0.17647449672222137,
-0.054169438779354095,
-0.0846811905503273,
-0.24358642101287842,
0.1057257205247879,
0.07716615498065948,
0.09051632881164551,
0.11325851082801819,
-0.1844826191663742,
-0.07118290662765503,
-0.19171693921089172,
-0.08255093544721603,
0.057035814970731735,
0.2241566777229309,
-0.22116990387439728,
-0.017499443143606186,
0.003847651183605194,
-0.5709000825881958,
0.09883162379264832,
0.32632991671562195,
0.20761603116989136,
-0.045653969049453735,
0.2283526510000229,
0.27122217416763306,
-0.3303094506263733,
-0.062058985233306885,
-0.12598805129528046,
0.21703696250915527,
0.2500317692756653,
0.07938939332962036,
-0.040792807936668396,
0.0003724619746208191,
-0.18712769448757172,
-0.08582480996847153,
0.3521513044834137,
0.22248601913452148,
0.05565061420202255,
-0.03609355539083481,
0.03901657834649086,
0.3075657784938812,
-0.18068547546863556,
-0.11458773165941238,
0.46725064516067505,
-0.007477111183106899,
0.42386820912361145,
0.3294427692890167,
0.5962523221969604,
0.32394710183143616,
0.22621357440948486,
0.07450293004512787,
0.1411736160516739,
0.3977958559989929,
-0.03871874883770943,
-0.5926831960678101,
0.22501204907894135,
-0.051644954830408096,
0.32420778274536133,
0.12594226002693176,
0.10245437175035477,
0.5430733561515808,
-0.16846966743469238,
0.3334772288799286,
-0.07456821948289871,
0.015719469636678696,
-0.03866381198167801,
-0.2105376124382019,
0.3731575906276703,
0.04620493948459625,
-0.40590107440948486,
0.11830231547355652,
-0.24824470281600952,
0.17979875206947327,
-0.04097747802734375,
-0.37222155928611755,
-0.12052834033966064,
0.20632228255271912,
-0.12905794382095337,
-0.1363000124692917,
0.16840972006320953,
-0.17091551423072815,
-0.018538672477006912,
-0.030321769416332245,
0.1625666469335556,
-0.06556199491024017,
0.17465627193450928,
-0.12604829668998718,
0.11946610361337662,
0.18652480840682983,
-0.23980388045310974,
0.270334392786026,
0.3516545295715332,
0.0732792317867279,
-0.03318548947572708,
0.055921126157045364,
-0.2551760673522949,
0.20003493130207062,
0.227149099111557,
0.2629871070384979,
0.20237043499946594,
-0.20027531683444977,
0.24051938951015472,
0.10155618190765381,
0.09056300669908524,
0.014272663742303848,
-0.0524294450879097,
0.10364226996898651,
-0.25055721402168274,
0.09481139481067657,
0.15791170299053192,
-0.13722556829452515,
-0.17229284346103668,
-0.0945402979850769,
0.19190111756324768,
-0.32943111658096313,
-0.20959553122520447,
-0.2745968699455261,
-0.0512113943696022,
-0.028921619057655334,
0.08194063603878021,
-0.49293217062950134,
-0.055552951991558075,
0.2794693410396576,
-0.3922261893749237,
-0.05394469574093819,
0.02056412398815155,
0.0867624506354332,
0.09269161522388458,
0.5043997764587402,
0.038783252239227295,
0.38860663771629333,
-0.30816665291786194,
-0.17850258946418762,
-0.17666804790496826,
0.132648304104805,
-0.1186951994895935,
0.24768859148025513,
-0.05434726923704147,
0.6779211759567261,
-0.017811045050621033,
-0.12986037135124207,
0.5580176711082458,
0.02537049539387226,
0.4050862491130829,
0.6286461353302002,
-0.12188373506069183,
0.3365914523601532,
-0.36652451753616333,
-0.06580492109060287,
0.2729146480560303,
0.0581231489777565,
0.27628234028816223,
-0.13306573033332825,
0.05260094255208969,
-0.16677454113960266,
0.1708073765039444,
0.2979450523853302,
-0.11311855912208557,
0.32344332337379456,
-0.029788346961140633,
0.21364837884902954,
0.10268982499837875,
-0.008294057101011276,
-0.29660189151763916,
0.033979520201683044,
-0.2672463357448578,
-0.21336573362350464,
-0.008019208908081055,
-0.14401240646839142,
0.022450031712651253,
-0.5981575846672058,
0.050073303282260895,
0.582876980304718,
0.11161781847476959,
-0.39642229676246643,
0.07395047694444656,
0.08584237843751907,
-0.08665342628955841,
0.0938548669219017,
0.1230701357126236,
0.29134228825569153,
0.14141908288002014,
0.10806727409362793,
-0.367326557636261,
0.07890094816684723,
0.19009248912334442,
-0.15824876725673676,
-0.14949287474155426,
-0.8475632071495056,
0.34319597482681274,
0.2361840307712555,
0.30791157484054565,
-0.36843186616897583,
-0.3030955195426941,
0.13902011513710022,
0.20960575342178345,
-0.13422350585460663,
0.3478829860687256,
-0.03777926415205002,
-0.27163323760032654,
-0.16467946767807007,
-0.6367993354797363,
0.11179661750793457,
0.13494910299777985,
-0.08618191629648209,
-0.133478581905365
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | query set: 1e6
source dataset: 1e6
embedding size: 768
index: Flat
topk: 20
GPU: V100
The time taken to traverse the query set once is about 1.5h, which is almost not influenced by the value of query batch size or the number of GPUs according to my experiments. | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 48 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
query set: 1e6
source dataset: 1e6
embedding size: 768
index: Flat
topk: 20
GPU: V100
The time taken to traverse the query set once is about 1.5h, which is almost not influenced by the value of query batch size or the number of GPUs according to my experiments. | [
-0.2177337259054184,
-0.6628204584121704,
-0.14268803596496582,
0.07346982508897781,
-0.46701085567474365,
0.008454367518424988,
0.13630062341690063,
0.025091467425227165,
0.545770525932312,
0.03036227822303772,
-0.23599079251289368,
-0.2463901787996292,
0.5220271944999695,
-0.1453210413455963,
-0.15003237128257751,
-0.06704747676849365,
0.40139782428741455,
-0.2708723545074463,
0.0511866919696331,
-0.17701593041419983,
-0.49875372648239136,
0.10822603851556778,
-0.37419891357421875,
-0.17698515951633453,
-0.13743630051612854,
0.09476877003908157,
-0.24717332422733307,
-0.012817420065402985,
0.1056031733751297,
-0.15787163376808167,
-0.31609174609184265,
0.17772932350635529,
0.12531089782714844,
0.5088029503822327,
-0.0001260347489733249,
-0.1742842197418213,
-0.07416506111621857,
0.015059569850564003,
0.22630392014980316,
0.3515428900718689,
-0.1563776433467865,
0.23995110392570496,
0.03296557068824768,
0.021773532032966614,
-0.40538832545280457,
-0.012881741859018803,
0.1751062273979187,
-0.6785693764686584,
-0.12485630810260773,
0.013500439934432507,
0.029586004093289375,
-0.04071783646941185,
-0.06462055444717407,
-0.1499662548303604,
-0.08609098941087723,
-0.36435872316360474,
-0.03541063517332077,
-0.11869513988494873,
0.48723509907722473,
-0.052242211997509,
-0.022817552089691162,
0.42270854115486145,
0.07118270546197891,
0.06317441910505295,
-0.12456168979406357,
0.029806960374116898,
0.27412551641464233,
-0.34396928548812866,
0.13235998153686523,
-0.058615610003471375,
-0.14860031008720398,
-0.002383757382631302,
-0.22655563056468964,
-0.4006762206554413,
-0.18376792967319489,
0.04845747351646423,
-0.16360491514205933,
0.08926613628864288,
-0.19659505784511566,
-0.16248898208141327,
0.1336815059185028,
-0.17562155425548553,
0.06290900707244873,
-0.10566629469394684,
0.188518226146698,
0.5405890941619873,
0.07283686101436615,
0.25725266337394714,
0.30792850255966187,
0.15804272890090942,
-0.2542532980442047,
-0.23058229684829712,
0.2875159680843353,
0.1297280490398407,
-0.959378182888031,
0.1972150355577469,
0.1659853160381317,
-0.3621577322483063,
0.06779086589813232,
-0.07466381788253784,
-0.24831996858119965,
0.08157380670309067,
0.10417792946100235,
0.16212555766105652,
0.018583104014396667,
-0.03340193256735802,
-0.041351787745952606,
-0.15323218703269958,
-0.19797714054584503,
-0.2985580265522003,
-0.03927776962518692,
0.06571561843156815,
0.05139603465795517,
-0.2618791162967682,
-0.682216465473175,
-0.1649031937122345,
-0.011590669862926006,
0.12804314494132996,
-0.11542215943336487,
-0.10288281738758087,
-0.05258868262171745,
-0.27097630500793457,
0.10662707686424255,
0.29056987166404724,
-0.010538376867771149,
0.003252146765589714,
-0.23447100818157196,
0.07460373640060425,
-0.23841506242752075,
-0.075117327272892,
-0.10045972466468811,
-0.21544747054576874,
0.0036415718495845795,
0.30175355076789856,
0.0107182078063488,
-0.269130676984787,
-0.0464739054441452,
0.10372328013181686,
0.13085393607616425,
0.08502328395843506,
0.18219886720180511,
-0.3960212469100952,
0.3117961883544922,
0.19413800537586212,
0.22199290990829468,
0.03979688137769699,
0.03070922940969467,
0.33820641040802,
-0.29283395409584045,
0.25363096594810486,
-0.22815755009651184,
0.0029648952186107635,
0.17095690965652466,
0.0037287133745849133,
0.31733089685440063,
-0.19504517316818237,
-0.08219978958368301,
0.6174612045288086,
0.019530639052391052,
0.26552680134773254,
0.3090488910675049,
-0.13738325238227844,
-0.03522137179970741,
-0.19033141434192657,
0.3235565423965454,
0.11960367858409882,
-0.06953354179859161,
-0.15367433428764343,
0.42092615365982056,
-0.07750274240970612,
-0.03819292038679123,
0.6323577165603638,
0.11072848737239838,
-0.1275753676891327,
-0.2288360595703125,
0.5883765816688538,
0.2642277181148529,
-0.4504788815975189,
0.2016805112361908,
-0.08541404455900192,
-0.12070383876562119,
0.011924805119633675,
0.27293267846107483,
0.12526141107082367,
0.048512011766433716,
-0.012712650001049042,
0.34339821338653564,
0.49019867181777954,
-0.09045270085334778,
0.023450085893273354,
-0.0921654924750328,
0.06690236926078796,
0.1364808976650238,
0.1691937893629074,
0.12008059024810791,
-0.1485232710838318,
-0.09564334899187088,
-1.039055347442627,
0.4257162809371948,
0.01448797807097435,
-0.0070261359214782715,
-0.0915939211845398,
0.42486298084259033,
0.38929665088653564,
0.4909214675426483,
0.2522326111793518,
0.15603762865066528,
0.21598386764526367,
-0.21640095114707947,
-0.03921443969011307,
0.3226413428783417,
-0.1952461153268814,
0.5055774450302124,
-0.05484212934970856,
-0.2807668149471283,
0.07920738309621811,
-0.09177936613559723,
0.05756646394729614,
0.019124668091535568,
-0.1864946484565735,
-0.2709830403327942,
0.12554943561553955,
0.025530507788062096,
-0.03950297459959984,
-0.40149611234664917,
0.013181900605559349,
-0.058407261967659,
0.059774380177259445,
-0.4069881737232208,
-0.1240277960896492,
0.265083909034729,
-0.3205680251121521,
0.06627321243286133,
0.3729265332221985,
0.2212018370628357,
-0.220268115401268,
0.46577638387680054,
0.2401767522096634,
0.05485278367996216,
0.08060513436794281,
0.08700000494718552,
0.02106337994337082,
0.07579673081636429,
-0.22757381200790405,
0.06855328381061554,
0.2371995598077774,
0.10864834487438202,
0.46813979744911194,
-0.03584790974855423,
-0.37456250190734863,
0.10457821190357208,
0.13665053248405457,
0.11169440299272537,
0.24863609671592712,
-0.0365903414785862,
-0.10430680215358734,
0.05751814320683479,
-0.14096713066101074,
-0.6663843393325806,
0.4249632656574249,
-0.09329961240291595,
0.008954375982284546,
0.06687777489423752,
-0.11612122505903244,
-0.08352675288915634,
-0.0401800163090229,
-0.04456476867198944,
-0.37784335017204285,
0.14812685549259186,
0.17200280725955963,
0.23398539423942566,
-0.1187332347035408,
-0.002883587032556534,
-0.11664240807294846,
0.11854858696460724,
0.10803718864917755,
-0.010260235518217087,
0.04634006321430206,
-0.22695580124855042,
-0.0840880498290062,
0.009192068129777908,
-0.2420383095741272,
0.08820854872465134,
-0.19310420751571655,
-0.12104582786560059,
0.10535182803869247,
0.28804004192352295,
-0.11067139357328415,
-0.2370610535144806,
-0.0882919505238533,
-0.06253187358379364,
0.04535141587257385,
0.1407470554113388,
0.013237260282039642,
-0.021257396787405014,
0.1691356748342514,
-0.2005200833082199,
0.6257302761077881,
0.17592276632785797,
-0.28074970841407776,
-0.11917511373758316,
0.018480215221643448,
0.007929014042019844,
-0.029312362894415855,
0.029085244983434677,
0.06742933392524719,
0.05198235809803009,
0.0967249646782875,
-0.07278382778167725,
-0.2442578375339508,
0.009177908301353455,
-0.04449206590652466,
-0.14111141860485077,
-0.1105853021144867,
-0.1597120761871338,
-0.2859836220741272,
-0.05094330757856369,
0.3117049038410187,
0.036707695573568344,
-0.19929003715515137,
-0.014848260208964348,
-0.29143089056015015,
-0.10160121321678162,
-0.2957245409488678,
0.09801797568798065,
-0.12151362746953964,
-0.02052263729274273,
-0.07990819960832596,
0.20650970935821533,
-0.03626241907477379,
0.19298291206359863,
-0.12051769345998764,
0.27658677101135254,
-0.014619861729443073,
-0.18774008750915527,
-0.1224040538072586,
-0.29670965671539307,
-0.08346135169267654,
-0.014929432421922684,
-0.10986629128456116,
-0.1282586008310318,
-0.013621717691421509,
0.21215598285198212,
0.020192166790366173,
0.3455159068107605,
0.16139885783195496,
0.15488041937351227,
0.06292299181222916,
-0.03984872251749039,
0.08262081444263458,
0.620272696018219,
0.12031169980764389,
-0.35813912749290466,
-0.033952709287405014,
0.08856091648340225,
-0.04955960810184479,
0.1655885875225067,
0.18161669373512268,
0.16601836681365967,
0.005582967773079872,
0.06079994514584541,
-0.0037755928933620453,
0.7915753722190857,
0.09792466461658478,
0.10477664321660995,
0.16193948686122894,
0.05176564306020737,
0.16421309113502502,
0.04535270854830742,
0.015217317268252373,
0.30381032824516296,
0.2945352792739868,
-0.03313285484910011,
0.09876414388418198,
-0.03309544920921326,
-0.059304237365722656,
-0.019648151472210884,
-0.03843110054731369,
-0.28151044249534607,
-0.020122824236750603,
0.12784983217716217,
0.0619768388569355,
0.26822617650032043,
-0.20640935003757477,
-0.05837423354387283,
-0.10843715071678162,
0.17575669288635254,
-0.18509425222873688,
0.13836397230625153,
0.11347192525863647,
-0.10218633711338043,
0.012563396245241165,
-0.2197909951210022,
-0.30890533328056335,
0.5024206042289734,
-0.19455435872077942,
0.39543136954307556,
0.20016546547412872,
-0.2928431034088135,
0.39626967906951904,
-0.033913832157850266,
0.8128885626792908,
0.2162390947341919,
-0.31732386350631714,
-0.06741508841514587,
-0.26869621872901917,
-0.22820524871349335,
-0.21836628019809723,
-0.11415813863277435,
0.14454570412635803,
0.385191410779953,
0.1146613359451294,
0.027100302278995514,
-0.4522474408149719,
0.000006705522537231445,
-0.354911208152771,
-0.0544772706925869,
-0.34623008966445923,
-0.5019204020500183,
-0.06200652942061424,
0.18522189557552338,
0.5699346661567688,
0.05140029639005661,
-0.022763172164559364,
-0.10748057067394257,
0.0914008766412735,
-0.22516869008541107,
-0.13811886310577393,
0.09757032990455627,
0.11904619634151459,
-0.12108778208494186,
0.04641837999224663,
0.057823535054922104,
0.4622575044631958,
0.044554032385349274,
0.23108187317848206,
0.01908116601407528,
-0.06816132366657257,
0.07378801703453064,
0.038816019892692566,
0.17687399685382843,
0.32437071204185486,
0.1430136114358902,
0.08753332495689392,
0.36198776960372925,
-0.079743392765522,
0.22399690747261047,
0.005397888831794262,
-0.16538751125335693,
0.19402311742305756,
0.3881900906562805,
-0.32699570059776306,
-0.3925893008708954,
0.39850589632987976,
-0.08571271598339081,
-0.3031851649284363,
0.08454780280590057,
0.2350219041109085,
-0.04543944448232651,
0.4662654995918274,
0.11373204737901688,
0.4484666585922241,
-0.13062384724617004,
-0.09286504983901978,
-0.11008412390947342,
-0.06302127242088318,
0.1446649581193924,
-0.40994369983673096,
0.5336176156997681,
-0.30973997712135315,
0.012837603688240051,
0.006879875436425209,
-0.10713334381580353,
0.30031126737594604,
0.11065634340047836,
0.13620011508464813,
0.31607404351234436,
0.16033612191677094,
-0.33037567138671875,
-0.21664972603321075,
0.03648065775632858,
0.3270987570285797,
-0.05248097702860832,
0.40761488676071167,
-0.024562982842326164,
0.2749570310115814,
0.0445924736559391,
0.08540032058954239,
0.18584255874156952,
0.14015328884124756,
0.10767637193202972,
-0.15651734173297882,
-0.089246466755867,
-0.1339598298072815,
-0.04831394553184509,
0.22493386268615723,
-0.046139586716890335,
0.11610147356987,
-0.3345105051994324,
0.09032437205314636,
-0.3752216696739197,
0.06820158660411835,
0.17141380906105042,
0.2251981496810913,
-0.12371081858873367,
-0.030365588143467903,
-0.6019538044929504,
0.10940614342689514,
0.11329375952482224,
-0.3485850989818573,
0.10635805130004883,
0.21034832298755646,
-0.4844215512275696,
-0.5400488376617432,
0.3727427124977112,
-0.18658891320228577,
0.32756951451301575,
-0.25384703278541565,
0.1904325783252716,
0.1739187240600586,
0.0845135897397995,
-0.033141519874334335,
0.16113784909248352,
-0.33410871028900146,
0.7565440535545349,
-0.36451923847198486,
-0.07290029525756836,
-0.07644636929035187,
0.15906156599521637,
0.3657868504524231,
-0.4339660108089447,
-0.10273976624011993,
0.1739816963672638,
-0.08142638206481934,
0.02749490737915039,
-0.5847105979919434,
0.3990808427333832,
0.352159708738327,
-0.08404487371444702,
0.016363194212317467,
-0.10980920493602753,
0.4539059102535248,
-0.18167099356651306,
-0.018163196742534637,
-0.02408527582883835,
-0.3866065740585327,
0.02315784990787506,
0.29160022735595703,
-0.04833930730819702,
-0.09202703833580017,
0.173141747713089,
0.3325955271720886,
-0.16254419088363647,
0.1609814614057541,
0.21281231939792633,
-0.13728703558444977,
0.08420614153146744,
-0.017070235684514046,
0.16884899139404297,
-0.11544689536094666,
0.22140797972679138,
-0.03492870181798935,
0.22100158035755157,
-0.042482323944568634,
-0.1041107028722763,
-0.04918970912694931,
-0.09210982173681259,
0.1520349085330963,
0.14551769196987152,
0.09081012010574341,
0.26920637488365173,
-0.23081143200397491,
-0.1837717890739441,
-0.31954264640808105,
-0.09837506711483002,
0.12557193636894226,
0.2178153395652771,
-0.20443306863307953,
-0.09663882851600647,
0.10243009775876999,
-0.42920321226119995,
0.015472766011953354,
0.31131744384765625,
0.24023334681987762,
0.002682201564311981,
0.19969789683818817,
0.2912260591983795,
-0.25533196330070496,
-0.019002627581357956,
-0.18005383014678955,
0.13003982603549957,
0.45664680004119873,
-0.067668117582798,
-0.10902775079011917,
-0.055931225419044495,
-0.22194980084896088,
-0.18108835816383362,
0.3139076828956604,
0.334738165140152,
0.14176228642463684,
-0.21644529700279236,
0.01859280839562416,
0.07355910539627075,
-0.1395776867866516,
-0.10914651304483414,
0.37917351722717285,
0.06958101689815521,
0.2816484272480011,
0.4295760989189148,
0.5429922938346863,
0.44611120223999023,
0.020954374223947525,
-0.010140769183635712,
0.3701777756214142,
0.5548915266990662,
-0.04717030003666878,
-0.5612161159515381,
0.3501477539539337,
0.042859021574258804,
0.29423004388809204,
0.19469264149665833,
0.13650088012218475,
0.4880218505859375,
-0.16975346207618713,
0.41515475511550903,
0.02394295111298561,
-0.15763750672340393,
-0.008145317435264587,
-0.34078603982925415,
0.3353348970413208,
0.07910162955522537,
-0.3139292895793915,
0.14127683639526367,
-0.24734413623809814,
0.14504282176494598,
-0.11095147579908371,
-0.32306137681007385,
-0.10036581754684448,
0.20761650800704956,
-0.046378619968891144,
-0.13441447913646698,
-0.02111758664250374,
-0.13428334891796112,
0.05733509361743927,
-0.0841207206249237,
0.2337161898612976,
-0.07922343909740448,
0.17798858880996704,
-0.1010296493768692,
0.211770161986351,
0.21248586475849152,
-0.3010307848453522,
0.3058721125125885,
0.20050856471061707,
0.10160012543201447,
0.011981170624494553,
-0.0928252637386322,
-0.13864769041538239,
0.21376611292362213,
0.14482878148555756,
0.19078697264194489,
0.30702993273735046,
-0.2992649972438812,
0.2536754906177521,
0.08807426691055298,
0.10924383997917175,
0.08597718924283981,
-0.1748373955488205,
0.0009288489818572998,
-0.3531002402305603,
0.029680661857128143,
-0.020401306450366974,
0.051325976848602295,
-0.1726929396390915,
-0.037940625101327896,
0.20876488089561462,
-0.20047558844089508,
-0.26723596453666687,
-0.4825943410396576,
0.04864078760147095,
-0.0033409930765628815,
0.1828271448612213,
-0.5331888794898987,
-0.085044726729393,
0.3675173223018646,
-0.4641176760196686,
-0.10881810635328293,
0.07682563364505768,
-0.027975641191005707,
0.05046346038579941,
0.5009394884109497,
0.12867769598960876,
0.4387592375278473,
-0.11102334409952164,
-0.06599331647157669,
-0.18339084088802338,
0.2233978807926178,
-0.1424369066953659,
0.129839688539505,
0.05901665613055229,
0.6777704358100891,
-0.01614772528409958,
-0.16224931180477142,
0.5980731844902039,
0.23304694890975952,
0.31666135787963867,
0.7159172296524048,
0.07038308680057526,
0.26082268357276917,
-0.5651037096977234,
0.0209809523075819,
0.21987660229206085,
0.005525913089513779,
0.24938678741455078,
-0.24014700949192047,
-0.16222116351127625,
-0.1881769895553589,
0.1935233473777771,
0.3759608864784241,
-0.31578946113586426,
0.32951778173446655,
-0.00940801203250885,
0.09854570031166077,
0.08089672774076462,
0.09010890126228333,
-0.12647558748722076,
0.2570609152317047,
-0.35301128029823303,
-0.23624390363693237,
-0.1419709026813507,
-0.2811562716960907,
-0.18966928124427795,
-0.612809956073761,
0.11225070804357529,
0.44908371567726135,
0.06088864058256149,
-0.47289615869522095,
0.14148302376270294,
0.07203274965286255,
-0.29231613874435425,
0.09760278463363647,
0.2942485213279724,
0.215467631816864,
0.10565679520368576,
0.1009676530957222,
-0.34495118260383606,
0.15536557137966156,
0.14066575467586517,
-0.36362236738204956,
-0.19083693623542786,
-0.8772574663162231,
0.2437523901462555,
0.26088035106658936,
0.2703826427459717,
-0.3542410135269165,
-0.25666508078575134,
0.07254855334758759,
0.33091193437576294,
-0.11236101388931274,
0.20306287705898285,
-0.12948806583881378,
-0.19725121557712555,
-0.2592831254005432,
-0.6801902055740356,
0.16606953740119934,
0.03775548189878464,
-0.0815877765417099,
-0.21771511435508728
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Hmmm the number of GPUs should divide the time, something is going wrong. Can you check that adding more GPU does divide the memory used per GPU ? Maybe it can be worth looking at similar issues in the FAISS repository or create a noew issue over there to understand what's going on | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 53 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Hmmm the number of GPUs should divide the time, something is going wrong. Can you check that adding more GPU does divide the memory used per GPU ? Maybe it can be worth looking at similar issues in the FAISS repository or create a noew issue over there to understand what's going on | [
-0.04531923308968544,
-0.66455078125,
-0.16315530240535736,
0.21673570573329926,
-0.3153473734855652,
-0.029438655823469162,
0.09823170304298401,
0.013767112046480179,
0.4572139382362366,
0.10069864243268967,
-0.16644717752933502,
-0.2908722162246704,
0.5046354532241821,
-0.23165173828601837,
-0.2691982686519623,
-0.11893309652805328,
0.38557156920433044,
-0.3252055048942566,
0.06940856575965881,
-0.1641310453414917,
-0.414707750082016,
0.22324952483177185,
-0.3074866235256195,
-0.20371802151203156,
-0.3087666630744934,
0.15862558782100677,
-0.2339824140071869,
-0.0857158973813057,
0.00028474070131778717,
-0.08795680105686188,
-0.4432125985622406,
0.14992603659629822,
0.00846177525818348,
0.5730003714561462,
-0.00011732663551811129,
-0.2728281319141388,
-0.028949350118637085,
0.0087407436221838,
0.23728951811790466,
0.38757985830307007,
-0.09493652731180191,
0.26419851183891296,
-0.01040978729724884,
0.03127450495958328,
-0.42937710881233215,
-0.04721099138259888,
0.017610283568501472,
-0.5853272080421448,
-0.10935936868190765,
0.009192355908453465,
0.13826100528240204,
-0.21110324561595917,
0.13825954496860504,
-0.19651992619037628,
0.01319091022014618,
-0.3295243978500366,
-0.06420158594846725,
-0.034954238682985306,
0.4588201940059662,
-0.07901056110858917,
0.022878870368003845,
0.43983232975006104,
0.15725737810134888,
0.10934440791606903,
-0.08040692657232285,
0.09184596687555313,
0.26953282952308655,
-0.2865588963031769,
0.14233241975307465,
-0.16194602847099304,
-0.18629485368728638,
0.017777439206838608,
-0.1662188619375229,
-0.35559558868408203,
-0.1984863132238388,
-0.018288742750883102,
-0.0871625617146492,
0.09651874005794525,
-0.278556764125824,
-0.188888281583786,
0.22319598495960236,
-0.20372793078422546,
0.08442004024982452,
0.05558151379227638,
0.16880293190479279,
0.4899739623069763,
0.012580795213580132,
0.18941298127174377,
0.29305145144462585,
0.1587172895669937,
-0.33775144815444946,
-0.13300640881061554,
0.16645437479019165,
0.11868748813867569,
-0.8501091003417969,
0.264880895614624,
0.20516464114189148,
-0.3942900002002716,
0.12187201529741287,
-0.09593145549297333,
-0.3111205995082855,
0.06626226007938385,
0.027966998517513275,
0.1502562016248703,
-0.010280098766088486,
0.0421755351126194,
-0.11197257786989212,
-0.14680001139640808,
-0.3030375838279724,
-0.21000881493091583,
-0.02781566232442856,
-0.09065216034650803,
0.1497577577829361,
-0.32316115498542786,
-0.6844508647918701,
-0.19604167342185974,
0.02608100324869156,
0.07094475626945496,
-0.10193232446908951,
-0.09446384757757187,
-0.07754013687372208,
-0.2435666173696518,
0.19191531836986542,
0.39461758732795715,
0.07363029569387436,
0.026217162609100342,
-0.15901905298233032,
0.11396016925573349,
-0.36641621589660645,
-0.158919095993042,
-0.16346491873264313,
-0.15737077593803406,
-0.24443159997463226,
0.27878305315971375,
0.012944266200065613,
-0.11370134353637695,
-0.05944657325744629,
0.1372791826725006,
0.09979137033224106,
-0.15979152917861938,
0.0869007334113121,
-0.3992370367050171,
0.34843555092811584,
0.09755704551935196,
0.14818303287029266,
0.03365331143140793,
-0.016356825828552246,
0.2355813831090927,
-0.1882604956626892,
0.256413996219635,
-0.20122861862182617,
0.019360434263944626,
0.07698240876197815,
0.09429449588060379,
0.32785147428512573,
-0.12101447582244873,
-0.0598367378115654,
0.5451350212097168,
0.10322988033294678,
0.27191516757011414,
0.25613346695899963,
-0.00250847265124321,
0.012133177369832993,
-0.26123833656311035,
0.40008291602134705,
0.23714762926101685,
-0.07766023278236389,
-0.1264200210571289,
0.2808164060115814,
-0.048972729593515396,
0.07898327708244324,
0.7198381423950195,
0.173137828707695,
-0.11181477457284927,
-0.22530131042003632,
0.4656035900115967,
0.14040425419807434,
-0.3503486216068268,
0.17954528331756592,
-0.10479572415351868,
-0.10194908082485199,
0.056068629026412964,
0.2412450909614563,
0.12151522189378738,
-0.014514457434415817,
0.12884071469306946,
0.4122086763381958,
0.3848971724510193,
-0.1416504979133606,
0.0745491087436676,
-0.22162312269210815,
0.03247509151697159,
0.16875945031642914,
0.14650601148605347,
0.12894146144390106,
-0.13412851095199585,
-0.13267198204994202,
-1.0014762878417969,
0.46441516280174255,
-0.017917174845933914,
0.021008720621466637,
-0.13490815460681915,
0.5656703114509583,
0.39256131649017334,
0.3645647168159485,
0.17701274156570435,
0.2053971290588379,
0.21301394701004028,
-0.17257283627986908,
0.01446497067809105,
0.20901769399642944,
-0.07480232417583466,
0.40517815947532654,
-0.16195155680179596,
-0.20235075056552887,
0.009759161621332169,
0.02907540649175644,
-0.0030555352568626404,
0.0030441246926784515,
-0.09338316321372986,
-0.06897376477718353,
0.19468268752098083,
0.06603795289993286,
-0.03249058499932289,
-0.3585851192474365,
0.14519648253917694,
-0.22829647362232208,
-0.13372889161109924,
-0.4110523462295532,
-0.04586545377969742,
0.3465867340564728,
-0.24256953597068787,
-0.01850028522312641,
0.3634469211101532,
0.312053918838501,
-0.25069087743759155,
0.44691529870033264,
0.14909890294075012,
0.06298477202653885,
0.07823987305164337,
0.02330142818391323,
0.08381202816963196,
-0.000024862587451934814,
-0.19715097546577454,
0.03201805800199509,
0.15362749993801117,
0.17184439301490784,
0.35450297594070435,
-0.01880505308508873,
-0.253498375415802,
0.18203799426555634,
0.0657547265291214,
0.2071055918931961,
0.14256823062896729,
0.06608325988054276,
-0.1397441178560257,
-0.06959541141986847,
-0.14289386570453644,
-0.6280727982521057,
0.4385266900062561,
-0.03747433051466942,
0.14144755899906158,
-0.009413719177246094,
-0.1254788339138031,
-0.03257991373538971,
0.0091358982026577,
-0.030096398666501045,
-0.27164047956466675,
0.12868283689022064,
0.23374441266059875,
0.10940432548522949,
-0.09025511145591736,
0.0031958119943737984,
-0.13690707087516785,
0.014067009091377258,
0.1293378621339798,
-0.05566111207008362,
0.049692776054143906,
-0.1683773547410965,
-0.14172403514385223,
0.017979886382818222,
-0.1980501115322113,
0.09224583953619003,
-0.038776740431785583,
-0.1802632361650467,
-0.01608378440141678,
0.24956220388412476,
-0.13667032122612,
-0.30080538988113403,
-0.11315056681632996,
-0.21422907710075378,
0.006612561643123627,
0.21676687896251678,
0.14052164554595947,
-0.07326718419790268,
0.20318818092346191,
-0.13186627626419067,
0.5068047046661377,
0.09724079072475433,
-0.1339120864868164,
-0.11182162910699844,
0.07016944140195847,
-0.04296083748340607,
0.06410634517669678,
0.1742837280035019,
0.11236581951379776,
0.11651749163866043,
0.14393693208694458,
-0.09326857328414917,
-0.17679424583911896,
-0.09023506194353104,
-0.13887432217597961,
-0.14954286813735962,
-0.0207208301872015,
-0.30051514506340027,
-0.352286696434021,
0.002380426973104477,
0.2101835310459137,
0.1393655389547348,
-0.3109223544597626,
-0.002833200618624687,
-0.238473042845726,
-0.08472349494695663,
-0.3218349516391754,
0.014000501483678818,
-0.29806503653526306,
0.04390344396233559,
-0.2137213796377182,
0.2601066529750824,
0.013394095003604889,
0.14712050557136536,
-0.09074101597070694,
0.3588237166404724,
0.011018744669854641,
-0.18490751087665558,
-0.03728614002466202,
-0.3827117383480072,
0.009394410997629166,
-0.06672690808773041,
-0.15826939046382904,
-0.15246398746967316,
0.08986708521842957,
0.23946444690227509,
0.13874059915542603,
0.21046103537082672,
0.1924525648355484,
0.17100802063941956,
0.005539754405617714,
-0.16395308077335358,
0.003451228141784668,
0.5000195503234863,
0.17128564417362213,
-0.32267066836357117,
-0.1300753504037857,
0.09721431881189346,
-0.07839115709066391,
0.20098859071731567,
0.06676982343196869,
0.34090057015419006,
-0.16770878434181213,
0.049211665987968445,
0.10978591442108154,
0.7817618250846863,
0.15701398253440857,
0.21933914721012115,
0.14690294861793518,
-0.013156527653336525,
0.09008607268333435,
-0.006995871663093567,
-0.10925227403640747,
0.25371190905570984,
0.17298080027103424,
-0.04025080427527428,
-0.02971149981021881,
0.08647587150335312,
-0.060222774744033813,
0.01939980685710907,
0.0725165456533432,
-0.2942434847354889,
-0.13479730486869812,
0.13265734910964966,
0.16210484504699707,
0.198950856924057,
-0.2295161783695221,
-0.051561638712882996,
-0.10795243084430695,
0.12491973489522934,
-0.21512949466705322,
0.15147505700588226,
-0.005780607461929321,
-0.16282619535923004,
-0.04490458965301514,
-0.21943292021751404,
-0.33494114875793457,
0.4547277092933655,
-0.21183116734027863,
0.35799193382263184,
0.1380895972251892,
-0.19669696688652039,
0.4244202971458435,
0.007522859610617161,
0.8464884757995605,
0.263691246509552,
-0.4300364851951599,
0.0529462955892086,
-0.21685437858104706,
-0.2448371946811676,
-0.2245728075504303,
-0.1038149744272232,
0.03371148928999901,
0.5029310584068298,
0.011389903724193573,
-0.06428784877061844,
-0.3984423577785492,
0.04586727172136307,
-0.4135318994522095,
-0.0979541540145874,
-0.4307289123535156,
-0.4829188585281372,
-0.014457732439041138,
0.1238403171300888,
0.4403301477432251,
0.10894004255533218,
0.09478621929883957,
-0.130290225148201,
0.07681751251220703,
-0.0796336755156517,
-0.04686232656240463,
0.15197809040546417,
-0.030411913990974426,
0.07215426117181778,
0.10073413699865341,
0.05347754433751106,
0.4266735017299652,
0.031244726851582527,
0.2472204715013504,
0.04185861349105835,
0.02039203979074955,
0.14018359780311584,
0.06445450335741043,
0.13403424620628357,
0.3045578598976135,
0.16672295331954956,
0.15508632361888885,
0.4106292724609375,
-0.11412620544433594,
0.36162900924682617,
-0.05740807577967644,
-0.05162389948964119,
0.22916404902935028,
0.3560441732406616,
-0.2268725484609604,
-0.3341348469257355,
0.3287087678909302,
-0.050092149525880814,
-0.21149997413158417,
0.15513280034065247,
0.2506257891654968,
-0.1318812072277069,
0.4634479284286499,
0.08848340809345245,
0.5641664862632751,
-0.23158828914165497,
-0.06608112156391144,
-0.029616914689540863,
-0.195524200797081,
0.12714017927646637,
-0.46551334857940674,
0.5578270554542542,
-0.37232229113578796,
0.08116405457258224,
0.1495974361896515,
-0.10957999527454376,
0.29508906602859497,
0.03169817477464676,
0.02169555053114891,
0.2735685110092163,
0.08258013427257538,
-0.2711038887500763,
-0.21619579195976257,
0.11770397424697876,
0.35292378067970276,
-0.05971737578511238,
0.39724862575531006,
0.0854131355881691,
0.23854880034923553,
0.009014451876282692,
0.1063743606209755,
0.1457233875989914,
0.002871282398700714,
0.11143215000629425,
-0.17207208275794983,
-0.06971676647663116,
-0.05034821107983589,
-0.02564944326877594,
0.18975166976451874,
0.02635883539915085,
0.13684804737567902,
-0.42373907566070557,
0.04960976541042328,
-0.40072423219680786,
-0.04964296519756317,
0.19893847405910492,
0.14045387506484985,
-0.23054872453212738,
-0.04114709049463272,
-0.5413626432418823,
0.0671071708202362,
0.10921702533960342,
-0.436332106590271,
0.0731356143951416,
0.28155946731567383,
-0.46430039405822754,
-0.726546585559845,
0.3428950309753418,
-0.20124654471874237,
0.18659889698028564,
-0.1246270090341568,
0.10968375205993652,
0.10990698635578156,
0.12011237442493439,
0.07737960666418076,
0.1704649180173874,
-0.4760860502719879,
0.7388867735862732,
-0.3888954222202301,
-0.04704708606004715,
-0.08014087378978729,
0.24792665243148804,
0.31566178798675537,
-0.3292981684207916,
-0.1066981852054596,
0.24710293114185333,
-0.03114575333893299,
0.027089320123195648,
-0.7230871915817261,
0.37623071670532227,
0.19199687242507935,
-0.13297539949417114,
-0.061771150678396225,
-0.1490006446838379,
0.44932276010513306,
-0.2155219316482544,
0.039458371698856354,
0.017205964773893356,
-0.2868119180202484,
0.11857368052005768,
0.09248607605695724,
-0.05899517238140106,
-0.1486990749835968,
0.1897251456975937,
0.20262396335601807,
-0.032168198376894,
0.17635028064250946,
0.28699836134910583,
-0.2405605912208557,
0.11162742227315903,
-0.056542567908763885,
0.15919452905654907,
-0.1931493878364563,
-0.003098711371421814,
0.021694477647542953,
0.17211127281188965,
0.028452573344111443,
-0.059274397790431976,
-0.06924047321081161,
-0.16429951786994934,
0.19104264676570892,
0.11577412486076355,
0.11493664979934692,
0.23074597120285034,
-0.2037215232849121,
-0.14894573390483856,
-0.1509706974029541,
-0.0958506241440773,
0.021687321364879608,
0.28280964493751526,
-0.19870127737522125,
-0.007788551039993763,
0.14209400117397308,
-0.5348851680755615,
0.14493481814861298,
0.3398474454879761,
0.1977463662624359,
0.04422315955162048,
0.26979613304138184,
0.23168116807937622,
-0.2113092988729477,
0.009930618107318878,
-0.2567504346370697,
0.16016685962677002,
0.26228487491607666,
0.04075435921549797,
-0.10601293295621872,
-0.04924774169921875,
-0.20866581797599792,
-0.14834366738796234,
0.30419468879699707,
0.2533065378665924,
0.12036427110433578,
-0.0557035431265831,
0.010000145994126797,
0.22405880689620972,
-0.09520525485277176,
-0.09094488620758057,
0.376953125,
0.07608085870742798,
0.27565404772758484,
0.38119158148765564,
0.46769049763679504,
0.33602601289749146,
0.06940343976020813,
0.07673511654138565,
0.2834261953830719,
0.4327000379562378,
0.0059889634139835835,
-0.6494455933570862,
0.2442958503961563,
0.018131282180547714,
0.3066996932029724,
0.06883876025676727,
0.014677532017230988,
0.5227670669555664,
-0.11452826112508774,
0.30696603655815125,
-0.10361581295728683,
-0.0556766651570797,
-0.08748490363359451,
-0.2410391867160797,
0.23103824257850647,
0.17075590789318085,
-0.3022788465023041,
0.13826847076416016,
-0.35304510593414307,
0.21756768226623535,
0.004880864173173904,
-0.43674951791763306,
-0.09752530604600906,
0.20536309480667114,
-0.11715681105852127,
-0.09452131390571594,
0.12598659098148346,
-0.12082493305206299,
-0.027828484773635864,
-0.11114604771137238,
0.2887105345726013,
-0.1567266881465912,
0.2377261221408844,
-0.12661652266979218,
0.010211192071437836,
0.15923596918582916,
-0.2950984537601471,
0.3888462781906128,
0.31764906644821167,
-0.047132983803749084,
-0.006344856694340706,
-0.11364917457103729,
-0.18971312046051025,
0.19299428164958954,
0.12521103024482727,
0.2748197615146637,
0.39580047130584717,
-0.18088452517986298,
0.1949043571949005,
0.20248594880104065,
0.09383507817983627,
0.009839721024036407,
-0.05163703113794327,
0.08881662786006927,
-0.2019665241241455,
-0.04052022844552994,
0.07012958079576492,
-0.05282904580235481,
-0.26296839118003845,
-0.006575409322977066,
0.27388206124305725,
-0.31036561727523804,
-0.14470484852790833,
-0.47056135535240173,
0.00725187361240387,
-0.0646793320775032,
0.047042716294527054,
-0.6791687607765198,
-0.007083526812493801,
0.2847987413406372,
-0.5176194906234741,
-0.05638575553894043,
-0.0011600252473726869,
0.02873186767101288,
0.05411401018500328,
0.4561201333999634,
0.00038951635360717773,
0.40299248695373535,
-0.3132280707359314,
-0.19030267000198364,
-0.14936840534210205,
0.25729626417160034,
-0.2635379135608673,
0.2679279148578644,
-0.03858457878232002,
0.7196188569068909,
-0.18560245633125305,
-0.2653135061264038,
0.585137128829956,
0.09682653844356537,
0.31360113620758057,
0.6976855993270874,
-0.11513000726699829,
0.2637825906276703,
-0.4603414535522461,
-0.05618072301149368,
0.3219456374645233,
0.09494491666555405,
0.30163267254829407,
-0.22940552234649658,
-0.08606790751218796,
-0.08185688406229019,
0.24489155411720276,
0.26881974935531616,
-0.14247451722621918,
0.33985331654548645,
0.04583146423101425,
0.10981930047273636,
0.12521642446517944,
-0.0022343583405017853,
-0.30456048250198364,
0.057127028703689575,
-0.31985703110694885,
-0.23342326283454895,
-0.04980003461241722,
-0.17064246535301208,
-0.21718727052211761,
-0.6065883636474609,
-0.03495979309082031,
0.5695275664329529,
0.08674202859401703,
-0.3812495470046997,
0.1548147052526474,
0.1026625707745552,
-0.2078385055065155,
0.11309001594781876,
0.18604151904582977,
0.28400298953056335,
0.05575370416045189,
0.17830534279346466,
-0.34784144163131714,
0.04227942228317261,
0.162251815199852,
-0.17101158201694489,
-0.20813322067260742,
-0.8317427635192871,
0.3504588007926941,
0.26148903369903564,
0.17906604707241058,
-0.4337128698825836,
-0.3192335367202759,
0.08357573300600052,
0.3408008813858032,
-0.11481711268424988,
0.26936963200569153,
-0.07629987597465515,
-0.26681244373321533,
-0.14482273161411285,
-0.653684139251709,
0.17202505469322205,
0.05675274133682251,
0.16854891180992126,
-0.14199140667915344
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | > Can you check that adding more GPU does divide the memory used per GPU
The memory used per GPU is unchanged while adding more GPU. Is this unexpected?
I used to think that every GPU loads all the source vectors and the data parallelism is at the query level. 😆 | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 51 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
> Can you check that adding more GPU does divide the memory used per GPU
The memory used per GPU is unchanged while adding more GPU. Is this unexpected?
I used to think that every GPU loads all the source vectors and the data parallelism is at the query level. 😆 | [
-0.03190736100077629,
-0.653843343257904,
-0.15973937511444092,
0.3106303811073303,
-0.3666626214981079,
0.01485617458820343,
0.09648585319519043,
-0.049187544733285904,
0.4460489749908447,
0.0431780144572258,
-0.23672442138195038,
-0.21531887352466583,
0.4890957474708557,
-0.20423811674118042,
-0.11443363130092621,
-0.12576371431350708,
0.4038497805595398,
-0.25080299377441406,
0.029077328741550446,
-0.19621197879314423,
-0.4917578399181366,
0.12469518184661865,
-0.3887856602668762,
-0.20332486927509308,
-0.24536381661891937,
0.19242873787879944,
-0.28653836250305176,
-0.024846725165843964,
0.015065770596265793,
-0.12549760937690735,
-0.37175098061561584,
0.22344185411930084,
0.08612634986639023,
0.5372026562690735,
-0.00012252895976416767,
-0.20398202538490295,
-0.10114732384681702,
-0.02779363840818405,
0.22696737945079803,
0.3593384921550751,
-0.1582537144422531,
0.14408135414123535,
-0.008171666413545609,
-0.031863778829574585,
-0.35420459508895874,
-0.07101457566022873,
0.09864376485347748,
-0.6140561103820801,
-0.09204867482185364,
-0.041108109056949615,
0.048115212470293045,
-0.19062548875808716,
0.05856883153319359,
-0.08048103749752045,
0.00879526138305664,
-0.3581022024154663,
0.019108394160866737,
0.049189649522304535,
0.47244736552238464,
-0.055726952850818634,
-0.026580162346363068,
0.4723149538040161,
0.11290697753429413,
0.14247959852218628,
-0.106209896504879,
0.08696071803569794,
0.20118683576583862,
-0.26090890169143677,
0.16042664647102356,
-0.13802099227905273,
-0.046069614589214325,
-0.06016986072063446,
-0.2168160378932953,
-0.31849566102027893,
-0.2078039050102234,
0.015270659700036049,
-0.15436312556266785,
0.1947723925113678,
-0.2344503402709961,
-0.22816938161849976,
0.1599123179912567,
-0.27818506956100464,
-0.029108628630638123,
0.021400325000286102,
0.11535727977752686,
0.5806035995483398,
0.0001172865740954876,
0.21472245454788208,
0.2283400297164917,
0.18317590653896332,
-0.24971452355384827,
-0.17123457789421082,
0.12302802503108978,
0.14055779576301575,
-0.8739212155342102,
0.20803874731063843,
0.1249888688325882,
-0.4017311930656433,
0.1520385444164276,
-0.18315865099430084,
-0.17015688121318817,
0.10462027788162231,
-0.007368273101747036,
0.2138509452342987,
0.07726365327835083,
-0.01325256284326315,
-0.16856703162193298,
-0.06135903298854828,
-0.2406407743692398,
-0.28626585006713867,
-0.04130753129720688,
-0.11845877021551132,
0.1380520462989807,
-0.19494354724884033,
-0.7126867771148682,
-0.20508608222007751,
0.06996623426675797,
0.13138604164123535,
-0.11624260246753693,
-0.1678103506565094,
-0.07664018869400024,
-0.31010499596595764,
0.15347447991371155,
0.3768632411956787,
0.12571777403354645,
0.03059575892984867,
-0.27179303765296936,
0.06001027300953865,
-0.20854128897190094,
-0.13602961599826813,
-0.08438073843717575,
-0.1886528879404068,
-0.10214059054851532,
0.2547375559806824,
0.020655985921621323,
-0.09785465896129608,
-0.04031561315059662,
0.13371750712394714,
0.06363966315984726,
-0.008044511079788208,
0.19445429742336273,
-0.47966015338897705,
0.4584983289241791,
0.20306965708732605,
0.1552678942680359,
0.059208787977695465,
-0.02091415971517563,
0.3261551260948181,
-0.2587340772151947,
0.368563175201416,
-0.2708088159561157,
-0.02114243432879448,
0.14075002074241638,
0.010885635390877724,
0.3809184432029724,
-0.1780073195695877,
-0.21727928519248962,
0.6360850930213928,
0.05367320775985718,
0.235416442155838,
0.3522200584411621,
-0.059914059937000275,
-0.011942572891712189,
-0.28484776616096497,
0.3378167152404785,
0.24971085786819458,
-0.1441178023815155,
-0.190947487950325,
0.38563331961631775,
-0.1734308898448944,
0.10092949867248535,
0.6574475169181824,
0.06399605423212051,
-0.13461419939994812,
-0.2549877464771271,
0.4186135530471802,
0.2198711633682251,
-0.35320886969566345,
0.14283260703086853,
-0.0926549881696701,
0.01990145444869995,
0.10072071105241776,
0.32505953311920166,
0.12646371126174927,
-0.006958264857530594,
0.12449087202548981,
0.30541229248046875,
0.34099507331848145,
-0.05899924039840698,
0.045961350202560425,
-0.12730319797992706,
0.08048099279403687,
0.20050427317619324,
0.0924176573753357,
0.12949633598327637,
-0.11474675685167313,
-0.07009533792734146,
-0.948448896408081,
0.4551725685596466,
-0.08901554346084595,
0.004878898151218891,
-0.0670391172170639,
0.5428866744041443,
0.3530550003051758,
0.4223587214946747,
0.12629354000091553,
0.16400721669197083,
0.21066772937774658,
-0.2036541849374771,
-0.0627782791852951,
0.25860700011253357,
-0.13514506816864014,
0.5034101009368896,
-0.12798716127872467,
-0.19160498678684235,
-0.01510607823729515,
-0.025729652494192123,
0.011103756725788116,
-0.09853345155715942,
-0.25529012084007263,
-0.25327032804489136,
0.28257203102111816,
-0.05216985568404198,
0.00691638421267271,
-0.32065725326538086,
0.14878854155540466,
-0.11820008605718613,
-0.08521825820207596,
-0.39896097779273987,
-0.09289238601922989,
0.25910162925720215,
-0.3282257318496704,
0.022956356406211853,
0.3426169455051422,
0.3720775842666626,
-0.2025303691625595,
0.48977959156036377,
0.21950894594192505,
0.14048904180526733,
0.08264102041721344,
0.15040989220142365,
0.015712523832917213,
0.10097573697566986,
-0.19922131299972534,
0.16034699976444244,
0.10159412771463394,
0.13350166380405426,
0.3369833528995514,
0.024142496287822723,
-0.32055315375328064,
0.15752534568309784,
0.12185105681419373,
0.24205824732780457,
0.19402921199798584,
0.05659641698002815,
-0.007252026349306107,
0.06386812031269073,
-0.08052033185958862,
-0.6316042542457581,
0.373597651720047,
-0.012350048869848251,
0.1010703593492508,
-0.0020035654306411743,
-0.12302527576684952,
-0.16816914081573486,
-0.030860867351293564,
-0.032314054667949677,
-0.29838255047798157,
0.12282855808734894,
0.15657830238342285,
0.2017413079738617,
-0.06274764984846115,
0.16093969345092773,
-0.0811254009604454,
0.03422278165817261,
0.20490184426307678,
-0.03816332668066025,
0.02655261941254139,
-0.23987971246242523,
-0.17109552025794983,
0.019848130643367767,
-0.1716897189617157,
0.16274994611740112,
-0.12278608977794647,
-0.1776588261127472,
0.08002746850252151,
0.3083671033382416,
-0.14635397493839264,
-0.28317582607269287,
-0.08882410824298859,
-0.19471706449985504,
0.07952217012643814,
0.07354812324047089,
0.09161143004894257,
0.06575199961662292,
0.11822546273469925,
-0.15492092072963715,
0.5928109884262085,
0.06115967780351639,
-0.18402232229709625,
-0.09262759983539581,
-0.012107599526643753,
0.024150419980287552,
0.025531131774187088,
0.16515286266803741,
0.12135173380374908,
0.02912525273859501,
0.1674266755580902,
-0.01676514558494091,
-0.15403763949871063,
-0.10228265821933746,
-0.10456383228302002,
-0.09553307294845581,
-0.08181412518024445,
-0.29098403453826904,
-0.3114253282546997,
-0.06739670783281326,
0.3195851147174835,
0.0066711436957120895,
-0.2465025931596756,
-0.044243790209293365,
-0.3048228919506073,
-0.09168951958417892,
-0.3129248023033142,
0.08363479375839233,
-0.231126606464386,
-0.052929945290088654,
-0.12508662045001984,
0.3421688675880432,
0.0755949318408966,
0.26666125655174255,
-0.26354819536209106,
0.2143182009458542,
-0.001577356830239296,
-0.21448953449726105,
-0.02522525005042553,
-0.347602903842926,
-0.05561114102602005,
-0.15728318691253662,
-0.10797646641731262,
-0.10371764004230499,
0.11116020381450653,
0.18261000514030457,
0.17215323448181152,
0.3283475637435913,
0.20351256430149078,
0.15524868667125702,
0.10049831867218018,
-0.13034604489803314,
0.009139928966760635,
0.5877926349639893,
0.1948680877685547,
-0.3433017432689667,
-0.02583574876189232,
0.07456657290458679,
-0.08365310728549957,
0.02064606547355652,
0.10673534125089645,
0.1648920178413391,
0.004809815436601639,
0.001710265874862671,
0.05711968615651131,
0.7662613391876221,
0.15302252769470215,
0.2623225748538971,
0.1857997179031372,
0.08326222747564316,
0.2024664431810379,
0.07352876663208008,
-0.06168746203184128,
0.22000756859779358,
0.165938138961792,
-0.11453814804553986,
-0.021093711256980896,
0.024673502892255783,
-0.08836005628108978,
-0.029227787628769875,
-0.037950240075588226,
-0.28731968998908997,
-0.021823788061738014,
0.18483902513980865,
0.035440217703580856,
0.31164178252220154,
-0.21213892102241516,
-0.1179528534412384,
-0.1090177595615387,
0.11304584890604019,
-0.21021805703639984,
0.20523294806480408,
0.08674924820661545,
-0.17764022946357727,
-0.1419212371110916,
-0.24111181497573853,
-0.2973666489124298,
0.48102426528930664,
-0.22182691097259521,
0.35209935903549194,
0.2069314867258072,
-0.16873493790626526,
0.3862763047218323,
-0.05826669931411743,
0.759558916091919,
0.23925992846488953,
-0.551546037197113,
-0.0013957992196083069,
-0.3669531047344208,
-0.1482342630624771,
-0.152345210313797,
-0.20907004177570343,
0.03730352222919464,
0.4411907196044922,
0.044055260717868805,
-0.0240776464343071,
-0.45312798023223877,
0.0380285307765007,
-0.37664464116096497,
-0.04870510473847389,
-0.3724137842655182,
-0.5291551351547241,
0.023786380887031555,
0.19324398040771484,
0.4437342882156372,
0.010061627253890038,
-0.09064093977212906,
-0.1270257830619812,
0.09788617491722107,
-0.16585507988929749,
-0.12816748023033142,
0.11649888753890991,
0.09029841423034668,
0.01270860992372036,
0.0868324413895607,
-0.06616516411304474,
0.4226617217063904,
-0.025922805070877075,
0.3022580146789551,
0.10278277844190598,
-0.000048644840717315674,
0.09645506739616394,
-0.0008509121835231781,
0.1597123146057129,
0.4038763642311096,
0.05608680844306946,
0.09406770765781403,
0.35980772972106934,
-0.16000743210315704,
0.16291150450706482,
-0.10114703327417374,
-0.10004625469446182,
0.19562330842018127,
0.38335779309272766,
-0.2585499882698059,
-0.4070216119289398,
0.42404693365097046,
0.004687516018748283,
-0.27898839116096497,
0.14917978644371033,
0.23887434601783752,
-0.14957453310489655,
0.4215434193611145,
0.1485268473625183,
0.5472005605697632,
-0.20013658702373505,
0.007560886442661285,
-0.12696152925491333,
-0.2984885573387146,
0.10318251699209213,
-0.546625018119812,
0.5824708342552185,
-0.34464892745018005,
-0.021358318626880646,
0.00037551671266555786,
-0.188106968998909,
0.3971906006336212,
0.1340806782245636,
0.18477961421012878,
0.3031531572341919,
0.12326513230800629,
-0.23600000143051147,
-0.13536271452903748,
0.05011624097824097,
0.31610798835754395,
-0.017049100250005722,
0.3812198340892792,
0.025696001946926117,
0.16077715158462524,
-0.0013795159757137299,
0.022881541401147842,
0.17646868526935577,
0.04335332289338112,
0.10981230437755585,
-0.18540292978286743,
-0.10717392712831497,
-0.0945710614323616,
-0.020348239690065384,
0.14616744220256805,
-0.05672157555818558,
0.14612926542758942,
-0.35902756452560425,
0.05793457478284836,
-0.39958614110946655,
0.03848487138748169,
0.20013083517551422,
0.11930608749389648,
-0.1965542435646057,
-0.020525921136140823,
-0.4718143939971924,
0.11983869969844818,
0.10025232285261154,
-0.43517518043518066,
0.21176162362098694,
0.2246355265378952,
-0.544581413269043,
-0.6945080161094666,
0.39138537645339966,
-0.23945288360118866,
0.259520947933197,
-0.19411298632621765,
0.22735515236854553,
0.08904148638248444,
0.1851779967546463,
0.007784043438732624,
0.19316056370735168,
-0.4945644736289978,
0.784443199634552,
-0.34016716480255127,
-0.04150916263461113,
-0.12040111422538757,
0.13791990280151367,
0.46840304136276245,
-0.35972729325294495,
-0.07959313690662384,
0.06815727055072784,
-0.01017429307103157,
0.04141482710838318,
-0.6567004919052124,
0.41951867938041687,
0.3977804183959961,
-0.14455272257328033,
-0.00697802659124136,
-0.07842510938644409,
0.40860432386398315,
-0.2952422797679901,
0.014235731214284897,
0.0973367765545845,
-0.3256687819957733,
0.013121150434017181,
0.09389954060316086,
-0.02749994397163391,
-0.10619059205055237,
0.2100449502468109,
0.28799840807914734,
-0.12631642818450928,
0.1501346230506897,
0.3411579132080078,
-0.1652028113603592,
0.1788824200630188,
0.017859449610114098,
0.16664254665374756,
-0.08262991160154343,
0.10693855583667755,
-0.038140635937452316,
0.15817540884017944,
-0.03304746001958847,
-0.0847514271736145,
-0.023908935487270355,
-0.10390117764472961,
0.2683832347393036,
0.14509382843971252,
0.18885013461112976,
0.15968751907348633,
-0.3041418492794037,
-0.15548865497112274,
-0.1948009878396988,
-0.054541800171136856,
0.12478621304035187,
0.20931726694107056,
-0.20278619229793549,
0.08219283074140549,
0.0862516462802887,
-0.45766958594322205,
-0.031919121742248535,
0.35459691286087036,
0.23550553619861603,
0.044651180505752563,
0.2654420733451843,
0.28312766551971436,
-0.22080980241298676,
0.0024848654866218567,
-0.27242812514305115,
0.14807987213134766,
0.34427332878112793,
0.0004983954131603241,
-0.10892421752214432,
-0.03853879123926163,
-0.15662625432014465,
-0.2830117344856262,
0.2663222849369049,
0.3779181241989136,
0.15135495364665985,
-0.10254590958356857,
0.025132618844509125,
0.12237278372049332,
-0.04717136546969414,
-0.06873127818107605,
0.39225485920906067,
0.048276808112859726,
0.2564828097820282,
0.4302390515804291,
0.5953583121299744,
0.4263482689857483,
0.07023962587118149,
-0.01566050946712494,
0.29516029357910156,
0.44321513175964355,
0.07646195590496063,
-0.6669998168945312,
0.2691180408000946,
0.044506970793008804,
0.30373942852020264,
0.25664353370666504,
0.09591320902109146,
0.5482038259506226,
-0.1264057159423828,
0.4272952377796173,
-0.016707371920347214,
-0.1295442283153534,
0.06640336662530899,
-0.32434216141700745,
0.18083539605140686,
0.19216756522655487,
-0.3031321167945862,
0.17969448864459991,
-0.3071646988391876,
0.07331343740224838,
-0.012111079879105091,
-0.4394342601299286,
-0.12540823221206665,
0.16564136743545532,
-0.13116931915283203,
-0.0839848667383194,
0.07209011912345886,
-0.11542503535747528,
0.05349016189575195,
-0.05988902971148491,
0.25898271799087524,
-0.2517702579498291,
0.26968294382095337,
-0.09059911966323853,
0.073518306016922,
0.23506392538547516,
-0.1266850233078003,
0.43041127920150757,
0.17122937738895416,
-0.013028733432292938,
0.0077169351279735565,
-0.15558333694934845,
-0.09019298851490021,
0.17853830754756927,
0.09671533852815628,
0.19990228116512299,
0.27878129482269287,
-0.17057882249355316,
0.2659514546394348,
0.13322091102600098,
0.05646705627441406,
0.09530345350503922,
-0.05715753883123398,
0.08752181380987167,
-0.14607441425323486,
-0.07489095628261566,
0.031398311257362366,
0.05643600970506668,
-0.18025855720043182,
0.027357418090105057,
0.27953583002090454,
-0.35551247000694275,
-0.19228988885879517,
-0.48435601592063904,
-0.018700357526540756,
-0.006582207977771759,
0.08702494949102402,
-0.5939651131629944,
-0.007320660166442394,
0.37032902240753174,
-0.5122327208518982,
-0.0940576046705246,
0.12952972948551178,
-0.025151588022708893,
0.08293826878070831,
0.4164432883262634,
0.0737762302160263,
0.4016520380973816,
-0.231401726603508,
-0.21332712471485138,
-0.14818815886974335,
0.21269366145133972,
-0.16669988632202148,
0.2123716026544571,
-0.11348921060562134,
0.6809126138687134,
-0.10502886027097702,
-0.26260554790496826,
0.4901631474494934,
0.11926303803920746,
0.27281713485717773,
0.5935883522033691,
-0.060961488634347916,
0.23661170899868011,
-0.5272246599197388,
0.05613444745540619,
0.2219601273536682,
0.0414525642991066,
0.25189170241355896,
-0.2340470850467682,
-0.1830902397632599,
-0.09187681972980499,
0.27801594138145447,
0.31838327646255493,
-0.1406317949295044,
0.29935550689697266,
0.01650501973927021,
0.22122234106063843,
0.10765030235052109,
0.04140510410070419,
-0.22114187479019165,
0.057264767587184906,
-0.3325493335723877,
-0.12975257635116577,
-0.0832412838935852,
-0.26645758748054504,
-0.23391178250312805,
-0.5967653393745422,
0.04635532572865486,
0.538711667060852,
0.0008509792387485504,
-0.4484623968601227,
0.19936560094356537,
0.04082317650318146,
-0.24215635657310486,
0.0480647012591362,
0.28910234570503235,
0.2993389666080475,
0.11067921668291092,
0.04609815776348114,
-0.37997376918792725,
0.20981498062610626,
0.07435616850852966,
-0.252210795879364,
-0.14540286362171173,
-0.9028328061103821,
0.30031371116638184,
0.2597540616989136,
0.23724621534347534,
-0.47650569677352905,
-0.2502424418926239,
0.2421954870223999,
0.2021922767162323,
-0.06830240786075592,
0.2716915011405945,
-0.017186202108860016,
-0.2794216275215149,
-0.23195035755634308,
-0.6178930997848511,
0.05862545967102051,
-0.029893074184656143,
0.02996620163321495,
-0.15164560079574585
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | > I used to think that every GPU loads all the source vectors and the data parallelism is at the query level. 😆
Oh indeed that's possible, I wasn't sure. Anyway you can check that calling get_nearest_examples_batch simply calls search under the hood:
https://github.com/huggingface/datasets/blob/f90f71fbbb33889fe75a3ffc101cdf16a88a3453/src/datasets/search.py#L375 | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 44 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
> I used to think that every GPU loads all the source vectors and the data parallelism is at the query level. 😆
Oh indeed that's possible, I wasn't sure. Anyway you can check that calling get_nearest_examples_batch simply calls search under the hood:
https://github.com/huggingface/datasets/blob/f90f71fbbb33889fe75a3ffc101cdf16a88a3453/src/datasets/search.py#L375 | [
-0.13199757039546967,
-0.6725637912750244,
-0.11344027519226074,
0.12774920463562012,
-0.42620331048965454,
-0.011472858488559723,
0.14609083533287048,
0.050825826823711395,
0.4054100513458252,
0.08167822659015656,
-0.3057650029659271,
-0.23161597549915314,
0.5747027397155762,
-0.1878020316362381,
-0.10795330256223679,
-0.04470277577638626,
0.3841959536075592,
-0.13881540298461914,
-0.04960499703884125,
-0.24078112840652466,
-0.5455549359321594,
0.14574408531188965,
-0.3631446957588196,
-0.1063014417886734,
-0.2579589784145355,
0.20350885391235352,
-0.26923084259033203,
0.03344428539276123,
0.07397671043872833,
-0.17246273159980774,
-0.2301952987909317,
0.22026894986629486,
0.11714473366737366,
0.5327289700508118,
-0.00012199429329484701,
-0.12462323904037476,
-0.0815197229385376,
0.006330898031592369,
0.17874141037464142,
0.13956843316555023,
-0.1167633980512619,
0.11815954744815826,
0.011754922568798065,
-0.0066519081592559814,
-0.417542964220047,
-0.031122423708438873,
0.24167346954345703,
-0.6147170662879944,
-0.08557221293449402,
-0.016252893954515457,
0.049439702183008194,
-0.036586418747901917,
0.03340337797999382,
-0.13789035379886627,
-0.06862796097993851,
-0.3996773362159729,
0.05851338058710098,
0.031199922785162926,
0.5321741104125977,
-0.05040226876735687,
-0.020232491195201874,
0.45232173800468445,
0.05803351104259491,
0.0938165932893753,
-0.09233487397432327,
0.10619883984327316,
0.3443934917449951,
-0.24193644523620605,
0.03226336091756821,
-0.06326094269752502,
-0.12999847531318665,
-0.03780488669872284,
-0.27018916606903076,
-0.33417484164237976,
-0.21832899749279022,
-0.03764180839061737,
-0.2090933620929718,
0.11758745461702347,
-0.25017160177230835,
-0.17221955955028534,
0.09523738920688629,
-0.1487235724925995,
-0.007662806659936905,
0.02206573262810707,
0.1437591314315796,
0.6021065711975098,
-0.020353980362415314,
0.19196385145187378,
0.22570012509822845,
0.15552616119384766,
-0.23394650220870972,
-0.17034567892551422,
0.19020995497703552,
0.15328143537044525,
-0.9841213822364807,
0.21125739812850952,
0.22420108318328857,
-0.25008100271224976,
0.14685943722724915,
-0.0992807149887085,
-0.21942056715488434,
0.09501811861991882,
0.04083229973912239,
0.24717214703559875,
0.0537528395652771,
-0.02531343325972557,
-0.05305171757936478,
-0.14819878339767456,
-0.2058507651090622,
-0.2082056999206543,
-0.0342584103345871,
0.03107285685837269,
0.08641522377729416,
-0.31131553649902344,
-0.7914634346961975,
-0.08753994107246399,
0.09374704957008362,
0.10384243726730347,
-0.11307195574045181,
-0.15723547339439392,
-0.10129737854003906,
-0.19451989233493805,
0.16276289522647858,
0.31698107719421387,
0.11043187230825424,
0.03941896930336952,
-0.23194125294685364,
0.08254802227020264,
-0.17205104231834412,
-0.04748594015836716,
-0.10396815091371536,
-0.19521434605121613,
-0.016758952289819717,
0.227639302611351,
-0.0040891580283641815,
-0.18345576524734497,
0.011179735884070396,
0.05131804943084717,
0.20732875168323517,
0.14680567383766174,
0.05692540109157562,
-0.4114246070384979,
0.373254656791687,
0.2145172506570816,
0.1825796663761139,
-0.0016021057963371277,
0.11896289885044098,
0.2857036590576172,
-0.3289785087108612,
0.17784501612186432,
-0.27174773812294006,
0.0022120289504528046,
0.18832610547542572,
0.045026421546936035,
0.29889124631881714,
-0.12966206669807434,
-0.12280499190092087,
0.548005998134613,
-0.08512098342180252,
0.21709105372428894,
0.31192782521247864,
-0.07639176398515701,
-0.042979639023542404,
-0.23054814338684082,
0.35754555463790894,
0.2534187436103821,
-0.17685629427433014,
-0.12866035103797913,
0.3957218825817108,
-0.10782083868980408,
0.05433207377791405,
0.5833394527435303,
0.05177206173539162,
-0.13843774795532227,
-0.19802144169807434,
0.5226373672485352,
0.25329697132110596,
-0.4601450562477112,
0.19017036259174347,
0.03352953866124153,
-0.2049015909433365,
0.07432380318641663,
0.257767915725708,
0.09615451842546463,
0.029651686549186707,
0.05941907688975334,
0.35644862055778503,
0.48265665769577026,
-0.10732732713222504,
-0.021188978105783463,
-0.16074350476264954,
0.08106573671102524,
0.0412234328687191,
0.17473533749580383,
0.044245824217796326,
-0.09199175983667374,
-0.07565128058195114,
-1.0286680459976196,
0.4283042550086975,
-0.060313742607831955,
-0.07135792821645737,
-0.016053907573223114,
0.501091718673706,
0.2598307132720947,
0.4098074734210968,
0.0836910605430603,
0.15324243903160095,
0.25045520067214966,
-0.2295946627855301,
-0.05358242243528366,
0.22785525023937225,
-0.13993705809116364,
0.44887247681617737,
-0.04040883481502533,
-0.2740916609764099,
0.04902880638837814,
-0.03406615927815437,
-0.0822819173336029,
-0.0604381337761879,
-0.2326541692018509,
-0.31473788619041443,
0.16276168823242188,
-0.04552003741264343,
-0.051162850111722946,
-0.42252302169799805,
0.060673788189888,
-0.10914891213178635,
0.023386459797620773,
-0.40679630637168884,
-0.07824424654245377,
0.23745396733283997,
-0.34526318311691284,
0.0375044047832489,
0.4204402565956116,
0.3003562390804291,
-0.15378479659557343,
0.47403183579444885,
0.18447066843509674,
0.08979099243879318,
0.1094953715801239,
0.07478149235248566,
0.07635140419006348,
0.008998816832900047,
-0.1969851553440094,
0.04442351311445236,
0.30013740062713623,
0.021048875525593758,
0.39920446276664734,
0.059645652770996094,
-0.2570236027240753,
0.13418789207935333,
0.12901335954666138,
0.17774519324302673,
0.15474875271320343,
0.1450517475605011,
0.06272397935390472,
0.164743110537529,
-0.05767975002527237,
-0.6422001123428345,
0.389201819896698,
-0.08299003541469574,
-0.04004191607236862,
-0.004817679524421692,
-0.13718917965888977,
-0.1114567294716835,
0.04954993724822998,
-0.0407252162694931,
-0.2902333438396454,
0.09626422822475433,
0.21510842442512512,
0.16156023740768433,
-0.11583250015974045,
0.030914638191461563,
-0.15544387698173523,
0.07182085514068604,
0.18605643510818481,
0.007401193026453257,
-0.07737549394369125,
-0.24292874336242676,
-0.09593387693166733,
0.009457305073738098,
-0.2512541711330414,
0.07314488291740417,
-0.17117618024349213,
-0.17407861351966858,
0.15060308575630188,
0.21644948422908783,
-0.17029958963394165,
-0.31559059023857117,
-0.15548741817474365,
-0.10939988493919373,
0.06551720947027206,
0.14839297533035278,
0.047031041234731674,
-0.015229294076561928,
0.1540752798318863,
-0.27399349212646484,
0.5750926733016968,
0.024411970749497414,
-0.32261690497398376,
-0.07321284711360931,
-0.06704199314117432,
-0.03883077949285507,
0.02306833118200302,
0.12214609980583191,
0.16500331461429596,
0.0037725362926721573,
0.128472238779068,
0.01802825927734375,
-0.14909380674362183,
-0.0625748559832573,
-0.10247236490249634,
-0.17702677845954895,
-0.021994376555085182,
-0.1515062153339386,
-0.2468593269586563,
-0.15855546295642853,
0.277683287858963,
0.04428992047905922,
-0.27646520733833313,
-0.022247254848480225,
-0.3330717086791992,
-0.1815183162689209,
-0.3096034526824951,
0.05898327752947807,
-0.15634241700172424,
-0.037744201719760895,
-0.11088208854198456,
0.3537111282348633,
0.011461760848760605,
0.2696714997291565,
-0.22082002460956573,
0.20338976383209229,
-0.014391168020665646,
-0.13241399824619293,
-0.06648695468902588,
-0.2087726891040802,
-0.18314431607723236,
-0.007825355976819992,
-0.10614772140979767,
-0.15490300953388214,
-0.08129888772964478,
0.1288999617099762,
0.13483618199825287,
0.352352499961853,
0.2504103183746338,
0.04649405926465988,
0.1424562782049179,
-0.0501970499753952,
0.12013496458530426,
0.6008163690567017,
0.2171081304550171,
-0.3600943088531494,
-0.07110017538070679,
0.07293082773685455,
0.043493326753377914,
0.10317367315292358,
0.09496774524450302,
0.08759444206953049,
0.08391044288873672,
0.051513805985450745,
0.012991182506084442,
0.8577091693878174,
0.021811984479427338,
0.15126411616802216,
0.15710780024528503,
0.10405553132295609,
0.20820839703083038,
0.08987906575202942,
-0.1090431734919548,
0.18631604313850403,
0.2406255304813385,
-0.1793849766254425,
0.04484129324555397,
0.02297743409872055,
-0.07078126817941666,
-0.04510284960269928,
-0.0338631197810173,
-0.381930947303772,
0.025685112923383713,
0.09919263422489166,
-0.011175919324159622,
0.21078848838806152,
-0.23619036376476288,
-0.03625637665390968,
-0.117474764585495,
0.19817280769348145,
-0.11444653570652008,
0.19492773711681366,
0.17208339273929596,
-0.12226415425539017,
-0.06744049489498138,
-0.3313322961330414,
-0.20239683985710144,
0.5622273087501526,
-0.17046748101711273,
0.3161626160144806,
0.22941653430461884,
-0.2684471607208252,
0.30995962023735046,
-0.08573561161756516,
0.7659839987754822,
0.31868109107017517,
-0.457507848739624,
0.03061004728078842,
-0.2948092222213745,
-0.265830397605896,
-0.1719263643026352,
-0.11696308851242065,
0.0513593927025795,
0.4034542143344879,
0.12058547139167786,
0.0418730154633522,
-0.5061414241790771,
0.013110584579408169,
-0.347592830657959,
-0.020101256668567657,
-0.326045423746109,
-0.507693886756897,
-0.023441031575202942,
0.19940578937530518,
0.45554885268211365,
-0.05575678497552872,
-0.07201582938432693,
-0.18311633169651031,
0.15988169610500336,
-0.1641392707824707,
-0.0410090833902359,
0.04419717937707901,
0.1480943113565445,
-0.05815092474222183,
0.04617850482463837,
-0.0019561126828193665,
0.5331640839576721,
0.16509033739566803,
0.272769033908844,
0.019521139562129974,
-0.05632574483752251,
-0.022305138409137726,
-0.0014364924281835556,
0.24222272634506226,
0.3871166408061981,
0.11725958436727524,
0.05231347307562828,
0.33182960748672485,
-0.14612315595149994,
0.09538836032152176,
-0.005362500436604023,
-0.1476365327835083,
0.1667288988828659,
0.3746465742588043,
-0.21745581924915314,
-0.30730435252189636,
0.5602380037307739,
-0.044285453855991364,
-0.3028912842273712,
0.1512681096792221,
0.26985645294189453,
-0.04565955698490143,
0.4000587463378906,
0.16642208397388458,
0.49308639764785767,
-0.10543425381183624,
0.028082696720957756,
-0.10129780322313309,
-0.11781789362430573,
0.20519551634788513,
-0.5333255529403687,
0.5771804451942444,
-0.31297776103019714,
-0.04436017572879791,
0.0013292618095874786,
-0.1658415049314499,
0.3473661243915558,
0.18146878480911255,
0.224848210811615,
0.34119778871536255,
0.1610623002052307,
-0.2549007833003998,
-0.11043695360422134,
-0.023960841819643974,
0.32090795040130615,
-0.12917648255825043,
0.2585649788379669,
-0.0057730767875909805,
0.2292364537715912,
0.09958876669406891,
0.014598624780774117,
0.10805970430374146,
0.042754027992486954,
0.08226541429758072,
-0.10351970791816711,
-0.019351840019226074,
-0.1472783088684082,
-0.005232250317931175,
0.17713934183120728,
-0.04123643413186073,
0.08163793385028839,
-0.2956756353378296,
0.1428658813238144,
-0.387455016374588,
-0.030156036838889122,
0.1944630742073059,
0.22022932767868042,
-0.11653675884008408,
-0.002744184108451009,
-0.5647406578063965,
0.11877389252185822,
0.08195796608924866,
-0.3521459996700287,
0.16518643498420715,
0.26151907444000244,
-0.5167919993400574,
-0.6277619004249573,
0.3038945198059082,
-0.32215797901153564,
0.42483270168304443,
-0.2063831388950348,
0.18410316109657288,
0.2065710574388504,
0.10650986433029175,
-0.004117907956242561,
0.1525181233882904,
-0.4603029489517212,
0.678409218788147,
-0.42100319266319275,
-0.042436111718416214,
-0.1007290929555893,
0.2345007061958313,
0.3680199980735779,
-0.5335662364959717,
-0.047648221254348755,
0.14011885225772858,
-0.03879024460911751,
0.017876163125038147,
-0.5843677520751953,
0.46395576000213623,
0.4108561873435974,
-0.1594938188791275,
-0.01233888790011406,
-0.025690950453281403,
0.4455639719963074,
-0.12012943625450134,
0.09970737993717194,
-0.027341045439243317,
-0.3500205874443054,
-0.02134104073047638,
0.059424690902233124,
0.003404773771762848,
-0.09118287265300751,
0.1834927201271057,
0.3603142201900482,
-0.03507234901189804,
0.12670812010765076,
0.21487528085708618,
-0.1888105273246765,
0.13010308146476746,
-0.05331382155418396,
0.12531858682632446,
-0.11960305273532867,
0.18270686268806458,
0.009633908979594707,
0.21248674392700195,
-0.016858963295817375,
-0.10824781656265259,
-0.08494319766759872,
-0.11162856221199036,
0.2430596649646759,
0.14115607738494873,
0.17094576358795166,
0.17217975854873657,
-0.23080696165561676,
-0.09248058497905731,
-0.27484411001205444,
-0.07022810727357864,
0.09803396463394165,
0.20267856121063232,
-0.21873293817043304,
-0.0340200811624527,
0.08371371030807495,
-0.3385651707649231,
-0.05415748804807663,
0.3228653073310852,
0.24703966081142426,
0.011715307831764221,
0.23055578768253326,
0.27908164262771606,
-0.3031672239303589,
-0.032905735075473785,
-0.15360593795776367,
0.14199267327785492,
0.3534385561943054,
-0.01782318577170372,
-0.07956992834806442,
-0.05517552047967911,
-0.27157941460609436,
-0.24692808091640472,
0.3281058073043823,
0.3585871458053589,
0.18002009391784668,
-0.14673759043216705,
0.0613350011408329,
0.11482173949480057,
-0.07933928072452545,
-0.13106684386730194,
0.43460649251937866,
-0.0042138779535889626,
0.3138624429702759,
0.40159162878990173,
0.5470848679542542,
0.42831194400787354,
0.14689742028713226,
-0.03829155117273331,
0.2484792023897171,
0.4604477882385254,
0.06503207236528397,
-0.5448624491691589,
0.3870333731174469,
0.05919988825917244,
0.21002289652824402,
0.22418083250522614,
0.20617416501045227,
0.4617805480957031,
-0.2659129202365875,
0.5096508264541626,
-0.13108807802200317,
-0.23207950592041016,
0.1105617955327034,
-0.39199182391166687,
0.27590128779411316,
0.02435769885778427,
-0.3315032124519348,
0.15672488510608673,
-0.3478073477745056,
0.22516953945159912,
-0.1618393212556839,
-0.38369807600975037,
-0.16635632514953613,
0.15406829118728638,
-0.06030246615409851,
-0.1397225558757782,
-0.09949871897697449,
-0.1368982195854187,
0.11358918249607086,
-0.04436272010207176,
0.23504199087619781,
-0.18232128024101257,
0.24851763248443604,
-0.11534343659877777,
0.16269981861114502,
0.2416127473115921,
-0.2766340970993042,
0.352554053068161,
0.216998890042305,
0.059965867549180984,
-0.049017369747161865,
-0.07579129934310913,
-0.14783066511154175,
0.1535763442516327,
0.061324238777160645,
0.19463883340358734,
0.3203381896018982,
-0.23555707931518555,
0.22729884088039398,
0.12250465154647827,
0.09172790497541428,
0.13569946587085724,
-0.09653408825397491,
0.035955969244241714,
-0.30191484093666077,
0.060643766075372696,
0.04068852216005325,
0.04637556150555611,
-0.07527714967727661,
-0.034075845032930374,
0.17741717398166656,
-0.23790249228477478,
-0.1831800937652588,
-0.47812148928642273,
-0.039808161556720734,
-0.012283779680728912,
0.13474524021148682,
-0.5425001382827759,
0.08220028877258301,
0.34979480504989624,
-0.34477731585502625,
-0.12084271758794785,
0.0809263288974762,
-0.0012062396854162216,
0.14555087685585022,
0.44906944036483765,
0.23937802016735077,
0.45167776942253113,
-0.27174776792526245,
-0.1427934318780899,
-0.14897480607032776,
0.2814238369464874,
-0.08828261494636536,
0.2368508279323578,
-0.052270080894231796,
0.612889289855957,
-0.001509249210357666,
-0.1970110684633255,
0.44955915212631226,
0.18393301963806152,
0.25171932578086853,
0.7117017507553101,
0.03249699994921684,
0.26250192523002625,
-0.5916379690170288,
-0.02934044785797596,
0.18127931654453278,
0.03090905398130417,
0.1753637045621872,
-0.25018310546875,
-0.16108331084251404,
-0.1375882923603058,
0.32957616448402405,
0.41406938433647156,
-0.30483192205429077,
0.1718335747718811,
-0.03581666201353073,
0.12950743734836578,
0.1295577883720398,
0.07252100110054016,
-0.21607300639152527,
0.14097532629966736,
-0.3475431799888611,
-0.20892193913459778,
-0.10124821960926056,
-0.3006645143032074,
-0.17026782035827637,
-0.6588072776794434,
-0.0005430103046819568,
0.5108642578125,
0.06514076143503189,
-0.4978358745574951,
0.22282648086547852,
0.010458163917064667,
-0.3656036853790283,
0.06386012583971024,
0.33438044786453247,
0.23858517408370972,
0.108536496758461,
0.14326155185699463,
-0.35147857666015625,
0.17897771298885345,
0.18548624217510223,
-0.38689813017845154,
-0.1457706093788147,
-0.9140195250511169,
0.3271216154098511,
0.2543647885322571,
0.286721795797348,
-0.35622552037239075,
-0.18563944101333618,
0.1862848401069641,
0.24518993496894836,
-0.04299573972821236,
0.2090795785188675,
-0.02410220354795456,
-0.313353955745697,
-0.2693611681461334,
-0.6617224216461182,
0.15801239013671875,
-0.00237392820417881,
-0.032991111278533936,
-0.1921895444393158
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Here is a runnable script.
Multi-GPU searching still does not work in my experiments.
```python
import os
from tqdm import tqdm
import numpy as np
import datasets
from datasets import Dataset
class DPRSelector:
def __init__(self, source, target, index_name, gpu=None):
self.source = source
self.target = target
self.index_name = index_name
cache_path = 'embedding.faiss'
if not os.path.exists(cache_path):
self.source.add_faiss_index(
column="embedding",
index_name=index_name,
device=gpu,
)
self.source.save_faiss_index(index_name, cache_path)
else:
self.source.load_faiss_index(
index_name,
cache_path,
device=gpu
)
print('index builded!')
def build_dataset(self, top_k, batch_size):
print('start search')
for i in tqdm(range(0, len(self.target), batch_size)):
if i + batch_size >= len(self.target):
batched_queries = self.target[i:]
else:
batched_queries = self.target[i:i+batch_size]
batched_query_embeddings = np.stack([i for i in batched_queries['embedding']], axis=0)
search_res = self.source.get_nearest_examples_batch(
self.index_name,
batched_query_embeddings,
k=top_k
)
print('finish search')
def get_pseudo_dataset():
pseudo_dict = {"embedding": np.zeros((1000000, 768), dtype=np.float32)}
print('generate pseudo data')
dataset = Dataset.from_dict(pseudo_dict)
def list_to_array(data):
return {"embedding": [np.array(vector, dtype=np.float32) for vector in data["embedding"]]}
dataset.set_transform(list_to_array, columns='embedding', output_all_columns=True)
print('build dataset')
return dataset
if __name__=="__main__":
np.random.seed(42)
source_dataset = get_pseudo_dataset()
target_dataset = get_pseudo_dataset()
gpu = [0,1,2,3,4,5,6,7]
selector = DPRSelector(source_dataset, target_dataset, "embedding", gpu=gpu)
selector.build_dataset(top_k=20, batch_size=32)
``` | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 163 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Here is a runnable script.
Multi-GPU searching still does not work in my experiments.
```python
import os
from tqdm import tqdm
import numpy as np
import datasets
from datasets import Dataset
class DPRSelector:
def __init__(self, source, target, index_name, gpu=None):
self.source = source
self.target = target
self.index_name = index_name
cache_path = 'embedding.faiss'
if not os.path.exists(cache_path):
self.source.add_faiss_index(
column="embedding",
index_name=index_name,
device=gpu,
)
self.source.save_faiss_index(index_name, cache_path)
else:
self.source.load_faiss_index(
index_name,
cache_path,
device=gpu
)
print('index builded!')
def build_dataset(self, top_k, batch_size):
print('start search')
for i in tqdm(range(0, len(self.target), batch_size)):
if i + batch_size >= len(self.target):
batched_queries = self.target[i:]
else:
batched_queries = self.target[i:i+batch_size]
batched_query_embeddings = np.stack([i for i in batched_queries['embedding']], axis=0)
search_res = self.source.get_nearest_examples_batch(
self.index_name,
batched_query_embeddings,
k=top_k
)
print('finish search')
def get_pseudo_dataset():
pseudo_dict = {"embedding": np.zeros((1000000, 768), dtype=np.float32)}
print('generate pseudo data')
dataset = Dataset.from_dict(pseudo_dict)
def list_to_array(data):
return {"embedding": [np.array(vector, dtype=np.float32) for vector in data["embedding"]]}
dataset.set_transform(list_to_array, columns='embedding', output_all_columns=True)
print('build dataset')
return dataset
if __name__=="__main__":
np.random.seed(42)
source_dataset = get_pseudo_dataset()
target_dataset = get_pseudo_dataset()
gpu = [0,1,2,3,4,5,6,7]
selector = DPRSelector(source_dataset, target_dataset, "embedding", gpu=gpu)
selector.build_dataset(top_k=20, batch_size=32)
``` | [
-0.28333064913749695,
-0.5681073665618896,
-0.11883765459060669,
0.016156505793333054,
-0.40221691131591797,
0.05902078002691269,
0.22499704360961914,
0.12042197585105896,
0.5553640127182007,
0.01924268901348114,
-0.22989924252033234,
-0.09577411413192749,
0.48070430755615234,
-0.21147648990154266,
-0.11881037056446075,
0.012058798223733902,
0.3646773397922516,
-0.23406589031219482,
0.05972129851579666,
-0.1297280192375183,
-0.5700432658195496,
0.15143676102161407,
-0.34293806552886963,
-0.1601123809814453,
-0.20693324506282806,
0.15853066742420197,
-0.22129599750041962,
-0.009291261434555054,
0.15136349201202393,
-0.22104071080684662,
-0.30639156699180603,
0.1726330816745758,
0.20435230433940887,
0.5097273588180542,
-0.0001270555512746796,
-0.1281401515007019,
-0.11369498074054718,
-0.03318469971418381,
0.127656951546669,
0.30864855647087097,
-0.05022381246089935,
0.11728321015834808,
0.02493509277701378,
-0.040763236582279205,
-0.36219489574432373,
-0.09181451052427292,
0.13997602462768555,
-0.7207438945770264,
-0.16460572183132172,
0.0063170501962304115,
0.027695097029209137,
0.09182202070951462,
-0.02861277014017105,
-0.1866033524274826,
-0.12538716197013855,
-0.4126901626586914,
-0.06461221724748611,
-0.13828019797801971,
0.50978684425354,
-0.030085958540439606,
-0.0043827444314956665,
0.4467695653438568,
0.0034064706414937973,
0.11265741288661957,
-0.1692538857460022,
0.09449507296085358,
0.49487653374671936,
-0.3646494448184967,
0.15296265482902527,
-0.15373525023460388,
-0.10573837906122208,
-0.12942156195640564,
-0.30509138107299805,
-0.38579973578453064,
-0.139329195022583,
-0.055175863206386566,
-0.1681399941444397,
0.04539632797241211,
-0.3128376305103302,
-0.1811387687921524,
0.19630621373653412,
-0.21932730078697205,
0.10378789901733398,
0.0022371262311935425,
0.15115611255168915,
0.5397727489471436,
0.07227170467376709,
0.25288471579551697,
0.24683965742588043,
0.10166198760271072,
-0.1645055115222931,
-0.2416607141494751,
0.3074091076850891,
0.1107846051454544,
-0.9351532459259033,
0.15864737331867218,
0.26270243525505066,
-0.42736735939979553,
0.06745404005050659,
0.011658251285552979,
-0.2827511131763458,
0.15757405757904053,
0.06768330186605453,
0.1768224835395813,
-0.015187378972768784,
-0.09479327499866486,
-0.05793210119009018,
-0.15872274339199066,
-0.2181844860315323,
-0.1927291750907898,
-0.054735422134399414,
0.08464553952217102,
0.07794386148452759,
-0.3254307806491852,
-0.5542672276496887,
-0.05213307589292526,
0.04010247439146042,
0.15329627692699432,
-0.14061841368675232,
-0.09546114504337311,
-0.06559505313634872,
-0.20140889286994934,
0.13970130681991577,
0.3374284505844116,
0.12912285327911377,
0.05689659342169762,
-0.23555172979831696,
0.28292548656463623,
-0.1924750655889511,
-0.1257081776857376,
-0.07148188352584839,
-0.28831928968429565,
0.0347590409219265,
0.3233034610748291,
0.07856526970863342,
-0.1622016727924347,
-0.05515795946121216,
0.06788062304258347,
0.1840883493423462,
0.15454092621803284,
0.17424361407756805,
-0.33442631363868713,
0.4078434407711029,
0.22848623991012573,
0.2773555815219879,
0.015505490824580193,
0.15058642625808716,
0.20457835495471954,
-0.3136880397796631,
0.24400988221168518,
-0.1706315279006958,
0.0513346828520298,
0.16121496260166168,
-0.005584788508713245,
0.39322125911712646,
-0.20568212866783142,
-0.09516379982233047,
0.6177129149436951,
0.02148377150297165,
0.2677164673805237,
0.3217412531375885,
-0.17607447504997253,
0.031699854880571365,
-0.22436849772930145,
0.3528189957141876,
0.21583667397499084,
-0.04160071164369583,
-0.1769741326570511,
0.3104535639286041,
-0.04411782696843147,
-0.07794371992349625,
0.576873779296875,
0.17301617562770844,
-0.08775853365659714,
-0.24082177877426147,
0.6462414860725403,
0.34239131212234497,
-0.6010400056838989,
0.17525120079517365,
-0.030253421515226364,
-0.15621548891067505,
0.015127992257475853,
0.1891077756881714,
0.1366090625524521,
0.02686206065118313,
0.03852232173085213,
0.39748290181159973,
0.4450634717941284,
-0.1610628217458725,
0.0040642376989126205,
-0.10628366470336914,
0.0024439599364995956,
0.11264049261808395,
0.16152295470237732,
0.230418860912323,
-0.14580902457237244,
-0.10144262760877609,
-1.05186927318573,
0.4561102092266083,
-0.05079348012804985,
0.025594020262360573,
-0.15850789844989777,
0.4831162393093109,
0.32193654775619507,
0.3555141091346741,
0.1540921926498413,
0.01595151796936989,
0.21568742394447327,
-0.2297796607017517,
-0.04979715496301651,
0.16045396029949188,
-0.13552194833755493,
0.5005477666854858,
-0.04330237954854965,
-0.2884100079536438,
0.06727229803800583,
-0.07637333869934082,
0.12919999659061432,
-0.007641172036528587,
-0.23023958504199982,
-0.30243203043937683,
0.08938505500555038,
0.13081392645835876,
0.02091202884912491,
-0.3493644893169403,
0.04559215158224106,
-0.05174895375967026,
-0.018743667751550674,
-0.4355052411556244,
-0.04487007111310959,
0.3269038796424866,
-0.3239467740058899,
0.08640611171722412,
0.4272206723690033,
0.19609086215496063,
-0.32668817043304443,
0.46929723024368286,
0.17771358788013458,
0.020020978525280952,
0.07032601535320282,
0.03384299948811531,
0.08629943430423737,
0.04701276868581772,
-0.18165096640586853,
0.1591460257768631,
0.3493397831916809,
0.10550883412361145,
0.38140299916267395,
-0.07220583409070969,
-0.23734988272190094,
0.14754876494407654,
0.12351515889167786,
0.07514899969100952,
0.11173683404922485,
-0.13235871493816376,
-0.0895119160413742,
-0.006073223426938057,
-0.2917994260787964,
-0.658929169178009,
0.4223358631134033,
-0.14617840945720673,
0.04503658041357994,
0.12739896774291992,
-0.23104652762413025,
-0.08505206555128098,
0.0800461396574974,
-0.05888491868972778,
-0.377848356962204,
0.23003965616226196,
0.18410353362560272,
0.21759289503097534,
-0.10682445019483566,
-0.0444970466196537,
-0.12962913513183594,
0.13121503591537476,
0.10782169550657272,
-0.07610321044921875,
0.13428303599357605,
-0.20510970056056976,
-0.06743286550045013,
0.03170330077409744,
-0.22319810092449188,
0.06748644262552261,
-0.21585772931575775,
-0.14440295100212097,
0.06559883803129196,
0.15014459192752838,
-0.04259910061955452,
-0.21523316204547882,
-0.2086126208305359,
0.005539067089557648,
-0.011590138077735901,
0.15457454323768616,
0.007911141961812973,
-0.023020708933472633,
0.23430176079273224,
-0.26586705446243286,
0.5499681234359741,
0.15497010946273804,
-0.38721951842308044,
-0.08102743327617645,
0.011903010308742523,
0.0039188191294670105,
-0.049519725143909454,
0.07047361880540848,
0.08051560819149017,
0.09497126936912537,
0.09457507729530334,
-0.03451845049858093,
-0.33548271656036377,
-0.009266901761293411,
-0.11867019534111023,
-0.18516038358211517,
-0.023047341033816338,
-0.18846797943115234,
-0.3674256205558777,
-0.10746916383504868,
0.24961932003498077,
0.12773928046226501,
-0.234451562166214,
0.04341229796409607,
-0.3279520571231842,
-0.03505098074674606,
-0.31710511445999146,
0.06955549120903015,
-0.09076107293367386,
0.028653455898165703,
-0.14067475497722626,
0.110934779047966,
0.0054018013179302216,
0.16188132762908936,
-0.1180981770157814,
0.25580713152885437,
0.027616363018751144,
-0.1649574190378189,
-0.17000561952590942,
-0.29207029938697815,
-0.0586819052696228,
0.06194965913891792,
-0.11598315089941025,
-0.10934041440486908,
0.010172490030527115,
0.11836779117584229,
0.11559808254241943,
0.38399791717529297,
0.19488264620304108,
0.12548595666885376,
0.14454008638858795,
0.1468907594680786,
0.11529359966516495,
0.579042375087738,
0.1262921243906021,
-0.262011855840683,
-0.01898619718849659,
0.11545763164758682,
-0.055624671280384064,
0.10688184201717377,
0.16726720333099365,
0.18610994517803192,
-0.0002015233039855957,
0.05469860881567001,
-0.013836683705449104,
0.8111602663993835,
0.0666760802268982,
0.09326747059822083,
0.21467703580856323,
0.008605845272541046,
0.18376430869102478,
0.11162624508142471,
-0.12208776921033859,
0.15928903222084045,
0.21897092461585999,
-0.009376196190714836,
0.009606428444385529,
-0.07098028808832169,
-0.06345251202583313,
-0.02572203427553177,
0.11065870523452759,
-0.3511819541454315,
-0.11119876801967621,
0.09610506892204285,
-0.03778466582298279,
0.28245630860328674,
-0.21020811796188354,
-0.002769697457551956,
-0.1734825223684311,
0.26321929693222046,
-0.17062297463417053,
0.22876442968845367,
0.09299696981906891,
-0.13543088734149933,
0.06509391963481903,
-0.1563723087310791,
-0.2959500253200531,
0.5549604892730713,
-0.19532452523708344,
0.3927815854549408,
0.17408794164657593,
-0.2987053692340851,
0.2783053517341614,
-0.05736279487609863,
0.733833909034729,
0.08373049646615982,
-0.34815913438796997,
0.10627219080924988,
-0.2546863555908203,
-0.3316526710987091,
-0.24285198748111725,
-0.18163418769836426,
0.13719958066940308,
0.3377777934074402,
0.17268602550029755,
0.028689175844192505,
-0.422092080116272,
-0.0009582508355379105,
-0.31309425830841064,
-0.04159943759441376,
-0.3224254846572876,
-0.4486920237541199,
-0.11996088922023773,
0.06770552694797516,
0.5077406764030457,
0.05835554003715515,
0.019701356068253517,
-0.037291496992111206,
0.1612308919429779,
-0.2700660228729248,
-0.11676077544689178,
0.12609431147575378,
0.1193191409111023,
-0.08412285894155502,
0.12325907498598099,
0.03938942775130272,
0.3470909595489502,
0.009364604949951172,
0.2925015389919281,
0.005994204431772232,
-0.04028261825442314,
-0.015939056873321533,
0.03819819167256355,
0.12649381160736084,
0.35596251487731934,
0.16780157387256622,
0.1213124543428421,
0.34290799498558044,
-0.1526259481906891,
0.22380585968494415,
0.09315712004899979,
-0.18424957990646362,
0.21867026388645172,
0.3602006435394287,
-0.22851508855819702,
-0.3349676728248596,
0.4360681474208832,
-0.0744214579463005,
-0.2758924067020416,
0.1452530175447464,
0.16178160905838013,
-0.03349880874156952,
0.433641254901886,
0.13566017150878906,
0.40760743618011475,
-0.0368150994181633,
-0.07083196938037872,
0.057654865086078644,
-0.01967988908290863,
0.14277002215385437,
-0.4262881875038147,
0.5780425071716309,
-0.31341010332107544,
0.06303872913122177,
-0.01441150438040495,
-0.12748312950134277,
0.38430288434028625,
0.14211349189281464,
0.009036142379045486,
0.2942526042461395,
0.13701143860816956,
-0.2788879871368408,
-0.15667805075645447,
-0.048537638038396835,
0.21612395346164703,
-0.15896020829677582,
0.28661543130874634,
-0.03251935541629791,
0.3164064288139343,
0.033235374838113785,
0.07800913602113724,
0.12116675078868866,
0.06215338781476021,
0.08961024880409241,
-0.17208123207092285,
-0.07761992514133453,
-0.1306198090314865,
0.03682979941368103,
0.27823352813720703,
0.0050931572914123535,
0.11508890986442566,
-0.33272773027420044,
0.20223121345043182,
-0.4318203032016754,
0.039185356348752975,
0.09983440488576889,
0.29149436950683594,
-0.14045974612236023,
-0.040315017104148865,
-0.696450412273407,
0.20694145560264587,
0.1321890950202942,
-0.37847113609313965,
0.25738129019737244,
0.26134586334228516,
-0.4293052554130554,
-0.4871518313884735,
0.386247456073761,
-0.15163610875606537,
0.30722856521606445,
-0.23688970506191254,
0.20548775792121887,
0.19982174038887024,
0.030684228986501694,
-0.055375780910253525,
0.13065794110298157,
-0.4305778741836548,
0.6868059039115906,
-0.4115428626537323,
-0.0842379778623581,
-0.04573241248726845,
0.16733840107917786,
0.22867217659950256,
-0.4212190508842468,
-0.043975673615932465,
0.13160791993141174,
-0.06820131838321686,
-0.02021331898868084,
-0.5782302618026733,
0.28457385301589966,
0.33355727791786194,
-0.006471955217421055,
0.02937733754515648,
-0.06728722155094147,
0.43085286021232605,
-0.1815098077058792,
-0.005736727267503738,
-0.04255245625972748,
-0.43156513571739197,
0.030866548418998718,
0.11649654060602188,
-0.09528432786464691,
-0.1307738870382309,
0.16459231078624725,
0.28115683794021606,
0.00016466155648231506,
0.1763974279165268,
0.17034853994846344,
-0.1351778507232666,
0.08707492053508759,
-0.007789796218276024,
0.1425858587026596,
-0.10452735424041748,
0.18538379669189453,
-0.048083823174238205,
0.2157292664051056,
-0.04521040618419647,
-0.1279672086238861,
-0.09606169909238815,
-0.0848643109202385,
0.17697583138942719,
0.16909992694854736,
0.17801740765571594,
0.19081613421440125,
-0.16506348550319672,
-0.1520499438047409,
-0.29136624932289124,
-0.12681728601455688,
0.201378732919693,
0.26744508743286133,
-0.19902504980564117,
-0.040008120238780975,
0.16398940980434418,
-0.37027859687805176,
-0.016280479729175568,
0.2819620966911316,
0.23609359562397003,
0.0395638532936573,
0.24095949530601501,
0.29318422079086304,
-0.31875377893447876,
0.02377631515264511,
-0.20815755426883698,
0.167790025472641,
0.4372725486755371,
-0.028893858194351196,
-0.019982948899269104,
-0.11344479024410248,
-0.25395873188972473,
-0.23597204685211182,
0.23958632349967957,
0.3220362365245819,
0.09698057174682617,
-0.24552616477012634,
0.027807554230093956,
0.06861668080091476,
-0.1584736704826355,
-0.04327225312590599,
0.4463629722595215,
0.03367852419614792,
0.3599350154399872,
0.4676332175731659,
0.5119431018829346,
0.31624388694763184,
0.04643106088042259,
-0.0015634708106517792,
0.3006657361984253,
0.503372073173523,
-0.01847853884100914,
-0.4498724639415741,
0.37006792426109314,
0.09493457525968552,
0.27010178565979004,
0.1512545794248581,
0.11051596701145172,
0.4178362488746643,
-0.24135947227478027,
0.378852903842926,
-0.07111167162656784,
-0.24733060598373413,
-0.05791065841913223,
-0.3515387177467346,
0.4396625757217407,
-0.0044312626123428345,
-0.30166181921958923,
0.14401009678840637,
-0.2536885142326355,
0.09418891370296478,
-0.16061744093894958,
-0.31163090467453003,
-0.10803072154521942,
0.25950896739959717,
-0.12223050743341446,
-0.16667123138904572,
0.01954888179898262,
-0.0574217289686203,
0.00475504994392395,
-0.07698327302932739,
0.1751905232667923,
-0.08648255467414856,
0.13320690393447876,
-0.07949824631214142,
0.17487365007400513,
0.155312180519104,
-0.2982243597507477,
0.3760926425457001,
0.14809714257717133,
0.08321148157119751,
-0.02619067020714283,
-0.026933014392852783,
-0.16502180695533752,
0.1733318716287613,
0.1726958453655243,
0.29286766052246094,
0.3510051965713501,
-0.3007057309150696,
0.18318089842796326,
0.016819199547171593,
0.10046416521072388,
0.0509999617934227,
-0.2415260374546051,
-0.07494013011455536,
-0.3821931779384613,
0.1727270483970642,
-0.0021255025640130043,
0.0423414446413517,
-0.12589839100837708,
0.0013264045119285583,
0.2283073216676712,
-0.2287379503250122,
-0.20742160081863403,
-0.4324643611907959,
0.10279843956232071,
-0.0017408579587936401,
0.11661574989557266,
-0.5374259948730469,
-0.08765744417905807,
0.3797862231731415,
-0.4840824007987976,
-0.0730379968881607,
0.07521431148052216,
-0.020556895062327385,
0.0683450773358345,
0.47744113206863403,
0.1522570252418518,
0.29918599128723145,
-0.21766860783100128,
-0.011193841695785522,
-0.3070652484893799,
0.2113908976316452,
-0.09247228503227234,
0.0654267966747284,
0.06491275131702423,
0.7312846183776855,
0.030645102262496948,
-0.08652829378843307,
0.6145164966583252,
0.16877523064613342,
0.3802875578403473,
0.7400833368301392,
0.034629110246896744,
0.29669836163520813,
-0.5851153135299683,
0.008345415815711021,
0.21151356399059296,
-0.0697237104177475,
0.162581205368042,
-0.1415484994649887,
-0.15093490481376648,
-0.11242075264453888,
0.08951370418071747,
0.4179184138774872,
-0.2632048726081848,
0.35204508900642395,
-0.010611427947878838,
0.12143969535827637,
0.047516800463199615,
0.07234515994787216,
-0.1876455694437027,
0.24264535307884216,
-0.33245888352394104,
-0.1800706684589386,
-0.12242844700813293,
-0.20944474637508392,
-0.2273150086402893,
-0.575376033782959,
0.03488335385918617,
0.45456039905548096,
0.11023516952991486,
-0.49282601475715637,
0.15740670263767242,
0.17218495905399323,
-0.30918610095977783,
0.09145259112119675,
0.2814539074897766,
0.16484150290489197,
0.08182895183563232,
0.3610544502735138,
-0.34646233916282654,
0.08613277226686478,
0.23584896326065063,
-0.3198188245296478,
-0.27667364478111267,
-0.9053440690040588,
0.26542991399765015,
0.2116541862487793,
0.3142639994621277,
-0.418067991733551,
-0.22033175826072693,
0.1309439241886139,
0.326116144657135,
-0.11719727516174316,
0.17968995869159698,
-0.14830563962459564,
-0.23699027299880981,
-0.24240835011005402,
-0.6305705308914185,
0.15641748905181885,
0.06593815982341766,
-0.10616308450698853,
-0.1418587863445282
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Maybe @albertvillanova you can take a look ? I won't be available in the following days | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 16 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Maybe @albertvillanova you can take a look ? I won't be available in the following days | [
-0.1451474279165268,
-0.6219744682312012,
-0.1648423820734024,
0.08024608343839645,
-0.40835070610046387,
0.04980514198541641,
0.1447599083185196,
0.013119002804160118,
0.542361319065094,
0.025429323315620422,
-0.27304017543792725,
-0.24332985281944275,
0.5346524715423584,
-0.1012987345457077,
-0.1830129623413086,
-0.08440257608890533,
0.39444205164909363,
-0.2562333643436432,
0.009218543767929077,
-0.1974632740020752,
-0.47177302837371826,
0.15436579287052155,
-0.3778144121170044,
-0.1390562653541565,
-0.20177465677261353,
0.14820823073387146,
-0.17776821553707123,
-0.03422001004219055,
0.12224916368722916,
-0.11392752826213837,
-0.3143981695175171,
0.23528365790843964,
0.10336334258317947,
0.4456136226654053,
-0.00012317215441726148,
-0.19462567567825317,
-0.07351599633693695,
-0.00968892127275467,
0.22126838564872742,
0.298382431268692,
-0.16463254392147064,
0.26705002784729004,
0.021419018507003784,
0.029039718210697174,
-0.4143931567668915,
-0.027917206287384033,
0.19826698303222656,
-0.6398695707321167,
-0.13964493572711945,
-0.02546669729053974,
0.07068810611963272,
-0.10670732706785202,
0.00837637111544609,
-0.15706250071525574,
-0.059406451880931854,
-0.37460124492645264,
0.00148867629468441,
-0.10207025706768036,
0.4371698200702667,
-0.08209551870822906,
0.021580547094345093,
0.4409439265727997,
0.13048160076141357,
0.04062414541840553,
-0.13578858971595764,
0.037733472883701324,
0.3106013536453247,
-0.3520534038543701,
0.09703725576400757,
-0.1475433111190796,
-0.12657275795936584,
-0.07885994762182236,
-0.18241740763187408,
-0.35853874683380127,
-0.19490744173526764,
0.013744952157139778,
-0.10405778139829636,
0.10954471677541733,
-0.2221962958574295,
-0.14524877071380615,
0.19751764833927155,
-0.26424747705459595,
0.012032851576805115,
-0.08501675724983215,
0.18289154767990112,
0.5404465198516846,
0.017800454050302505,
0.21312785148620605,
0.25924625992774963,
0.18141773343086243,
-0.2775760591030121,
-0.22363539040088654,
0.2602551281452179,
0.14085115492343903,
-0.961323082447052,
0.19662024080753326,
0.09809191524982452,
-0.32995495200157166,
0.08127336204051971,
-0.0470433235168457,
-0.29286667704582214,
0.08892822265625,
0.030427396297454834,
0.22516539692878723,
0.028462529182434082,
-0.04201478883624077,
-0.014932110905647278,
-0.16841743886470795,
-0.19692470133304596,
-0.24123863875865936,
-0.08044150471687317,
0.053851112723350525,
0.08873841166496277,
-0.31330472230911255,
-0.7168469429016113,
-0.09475664049386978,
-0.004202492535114288,
0.0905834436416626,
-0.1315036416053772,
-0.048696428537368774,
-0.03218788653612137,
-0.2804543077945709,
0.13070465624332428,
0.3519135117530823,
0.013026594184339046,
0.0141802579164505,
-0.21173951029777527,
0.0847349464893341,
-0.20348361134529114,
-0.056849926710128784,
-0.08206415921449661,
-0.20297646522521973,
-0.030009662732481956,
0.2792108356952667,
0.015061412006616592,
-0.18292003870010376,
-0.0576925128698349,
0.12255457788705826,
0.15329670906066895,
0.11024428904056549,
0.1526409238576889,
-0.3866654932498932,
0.3269171416759491,
0.22801610827445984,
0.24824115633964539,
0.005920283496379852,
0.04250426962971687,
0.3026701807975769,
-0.24729371070861816,
0.25051018595695496,
-0.1705726683139801,
0.03867897018790245,
0.1538885086774826,
0.03259880468249321,
0.31694477796554565,
-0.22706085443496704,
-0.10577622801065445,
0.6290382146835327,
-0.028090767562389374,
0.24618315696716309,
0.32174384593963623,
-0.07382336258888245,
0.007049541920423508,
-0.23169371485710144,
0.3149808943271637,
0.1279856413602829,
-0.09788677096366882,
-0.16028285026550293,
0.43726369738578796,
-0.21211881935596466,
-0.025853820145130157,
0.5644022822380066,
0.15107035636901855,
-0.1471101939678192,
-0.19350452721118927,
0.6361070275306702,
0.27514365315437317,
-0.4461388885974884,
0.220942884683609,
-0.1459563672542572,
-0.0855512022972107,
0.0018962472677230835,
0.22531473636627197,
0.09160283207893372,
0.010575568303465843,
0.05771901085972786,
0.3135172128677368,
0.47463321685791016,
-0.09025521576404572,
-0.006477361544966698,
-0.0779205709695816,
0.08574908971786499,
0.09735129773616791,
0.18455033004283905,
0.15310177206993103,
-0.0969059094786644,
-0.07666011899709702,
-1.0474693775177002,
0.44812461733818054,
-0.008910108357667923,
0.01568322628736496,
-0.15085746347904205,
0.5328192710876465,
0.4714210629463196,
0.4075736999511719,
0.1390213966369629,
0.19768047332763672,
0.17920488119125366,
-0.2363482266664505,
-0.03771943598985672,
0.2617701590061188,
-0.16032947599887848,
0.46871426701545715,
-0.0983148068189621,
-0.28640037775039673,
0.1316402405500412,
-0.04078780859708786,
0.023377887904644012,
-0.008522912859916687,
-0.1877269446849823,
-0.3210534155368805,
0.1876060515642166,
0.022456100210547447,
-0.038756225258111954,
-0.4034021496772766,
0.08639710396528244,
-0.10424762219190598,
-0.005809573456645012,
-0.4595717489719391,
-0.1076197698712349,
0.304586261510849,
-0.3358917832374573,
0.029835820198059082,
0.3892539441585541,
0.21712295711040497,
-0.23406563699245453,
0.4568430781364441,
0.2589547336101532,
0.0782337337732315,
0.13337209820747375,
-0.003913139924407005,
0.000012770295143127441,
0.050674088299274445,
-0.18448148667812347,
0.048039477318525314,
0.26330798864364624,
0.08179758489131927,
0.337103933095932,
-0.006357930600643158,
-0.31567642092704773,
0.17180702090263367,
0.0951245129108429,
0.15675806999206543,
0.20271101593971252,
-0.036341842263936996,
-0.1247292309999466,
-0.02524445950984955,
-0.20731361210346222,
-0.696251392364502,
0.36657556891441345,
-0.1296439915895462,
0.04944419488310814,
0.06789794564247131,
-0.19557231664657593,
-0.0598485991358757,
0.07654672116041183,
-0.03024357743561268,
-0.2825202941894531,
0.14497508108615875,
0.19180265069007874,
0.1890677809715271,
-0.05662912130355835,
0.004194902256131172,
-0.11829402297735214,
0.09150943905115128,
0.08301224559545517,
-0.04469243437051773,
0.07812266051769257,
-0.2388845831155777,
-0.11628112941980362,
0.010677631944417953,
-0.20419496297836304,
0.09312840551137924,
-0.1646837592124939,
-0.17175714671611786,
0.01790974847972393,
0.2645035982131958,
-0.14560151100158691,
-0.2961498498916626,
-0.08365638554096222,
-0.06911101937294006,
0.04886031150817871,
0.17838115990161896,
0.09121210873126984,
-0.04631213843822479,
0.19965749979019165,
-0.2316019982099533,
0.6276468634605408,
0.08020546287298203,
-0.2548646330833435,
-0.10787563025951385,
0.035856496542692184,
0.024916861206293106,
0.01049591600894928,
0.064915232360363,
0.11236373335123062,
0.067703478038311,
0.08136643469333649,
-0.05411287024617195,
-0.23109880089759827,
-0.042778901755809784,
-0.028904326260089874,
-0.12918229401111603,
-0.12952235341072083,
-0.18506017327308655,
-0.28777068853378296,
-0.06982582807540894,
0.25614863634109497,
0.02857014164328575,
-0.2676880955696106,
-0.034627143293619156,
-0.3674241900444031,
-0.09463062882423401,
-0.2807878255844116,
0.039293404668569565,
-0.1780741810798645,
-0.031377747654914856,
-0.09791712462902069,
0.2828916311264038,
-0.005343155935406685,
0.1849134862422943,
-0.1343667060136795,
0.22519633173942566,
-0.009633196517825127,
-0.2009013593196869,
-0.07665032893419266,
-0.35701966285705566,
-0.07017883658409119,
-0.004777301102876663,
-0.14562872052192688,
-0.14366024732589722,
0.041272472590208054,
0.20860321819782257,
0.07451183348894119,
0.3001863956451416,
0.20826412737369537,
0.09504369646310806,
0.09618685394525528,
-0.033062148839235306,
0.0407378152012825,
0.6395618319511414,
0.14859968423843384,
-0.3352404534816742,
-0.04332078620791435,
0.052660636603832245,
-0.07884535193443298,
0.17431610822677612,
0.16446474194526672,
0.1800709366798401,
-0.0016554389148950577,
-0.00671425461769104,
-0.009858768433332443,
0.7798143625259399,
0.04496261104941368,
0.14580397307872772,
0.22355520725250244,
0.08007298409938812,
0.167503222823143,
0.12765270471572876,
-0.03414156660437584,
0.2401774525642395,
0.2671748399734497,
-0.008072162047028542,
0.015529133379459381,
-0.002663874998688698,
-0.0696331039071083,
-0.06493616104125977,
-0.02508465014398098,
-0.3075450658798218,
-0.03743978589773178,
0.09705247730016708,
0.04102379456162453,
0.24580812454223633,
-0.25069379806518555,
-0.07292328774929047,
-0.10220801830291748,
0.22744080424308777,
-0.1315804123878479,
0.21323630213737488,
0.1146763488650322,
-0.1585487425327301,
-0.013583175837993622,
-0.23482844233512878,
-0.2356281280517578,
0.48634767532348633,
-0.20460675656795502,
0.36078551411628723,
0.15354318916797638,
-0.2845486104488373,
0.37034279108047485,
-0.04401054605841637,
0.8054401278495789,
0.19028130173683167,
-0.4127271771430969,
-0.07210280001163483,
-0.21755866706371307,
-0.14518499374389648,
-0.21219436824321747,
-0.11391693353652954,
0.1214708462357521,
0.4544503092765808,
0.0837063267827034,
0.012110739946365356,
-0.46052682399749756,
0.03115328587591648,
-0.4022221565246582,
-0.0688096433877945,
-0.41980740427970886,
-0.4830375015735626,
-0.034017667174339294,
0.11292444169521332,
0.5067834258079529,
0.07757339626550674,
-0.023537026718258858,
-0.13211490213871002,
0.17749716341495514,
-0.19292142987251282,
-0.07418251037597656,
0.1372710019350052,
0.10967716574668884,
-0.13288140296936035,
0.10980552434921265,
-0.017350763082504272,
0.47341442108154297,
0.0792604461312294,
0.18761448562145233,
-0.015063770115375519,
-0.07195881009101868,
0.0324244424700737,
-0.0011393837630748749,
0.21681173145771027,
0.4109499454498291,
0.10744073987007141,
0.13161924481391907,
0.3319169580936432,
-0.12864862382411957,
0.15799927711486816,
0.009377602487802505,
-0.11407077312469482,
0.18925392627716064,
0.4213402569293976,
-0.2547443211078644,
-0.3563532829284668,
0.4099425971508026,
-0.047944217920303345,
-0.31673020124435425,
0.09230323135852814,
0.2924884259700775,
-0.06771448999643326,
0.42719876766204834,
0.09762823581695557,
0.46090054512023926,
-0.09555397927761078,
-0.07160681486129761,
-0.13339105248451233,
-0.16046839952468872,
0.13871963322162628,
-0.4588581919670105,
0.5400869250297546,
-0.37307626008987427,
0.04376234486699104,
-0.006169252097606659,
-0.11414656043052673,
0.3375876843929291,
0.11789608746767044,
0.10987283289432526,
0.35281121730804443,
0.13249991834163666,
-0.3344421088695526,
-0.15684229135513306,
-0.009381484240293503,
0.305347740650177,
-0.06380453705787659,
0.35724154114723206,
0.0035016313195228577,
0.28766894340515137,
0.07873667776584625,
0.03614988923072815,
0.1166931763291359,
0.14030058681964874,
0.16408737003803253,
-0.15894466638565063,
-0.09081485122442245,
-0.07197235524654388,
-0.08089498430490494,
0.25126537680625916,
0.025960199534893036,
0.13418973982334137,
-0.34306928515434265,
0.17777368426322937,
-0.3769238591194153,
0.054209671914577484,
0.16066989302635193,
0.24016162753105164,
-0.14081154763698578,
-0.05919688194990158,
-0.5488529205322266,
0.12483374029397964,
0.07044985890388489,
-0.4140235483646393,
0.15776649117469788,
0.26368051767349243,
-0.5204522013664246,
-0.6048073172569275,
0.33793962001800537,
-0.1802760511636734,
0.304389625787735,
-0.22555117309093475,
0.18967875838279724,
0.22399300336837769,
0.07065415382385254,
0.003331998363137245,
0.135747492313385,
-0.45287126302719116,
0.7809456586837769,
-0.4147883951663971,
0.0008143335580825806,
-0.10132397711277008,
0.179530531167984,
0.2755776643753052,
-0.4758179783821106,
-0.10886599123477936,
0.1659674346446991,
-0.06686057150363922,
0.01652999222278595,
-0.6712309122085571,
0.3724193572998047,
0.3586638867855072,
-0.09579988569021225,
-0.001655853120610118,
-0.14081083238124847,
0.3860708475112915,
-0.1635378897190094,
0.025915827602148056,
0.016219548881053925,
-0.3709768056869507,
0.01122967153787613,
0.16445615887641907,
-0.1031651645898819,
-0.11122891306877136,
0.19046100974082947,
0.3534207344055176,
-0.08168184757232666,
0.17044666409492493,
0.14342564344406128,
-0.17780256271362305,
0.11342356353998184,
-0.020725995302200317,
0.13797855377197266,
-0.07481437176465988,
0.19046857953071594,
-0.07462149858474731,
0.2299187332391739,
-0.006027020514011383,
-0.09809453785419464,
-0.03703434765338898,
-0.11678405851125717,
0.15401744842529297,
0.1358012855052948,
0.13239288330078125,
0.21935400366783142,
-0.2576858699321747,
-0.12127771973609924,
-0.292887806892395,
-0.041212525218725204,
0.12160986661911011,
0.2675064504146576,
-0.23073141276836395,
0.04379243776202202,
0.13170573115348816,
-0.45261111855506897,
0.02021035924553871,
0.2780352830886841,
0.2612628936767578,
0.008751943707466125,
0.20480743050575256,
0.2934108376502991,
-0.31961366534233093,
-0.005537219345569611,
-0.19120272994041443,
0.11099773645401001,
0.46731477975845337,
-0.03682541847229004,
-0.10226056724786758,
-0.03852000832557678,
-0.2510177493095398,
-0.1516636162996292,
0.318559467792511,
0.28948289155960083,
0.14665988087654114,
-0.168983593583107,
0.06330901384353638,
0.12419670075178146,
-0.10896342247724533,
-0.06872108578681946,
0.4379739463329315,
0.055387526750564575,
0.2976748049259186,
0.43015775084495544,
0.5561562180519104,
0.3966270685195923,
0.08957397192716599,
0.048592425882816315,
0.2554871737957001,
0.5055391192436218,
0.0042076632380485535,
-0.5663557052612305,
0.34176602959632874,
0.04067917913198471,
0.32212620973587036,
0.1808532476425171,
0.08317109197378159,
0.4601891040802002,
-0.1881881058216095,
0.3662338852882385,
-0.0665864497423172,
-0.21811538934707642,
0.038273923099040985,
-0.32067593932151794,
0.33829787373542786,
0.054471105337142944,
-0.32143500447273254,
0.14809100329875946,
-0.23753511905670166,
0.17701120674610138,
-0.09030485898256302,
-0.3686316907405853,
-0.09553453326225281,
0.2384563535451889,
-0.09650585800409317,
-0.12908673286437988,
-0.02476440742611885,
-0.15831395983695984,
0.08091422915458679,
-0.048455215990543365,
0.25467121601104736,
-0.06957736611366272,
0.28271347284317017,
-0.07762697339057922,
0.18553221225738525,
0.21645614504814148,
-0.2633899748325348,
0.3848322033882141,
0.2770642042160034,
0.12272210419178009,
-0.02980186603963375,
-0.10073371231555939,
-0.1989646852016449,
0.20102092623710632,
0.15709470212459564,
0.20342306792736053,
0.3052418529987335,
-0.2842099368572235,
0.20775838196277618,
0.09730900824069977,
0.12486416101455688,
0.1123499870300293,
-0.13557708263397217,
0.026141725480556488,
-0.3284522593021393,
0.03575047850608826,
0.023706136271357536,
0.02500104159116745,
-0.12956811487674713,
-0.031599242240190506,
0.2101583182811737,
-0.2607022821903229,
-0.2191900610923767,
-0.43780654668807983,
0.04359041899442673,
-0.03633047640323639,
0.13992147147655487,
-0.5663856863975525,
-0.03492824733257294,
0.31368204951286316,
-0.4987640082836151,
-0.08968240022659302,
0.04799903184175491,
-0.01123019028455019,
0.09510140120983124,
0.47487643361091614,
0.08956408500671387,
0.40329504013061523,
-0.15530313551425934,
-0.08608730137348175,
-0.1662542074918747,
0.2567748725414276,
-0.020241383463144302,
0.1553185135126114,
-0.039450760930776596,
0.6483505368232727,
-0.04895957559347153,
-0.18459373712539673,
0.5649064183235168,
0.16136299073696136,
0.343983918428421,
0.7265723943710327,
0.01950964331626892,
0.29144299030303955,
-0.5001354813575745,
0.016957279294729233,
0.23832088708877563,
0.042278409004211426,
0.23126555979251862,
-0.16669438779354095,
-0.12984296679496765,
-0.15596604347229004,
0.20644983649253845,
0.3021802306175232,
-0.2879960834980011,
0.29322192072868347,
-0.01928236149251461,
0.1466512829065323,
0.04173394292593002,
0.11356506496667862,
-0.11825612187385559,
0.22737570106983185,
-0.38817307353019714,
-0.2725522816181183,
-0.1304696649312973,
-0.2804516851902008,
-0.13679011166095734,
-0.5813336372375488,
0.09152879565954208,
0.4859901964664459,
0.09362919628620148,
-0.48155906796455383,
0.11520158499479294,
0.05429477244615555,
-0.28263214230537415,
0.048996295779943466,
0.28524601459503174,
0.2433498203754425,
0.09007040411233902,
0.18371249735355377,
-0.3705267906188965,
0.15483935177326202,
0.14944079518318176,
-0.3068396747112274,
-0.24783258140087128,
-0.9217121005058289,
0.2638842463493347,
0.2554760277271271,
0.23038917779922485,
-0.4402848184108734,
-0.21477773785591125,
0.05925764515995979,
0.265049546957016,
-0.09645262360572815,
0.25765857100486755,
-0.11940477788448334,
-0.24712826311588287,
-0.21703693270683289,
-0.6840401887893677,
0.19608601927757263,
0.061949752271175385,
-0.04523031413555145,
-0.2043745517730713
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Hi @xwwwwww I'm investigating it, but I'm not an expert in Faiss. In principle, it is weird that your code does not work properly because it seems right... | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 28 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Hi @xwwwwww I'm investigating it, but I'm not an expert in Faiss. In principle, it is weird that your code does not work properly because it seems right... | [
-0.14981277287006378,
-0.6301243901252747,
-0.16075704991817474,
0.1275802105665207,
-0.31355810165405273,
0.027824722230434418,
0.16284237802028656,
0.07424211502075195,
0.4965071678161621,
0.0691094845533371,
-0.2820940613746643,
-0.2224423587322235,
0.5053197145462036,
-0.15431375801563263,
-0.25773465633392334,
-0.049480825662612915,
0.33843275904655457,
-0.23159119486808777,
-0.03717094659805298,
-0.1759497970342636,
-0.4498830735683441,
0.2098921537399292,
-0.3464747667312622,
-0.14506790041923523,
-0.2651847004890442,
0.18820816278457642,
-0.20236746966838837,
-0.06416978687047958,
0.14141839742660522,
-0.09915639460086823,
-0.2854554355144501,
0.23097650706768036,
0.08155754208564758,
0.47201186418533325,
-0.0001132612960645929,
-0.18613329529762268,
-0.054624706506729126,
-0.04764143377542496,
0.17573221027851105,
0.31044676899909973,
-0.14288127422332764,
0.3119035065174103,
-0.025335054844617844,
-0.07328148186206818,
-0.5222726464271545,
-0.04210187867283821,
0.1058385819196701,
-0.5655236840248108,
-0.08657656610012054,
0.010764137841761112,
0.19392931461334229,
-0.12187967449426651,
0.15340708196163177,
-0.15584683418273926,
-0.056898705661296844,
-0.3192594051361084,
0.0004093293100595474,
-0.0897936075925827,
0.3735998272895813,
0.009602423757314682,
0.014358408749103546,
0.4915706515312195,
0.09079011529684067,
0.07864747941493988,
-0.1833171248435974,
0.10217638313770294,
0.3167780637741089,
-0.2942746579647064,
0.12545374035835266,
-0.12122268229722977,
-0.1563883125782013,
-0.0888940617442131,
-0.17840918898582458,
-0.32780900597572327,
-0.19703920185565948,
-0.030610738322138786,
-0.1476530134677887,
0.07104440778493881,
-0.21592651307582855,
-0.10260654985904694,
0.2055434137582779,
-0.20919658243656158,
0.07128560543060303,
-0.020690567791461945,
0.19365322589874268,
0.44825077056884766,
-0.05883640795946121,
0.21615615487098694,
0.1713174730539322,
0.19469739496707916,
-0.3362256586551666,
-0.2378844916820526,
0.21668191254138947,
0.0775078609585762,
-0.9913023114204407,
0.19299016892910004,
0.13234728574752808,
-0.28946569561958313,
0.10158301144838333,
-0.0479031577706337,
-0.3368704617023468,
0.09883394837379456,
0.03178960457444191,
0.20552891492843628,
-0.04925377294421196,
-0.03025558404624462,
-0.029802486300468445,
-0.12564074993133545,
-0.2531166076660156,
-0.1369718611240387,
-0.1321684867143631,
0.01656387932598591,
0.08522863686084747,
-0.33206185698509216,
-0.6614817380905151,
-0.06101389229297638,
0.1313142627477646,
0.004917088896036148,
-0.13595561683177948,
-0.1262376308441162,
-0.06451471894979477,
-0.2543255090713501,
0.15961836278438568,
0.41202887892723083,
0.11118122190237045,
0.04681600630283356,
-0.16297908127307892,
0.10018707811832428,
-0.24367867410182953,
-0.1261838674545288,
-0.168424591422081,
-0.13427475094795227,
-0.07533130794763565,
0.2875695824623108,
0.05924846604466438,
-0.18987208604812622,
-0.05921650677919388,
0.11422336846590042,
0.129282146692276,
-0.013705357909202576,
0.11622075736522675,
-0.3780222237110138,
0.29652106761932373,
0.1570698767900467,
0.18933556973934174,
-0.021925218403339386,
0.06750501692295074,
0.2723507881164551,
-0.2082744538784027,
0.2566695511341095,
-0.1803753674030304,
0.01991509273648262,
0.1708071231842041,
0.13357757031917572,
0.24126072227954865,
-0.21316498517990112,
-0.07248782366514206,
0.598432183265686,
0.03368426114320755,
0.25442543625831604,
0.2890804409980774,
-0.027846165001392365,
0.007246915251016617,
-0.22512440383434296,
0.38099199533462524,
0.23363253474235535,
-0.061886563897132874,
-0.10660095512866974,
0.3180316388607025,
-0.14708806574344635,
0.012597866356372833,
0.610521137714386,
0.14831911027431488,
-0.1297568678855896,
-0.22444432973861694,
0.5585170388221741,
0.27199655771255493,
-0.42403683066368103,
0.15088951587677002,
-0.1394861489534378,
-0.15437738597393036,
0.01240251399576664,
0.2456836998462677,
0.05454380437731743,
-0.02163543924689293,
0.06901641190052032,
0.2865036725997925,
0.4244909882545471,
-0.08583729714155197,
0.037790149450302124,
-0.21062906086444855,
0.0055211447179317474,
0.12890776991844177,
0.2555663585662842,
0.11717157065868378,
-0.12615996599197388,
-0.1428270936012268,
-0.9785656929016113,
0.5062882900238037,
-0.05015933886170387,
0.03770908713340759,
-0.12884736061096191,
0.5648036599159241,
0.391353964805603,
0.3382384479045868,
0.12417919188737869,
0.18710114061832428,
0.22689706087112427,
-0.18402056396007538,
0.001357290893793106,
0.2215149700641632,
-0.1782321184873581,
0.45052778720855713,
-0.14607127010822296,
-0.32607489824295044,
0.01714770682156086,
0.07004600018262863,
0.037636421620845795,
0.07152701914310455,
-0.1383936107158661,
-0.2351830005645752,
0.21152658760547638,
0.03834120184183121,
-0.07108453661203384,
-0.41307875514030457,
0.16721473634243011,
-0.17956504225730896,
-0.03657658025622368,
-0.40852460265159607,
-0.06936690956354141,
0.3410630524158478,
-0.3235270082950592,
-0.011861614882946014,
0.33464547991752625,
0.18363197147846222,
-0.2569575309753418,
0.4810800552368164,
0.1662946492433548,
0.03850967064499855,
0.07339043915271759,
-0.0440974161028862,
0.04279696196317673,
0.057361260056495667,
-0.15168116986751556,
0.08474812656641006,
0.26661717891693115,
0.10250554978847504,
0.3115636706352234,
-0.02224201336503029,
-0.2821463346481323,
0.16745607554912567,
0.011820811778306961,
0.17540711164474487,
0.12884125113487244,
-0.007865197956562042,
-0.1243564635515213,
-0.018424013629555702,
-0.13827291131019592,
-0.6732751727104187,
0.3934498131275177,
-0.056456904858350754,
0.06945282220840454,
0.050116170197725296,
-0.1960517168045044,
-0.023280993103981018,
0.11847398430109024,
0.0038069020956754684,
-0.27249789237976074,
0.1576271504163742,
0.28129667043685913,
0.08394517749547958,
-0.08340505510568619,
0.0007157493382692337,
-0.13455548882484436,
0.06965601444244385,
0.061393506824970245,
-0.015897126868367195,
0.025609325617551804,
-0.16143450140953064,
-0.11088543385267258,
-0.02038058638572693,
-0.2242148369550705,
0.12134923785924911,
-0.0918215960264206,
-0.20258930325508118,
0.042176514863967896,
0.16424410045146942,
-0.15864211320877075,
-0.3413921296596527,
-0.07873870432376862,
-0.07678301632404327,
0.04671739041805267,
0.21468137204647064,
0.08428557217121124,
-0.044620029628276825,
0.2691468298435211,
-0.22302863001823425,
0.47724026441574097,
0.0946432501077652,
-0.26175594329833984,
-0.14183057844638824,
0.14596162736415863,
-0.05247964709997177,
0.08035877346992493,
0.12907245755195618,
0.10896319895982742,
0.155273899435997,
0.1237398311495781,
-0.03416873887181282,
-0.21040265262126923,
-0.006195269525051117,
-0.07923328876495361,
-0.21703337132930756,
-0.12899580597877502,
-0.23575806617736816,
-0.3012303113937378,
-0.034785594791173935,
0.20605573058128357,
0.15104235708713531,
-0.25052204728126526,
-0.017476029694080353,
-0.29722705483436584,
-0.08112110942602158,
-0.2808280885219574,
0.01585644856095314,
-0.2527009844779968,
-0.028800012543797493,
-0.20559759438037872,
0.2664682865142822,
-0.048344746232032776,
0.20393575727939606,
-0.12877371907234192,
0.254341721534729,
-0.020694784820079803,
-0.17077292501926422,
-0.08475670218467712,
-0.35474851727485657,
-0.01726892590522766,
0.000033117830753326416,
-0.08897978067398071,
-0.16864533722400665,
0.028407994657754898,
0.19030924141407013,
0.1193574070930481,
0.19119380414485931,
0.18629078567028046,
0.0264289453625679,
0.05071092024445534,
-0.04057857021689415,
0.023397518321871758,
0.5298606157302856,
0.17316444218158722,
-0.31073376536369324,
-0.13184967637062073,
0.11106114834547043,
-0.07904870808124542,
0.2198052555322647,
0.05134076252579689,
0.20726311206817627,
-0.07589314877986908,
0.0197195652872324,
0.05369684472680092,
0.6975785493850708,
0.13146843016147614,
0.13622155785560608,
0.2533486485481262,
0.0007876195013523102,
0.17083346843719482,
0.06756940484046936,
-0.14764857292175293,
0.2677384614944458,
0.2596719264984131,
-0.05399530753493309,
0.008357495069503784,
-0.02717316523194313,
-0.09552063047885895,
-0.05771351605653763,
-0.01725367084145546,
-0.354337215423584,
-0.10730879008769989,
0.08337048441171646,
0.11713182181119919,
0.17799973487854004,
-0.23112082481384277,
-0.04812212288379669,
-0.07099348306655884,
0.19121402502059937,
-0.12430311739444733,
0.19546616077423096,
0.05395922437310219,
-0.1862865835428238,
0.04262809082865715,
-0.201338529586792,
-0.2867482304573059,
0.5665992498397827,
-0.236221045255661,
0.3364364504814148,
0.12329183518886566,
-0.23870083689689636,
0.3596875071525574,
-0.04219241067767143,
0.8421754837036133,
0.21829092502593994,
-0.38789743185043335,
0.03021642193198204,
-0.24454529583454132,
-0.20455202460289001,
-0.2557585537433624,
-0.09200413525104523,
0.06437301635742188,
0.4432879090309143,
0.07077621668577194,
-0.07693418860435486,
-0.4490654468536377,
0.04916883260011673,
-0.3924010097980499,
-0.07729442417621613,
-0.5353498458862305,
-0.4938820004463196,
-0.05307210981845856,
0.017241688445210457,
0.48457786440849304,
0.06778223067522049,
0.03892848268151283,
-0.16115471720695496,
0.1267104148864746,
-0.12126190960407257,
-0.04550065100193024,
0.1746859848499298,
0.07393008470535278,
-0.0443987213075161,
0.11971724033355713,
0.01808881014585495,
0.4223039448261261,
0.15653951466083527,
0.21899454295635223,
0.03787478804588318,
-0.022621657699346542,
-0.006064355373382568,
0.01647040992975235,
0.17639027535915375,
0.32044517993927,
0.1343383491039276,
0.13142281770706177,
0.416190505027771,
-0.12588445842266083,
0.21057917177677155,
0.008429666981101036,
-0.11008644849061966,
0.16865596175193787,
0.41610488295555115,
-0.20922105014324188,
-0.3262518346309662,
0.4029557406902313,
-0.12353137135505676,
-0.2513357400894165,
0.10475115478038788,
0.30495959520339966,
-0.12795302271842957,
0.430569589138031,
0.06689045578241348,
0.4980148673057556,
-0.1489194929599762,
-0.12319506704807281,
-0.07961974292993546,
-0.17868241667747498,
0.2367231398820877,
-0.4622827172279358,
0.5194932818412781,
-0.4192163348197937,
0.05769166350364685,
0.10845153033733368,
-0.09026427567005157,
0.3315911591053009,
0.1235208511352539,
0.03554239496588707,
0.3636598289012909,
0.12444531917572021,
-0.30897241830825806,
-0.1848120391368866,
0.07113185524940491,
0.2975848615169525,
-0.1192498654127121,
0.19854113459587097,
0.09597927331924438,
0.23270568251609802,
0.11830958724021912,
0.05488922446966171,
0.060819339007139206,
0.015446033328771591,
0.13194596767425537,
-0.14148443937301636,
-0.0269408468157053,
-0.06063386797904968,
-0.0506511926651001,
0.21435444056987762,
0.06399036943912506,
0.12827394902706146,
-0.3524123728275299,
0.15537914633750916,
-0.35753577947616577,
-0.04656573385000229,
0.12465758621692657,
0.17235824465751648,
-0.11127122491598129,
-0.08060285449028015,
-0.6433082818984985,
0.1280803084373474,
0.05802161991596222,
-0.5229924917221069,
0.14243090152740479,
0.3066647946834564,
-0.49805009365081787,
-0.5040863156318665,
0.27809029817581177,
-0.1554774045944214,
0.24599908292293549,
-0.24806806445121765,
0.13068798184394836,
0.16494476795196533,
0.08423341810703278,
0.09108704328536987,
0.12033287435770035,
-0.5060520172119141,
0.6658601760864258,
-0.3599255383014679,
-0.06286784261465073,
-0.08247661590576172,
0.2532036602497101,
0.2448248565196991,
-0.3605097234249115,
-0.04223521798849106,
0.1910829097032547,
-0.04405719414353371,
-0.03257126361131668,
-0.6529909372329712,
0.3810613751411438,
0.23824194073677063,
-0.19490273296833038,
0.03384195268154144,
-0.07673002779483795,
0.411210298538208,
-0.16379626095294952,
0.05336249992251396,
0.0258282832801342,
-0.34374886751174927,
0.038033246994018555,
0.07696663588285446,
-0.10927732288837433,
-0.15745852887630463,
0.1755807101726532,
0.27530747652053833,
0.043802231550216675,
0.20686958730220795,
0.14869628846645355,
-0.29214680194854736,
0.10727609694004059,
-0.09829383343458176,
0.10544954240322113,
-0.10013074427843094,
0.05595247447490692,
-0.06222967058420181,
0.19480247795581818,
0.1063629537820816,
-0.04138559103012085,
-0.09347913414239883,
-0.2203664481639862,
0.1836937814950943,
0.11029476672410965,
0.11323875188827515,
0.28951495885849,
-0.238406240940094,
-0.10317115485668182,
-0.22478485107421875,
-0.0959305614233017,
0.08313898742198944,
0.25705260038375854,
-0.20136858522891998,
0.06233803555369377,
0.09815692901611328,
-0.526098370552063,
0.011988144367933273,
0.295280396938324,
0.19295887649059296,
-0.03559628129005432,
0.2103414386510849,
0.2793385982513428,
-0.2812587022781372,
0.009821496903896332,
-0.2196435034275055,
0.08653046190738678,
0.3705272674560547,
0.0315658301115036,
-0.15870079398155212,
-0.0499521866440773,
-0.24209026992321014,
-0.10138416290283203,
0.321562796831131,
0.2455044686794281,
0.07950279861688614,
-0.12238047271966934,
0.009615892544388771,
0.23746809363365173,
-0.16503025591373444,
0.015895595774054527,
0.5035724639892578,
0.03399478644132614,
0.3539348542690277,
0.4206201732158661,
0.4881944954395294,
0.32820287346839905,
0.13543374836444855,
0.04110250622034073,
0.24914436042308807,
0.4913862943649292,
-0.04007367044687271,
-0.5691341161727905,
0.29425835609436035,
0.0662095695734024,
0.34086713194847107,
0.11685667932033539,
0.08819209784269333,
0.4867119789123535,
-0.24681341648101807,
0.3502286672592163,
-0.15049424767494202,
-0.12724800407886505,
-0.01055096834897995,
-0.30912378430366516,
0.3900471031665802,
0.04493234306573868,
-0.3022606372833252,
0.09468154609203339,
-0.3038518726825714,
0.21507763862609863,
-0.04049156606197357,
-0.3971109092235565,
-0.13907532393932343,
0.2706245481967926,
-0.1249965950846672,
-0.11024866998195648,
0.08230013400316238,
-0.11175110191106796,
0.01530861109495163,
-0.10529273748397827,
0.23127806186676025,
-0.08820925652980804,
0.2270408570766449,
-0.09864813089370728,
0.07115721702575684,
0.14614799618721008,
-0.30680808424949646,
0.4068566560745239,
0.2711825966835022,
0.05646907910704613,
0.009717108681797981,
-0.019371815025806427,
-0.2225952446460724,
0.2138448804616928,
0.1511877328157425,
0.22169871628284454,
0.30875906348228455,
-0.1806497424840927,
0.1540858894586563,
0.12188810110092163,
0.10156621038913727,
0.04943583905696869,
-0.1080872118473053,
0.06049678474664688,
-0.2652525007724762,
0.1199260801076889,
0.1024804338812828,
-0.06844500452280045,
-0.19326043128967285,
0.009518932551145554,
0.2584335207939148,
-0.3166433274745941,
-0.21398693323135376,
-0.4179518222808838,
0.04194113612174988,
-0.09507554769515991,
0.12031903862953186,
-0.6548584699630737,
0.05200187489390373,
0.3240507245063782,
-0.48739296197891235,
-0.062807098031044,
0.026692338287830353,
0.05246035009622574,
0.07945190370082855,
0.43484601378440857,
0.055313631892204285,
0.39306509494781494,
-0.28936734795570374,
-0.09170684218406677,
-0.253784716129303,
0.3064920902252197,
-0.06934064626693726,
0.17635390162467957,
-0.052915189415216446,
0.637127161026001,
0.01012149453163147,
-0.17027609050273895,
0.5208978056907654,
0.11620897054672241,
0.38640865683555603,
0.7464050054550171,
-0.06720159202814102,
0.2731581926345825,
-0.4596121907234192,
-0.04800549894571304,
0.28861671686172485,
0.024658359587192535,
0.30681881308555603,
-0.16451071202754974,
-0.039360564202070236,
-0.145372673869133,
0.2365589141845703,
0.2948298156261444,
-0.29628288745880127,
0.2896440625190735,
0.030279189348220825,
0.15530593693256378,
0.023152150213718414,
0.09744241088628769,
-0.1659277081489563,
0.1874840408563614,
-0.3673632740974426,
-0.20621421933174133,
-0.08448845148086548,
-0.18201372027397156,
-0.07219231873750687,
-0.5955886244773865,
-0.022708486765623093,
0.5530236959457397,
0.0709100142121315,
-0.47466421127319336,
0.16445796191692352,
0.06707105785608292,
-0.20431455969810486,
0.036959487944841385,
0.22557106614112854,
0.23574984073638916,
0.08627377450466156,
0.19621379673480988,
-0.35282808542251587,
0.0705571249127388,
0.26325729489326477,
-0.309673011302948,
-0.2725628912448883,
-0.8352375626564026,
0.3712136447429657,
0.24404454231262207,
0.21860338747501373,
-0.45388856530189514,
-0.17797011137008667,
0.11493363976478577,
0.28586339950561523,
-0.11780963838100433,
0.2676754891872406,
-0.1329445093870163,
-0.21751408278942108,
-0.1605263203382492,
-0.6138291358947754,
0.1385793536901474,
0.10642582178115845,
-0.021187547594308853,
-0.18546342849731445
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | > Have you tried passing `gpu=-1` and check if there is a speedup?
yes, there is a speed up using GPU compared with CPU. | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 24 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
> Have you tried passing `gpu=-1` and check if there is a speedup?
yes, there is a speed up using GPU compared with CPU. | [
-0.20230837166309357,
-0.5759716033935547,
-0.18073216080665588,
0.09722200036048889,
-0.2973669171333313,
-0.024588190019130707,
0.09971855580806732,
0.17794236540794373,
0.5709666609764099,
0.04531220346689224,
-0.3375532627105713,
-0.08671995252370834,
0.49778708815574646,
-0.10236550867557526,
-0.22784942388534546,
-0.12958312034606934,
0.3298743963241577,
-0.2193737030029297,
0.015024963766336441,
-0.09017777442932129,
-0.3818136155605316,
0.12388519942760468,
-0.31246858835220337,
-0.11193627119064331,
-0.265945166349411,
0.14620472490787506,
-0.09748782962560654,
0.01263631135225296,
0.13421250879764557,
-0.22863784432411194,
-0.3720502257347107,
0.1280740350484848,
-0.005236741155385971,
0.47049155831336975,
-0.00011105516750831157,
-0.18418709933757782,
-0.0160105898976326,
0.05591671168804169,
0.1565009504556656,
0.2961774468421936,
-0.024111326783895493,
0.18360653519630432,
-0.009455000050365925,
-0.06529012322425842,
-0.5285171270370483,
-0.057807933539152145,
0.0428813137114048,
-0.5328443050384521,
-0.10189475119113922,
0.051065050065517426,
0.1884346753358841,
-0.01497583743184805,
0.1275104582309723,
-0.1857355386018753,
-0.06874298304319382,
-0.30136221647262573,
-0.09109184145927429,
-0.07651752233505249,
0.4368281364440918,
0.0006483457982540131,
0.032863929867744446,
0.5015986561775208,
0.1417362242937088,
0.05875357240438461,
-0.1756802499294281,
0.10875387489795685,
0.22727856040000916,
-0.23284879326820374,
0.14597074687480927,
-0.07437067478895187,
-0.21114906668663025,
-0.020246654748916626,
-0.2413577288389206,
-0.28820979595184326,
-0.17413946986198425,
-0.03700651600956917,
-0.07214171439409256,
0.10304374247789383,
-0.23604446649551392,
-0.06358610093593597,
0.180348739027977,
-0.20669499039649963,
0.07622204720973969,
-0.12126129865646362,
0.18100853264331818,
0.47336745262145996,
0.03898519277572632,
0.15217077732086182,
0.29356223344802856,
0.1608777940273285,
-0.39387840032577515,
-0.17005132138729095,
0.3283340334892273,
0.026776589453220367,
-1.0029003620147705,
0.19499360024929047,
0.14522632956504822,
-0.2683849036693573,
0.028303321450948715,
-0.05738254636526108,
-0.24388419091701508,
0.21732819080352783,
0.10702890902757645,
0.08734051883220673,
-0.11038215458393097,
-0.052350662648677826,
-0.1744166910648346,
-0.18583153188228607,
-0.12617935240268707,
-0.11942894011735916,
-0.0762285441160202,
-0.061415016651153564,
0.10481241345405579,
-0.2957581877708435,
-0.6788694858551025,
-0.12071733921766281,
0.09130565822124481,
-0.0028483085334300995,
-0.10693614929914474,
-0.19663845002651215,
0.023588135838508606,
-0.2708298861980438,
0.15944719314575195,
0.4717584252357483,
0.050350122153759,
0.027658406645059586,
-0.14331457018852234,
0.03175851330161095,
-0.27368947863578796,
-0.14291076362133026,
-0.14741921424865723,
-0.09003929793834686,
-0.0582529716193676,
0.2881704568862915,
0.0965961366891861,
-0.2545439600944519,
-0.06262028217315674,
0.14777158200740814,
0.15962648391723633,
0.029815301299095154,
0.1946570724248886,
-0.42198291420936584,
0.20967477560043335,
0.1220732182264328,
0.2024594098329544,
-0.02445899322628975,
0.041697755455970764,
0.29958605766296387,
-0.1816575825214386,
0.19504213333129883,
-0.1346120536327362,
-0.024422824382781982,
0.13025307655334473,
0.13984063267707825,
0.21671806275844574,
-0.19490239024162292,
-0.08349592238664627,
0.590104877948761,
-0.05517067760229111,
0.32572391629219055,
0.17972609400749207,
0.049600325524806976,
-0.06355244666337967,
-0.18663504719734192,
0.4272245466709137,
0.15725573897361755,
0.009221889078617096,
-0.03390827775001526,
0.3052203357219696,
-0.06243964657187462,
0.026092253625392914,
0.6943666934967041,
0.05906610190868378,
-0.09332961589097977,
-0.16621071100234985,
0.4435821771621704,
0.2809523046016693,
-0.424498975276947,
0.1115570068359375,
-0.10731054842472076,
-0.0679035633802414,
0.054213009774684906,
0.2941126525402069,
0.04881652817130089,
0.004505698103457689,
0.1634175181388855,
0.30254504084587097,
0.4075927734375,
-0.001744348555803299,
0.13435602188110352,
-0.32478293776512146,
-0.011410308070480824,
0.16621160507202148,
0.26416656374931335,
0.04127882421016693,
-0.1535969078540802,
-0.1394306719303131,
-0.934724748134613,
0.36624905467033386,
-0.1717890053987503,
0.03121183253824711,
-0.11709214746952057,
0.4834527373313904,
0.28440073132514954,
0.314717561006546,
0.1813598871231079,
0.24214941263198853,
0.28945571184158325,
-0.2143484652042389,
0.15139520168304443,
0.17224961519241333,
-0.18459104001522064,
0.4322090148925781,
-0.17459137737751007,
-0.2625250220298767,
-0.00024531036615371704,
0.10263754427433014,
0.008631333708763123,
0.07645283639431,
-0.09273333847522736,
-0.19216586649417877,
0.24350138008594513,
-0.00002282857894897461,
-0.04282229766249657,
-0.23715196549892426,
0.14691025018692017,
-0.2187294363975525,
-0.0877709910273552,
-0.33154767751693726,
-0.12487304955720901,
0.2658323347568512,
-0.2793029546737671,
0.011728586629033089,
0.2678190767765045,
0.17592765390872955,
-0.17326177656650543,
0.5698938369750977,
0.13502436876296997,
0.0769047960639,
0.0440208800137043,
0.0742001011967659,
0.11326046288013458,
0.07786659151315689,
-0.1564217209815979,
-0.04506658762693405,
0.31022948026657104,
0.1774885058403015,
0.3103116452693939,
0.02338612824678421,
-0.28352105617523193,
0.18146583437919617,
0.05746560916304588,
0.21182994544506073,
0.2017725110054016,
0.09331810474395752,
-0.041580915451049805,
0.05690902844071388,
-0.05355709791183472,
-0.6947147846221924,
0.463024765253067,
0.07834690809249878,
0.10448162257671356,
0.05191905051469803,
-0.10016483813524246,
0.012270316481590271,
-0.05783601105213165,
-0.03316788375377655,
-0.3682400584220886,
0.18036755919456482,
0.300723135471344,
0.113739974796772,
-0.07477085292339325,
-0.05244867876172066,
-0.11995606124401093,
0.08399517834186554,
0.032824523746967316,
-0.015759093686938286,
0.025497060269117355,
-0.1669447422027588,
-0.1857147514820099,
-0.033900775015354156,
-0.27209314703941345,
0.10280103236436844,
-0.05369191616773605,
-0.15915635228157043,
-0.03400915116071701,
0.18604640662670135,
-0.15371549129486084,
-0.2213173806667328,
-0.03243326395750046,
-0.07870543003082275,
0.0749984085559845,
0.18581782281398773,
0.09908413887023926,
-0.0023875758051872253,
0.2537166178226471,
-0.1947266310453415,
0.46989765763282776,
0.060240648686885834,
-0.2506473958492279,
-0.22345803678035736,
0.11261538416147232,
-0.03130020201206207,
0.0836261510848999,
0.15670783817768097,
0.18120193481445312,
0.16994352638721466,
0.119939886033535,
-0.044246017932891846,
-0.21381081640720367,
-0.052671417593955994,
-0.18547281622886658,
-0.12226340174674988,
-0.0827515572309494,
-0.25305861234664917,
-0.29202163219451904,
0.008435063064098358,
0.1795639842748642,
0.2165868878364563,
-0.31033656001091003,
-0.0546618327498436,
-0.3543877601623535,
-0.11284850537776947,
-0.2358817756175995,
0.04659687355160713,
-0.2785422205924988,
-0.05805933475494385,
-0.2705119252204895,
0.2592288851737976,
0.0028022974729537964,
0.15684551000595093,
-0.2259933203458786,
0.24859291315078735,
0.06435712426900864,
-0.11638256162405014,
0.05998215079307556,
-0.3069593906402588,
-0.05040110647678375,
-0.03842414543032646,
-0.07540387660264969,
-0.23086540400981903,
0.0016185007989406586,
0.21430718898773193,
0.1735973358154297,
0.16754676401615143,
0.29927921295166016,
0.06667988747358322,
-0.06755425035953522,
-0.021310852840542793,
0.02845424972474575,
0.4567564129829407,
0.1189805418252945,
-0.3090515732765198,
-0.19023852050304413,
0.16097724437713623,
-0.11312420666217804,
0.17069216072559357,
0.015680326148867607,
0.15808649361133575,
-0.02405671775341034,
0.039253927767276764,
0.12984693050384521,
0.7589044570922852,
0.1440383344888687,
0.16380083560943604,
0.1753760278224945,
0.029716957360506058,
0.06962123513221741,
-0.05225091427564621,
-0.1431451290845871,
0.23481029272079468,
0.1632125973701477,
0.02456367015838623,
-0.032294318079948425,
-0.046233877539634705,
-0.11115983873605728,
-0.059942565858364105,
0.0009813383221626282,
-0.23513558506965637,
-0.09732015430927277,
0.1595420092344284,
0.1633596420288086,
0.2042173445224762,
-0.23920395970344543,
-0.037731848657131195,
-0.15664392709732056,
0.1686953604221344,
-0.08501781523227692,
0.2079630196094513,
-0.02509079873561859,
-0.26989981532096863,
-0.05244174972176552,
-0.13992524147033691,
-0.49551278352737427,
0.5105011463165283,
-0.21762186288833618,
0.2841084897518158,
0.1479332447052002,
-0.21916276216506958,
0.39214611053466797,
-0.06591972708702087,
0.6891953349113464,
0.21603655815124512,
-0.4309613108634949,
0.08320339024066925,
-0.43806973099708557,
-0.1998281478881836,
-0.20192767679691315,
-0.12604884803295135,
-0.03202349692583084,
0.455869197845459,
0.21177124977111816,
-0.10261673480272293,
-0.5335346460342407,
0.005972210317850113,
-0.4140227138996124,
0.02817988023161888,
-0.3679385483264923,
-0.47729727625846863,
-0.04653213918209076,
0.03243959695100784,
0.5037788152694702,
-0.009570769034326077,
0.08250385522842407,
-0.12043073773384094,
0.10059595108032227,
-0.16626404225826263,
-0.01134214922785759,
0.11532332748174667,
0.08639433979988098,
0.008509171195328236,
0.04204758629202843,
0.16599567234516144,
0.34277647733688354,
0.10237415134906769,
0.1744467318058014,
0.03968031704425812,
0.035912591964006424,
-0.030734851956367493,
-0.03896261751651764,
0.16711360216140747,
0.24476894736289978,
0.14441636204719543,
0.12869149446487427,
0.4931853115558624,
-0.1717202365398407,
0.3368314504623413,
-0.05314162001013756,
-0.120225690305233,
0.18417583405971527,
0.3762620687484741,
-0.22883273661136627,
-0.2893630564212799,
0.3358749449253082,
-0.05501999333500862,
-0.18733714520931244,
0.07017195969820023,
0.23180562257766724,
-0.08549652993679047,
0.4248198866844177,
0.08595947921276093,
0.44544580578804016,
-0.26299840211868286,
-0.07111205160617828,
-0.07778741419315338,
-0.27174684405326843,
0.22074024379253387,
-0.4322560429573059,
0.4459732174873352,
-0.3241000473499298,
-0.047683533281087875,
0.17815515398979187,
-0.04378526657819748,
0.3697202801704407,
0.016850784420967102,
-0.025980716571211815,
0.3121142089366913,
0.15935786068439484,
-0.3362812101840973,
-0.21560697257518768,
0.2085452675819397,
0.34633901715278625,
-0.22067387402057648,
0.11410538852214813,
0.13059796392917633,
0.23963287472724915,
0.05233537033200264,
0.09884848445653915,
0.0965968519449234,
-0.053424715995788574,
0.1543010026216507,
-0.13753089308738708,
-0.03909037262201309,
-0.022320860996842384,
0.019444815814495087,
0.1586543768644333,
-0.033401839435100555,
0.23046249151229858,
-0.3916483223438263,
0.11054582893848419,
-0.41553574800491333,
-0.06851230561733246,
0.1742398887872696,
0.05517848953604698,
-0.039135776460170746,
0.04799864813685417,
-0.6507716774940491,
0.08173473924398422,
0.022500209510326385,
-0.5665799379348755,
0.1487356722354889,
0.2564300298690796,
-0.4872550964355469,
-0.4135950803756714,
0.279262900352478,
-0.2164854258298874,
0.2825065851211548,
-0.2142498642206192,
0.12528324127197266,
0.05512375757098198,
-0.002509593963623047,
0.13360485434532166,
0.16507267951965332,
-0.42186999320983887,
0.6790922284126282,
-0.24464426934719086,
-0.14849671721458435,
-0.12295372784137726,
0.34506773948669434,
0.25233209133148193,
-0.3186018168926239,
-0.09226912260055542,
0.1626340001821518,
-0.12443218380212784,
-0.02266533300280571,
-0.6442972421646118,
0.2978483736515045,
0.2139720320701599,
-0.15697382390499115,
0.0518467091023922,
-0.13392549753189087,
0.4386710822582245,
-0.2027696669101715,
0.03303533419966698,
-0.010882996022701263,
-0.3306826949119568,
0.13577866554260254,
0.08117934316396713,
-0.07326655089855194,
-0.15755131840705872,
0.1828882098197937,
0.20639222860336304,
0.022038424387574196,
0.17049062252044678,
0.12137527018785477,
-0.3075356185436249,
0.07992961257696152,
-0.1332586705684662,
0.10396987944841385,
-0.10085050761699677,
-0.07884762436151505,
0.0030136241111904383,
0.20235680043697357,
0.15295274555683136,
-0.023409005254507065,
-0.03882850706577301,
-0.24195706844329834,
0.18132120370864868,
0.0775604173541069,
0.02518882416188717,
0.12237656861543655,
-0.19087529182434082,
-0.06734657287597656,
-0.24308431148529053,
-0.12981808185577393,
0.09006251394748688,
0.2179681956768036,
-0.21950392425060272,
-0.007731659337878227,
0.0014950744807720184,
-0.5715421438217163,
0.09299585223197937,
0.285880982875824,
0.14777466654777527,
-0.0568680465221405,
0.14802135527133942,
0.27779144048690796,
-0.30569279193878174,
-0.01664743572473526,
-0.14733825623989105,
0.11327538639307022,
0.2986234724521637,
0.03557060658931732,
-0.12978291511535645,
-0.029651254415512085,
-0.24789267778396606,
-0.1197691261768341,
0.3237859308719635,
0.24391672015190125,
0.11509976536035538,
-0.10244087129831314,
0.05741868540644646,
0.24998855590820312,
-0.18403777480125427,
-0.11856313794851303,
0.4261561930179596,
-0.06804940849542618,
0.42583367228507996,
0.34784072637557983,
0.5558278560638428,
0.3967985510826111,
0.11455023288726807,
-0.018243972212076187,
0.2603466212749481,
0.3969847559928894,
-0.06574937701225281,
-0.6743465662002563,
0.3039207458496094,
-0.02563105896115303,
0.30717745423316956,
0.1291106939315796,
0.08530386537313461,
0.5358420610427856,
-0.19872000813484192,
0.32785674929618835,
-0.07312732189893723,
0.10793480277061462,
-0.15634438395500183,
-0.21175459027290344,
0.388280987739563,
0.11920353770256042,
-0.36785292625427246,
0.07506610453128815,
-0.28875160217285156,
0.16022835671901703,
-0.035371292382478714,
-0.39679864048957825,
-0.08407428860664368,
0.2660449743270874,
-0.12060517817735672,
-0.18214023113250732,
0.13869939744472504,
-0.0943642407655716,
0.008420407772064209,
0.019559867680072784,
0.21759647130966187,
-0.013583280146121979,
0.16569751501083374,
-0.07150749862194061,
0.16875724494457245,
0.17418551445007324,
-0.2788510322570801,
0.37968701124191284,
0.33830371499061584,
0.07444947957992554,
-0.047837212681770325,
-0.0686253160238266,
-0.16207292675971985,
0.1686607003211975,
0.20423763990402222,
0.2317170947790146,
0.21171517670154572,
-0.20230822265148163,
0.17767389118671417,
0.06368418037891388,
0.1279485523700714,
0.05100617557764053,
-0.09854385256767273,
0.0734553337097168,
-0.24281267821788788,
0.08649389445781708,
0.11648008227348328,
-0.12901391088962555,
-0.319707989692688,
-0.13154584169387817,
0.18130002915859222,
-0.30866169929504395,
-0.2286902368068695,
-0.39866843819618225,
-0.013253767043352127,
-0.057599179446697235,
0.12913742661476135,
-0.5354644060134888,
-0.04278874769806862,
0.28648391366004944,
-0.4410451054573059,
-0.06359107047319412,
0.023579206317663193,
0.08245518803596497,
0.06039810553193092,
0.5275937914848328,
0.0030059814453125,
0.363711953163147,
-0.2737888991832733,
-0.15929779410362244,
-0.13471189141273499,
0.117549367249012,
-0.12351025640964508,
0.19616937637329102,
-0.013835223391652107,
0.6668609976768494,
-0.06628664582967758,
-0.1738227754831314,
0.5958325862884521,
0.09526557475328445,
0.4479910135269165,
0.636093258857727,
-0.088130883872509,
0.35397592186927795,
-0.4596608281135559,
-0.1145796924829483,
0.28747355937957764,
-0.004322126507759094,
0.30170533061027527,
-0.1303674429655075,
0.012901458889245987,
-0.1308566778898239,
0.24752041697502136,
0.2847333252429962,
-0.22997960448265076,
0.3069194555282593,
0.019143804907798767,
0.18883071839809418,
0.07227249443531036,
0.03802712261676788,
-0.12860733270645142,
0.16248255968093872,
-0.3109245002269745,
-0.18829071521759033,
-0.026673801243305206,
-0.1855478435754776,
0.022071192041039467,
-0.598103404045105,
0.013715584762394428,
0.6468421816825867,
0.07813575863838196,
-0.4319937229156494,
0.1479402631521225,
0.05475582182407379,
-0.10499949753284454,
0.0820828229188919,
0.1101728081703186,
0.27678415179252625,
0.11119378358125687,
0.11051908135414124,
-0.42728739976882935,
0.09300243109464645,
0.20952025055885315,
-0.20570768415927887,
-0.1721523106098175,
-0.8037074208259583,
0.37953153252601624,
0.19548271596431732,
0.27763643860816956,
-0.4286734461784363,
-0.2651166617870331,
0.0627746731042862,
0.2458183467388153,
-0.14840912818908691,
0.28407543897628784,
-0.1412087231874466,
-0.21704427897930145,
-0.14633086323738098,
-0.576934814453125,
0.07172819972038269,
0.11255885660648346,
-0.12303610146045685,
-0.09897314012050629
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | When passing `device=-1`, ALL existing GPUs are used (multi GPU): this is the maximum speedup you can get. To know the number of total GPUs:
```
import faiss
ngpus = faiss.get_num_gpus()
print(ngpus)
```
When passing a list of integers to `device`, then only that number of GPUs are used (multi GPU as well)
- the speedup should be proportional (more or less) to the ratio of the number of elements passed to `device` over `ngpus`
- if this is not the case, then there is an issue in the implementation of this use case (however, I have reviewed the code and in principle I can't find any evident bug)
When passing a positive integer to `device`, then only a single GPU is used.
- this time should be more or less proportional to the time when passing `device=-1` over `ngpus` | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 140 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
When passing `device=-1`, ALL existing GPUs are used (multi GPU): this is the maximum speedup you can get. To know the number of total GPUs:
```
import faiss
ngpus = faiss.get_num_gpus()
print(ngpus)
```
When passing a list of integers to `device`, then only that number of GPUs are used (multi GPU as well)
- the speedup should be proportional (more or less) to the ratio of the number of elements passed to `device` over `ngpus`
- if this is not the case, then there is an issue in the implementation of this use case (however, I have reviewed the code and in principle I can't find any evident bug)
When passing a positive integer to `device`, then only a single GPU is used.
- this time should be more or less proportional to the time when passing `device=-1` over `ngpus` | [
-0.13285492360591888,
-0.6349003911018372,
-0.15890169143676758,
0.10762965679168701,
-0.38746023178100586,
-0.0066644251346588135,
0.14906999468803406,
-0.014693211764097214,
0.5617420077323914,
0.03745792806148529,
-0.1784658432006836,
-0.2431056946516037,
0.5187183022499084,
-0.18129047751426697,
-0.0813622698187828,
-0.037685319781303406,
0.4531453847885132,
-0.28451621532440186,
0.13586115837097168,
-0.19306142628192902,
-0.5939656496047974,
0.21014460921287537,
-0.3128434419631958,
-0.14063221216201782,
-0.15373925864696503,
0.2013477087020874,
-0.1606854796409607,
-0.07868792861700058,
0.03575288504362106,
-0.26384294033050537,
-0.3593493103981018,
0.17045548558235168,
0.09640064835548401,
0.3845742344856262,
-0.00012681484804488719,
-0.20022819936275482,
-0.06137222796678543,
0.03556746989488602,
0.11350639164447784,
0.33006274700164795,
-0.04641110450029373,
0.15671953558921814,
0.04204796999692917,
-0.04746287316083908,
-0.38473981618881226,
-0.16556276381015778,
0.10795540362596512,
-0.5799905061721802,
-0.1683645397424698,
0.03074478730559349,
0.04213099926710129,
-0.20125062763690948,
0.040852468460798264,
-0.1612311452627182,
-0.07422793656587601,
-0.35633784532546997,
-0.02167452871799469,
-0.09490978717803955,
0.5138498544692993,
-0.05879262089729309,
0.09336122870445251,
0.41329702734947205,
0.0938684344291687,
0.055597081780433655,
-0.12453434616327286,
0.049724455922842026,
0.44622114300727844,
-0.3640487492084503,
0.11022377759218216,
-0.20184198021888733,
-0.17850255966186523,
-0.06705661863088608,
-0.29749196767807007,
-0.4005417823791504,
-0.22047802805900574,
-0.055834896862506866,
-0.21243757009506226,
0.011429639533162117,
-0.2496381253004074,
-0.18125157058238983,
0.25434610247612,
-0.20406951010227203,
0.09871770441532135,
0.003139704465866089,
0.22495970129966736,
0.5776185989379883,
0.10341925919055939,
0.27539873123168945,
0.24259085953235626,
0.17210422456264496,
-0.3096940219402313,
-0.2715896964073181,
0.3332311511039734,
0.1499156504869461,
-0.9261051416397095,
0.24519604444503784,
0.22698956727981567,
-0.3433282971382141,
0.07399345189332962,
-0.051446616649627686,
-0.34219610691070557,
0.07235963642597198,
0.09204413741827011,
0.15823346376419067,
0.019062086939811707,
-0.06964188814163208,
-0.08576647192239761,
-0.23910216987133026,
-0.29502272605895996,
-0.24392010271549225,
0.094967782497406,
0.031576018780469894,
0.11363063752651215,
-0.2135074883699417,
-0.6793352365493774,
-0.10437127202749252,
0.03615038841962814,
0.11519940197467804,
-0.15353775024414062,
-0.1305975466966629,
-0.05906056985259056,
-0.2124897986650467,
0.19755752384662628,
0.2955751121044159,
0.0917360857129097,
0.1379164159297943,
-0.13550245761871338,
0.09287437796592712,
-0.3015918731689453,
-0.1240125522017479,
-0.08000452816486359,
-0.2251414656639099,
-0.09125722944736481,
0.23819641768932343,
-0.03367554396390915,
-0.12609902024269104,
-0.08835335075855255,
0.08907803148031235,
0.14676624536514282,
0.1330193728208542,
0.24266895651817322,
-0.3814963698387146,
0.36528539657592773,
0.22052375972270966,
0.22022435069084167,
0.09966116398572922,
0.0793200135231018,
0.19927693903446198,
-0.25306329131126404,
0.2684444487094879,
-0.19099214673042297,
-0.02548126131296158,
0.13485822081565857,
0.010451434180140495,
0.289656400680542,
-0.09907327592372894,
-0.14751198887825012,
0.5911998152732849,
-0.016550421714782715,
0.2403694987297058,
0.2506359815597534,
-0.1361701637506485,
-0.04773556813597679,
-0.2520708441734314,
0.37145766615867615,
0.2002802938222885,
0.022844765335321426,
-0.12270836532115936,
0.31270670890808105,
-0.16548661887645721,
0.029680117964744568,
0.5926253199577332,
0.12071921676397324,
-0.10227065533399582,
-0.2325400561094284,
0.5444560647010803,
0.2742619812488556,
-0.43976497650146484,
0.1969360113143921,
-0.13327905535697937,
-0.09622382372617722,
0.05098559707403183,
0.26319417357444763,
0.1828855574131012,
0.0037723947316408157,
0.04712953045964241,
0.31965136528015137,
0.44377243518829346,
-0.0758850947022438,
0.04952585697174072,
-0.12609317898750305,
0.040725983679294586,
0.18651023507118225,
0.08514714241027832,
0.08531211316585541,
-0.05635615438222885,
-0.12550270557403564,
-0.9586488604545593,
0.49981924891471863,
-0.04566311463713646,
0.01526504848152399,
-0.1871260106563568,
0.5774052143096924,
0.41476911306381226,
0.46893370151519775,
0.2651199698448181,
0.06999634951353073,
0.21799412369728088,
-0.2442370057106018,
-0.026805542409420013,
0.2135079950094223,
-0.15250247716903687,
0.4780493378639221,
0.008744955062866211,
-0.19550834596157074,
0.126628115773201,
-0.05843649059534073,
0.0990377813577652,
0.03299221023917198,
-0.18941029906272888,
-0.235613152384758,
0.15956555306911469,
-0.014847896993160248,
-0.009302275255322456,
-0.44587376713752747,
0.08789525181055069,
-0.09279072284698486,
-0.05789455026388168,
-0.4375389814376831,
-0.06188555806875229,
0.3281596899032593,
-0.3264223635196686,
0.09478776156902313,
0.347110778093338,
0.36219823360443115,
-0.27248865365982056,
0.42317938804626465,
0.31991055607795715,
0.03674950823187828,
0.15484163165092468,
0.03120560012757778,
0.19876298308372498,
0.15946026146411896,
-0.20193639397621155,
0.06511916220188141,
0.28286880254745483,
0.10582348704338074,
0.4145797789096832,
-0.02936701290309429,
-0.22836998105049133,
0.13827967643737793,
0.20716425776481628,
0.09623642265796661,
0.20305496454238892,
-0.06538239121437073,
-0.08551722764968872,
0.04084048792719841,
-0.18621958792209625,
-0.6701112985610962,
0.39505186676979065,
-0.13487504422664642,
0.042964156717061996,
0.024385809898376465,
-0.15325000882148743,
0.0009472072124481201,
-0.012374182231724262,
0.04591653123497963,
-0.38370269536972046,
0.18210846185684204,
0.15474781394004822,
0.14261126518249512,
-0.12967410683631897,
-0.015448040328919888,
-0.11770585179328918,
0.12737008929252625,
0.12185612320899963,
-0.15386271476745605,
0.02066800370812416,
-0.24636924266815186,
-0.17703238129615784,
-0.004810389131307602,
-0.2958867847919464,
0.06594713032245636,
-0.1439434438943863,
-0.177250474691391,
0.07877457141876221,
0.34814855456352234,
-0.08057817071676254,
-0.29961931705474854,
-0.20656920969486237,
-0.05447857454419136,
-0.024839093908667564,
0.1947248876094818,
0.08750934898853302,
-0.048968181014060974,
0.17945586144924164,
-0.18275132775306702,
0.559421956539154,
0.031045706942677498,
-0.27034056186676025,
-0.1283448338508606,
0.03781712055206299,
0.00020145252346992493,
-0.04090027138590813,
0.06483952701091766,
0.17848411202430725,
0.036384016275405884,
0.11361321061849594,
-0.11438063532114029,
-0.18709908425807953,
-0.017573047429323196,
-0.1772885024547577,
-0.09878844022750854,
-0.13072192668914795,
-0.155204176902771,
-0.3155602812767029,
-0.031177308410406113,
0.3071901500225067,
0.08221257477998734,
-0.22222216427326202,
0.04103843867778778,
-0.3281809091567993,
-0.06504540145397186,
-0.29416027665138245,
0.024523012340068817,
-0.1994571089744568,
-0.010549316182732582,
-0.07688193023204803,
0.2532733082771301,
0.06183002516627312,
0.198650524020195,
-0.18671588599681854,
0.37243181467056274,
0.014026458375155926,
-0.038121532648801804,
-0.10894040018320084,
-0.32375186681747437,
0.002034764736890793,
-0.006268654018640518,
-0.05720225349068642,
-0.11582615971565247,
0.03516344353556633,
0.20236678421497345,
0.018158772960305214,
0.3270147442817688,
0.2613604664802551,
0.05259793624281883,
0.09139730036258698,
-0.03635003790259361,
0.053260136395692825,
0.5822781920433044,
0.09792093932628632,
-0.250166654586792,
-0.028093362227082253,
0.07818237692117691,
-0.05509403347969055,
0.1542171984910965,
0.09465668350458145,
0.21828360855579376,
0.05785365402698517,
-0.03072105348110199,
-0.06654248386621475,
0.7797684073448181,
0.10219736397266388,
0.06589484959840775,
0.10812505334615707,
0.03684506192803383,
0.04255741462111473,
0.08016517013311386,
-0.056700751185417175,
0.2647722661495209,
0.22497403621673584,
-0.09225771576166153,
0.0018405094742774963,
-0.010024597868323326,
-0.02140446938574314,
0.03914322704076767,
0.17627236247062683,
-0.2667802572250366,
-0.024574097245931625,
0.08817745000123978,
0.1155356913805008,
0.2560996115207672,
-0.26000624895095825,
-0.07698442041873932,
-0.14766474068164825,
0.22954043745994568,
-0.1855120062828064,
0.14501717686653137,
0.05729624256491661,
-0.13414409756660461,
0.030141238123178482,
-0.2197948843240738,
-0.3046632707118988,
0.5240173935890198,
-0.2134396880865097,
0.3507564663887024,
0.1806924045085907,
-0.16234228014945984,
0.4333227872848511,
-0.04948217794299126,
0.8094344735145569,
0.12224914133548737,
-0.36239951848983765,
0.0583500899374485,
-0.24027739465236664,
-0.20789793133735657,
-0.22128310799598694,
-0.15425704419612885,
0.0957530289888382,
0.49102073907852173,
0.06179046630859375,
-0.033638857305049896,
-0.4324150085449219,
-0.08992956578731537,
-0.31823062896728516,
-0.08616860955953598,
-0.3423173427581787,
-0.513626217842102,
-0.11531319469213486,
0.06358212232589722,
0.49535179138183594,
0.11386493593454361,
0.016459612175822258,
-0.05834730714559555,
0.13590984046459198,
-0.17367739975452423,
-0.06865581125020981,
0.0877203643321991,
0.0651673674583435,
-0.06666436791419983,
0.09300411492586136,
-0.019981050863862038,
0.3631995618343353,
0.0545235201716423,
0.2203395813703537,
0.013746067881584167,
-0.06289546191692352,
0.01347188651561737,
-0.023174338042736053,
0.17486929893493652,
0.3421233594417572,
0.16951054334640503,
0.08489903807640076,
0.36519113183021545,
-0.1328754425048828,
0.22470057010650635,
0.0321454182267189,
-0.20472805202007294,
0.2493733912706375,
0.37560781836509705,
-0.18789999186992645,
-0.4212673604488373,
0.4617901146411896,
0.001980753615498543,
-0.3077442944049835,
0.12847889959812164,
0.2505044937133789,
-0.09929317235946655,
0.5237051844596863,
0.17768310010433197,
0.5277581810951233,
-0.16944366693496704,
-0.08681653439998627,
-0.07361145317554474,
-0.23919212818145752,
0.21052180230617523,
-0.4783940315246582,
0.5003217458724976,
-0.3363143503665924,
0.11489968746900558,
0.01586361788213253,
-0.07644826918840408,
0.3738904595375061,
0.1758190095424652,
0.07584850490093231,
0.2929411232471466,
0.06671145558357239,
-0.31734421849250793,
-0.1621929109096527,
0.096083864569664,
0.423675000667572,
-0.09665204584598541,
0.25469934940338135,
-0.009959148243069649,
0.27202677726745605,
0.01124972477555275,
0.07392805069684982,
0.11835590749979019,
0.043202850967645645,
0.09036800265312195,
-0.16163012385368347,
-0.111191526055336,
-0.08913920819759369,
0.01165922824293375,
0.25137442350387573,
0.023588597774505615,
0.05626053735613823,
-0.2928912341594696,
0.12971262633800507,
-0.49778780341148376,
0.031342100352048874,
0.10246853530406952,
0.17002472281455994,
-0.15540599822998047,
-0.08404026180505753,
-0.5835373401641846,
0.11314021050930023,
0.10639224201440811,
-0.37776920199394226,
0.21731507778167725,
0.23361901938915253,
-0.4307406544685364,
-0.5681259632110596,
0.36111724376678467,
-0.17952708899974823,
0.2750563323497772,
-0.20029020309448242,
0.22632348537445068,
0.09604291617870331,
0.05635242536664009,
-0.022000469267368317,
0.1927773654460907,
-0.5316140651702881,
0.7756252288818359,
-0.4403960108757019,
-0.022615987807512283,
-0.027284495532512665,
0.12558361887931824,
0.3754465878009796,
-0.4704589247703552,
-0.13008317351341248,
0.13388295471668243,
-0.04015123471617699,
0.056554779410362244,
-0.7681515216827393,
0.30592724680900574,
0.2844209671020508,
-0.032153062522411346,
-0.02216762863099575,
-0.12958106398582458,
0.36294206976890564,
-0.23836153745651245,
-0.04104604572057724,
0.07951189577579498,
-0.3871884346008301,
0.028053559362888336,
0.1632780283689499,
-0.14124220609664917,
-0.08271940052509308,
0.23964489996433258,
0.25082919001579285,
-0.15796518325805664,
0.17392727732658386,
0.09447253495454788,
-0.1534755676984787,
0.06564068049192429,
-0.08145591616630554,
0.2192925214767456,
-0.15887799859046936,
0.14472931623458862,
-0.14815953373908997,
0.2081448882818222,
-0.026260366663336754,
-0.14857237040996552,
-0.056133680045604706,
-0.07765528559684753,
0.17581072449684143,
0.16683171689510345,
0.11747956275939941,
0.18025410175323486,
-0.23266741633415222,
-0.10978241264820099,
-0.24738210439682007,
-0.06591330468654633,
0.13704314827919006,
0.25442373752593994,
-0.24020515382289886,
-0.0897582545876503,
0.13739770650863647,
-0.39049482345581055,
0.008337363600730896,
0.30515608191490173,
0.28007572889328003,
-0.006454266607761383,
0.226852685213089,
0.3103578984737396,
-0.27656489610671997,
-0.0019388124346733093,
-0.20044440031051636,
0.1621527373790741,
0.3642899990081787,
-0.04520075023174286,
-0.08051929622888565,
-0.08268013596534729,
-0.21801772713661194,
-0.17359288036823273,
0.29017210006713867,
0.35704314708709717,
0.1145414412021637,
-0.16421833634376526,
0.008798500522971153,
0.08423825353384018,
-0.1478024423122406,
-0.058902956545352936,
0.475745290517807,
0.05116276815533638,
0.26194730401039124,
0.47737938165664673,
0.6293209195137024,
0.308561235666275,
0.021504174917936325,
0.0014232005923986435,
0.25365206599235535,
0.4723239541053772,
-0.007797470316290855,
-0.5643161535263062,
0.3490515947341919,
0.09384311735630035,
0.20138105750083923,
0.14362557232379913,
0.11552023887634277,
0.5315263271331787,
-0.24651047587394714,
0.35948407649993896,
0.07993437349796295,
-0.10533493757247925,
-0.10466410964727402,
-0.158431738615036,
0.37766894698143005,
0.15600132942199707,
-0.3245062232017517,
0.1609591841697693,
-0.2045920491218567,
0.037724170833826065,
-0.08222685009241104,
-0.28321728110313416,
-0.05842168629169464,
0.2410551756620407,
-0.08732862025499344,
-0.13120342791080475,
-0.017913827672600746,
-0.041130322962999344,
-0.11287416517734528,
-0.11908408999443054,
0.19815559685230255,
-0.1904629021883011,
0.28364795446395874,
-0.10470296442508698,
0.13864080607891083,
0.1801539808511734,
-0.3007371127605438,
0.341410368680954,
0.30099931359291077,
0.05002855882048607,
-0.07269962131977081,
-0.09047184884548187,
-0.19791796803474426,
0.1577564924955368,
0.18137989938259125,
0.29646334052085876,
0.3686808943748474,
-0.21849513053894043,
0.25264525413513184,
0.09687919914722443,
0.1380002498626709,
0.07045777887105942,
-0.1211661547422409,
-0.047469139099121094,
-0.2791314423084259,
0.08242347836494446,
-0.01446458138525486,
0.02523636445403099,
-0.19801639020442963,
-0.01099330559372902,
0.2010468989610672,
-0.25003892183303833,
-0.11713401228189468,
-0.4433716833591461,
0.0017686262726783752,
-0.05505125969648361,
0.12254923582077026,
-0.5310231447219849,
-0.11886025965213776,
0.31565016508102417,
-0.46242645382881165,
-0.063031867146492,
0.07551788538694382,
-0.02604057639837265,
0.013474436476826668,
0.4221041202545166,
0.007265876978635788,
0.43655067682266235,
-0.20933960378170013,
-0.11656457185745239,
-0.18826431035995483,
0.15005385875701904,
-0.18703076243400574,
0.12183842062950134,
0.07000775635242462,
0.6924421191215515,
-0.12436593323945999,
-0.08322153985500336,
0.5067335367202759,
0.2454407811164856,
0.3692973852157593,
0.8120549917221069,
0.042724188417196274,
0.2861345708370209,
-0.5232606530189514,
-0.020268099382519722,
0.21821367740631104,
0.04621390253305435,
0.19141829013824463,
-0.18304535746574402,
-0.14658451080322266,
-0.13942651450634003,
0.12724170088768005,
0.2891632318496704,
-0.12665905058383942,
0.3609374165534973,
0.04098064452409744,
0.13156986236572266,
0.09139154106378555,
0.07645552605390549,
-0.1369510143995285,
0.23075753450393677,
-0.3617974817752838,
-0.19170105457305908,
-0.12210792303085327,
-0.2662937343120575,
-0.1873912513256073,
-0.5471528172492981,
0.08396254479885101,
0.48363834619522095,
0.09578150510787964,
-0.467600017786026,
0.14806753396987915,
0.11772280186414719,
-0.36014440655708313,
0.11390026658773422,
0.24525363743305206,
0.1921297013759613,
0.1341623067855835,
0.22421106696128845,
-0.3441970944404602,
0.17079859972000122,
0.1386888176202774,
-0.2512127161026001,
-0.1819096803665161,
-0.8872278928756714,
0.29715412855148315,
0.22341322898864746,
0.2823827266693115,
-0.4146200120449066,
-0.23851025104522705,
0.1273520141839981,
0.29466137290000916,
-0.15249431133270264,
0.1757468283176422,
-0.09685303270816803,
-0.2726050913333893,
-0.23534905910491943,
-0.7286117076873779,
0.17428120970726013,
0.08056513220071793,
0.045071449130773544,
-0.21146762371063232
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Thanks for your help!
Have you run the code and replicated the same experimental results (i.e., no speedup while increasing the number of GPUs)? | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 24 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Thanks for your help!
Have you run the code and replicated the same experimental results (i.e., no speedup while increasing the number of GPUs)? | [
-0.164279967546463,
-0.6130456924438477,
-0.15808863937854767,
0.07875458896160126,
-0.4297664165496826,
0.02876034379005432,
0.14976513385772705,
0.01764865592122078,
0.5717771649360657,
0.04981115460395813,
-0.22750075161457062,
-0.20043428242206573,
0.48780810832977295,
-0.1717614084482193,
-0.17343564331531525,
-0.04200831800699234,
0.41790851950645447,
-0.2839362323284149,
0.01570911332964897,
-0.18456043303012848,
-0.46575531363487244,
0.175074964761734,
-0.37846803665161133,
-0.1779194325208664,
-0.1859651505947113,
0.21558795869350433,
-0.2137271612882614,
-0.014442078769207,
0.10892711579799652,
-0.1401674598455429,
-0.37291374802589417,
0.24086643755435944,
0.08432820439338684,
0.41993647813796997,
-0.0001241406425833702,
-0.1883334219455719,
-0.03563555330038071,
0.013952484354376793,
0.24474424123764038,
0.3530413508415222,
-0.10354748368263245,
0.22600415349006653,
-0.0052687134593725204,
0.011558517813682556,
-0.4552702009677887,
-0.04734234884381294,
0.12569022178649902,
-0.6181454658508301,
-0.14304198324680328,
0.023577239364385605,
0.053066592663526535,
-0.15496298670768738,
0.08058899641036987,
-0.14417830109596252,
-0.039639025926589966,
-0.3601704239845276,
-0.02549804374575615,
-0.05604633316397667,
0.4815971255302429,
-0.07836524397134781,
0.02760329097509384,
0.420101135969162,
0.1246252954006195,
0.060547418892383575,
-0.16383978724479675,
0.05509115755558014,
0.33410176634788513,
-0.3106546998023987,
0.10653799027204514,
-0.1517767310142517,
-0.15698784589767456,
-0.021769478917121887,
-0.23357407748699188,
-0.3450252413749695,
-0.1692676991224289,
0.009536171332001686,
-0.11026506870985031,
0.08029591292142868,
-0.2219943106174469,
-0.167845219373703,
0.16853640973567963,
-0.2748471200466156,
0.03580348193645477,
-0.03200981020927429,
0.23115581274032593,
0.5509204864501953,
0.046405766159296036,
0.2139868438243866,
0.3021913170814514,
0.15275877714157104,
-0.3098083436489105,
-0.23225340247154236,
0.2845403850078583,
0.11279518902301788,
-0.9347348213195801,
0.18532177805900574,
0.16267521679401398,
-0.34252724051475525,
0.09097345173358917,
-0.07354363054037094,
-0.2918943166732788,
0.0974547415971756,
0.09789320081472397,
0.15975481271743774,
-0.051673974841833115,
-0.036536283791065216,
-0.05070970207452774,
-0.17177307605743408,
-0.21657197177410126,
-0.22912953794002533,
-0.04758787900209427,
0.047200173139572144,
0.03147292509675026,
-0.2936704456806183,
-0.7087746262550354,
-0.10995324701070786,
-0.009947691112756729,
0.09878693521022797,
-0.08577965945005417,
-0.10164451599121094,
-0.053698137402534485,
-0.2777945101261139,
0.11698662489652634,
0.35328221321105957,
0.04634743556380272,
-0.013893451541662216,
-0.22995971143245697,
0.10259433090686798,
-0.24232205748558044,
-0.06600075215101242,
-0.06767349690198898,
-0.1735665500164032,
-0.07113265991210938,
0.29612910747528076,
0.054061878472566605,
-0.1650077998638153,
-0.08244349807500839,
0.11559838801622391,
0.1404251754283905,
0.07748578488826752,
0.14021159708499908,
-0.36603817343711853,
0.3216192126274109,
0.18030941486358643,
0.1957084834575653,
-0.018909171223640442,
0.04540780559182167,
0.3107055425643921,
-0.23961344361305237,
0.28281667828559875,
-0.2115718424320221,
0.007095906883478165,
0.1352526992559433,
0.017250321805477142,
0.2868735194206238,
-0.23272007703781128,
-0.12810564041137695,
0.6562889814376831,
-0.025777064263820648,
0.2427838146686554,
0.29487451910972595,
-0.07126278430223465,
-0.012247882783412933,
-0.18259990215301514,
0.3666589856147766,
0.2066764235496521,
-0.05393606796860695,
-0.13425152003765106,
0.43337783217430115,
-0.15651899576187134,
0.00481472909450531,
0.5640692114830017,
0.1295219510793686,
-0.15111884474754333,
-0.2330997735261917,
0.585084080696106,
0.2679336667060852,
-0.4015088379383087,
0.20260652899742126,
-0.13796627521514893,
-0.08752764761447906,
0.026992814615368843,
0.2992778718471527,
0.06773610413074493,
-0.009758692234754562,
0.05620914697647095,
0.3050457835197449,
0.4399130940437317,
-0.05495687574148178,
0.038102030754089355,
-0.12104356288909912,
0.03852403163909912,
0.11947590857744217,
0.19568103551864624,
0.11630819737911224,
-0.06986410170793533,
-0.08399827033281326,
-1.0678901672363281,
0.4739207625389099,
-0.03130872920155525,
0.031034521758556366,
-0.11294232308864594,
0.5198619365692139,
0.4341360926628113,
0.4242141842842102,
0.21944910287857056,
0.21731683611869812,
0.20600003004074097,
-0.2529764771461487,
0.005509264767169952,
0.264659583568573,
-0.1126469150185585,
0.5135018825531006,
-0.14410355687141418,
-0.29436343908309937,
0.10959549248218536,
-0.046880487352609634,
0.017602141946554184,
0.027678627520799637,
-0.19352038204669952,
-0.2535858154296875,
0.19704106450080872,
0.019334981217980385,
-0.03420092537999153,
-0.3455408215522766,
0.11056576669216156,
-0.1252450793981552,
-0.0655047819018364,
-0.4089411497116089,
-0.13331708312034607,
0.2528771460056305,
-0.394428014755249,
0.03132287412881851,
0.3607480525970459,
0.25009915232658386,
-0.23232929408550262,
0.49403616786003113,
0.21139919757843018,
0.048284925520420074,
0.10038970410823822,
0.04005357250571251,
0.06086238846182823,
0.05347614362835884,
-0.1848975419998169,
0.04859423264861107,
0.23775872588157654,
0.12320007383823395,
0.35606518387794495,
-0.007062327116727829,
-0.3228203356266022,
0.14474405348300934,
0.10927386581897736,
0.16041377186775208,
0.2279844582080841,
0.005635052919387817,
-0.12019747495651245,
-0.0255757886916399,
-0.21358434855937958,
-0.6531765460968018,
0.3827642500400543,
-0.1255992203950882,
0.06738545000553131,
0.028354670852422714,
-0.12273172289133072,
-0.05238235741853714,
0.035697683691978455,
-0.048301875591278076,
-0.36423027515411377,
0.20060046017169952,
0.21257132291793823,
0.14352218806743622,
-0.07866858690977097,
0.053761664777994156,
-0.10454614460468292,
0.1009315773844719,
0.08922949433326721,
-0.03888152167201042,
0.11231175065040588,
-0.23736028373241425,
-0.13076913356781006,
-0.0363970547914505,
-0.27390754222869873,
0.1064605787396431,
-0.15159845352172852,
-0.17629894614219666,
-0.02317877672612667,
0.335650771856308,
-0.11147627979516983,
-0.28454241156578064,
-0.08184055238962173,
-0.08601225912570953,
0.06571145355701447,
0.18716104328632355,
0.10819995403289795,
-0.0014156363904476166,
0.1935945600271225,
-0.1800903081893921,
0.5867975354194641,
0.09952633082866669,
-0.32039186358451843,
-0.1285475194454193,
0.07768068462610245,
0.034888070076704025,
-0.010301664471626282,
0.04814887046813965,
0.09232062846422195,
0.03411741554737091,
0.11488253623247147,
-0.040040601044893265,
-0.2219364047050476,
-0.018541086465120316,
-0.08489349484443665,
-0.14555105566978455,
-0.12324151396751404,
-0.20175698399543762,
-0.35038816928863525,
-0.09231589734554291,
0.2677200436592102,
0.07170622050762177,
-0.2705863416194916,
-0.0360448993742466,
-0.3224453330039978,
-0.06038125604391098,
-0.2955954670906067,
0.048026587814092636,
-0.1991707682609558,
-0.03406830132007599,
-0.10567773878574371,
0.24965167045593262,
0.04562995955348015,
0.16830213367938995,
-0.133302703499794,
0.3051401972770691,
0.001936835702508688,
-0.1919388324022293,
-0.10773301124572754,
-0.3416503369808197,
-0.06655918806791306,
0.011867757886648178,
-0.09978791326284409,
-0.15955904126167297,
0.045573797076940536,
0.20347779989242554,
0.047402653843164444,
0.2764277458190918,
0.22624479234218597,
0.15613257884979248,
0.07465454190969467,
-0.0626225620508194,
0.027277057990431786,
0.6016297340393066,
0.1526530385017395,
-0.35484278202056885,
-0.04301704466342926,
0.0805903747677803,
-0.06572465598583221,
0.19800616800785065,
0.14034317433834076,
0.20327569544315338,
-0.019557058811187744,
-0.022343672811985016,
-0.047155048698186874,
0.7820588946342468,
0.07799702882766724,
0.1605522483587265,
0.2116972655057907,
0.033879444003105164,
0.14394745230674744,
0.08480922132730484,
-0.0581357479095459,
0.25329676270484924,
0.2656431198120117,
-0.031005913391709328,
-0.004309900104999542,
-0.02241404354572296,
-0.06675798445940018,
-0.052182551473379135,
0.025207769125699997,
-0.242387056350708,
-0.042865339666604996,
0.07265479117631912,
0.054472416639328,
0.24748355150222778,
-0.2523496747016907,
-0.09263733774423599,
-0.10928384959697723,
0.18861770629882812,
-0.1640680432319641,
0.2123440057039261,
0.1257992386817932,
-0.17671017348766327,
-0.009518414735794067,
-0.20533162355422974,
-0.3496631681919098,
0.48921287059783936,
-0.21583831310272217,
0.3704429566860199,
0.1617274433374405,
-0.25920015573501587,
0.3855525851249695,
-0.07552909106016159,
0.7938355207443237,
0.1775050312280655,
-0.40211182832717896,
0.026771478354930878,
-0.24915775656700134,
-0.1726468950510025,
-0.26434943079948425,
-0.13471171259880066,
0.05507649481296539,
0.4503939747810364,
0.11878316104412079,
0.017241492867469788,
-0.4307188093662262,
0.01733897253870964,
-0.4135175049304962,
-0.04766565561294556,
-0.4300174415111542,
-0.5368074178695679,
-0.015819435939192772,
0.12032482028007507,
0.5216159224510193,
0.043419137597084045,
0.012906897813081741,
-0.11834781616926193,
0.14850248396396637,
-0.11811955273151398,
-0.11175025254487991,
0.12044084817171097,
0.04053470864892006,
-0.07880081236362457,
0.12494932115077972,
0.0192219540476799,
0.4339076578617096,
0.04333704710006714,
0.17528767883777618,
-0.038051411509513855,
-0.03123306855559349,
0.03592373803257942,
-0.02015947923064232,
0.14585722982883453,
0.3877965211868286,
0.06901202350854874,
0.12948530912399292,
0.37202951312065125,
-0.16681788861751556,
0.22411419451236725,
0.03424134477972984,
-0.13479261100292206,
0.20646905899047852,
0.38806068897247314,
-0.2339244782924652,
-0.3268129229545593,
0.4076179265975952,
-0.03653969615697861,
-0.26954278349876404,
0.1157316118478775,
0.2716687321662903,
-0.07839040458202362,
0.4191312789916992,
0.11702381074428558,
0.3982000946998596,
-0.13740722835063934,
-0.07410943508148193,
-0.128312885761261,
-0.16634397208690643,
0.12841977179050446,
-0.4222670793533325,
0.5406001806259155,
-0.33380234241485596,
0.05375392735004425,
0.029454780742526054,
-0.11432532966136932,
0.38850659132003784,
0.11616437137126923,
0.027327071875333786,
0.2992912828922272,
0.10536627471446991,
-0.3442005217075348,
-0.21013405919075012,
0.0392216295003891,
0.3460536301136017,
-0.06459994614124298,
0.34893473982810974,
0.0038892701268196106,
0.30289143323898315,
0.09141361713409424,
0.10234825313091278,
0.12744781374931335,
0.083088219165802,
0.14552102982997894,
-0.17926032841205597,
-0.04031214490532875,
-0.048270586878061295,
-0.07354363054037094,
0.23786993324756622,
0.010336406528949738,
0.19047096371650696,
-0.37655648589134216,
0.1311187446117401,
-0.3999866545200348,
-0.0036970023065805435,
0.10840706527233124,
0.19568747282028198,
-0.1636602133512497,
-0.03967832028865814,
-0.5993940234184265,
0.04947479069232941,
0.09169598668813705,
-0.447343111038208,
0.14455924928188324,
0.2419222891330719,
-0.5041831135749817,
-0.5869572162628174,
0.3383643627166748,
-0.13932791352272034,
0.30521485209465027,
-0.21806567907333374,
0.2302837371826172,
0.1451263725757599,
0.07398596405982971,
0.0031106937676668167,
0.1674405336380005,
-0.46048668026924133,
0.7723170518875122,
-0.41019925475120544,
-0.04046989232301712,
-0.07420751452445984,
0.21921750903129578,
0.28727489709854126,
-0.410246342420578,
-0.08924521505832672,
0.14928951859474182,
-0.033661697059869766,
0.03453759104013443,
-0.6716536283493042,
0.39754340052604675,
0.3027535378932953,
-0.12958300113677979,
0.04780951514840126,
-0.12468655407428741,
0.4407406747341156,
-0.19435343146324158,
-0.007297087460756302,
0.054044462740421295,
-0.3538222312927246,
0.07610519230365753,
0.15002034604549408,
-0.12927328050136566,
-0.1505214124917984,
0.17616645991802216,
0.2777819037437439,
-0.09494747221469879,
0.21481288969516754,
0.1303209364414215,
-0.16090498864650726,
0.10904135555028915,
-0.02473512850701809,
0.09668509662151337,
-0.09307550638914108,
0.14219973981380463,
-0.07469818741083145,
0.2022022008895874,
0.0064156316220760345,
-0.08837658166885376,
-0.029186200350522995,
-0.10314290225505829,
0.1757405400276184,
0.1365383416414261,
0.11598806083202362,
0.21402019262313843,
-0.22292017936706543,
-0.11964130401611328,
-0.3197740912437439,
-0.057038165628910065,
0.0987335741519928,
0.2493208646774292,
-0.25262099504470825,
-0.02139950543642044,
0.08136963099241257,
-0.504607081413269,
0.017349321395158768,
0.25888878107070923,
0.2615118622779846,
-0.02539277821779251,
0.17917519807815552,
0.28796476125717163,
-0.27537164092063904,
-0.004891254007816315,
-0.21245495975017548,
0.14326296746730804,
0.38728201389312744,
-0.016217734664678574,
-0.07604528218507767,
-0.0726710855960846,
-0.20880667865276337,
-0.1908796727657318,
0.33229976892471313,
0.3125700056552887,
0.1352086067199707,
-0.19383880496025085,
0.06320391595363617,
0.12206611782312393,
-0.13434401154518127,
-0.13443523645401,
0.44293537735939026,
0.06604450196027756,
0.3069315254688263,
0.4200437664985657,
0.559588611125946,
0.3809932768344879,
0.09056206047534943,
0.05777902901172638,
0.27120745182037354,
0.5226377248764038,
-0.05193823575973511,
-0.5719059109687805,
0.34642115235328674,
0.056188907474279404,
0.3000108301639557,
0.15534690022468567,
0.035028040409088135,
0.49038928747177124,
-0.13824504613876343,
0.3595699071884155,
-0.01854124665260315,
-0.113284632563591,
-0.045675985515117645,
-0.2852489650249481,
0.3348413109779358,
0.08907431364059448,
-0.33820024132728577,
0.16455870866775513,
-0.26015207171440125,
0.1860853135585785,
-0.10203547030687332,
-0.34984540939331055,
-0.06715548038482666,
0.21060089766979218,
-0.07852217555046082,
-0.13392400741577148,
0.05123218148946762,
-0.1092618778347969,
0.04110646992921829,
-0.0756688266992569,
0.26219305396080017,
-0.0771266520023346,
0.22911177575588226,
-0.10883106291294098,
0.17801547050476074,
0.20673616230487823,
-0.3007088303565979,
0.36348316073417664,
0.291736900806427,
0.09602434933185577,
-0.028553316369652748,
-0.1421336829662323,
-0.16872906684875488,
0.1987227350473404,
0.2125190645456314,
0.2182011604309082,
0.2973135709762573,
-0.20303787291049957,
0.209184467792511,
0.07666593790054321,
0.14844010770320892,
0.12478624284267426,
-0.10032095015048981,
0.08341074734926224,
-0.34139347076416016,
0.01500837504863739,
-0.002855490893125534,
0.021185260266065598,
-0.16811701655387878,
-0.020289849489927292,
0.21209760010242462,
-0.23583146929740906,
-0.25421473383903503,
-0.44824451208114624,
0.030987277626991272,
-0.05470798909664154,
0.12666383385658264,
-0.55543452501297,
-0.03894951567053795,
0.32326120138168335,
-0.47124192118644714,
-0.12121765315532684,
0.06521112471818924,
-0.017598338425159454,
0.06348396837711334,
0.4886806011199951,
0.07212185859680176,
0.42571255564689636,
-0.19185175001621246,
-0.12009893357753754,
-0.1425551325082779,
0.17747169733047485,
-0.09794667363166809,
0.16073988378047943,
-0.0020093880593776703,
0.6992436051368713,
-0.07326000183820724,
-0.17418056726455688,
0.568118155002594,
0.21198086440563202,
0.35904061794281006,
0.7315527200698853,
0.006489422172307968,
0.32658782601356506,
-0.5067708492279053,
0.05766186863183975,
0.24536114931106567,
0.04336542636156082,
0.27261897921562195,
-0.16815051436424255,
-0.1389167606830597,
-0.1460636854171753,
0.19526979327201843,
0.29813912510871887,
-0.24774456024169922,
0.29646772146224976,
-0.02217877469956875,
0.17215320467948914,
0.07742306590080261,
0.11036296933889389,
-0.17655684053897858,
0.18080130219459534,
-0.37239450216293335,
-0.2643670439720154,
-0.108770951628685,
-0.2655797600746155,
-0.12061762809753418,
-0.5800362229347229,
0.08901967853307724,
0.49327874183654785,
0.09984099864959717,
-0.44328606128692627,
0.1036899983882904,
0.0784309059381485,
-0.23537969589233398,
0.09292205423116684,
0.22527094185352325,
0.23517084121704102,
0.09945841878652573,
0.15262451767921448,
-0.400130033493042,
0.19114460051059723,
0.1659403294324875,
-0.29069459438323975,
-0.22248533368110657,
-0.9327431917190552,
0.31262749433517456,
0.2468026876449585,
0.2298460751771927,
-0.39092856645584106,
-0.2439362108707428,
0.07604831457138062,
0.3249330520629883,
-0.09758561849594116,
0.29371219873428345,
-0.1351177841424942,
-0.21994590759277344,
-0.2137925624847412,
-0.6613396406173706,
0.15859824419021606,
0.09392213076353073,
-0.06115168705582619,
-0.18885387480258942
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | I can confirm `add_faiss_index` calls `index = faiss.index_cpu_to_gpus_list(index, gpus=list(device))`.
Could this be an issue with your environment ? Could you try running with 1 and 8 GPUs with a code similar to[ this one from the FAISS examples](https://github.com/facebookresearch/faiss/blob/main/tutorial/python/5-Multiple-GPUs.py) but using `gpu_index = faiss.index_cpu_to_gpus_list(cpu_index, gpus=list(device))`, and see if the speed changes ? | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 51 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
I can confirm `add_faiss_index` calls `index = faiss.index_cpu_to_gpus_list(index, gpus=list(device))`.
Could this be an issue with your environment ? Could you try running with 1 and 8 GPUs with a code similar to[ this one from the FAISS examples](https://github.com/facebookresearch/faiss/blob/main/tutorial/python/5-Multiple-GPUs.py) but using `gpu_index = faiss.index_cpu_to_gpus_list(cpu_index, gpus=list(device))`, and see if the speed changes ? | [
-0.21215417981147766,
-0.5152871012687683,
-0.16691350936889648,
0.032151661813259125,
-0.2920154333114624,
0.018033139407634735,
0.11776268482208252,
0.11870433390140533,
0.6410746574401855,
0.03626525402069092,
-0.27248191833496094,
-0.19213053584098816,
0.5188185572624207,
-0.2209095060825348,
-0.29598793387413025,
-0.049810364842414856,
0.36025187373161316,
-0.25530287623405457,
0.18483039736747742,
-0.18208539485931396,
-0.4836091697216034,
0.13242653012275696,
-0.18477752804756165,
-0.1422918140888214,
-0.2212783843278885,
0.09885530918836594,
-0.14670811593532562,
-0.004641599953174591,
0.15235745906829834,
-0.2104492485523224,
-0.4095037281513214,
0.19089174270629883,
0.05791504681110382,
0.4556146562099457,
-0.00011443054245319217,
-0.19536739587783813,
-0.056455790996551514,
0.03260624408721924,
0.1922723799943924,
0.320339560508728,
-0.01553352177143097,
0.1955309957265854,
0.062203943729400635,
-0.05525550618767738,
-0.44285815954208374,
-0.1008378341794014,
0.02806703746318817,
-0.5389875173568726,
-0.15289174020290375,
0.07946766912937164,
0.16736619174480438,
-0.047936756163835526,
0.08685840666294098,
-0.1924164742231369,
-0.05706491321325302,
-0.41415196657180786,
-0.05523676425218582,
-0.10721482336521149,
0.41300779581069946,
-0.018272781744599342,
0.028795436024665833,
0.38759708404541016,
0.04689617455005646,
0.10664933919906616,
-0.18145814538002014,
0.050931885838508606,
0.4380088746547699,
-0.33978042006492615,
0.08848583698272705,
-0.13229677081108093,
-0.3142320513725281,
-0.01654209941625595,
-0.26983943581581116,
-0.324262410402298,
-0.19853217899799347,
-0.08586567640304565,
-0.13560417294502258,
0.09964001923799515,
-0.23482565581798553,
-0.2153717279434204,
0.21658901870250702,
-0.1776716709136963,
0.15502788126468658,
-0.002579830586910248,
0.1686314344406128,
0.478049635887146,
0.05721279978752136,
0.18958023190498352,
0.2688121497631073,
0.14641067385673523,
-0.3933939039707184,
-0.17002734541893005,
0.3182395100593567,
0.07871878147125244,
-0.9411049485206604,
0.21281510591506958,
0.24517613649368286,
-0.42717859148979187,
0.012500792741775513,
-0.06680383533239365,
-0.26260697841644287,
0.1394633650779724,
0.06861612945795059,
0.16157937049865723,
-0.07124786078929901,
-0.11836326122283936,
-0.14211267232894897,
-0.18243445456027985,
-0.2807157039642334,
-0.10648050159215927,
-0.045964885503053665,
-0.0023110732436180115,
0.10698363184928894,
-0.33713704347610474,
-0.6266292333602905,
-0.11138767749071121,
0.03300224244594574,
0.018216464668512344,
-0.16005545854568481,
-0.10080677270889282,
-0.10685363411903381,
-0.17834234237670898,
0.19043593108654022,
0.3905349671840668,
0.10593648999929428,
0.07694362103939056,
-0.12756317853927612,
0.1377720832824707,
-0.31797027587890625,
-0.05242816358804703,
-0.13952523469924927,
-0.16750818490982056,
-0.07932379841804504,
0.31971582770347595,
0.10735811293125153,
-0.2589308023452759,
-0.022427555173635483,
0.12955716252326965,
0.11471384763717651,
0.0432773157954216,
0.2132660448551178,
-0.40441927313804626,
0.25519660115242004,
0.16960014402866364,
0.2577257454395294,
0.07061024755239487,
0.014687752351164818,
0.2466936856508255,
-0.23231813311576843,
0.20536932349205017,
-0.14977926015853882,
-0.036437757313251495,
0.17266885936260223,
0.11925002932548523,
0.22486411035060883,
-0.22211170196533203,
0.03128507733345032,
0.54874187707901,
-0.0486307367682457,
0.35093316435813904,
0.22424936294555664,
-0.048007622361183167,
-0.024921026080846786,
-0.23974250257015228,
0.3797491490840912,
0.1703697293996811,
0.011099651455879211,
-0.0575738288462162,
0.2836134135723114,
-0.07658717036247253,
-0.01626048982143402,
0.605792760848999,
0.1679650843143463,
-0.12945425510406494,
-0.13316288590431213,
0.4515038728713989,
0.2677418887615204,
-0.4350143074989319,
0.17606092989444733,
-0.1326715052127838,
-0.04578889161348343,
-0.000005964189767837524,
0.22412648797035217,
0.08744006603956223,
0.019817903637886047,
0.03981373831629753,
0.29307496547698975,
0.4802575707435608,
-0.0539446622133255,
0.08474767208099365,
-0.2496834099292755,
-0.0003094282001256943,
0.17669489979743958,
0.2628839910030365,
0.06734583526849747,
-0.15774300694465637,
-0.16005700826644897,
-0.9138280153274536,
0.40128275752067566,
-0.08149072527885437,
-0.02979610674083233,
-0.09562362730503082,
0.5635129809379578,
0.3429158926010132,
0.3197615444660187,
0.23543649911880493,
0.264255166053772,
0.247807115316391,
-0.21185338497161865,
0.0361197292804718,
0.30203065276145935,
-0.06859900057315826,
0.45480576157569885,
-0.11981668323278427,
-0.2762080430984497,
0.02828603982925415,
0.07132478058338165,
-0.01750033348798752,
0.08146807551383972,
-0.1146632730960846,
-0.13356667757034302,
0.08527670055627823,
0.03112282045185566,
-0.04400238022208214,
-0.2152785062789917,
0.08840276300907135,
-0.1700991839170456,
-0.14550840854644775,
-0.3497195541858673,
-0.06333606690168381,
0.33550935983657837,
-0.2747415006160736,
0.01225301157683134,
0.30391818284988403,
0.31379759311676025,
-0.3038870692253113,
0.47468501329421997,
0.2816060483455658,
0.05197320133447647,
0.1947561800479889,
0.056884586811065674,
0.17479456961154938,
0.018000628799200058,
-0.170843243598938,
0.06759341061115265,
0.3052993714809418,
0.09556135535240173,
0.38202965259552,
0.033088162541389465,
-0.19273148477077484,
0.22473880648612976,
0.14849206805229187,
0.17861400544643402,
0.21472597122192383,
-0.0029725059866905212,
-0.0083087719976902,
0.02174558863043785,
-0.19895708560943604,
-0.6644465327262878,
0.4130522608757019,
-0.05914938077330589,
0.10885623097419739,
0.04593203216791153,
-0.15831133723258972,
0.019712824374437332,
0.014172818511724472,
-0.031205451115965843,
-0.4206821322441101,
0.15814203023910522,
0.22077178955078125,
0.12483108043670654,
-0.10163215547800064,
-0.07427610456943512,
-0.10145221650600433,
0.08741943538188934,
0.13326571881771088,
-0.03987164422869682,
0.01992485672235489,
-0.16981817781925201,
-0.15215952694416046,
-0.0331558957695961,
-0.3518073558807373,
0.07222083956003189,
-0.09249376505613327,
-0.12337236106395721,
0.024473385885357857,
0.28442418575286865,
-0.028771692886948586,
-0.28009232878685,
-0.23013800382614136,
-0.1515345573425293,
-0.030140943825244904,
0.17850461602210999,
0.14819294214248657,
-0.0641668289899826,
0.22206073999404907,
-0.24653255939483643,
0.43198710680007935,
0.12443692982196808,
-0.2710811197757721,
-0.0913856029510498,
0.056447286158800125,
-0.05581948906183243,
0.05254385992884636,
0.0945788100361824,
0.12320366501808167,
0.10761627554893494,
0.1591537594795227,
-0.0844162330031395,
-0.16617882251739502,
0.009549006819725037,
-0.17673073709011078,
-0.1738772690296173,
-0.1091393381357193,
-0.22562754154205322,
-0.29482895135879517,
-0.01028810627758503,
0.15214727818965912,
0.18398407101631165,
-0.30801427364349365,
0.08798815310001373,
-0.2785244286060333,
-0.13871707022190094,
-0.2931501567363739,
0.08095718920230865,
-0.24002882838249207,
-0.025666920468211174,
-0.22257402539253235,
0.17673860490322113,
0.07615631818771362,
0.17356666922569275,
-0.14526547491550446,
0.33328402042388916,
0.05191300809383392,
-0.10539624840021133,
-0.038473859429359436,
-0.32370707392692566,
0.04338065907359123,
0.030904611572623253,
-0.08802568167448044,
-0.1615988165140152,
0.05500760301947594,
0.18812693655490875,
0.12594760954380035,
0.20510070025920868,
0.28466689586639404,
0.07459989190101624,
-0.036400020122528076,
-0.02600773610174656,
0.04945682734251022,
0.48669081926345825,
0.10464922338724136,
-0.2688261866569519,
-0.15907208621501923,
0.11866045743227005,
-0.05595224350690842,
0.22569382190704346,
0.12252624332904816,
0.17644479870796204,
-0.11041843146085739,
-0.03331488370895386,
0.00882042571902275,
0.7513555884361267,
0.1682148277759552,
0.07692524790763855,
0.18022841215133667,
0.05905516445636749,
0.028115298599004745,
0.014861643314361572,
-0.10748644918203354,
0.20625297725200653,
0.1261366456747055,
-0.0542309433221817,
-0.09792792797088623,
-0.06952760368585587,
-0.08604130893945694,
-0.00817880779504776,
0.11624214053153992,
-0.2400810420513153,
-0.1048307865858078,
0.13851243257522583,
0.04979367554187775,
0.22482073307037354,
-0.27341321110725403,
0.023559890687465668,
-0.15283365547657013,
0.18831342458724976,
-0.1343546211719513,
0.17249630391597748,
-0.02690068632364273,
-0.21414287388324738,
0.06676024198532104,
-0.2370356172323227,
-0.38314178586006165,
0.48883360624313354,
-0.2707289159297943,
0.37870216369628906,
0.19311200082302094,
-0.15995997190475464,
0.3154924511909485,
-0.04349033161997795,
0.6970226764678955,
0.21756544709205627,
-0.3791775107383728,
0.20828980207443237,
-0.34189659357070923,
-0.3107716143131256,
-0.32687845826148987,
-0.1961148977279663,
0.04951264336705208,
0.3832153379917145,
0.08180901408195496,
-0.06724068522453308,
-0.4505629241466522,
-0.013722479343414307,
-0.4046211540699005,
-0.03742886707186699,
-0.3003292977809906,
-0.5041142106056213,
-0.1162668839097023,
0.07149451971054077,
0.5069785118103027,
-0.010399041697382927,
0.12698908150196075,
-0.21532230079174042,
0.13699033856391907,
-0.1229560524225235,
-0.025662802159786224,
0.08404647558927536,
0.07725033164024353,
-0.0009699435904622078,
0.06089288368821144,
0.07985441386699677,
0.39786434173583984,
0.012043625116348267,
0.16917912662029266,
0.017863577231764793,
0.04635659605264664,
-0.01781756430864334,
0.015516649931669235,
0.20357951521873474,
0.22238591313362122,
0.12817887961864471,
0.16996468603610992,
0.44146159291267395,
-0.16368843615055084,
0.2162095606327057,
0.023895733058452606,
-0.11092478036880493,
0.23046289384365082,
0.3441665470600128,
-0.12931950390338898,
-0.37661054730415344,
0.4008968770503998,
-0.04668981954455376,
-0.16320914030075073,
0.11612649261951447,
0.13346916437149048,
-0.0038969870656728745,
0.5407133102416992,
0.1447085440158844,
0.3470406234264374,
-0.2060202807188034,
-0.13985446095466614,
-0.04047226905822754,
-0.1739022433757782,
0.11430801451206207,
-0.4135128855705261,
0.5495864748954773,
-0.3747396469116211,
0.03881354257464409,
0.17994360625743866,
-0.07370322942733765,
0.3880060613155365,
0.10572682321071625,
0.02021006867289543,
0.320932000875473,
0.11492350697517395,
-0.38586676120758057,
-0.24433784186840057,
0.16230791807174683,
0.3444366753101349,
-0.12761040031909943,
0.163788840174675,
0.09666226804256439,
0.2343689352273941,
0.06038661673665047,
0.12667223811149597,
0.08799900114536285,
-0.02238662913441658,
0.16644372045993805,
-0.1544017195701599,
-0.05349479615688324,
-0.06923571974039078,
0.04667774587869644,
0.17307206988334656,
0.046580806374549866,
0.1344866156578064,
-0.44713228940963745,
0.0300334133207798,
-0.4527648389339447,
-0.0426090732216835,
0.1586587280035019,
0.16836124658584595,
-0.20692206919193268,
-0.018625101074576378,
-0.6330995559692383,
0.06472305208444595,
0.0863986685872078,
-0.5246694087982178,
0.19421395659446716,
0.23430651426315308,
-0.3858378529548645,
-0.5322449207305908,
0.22754673659801483,
-0.14178887009620667,
0.2584172487258911,
-0.1728002279996872,
0.17450907826423645,
0.08644326031208038,
0.05007574334740639,
0.08826616406440735,
0.1442013382911682,
-0.44014379382133484,
0.6860700249671936,
-0.3705786168575287,
-0.03200338035821915,
-0.08014574646949768,
0.2647901475429535,
0.21452274918556213,
-0.3567928373813629,
-0.1088504046201706,
0.1765023171901703,
-0.040905680507421494,
0.0007337257266044617,
-0.6714528799057007,
0.2991032898426056,
0.3070707619190216,
-0.09455907344818115,
-0.06519442051649094,
-0.12979017198085785,
0.4448384940624237,
-0.13798688352108002,
-0.018648333847522736,
0.001851990818977356,
-0.35272613167762756,
0.11437776684761047,
0.14021648466587067,
-0.12390324473381042,
-0.19055505096912384,
0.20636530220508575,
0.14053520560264587,
-0.061380427330732346,
0.14598213136196136,
0.0840655043721199,
-0.25151515007019043,
0.06995603442192078,
-0.13976839184761047,
0.12117860466241837,
-0.21411825716495514,
-0.0193878635764122,
-0.023936497047543526,
0.24507777392864227,
0.07858416438102722,
-0.15716317296028137,
-0.04850802570581436,
-0.21213316917419434,
0.14005085825920105,
0.10937827825546265,
0.09814705699682236,
0.19639217853546143,
-0.166658416390419,
-0.07485304027795792,
-0.23134833574295044,
-0.12221410870552063,
0.07566139101982117,
0.22656306624412537,
-0.23216642439365387,
0.009696207009255886,
0.062408313155174255,
-0.5467637777328491,
0.07184578478336334,
0.24828556180000305,
0.16279283165931702,
-0.022573210299015045,
0.18979403376579285,
0.29121634364128113,
-0.19223268330097198,
-0.03083629533648491,
-0.19128714501857758,
0.13685913383960724,
0.25859910249710083,
0.015060406178236008,
-0.15480637550354004,
-0.015719085931777954,
-0.22477714717388153,
-0.14655564725399017,
0.30890902876853943,
0.35442596673965454,
0.12534357607364655,
-0.08676934987306595,
0.0004702359437942505,
0.21764680743217468,
-0.1348801851272583,
-0.06020998954772949,
0.4576055407524109,
0.06381852179765701,
0.3813782036304474,
0.39343008399009705,
0.5848613977432251,
0.3081052601337433,
0.03292548283934593,
0.01114104688167572,
0.22864806652069092,
0.444496214389801,
-0.040078967809677124,
-0.5549971461296082,
0.3862685263156891,
0.04060571640729904,
0.2912907302379608,
0.08457142114639282,
0.11429812759160995,
0.5094445943832397,
-0.13168790936470032,
0.3963288962841034,
0.006148628890514374,
-0.11886586248874664,
-0.038992032408714294,
-0.26815348863601685,
0.3443409502506256,
0.0015929192304611206,
-0.30099835991859436,
0.1347816288471222,
-0.3097912669181824,
0.17030054330825806,
-0.11407189816236496,
-0.40341663360595703,
-0.1339806616306305,
0.19821028411388397,
-0.1255694031715393,
-0.11364699900150299,
0.17747563123703003,
-0.05823802947998047,
-0.07609063386917114,
-0.06714923679828644,
0.23270265758037567,
-0.11648489534854889,
0.22785046696662903,
-0.10562661290168762,
0.13912655413150787,
0.16043463349342346,
-0.25781741738319397,
0.3988192081451416,
0.3376808166503906,
0.08629527688026428,
-0.08420532941818237,
-0.04066665470600128,
-0.2558397650718689,
0.12005725502967834,
0.1926235854625702,
0.2953623831272125,
0.3502042591571808,
-0.29388314485549927,
0.22804321348667145,
0.16088443994522095,
0.08232671767473221,
0.11289235949516296,
-0.1530246138572693,
-0.04769337177276611,
-0.26986050605773926,
0.1028478741645813,
0.08354777097702026,
-0.0820673331618309,
-0.2524186372756958,
-0.07630768418312073,
0.23116585612297058,
-0.21960027515888214,
-0.18893855810165405,
-0.37488287687301636,
0.04023466259241104,
-0.07357870042324066,
0.12387715280056,
-0.535814642906189,
-0.07946368306875229,
0.28555768728256226,
-0.41798052191734314,
-0.07082393765449524,
0.05481758341193199,
0.05749893933534622,
0.03605276346206665,
0.4537038207054138,
-0.010909538716077805,
0.43487897515296936,
-0.30980783700942993,
-0.05792425572872162,
-0.09357752650976181,
0.18824614584445953,
-0.15562762320041656,
0.18537195026874542,
0.02988772839307785,
0.7148851156234741,
-0.11312214285135269,
-0.11236558854579926,
0.616559624671936,
0.16058292984962463,
0.34668198227882385,
0.7850821018218994,
-0.03425411134958267,
0.3160024881362915,
-0.5076478123664856,
-0.06886117905378342,
0.2552732825279236,
0.029713772237300873,
0.2457343339920044,
-0.18460483849048615,
-0.015922632068395615,
-0.14478085935115814,
0.05355067551136017,
0.3814004063606262,
-0.18021468818187714,
0.35539481043815613,
-0.005876230075955391,
0.09823458641767502,
0.08009090274572372,
0.0043841395527124405,
-0.23770928382873535,
0.19559228420257568,
-0.27298739552497864,
-0.24361062049865723,
-0.12223856151103973,
-0.2060498744249344,
-0.051551878452301025,
-0.5119646787643433,
-0.039769891649484634,
0.5827334523200989,
0.06810735166072845,
-0.40501949191093445,
0.139430433511734,
0.10383529216051102,
-0.22687658667564392,
0.14068607985973358,
0.19297514855861664,
0.21679702401161194,
0.09132358431816101,
0.18886257708072662,
-0.3823269009590149,
0.15469373762607574,
0.1667170524597168,
-0.23830623924732208,
-0.1680487096309662,
-0.8792716860771179,
0.3337966799736023,
0.14188462495803833,
0.36108237504959106,
-0.41538628935813904,
-0.24948248267173767,
0.08237269520759583,
0.22909393906593323,
-0.2069152444601059,
0.17809106409549713,
-0.09911447763442993,
-0.2711588740348816,
-0.14718873798847198,
-0.6411997079849243,
0.09275253862142563,
0.12636753916740417,
-0.05553171783685684,
-0.1271767020225525
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Hi, I test the FAISS example and the speed indeed changes. I set `nb=1000000`, `nq=1000000` and `d=64`
| num GPUS | time cost |
| -------- | --------- |
| 1 | 28.53 |
| 5 | 7.16 |
| While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 39 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Hi, I test the FAISS example and the speed indeed changes. I set `nb=1000000`, `nq=1000000` and `d=64`
| num GPUS | time cost |
| -------- | --------- |
| 1 | 28.53 |
| 5 | 7.16 |
| [
-0.19229860603809357,
-0.5928233861923218,
-0.15238569676876068,
0.09184186905622482,
-0.46605974435806274,
0.0241340771317482,
0.11798329651355743,
0.0171394944190979,
0.5296295881271362,
0.024866022169589996,
-0.25367045402526855,
-0.22022292017936707,
0.5533517599105835,
-0.13879038393497467,
-0.17960289120674133,
-0.04332718253135681,
0.4265412986278534,
-0.26581165194511414,
0.015537634491920471,
-0.20431342720985413,
-0.46975818276405334,
0.16002488136291504,
-0.3900170922279358,
-0.1410333663225174,
-0.15235424041748047,
0.20339994132518768,
-0.19838036596775055,
-0.04768458753824234,
0.10935988277196884,
-0.16242513060569763,
-0.3645823299884796,
0.2437507063150406,
0.12017121911048889,
0.41613295674324036,
-0.00012752065958920866,
-0.17253661155700684,
-0.06330933421850204,
0.004252605140209198,
0.25376805663108826,
0.38806813955307007,
-0.1808394491672516,
0.2477368712425232,
0.0020485599525272846,
0.020583011209964752,
-0.3890160024166107,
-0.012424017302691936,
0.12972547113895416,
-0.6491070985794067,
-0.18257556855678558,
0.045095670968294144,
0.01979053020477295,
-0.17153312265872955,
-0.0562698133289814,
-0.13870956003665924,
-0.04100695252418518,
-0.3708540201187134,
-0.017933350056409836,
-0.10286253690719604,
0.4273099899291992,
-0.07037273794412613,
-0.011471323668956757,
0.4233940839767456,
0.06874335557222366,
0.0670434758067131,
-0.15284425020217896,
0.022062331438064575,
0.4047820270061493,
-0.24372446537017822,
0.13432656228542328,
-0.14864909648895264,
-0.15291720628738403,
-0.047018639743328094,
-0.22935810685157776,
-0.3747693598270416,
-0.18010646104812622,
0.04358817636966705,
-0.13527148962020874,
0.04983748495578766,
-0.220620796084404,
-0.17952774465084076,
0.13561595976352692,
-0.24900823831558228,
0.02675880491733551,
-0.032728441059589386,
0.19871139526367188,
0.5252230167388916,
0.05394124984741211,
0.2618379294872284,
0.26704326272010803,
0.15973323583602905,
-0.26859745383262634,
-0.27667778730392456,
0.2639547884464264,
0.12399192154407501,
-0.9311481714248657,
0.18994176387786865,
0.12072284519672394,
-0.3096891939640045,
0.08977510035037994,
-0.12033772468566895,
-0.29051080346107483,
0.09346006065607071,
0.055948179215192795,
0.18536049127578735,
-0.0035847797989845276,
-0.05482567846775055,
-0.05204472690820694,
-0.22635816037654877,
-0.2146875113248825,
-0.2530822157859802,
-0.13739219307899475,
0.09013321250677109,
0.09720450639724731,
-0.2393738478422165,
-0.6757252216339111,
-0.09812691807746887,
-0.08592711389064789,
0.11857417225837708,
-0.12745866179466248,
-0.0935046374797821,
-0.04456399381160736,
-0.28526875376701355,
0.12464947253465652,
0.3529595732688904,
-0.013963943347334862,
-0.014642290771007538,
-0.24536652863025665,
0.09379218518733978,
-0.2161107361316681,
-0.07862623780965805,
-0.06596625596284866,
-0.2099326103925705,
-0.02026413008570671,
0.342266321182251,
-0.004670124500989914,
-0.16111545264720917,
-0.07072798907756805,
0.08579697459936142,
0.10442958772182465,
0.115420863032341,
0.13681837916374207,
-0.37507933378219604,
0.3255918025970459,
0.1469333916902542,
0.22166815400123596,
0.015826283022761345,
0.06924127787351608,
0.30550169944763184,
-0.28977230191230774,
0.2672332227230072,
-0.23730075359344482,
0.04180549457669258,
0.19223356246948242,
-0.008078410290181637,
0.2840622067451477,
-0.229204922914505,
-0.12311132997274399,
0.6685868501663208,
-0.036163486540317535,
0.21919932961463928,
0.29001304507255554,
-0.1370955854654312,
-0.045543789863586426,
-0.19489558041095734,
0.25487151741981506,
0.17890910804271698,
-0.07719594240188599,
-0.19009457528591156,
0.4558309316635132,
-0.14719370007514954,
-0.006770975887775421,
0.5849074125289917,
0.12080097943544388,
-0.12578248977661133,
-0.22172212600708008,
0.608644962310791,
0.32781699299812317,
-0.45261263847351074,
0.23355436325073242,
-0.10652025043964386,
-0.10077811777591705,
-0.00016608089208602905,
0.2640443742275238,
0.08333513885736465,
0.012716822326183319,
0.05939582362771034,
0.3182103633880615,
0.47350454330444336,
-0.06101279705762863,
0.03499636799097061,
-0.09049921482801437,
0.05548772215843201,
0.0953366607427597,
0.13596537709236145,
0.10805043578147888,
-0.0503324493765831,
-0.055563218891620636,
-1.02334725856781,
0.4526292383670807,
0.010135520249605179,
0.009785543195903301,
-0.09852667152881622,
0.4833640456199646,
0.4359273910522461,
0.4762474596500397,
0.19665783643722534,
0.20474231243133545,
0.15191665291786194,
-0.26842305064201355,
-0.06460101157426834,
0.32977569103240967,
-0.14682957530021667,
0.4822753965854645,
-0.10107224434614182,
-0.25795629620552063,
0.12813310325145721,
-0.07267973572015762,
0.04429228976368904,
0.050228673964738846,
-0.22589553892612457,
-0.2552957534790039,
0.1823538839817047,
0.0007057320326566696,
-0.05254882201552391,
-0.32763031125068665,
0.058599866926670074,
-0.06649933755397797,
-0.016350645571947098,
-0.4133431315422058,
-0.09437675029039383,
0.27618351578712463,
-0.3189486563205719,
0.01557920128107071,
0.3633970022201538,
0.23501382768154144,
-0.23013584315776825,
0.49288004636764526,
0.26393288373947144,
0.015131315216422081,
0.1374691128730774,
0.0681251809000969,
0.022146038711071014,
0.05331326648592949,
-0.20233672857284546,
0.03188956901431084,
0.2336030900478363,
0.12354755401611328,
0.4057515561580658,
0.005360528826713562,
-0.3598157465457916,
0.15614178776741028,
0.10735499858856201,
0.15296071767807007,
0.20382171869277954,
-0.06525437533855438,
-0.11896336078643799,
0.0020674951374530792,
-0.17679663002490997,
-0.6291311979293823,
0.36376675963401794,
-0.08379790186882019,
0.06558966636657715,
0.07979565113782883,
-0.14050477743148804,
-0.10990787297487259,
0.001969344913959503,
-0.02026413194835186,
-0.29692715406417847,
0.23295281827449799,
0.1567157357931137,
0.18546165525913239,
-0.0670672357082367,
0.05781891942024231,
-0.1257532835006714,
0.1244191825389862,
0.08927613496780396,
-0.03929894044995308,
0.0869271531701088,
-0.23836751282215118,
-0.1230485662817955,
-0.0034015029668807983,
-0.26416072249412537,
0.10699326545000076,
-0.16853497922420502,
-0.1488913595676422,
0.019954299554228783,
0.300508588552475,
-0.11818203330039978,
-0.3324131369590759,
-0.07628719508647919,
-0.040729817003011703,
0.05261620879173279,
0.1515604555606842,
0.0804353654384613,
-0.0249725803732872,
0.1475975662469864,
-0.23532310128211975,
0.56936115026474,
0.10206080973148346,
-0.35468655824661255,
-0.12081414461135864,
0.009729824028909206,
-0.0027304813265800476,
-0.03590085729956627,
-0.00325580732896924,
0.143880233168602,
-0.022597147151827812,
0.07461024075746536,
-0.028955157846212387,
-0.26357266306877136,
-0.027477692812681198,
-0.07857076823711395,
-0.09633931517601013,
-0.12029989063739777,
-0.15555328130722046,
-0.29465562105178833,
-0.07165466248989105,
0.25825363397598267,
0.07007142156362534,
-0.2339101880788803,
-0.019490236416459084,
-0.3485521376132965,
-0.10269033908843994,
-0.2971504330635071,
0.091864213347435,
-0.13462001085281372,
-0.003497714176774025,
-0.07410305738449097,
0.23034702241420746,
0.0046149976551532745,
0.17118136584758759,
-0.13431164622306824,
0.239270880818367,
0.00676393136382103,
-0.21468646824359894,
-0.06280405819416046,
-0.3486461341381073,
-0.04765375331044197,
-0.031357016414403915,
-0.07313026487827301,
-0.11674375832080841,
0.013390246778726578,
0.1856057047843933,
0.05440027266740799,
0.33967310190200806,
0.19826073944568634,
0.14296983182430267,
0.09177946299314499,
-0.02476978302001953,
0.08944150805473328,
0.6292589902877808,
0.10951115190982819,
-0.3337876796722412,
-0.017874080687761307,
0.05552656948566437,
-0.0824006199836731,
0.15858213603496552,
0.1619730293750763,
0.165976881980896,
0.023976188153028488,
0.006572553887963295,
-0.03899824991822243,
0.7834352850914001,
0.06286199390888214,
0.10689649730920792,
0.21170666813850403,
0.07575660943984985,
0.14567004144191742,
0.12781864404678345,
-0.0115722781047225,
0.24676421284675598,
0.23828621208667755,
-0.0018286369740962982,
0.04694967344403267,
-0.03528641536831856,
-0.04715888202190399,
-0.029712285846471786,
0.027695339173078537,
-0.2634291648864746,
-0.019582966342568398,
0.08192750811576843,
0.035293061286211014,
0.26340344548225403,
-0.18452787399291992,
-0.09100024402141571,
-0.15304230153560638,
0.1866336166858673,
-0.1513843685388565,
0.18870067596435547,
0.10437217354774475,
-0.1555299460887909,
-0.03553418815135956,
-0.27330395579338074,
-0.22162798047065735,
0.4842842221260071,
-0.17139381170272827,
0.39204898476600647,
0.1594657599925995,
-0.25746825337409973,
0.3970540761947632,
-0.028038647025823593,
0.8104516267776489,
0.21291379630565643,
-0.4211801290512085,
-0.028638262301683426,
-0.2258584052324295,
-0.17087791860103607,
-0.2273419052362442,
-0.12629434466362,
0.09724026173353195,
0.4522605538368225,
0.11358049511909485,
0.005989059805870056,
-0.4761468470096588,
0.004667900502681732,
-0.35818323493003845,
-0.03637856990098953,
-0.4048398435115814,
-0.48560890555381775,
0.018057048320770264,
0.14280495047569275,
0.5071237087249756,
0.03626140207052231,
-0.006945354398339987,
-0.09115274250507355,
0.1041959673166275,
-0.1487443745136261,
-0.12254587560892105,
0.1156921237707138,
0.07728390395641327,
-0.11721924692392349,
0.10400587320327759,
-0.010514382272958755,
0.38221898674964905,
-0.0018923915922641754,
0.15986919403076172,
-0.053627073764801025,
-0.07801789045333862,
0.04179316759109497,
-0.027108747512102127,
0.20917630195617676,
0.35071420669555664,
0.08076775074005127,
0.09902139008045197,
0.41246655583381653,
-0.1421196609735489,
0.19475242495536804,
0.07068270444869995,
-0.15015044808387756,
0.21822240948677063,
0.39418739080429077,
-0.23504632711410522,
-0.34954872727394104,
0.43029993772506714,
-0.019386781379580498,
-0.31866058707237244,
0.08513207733631134,
0.24349325895309448,
-0.048674315214157104,
0.44448965787887573,
0.11492599546909332,
0.39889949560165405,
-0.110904261469841,
-0.07777293026447296,
-0.16171777248382568,
-0.10418526828289032,
0.12052817642688751,
-0.40291154384613037,
0.5248382091522217,
-0.31119969487190247,
0.11985106021165848,
0.005003480240702629,
-0.10023440420627594,
0.3664838969707489,
0.1629994660615921,
0.09508319199085236,
0.3050574064254761,
0.15856926143169403,
-0.3206222355365753,
-0.17862586677074432,
0.007632307708263397,
0.33009225130081177,
-0.04184005782008171,
0.4108831286430359,
-0.03211000934243202,
0.3092164993286133,
0.07903379201889038,
0.10207203775644302,
0.13987721502780914,
0.08055859804153442,
0.18936803936958313,
-0.17315125465393066,
-0.07087092101573944,
-0.0722619816660881,
-0.06224902719259262,
0.2389366179704666,
0.03936256468296051,
0.12528082728385925,
-0.31372198462486267,
0.12858006358146667,
-0.4241865575313568,
0.03230945020914078,
0.1189514547586441,
0.19840729236602783,
-0.12280316650867462,
-0.012441231869161129,
-0.5826578140258789,
0.10123167932033539,
0.08577258884906769,
-0.37719976902008057,
0.22421035170555115,
0.21271254122257233,
-0.5110198259353638,
-0.605922520160675,
0.3714042901992798,
-0.13853660225868225,
0.28367409110069275,
-0.2258806973695755,
0.21550071239471436,
0.17331992089748383,
0.06553536653518677,
-0.03135812282562256,
0.17493674159049988,
-0.42025184631347656,
0.8281255960464478,
-0.396049439907074,
-0.031682275235652924,
-0.05457110330462456,
0.14976544678211212,
0.3414725959300995,
-0.4382009506225586,
-0.11657875776290894,
0.06926633417606354,
-0.04899683594703674,
0.05514858663082123,
-0.6684623956680298,
0.34004896879196167,
0.3961498737335205,
-0.09953929483890533,
0.024537423625588417,
-0.1192573755979538,
0.4614187479019165,
-0.2255668044090271,
-0.07792407274246216,
0.07795698940753937,
-0.4053502380847931,
0.04742101579904556,
0.2117534875869751,
-0.14178884029388428,
-0.1425330638885498,
0.152411550283432,
0.36746224761009216,
-0.11450634896755219,
0.14244721829891205,
0.1602405309677124,
-0.12137944996356964,
0.0987837016582489,
-0.02677001804113388,
0.14712375402450562,
-0.11502674221992493,
0.23265701532363892,
-0.10516511648893356,
0.22895190119743347,
-0.04044906795024872,
-0.11344762146472931,
-0.008709082379937172,
-0.07625289261341095,
0.1846819818019867,
0.15554213523864746,
0.14841777086257935,
0.2480739802122116,
-0.2456129938364029,
-0.1298249065876007,
-0.32402002811431885,
-0.06228400021791458,
0.13864925503730774,
0.22845694422721863,
-0.24605883657932281,
-0.02117520198225975,
0.1501861810684204,
-0.4652257263660431,
0.00406603142619133,
0.28448259830474854,
0.2702803611755371,
0.0007918477058410645,
0.1740691363811493,
0.32717210054397583,
-0.3090221881866455,
-0.015194907784461975,
-0.2183743566274643,
0.13945569097995758,
0.46356821060180664,
-0.0350986123085022,
-0.07104932516813278,
-0.0506066158413887,
-0.234930157661438,
-0.19201520085334778,
0.28803935647010803,
0.3202791213989258,
0.14834551513195038,
-0.18408365547657013,
0.06411755830049515,
0.06028110533952713,
-0.09334373474121094,
-0.1296125054359436,
0.4539914131164551,
0.021761031821370125,
0.2962760031223297,
0.3997212052345276,
0.5660529136657715,
0.42461806535720825,
0.13871318101882935,
0.022230911999940872,
0.28630325198173523,
0.5485458374023438,
-0.04577988013625145,
-0.53891521692276,
0.43780529499053955,
0.0864684209227562,
0.28908461332321167,
0.1708836406469345,
0.05948556214570999,
0.5183243751525879,
-0.1221105083823204,
0.3845198452472687,
-0.035169973969459534,
-0.1510501503944397,
-0.022775232791900635,
-0.27773940563201904,
0.34138303995132446,
0.11472421884536743,
-0.31242814660072327,
0.13845986127853394,
-0.24193492531776428,
0.12717221677303314,
-0.09287244081497192,
-0.3350779116153717,
-0.057977333664894104,
0.2171916961669922,
-0.0634487122297287,
-0.1652371883392334,
0.0028553828597068787,
-0.08789253979921341,
0.0626155287027359,
-0.09393282234668732,
0.21775531768798828,
-0.06602174043655396,
0.2109139859676361,
-0.08175432682037354,
0.21366822719573975,
0.19789697229862213,
-0.34521961212158203,
0.37896159291267395,
0.26241326332092285,
0.11277523636817932,
-0.03502309322357178,
-0.2096809595823288,
-0.16029980778694153,
0.20978644490242004,
0.1377248913049698,
0.20744048058986664,
0.32370609045028687,
-0.20160803198814392,
0.18327252566814423,
0.06986676156520844,
0.11480531096458435,
0.12597237527370453,
-0.13292865455150604,
0.03405177965760231,
-0.3651937246322632,
0.045464709401130676,
-0.024625621736049652,
0.045414794236421585,
-0.17024822533130646,
0.0022618621587753296,
0.1939300149679184,
-0.23593690991401672,
-0.26770955324172974,
-0.42741742730140686,
0.07496993988752365,
-0.027833107858896255,
0.14934907853603363,
-0.5244132280349731,
-0.04560423269867897,
0.3148728907108307,
-0.536838948726654,
-0.10921479016542435,
0.07815374433994293,
-0.037436969578266144,
0.075934037566185,
0.4472004175186157,
0.07276301085948944,
0.47407180070877075,
-0.1603996753692627,
-0.10062602162361145,
-0.16126155853271484,
0.17804297804832458,
-0.08468595147132874,
0.1988067328929901,
0.003428615164011717,
0.6647699475288391,
-0.08123014122247696,
-0.17443762719631195,
0.5770103335380554,
0.21790875494480133,
0.3472607731819153,
0.7073603868484497,
0.05440938100218773,
0.2659391462802887,
-0.5533378720283508,
0.03524567931890488,
0.2196698784828186,
0.006106007844209671,
0.2490932047367096,
-0.11516284197568893,
-0.17781898379325867,
-0.14249324798583984,
0.1866247057914734,
0.3504898250102997,
-0.28718483448028564,
0.2843344211578369,
-0.05651392042636871,
0.14562809467315674,
0.032671213150024414,
0.1429024338722229,
-0.10566727817058563,
0.24653078615665436,
-0.34456318616867065,
-0.30079740285873413,
-0.15886439383029938,
-0.3009452223777771,
-0.16754384338855743,
-0.5475099086761475,
0.1511811912059784,
0.5006539821624756,
0.0929722785949707,
-0.4705527126789093,
0.13525070250034332,
0.09617457538843155,
-0.28769931197166443,
0.10020466148853302,
0.24816955626010895,
0.1877289116382599,
0.11011439561843872,
0.18156519532203674,
-0.37372493743896484,
0.2280144989490509,
0.15197670459747314,
-0.33005574345588684,
-0.19968408346176147,
-0.8995206356048584,
0.29183900356292725,
0.23280131816864014,
0.22583377361297607,
-0.3939594328403473,
-0.2377219796180725,
0.1091657280921936,
0.3251700699329376,
-0.07632532715797424,
0.23778818547725677,
-0.10688108205795288,
-0.20496423542499542,
-0.22065727412700653,
-0.7069398164749146,
0.171047180891037,
0.05189819633960724,
-0.03757299482822418,
-0.2172165960073471
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Ok the benchmark is great, not sure why it doesn't speed up the index in your case though. You can try running the benchmark with the same settings as your actual dataset
```
query set: 1e6
source dataset: 1e6
embedding size: 768
index: Flat
topk: 20
GPU: V100
```
Note that you can still pass a FAISS index you built yourself to a dataset using https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/main_classes#datasets.Dataset.add_faiss_index_from_external_arrays | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 66 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Ok the benchmark is great, not sure why it doesn't speed up the index in your case though. You can try running the benchmark with the same settings as your actual dataset
```
query set: 1e6
source dataset: 1e6
embedding size: 768
index: Flat
topk: 20
GPU: V100
```
Note that you can still pass a FAISS index you built yourself to a dataset using https://huggingface.co/docs/datasets/v2.4.0/en/package_reference/main_classes#datasets.Dataset.add_faiss_index_from_external_arrays | [
-0.3129778802394867,
-0.5995798110961914,
-0.12577636539936066,
0.08850856870412827,
-0.21280419826507568,
0.01707787811756134,
0.11629132926464081,
0.24929934740066528,
0.5388679504394531,
0.15496665239334106,
-0.37405896186828613,
-0.06922652572393417,
0.4282967448234558,
0.022725986316800117,
-0.1988246738910675,
-0.017764762043952942,
0.1806473731994629,
-0.1334386169910431,
0.05482976883649826,
0.027580738067626953,
-0.2875653803348541,
0.11944672465324402,
-0.14107553660869598,
-0.21200568974018097,
-0.25207048654556274,
0.20138166844844818,
-0.09148107469081879,
-0.018910862505435944,
0.07518385350704193,
-0.23262789845466614,
-0.13928474485874176,
0.18770721554756165,
-0.041903056204319,
0.5814695358276367,
-0.0001077398337656632,
-0.051761068403720856,
-0.02440103143453598,
-0.05990266054868698,
-0.010664505884051323,
0.17574799060821533,
-0.035458821803331375,
0.162560373544693,
-0.0244557224214077,
-0.04710641875863075,
-0.6163609027862549,
-0.0646945983171463,
-0.009561436250805855,
-0.5135377645492554,
-0.0827527642250061,
0.10480555891990662,
0.22296233475208282,
0.20199760794639587,
0.043185148388147354,
-0.26855942606925964,
-0.01975838840007782,
-0.24331144988536835,
-0.1369408220052719,
0.02346751093864441,
0.27834171056747437,
0.10084307193756104,
-0.10366343706846237,
0.5362625122070312,
0.04171593487262726,
0.14374278485774994,
-0.0755615159869194,
0.0818476527929306,
0.03380662947893143,
-0.10083243250846863,
0.1328493356704712,
0.1479344666004181,
-0.17516985535621643,
-0.07023360580205917,
-0.35847237706184387,
-0.38858315348625183,
-0.05422182381153107,
-0.0970286875963211,
-0.09065089374780655,
-0.00030750222504138947,
-0.14514385163784027,
-0.025712545961141586,
0.04756062105298042,
-0.061057575047016144,
0.1501225084066391,
-0.10657037794589996,
0.022907555103302002,
0.3294696807861328,
-0.03177512064576149,
0.12036369740962982,
0.4715878665447235,
0.08141426742076874,
-0.4389106035232544,
-0.09842738509178162,
0.2336438000202179,
-0.08895839750766754,
-0.8809564113616943,
0.15213342010974884,
0.24780359864234924,
-0.2920849621295929,
0.07961804419755936,
-0.06367157399654388,
-0.1971435695886612,
0.3233770728111267,
0.14227183163166046,
0.0769876167178154,
-0.22915419936180115,
0.06329561769962311,
-0.12684670090675354,
-0.10963756591081619,
-0.1242920458316803,
-0.04727360978722572,
-0.1570049226284027,
-0.05099782347679138,
0.18609128892421722,
-0.2293524444103241,
-0.6538821458816528,
-0.2020530104637146,
0.02678186073899269,
-0.039023879915475845,
-0.2736456096172333,
-0.17424693703651428,
0.009246937930583954,
-0.21246437728405,
0.23128806054592133,
0.4878404140472412,
0.14182867109775543,
-0.07731461524963379,
-0.1930820643901825,
0.11138587445020676,
-0.36227452754974365,
-0.05979163944721222,
-0.2621620297431946,
-0.06518103182315826,
-0.038180045783519745,
0.37850087881088257,
0.17080961167812347,
-0.34733372926712036,
0.07314107567071915,
0.12641286849975586,
0.14498001337051392,
0.1044488251209259,
0.11369968950748444,
-0.2863709032535553,
0.15953105688095093,
0.1559627652168274,
0.1105857789516449,
-0.03162286430597305,
0.0631287693977356,
0.1949561983346939,
-0.2676520347595215,
-0.041590094566345215,
-0.10730629414319992,
-0.1290379911661148,
0.08292461186647415,
0.15907984972000122,
0.09309753030538559,
-0.17315131425857544,
-0.045533277094364166,
0.647753894329071,
-0.08636883646249771,
0.23658615350723267,
0.09425832331180573,
0.07997852563858032,
-0.30994659662246704,
-0.045257143676280975,
0.5058466196060181,
0.26013022661209106,
-0.001879967749118805,
-0.025533482432365417,
0.19061227142810822,
0.11133955419063568,
-0.10051778703927994,
0.674674391746521,
0.000722356082405895,
-0.09512435644865036,
-0.24564261734485626,
0.3981117606163025,
0.12995867431163788,
-0.45098620653152466,
-0.09713643044233322,
-0.016014544293284416,
-0.2259950041770935,
0.06471192091703415,
0.32199275493621826,
0.049711570143699646,
0.10246340930461884,
0.17445844411849976,
0.30632996559143066,
0.2919437885284424,
0.061559319496154785,
0.1079792007803917,
-0.32010048627853394,
-0.1126352921128273,
0.16203221678733826,
0.3492535650730133,
-0.10011102259159088,
-0.2155020833015442,
-0.19033783674240112,
-0.8194972276687622,
0.2747061550617218,
-0.21422043442726135,
-0.034146226942539215,
0.04941792041063309,
0.36291053891181946,
0.15030428767204285,
0.20833660662174225,
0.09423012286424637,
-0.011898204684257507,
0.3573557734489441,
-0.046691685914993286,
0.16204220056533813,
0.18553408980369568,
-0.15283940732479095,
0.2180514931678772,
-0.1482689529657364,
-0.2580229640007019,
-0.12759262323379517,
0.11692723631858826,
0.0024543777108192444,
0.15838722884655,
-0.08418618142604828,
-0.11097680777311325,
0.19310012459754944,
-0.002550000324845314,
0.0006804006407037377,
-0.26198631525039673,
0.09260714054107666,
-0.11452358216047287,
-0.08797356486320496,
-0.17946256697177887,
-0.00754595547914505,
0.22460386157035828,
-0.2617342472076416,
-0.040937356650829315,
0.26279619336128235,
0.10312823951244354,
-0.04184502363204956,
0.603145182132721,
0.08763352036476135,
0.09300962835550308,
-0.035131532698869705,
0.030962344259023666,
0.1935487985610962,
-0.011952157132327557,
-0.1622217297554016,
-0.20460262894630432,
0.4687681198120117,
0.15630510449409485,
0.30731114745140076,
-0.046030256897211075,
-0.26832592487335205,
0.1073584109544754,
0.09771308302879333,
0.07731552422046661,
-0.0007883980870246887,
0.14602689445018768,
-0.07912667095661163,
0.15146414935588837,
0.054989274591207504,
-0.5787972807884216,
0.4824645221233368,
0.06159884110093117,
0.12364724278450012,
-0.005040176212787628,
0.11551669239997864,
0.050600938498973846,
-0.11173518002033234,
-0.014863872900605202,
-0.37390878796577454,
0.19117313623428345,
0.43190526962280273,
0.19899152219295502,
-0.16244721412658691,
-0.07221900671720505,
-0.19655510783195496,
0.1291401982307434,
-0.0872662216424942,
-0.08125519007444382,
0.03638055920600891,
0.019036339595913887,
-0.24406369030475616,
-0.2268204689025879,
-0.18827524781227112,
0.030402811244130135,
0.026627186685800552,
-0.16992808878421783,
-0.035530343651771545,
0.003005707636475563,
-0.1134558618068695,
-0.12520159780979156,
-0.1415947526693344,
-0.15579119324684143,
0.02779989130795002,
0.22019581496715546,
0.16577404737472534,
-0.043453820049762726,
0.32638218998908997,
-0.20035555958747864,
0.3130991756916046,
0.09776864945888519,
-0.2705596387386322,
-0.17457689344882965,
0.0918225646018982,
-0.01633606106042862,
0.07919679582118988,
0.19484573602676392,
0.19648246467113495,
0.24650989472866058,
0.15713299810886383,
0.021345384418964386,
-0.2569939196109772,
-0.15232804417610168,
-0.2195962369441986,
-0.2608986496925354,
0.058576129376888275,
-0.10462303459644318,
-0.21745817363262177,
-0.032153185456991196,
0.0851682797074318,
0.31715288758277893,
-0.2677649259567261,
-0.04681140556931496,
-0.2808211147785187,
-0.1463690847158432,
-0.09276992082595825,
0.05917809531092644,
-0.1828751564025879,
0.048177964985370636,
-0.37741440534591675,
0.2947354018688202,
-0.15196143090724945,
0.048624277114868164,
-0.10330671072006226,
0.28797343373298645,
0.1463237702846527,
-0.20457836985588074,
-0.022725356742739677,
-0.32019275426864624,
-0.12922322750091553,
0.09051357209682465,
-0.043570708483457565,
-0.2206488400697708,
-0.1307559311389923,
0.1305631697177887,
0.15125033259391785,
0.15133662521839142,
0.06582489609718323,
0.006821309216320515,
-0.18154044449329376,
0.039182621985673904,
0.08184801042079926,
0.31108561158180237,
0.17911994457244873,
-0.3299105167388916,
-0.2367798388004303,
0.10783744603395462,
-0.22972460091114044,
0.2333381474018097,
-0.02272932603955269,
0.002553313970565796,
-0.14263799786567688,
0.13018634915351868,
0.17309798300266266,
0.7224957346916199,
0.17359425127506256,
0.010067272931337357,
0.24866151809692383,
-0.166354700922966,
0.2247137874364853,
-0.20396143198013306,
-0.32709330320358276,
0.23051884770393372,
0.18570677936077118,
0.03702192008495331,
0.06562220305204391,
-0.09204977750778198,
-0.0367838516831398,
-0.009442638605833054,
-0.025831028819084167,
-0.06817035377025604,
-0.18132330477237701,
0.1826910525560379,
0.2294122725725174,
0.06099015474319458,
-0.08172404766082764,
0.12989869713783264,
-0.2719644606113434,
0.050113383680582047,
-0.0808207243680954,
0.012250266969203949,
-0.007918782532215118,
-0.22175730764865875,
-0.08959592878818512,
0.008550066500902176,
-0.5803850889205933,
0.4812021851539612,
-0.10379502177238464,
0.26083144545555115,
0.1461905837059021,
-0.23101526498794556,
0.3205621838569641,
-0.034764450043439865,
0.7207174897193909,
0.20291687548160553,
-0.2902447581291199,
0.0879136472940445,
-0.445628821849823,
-0.5101467370986938,
-0.08825848251581192,
-0.04100167378783226,
0.09209951013326645,
0.34335267543792725,
0.36944928765296936,
-0.27363157272338867,
-0.48149624466896057,
0.11928901076316833,
-0.3047794997692108,
0.07920297980308533,
-0.35652512311935425,
-0.5021708607673645,
-0.1308193802833557,
0.06962230056524277,
0.4678390622138977,
0.02230575866997242,
0.18355238437652588,
0.09660842269659042,
-0.025944510474801064,
-0.22185438871383667,
-0.10011088103055954,
0.24047315120697021,
0.11863286793231964,
0.12363141030073166,
0.13464348018169403,
0.32083645462989807,
0.39765337109565735,
0.0974363386631012,
0.18008923530578613,
0.15993592143058777,
-0.006989806890487671,
0.05863448232412338,
-0.02168763056397438,
0.23743732273578644,
0.1748274862766266,
0.328609824180603,
0.1804589033126831,
0.45226746797561646,
-0.1259312778711319,
0.41912567615509033,
-0.21088507771492004,
-0.03644188120961189,
0.1207004189491272,
0.29401493072509766,
-0.11770715564489365,
-0.2142997682094574,
0.5131727457046509,
-0.055174555629491806,
-0.0774322897195816,
0.24968595802783966,
0.4092826843261719,
-0.1284886598587036,
0.3203330636024475,
0.09217575192451477,
0.5544865727424622,
-0.2623387575149536,
0.03645441308617592,
0.15218788385391235,
-0.21965713798999786,
0.13214556872844696,
-0.32674771547317505,
0.38123124837875366,
-0.29033514857292175,
-0.16111861169338226,
0.21636992692947388,
-0.004370726644992828,
0.24965181946754456,
-0.060523584485054016,
-0.05339605361223221,
0.24284681677818298,
0.2414758950471878,
-0.15331684052944183,
-0.2939639985561371,
0.3246840834617615,
0.14294829964637756,
-0.33101150393486023,
-0.015420593321323395,
0.16789011657238007,
0.2554304599761963,
0.1072894036769867,
0.21961194276809692,
-0.036866024136543274,
-0.05592323839664459,
0.0760260820388794,
-0.1263439655303955,
-0.06614294648170471,
-0.09270867705345154,
0.08126875758171082,
0.12476065754890442,
-0.12631604075431824,
0.15901698172092438,
-0.369418740272522,
0.1077098548412323,
-0.3457394242286682,
-0.16101577877998352,
0.20859800279140472,
-0.08383684605360031,
-0.04106462374329567,
0.05485890433192253,
-0.7029553055763245,
-0.008101874962449074,
0.10722721368074417,
-0.5194223523139954,
0.05645313113927841,
0.2833963632583618,
-0.4536733031272888,
-0.256144642829895,
0.1533682644367218,
-0.346848726272583,
0.10793060809373856,
-0.24963702261447906,
0.05529676377773285,
0.08921898901462555,
-0.06112999469041824,
0.14172999560832977,
0.11323684453964233,
-0.3517098128795624,
0.45928260684013367,
-0.10838852822780609,
-0.2510324716567993,
-0.17213574051856995,
0.6067516207695007,
0.057495079934597015,
-0.12687645852565765,
0.029801884666085243,
0.14878463745117188,
-0.12092968821525574,
-0.07407060265541077,
-0.42504385113716125,
0.45952123403549194,
0.1259540319442749,
-0.05240772292017937,
-0.05272892490029335,
-0.22525906562805176,
0.37602663040161133,
-0.08845840394496918,
0.08858536183834076,
-0.15279391407966614,
-0.22605258226394653,
0.2014656960964203,
-0.04039137810468674,
-0.023421816527843475,
-0.11537688970565796,
0.30794429779052734,
-0.0018645264208316803,
0.016069399192929268,
0.07327044010162354,
0.1873544603586197,
-0.3601681888103485,
0.10307767242193222,
-0.12555398046970367,
0.002671223133802414,
-0.05640551447868347,
-0.1846483051776886,
0.22605736553668976,
0.15594971179962158,
0.19081811606884003,
0.018711665645241737,
-0.19572441279888153,
-0.2831556797027588,
0.06728464365005493,
0.050020769238471985,
-0.04106694459915161,
0.13216456770896912,
-0.1365552842617035,
-0.01974887028336525,
-0.31413280963897705,
-0.3146379292011261,
0.10641376674175262,
0.27022650837898254,
-0.12494118511676788,
-0.09112635999917984,
-0.02023101970553398,
-0.5181231498718262,
0.11213600635528564,
0.18322893977165222,
0.19048954546451569,
0.037056904286146164,
0.08164619654417038,
0.24050146341323853,
-0.2590424120426178,
-0.06317271292209625,
-0.022879987955093384,
0.16869165003299713,
0.228272944688797,
0.03576810285449028,
-0.19064974784851074,
0.006273310631513596,
-0.27067071199417114,
0.06042471528053284,
0.4979923665523529,
0.256305068731308,
0.13738517463207245,
-0.15237149596214294,
-0.02852199226617813,
0.2868013083934784,
-0.2665157914161682,
-0.05523616075515747,
0.548612117767334,
-0.0884041041135788,
0.5706925392150879,
0.26060882210731506,
0.47643986344337463,
0.45885682106018066,
0.12219125032424927,
-0.004415819421410561,
0.20978271961212158,
0.36151838302612305,
-0.15642982721328735,
-0.5145516395568848,
0.21067853271961212,
-0.0745944082736969,
0.37717872858047485,
0.1519237607717514,
0.33553415536880493,
0.5486708283424377,
-0.2003268599510193,
0.44825229048728943,
-0.2322627305984497,
0.23645417392253876,
-0.2084091305732727,
-0.19649940729141235,
0.38668063282966614,
0.11905370652675629,
-0.19414937496185303,
-0.022886857390403748,
-0.2507513761520386,
0.41988247632980347,
-0.23901601135730743,
-0.37633365392684937,
-0.18631179630756378,
0.2307494729757309,
-0.14797359704971313,
-0.32923585176467896,
0.2937091290950775,
-0.09215213358402252,
-0.08355417847633362,
0.03990591689944267,
0.16488836705684662,
-0.007188849151134491,
0.10873568058013916,
-0.1549244225025177,
0.1689780354499817,
0.06860615313053131,
-0.3100670874118805,
0.31078970432281494,
0.3089376389980316,
0.0644502192735672,
0.024241331964731216,
0.09418385475873947,
-0.1195620745420456,
0.1765347123146057,
0.31931614875793457,
0.2411239743232727,
0.028753528371453285,
-0.2539719045162201,
0.18764245510101318,
0.024654289707541466,
0.050670213997364044,
-0.03252748027443886,
-0.05706404894590378,
-0.11357271671295166,
-0.23917214572429657,
0.28758931159973145,
0.14635328948497772,
-0.2071332484483719,
-0.3432885408401489,
-0.12358658015727997,
0.2281997799873352,
-0.2917229235172272,
-0.2437984049320221,
-0.4334360659122467,
0.12480657547712326,
-0.07924270629882812,
0.050568655133247375,
-0.40741634368896484,
0.06989897787570953,
0.21674895286560059,
-0.4294551610946655,
-0.011144179850816727,
0.06216522678732872,
0.1064554899930954,
0.05940154194831848,
0.5307345986366272,
0.009496510028839111,
0.26823505759239197,
-0.3151283860206604,
-0.10810612142086029,
-0.408231258392334,
0.09915532916784286,
-0.20831617712974548,
0.12387007474899292,
0.03388311341404915,
0.7033966779708862,
0.037471067160367966,
-0.06533566117286682,
0.5101116299629211,
0.14007379114627838,
0.371876984834671,
0.4396580457687378,
-0.11102882027626038,
0.3113307058811188,
-0.5168402791023254,
-0.2179468721151352,
0.285801500082016,
-0.07712173461914062,
0.23586948215961456,
-0.1581527292728424,
0.06894022226333618,
-0.15504862368106842,
0.31588268280029297,
0.14510509371757507,
-0.2829260230064392,
0.30257081985473633,
-0.04599766433238983,
0.11988397687673569,
0.08853906393051147,
-0.018976155668497086,
-0.22415253520011902,
0.10878206044435501,
-0.2909293472766876,
-0.11670137196779251,
-0.026444051414728165,
0.011927839368581772,
-0.06007217615842819,
-0.6173539161682129,
-0.064277283847332,
0.6207267045974731,
0.13183970749378204,
-0.39036452770233154,
0.11309320479631424,
0.23055315017700195,
-0.09002245962619781,
0.11776144802570343,
0.0642315000295639,
0.40019193291664124,
0.11486390233039856,
0.23731790482997894,
-0.3085094094276428,
-0.0823526382446289,
0.3477659225463867,
-0.28339090943336487,
-0.06772264838218689,
-0.5337831974029541,
0.33925026655197144,
0.3530109226703644,
0.1572326272726059,
-0.5309265851974487,
-0.11431949585676193,
0.09035208821296692,
0.26826101541519165,
-0.14363133907318115,
0.3358217179775238,
-0.09394411742687225,
-0.1838662028312683,
-0.1388767510652542,
-0.38415423035621643,
0.15723732113838196,
0.04978560656309128,
-0.059160105884075165,
-0.049035973846912384
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | > Here is a runnable script. Multi-GPU searching still does not work in my experiments.
>
> ```python
> import os
> from tqdm import tqdm
> import numpy as np
> import datasets
> from datasets import Dataset
>
> class DPRSelector:
>
> def __init__(self, source, target, index_name, gpu=None):
> self.source = source
> self.target = target
> self.index_name = index_name
>
> cache_path = 'embedding.faiss'
>
> if not os.path.exists(cache_path):
> self.source.add_faiss_index(
> column="embedding",
> index_name=index_name,
> device=gpu,
> )
> self.source.save_faiss_index(index_name, cache_path)
> else:
> self.source.load_faiss_index(
> index_name,
> cache_path,
> device=gpu
> )
> print('index builded!')
>
> def build_dataset(self, top_k, batch_size):
> print('start search')
>
> for i in tqdm(range(0, len(self.target), batch_size)):
> if i + batch_size >= len(self.target):
> batched_queries = self.target[i:]
> else:
> batched_queries = self.target[i:i+batch_size]
>
>
> batched_query_embeddings = np.stack([i for i in batched_queries['embedding']], axis=0)
> search_res = self.source.get_nearest_examples_batch(
> self.index_name,
> batched_query_embeddings,
> k=top_k
> )
>
> print('finish search')
>
>
> def get_pseudo_dataset():
> pseudo_dict = {"embedding": np.zeros((1000000, 768), dtype=np.float32)}
> print('generate pseudo data')
>
> dataset = Dataset.from_dict(pseudo_dict)
> def list_to_array(data):
> return {"embedding": [np.array(vector, dtype=np.float32) for vector in data["embedding"]]}
> dataset.set_transform(list_to_array, columns='embedding', output_all_columns=True)
>
> print('build dataset')
> return dataset
>
>
>
> if __name__=="__main__":
>
> np.random.seed(42)
>
>
> source_dataset = get_pseudo_dataset()
> target_dataset = get_pseudo_dataset()
>
> gpu = [0,1,2,3,4,5,6,7]
> selector = DPRSelector(source_dataset, target_dataset, "embedding", gpu=gpu)
>
> selector.build_dataset(top_k=20, batch_size=32)
> ```
By the way, have you run this toy example and replicated my experiment results? I think it is a more direct way to figure this out :) | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 270 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
> Here is a runnable script. Multi-GPU searching still does not work in my experiments.
>
> ```python
> import os
> from tqdm import tqdm
> import numpy as np
> import datasets
> from datasets import Dataset
>
> class DPRSelector:
>
> def __init__(self, source, target, index_name, gpu=None):
> self.source = source
> self.target = target
> self.index_name = index_name
>
> cache_path = 'embedding.faiss'
>
> if not os.path.exists(cache_path):
> self.source.add_faiss_index(
> column="embedding",
> index_name=index_name,
> device=gpu,
> )
> self.source.save_faiss_index(index_name, cache_path)
> else:
> self.source.load_faiss_index(
> index_name,
> cache_path,
> device=gpu
> )
> print('index builded!')
>
> def build_dataset(self, top_k, batch_size):
> print('start search')
>
> for i in tqdm(range(0, len(self.target), batch_size)):
> if i + batch_size >= len(self.target):
> batched_queries = self.target[i:]
> else:
> batched_queries = self.target[i:i+batch_size]
>
>
> batched_query_embeddings = np.stack([i for i in batched_queries['embedding']], axis=0)
> search_res = self.source.get_nearest_examples_batch(
> self.index_name,
> batched_query_embeddings,
> k=top_k
> )
>
> print('finish search')
>
>
> def get_pseudo_dataset():
> pseudo_dict = {"embedding": np.zeros((1000000, 768), dtype=np.float32)}
> print('generate pseudo data')
>
> dataset = Dataset.from_dict(pseudo_dict)
> def list_to_array(data):
> return {"embedding": [np.array(vector, dtype=np.float32) for vector in data["embedding"]]}
> dataset.set_transform(list_to_array, columns='embedding', output_all_columns=True)
>
> print('build dataset')
> return dataset
>
>
>
> if __name__=="__main__":
>
> np.random.seed(42)
>
>
> source_dataset = get_pseudo_dataset()
> target_dataset = get_pseudo_dataset()
>
> gpu = [0,1,2,3,4,5,6,7]
> selector = DPRSelector(source_dataset, target_dataset, "embedding", gpu=gpu)
>
> selector.build_dataset(top_k=20, batch_size=32)
> ```
By the way, have you run this toy example and replicated my experiment results? I think it is a more direct way to figure this out :) | [
-0.2644190788269043,
-0.5796562433242798,
-0.12350831925868988,
0.022541087120771408,
-0.39932119846343994,
0.061722882091999054,
0.24263951182365417,
0.09434978663921356,
0.5489586591720581,
0.029109321534633636,
-0.22996775805950165,
-0.09751355648040771,
0.46716755628585815,
-0.21397936344146729,
-0.13458716869354248,
0.023227209225296974,
0.36057010293006897,
-0.23206201195716858,
0.029659155756235123,
-0.1402539610862732,
-0.5616128444671631,
0.14689241349697113,
-0.34034281969070435,
-0.16913653910160065,
-0.21958528459072113,
0.16071327030658722,
-0.22298987209796906,
-0.00720137357711792,
0.1323704868555069,
-0.2088232785463333,
-0.31641027331352234,
0.1960294097661972,
0.1663651466369629,
0.4836205244064331,
-0.00012690031144302338,
-0.12034576386213303,
-0.09973959624767303,
-0.019498229026794434,
0.12724564969539642,
0.32970839738845825,
-0.06734208017587662,
0.1314280480146408,
0.022124426439404488,
-0.04665091633796692,
-0.35237643122673035,
-0.06390085816383362,
0.150366872549057,
-0.7220795750617981,
-0.16995559632778168,
-0.0007956074550747871,
0.027585022151470184,
0.0836675688624382,
-0.0032103657722473145,
-0.1929776519536972,
-0.12615656852722168,
-0.4187038540840149,
-0.06871748715639114,
-0.13311411440372467,
0.4998415410518646,
-0.012638372369110584,
-0.011066325008869171,
0.4553717374801636,
0.028124390169978142,
0.11962369084358215,
-0.14682161808013916,
0.08549990504980087,
0.4580840766429901,
-0.3756605088710785,
0.17049163579940796,
-0.16165393590927124,
-0.0758739784359932,
-0.12852653861045837,
-0.29954949021339417,
-0.37409064173698425,
-0.13899683952331543,
-0.06276409327983856,
-0.146907776594162,
0.015565060079097748,
-0.27248191833496094,
-0.1728167086839676,
0.19032247364521027,
-0.221079483628273,
0.10055467486381531,
0.0012198910117149353,
0.1303759664297104,
0.5268245935440063,
0.07371920347213745,
0.25316473841667175,
0.25702184438705444,
0.10841894149780273,
-0.17561717331409454,
-0.23594000935554504,
0.30609455704689026,
0.09531823545694351,
-0.9339761734008789,
0.16516701877117157,
0.27959972620010376,
-0.4339055120944977,
0.050719186663627625,
0.006812375038862228,
-0.27898702025413513,
0.17294183373451233,
0.06259753555059433,
0.1823752224445343,
-0.04666048660874367,
-0.08900526165962219,
-0.06530294567346573,
-0.1475038230419159,
-0.21965061128139496,
-0.20249830186367035,
-0.06656360626220703,
0.08996576070785522,
0.08073735237121582,
-0.31950417160987854,
-0.5729942917823792,
-0.07726488262414932,
0.02590058371424675,
0.16203641891479492,
-0.14077825844287872,
-0.08827641606330872,
-0.06617863476276398,
-0.20107394456863403,
0.13449153304100037,
0.3483203649520874,
0.12394271790981293,
0.04495276138186455,
-0.24408173561096191,
0.25923216342926025,
-0.20840105414390564,
-0.12407097220420837,
-0.06998772919178009,
-0.2869788706302643,
0.03955402597784996,
0.3225157558917999,
0.07711245119571686,
-0.15499871969223022,
-0.07243774086236954,
0.06347696483135223,
0.2122534066438675,
0.15759924054145813,
0.1860327124595642,
-0.3336038887500763,
0.42993658781051636,
0.25098440051078796,
0.25989267230033875,
0.025939418002963066,
0.13609209656715393,
0.21500398218631744,
-0.3095298409461975,
0.22779026627540588,
-0.16363802552223206,
0.0364593081176281,
0.16171854734420776,
-0.0013225115835666656,
0.3941804766654968,
-0.20445294678211212,
-0.05856902152299881,
0.6314762830734253,
0.027171261608600616,
0.2645586133003235,
0.3224277198314667,
-0.17631545662879944,
0.026187893003225327,
-0.2270115166902542,
0.36424198746681213,
0.22274149954319,
-0.04980858042836189,
-0.1853330433368683,
0.3090827465057373,
-0.0426303930580616,
-0.106841541826725,
0.5612115263938904,
0.16254229843616486,
-0.073130302131176,
-0.246030792593956,
0.6540113091468811,
0.3585931360721588,
-0.5905303955078125,
0.16545724868774414,
-0.07024241983890533,
-0.15005576610565186,
0.018594631925225258,
0.2006940096616745,
0.12801502645015717,
0.028845559805631638,
0.047357503324747086,
0.36227527260780334,
0.4256731867790222,
-0.15432189404964447,
-0.006112765520811081,
-0.08864891529083252,
0.01781807653605938,
0.10966313630342484,
0.16419994831085205,
0.2361043244600296,
-0.15762859582901,
-0.0738769993185997,
-1.0251470804214478,
0.4392114281654358,
-0.047723572701215744,
0.03173242509365082,
-0.1399725079536438,
0.466728538274765,
0.32441455125808716,
0.3673492670059204,
0.16663044691085815,
0.023257415741682053,
0.21808302402496338,
-0.2149069607257843,
-0.046121321618556976,
0.15416577458381653,
-0.12442522495985031,
0.49890828132629395,
-0.04523715376853943,
-0.2948669195175171,
0.05746474489569664,
-0.07457258552312851,
0.1483609676361084,
-0.008480874821543694,
-0.23976513743400574,
-0.31757134199142456,
0.10861539095640182,
0.12742038071155548,
0.014351419173181057,
-0.38247784972190857,
0.035634808242321014,
-0.06243401765823364,
-0.007679332979023457,
-0.44194233417510986,
-0.050007760524749756,
0.3161627948284149,
-0.33786875009536743,
0.09879890084266663,
0.4184214174747467,
0.21063175797462463,
-0.33193421363830566,
0.46702152490615845,
0.19693820178508759,
0.038370318710803986,
0.057763416320085526,
0.029833665117621422,
0.08221550285816193,
0.049694985151290894,
-0.19158175587654114,
0.1609436422586441,
0.33463096618652344,
0.10490182042121887,
0.3754536211490631,
-0.05578705295920372,
-0.24607092142105103,
0.14939163625240326,
0.13385485112667084,
0.061882734298706055,
0.11188440024852753,
-0.14499546587467194,
-0.08150273561477661,
0.013741560280323029,
-0.2754155993461609,
-0.6495456099510193,
0.44629043340682983,
-0.10627579689025879,
0.05802539363503456,
0.11662382632493973,
-0.24338829517364502,
-0.07848002761602402,
0.075293630361557,
-0.06241585314273834,
-0.35929808020591736,
0.2358432114124298,
0.17226232588291168,
0.24301722645759583,
-0.10191579908132553,
-0.05214796960353851,
-0.12717729806900024,
0.11703530699014664,
0.10819923132658005,
-0.08831439912319183,
0.14299315214157104,
-0.2199900895357132,
-0.07461175322532654,
0.0348057746887207,
-0.22837790846824646,
0.09361609071493149,
-0.23602429032325745,
-0.15966716408729553,
0.08044907450675964,
0.1503700464963913,
-0.039194002747535706,
-0.21440662443637848,
-0.19900989532470703,
-0.01612439751625061,
-0.01846275106072426,
0.16967248916625977,
0.006863582879304886,
-0.03089308924973011,
0.2550724744796753,
-0.26349690556526184,
0.5621783137321472,
0.16077770292758942,
-0.37225186824798584,
-0.06440208107233047,
0.03249875828623772,
0.006531998515129089,
-0.04374360665678978,
0.06509942561388016,
0.08362709730863571,
0.08452234417200089,
0.07499973475933075,
-0.03506764769554138,
-0.3356243669986725,
-0.029243871569633484,
-0.09119915962219238,
-0.18329431116580963,
-0.05403892695903778,
-0.19078567624092102,
-0.38815581798553467,
-0.12377218157052994,
0.25154298543930054,
0.11937867105007172,
-0.22396311163902283,
0.030590495094656944,
-0.3136597275733948,
-0.03344559296965599,
-0.310706228017807,
0.05505778267979622,
-0.11723827570676804,
0.03129636496305466,
-0.1362355649471283,
0.10438014566898346,
0.0025673024356365204,
0.16206736862659454,
-0.11046239733695984,
0.25584617257118225,
0.036547716706991196,
-0.1770782321691513,
-0.1585278958082199,
-0.29674339294433594,
-0.03971505165100098,
0.06677830964326859,
-0.1404656171798706,
-0.13139021396636963,
0.023509029299020767,
0.11962778866291046,
0.12914693355560303,
0.383034884929657,
0.212943896651268,
0.12486720830202103,
0.1390456110239029,
0.13128764927387238,
0.11645936965942383,
0.5919802188873291,
0.1400148868560791,
-0.2531721889972687,
-0.01528974436223507,
0.09774351865053177,
-0.0661991685628891,
0.11443322896957397,
0.17524489760398865,
0.1735801100730896,
-0.005355376750230789,
0.04747088998556137,
-0.020312048494815826,
0.7896515130996704,
0.07298301160335541,
0.09928730875253677,
0.21480514109134674,
0.012050297111272812,
0.20719896256923676,
0.09859813749790192,
-0.11314710974693298,
0.19306345283985138,
0.2175498902797699,
-0.012613460421562195,
0.005466639995574951,
-0.07422864437103271,
-0.060583002865314484,
-0.02602378837764263,
0.14513449370861053,
-0.346687912940979,
-0.11850456893444061,
0.10542488843202591,
-0.05136033892631531,
0.27401062846183777,
-0.20700272917747498,
-0.0040520429611206055,
-0.16138263046741486,
0.28976303339004517,
-0.16762292385101318,
0.24598190188407898,
0.07932485640048981,
-0.13596795499324799,
0.05392623320221901,
-0.1485653817653656,
-0.2771276831626892,
0.5559102892875671,
-0.18695296347141266,
0.3870701193809509,
0.16145631670951843,
-0.30862686038017273,
0.28428900241851807,
-0.04988272115588188,
0.7179129123687744,
0.08390101045370102,
-0.35077452659606934,
0.12514518201351166,
-0.2688756585121155,
-0.301876038312912,
-0.2367914617061615,
-0.19391894340515137,
0.13222302496433258,
0.3174412250518799,
0.1363990306854248,
0.011552155017852783,
-0.3961867690086365,
-0.003012441098690033,
-0.32370972633361816,
-0.04625619947910309,
-0.3276827931404114,
-0.45778757333755493,
-0.11604894697666168,
0.055210381746292114,
0.48543137311935425,
0.06328722834587097,
0.009658252820372581,
-0.03592686355113983,
0.16522784531116486,
-0.2586948275566101,
-0.14837686717510223,
0.11341126263141632,
0.1391908824443817,
-0.09939891844987869,
0.11442103981971741,
0.03372523561120033,
0.3689712584018707,
-0.009660907089710236,
0.28283369541168213,
0.011535923928022385,
-0.04352566972374916,
-0.030846089124679565,
0.061164893209934235,
0.1303703635931015,
0.34405359625816345,
0.16672706604003906,
0.1151047945022583,
0.3386007249355316,
-0.14494529366493225,
0.20609983801841736,
0.10120143741369247,
-0.17828384041786194,
0.2272784560918808,
0.3530934154987335,
-0.22203348577022552,
-0.34228572249412537,
0.396079421043396,
-0.08103047311306,
-0.2755895256996155,
0.15351258218288422,
0.18572375178337097,
-0.03313564509153366,
0.41057270765304565,
0.11384664475917816,
0.40621301531791687,
-0.05340510606765747,
-0.06984969973564148,
0.06438105553388596,
-0.038894277065992355,
0.1455366015434265,
-0.42123299837112427,
0.6042394042015076,
-0.3128593862056732,
0.04559771344065666,
-0.013651455752551556,
-0.12030540406703949,
0.387723833322525,
0.14966940879821777,
0.012310396879911423,
0.3001405894756317,
0.15127889811992645,
-0.2599416673183441,
-0.16339774429798126,
-0.05891319736838341,
0.2156517654657364,
-0.15765516459941864,
0.28230056166648865,
-0.031168749555945396,
0.33435750007629395,
0.028854887932538986,
0.07520824670791626,
0.11702863872051239,
0.07076811790466309,
0.08542203903198242,
-0.15683960914611816,
-0.09069967269897461,
-0.1305510401725769,
0.03425979986786842,
0.2813480794429779,
0.01444515585899353,
0.09647190570831299,
-0.3399098515510559,
0.18659180402755737,
-0.4279528558254242,
0.045837175101041794,
0.10834625363349915,
0.269613116979599,
-0.13680043816566467,
-0.044194262474775314,
-0.6955673098564148,
0.2222735434770584,
0.13978499174118042,
-0.37476208806037903,
0.2534619867801666,
0.25724220275878906,
-0.43942511081695557,
-0.4620818495750427,
0.4050440192222595,
-0.1520017683506012,
0.3203604817390442,
-0.2255152463912964,
0.2176441252231598,
0.1747974306344986,
0.031451065093278885,
-0.05422748252749443,
0.13657957315444946,
-0.4256116449832916,
0.7009127140045166,
-0.42413634061813354,
-0.08701007068157196,
-0.057065222412347794,
0.15552771091461182,
0.2025792896747589,
-0.4302516281604767,
-0.06541632115840912,
0.12914477288722992,
-0.08702529221773148,
-0.006333243101835251,
-0.5809779167175293,
0.3047420084476471,
0.3284396231174469,
-0.026923492550849915,
0.0315881222486496,
-0.08045461028814316,
0.4242478311061859,
-0.1931169629096985,
-0.018892429769039154,
-0.026830598711967468,
-0.4562798738479614,
0.03730715811252594,
0.1147838607430458,
-0.07602269947528839,
-0.1418232023715973,
0.16075699031352997,
0.28399911522865295,
-0.006826378405094147,
0.1799316555261612,
0.1730177402496338,
-0.13556650280952454,
0.07483184337615967,
-0.01741967163980007,
0.13797958195209503,
-0.09881952404975891,
0.1743984818458557,
-0.05308512598276138,
0.21863804757595062,
-0.04476548731327057,
-0.1276828795671463,
-0.1024976596236229,
-0.08523546159267426,
0.1769096404314041,
0.1675264835357666,
0.17861419916152954,
0.18797354400157928,
-0.1744350641965866,
-0.16509100794792175,
-0.30157244205474854,
-0.13097813725471497,
0.20586851239204407,
0.26367515325546265,
-0.21006985008716583,
-0.04054814577102661,
0.1650015115737915,
-0.3828431963920593,
-0.017238883301615715,
0.2790486812591553,
0.24099333584308624,
0.051127564162015915,
0.24637965857982635,
0.2947516143321991,
-0.3227386176586151,
0.03530481457710266,
-0.19599227607250214,
0.19488993287086487,
0.4374907612800598,
-0.04943288117647171,
0.0014831461012363434,
-0.11863104999065399,
-0.23243537545204163,
-0.2660568654537201,
0.25303301215171814,
0.33068743348121643,
0.09451714158058167,
-0.2598607540130615,
0.03156173229217529,
0.06504012644290924,
-0.14636270701885223,
-0.05940432474017143,
0.45523321628570557,
0.030767235904932022,
0.36949944496154785,
0.4665455222129822,
0.5297545790672302,
0.31886452436447144,
0.04995895177125931,
0.0051477570086717606,
0.2995321750640869,
0.4960101246833801,
-0.03416061773896217,
-0.43970513343811035,
0.3535386323928833,
0.10473336279392242,
0.292937695980072,
0.16108249127864838,
0.11162051558494568,
0.4437671899795532,
-0.2467876672744751,
0.39062193036079407,
-0.06637542694807053,
-0.2329150140285492,
-0.031064309179782867,
-0.3420962691307068,
0.4415512979030609,
-0.002028226852416992,
-0.28063783049583435,
0.1440061628818512,
-0.25841450691223145,
0.04841533675789833,
-0.15928323566913605,
-0.3118121325969696,
-0.09962356835603714,
0.23880545794963837,
-0.11095286160707474,
-0.1523907333612442,
0.04735488444566727,
-0.06216008961200714,
-0.0060446783900260925,
-0.0720749944448471,
0.1777915209531784,
-0.08719386160373688,
0.17736756801605225,
-0.08668741583824158,
0.16219115257263184,
0.15590301156044006,
-0.29330360889434814,
0.35142600536346436,
0.15120142698287964,
0.0870809555053711,
-0.010878456756472588,
-0.035644397139549255,
-0.16172681748867035,
0.19300846755504608,
0.17408566176891327,
0.2796977162361145,
0.3377968668937683,
-0.27451997995376587,
0.18874043226242065,
0.01466117799282074,
0.0998908132314682,
0.03858049586415291,
-0.2335791289806366,
-0.08649112284183502,
-0.3980906009674072,
0.15721732378005981,
-0.004710634239017963,
0.045462366193532944,
-0.14363950490951538,
-0.003600429743528366,
0.23444224894046783,
-0.2456262856721878,
-0.24810868501663208,
-0.43960702419281006,
0.10977833718061447,
0.004798440262675285,
0.1391276866197586,
-0.5604930520057678,
-0.1013423427939415,
0.40315476059913635,
-0.47656095027923584,
-0.07955688238143921,
0.0642467811703682,
-0.02003885619342327,
0.08331535756587982,
0.4922329783439636,
0.1389881670475006,
0.3087875545024872,
-0.2001713067293167,
-0.014660753309726715,
-0.3072459101676941,
0.22635746002197266,
-0.0665450394153595,
0.06867930293083191,
0.06939031183719635,
0.7332372069358826,
0.04328608885407448,
-0.09889161586761475,
0.6377230286598206,
0.15532778203487396,
0.406633198261261,
0.7288275957107544,
0.03437319025397301,
0.28890734910964966,
-0.565186083316803,
-0.00659787654876709,
0.19653618335723877,
-0.06464220583438873,
0.16872477531433105,
-0.14148686826229095,
-0.15232305228710175,
-0.10317708551883698,
0.0898616760969162,
0.4158187210559845,
-0.23674675822257996,
0.3339006304740906,
0.0011101868003606796,
0.12557382881641388,
0.04496274143457413,
0.06512697786092758,
-0.20295178890228271,
0.24501237273216248,
-0.3400079607963562,
-0.16561898589134216,
-0.1271359622478485,
-0.2254304736852646,
-0.2282390147447586,
-0.5702084302902222,
0.04092995822429657,
0.46741366386413574,
0.107370525598526,
-0.49448010325431824,
0.16102762520313263,
0.1766182780265808,
-0.3191877603530884,
0.09339630603790283,
0.2886107563972473,
0.1825047731399536,
0.10432684421539307,
0.3526270091533661,
-0.3474684953689575,
0.08455203473567963,
0.22810453176498413,
-0.3113976716995239,
-0.2715943455696106,
-0.9069966077804565,
0.2609604001045227,
0.22370633482933044,
0.3071669340133667,
-0.45673027634620667,
-0.22097042202949524,
0.11588462442159653,
0.30107948184013367,
-0.11950941383838654,
0.18259574472904205,
-0.1372097134590149,
-0.23467132449150085,
-0.2612205743789673,
-0.6172442436218262,
0.15076899528503418,
0.07113967090845108,
-0.11402542889118195,
-0.13382397592067719
] |
https://github.com/huggingface/datasets/issues/4761 | parallel searching in multi-gpu setting using faiss | Hi,
I have a similar question and would like to know if there's any progress in this issue.
`dataset.add_faiss_index(column="embedding")`, this takes around 5minutes to add the index.
`dataset.add_faiss_index(column="embedding", device=-1)`, this ran for more than 10minutes and still didn't complete execution.
Now, I don't understand why that's the case as I expected for GPU the indexing should be faster | While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360 | 58 | parallel searching in multi-gpu setting using faiss
While I notice that `add_faiss_index` has supported assigning multiple GPUs, I am still confused about how it works.
Does the `search-batch` function automatically parallelizes the input queries to different gpus?https://github.com/huggingface/datasets/blob/d76599bdd4d186b2e7c4f468b05766016055a0a5/src/datasets/search.py#L360
Hi,
I have a similar question and would like to know if there's any progress in this issue.
`dataset.add_faiss_index(column="embedding")`, this takes around 5minutes to add the index.
`dataset.add_faiss_index(column="embedding", device=-1)`, this ran for more than 10minutes and still didn't complete execution.
Now, I don't understand why that's the case as I expected for GPU the indexing should be faster | [
-0.1596042364835739,
-0.5895235538482666,
-0.1664852499961853,
0.062093283981084824,
-0.40339672565460205,
0.08989090472459793,
0.20352447032928467,
0.0684148296713829,
0.6028568148612976,
0.01861383020877838,
-0.19229143857955933,
-0.2063247263431549,
0.542914867401123,
-0.11462605744600296,
-0.2289341241121292,
-0.018648475408554077,
0.41152718663215637,
-0.16424626111984253,
0.10910430550575256,
-0.17417746782302856,
-0.4899638891220093,
0.09568674117326736,
-0.32562947273254395,
-0.18934203684329987,
-0.18557266891002655,
0.13424736261367798,
-0.20991650223731995,
-0.13448289036750793,
0.0850028321146965,
-0.24281997978687286,
-0.3469559848308563,
0.1900625377893448,
0.09973154962062836,
0.4804955720901489,
-0.00012683849490713328,
-0.16465920209884644,
-0.032969050109386444,
0.04693209379911423,
0.1822464019060135,
0.3446846902370453,
-0.13831448554992676,
0.1937585324048996,
0.03265976905822754,
0.01362515240907669,
-0.3721460700035095,
-0.07630985975265503,
0.17052507400512695,
-0.668898344039917,
-0.2738375663757324,
-0.07715849578380585,
0.01808100938796997,
0.025024618953466415,
-0.060641638934612274,
-0.11964233964681625,
-0.08794791251420975,
-0.3880058526992798,
-0.0679258406162262,
-0.09422670304775238,
0.4852604269981384,
-0.05973612517118454,
0.007712557911872864,
0.4543191194534302,
0.11530858278274536,
0.05229739099740982,
-0.11804497987031937,
0.041880588978528976,
0.3046654760837555,
-0.2887001037597656,
0.03020205721259117,
-0.08534402400255203,
-0.07646050304174423,
-0.045369625091552734,
-0.353423148393631,
-0.40096065402030945,
-0.10337924212217331,
-0.08343429118394852,
-0.07808671146631241,
0.06509417295455933,
-0.18741784989833832,
-0.18103447556495667,
0.2247883677482605,
-0.22968046367168427,
0.0568811297416687,
-0.07879985868930817,
0.15863996744155884,
0.503002405166626,
0.11555317789316177,
0.18317978084087372,
0.2702212333679199,
0.10388349741697311,
-0.30080193281173706,
-0.2537618577480316,
0.3419458866119385,
0.12415196746587753,
-0.9183570742607117,
0.22479814291000366,
0.1804683804512024,
-0.39074844121932983,
-0.005310073494911194,
-0.04134019464254379,
-0.2935156226158142,
0.12165703624486923,
0.06421378999948502,
0.12729904055595398,
-0.04604751244187355,
0.02628762274980545,
-0.08868148177862167,
-0.1852542608976364,
-0.16437694430351257,
-0.2633492946624756,
-0.10939687490463257,
0.041764773428440094,
0.06845884025096893,
-0.23198139667510986,
-0.6939202547073364,
-0.09047772735357285,
-0.050562210381031036,
0.09405174851417542,
-0.11222176253795624,
-0.0992969274520874,
-0.004206068813800812,
-0.28984084725379944,
0.18847528100013733,
0.30912670493125916,
0.032701581716537476,
0.016011156141757965,
-0.2366025149822235,
0.13812881708145142,
-0.28807058930397034,
0.03393096476793289,
-0.05786876752972603,
-0.22513560950756073,
-0.007669966667890549,
0.36842846870422363,
0.031084392219781876,
-0.25203683972358704,
-0.08271355926990509,
0.047903697937726974,
0.1764824241399765,
0.19835905730724335,
0.11306370794773102,
-0.3992724120616913,
0.3330698013305664,
0.16441960632801056,
0.19827072322368622,
0.06963058561086655,
-0.016300413757562637,
0.29642999172210693,
-0.28709909319877625,
0.15814463794231415,
-0.17028406262397766,
-0.04167201742529869,
0.09450609982013702,
-0.009421625174582005,
0.3326214551925659,
-0.2246452271938324,
-0.03677002340555191,
0.5746479034423828,
-0.005249574780464172,
0.19886243343353271,
0.2019624412059784,
-0.06987122446298599,
-0.05309738591313362,
-0.20285829901695251,
0.34951314330101013,
0.19199299812316895,
-0.05528804287314415,
-0.1388026624917984,
0.4051128625869751,
-0.08518464863300323,
-0.075373075902462,
0.6457995772361755,
0.1284823715686798,
-0.0938764438033104,
-0.2568534016609192,
0.6117762327194214,
0.2605140209197998,
-0.49136584997177124,
0.17297270894050598,
-0.09618078172206879,
-0.18373242020606995,
0.017982153221964836,
0.33193060755729675,
0.14767158031463623,
0.07253018021583557,
0.060327935963869095,
0.3487582802772522,
0.4857509732246399,
-0.04403475672006607,
0.03977658599615097,
-0.14542189240455627,
0.007683025673031807,
0.17181453108787537,
0.20618994534015656,
0.050978969782590866,
-0.10254231840372086,
-0.13672730326652527,
-1.0431886911392212,
0.43122613430023193,
-0.09316202998161316,
-0.0034140567295253277,
-0.08914939314126968,
0.5596922636032104,
0.42913544178009033,
0.42852455377578735,
0.21897658705711365,
0.1337972730398178,
0.20806267857551575,
-0.15512192249298096,
0.028387581929564476,
0.16582083702087402,
-0.18328529596328735,
0.4526406228542328,
-0.025781743228435516,
-0.27804577350616455,
0.18491213023662567,
-0.09526574611663818,
0.07655373960733414,
0.02747153863310814,
-0.15706093609333038,
-0.25961068272590637,
0.16937977075576782,
0.024554388597607613,
0.007106354460120201,
-0.39358434081077576,
0.07595927268266678,
-0.10868256539106369,
-0.006343028508126736,
-0.3719184100627899,
-0.05489150434732437,
0.2502686381340027,
-0.40193629264831543,
0.020331554114818573,
0.32145795226097107,
0.22759045660495758,
-0.12372921407222748,
0.5738614201545715,
0.2797372043132782,
0.11241807043552399,
0.14458101987838745,
0.1308315098285675,
0.02430855482816696,
0.09419359266757965,
-0.2019423246383667,
-0.013346180319786072,
0.31105494499206543,
0.08815113455057144,
0.43289223313331604,
-0.014337144792079926,
-0.4266832768917084,
0.11106003820896149,
0.18834400177001953,
0.08040587604045868,
0.16107715666294098,
0.005222778767347336,
-0.10209833085536957,
0.013434331864118576,
-0.10624319314956665,
-0.620563805103302,
0.44293704628944397,
-0.06880562007427216,
0.004193294793367386,
-0.00040978193283081055,
-0.07794129103422165,
-0.0030465200543403625,
-0.005064317956566811,
-0.0282371137291193,
-0.47665318846702576,
0.14683951437473297,
0.21770071983337402,
0.2424558699131012,
-0.164481520652771,
0.02112177200615406,
-0.13275477290153503,
0.12816904485225677,
0.09267767518758774,
-0.05146445333957672,
0.12418725341558456,
-0.22621102631092072,
-0.11575350910425186,
-0.028303995728492737,
-0.23075738549232483,
0.050400979816913605,
-0.13056610524654388,
-0.12847022712230682,
0.0056406594812870026,
0.21883557736873627,
-0.10599124431610107,
-0.21331587433815002,
-0.10987822711467743,
-0.06161380186676979,
-0.006277315318584442,
0.15552079677581787,
0.023233281448483467,
0.006969232112169266,
0.24913290143013,
-0.2278020977973938,
0.5181691646575928,
0.13800077140331268,
-0.31292834877967834,
-0.10266377776861191,
0.03325264900922775,
0.0643082782626152,
-0.04916146770119667,
0.07930602878332138,
0.18430571258068085,
0.086794413626194,
0.11352284997701645,
-0.02674967795610428,
-0.19870837032794952,
-0.12925222516059875,
-0.11420129239559174,
-0.13224531710147858,
-0.09803421795368195,
-0.2167813777923584,
-0.2588315010070801,
-0.04002663865685463,
0.20539595186710358,
0.08875281363725662,
-0.21442879736423492,
0.0006426237523555756,
-0.3973926901817322,
-0.12404412776231766,
-0.2937907874584198,
0.1372024118900299,
-0.20583003759384155,
-0.025044115260243416,
-0.15638130903244019,
0.24438540637493134,
-0.026749305427074432,
0.15182605385780334,
-0.20074774324893951,
0.2697119414806366,
-0.05337018147110939,
-0.18058106303215027,
-0.0344681441783905,
-0.32486939430236816,
-0.07679896056652069,
0.056798942387104034,
-0.10533086210489273,
-0.10282483696937561,
-0.05334075912833214,
0.10980872809886932,
0.01900918036699295,
0.30313271284103394,
0.18154102563858032,
0.13884301483631134,
0.015999499708414078,
0.036014314740896225,
0.08275870978832245,
0.58650141954422,
0.11583282053470612,
-0.3275233507156372,
-0.03188111633062363,
0.11673738807439804,
-0.13534225523471832,
0.10882901400327682,
0.21183201670646667,
0.09424515068531036,
0.05339343845844269,
0.13023287057876587,
-0.03044363111257553,
0.8221597671508789,
0.06147521361708641,
0.045123837888240814,
0.18707868456840515,
0.062128111720085144,
0.1788792759180069,
0.07650115340948105,
-0.08228391408920288,
0.25254786014556885,
0.28529655933380127,
0.009379122406244278,
-0.001913219690322876,
-0.05914808809757233,
-0.07812020182609558,
-0.0189224686473608,
0.024188116192817688,
-0.30969369411468506,
-0.06064741313457489,
0.13543131947517395,
0.033822201192379,
0.2724578082561493,
-0.18174771964550018,
-0.01563287526369095,
-0.243278369307518,
0.17978990077972412,
-0.13752871751785278,
0.20805887877941132,
0.17920708656311035,
-0.219032883644104,
-0.031574346125125885,
-0.2985265851020813,
-0.3209505081176758,
0.45546847581863403,
-0.12982140481472015,
0.4114411175251007,
0.1551847904920578,
-0.2573755979537964,
0.40202873945236206,
-0.07560054957866669,
0.8120967149734497,
0.13042327761650085,
-0.43531471490859985,
-0.015478676185011864,
-0.26582562923431396,
-0.20883449912071228,
-0.19916094839572906,
-0.07670505344867706,
0.18302085995674133,
0.2768934369087219,
0.22234055399894714,
-0.04029890149831772,
-0.4779299199581146,
0.0585484579205513,
-0.27687233686447144,
-0.03753189742565155,
-0.37426191568374634,
-0.47321102023124695,
0.027093008160591125,
0.11725625395774841,
0.527895987033844,
-0.030105680227279663,
0.029394177719950676,
-0.061928436160087585,
0.06882703304290771,
-0.18760085105895996,
-0.053029678761959076,
0.10969509184360504,
0.0998849868774414,
-0.10854287445545197,
0.12354397028684616,
0.17456206679344177,
0.41209304332733154,
0.05500265583395958,
0.2708198130130768,
-0.02068398892879486,
-0.14353440701961517,
0.13065177202224731,
-0.003313204273581505,
0.14553658664226532,
0.3501459062099457,
0.21902823448181152,
0.13986308872699738,
0.3548211455345154,
-0.14364789426326752,
0.24370872974395752,
-0.0810268446803093,
-0.22584328055381775,
0.24360918998718262,
0.4236586391925812,
-0.2685799300670624,
-0.34294021129608154,
0.3783573806285858,
-0.036799006164073944,
-0.2687968611717224,
0.15616297721862793,
0.2763189673423767,
-0.013540204614400864,
0.5271598100662231,
0.06026371568441391,
0.5066756010055542,
-0.13136781752109528,
-0.06681536138057709,
-0.05820845067501068,
-0.163305401802063,
0.061993785202503204,
-0.42641377449035645,
0.5557642579078674,
-0.33463433384895325,
-0.020076721906661987,
0.023763088509440422,
-0.10728351771831512,
0.361564964056015,
0.10923570394515991,
0.16551890969276428,
0.30121520161628723,
0.14939150214195251,
-0.31735751032829285,
-0.2899130582809448,
0.15702790021896362,
0.26125863194465637,
-0.19888244569301605,
0.34308046102523804,
-0.03419485688209534,
0.34934043884277344,
0.06782448291778564,
0.11172690987586975,
0.13385051488876343,
0.06883540749549866,
0.15068908035755157,
-0.08786813914775848,
-0.10653433203697205,
0.014885658398270607,
0.005012876354157925,
0.10982906818389893,
-0.034677278250455856,
0.13385730981826782,
-0.3883930444717407,
0.15884584188461304,
-0.4134061634540558,
0.056879863142967224,
0.16762188076972961,
0.17184412479400635,
-0.0994487777352333,
-0.07601205259561539,
-0.633536159992218,
0.1329367756843567,
0.11160365492105484,
-0.3948543965816498,
0.028793130069971085,
0.1835661083459854,
-0.4375237226486206,
-0.5199322700500488,
0.3124462366104126,
-0.20225973427295685,
0.28016573190689087,
-0.23840735852718353,
0.20838597416877747,
0.12845240533351898,
0.06997743248939514,
-0.035317301750183105,
0.22706155478954315,
-0.38756945729255676,
0.8120301961898804,
-0.3389056324958801,
-0.06721355020999908,
-0.11235646903514862,
0.26549842953681946,
0.33009466528892517,
-0.3876092731952667,
-0.030623704195022583,
0.14638710021972656,
-0.1653337925672531,
0.026461154222488403,
-0.6339979767799377,
0.3646930158138275,
0.32135167717933655,
-0.12799008190631866,
0.02112536132335663,
-0.14533232152462006,
0.43468210101127625,
-0.23933565616607666,
-0.03978646546602249,
-0.023560985922813416,
-0.38686713576316833,
0.054004356265068054,
0.1488618403673172,
-0.047876402735710144,
-0.13132676482200623,
0.20507284998893738,
0.25241270661354065,
-0.14551085233688354,
0.1334773451089859,
0.14109596610069275,
-0.14126349985599518,
0.12145669758319855,
-0.011115767061710358,
0.17667043209075928,
-0.12577445805072784,
0.13748639822006226,
0.026806039735674858,
0.21049857139587402,
0.004854185506701469,
-0.11472880840301514,
-0.05379083752632141,
-0.06335301697254181,
0.21946194767951965,
0.16336846351623535,
0.10739576816558838,
0.24075369536876678,
-0.18772892653942108,
-0.19629885256290436,
-0.3525538146495819,
-0.14315834641456604,
0.10086503624916077,
0.2320217490196228,
-0.1844606250524521,
-0.12063974142074585,
0.12210974097251892,
-0.43656548857688904,
0.09183289110660553,
0.3872579038143158,
0.23407484591007233,
0.04749289155006409,
0.22060491144657135,
0.2909288704395294,
-0.2913963198661804,
-0.014594942331314087,
-0.16012100875377655,
0.15106534957885742,
0.40937167406082153,
-0.03278343379497528,
-0.019727595150470734,
-0.028855174779891968,
-0.23300690948963165,
-0.09954448789358139,
0.33642956614494324,
0.3191511034965515,
0.16538257896900177,
-0.17338643968105316,
0.009615945629775524,
0.07178890705108643,
-0.12493209540843964,
-0.12237678468227386,
0.4258803427219391,
-0.10316524654626846,
0.344646692276001,
0.39078328013420105,
0.645325779914856,
0.5017773509025574,
0.01948261633515358,
-0.009359725750982761,
0.2944479286670685,
0.5266543626785278,
-0.05893406644463539,
-0.5592290759086609,
0.34955358505249023,
-0.0007539577782154083,
0.2954445779323578,
0.18295986950397491,
0.10837283730506897,
0.49002373218536377,
-0.10627526789903641,
0.3800262212753296,
0.033662348985672,
-0.09733925759792328,
-0.07103811949491501,
-0.3128962516784668,
0.4274764358997345,
0.11936705559492111,
-0.24181124567985535,
0.0826968401670456,
-0.17516592144966125,
0.13428489863872528,
-0.17301730811595917,
-0.3790935277938843,
-0.11774541437625885,
0.25269874930381775,
-0.0921589806675911,
-0.12817345559597015,
0.09855836629867554,
-0.09702913463115692,
-0.012784361839294434,
-0.07461290061473846,
0.2006770223379135,
-0.04810624569654465,
0.09014444798231125,
-0.08228425681591034,
0.2082938849925995,
0.2059406042098999,
-0.2587764263153076,
0.3056061565876007,
0.34201937913894653,
0.12890753149986267,
-0.0586385503411293,
-0.14532186090946198,
-0.09388083219528198,
0.1734316498041153,
0.13258562982082367,
0.24150478839874268,
0.26674884557724,
-0.28439652919769287,
0.2705540657043457,
0.10139551758766174,
0.11142073571681976,
0.15448720753192902,
-0.0939721018075943,
-0.08378444612026215,
-0.29747217893600464,
0.10134145617485046,
-0.013443198055028915,
0.0428033322095871,
-0.22566159069538116,
-0.026550952345132828,
0.19660988450050354,
-0.17966993153095245,
-0.2768353521823883,
-0.4341806471347809,
0.03280548006296158,
-0.021273043006658554,
0.07223613560199738,
-0.5468757152557373,
-0.0051085464656353,
0.28517699241638184,
-0.5334349870681763,
-0.10695087909698486,
0.12073452770709991,
-0.029343940317630768,
0.05041459947824478,
0.4581303596496582,
0.13713213801383972,
0.36716514825820923,
-0.1453220546245575,
-0.10165142267942429,
-0.23924458026885986,
0.1484529823064804,
-0.11806045472621918,
0.17826077342033386,
0.007380249444395304,
0.6805644035339355,
0.00301157683134079,
-0.21346180140972137,
0.5889196395874023,
0.1304045021533966,
0.37655380368232727,
0.6830273866653442,
0.011306993663311005,
0.34580010175704956,
-0.5323137044906616,
-0.027254411950707436,
0.16784775257110596,
-0.014168865978717804,
0.2236902415752411,
-0.1220850944519043,
-0.1517288237810135,
-0.16246019303798676,
0.21608325839042664,
0.29312413930892944,
-0.2572031617164612,
0.38930439949035645,
-0.03477460891008377,
0.14543591439723969,
0.09790679067373276,
0.057891495525836945,
-0.1496899276971817,
0.14091308414936066,
-0.29521456360816956,
-0.11571992188692093,
-0.1430654078722,
-0.21035264432430267,
-0.14655625820159912,
-0.5987783074378967,
0.04567766934633255,
0.4529793858528137,
0.027560777962207794,
-0.4850602149963379,
0.14260277152061462,
0.1400778591632843,
-0.2970515191555023,
0.08868161588907242,
0.287341445684433,
0.1801483929157257,
0.14434856176376343,
0.17463575303554535,
-0.31455934047698975,
0.1356203556060791,
0.1383305937051773,
-0.26549944281578064,
-0.14812228083610535,
-0.8573307991027832,
0.23358654975891113,
0.29199710488319397,
0.33782222867012024,
-0.46206653118133545,
-0.19583025574684143,
0.1040617898106575,
0.256477952003479,
-0.08942480385303497,
0.22389094531536102,
-0.05763046815991402,
-0.2205134928226471,
-0.28724464774131775,
-0.7219741344451904,
0.12756577134132385,
0.07430050522089005,
-0.05631064996123314,
-0.14087945222854614
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | Hi @SaulLu, thanks for reporting.
I think offline mode is not supported for datasets containing only data files (without any loading script). I'm having a look into this... | ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 28 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
Hi @SaulLu, thanks for reporting.
I think offline mode is not supported for datasets containing only data files (without any loading script). I'm having a look into this... | [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | Thanks for your feedback!
To give you a little more info, if you don't set the offline mode flag, the script will load the cache. I first noticed this behavior with the `evaluate` library, and while trying to understand the downloading flow I realized that I had a similar error with datasets. | ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 52 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
Thanks for your feedback!
To give you a little more info, if you don't set the offline mode flag, the script will load the cache. I first noticed this behavior with the `evaluate` library, and while trying to understand the downloading flow I realized that I had a similar error with datasets. | [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | #5331 will be helpful to fix this, as it updates the cache directory template to be aligned with the other datasets | ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 21 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
#5331 will be helpful to fix this, as it updates the cache directory template to be aligned with the other datasets | [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | This issue has been fixed in `datasets` 2.16 by https://github.com/huggingface/datasets/pull/6493. The cache is now working properly :)
You just have to update `datasets`:
```
pip install -U datasets
``` | ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 29 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
This issue has been fixed in `datasets` 2.16 by https://github.com/huggingface/datasets/pull/6493. The cache is now working properly :)
You just have to update `datasets`:
```
pip install -U datasets
``` | [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | Can you share some code to reproduce your issue ?
Also make sure your cache was populated with recent versions of `datasets`. Datasets cached with old versions may not be reloadable in offline mode, though we did our best to keep as much backward compatibility as possible. | ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 47 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
Can you share some code to reproduce your issue ?
Also make sure your cache was populated with recent versions of `datasets`. Datasets cached with old versions may not be reloadable in offline mode, though we did our best to keep as much backward compatibility as possible. | [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | I'm not sure if this is related @lhoestq but I am experiencing a similar issue when using offline mode:
```bash
$ python -c "from datasets import load_dataset; load_dataset('openai_humaneval', split='test')"
$ HF_DATASETS_OFFLINE=1 python -c "from datasets import load_dataset; load_dataset('openai_humaneval', split='test')"
Using the latest cached version of the dataset since openai_humaneval couldn't be found on the Hugging Face Hub (offline mode is enabled).
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset
builder_instance = load_dataset_builder(
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/load.py", line 2265, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/packaged_modules/cache/cache.py", line 122, in __init__
config_name, version, hash = _find_hash_in_cache(
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/packaged_modules/cache/cache.py", line 48, in _find_hash_in_cache
raise ValueError(
ValueError: Couldn't find cache for openai_humaneval for config 'default'
Available configs in the cache: ['openai_humaneval']
``` | ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 126 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
I'm not sure if this is related @lhoestq but I am experiencing a similar issue when using offline mode:
```bash
$ python -c "from datasets import load_dataset; load_dataset('openai_humaneval', split='test')"
$ HF_DATASETS_OFFLINE=1 python -c "from datasets import load_dataset; load_dataset('openai_humaneval', split='test')"
Using the latest cached version of the dataset since openai_humaneval couldn't be found on the Hugging Face Hub (offline mode is enabled).
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/load.py", line 2556, in load_dataset
builder_instance = load_dataset_builder(
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/load.py", line 2265, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/packaged_modules/cache/cache.py", line 122, in __init__
config_name, version, hash = _find_hash_in_cache(
File "/dodrio/scratch/projects/2023_071/alignment-handbook/.venv/lib/python3.10/site-packages/datasets/packaged_modules/cache/cache.py", line 48, in _find_hash_in_cache
raise ValueError(
ValueError: Couldn't find cache for openai_humaneval for config 'default'
Available configs in the cache: ['openai_humaneval']
``` | [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | > Thanks for reporting @BramVanroy, I managed to reproduce and I opened a fix here: #6741
Thanks a lot! I have faced the same problem. Can I use your fix code to directly replace the existing version code? I noticed that this fix has not been merged yet. Will it affect other functionalities?
| ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 53 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
> Thanks for reporting @BramVanroy, I managed to reproduce and I opened a fix here: #6741
Thanks a lot! I have faced the same problem. Can I use your fix code to directly replace the existing version code? I noticed that this fix has not been merged yet. Will it affect other functionalities?
| [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4760 | Issue with offline mode | I just merged the fix, you can install `datasets` from source or wait for the patch release which will be out in the coming days | ## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
| 25 | Issue with offline mode
## Describe the bug
I can't retrieve a cached dataset with offline mode enabled
## Steps to reproduce the bug
To reproduce my issue, first, you'll need to run a script that will cache the dataset
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "0"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
then, you can try to reload it in offline mode:
```python
import os
os.environ["HF_DATASETS_OFFLINE"] = "1"
import datasets
datasets.logging.set_verbosity_info()
ds_name = "SaulLu/toy_struc_dataset"
ds = datasets.load_dataset(ds_name)
print(ds)
```
## Expected results
I would have expected the 2nd snippet not to return any errors
## Actual results
The 2nd snippet returns:
```
Traceback (most recent call last):
File "/home/lucile_huggingface_co/sandbox/evaluate/test_cache_datasets.py", line 8, in <module>
ds = datasets.load_dataset(ds_name)
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1723, in load_dataset
builder_instance = load_dataset_builder(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1500, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/home/lucile_huggingface_co/anaconda3/envs/evaluate-dev/lib/python3.8/site-packages/datasets/load.py", line 1241, in dataset_module_factory
raise ConnectionError(f"Couln't reach the Hugging Face Hub for dataset '{path}': {e1}") from None
ConnectionError: Couln't reach the Hugging Face Hub for dataset 'SaulLu/toy_struc_dataset': Offline mode is enabled.
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: 2.4.0
- Platform: Linux-4.19.0-21-cloud-amd64-x86_64-with-glibc2.17
- Python version: 3.8.13
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Maybe I'm misunderstanding something in the use of the offline mode (see [doc](https://huggingface.co/docs/datasets/v2.4.0/en/loading#offline)), is that the case?
I just merged the fix, you can install `datasets` from source or wait for the patch release which will be out in the coming days | [
-0.24646364152431488,
-0.04167885333299637,
-0.07200251519680023,
0.2695726752281189,
0.4369027614593506,
0.05344054847955704,
0.4702564775943756,
0.04334656894207001,
0.1487271785736084,
0.14899706840515137,
-0.12468088418245316,
0.0070837922394275665,
-0.07967312633991241,
-0.055121298879384995,
-0.2833431661128998,
-0.0915636271238327,
0.0858224555850029,
-0.0549447238445282,
-0.07737985253334045,
-0.08307608217000961,
-0.13554584980010986,
0.09525123238563538,
-0.43395185470581055,
-0.29505735635757446,
-0.3063071668148041,
0.02778073213994503,
-0.00225919671356678,
0.1389295756816864,
-0.12012530118227005,
-0.28653401136398315,
0.5966834425926208,
-0.061906855553388596,
0.4095726013183594,
0.23813116550445557,
-0.00011022641410818323,
0.0017008781433105469,
0.22243016958236694,
-0.12342100590467453,
-0.33009040355682373,
-0.2307838350534439,
-0.261292040348053,
-0.3504883646965027,
0.11476840823888779,
-0.42477282881736755,
-0.24632370471954346,
-0.13111425936222076,
-0.057626426219940186,
-0.6119475960731506,
0.13723424077033997,
0.3156633675098419,
0.24867866933345795,
0.44607189297676086,
-0.11048710346221924,
-0.2067149430513382,
0.04332754760980606,
0.10947529226541519,
-0.35790351033210754,
0.08985702693462372,
-0.031448982656002045,
-0.07805629819631577,
0.03011598438024521,
0.28813835978507996,
-0.10661796480417252,
0.1821313202381134,
0.025028124451637268,
0.21439312398433685,
-0.2731589376926422,
-0.015139024704694748,
0.5522597432136536,
0.165062814950943,
0.4836786985397339,
0.0005799718201160431,
-0.2872891426086426,
-0.3146953284740448,
-0.055890168994665146,
-0.21308790147304535,
0.2767399847507477,
0.12573105096817017,
-0.10538949072360992,
0.2474297136068344,
-0.2768649458885193,
0.03070995584130287,
-0.18483690917491913,
0.04615679010748863,
-0.20076248049736023,
0.16893959045410156,
-0.24601542949676514,
-0.07697532325983047,
-0.12782326340675354,
0.09239228069782257,
0.11576984822750092,
-0.16662126779556274,
0.01245708018541336,
0.2977978587150574,
-0.28614920377731323,
0.18530097603797913,
0.2580631971359253,
0.1344877928495407,
0.14440670609474182,
0.10122654587030411,
0.030090954154729843,
-0.07029543817043304,
-0.19753006100654602,
-0.1220085397362709,
0.12057584524154663,
0.4328318238258362,
0.11877430975437164,
0.006666474975645542,
0.22743430733680725,
0.32584625482559204,
-0.417632520198822,
-0.3202342092990875,
0.08763953298330307,
0.04522595927119255,
0.641004741191864,
0.06963630765676498,
0.4120875597000122,
-0.44923609495162964,
-0.15532897412776947,
0.0695594996213913,
-0.030956903472542763,
-0.05566207692027092,
0.012133676558732986,
0.33485135436058044,
-0.027596019208431244,
0.13455748558044434,
0.07433769106864929,
0.24824506044387817,
-0.41081079840660095,
-0.317513108253479,
-0.18008741736412048,
-0.18416014313697815,
-0.12438446283340454,
0.007705896161496639,
0.2243972271680832,
-0.13140910863876343,
0.20052585005760193,
0.0879097580909729,
0.07239145040512085,
-0.2928047478199005,
0.2664472460746765,
-0.14352326095104218,
0.31231918931007385,
0.28618714213371277,
0.02438611164689064,
-0.015562359243631363,
0.40535128116607666,
0.05326071381568909,
0.12930262088775635,
0.05149542912840843,
-0.03368844836950302,
-0.502774715423584,
0.05106192082166672,
0.21415604650974274,
-0.28525298833847046,
-0.012424536049365997,
-0.02179417759180069,
0.05047997832298279,
0.01478423923254013,
0.2373901903629303,
0.21495908498764038,
0.06951135396957397,
-0.16172145307064056,
-0.17922331392765045,
0.3634810447692871,
0.4679551124572754,
-0.31051039695739746,
0.20064964890480042,
-0.18661066889762878,
-0.1533266007900238,
0.15073813498020172,
0.058433860540390015,
-0.35058435797691345,
0.3881969451904297,
-0.3868418335914612,
-0.40244388580322266,
0.3615805506706238,
-0.2294638603925705,
-0.5647638440132141,
0.11271623522043228,
-0.02287701889872551,
0.3085138499736786,
0.11397777497768402,
0.04220208153128624,
0.23348353803157806,
0.13765692710876465,
-0.2688158452510834,
0.34057122468948364,
-0.041840434074401855,
-0.01367330551147461,
-0.2570907771587372,
-0.16420678794384003,
0.39414703845977783,
0.08795478940010071,
0.3332490026950836,
0.4682781994342804,
0.40215256810188293,
-0.07884467393159866,
0.3299880027770996,
0.09111469238996506,
0.06841396540403366,
0.25649333000183105,
0.039787087589502335,
0.19003164768218994,
0.19921034574508667,
-0.1715579330921173,
-0.4708750247955322,
0.3593096435070038,
-0.18950510025024414,
-0.001750446856021881,
-0.3512667417526245,
-0.2071591168642044,
-0.21832194924354553,
-0.10081791132688522,
-0.2990964651107788,
-0.3487069606781006,
0.14915478229522705,
0.09354529529809952,
0.3449634611606598,
0.1844053417444229,
-0.00918903574347496,
0.4670342803001404,
0.2822212278842926,
-0.07735934853553772,
-0.26510000228881836,
0.38520634174346924,
0.0863918662071228,
0.017486870288848877,
-0.2303694635629654,
-0.003073848783969879,
0.18190273642539978,
-0.01604398339986801,
-0.318122535943985,
0.3638695478439331,
0.15026706457138062,
0.07472681254148483,
-0.0013698451220989227,
0.042314380407333374,
-0.08184955269098282,
0.07309217751026154,
0.379203736782074,
0.010420295409858227,
0.22485071420669556,
-0.006130333989858627,
0.004983387887477875,
0.5077880620956421,
0.05164918303489685,
0.23079097270965576,
-0.12406923621892929,
-0.08448817580938339,
0.31071633100509644,
-0.07328179478645325,
-0.03909335657954216,
-0.2987350821495056,
0.3684200942516327,
-0.025309089571237564,
0.12183944880962372,
-0.18744443356990814,
-0.09171922504901886,
0.19025346636772156,
0.38678526878356934,
0.21550045907497406,
-0.05172586441040039,
-0.1942516565322876,
0.05427725985646248,
-0.05645919218659401,
0.03553830832242966,
0.2637260854244232,
0.3610756993293762,
0.16034066677093506,
0.10832493007183075,
0.19141457974910736,
0.05169696733355522,
-0.05249394103884697,
0.27780407667160034,
0.03824576735496521,
0.3121244013309479,
-0.027544260025024414,
0.3953500986099243,
-0.13646681606769562,
-0.18527981638908386,
-0.08931881189346313,
0.16375979781150818,
0.17029821872711182,
-0.14497138559818268,
0.171139195561409,
-0.5185037851333618,
-0.16674813628196716,
0.0248318649828434,
0.05865075811743736,
-0.4182468354701996,
-0.3509036600589752,
-0.18016648292541504,
0.20209620893001556,
0.12307514250278473,
0.13516686856746674,
-0.41176730394363403,
0.09558285027742386,
-0.058318182826042175,
-0.11828245967626572,
0.019688591361045837,
-0.172604039311409,
-0.12897560000419617,
-0.011564480140805244,
0.04523773863911629,
-0.1684074103832245,
0.5981068015098572,
0.05807436257600784,
-0.22230194509029388,
-0.3687256872653961,
0.020324811339378357,
0.031123051419854164,
0.13694918155670166,
0.060438238084316254,
0.0934206172823906,
0.033749502152204514,
0.058213651180267334,
0.07961353659629822,
0.4285189211368561,
-0.1825723946094513,
0.00906619243323803,
0.3646615147590637,
-0.15379635989665985,
0.2668502926826477,
-0.11677661538124084,
-0.3583917021751404,
-0.24279598891735077,
-0.21295005083084106,
-0.004657812416553497,
-0.11245335638523102,
0.015926193445920944,
0.5143714547157288,
-0.12036791443824768,
0.05135606601834297,
-0.1029665619134903,
0.11510495841503143,
-0.4257572293281555,
-0.6520487070083618,
0.22388599812984467,
-0.274820476770401,
-0.3577871024608612,
0.036209214478731155,
0.08168390393257141,
0.25647714734077454,
0.24300792813301086,
-0.524837076663971,
-0.0389869399368763,
-0.1570788025856018,
0.4296379089355469,
-0.1529971808195114,
0.006746526807546616,
0.4988025724887848,
-0.3059293031692505,
0.00911334715783596,
-0.20668241381645203,
0.0728490948677063,
0.1420108675956726,
-0.22926869988441467,
0.32126209139823914,
-0.12462417036294937,
0.1839929223060608,
0.20334340631961823,
0.22921222448349,
0.09467814862728119,
0.3088487684726715,
0.4951040744781494,
0.07386253029108047,
0.438172847032547,
-0.3587963581085205,
-0.4016277492046356,
-0.13094423711299896,
-0.16347470879554749,
-0.44625216722488403,
-0.07037132978439331,
0.12643948197364807,
-0.15132825076580048,
-0.3119311034679413,
-0.09017860889434814,
-0.20508557558059692,
-0.22916477918624878,
-0.115683913230896,
-0.022342249751091003,
0.37167489528656006,
0.19606713950634003,
0.35591521859169006,
-0.3908441960811615,
-0.07330922037363052,
0.06225847825407982,
0.19589754939079285,
0.12787975370883942,
0.1315678358078003,
-0.3552296459674835,
0.03723141551017761,
-0.373539537191391,
0.2037198543548584,
-0.014068194665014744,
0.3511649966239929,
0.13894571363925934,
0.05022827535867691,
0.22423018515110016,
0.00810309313237667,
0.7146294713020325,
-0.22058863937854767,
0.4166940450668335,
0.38849690556526184,
-0.11339403688907623,
-0.2530711889266968,
-0.30257153511047363,
-0.13262780010700226,
0.1073438748717308,
0.32562461495399475,
0.044598329812288284,
0.15737074613571167,
-0.18269577622413635,
-0.02847972884774208,
0.04914259910583496,
-0.16162337362766266,
-0.36075928807258606,
-0.25490209460258484,
-0.012925874441862106,
-0.13883145153522491,
-0.20654582977294922,
-0.20651103556156158,
0.25050705671310425,
-0.029724018648266792,
0.10810653865337372,
-0.10466837137937546,
0.18988901376724243,
-0.3404293656349182,
-0.1663687378168106,
0.2908421754837036,
-0.2824936807155609,
0.3778345584869385,
0.28347015380859375,
0.07468195259571075,
0.16018947958946228,
0.32729068398475647,
-0.09434686601161957,
-0.08522312343120575,
0.06419986486434937,
0.09569664299488068,
0.03440771996974945,
0.21920786798000336,
-0.2287481278181076,
0.04622448980808258,
0.07381787896156311,
0.27896779775619507,
-0.2539440393447876,
-0.1190662607550621,
0.0675261914730072,
0.00212122593075037,
-0.0582689493894577,
-0.4427456259727478,
0.3875187635421753,
-0.16095873713493347,
0.11631616950035095,
0.008397277444601059,
0.22893089056015015,
-0.27821001410484314,
0.5064451098442078,
-0.10461068898439407,
0.6564648747444153,
0.11839492619037628,
0.050526492297649384,
0.04846139997243881,
0.08722642064094543,
0.5153042674064636,
-0.16663049161434174,
0.23737221956253052,
-0.14486850798130035,
-0.23966200649738312,
-0.07315506786108017,
-0.12756435573101044,
0.27071550488471985,
-0.122940793633461,
-0.11043187975883484,
0.2620062530040741,
-0.35125094652175903,
0.21808841824531555,
-0.29211321473121643,
-0.19538863003253937,
-0.2712056040763855,
-0.17317980527877808,
-0.436567485332489,
0.22159692645072937,
0.068602055311203,
0.32698962092399597,
-0.21982210874557495,
0.02032160758972168,
0.07558068633079529,
0.13279548287391663,
-0.33633702993392944,
0.0974760353565216,
-0.24068999290466309,
0.13131164014339447,
0.08903500437736511,
-0.20778235793113708,
-0.23450668156147003,
0.18371739983558655,
0.4363482594490051,
0.025373846292495728,
-0.26824891567230225,
-0.0883743017911911,
0.14030463993549347,
0.12635208666324615,
0.22082608938217163,
0.0371173694729805,
0.2846422791481018,
0.016764722764492035,
-0.30387982726097107,
-0.21593761444091797,
-0.21050143241882324,
-0.09279780089855194,
0.3333689868450165,
-0.10620196163654327,
0.08047570288181305,
-0.22900649905204773,
0.07486526668071747,
0.16801393032073975,
0.34854990243911743,
-0.16397725045681,
0.14731909334659576,
0.25810718536376953,
-0.07030608505010605,
0.11909539252519608,
-0.1506902575492859,
-0.27088016271591187,
-0.22847427427768707,
0.5867182612419128,
0.08727767318487167,
-0.03740037605166435,
0.2906821370124817,
0.37392210960388184,
-0.17713817954063416,
-0.14007842540740967,
0.13739755749702454,
0.15711736679077148,
-0.1469900906085968,
0.15189164876937866,
0.08549363166093826,
0.36366593837738037,
0.01743827387690544,
-0.04084343835711479,
0.030239542946219444,
-0.22349077463150024,
-0.2627853453159332,
-0.5344890356063843,
-0.48704925179481506,
-0.09462924301624298,
-0.12588849663734436,
-0.06259427964687347,
0.034110307693481445,
0.059524524956941605,
0.01797269843518734,
-0.1810821294784546,
-0.3100205361843109,
0.052829958498477936,
-0.0170817319303751,
0.038632940500974655,
-0.09982366859912872,
-0.21198061108589172,
0.41750213503837585,
-0.15383850038051605,
0.15838848054409027,
0.04883566498756409,
-0.32929322123527527,
-0.24620121717453003,
-0.16359703242778778,
0.14638349413871765,
0.036935415118932724,
-0.3433853089809418,
-0.022398855537176132,
-0.5137513279914856,
-0.31374433636665344,
-0.32656875252723694,
0.26543280482292175,
0.6842586398124695,
0.07369643449783325,
0.022066932171583176,
0.004786752164363861,
0.2438192367553711,
-0.19492684304714203,
-0.04056834429502487,
-0.15843786299228668,
0.09092863649129868,
0.021960141137242317,
0.19446124136447906,
-0.2301880121231079,
0.04359934478998184,
-0.27068084478378296,
0.0007044076919555664,
-0.13636691868305206,
0.2604951560497284,
0.6220053434371948,
-0.2303394228219986,
-0.02371535263955593,
0.26556241512298584,
0.5017489194869995,
-0.28863245248794556,
0.019375436007976532,
0.09392938017845154,
0.07526448369026184,
0.2390291690826416,
-0.3194352090358734,
-0.1671452671289444,
-0.18211154639720917,
0.1856023222208023,
-0.058318447321653366,
0.3001711368560791,
0.20888295769691467,
-0.0073656439781188965,
0.23887015879154205,
-0.009122875519096851,
0.5529096722602844,
-0.08592294901609421,
0.12254761159420013,
-0.0015676990151405334,
0.14587071537971497,
0.14774338901042938,
0.08329952508211136,
0.3128911554813385,
-0.1126837357878685,
0.37065786123275757,
0.21784695982933044,
0.09297192841768265,
0.21332338452339172,
0.10753822326660156,
-0.23343688249588013,
-0.5776495933532715,
-0.019010890275239944,
0.19096077978610992,
-0.30600273609161377,
0.2732643485069275,
-0.5223748683929443,
0.0338539220392704,
-0.21661370992660522,
-0.03991154208779335,
-0.21941080689430237,
0.038489751517772675,
-0.27957144379615784,
0.1261264681816101,
-0.006239693611860275,
-0.23339632153511047,
-0.12494522333145142,
0.030915986746549606,
0.06964011490345001,
-0.03252635896205902,
0.17553327977657318,
0.04543275013566017,
-0.147230327129364,
-0.314233660697937,
-0.023936275392770767,
0.21049585938453674,
0.18854664266109467,
-0.23969623446464539,
0.21318380534648895,
0.10928111523389816,
0.02290249615907669,
0.1938704550266266,
0.26648369431495667,
0.30035167932510376,
0.20149680972099304,
0.03927530348300934,
0.04916141927242279,
-0.008883358910679817,
-0.12198372930288315,
-0.16408751904964447,
0.10083998739719391,
-0.07968233525753021,
0.1898994743824005,
0.1032065898180008,
0.05616246908903122,
-0.054843299090862274,
0.20711691677570343,
0.03889654576778412,
0.06173206493258476,
-0.5590773820877075,
0.30011656880378723,
-0.018414005637168884,
0.01769016683101654,
-0.2520798444747925,
0.12433762848377228,
-0.1736084520816803,
-0.22935907542705536,
0.19176167249679565,
0.03602328896522522,
0.2523135542869568,
0.0534844771027565,
0.08602320402860641,
-0.28590476512908936,
0.21363762021064758,
0.3517794907093048,
0.049227748066186905,
-0.15216408669948578,
-0.12505820393562317,
-0.609730064868927,
-0.10926125198602676,
-0.02429051324725151,
0.007420303300023079,
0.09084226936101913,
0.19122447073459625,
-0.015130385756492615,
0.08482995629310608,
0.5499574542045593,
0.1315065622329712,
0.2980152666568756,
0.0046637579798698425,
-0.32179656624794006,
-0.47326499223709106,
-0.036676906049251556,
-0.1518876850605011,
-0.19689397513866425,
-0.37069225311279297,
0.19929702579975128,
-0.22565115988254547,
0.050521329045295715,
-0.036556001752614975,
-0.03843850642442703,
0.008825592696666718,
-0.04762512445449829,
0.48883485794067383,
0.21586978435516357,
-0.004305817186832428,
0.3068302571773529,
-0.2093973606824875,
-0.4539726972579956,
0.13657863438129425,
-0.06916803866624832,
-0.12390881031751633,
-0.041881997138261795,
0.4159993827342987,
-0.29920318722724915,
-0.31126636266708374,
-0.14321687817573547,
0.2836458683013916,
0.12896683812141418,
0.06413314491510391,
-0.33624279499053955,
0.14028044044971466,
-0.16860969364643097,
0.1238449439406395,
0.17553716897964478,
0.2523994743824005,
0.09072546660900116,
0.4772043526172638,
-0.39067786931991577,
-0.13671277463436127,
0.351588636636734,
-0.12828731536865234,
-0.26684167981147766,
-0.37221887707710266,
0.5047355890274048,
0.0669284462928772,
-0.31606021523475647,
-0.6022518873214722,
-0.06189125403761864,
0.3272724151611328,
-0.10854972153902054,
0.0036525502800941467,
0.17416779696941376,
0.04700571671128273,
0.23462755978107452,
0.1370217204093933,
0.3969314396381378,
-0.12317004054784775,
-0.1325903832912445,
0.22787883877754211,
0.07748504728078842
] |
https://github.com/huggingface/datasets/issues/4759 | Dataset Viewer issue for Toygar/turkish-offensive-language-detection | I refreshed the dataset viewer manually, it's fixed now. Sorry for the inconvenience.
<img width="1557" alt="Capture d’écran 2022-07-28 à 09 17 39" src="https://user-images.githubusercontent.com/1676121/181514666-92d7f8e1-ddc1-4769-84f3-f1edfdb902e8.png">
| ### Link
https://huggingface.co/datasets/Toygar/turkish-offensive-language-detection
### Description
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
Hi, I provided train.csv, test.csv and valid.csv files. However, viewer says dataset does not exist.
Should I need to do anything else?
### Owner
Yes | 23 | Dataset Viewer issue for Toygar/turkish-offensive-language-detection
### Link
https://huggingface.co/datasets/Toygar/turkish-offensive-language-detection
### Description
Status code: 400
Exception: Status400Error
Message: The dataset does not exist.
Hi, I provided train.csv, test.csv and valid.csv files. However, viewer says dataset does not exist.
Should I need to do anything else?
### Owner
Yes
I refreshed the dataset viewer manually, it's fixed now. Sorry for the inconvenience.
<img width="1557" alt="Capture d’écran 2022-07-28 à 09 17 39" src="https://user-images.githubusercontent.com/1676121/181514666-92d7f8e1-ddc1-4769-84f3-f1edfdb902e8.png">
| [
-0.33209851384162903,
-0.1849137842655182,
-0.033416323363780975,
0.32832127809524536,
0.31721216440200806,
0.14756479859352112,
0.3913799822330475,
0.2583248019218445,
-0.10462626814842224,
-0.08844418823719025,
0.07775677740573883,
-0.2634667456150055,
-0.17928782105445862,
0.1513361930847168,
0.08095952868461609,
-0.12906724214553833,
0.1508670151233673,
0.11898066103458405,
-0.2918962240219116,
0.11629447340965271,
-0.15329444408416748,
0.17893072962760925,
-0.18678748607635498,
0.056801795959472656,
-0.3731848895549774,
-0.0812312513589859,
-0.17143414914608002,
-0.26318052411079407,
-0.16675019264221191,
-0.6411948204040527,
0.30518844723701477,
-0.10820376873016357,
0.309499591588974,
0.7408046126365662,
-0.0001222118444275111,
0.27623146772384644,
0.21703331172466278,
-0.012641116976737976,
-0.11750999093055725,
-0.32629698514938354,
0.14965233206748962,
-0.3337399959564209,
0.052954964339733124,
-0.13856364786624908,
-0.23523813486099243,
-0.13742510974407196,
0.26359879970550537,
-0.12261908501386642,
0.4494771361351013,
0.5466854572296143,
0.09783677011728287,
-0.07418699562549591,
0.24443359673023224,
0.08186490088701248,
0.23630806803703308,
0.2706449031829834,
-0.25268158316612244,
0.17539842426776886,
-0.02692343294620514,
0.1999559849500656,
-0.04235408455133438,
0.181833416223526,
0.09658566862344742,
-0.13633492588996887,
-0.0913761630654335,
-0.16953422129154205,
0.22060483694076538,
-0.5628019571304321,
0.44672879576683044,
0.29872533679008484,
0.6755584478378296,
-0.4253057539463043,
-0.44923684000968933,
-0.1018216460943222,
0.05346432328224182,
-0.23598045110702515,
0.32964158058166504,
0.34704655408859253,
-0.17705728113651276,
0.41663724184036255,
-0.32384225726127625,
-0.47021815180778503,
-0.23670299351215363,
0.009160831570625305,
-0.4352587163448334,
0.1194361075758934,
-0.18692609667778015,
0.1625448316335678,
-0.10037277638912201,
-0.030379317700862885,
0.22733715176582336,
-0.29439258575439453,
0.020345116034150124,
0.1986684799194336,
-0.4131065905094147,
-0.061919234693050385,
-0.10394179075956345,
0.08878694474697113,
0.07573415338993073,
-0.0786091536283493,
-0.01342098694294691,
0.10972349345684052,
-0.3319959342479706,
0.04578949511051178,
0.18208076059818268,
0.033378828316926956,
0.1842343509197235,
0.10066250711679459,
0.09924372285604477,
-0.0648818090558052,
0.16459430754184723,
0.15579888224601746,
-0.20293298363685608,
-0.38749706745147705,
0.12017861008644104,
0.09556598216295242,
0.17352591454982758,
0.07170529663562775,
-0.2748836278915405,
0.3074682354927063,
-0.3770715594291687,
-0.028764760121703148,
0.0671452060341835,
0.2574365735054016,
-0.07534950971603394,
-0.02593386173248291,
0.14031508564949036,
0.17817851901054382,
-0.010956257581710815,
-0.4328565001487732,
0.03590327501296997,
0.23036345839500427,
-0.2202422022819519,
-0.1873723417520523,
0.15826667845249176,
-0.4700974225997925,
0.14726729691028595,
-0.1406889408826828,
-0.08129112422466278,
0.15273649990558624,
-0.051215775310993195,
-0.3997381627559662,
0.040355898439884186,
0.17406421899795532,
0.06555965542793274,
0.04138221591711044,
0.1726885437965393,
-0.37715375423431396,
0.019313320517539978,
0.3324936628341675,
0.06026216223835945,
-0.04369755834341049,
-0.18330001831054688,
0.07800513505935669,
-0.49498140811920166,
0.04837372899055481,
-0.025870420038700104,
0.4649147391319275,
0.08479270339012146,
-0.2954171299934387,
-0.13902390003204346,
-0.06295087188482285,
-0.38141754269599915,
-0.11115647852420807,
0.10897477716207504,
0.5713788866996765,
-0.7690960764884949,
-0.06632736325263977,
-0.5238889455795288,
-0.19202637672424316,
-0.16186052560806274,
-0.02965681254863739,
-0.10406114906072617,
0.14933618903160095,
-0.31565284729003906,
0.14480456709861755,
0.12002137303352356,
-0.1078718900680542,
-0.45584768056869507,
0.22444042563438416,
-0.12757539749145508,
0.21431271731853485,
0.2604488432407379,
0.015551814809441566,
0.15475013852119446,
-0.07215972989797592,
-0.06500275433063507,
0.05239998549222946,
0.11337075382471085,
-0.1328820139169693,
-0.2487393468618393,
-0.20949751138687134,
0.5754472017288208,
0.1868896782398224,
0.4876517355442047,
-0.26265648007392883,
0.06159558892250061,
-0.2658420205116272,
0.2566830515861511,
0.04460762441158295,
0.10651751607656479,
0.11812613159418106,
0.4082389175891876,
0.050665684044361115,
0.0666981190443039,
-0.14159640669822693,
-0.2901515066623688,
0.11187504976987839,
0.20469973981380463,
0.22144441306591034,
-0.09285996854305267,
-0.02872510626912117,
-0.2879355251789093,
0.24363277852535248,
-0.34839650988578796,
-0.21316301822662354,
0.07557527720928192,
0.16115954518318176,
-0.07796507328748703,
0.2542533576488495,
-0.10492749512195587,
0.30073967576026917,
0.03799491375684738,
0.14631682634353638,
0.11874525249004364,
0.5099727511405945,
-0.23751287162303925,
-0.06976757198572159,
0.19118359684944153,
-0.0055218711495399475,
0.09850995242595673,
-0.1583845466375351,
-0.02138693258166313,
0.3351210355758667,
0.173059344291687,
-0.1866975575685501,
0.3677293360233307,
-0.18095387518405914,
0.3768991529941559,
-0.4559006094932556,
-0.05811529606580734,
0.2435815930366516,
0.07143240422010422,
0.2693769633769989,
-0.23226404190063477,
-0.01471640169620514,
0.20780853927135468,
0.11306054145097733,
0.012448154389858246,
0.24732229113578796,
0.30517667531967163,
0.13762472569942474,
-0.10294151306152344,
-0.12853223085403442,
0.245810404419899,
-0.3478293716907501,
0.28442099690437317,
0.11786508560180664,
-0.2637999951839447,
-0.03150292485952377,
0.2162415236234665,
-0.1029570996761322,
0.13399392366409302,
0.3222515285015106,
-0.21789714694023132,
-0.026608554646372795,
0.1433451920747757,
0.10374672710895538,
0.1616726815700531,
0.1969628632068634,
-0.17776092886924744,
0.007127126678824425,
0.10849644988775253,
-0.04633351042866707,
0.21567469835281372,
0.03962501883506775,
0.18232344090938568,
0.22671163082122803,
-0.023061478510499,
-0.1263146996498108,
-0.46774962544441223,
-0.1853681206703186,
0.3553171157836914,
0.38542595505714417,
-0.33580172061920166,
-0.12772724032402039,
-0.19150522351264954,
-0.34304970502853394,
0.01053345575928688,
0.018519196659326553,
-0.43932968378067017,
-0.06374077498912811,
0.031397607177495956,
-0.13270817697048187,
0.1234351396560669,
0.3114674687385559,
-0.17235545814037323,
0.06031624972820282,
0.04647601395845413,
0.22718772292137146,
-0.10430993139743805,
-0.2941725254058838,
-0.28709039092063904,
-0.014708958566188812,
0.4113118052482605,
-0.2646707594394684,
0.3571643829345703,
-0.37037065625190735,
0.13170477747917175,
-0.44910404086112976,
-0.444199800491333,
0.2987091839313507,
-0.08974866569042206,
0.6092827916145325,
0.029589161276817322,
0.17114581167697906,
-0.358220636844635,
0.03224403038620949,
0.12857367098331451,
0.15435607731342316,
-0.19076703488826752,
-0.014055294916033745,
0.07662522047758102,
-0.11037588864564896,
0.14883723855018616,
-0.21092569828033447,
-0.3335984945297241,
-0.09061720222234726,
-0.13285280764102936,
-0.18068870902061462,
0.19756922125816345,
-0.009542482905089855,
0.3636825680732727,
0.10756562650203705,
-0.04614360257983208,
0.028549516573548317,
-0.15381944179534912,
-0.38898226618766785,
0.31454768776893616,
-0.2569400370121002,
-0.39896899461746216,
0.324656218290329,
-0.07278189808130264,
0.16642802953720093,
0.30997008085250854,
-0.740807831287384,
0.09520699083805084,
-0.04762805253267288,
0.24616912007331848,
0.1465228796005249,
-0.1625184863805771,
0.23017704486846924,
0.08576158434152603,
0.16088157892227173,
-0.20317646861076355,
-0.28059497475624084,
-0.02667926251888275,
-0.3790390193462372,
0.4033668339252472,
0.0007857438176870346,
0.3686892092227936,
0.17603634297847748,
0.5689050555229187,
0.04588140919804573,
-0.10534912347793579,
0.38135582208633423,
-0.019028035923838615,
0.5798054933547974,
0.03390198200941086,
-0.34645479917526245,
0.0574524812400341,
0.07314460724592209,
0.11253359913825989,
0.21800518035888672,
-0.10589040815830231,
-0.19396322965621948,
-0.22147338092327118,
-0.20136196911334991,
-0.5773800611495972,
-0.3607215881347656,
-0.004068974405527115,
-0.27631980180740356,
0.413472056388855,
0.032304923981428146,
-0.06956056505441666,
-0.13987229764461517,
-0.1244574636220932,
-0.16878141462802887,
0.3055632710456848,
0.3937391936779022,
-0.03652939200401306,
-0.16063958406448364,
-0.5137254595756531,
-0.2226506471633911,
0.1984197497367859,
0.09494680166244507,
0.45913127064704895,
-0.24607056379318237,
0.21933937072753906,
0.04373127967119217,
0.060864392668008804,
0.7361512184143066,
-0.4602212607860565,
-0.019014224410057068,
-0.06731751561164856,
-0.13323161005973816,
-0.2930604815483093,
0.05662376806139946,
0.17595748603343964,
0.34649136662483215,
0.08146770298480988,
0.3025142550468445,
-0.4106326699256897,
-0.18123961985111237,
0.25820183753967285,
0.17898429930210114,
-0.23383991420269012,
-0.37329328060150146,
-0.24712535738945007,
0.037910304963588715,
-0.26317018270492554,
-0.21094059944152832,
-0.0023673735558986664,
-0.007449630182236433,
0.12098341435194016,
0.08551646769046783,
-0.08307892084121704,
-0.10844951868057251,
0.27026689052581787,
-0.106655552983284,
0.3333432674407959,
0.11963937431573868,
0.3624148964881897,
-0.03157263994216919,
0.24936290085315704,
0.19260862469673157,
0.37089020013809204,
0.28220775723457336,
-0.594170868396759,
0.0946604385972023,
0.07075455784797668,
0.21134774386882782,
0.25106218457221985,
-0.05061192065477371,
-0.05912948399782181,
-0.050922028720378876,
0.24141627550125122,
0.0666033998131752,
0.24021016061306,
0.3548823595046997,
0.0440826378762722,
-0.544020414352417,
-0.2837494909763336,
0.20707592368125916,
0.11498042941093445,
0.11112397909164429,
0.04634254425764084,
0.2924764156341553,
-0.24519287049770355,
0.23049263656139374,
-0.05443901568651199,
0.912428617477417,
-0.13938097655773163,
-0.007687348872423172,
0.3913678228855133,
-0.10540315508842468,
0.3275139629840851,
-0.2608438730239868,
0.1803845912218094,
-0.2126392126083374,
-0.1790875345468521,
-0.20322345197200775,
0.11636562645435333,
0.5099244713783264,
0.09061296284198761,
-0.0943705141544342,
0.07425431907176971,
-0.005841299891471863,
0.07518860697746277,
0.18094401061534882,
0.0006076879799365997,
-0.23678916692733765,
0.07728588581085205,
0.051972340792417526,
0.06431850790977478,
-0.12294448912143707,
0.20808880031108856,
-0.05745098739862442,
-0.10537747293710709,
-0.09366472065448761,
-0.0585637092590332,
-0.6076198816299438,
-0.19001644849777222,
-0.11062972247600555,
0.03457801789045334,
-0.05759694054722786,
-0.5425142049789429,
0.43531495332717896,
0.2571582496166229,
0.0713796317577362,
0.21594549715518951,
-0.252608060836792,
0.37477055191993713,
-0.15599370002746582,
-0.2659571170806885,
-0.026224737986922264,
-0.03696484863758087,
0.3842777609825134,
-0.06540368497371674,
-0.464751273393631,
0.5111054182052612,
-0.14885732531547546,
0.18433420360088348,
-0.11067356169223785,
-0.1527925431728363,
0.014263145625591278,
-0.15539675951004028,
-0.15796475112438202,
-0.06184178590774536,
-0.04607275873422623,
-0.08887037634849548,
0.09430128335952759,
0.023607060313224792,
-0.1653529852628708,
-0.1135057732462883,
-0.1137842983007431,
-0.15635108947753906,
-0.18110355734825134,
0.25576308369636536,
-0.11131884902715683,
0.11335363984107971,
0.49924755096435547,
0.29962867498397827,
-0.17883914709091187,
-0.16014346480369568,
0.12997084856033325,
0.48290306329727173,
-0.398440420627594,
-0.21973556280136108,
0.14740709960460663,
0.17859052121639252,
-0.2306300401687622,
-0.36537519097328186,
-0.038682229816913605,
-0.10289298743009567,
0.053033147007226944,
-0.44614657759666443,
-0.003981446847319603,
0.06796105206012726,
0.06812725961208344,
0.08888088166713715,
0.20177480578422546,
0.22084257006645203,
0.20801743865013123,
-0.17312021553516388,
-0.18609952926635742,
0.016513831913471222,
-0.0061574894934892654,
0.13307344913482666,
0.008904807269573212,
0.17144203186035156,
-0.23123501241207123,
-0.3224332630634308,
0.049495257437229156,
0.028078347444534302,
0.046717047691345215,
-0.09834261983633041,
0.14968447387218475,
0.20214499533176422,
0.11513800919055939,
-0.1684202402830124,
-0.11355588585138321,
-0.1265336275100708,
-0.2928923964500427,
0.01723276451230049,
-0.08519992232322693,
0.2537183463573456,
-0.19147028028964996,
0.14502421021461487,
-0.2956133186817169,
-0.07566087692975998,
-0.14777231216430664,
0.028399789705872536,
0.05048777908086777,
0.4412716031074524,
0.2873246371746063,
0.29527831077575684,
0.04228154569864273,
0.14199115335941315,
-0.14667092263698578,
0.18586917221546173,
-0.2730034589767456,
-0.10204965621232986,
0.5045817494392395,
-0.43554484844207764,
0.3185606598854065,
0.37258774042129517,
0.29734575748443604,
-0.009983010590076447,
-0.3825625777244568,
0.07448077201843262,
0.46402493119239807,
0.04971274733543396,
-0.5726367235183716,
-0.02688707783818245,
0.2934027314186096,
-0.24095766246318817,
0.06581509113311768,
-0.026073358952999115,
-0.19681121408939362,
0.1468164622783661,
0.010375522077083588,
0.26427990198135376,
0.4434798061847687,
0.09953001886606216,
0.2008189857006073,
0.5301978588104248,
-0.0840948075056076,
0.2214585691690445,
0.13718491792678833,
0.2642766535282135,
0.040197208523750305,
0.5552144646644592,
-0.2208147943019867,
0.13436439633369446,
-0.21815350651741028,
0.2257731556892395,
0.016592927277088165,
-0.44118595123291016,
0.10171391069889069,
0.30441901087760925,
-0.16639557480812073,
-0.12674397230148315,
0.0356866829097271,
0.40765380859375,
0.06340310722589493,
0.02816268615424633,
-0.3183973431587219,
0.1733778864145279,
-0.007476206868886948,
0.4647383987903595,
-0.21009673178195953,
-0.17322009801864624,
-0.25338834524154663,
0.16201922297477722,
0.0031413063406944275,
-0.2345976084470749,
-0.13718518614768982,
0.22086627781391144,
-0.40445154905319214,
-0.028692925348877907,
0.08926057815551758,
0.22527769207954407,
0.06703847646713257,
-0.17279863357543945,
0.09721887856721878,
0.4923352599143982,
-0.2666477859020233,
0.09042917191982269,
0.35415226221084595,
0.32165035605430603,
0.20690536499023438,
-0.0008877702057361603,
-0.1417355090379715,
-0.09272167086601257,
-0.14175663888454437,
0.08981163054704666,
0.2369716763496399,
0.06845814734697342,
0.322742760181427,
0.18470022082328796,
0.00920805148780346,
-0.0639147236943245,
0.25994887948036194,
0.2976580262184143,
0.15868735313415527,
-0.3291330337524414,
-0.018865779042243958,
-0.4250161647796631,
-0.17846235632896423,
-0.12293140590190887,
-0.3704797327518463,
-0.491266131401062,
0.2068810611963272,
0.5704841613769531,
0.002676015952602029,
-0.028056759387254715,
-0.5271132588386536,
-0.004098175093531609,
-0.02713543176651001,
0.1708192229270935,
0.34390929341316223,
-0.004162851721048355,
-0.38009095191955566,
-0.1941976547241211,
-0.6466073989868164,
-0.04050370305776596,
-0.0032784119248390198,
-0.03581469506025314,
0.17260804772377014,
-0.17977440357208252,
-0.02776280790567398,
0.3649022579193115,
0.3495195806026459,
0.1267256885766983,
0.003060729242861271,
0.3236215114593506,
-0.10879239439964294,
-0.15331906080245972,
0.07374434173107147,
0.3110750615596771,
-0.14887017011642456,
-0.3245861232280731,
0.3751753270626068,
-0.13510577380657196,
-0.03141675516963005,
-0.09065449237823486,
0.016920454800128937,
-0.13297510147094727,
-0.3688896596431732,
0.31713807582855225,
0.10214141756296158,
0.4554881155490875,
0.11439532786607742,
0.29610294103622437,
-0.1697346419095993,
0.010778961703181267,
-0.0407937653362751,
0.5241450071334839,
0.2868061661720276,
0.3968747854232788,
-0.2598399817943573,
-0.43049493432044983,
0.09035363793373108,
0.028871063143014908,
0.13564644753932953,
0.012038133107125759,
-0.10014330595731735,
-0.13742275536060333,
-0.2813491225242615,
0.07027587294578552,
0.2655908465385437,
0.2040204405784607,
0.04011755436658859,
0.1296631097793579,
-0.20026376843452454,
-0.16443955898284912,
0.27786606550216675,
-0.32164323329925537,
-0.2165926843881607,
-0.14552174508571625,
-0.022010713815689087,
0.48651033639907837,
-0.14258448779582977,
-0.2478305697441101,
0.038162194192409515,
0.3478034734725952,
0.24611246585845947,
0.04938097670674324,
0.06145887449383736,
-0.11560127139091492,
0.1091296523809433,
0.18103034794330597,
0.6389193534851074,
0.09873349964618683,
-0.09755455702543259,
0.10959605872631073,
-0.05229383707046509
] |
https://github.com/huggingface/datasets/issues/4755 | Datasets.map causes incorrect overflow_to_sample_mapping when used with tokenizers and small batch size | I've built a minimal example that shows this bug without `n_proc`. It seems like it's a problem any way of using **tokenizers, `overflow_to_sample_mapping`, and Dataset.map, with a small batch size**:
```
import datasets
import transformers
pretrained = 'deepset/tinyroberta-squad2'
tokenizer = transformers.AutoTokenizer.from_pretrained(pretrained)
questions = ['Can you tell me why?', 'What time is it?']
contexts = ['This is context zero', 'Another paragraph goes here']
def tok(questions, contexts):
return tokenizer(text=questions,
text_pair=contexts,
truncation='only_second',
return_overflowing_tokens=True,
)
print(tok(questions, contexts)['overflow_to_sample_mapping'])
assert tok(questions, contexts)['overflow_to_sample_mapping'] == [0, 1] # PASSES
def tok2(d):
return tok(d['question'], d['context'])
def tok2(d):
return tok(d['question'], d['context'])
ds = datasets.Dataset.from_dict({'question': questions, 'context': contexts})
tokens = ds.map(tok2, batched=True, batch_size=1)
print(tokens['overflow_to_sample_mapping'])
assert tokens['overflow_to_sample_mapping'] == [0, 1] # FAILS produces [0,0]
```
Note that even if the batch size would be larger, there will be instances where we will not have a lot of data, and end up using small batches. This can occur e.g. if `n_proc` causes batches to be underfill. I imagine it can also occur in other ways, e.g. the final leftover batch at the end. | ## Describe the bug
When using `tokenizer`, we can retrieve the field `overflow_to_sample_mapping`, since long samples will be overflown into multiple token sequences.
However, when tokenizing is done via `Dataset.map`, with `n_proc > 1`, the `overflow_to_sample_mapping` field is wrong. This seems to be because each tokenizer only looks at its share of the samples, and maps to the index _within its share_, but then `Dataset.map` collates them together.
## Steps to reproduce the bug
1. Make a dataset of 3 strings.
2. Tokenize via Dataset.map with n_proc = 8
3. Inspect the `overflow_to_sample_mapping` field
## Expected results
`[0, 1, 2]`
## Actual results
`[0, 0, 0]`
Notes:
1. I have not yet extracted a minimal example, but the above works reliably
2. If the dataset is large, I've yet to determine if this bug still happens a. not at all b. always c. on the small, leftover batch at the end.
| 170 | Datasets.map causes incorrect overflow_to_sample_mapping when used with tokenizers and small batch size
## Describe the bug
When using `tokenizer`, we can retrieve the field `overflow_to_sample_mapping`, since long samples will be overflown into multiple token sequences.
However, when tokenizing is done via `Dataset.map`, with `n_proc > 1`, the `overflow_to_sample_mapping` field is wrong. This seems to be because each tokenizer only looks at its share of the samples, and maps to the index _within its share_, but then `Dataset.map` collates them together.
## Steps to reproduce the bug
1. Make a dataset of 3 strings.
2. Tokenize via Dataset.map with n_proc = 8
3. Inspect the `overflow_to_sample_mapping` field
## Expected results
`[0, 1, 2]`
## Actual results
`[0, 0, 0]`
Notes:
1. I have not yet extracted a minimal example, but the above works reliably
2. If the dataset is large, I've yet to determine if this bug still happens a. not at all b. always c. on the small, leftover batch at the end.
I've built a minimal example that shows this bug without `n_proc`. It seems like it's a problem any way of using **tokenizers, `overflow_to_sample_mapping`, and Dataset.map, with a small batch size**:
```
import datasets
import transformers
pretrained = 'deepset/tinyroberta-squad2'
tokenizer = transformers.AutoTokenizer.from_pretrained(pretrained)
questions = ['Can you tell me why?', 'What time is it?']
contexts = ['This is context zero', 'Another paragraph goes here']
def tok(questions, contexts):
return tokenizer(text=questions,
text_pair=contexts,
truncation='only_second',
return_overflowing_tokens=True,
)
print(tok(questions, contexts)['overflow_to_sample_mapping'])
assert tok(questions, contexts)['overflow_to_sample_mapping'] == [0, 1] # PASSES
def tok2(d):
return tok(d['question'], d['context'])
def tok2(d):
return tok(d['question'], d['context'])
ds = datasets.Dataset.from_dict({'question': questions, 'context': contexts})
tokens = ds.map(tok2, batched=True, batch_size=1)
print(tokens['overflow_to_sample_mapping'])
assert tokens['overflow_to_sample_mapping'] == [0, 1] # FAILS produces [0,0]
```
Note that even if the batch size would be larger, there will be instances where we will not have a lot of data, and end up using small batches. This can occur e.g. if `n_proc` causes batches to be underfill. I imagine it can also occur in other ways, e.g. the final leftover batch at the end. | [
-0.35161277651786804,
-0.22139035165309906,
0.07477585971355438,
0.09442124515771866,
0.06536842882633209,
-0.18519334495067596,
0.2197558730840683,
0.15348996222019196,
-0.24925515055656433,
0.10310765355825424,
0.20500028133392334,
0.37535014748573303,
-0.012278138659894466,
-0.2899099886417389,
-0.12431859970092773,
0.1222868263721466,
0.27395495772361755,
-0.16819879412651062,
0.07317665964365005,
-0.08932797610759735,
-0.201544851064682,
0.026679588481783867,
-0.2921871542930603,
-0.012143008410930634,
-0.20550687611103058,
0.04635768383741379,
0.044911473989486694,
-0.459034264087677,
-0.09165946394205093,
-0.40724244713783264,
-0.08329152315855026,
0.06304538249969482,
0.24032369256019592,
0.4228726923465729,
-0.00012657853949349374,
-0.1698702871799469,
0.21173402667045593,
0.04437176138162613,
0.005308870226144791,
0.019966095685958862,
-0.13367119431495667,
-0.41579580307006836,
-0.24406714737415314,
-0.07656014710664749,
0.19478970766067505,
-0.22994773089885712,
0.10872525721788406,
-0.1038898378610611,
0.2708247900009155,
0.12279795855283737,
0.07066823542118073,
0.48161110281944275,
-0.20877858996391296,
-0.02026968263089657,
0.2428170144557953,
0.005884788930416107,
0.026109056547284126,
-0.12363819777965546,
0.41759058833122253,
-0.12868189811706543,
-0.2768492102622986,
0.013287724927067757,
-0.2519984841346741,
-0.3170360028743744,
-0.03654344379901886,
-0.0702919140458107,
0.08870451152324677,
-0.5135871171951294,
0.1176367923617363,
-0.04053197056055069,
0.12802249193191528,
-0.16796404123306274,
-0.2277383655309677,
-0.3974226713180542,
-0.2790029048919678,
0.11945225298404694,
-0.053670771420001984,
-0.21462677419185638,
0.0939083844423294,
-0.18755604326725006,
-0.5057076215744019,
0.13917823135852814,
-0.007561672478914261,
0.352738618850708,
-0.3098164200782776,
0.3694900572299957,
-0.03293447569012642,
0.3535819351673126,
-0.13705621659755707,
-0.24470724165439606,
0.09664285182952881,
-0.3060213029384613,
-0.009339071810245514,
0.34992843866348267,
-0.1947607547044754,
-0.33792316913604736,
0.23873072862625122,
-0.5552716255187988,
0.3966773748397827,
0.1801452338695526,
-0.15315058827400208,
0.11337969452142715,
-0.06452429294586182,
0.12616577744483948,
0.44377246499061584,
0.31635937094688416,
0.1637040674686432,
0.6596880555152893,
0.21447135508060455,
-0.2553805708885193,
0.07720284163951874,
0.09200148284435272,
-0.13620084524154663,
-0.06578531861305237,
0.07828615605831146,
-0.14815488457679749,
-0.11146847903728485,
-0.08525797724723816,
-0.11627267301082611,
0.11027368903160095,
-0.4004465937614441,
0.2784997224807739,
0.048195160925388336,
0.1532176434993744,
0.20454157888889313,
0.11686091870069504,
-0.3069446086883545,
0.2544216513633728,
-0.091839499771595,
-0.11233639717102051,
-0.15225841104984283,
-0.3365837335586548,
-0.19945156574249268,
0.10349051654338837,
0.10456623136997223,
0.2867341637611389,
0.2967812418937683,
0.1821656972169876,
0.05869942903518677,
-0.06178119778633118,
-0.08186837285757065,
-0.2647882103919983,
0.29114219546318054,
-0.06292733550071716,
0.09310780465602875,
0.40850478410720825,
0.08253519237041473,
0.04760870337486267,
-0.18029573559761047,
0.2687472403049469,
-0.4354214072227478,
-0.11725136637687683,
0.20096200704574585,
0.09382082521915436,
-0.3807428479194641,
0.003759428858757019,
-0.3867373764514923,
0.3448254466056824,
0.6321754455566406,
-0.10719098150730133,
-0.06681523472070694,
-0.2389277070760727,
-0.2962200939655304,
-0.1087864488363266,
0.18135274946689606,
0.1353960633277893,
-0.18060630559921265,
-0.17247053980827332,
0.09485728293657303,
0.2113228142261505,
0.5885545611381531,
0.41663601994514465,
-0.27091825008392334,
0.17969194054603577,
-0.38496893644332886,
0.5514950752258301,
0.22064721584320068,
-0.19015008211135864,
-0.6223768591880798,
0.14918875694274902,
-0.12802211940288544,
-0.0008805673569440842,
-0.3219430148601532,
-0.06942889839410782,
0.7713602781295776,
-0.18444785475730896,
0.13122659921646118,
0.3507552742958069,
-0.14019156992435455,
0.18987630307674408,
-0.3823222219944,
0.07938014715909958,
0.014941398054361343,
-0.1172938346862793,
0.18728739023208618,
0.061982668936252594,
-0.0022167563438415527,
-0.025058533996343613,
0.1269514560699463,
0.1943107545375824,
0.25528213381767273,
0.06715436279773712,
0.23863011598587036,
-0.1838720589876175,
0.04965415596961975,
-0.09975370019674301,
0.07239167392253876,
0.06667353212833405,
-0.05875550955533981,
-0.012518495321273804,
0.16923204064369202,
-0.11667073518037796,
-0.027669280767440796,
0.240000918507576,
-0.062408123165369034,
0.10294552147388458,
0.0013169534504413605,
0.07227403670549393,
-0.0038480814546346664,
-0.0030750054866075516,
0.1344088912010193,
-0.3690076172351837,
0.03082062117755413,
0.18076670169830322,
-0.07687172293663025,
0.09368642419576645,
0.10216060280799866,
0.043767049908638,
-0.39242374897003174,
0.14704880118370056,
0.3003182113170624,
-0.02248872071504593,
-0.05776265263557434,
0.27663007378578186,
0.11932042241096497,
-0.07274460792541504,
-0.3049521744251251,
0.058016836643218994,
0.29249030351638794,
-0.24492795765399933,
0.08489207178354263,
0.2070031464099884,
-0.017292164266109467,
-0.1207234263420105,
0.09855318069458008,
0.28017088770866394,
0.302205353975296,
0.463029682636261,
-0.24797269701957703,
0.1579941213130951,
0.13720862567424774,
0.07690834999084473,
-0.29047098755836487,
-0.09809152781963348,
-0.18859750032424927,
0.2776254117488861,
0.14342375099658966,
-0.06889750808477402,
0.17290127277374268,
0.26652586460113525,
0.3856801688671112,
-0.09837973117828369,
-0.07961166650056839,
0.12112616002559662,
-0.6378230452537537,
-0.1668981909751892,
-0.03734787553548813,
0.34845447540283203,
0.21287569403648376,
0.17631253600120544,
0.13814592361450195,
-0.3996542990207672,
0.003948523197323084,
0.13193996250629425,
0.06287619471549988,
0.2673196494579315,
0.01773540861904621,
0.3531377911567688,
0.4434000551700592,
0.16057199239730835,
-0.05508024990558624,
0.008817333728075027,
0.07534326612949371,
0.0930301621556282,
-0.32628339529037476,
0.11048635095357895,
0.17216287553310394,
-0.07093977928161621,
-0.13411091268062592,
-0.2341143637895584,
-0.15900565683841705,
-0.4836263358592987,
0.1333838701248169,
0.09018203616142273,
-0.1594763994216919,
0.18618036806583405,
-0.01693587750196457,
0.35636404156684875,
0.11092668771743774,
-0.20614418387413025,
0.13879317045211792,
0.11565795540809631,
-0.44332247972488403,
-0.06560514867305756,
0.2534770369529724,
-0.3616527020931244,
0.07583828270435333,
0.2909139394760132,
-0.3151150941848755,
-0.24922966957092285,
-0.39651745557785034,
0.13065361976623535,
0.00008825212717056274,
0.391938716173172,
0.02289818972349167,
-0.07859702408313751,
0.0027961768209934235,
-0.19147111475467682,
0.07461336255073547,
-0.09478375315666199,
-0.11476577818393707,
0.1890995055437088,
-0.1965274065732956,
-0.11803092807531357,
-0.08991910517215729,
-0.01557372510433197,
0.06397149711847305,
-0.13510143756866455,
-0.1035672128200531,
-0.12018458545207977,
0.13065923750400543,
0.30535876750946045,
-0.09301124513149261,
-0.07924751937389374,
-0.11700238287448883,
-0.44647547602653503,
-0.3092358410358429,
-0.014548134058713913,
0.4623171389102936,
-0.2259805053472519,
-0.18201866745948792,
-0.32328519225120544,
-0.18873591721057892,
-0.13439463078975677,
0.29564541578292847,
-0.21282631158828735,
0.1443004012107849,
-0.24671538174152374,
0.15785729885101318,
0.013041384518146515,
0.022160489112138748,
0.23016509413719177,
-0.027545256540179253,
0.07511989027261734,
-0.029198946431279182,
-0.05026179179549217,
0.2306838035583496,
0.15688937902450562,
0.37383389472961426,
-0.10357237607240677,
0.32914936542510986,
0.3176146447658539,
0.8702787160873413,
0.35203245282173157,
-0.23898933827877045,
0.11390482634305954,
-0.08425477147102356,
0.01829874888062477,
-0.11001282185316086,
-0.16723771393299103,
-0.08747753500938416,
-0.038000524044036865,
-0.07792223989963531,
0.25721120834350586,
-0.017535604536533356,
-0.12653309106826782,
0.5356160402297974,
0.12856708467006683,
-0.058600522577762604,
-0.27948954701423645,
0.17447833716869354,
-0.13860735297203064,
0.09054990112781525,
0.15092934668064117,
0.2610875368118286,
-0.4160304665565491,
-0.2887331247329712,
-0.15033842623233795,
-0.35901886224746704,
0.1588912457227707,
0.061588067561388016,
-0.7757514715194702,
0.0372522696852684,
-0.6759042143821716,
0.22844678163528442,
-0.049897100776433945,
0.6865535378456116,
0.21420736610889435,
-0.14025583863258362,
-0.039010003209114075,
0.18831811845302582,
0.8502975106239319,
-0.11246364563703537,
0.1307607889175415,
-0.08295521140098572,
0.21842700242996216,
-0.4750886559486389,
-0.21385395526885986,
-0.06455013900995255,
0.6083796620368958,
0.26083844900131226,
0.5923702716827393,
-0.15006110072135925,
0.18029896914958954,
0.06758884340524673,
-0.04382220655679703,
-0.057665783911943436,
-0.09234650433063507,
0.029164690524339676,
0.060765981674194336,
0.001955229789018631,
0.04216114059090614,
0.28488484025001526,
0.32405316829681396,
-0.15722669661045074,
-0.4362349212169647,
0.02789933793246746,
-0.151156485080719,
0.0805886760354042,
0.07065591216087341,
0.36109307408332825,
0.043805960565805435,
0.27892398834228516,
0.07778073102235794,
-0.03317871689796448,
0.41917988657951355,
0.01658172905445099,
0.023538101464509964,
-0.36360254883766174,
0.1693921685218811,
0.08819907158613205,
0.37152040004730225,
0.21690276265144348,
0.03661658987402916,
0.23665300011634827,
-0.370222270488739,
0.13900336623191833,
-0.15914113819599152,
0.3574777841567993,
0.2177744209766388,
0.14634250104427338,
-0.33352330327033997,
-0.030696526169776917,
0.2496773600578308,
0.1699923723936081,
-0.037865880876779556,
0.2819353938102722,
-0.11604936420917511,
-0.503055989742279,
0.7188581824302673,
-0.02104957401752472,
0.8215140104293823,
-0.06611180305480957,
0.0953638032078743,
-0.024669170379638672,
0.601613461971283,
0.36478593945503235,
-0.18577641248703003,
0.21231436729431152,
-0.31881192326545715,
-0.1806439310312271,
0.1564384400844574,
-0.1534217894077301,
-0.2777436375617981,
0.13894057273864746,
0.05086430534720421,
0.20143838226795197,
-0.2236415594816208,
0.6540641188621521,
-0.017583156004548073,
-0.203787162899971,
0.16274720430374146,
-0.18375463783740997,
0.20701037347316742,
0.07034273445606232,
0.05299568176269531,
0.08823049068450928,
-0.02757849544286728,
0.06847882270812988,
-0.1668088734149933,
-0.2434513419866562,
-0.31425023078918457,
0.025966830551624298,
-0.37273913621902466,
0.14624077081680298,
0.1878623515367508,
0.18427537381649017,
0.2665456533432007,
0.3297976553440094,
0.09086177498102188,
0.37412041425704956,
-0.13095729053020477,
0.02741202525794506,
0.3291037082672119,
0.024724867194890976,
0.28122150897979736,
-0.27024006843566895,
-0.03906136751174927,
0.20895954966545105,
-0.016983292996883392,
-0.019510693848133087,
0.08395738154649734,
-0.0380558967590332,
-0.27281057834625244,
0.10684352368116379,
0.5668037533760071,
-0.4580291509628296,
-0.048043545335531235,
0.1568671613931656,
0.05061529204249382,
-0.20844878256320953,
-0.0037261173129081726,
-0.18409256637096405,
-0.2698090076446533,
0.4186902940273285,
-0.09552896022796631,
-0.11736051738262177,
0.12123088538646698,
0.3515433371067047,
-0.06647203117609024,
-0.01186596043407917,
0.3349305987358093,
-0.1052926778793335,
-0.06827978044748306,
0.0036974139511585236,
0.40019509196281433,
0.2816559374332428,
-0.23404988646507263,
-0.033533234149217606,
-0.5616708993911743,
-0.0106840580701828,
-0.06211152672767639,
0.20854511857032776,
0.009219922125339508,
-0.20579037070274353,
-0.2481047660112381,
-0.2951124906539917,
-0.2368299514055252,
-0.022278137505054474,
-0.08419519662857056,
0.10130763053894043,
-0.11063133925199509,
0.26161664724349976,
-0.37375307083129883,
0.19390621781349182,
-0.1736258715391159,
-0.12543879449367523,
-0.06237253546714783,
0.2484181821346283,
-0.4605479836463928,
0.10906045883893967,
-0.03637123852968216,
-0.237060546875,
-0.0625990480184555,
0.3580588102340698,
-0.029652100056409836,
-0.0996374636888504,
-0.06833833456039429,
0.17752531170845032,
0.31942084431648254,
-0.2880776822566986,
0.09036184102296829,
0.12927457690238953,
-0.027985617518424988,
-0.3915744125843048,
0.0962708443403244,
0.18688878417015076,
0.028756361454725266,
-0.14913852512836456,
0.40564683079719543,
0.13003772497177124,
0.06978505104780197,
0.22945068776607513,
0.14341889321804047,
0.10403983294963837,
0.21828539669513702,
0.65418541431427,
-0.007532571442425251,
-0.14656227827072144,
-0.2776769995689392,
0.2085692286491394,
0.5124802589416504,
0.13172870874404907,
0.1355488896369934,
-0.2778007388114929,
-0.15467427670955658,
0.43606889247894287,
0.04176311194896698,
0.39663535356521606,
-0.4774554669857025,
-0.2229757159948349,
0.16488996148109436,
0.160029798746109,
-0.10192977637052536,
-0.18392416834831238,
0.15538862347602844,
-0.14630720019340515,
0.05743054673075676,
0.2150847464799881,
0.12121964991092682,
-0.07062557339668274,
-0.10454349219799042,
-0.023891588672995567,
0.4290201663970947,
0.1119856983423233,
0.3456815779209137,
0.4313826858997345,
-0.011350199580192566,
0.17919571697711945,
0.24808619916439056,
-0.15605635941028595,
0.18396314978599548,
0.29452404379844666,
0.11003781110048294,
0.5950829386711121,
0.13429415225982666,
-0.1472986936569214,
0.17513407766819,
-0.3901997208595276,
0.19971291720867157,
0.4740309417247772,
0.06822513788938522,
0.2894526422023773,
0.01691432297229767,
0.054446980357170105,
-0.0996190756559372,
-0.25311610102653503,
-0.21355968713760376,
0.03944803774356842,
-0.21386614441871643,
-0.2884620726108551,
-0.2994670569896698,
-0.14320023357868195,
-0.16785725951194763,
-0.03892922028899193,
-0.17163072526454926,
-0.32916051149368286,
-0.10954907536506653,
-0.18109957873821259,
-0.3110828995704651,
-0.24616114795207977,
-0.23180440068244934,
0.08890055119991302,
0.09916170686483383,
-0.44445356726646423,
0.34815067052841187,
-0.5618993043899536,
0.033193595707416534,
-0.03239550068974495,
0.26435497403144836,
0.401317298412323,
0.33415836095809937,
0.00221281498670578,
0.051909174770116806,
-0.13239754736423492,
-0.022302549332380295,
-0.09538684785366058,
0.22286376357078552,
-0.24584993720054626,
-0.33364933729171753,
0.08225668966770172,
-0.04210793226957321,
-0.058414291590452194,
-0.2168702334165573,
0.24959996342658997,
0.07213941216468811,
0.1298574060201645,
0.06894855201244354,
-0.024019666016101837,
-0.20745229721069336,
0.09461316466331482,
-0.17405372858047485,
-0.07215417176485062,
0.08653077483177185,
0.5303294062614441,
-0.09761268645524979,
0.3790488839149475,
0.003029694315046072,
0.02766139805316925,
-0.10005968809127808,
0.14989358186721802,
0.27736696600914,
-0.24095284938812256,
-0.39973413944244385,
-0.18796294927597046,
-0.16961130499839783,
0.35120588541030884,
-0.0457230843603611,
0.2650296986103058,
-0.04371632635593414,
0.12016980350017548,
-0.03219635784626007,
0.09222019463777542,
0.016911640763282776,
0.09111139923334122,
-0.1737617403268814,
0.35949423909187317,
-0.09675555676221848,
-0.10314682126045227,
-0.30194467306137085,
0.1008085086941719,
0.1874985247850418,
-0.4562240242958069,
0.29223981499671936,
-0.23049089312553406,
-0.09759104996919632,
0.15792423486709595,
0.10178761184215546,
0.08758461475372314,
-0.18853659927845,
0.34610116481781006,
0.33171582221984863,
0.29707005620002747,
-0.05828169733285904,
0.21708692610263824,
-0.33978191018104553,
-0.13597311079502106,
-0.5195270776748657,
-0.03593902289867401,
-0.16240988671779633,
0.11109572649002075,
-0.12238095700740814,
-0.08664104342460632,
-0.08450930565595627,
-0.465914249420166,
0.36928898096084595,
-0.2943350076675415,
-0.3435831069946289,
0.13443350791931152,
-0.19890302419662476,
0.08270259946584702,
-0.04612596333026886,
0.05890968441963196,
-0.028813183307647705,
0.3500857651233673,
0.03738747537136078,
-0.26487210392951965,
0.23135356605052948,
-0.7063838243484497,
-0.16151899099349976,
-0.36831146478652954,
0.2349432110786438,
0.08693260699510574,
-0.34008821845054626,
-0.22100430727005005,
-0.3059695065021515,
0.4500904679298401,
-0.001556025817990303,
-0.34267544746398926,
0.04169584810733795,
-0.08577094972133636,
-0.02199832908809185,
-0.23979654908180237,
0.600827693939209,
0.1365656554698944,
-0.3101530969142914,
0.3153620660305023,
-0.3210534453392029
] |
https://github.com/huggingface/datasets/issues/4755 | Datasets.map causes incorrect overflow_to_sample_mapping when used with tokenizers and small batch size | A larger batch size does _not_ have this behavior:
```
def tok2(d):
return tok(d['question'], d['context'])
ds = datasets.Dataset.from_dict({'question': questions, 'context': contexts})
tokens = ds.map(tok2, batched=True, batch_size=2)
print(tokens['overflow_to_sample_mapping'])
assert tokens['overflow_to_sample_mapping'] == [0, 1] # PASSES
``` | ## Describe the bug
When using `tokenizer`, we can retrieve the field `overflow_to_sample_mapping`, since long samples will be overflown into multiple token sequences.
However, when tokenizing is done via `Dataset.map`, with `n_proc > 1`, the `overflow_to_sample_mapping` field is wrong. This seems to be because each tokenizer only looks at its share of the samples, and maps to the index _within its share_, but then `Dataset.map` collates them together.
## Steps to reproduce the bug
1. Make a dataset of 3 strings.
2. Tokenize via Dataset.map with n_proc = 8
3. Inspect the `overflow_to_sample_mapping` field
## Expected results
`[0, 1, 2]`
## Actual results
`[0, 0, 0]`
Notes:
1. I have not yet extracted a minimal example, but the above works reliably
2. If the dataset is large, I've yet to determine if this bug still happens a. not at all b. always c. on the small, leftover batch at the end.
| 35 | Datasets.map causes incorrect overflow_to_sample_mapping when used with tokenizers and small batch size
## Describe the bug
When using `tokenizer`, we can retrieve the field `overflow_to_sample_mapping`, since long samples will be overflown into multiple token sequences.
However, when tokenizing is done via `Dataset.map`, with `n_proc > 1`, the `overflow_to_sample_mapping` field is wrong. This seems to be because each tokenizer only looks at its share of the samples, and maps to the index _within its share_, but then `Dataset.map` collates them together.
## Steps to reproduce the bug
1. Make a dataset of 3 strings.
2. Tokenize via Dataset.map with n_proc = 8
3. Inspect the `overflow_to_sample_mapping` field
## Expected results
`[0, 1, 2]`
## Actual results
`[0, 0, 0]`
Notes:
1. I have not yet extracted a minimal example, but the above works reliably
2. If the dataset is large, I've yet to determine if this bug still happens a. not at all b. always c. on the small, leftover batch at the end.
A larger batch size does _not_ have this behavior:
```
def tok2(d):
return tok(d['question'], d['context'])
ds = datasets.Dataset.from_dict({'question': questions, 'context': contexts})
tokens = ds.map(tok2, batched=True, batch_size=2)
print(tokens['overflow_to_sample_mapping'])
assert tokens['overflow_to_sample_mapping'] == [0, 1] # PASSES
``` | [
-0.38004496693611145,
-0.1890600472688675,
0.032079022377729416,
0.09150373935699463,
-0.028541024774312973,
-0.1576000154018402,
0.15276341140270233,
0.16440533101558685,
-0.021619120612740517,
0.14799197018146515,
0.2348051220178604,
0.3651667833328247,
-0.030411724001169205,
-0.14136043190956116,
-0.1265135109424591,
0.09667649865150452,
0.3455282747745514,
-0.16023120284080505,
0.0355679988861084,
0.004418656229972839,
-0.2771989107131958,
0.028317147865891457,
-0.30834585428237915,
-0.02780219167470932,
-0.10024144500494003,
-0.05001994967460632,
0.007733399048447609,
-0.4389422535896301,
-0.11736304312944412,
-0.4391986131668091,
-0.06883598864078522,
0.105959951877594,
0.0889742523431778,
0.39966264367103577,
-0.00012137865269323811,
-0.2572786211967468,
0.2394840121269226,
0.0812942385673523,
0.011352824047207832,
-0.02259594202041626,
-0.14955979585647583,
-0.4436851739883423,
-0.2236548662185669,
-0.12940478324890137,
0.16298174858093262,
-0.20220232009887695,
0.008281955495476723,
-0.17060302197933197,
0.14127571880817413,
0.17646954953670502,
0.12827733159065247,
0.26698437333106995,
-0.10997764766216278,
0.03978068754076958,
0.2662103474140167,
0.061895109713077545,
0.07399360835552216,
0.009619452059268951,
0.42983320355415344,
-0.18378709256649017,
-0.2630974054336548,
-0.0019455717410892248,
-0.2991698384284973,
-0.3132075071334839,
-0.04833097755908966,
-0.09374387562274933,
0.20861172676086426,
-0.43856585025787354,
0.11561938375234604,
-0.029007434844970703,
0.13087810575962067,
-0.12578469514846802,
-0.251520037651062,
-0.4243844151496887,
-0.3053501546382904,
0.032904624938964844,
0.0015646889805793762,
-0.23688295483589172,
-0.023782044649124146,
-0.12601473927497864,
-0.479614794254303,
0.04683870077133179,
0.09277431666851044,
0.3228856921195984,
-0.4049626290798187,
0.32033872604370117,
-0.06320802867412567,
0.3577849268913269,
-0.1047840416431427,
-0.2573425769805908,
0.02105143293738365,
-0.37395596504211426,
-0.08096100389957428,
0.2594127953052521,
-0.17976535856723785,
-0.24594196677207947,
0.3848162889480591,
-0.4517865478992462,
0.35509875416755676,
0.1358066350221634,
-0.2438974529504776,
0.07482383400201797,
-0.07262692600488663,
0.16292370855808258,
0.4991927146911621,
0.2606722116470337,
0.10602426528930664,
0.6429795026779175,
0.11144410073757172,
-0.1312416046857834,
-0.11197756230831146,
0.054436638951301575,
0.020038660615682602,
-0.1312895119190216,
0.00463520735502243,
-0.16755729913711548,
-0.10886388272047043,
-0.060643699020147324,
-0.16313059628009796,
0.17313995957374573,
-0.32344141602516174,
0.22449298202991486,
0.14684534072875977,
0.14617609977722168,
0.14551962912082672,
0.1182834655046463,
-0.3118920922279358,
0.23044224083423615,
-0.03258821368217468,
-0.06459379196166992,
-0.17787571251392365,
-0.27867186069488525,
-0.23367102444171906,
0.0059791989624500275,
-0.0018657520413398743,
0.23694702982902527,
0.2550569772720337,
0.3563818037509918,
0.020879127085208893,
-0.07630965113639832,
-0.06826567649841309,
-0.19144439697265625,
0.41937631368637085,
-0.008242640644311905,
-0.01479741744697094,
0.48271694779396057,
0.1499045193195343,
0.05851422995328903,
-0.2425592541694641,
0.2664910852909088,
-0.4347863793373108,
-0.09798091650009155,
0.1993994265794754,
0.15422703325748444,
-0.2952042818069458,
0.06021133437752724,
-0.470674604177475,
0.354027658700943,
0.5548746585845947,
-0.21147842705249786,
-0.010290555655956268,
-0.21428155899047852,
-0.28001272678375244,
-0.232075035572052,
0.22236108779907227,
0.05063323676586151,
-0.1526920199394226,
-0.022940054535865784,
0.015299074351787567,
0.174035906791687,
0.6800755262374878,
0.4094257652759552,
-0.22429145872592926,
0.16284747421741486,
-0.49307408928871155,
0.4473073482513428,
0.17284178733825684,
-0.19213539361953735,
-0.6623591780662537,
0.22621110081672668,
-0.19105598330497742,
0.15942250192165375,
-0.3062317371368408,
-0.08967135101556778,
0.7484452724456787,
-0.13478025794029236,
0.320009708404541,
0.28427833318710327,
-0.13644592463970184,
0.18612168729305267,
-0.42430078983306885,
0.17569905519485474,
0.1915377676486969,
-0.3033084571361542,
0.09505175054073334,
0.10237862169742584,
0.06838184595108032,
-0.26705309748649597,
0.16276302933692932,
0.16362199187278748,
0.22499190270900726,
0.0941711887717247,
0.24759377539157867,
-0.15920518338680267,
0.040880728513002396,
-0.11030910909175873,
0.1983211636543274,
0.09838221222162247,
-0.010442648082971573,
-0.16681498289108276,
0.16603921353816986,
-0.18930581212043762,
-0.05860846862196922,
0.2759958803653717,
-0.07303695380687714,
0.0633503645658493,
0.04219622164964676,
-0.023701295256614685,
0.08901305496692657,
0.13080543279647827,
0.1207410991191864,
-0.4801330864429474,
0.025130925700068474,
0.13041028380393982,
0.012643231078982353,
-0.03786090016365051,
0.09760732203722,
0.12033066898584366,
-0.2894793748855591,
0.1477327197790146,
0.2955491840839386,
-0.02698889933526516,
-0.005429134704172611,
0.2914637327194214,
0.27417492866516113,
-0.10553662478923798,
-0.3407975733280182,
-0.045823514461517334,
0.18583528697490692,
-0.04847205802798271,
-0.023688020184636116,
0.10918308794498444,
-0.07646867632865906,
-0.13790971040725708,
0.1827508509159088,
0.3628670573234558,
0.3259659707546234,
0.4259122908115387,
-0.26085591316223145,
0.31389954686164856,
0.19418472051620483,
0.08136214315891266,
-0.12817254662513733,
-0.23248744010925293,
-0.14341214299201965,
0.22471599280834198,
0.10694891214370728,
-0.10191993415355682,
0.07226747274398804,
0.3688434064388275,
0.3025875389575958,
-0.12556956708431244,
-0.0905144140124321,
0.04428477585315704,
-0.5638794302940369,
-0.24721252918243408,
0.121394582092762,
0.31847697496414185,
0.20907126367092133,
0.15407808125019073,
0.24556072056293488,
-0.39731135964393616,
0.003794838208705187,
0.024791542440652847,
0.11888965964317322,
0.14601123332977295,
-0.08822411298751831,
0.3358058035373688,
0.3835430443286896,
0.125571146607399,
-0.10017453134059906,
0.06000624969601631,
0.11061016470193863,
0.10978060960769653,
-0.33425143361091614,
0.11938848346471786,
-0.010893704369664192,
-0.21826505661010742,
-0.0469999760389328,
-0.28555217385292053,
-0.14209483563899994,
-0.6538801789283752,
0.141137957572937,
0.24090687930583954,
-0.2327987253665924,
0.12380792200565338,
-0.026656657457351685,
0.2504459619522095,
0.04221518337726593,
-0.16546876728534698,
0.06398923695087433,
0.00019026733934879303,
-0.537295401096344,
-0.015790756791830063,
0.27603840827941895,
-0.3626002371311188,
0.2672215700149536,
0.1485106498003006,
-0.28607964515686035,
-0.28174591064453125,
-0.4273695647716522,
0.04749060422182083,
-0.0019873082637786865,
0.3186855614185333,
0.09463641047477722,
-0.0538066029548645,
-0.03828349709510803,
-0.08393347263336182,
0.03871863707900047,
-0.07592564821243286,
-0.22863423824310303,
0.24842295050621033,
-0.09705259650945663,
-0.054662544280290604,
-0.09317928552627563,
0.07812637090682983,
0.08238137513399124,
-0.15549308061599731,
-0.012258455157279968,
-0.14980310201644897,
0.09383553266525269,
0.27433398365974426,
-0.11964530497789383,
-0.09877032786607742,
-0.20723548531532288,
-0.36045077443122864,
-0.4103088080883026,
-0.11713681370019913,
0.3224790692329407,
-0.26182475686073303,
-0.18150950968265533,
-0.22619810700416565,
-0.1729932427406311,
-0.007433991879224777,
0.4103941321372986,
-0.16656512022018433,
0.18115754425525665,
-0.1423208862543106,
0.23817744851112366,
0.050289999693632126,
-0.017366522923111916,
0.0933820828795433,
0.10261927545070648,
0.009117109701037407,
-0.03338801860809326,
0.06380683183670044,
0.12983079254627228,
0.011540504172444344,
0.3234921395778656,
-0.05800935626029968,
0.2799605429172516,
0.34958839416503906,
0.7241537570953369,
0.37639302015304565,
-0.0905107706785202,
0.14252130687236786,
-0.16734838485717773,
0.08862867206335068,
-0.15749713778495789,
-0.19341020286083221,
-0.054159265011548996,
0.03260975331068039,
-0.13522186875343323,
0.17912495136260986,
-0.07977253943681717,
-0.05493977665901184,
0.5172332525253296,
0.07549558579921722,
-0.13450437784194946,
-0.3277592957019806,
0.124789759516716,
-0.4484817683696747,
0.20102745294570923,
0.13872767984867096,
0.2313287854194641,
-0.3680640459060669,
-0.262939453125,
-0.05741691589355469,
-0.31285494565963745,
0.22689223289489746,
0.007809023838490248,
-0.7152398228645325,
-0.09235043078660965,
-0.7788605093955994,
0.251498281955719,
-0.08337026834487915,
0.6947734355926514,
0.13120751082897186,
-0.0006647072732448578,
-0.03551286458969116,
0.1915220022201538,
0.9349817633628845,
-0.21080471575260162,
0.10571713745594025,
-0.029573269188404083,
0.1675618290901184,
-0.44721120595932007,
-0.13776659965515137,
-0.024153612554073334,
0.6419014930725098,
0.16651028394699097,
0.5308406352996826,
-0.15313583612442017,
0.19872289896011353,
0.015155441127717495,
0.08059213310480118,
-0.05573901906609535,
-0.13554668426513672,
0.07254791259765625,
0.015187527984380722,
-0.04017200320959091,
0.06903937458992004,
0.3164457082748413,
0.3745208978652954,
-0.12943366169929504,
-0.4712204039096832,
-0.03478790819644928,
-0.034350909292697906,
0.1215035691857338,
0.01946893334388733,
0.3486799895763397,
-0.0017262365436181426,
0.2366926372051239,
0.009655708447098732,
-0.027881614863872528,
0.5998048782348633,
0.03563825786113739,
0.017500098794698715,
-0.2608468532562256,
-0.038547780364751816,
0.19937045872211456,
0.36723148822784424,
0.13471350073814392,
-0.05570988729596138,
0.3240474760532379,
-0.4291245937347412,
0.11240144073963165,
-0.23629377782344818,
0.3383696377277374,
0.24884510040283203,
0.17246747016906738,
-0.42304423451423645,
-0.16586939990520477,
0.19916310906410217,
0.21924343705177307,
-0.13170617818832397,
0.35984668135643005,
-0.10606524348258972,
-0.5418584942817688,
0.6139246821403503,
0.010023325681686401,
0.6991121172904968,
-0.028502680361270905,
0.13955332338809967,
0.12179243564605713,
0.5273175835609436,
0.3769261837005615,
-0.047602422535419464,
0.1428573876619339,
-0.3260866701602936,
-0.10677054524421692,
0.14173346757888794,
-0.13787110149860382,
-0.23767545819282532,
0.17226961255073547,
0.11813315749168396,
0.2105143964290619,
-0.29197901487350464,
0.6096940636634827,
-0.03084483928978443,
-0.14574295282363892,
0.14088252186775208,
-0.08762972056865692,
0.20224449038505554,
0.1088944524526596,
0.13502982258796692,
0.10268089175224304,
-0.017021380364894867,
0.05019531771540642,
-0.15625807642936707,
-0.21171614527702332,
-0.3789106607437134,
-0.04175029695034027,
-0.3044871985912323,
0.22777503728866577,
0.11637823283672333,
0.1285209059715271,
0.09597161412239075,
0.23733127117156982,
0.03449072688817978,
0.4145064055919647,
-0.04390875995159149,
0.01603555679321289,
0.26968494057655334,
0.0347176194190979,
0.35978394746780396,
-0.2885684370994568,
0.07819971442222595,
0.21445578336715698,
0.02492927759885788,
-0.012638024985790253,
0.04990944638848305,
0.00410514697432518,
-0.22845539450645447,
0.1176624596118927,
0.42909765243530273,
-0.4199424982070923,
-0.12890835106372833,
0.03417322784662247,
0.09357067942619324,
-0.25393497943878174,
0.012531671673059464,
-0.13941138982772827,
-0.2452155500650406,
0.41553935408592224,
-0.2532769739627838,
-0.0763067901134491,
0.06749739497900009,
0.2738790810108185,
-0.12243875116109848,
-0.055381231009960175,
0.2453272044658661,
-0.1171935498714447,
-0.1429780125617981,
-0.019830655306577682,
0.3048613369464874,
0.27496302127838135,
-0.006918691098690033,
0.07763796299695969,
-0.4348009526729584,
0.13589496910572052,
-0.079438216984272,
0.3015916347503662,
-0.00484582781791687,
-0.21013173460960388,
-0.21802888810634613,
-0.29195988178253174,
-0.22506766021251678,
0.04162382706999779,
-0.10235096514225006,
0.12676869332790375,
-0.025750230997800827,
0.20410992205142975,
-0.4127603769302368,
0.20284952223300934,
-0.20115908980369568,
-0.21694932878017426,
0.04440302401781082,
0.1212986409664154,
-0.3074224889278412,
0.23888659477233887,
-0.12539058923721313,
-0.2103140652179718,
-0.019021958112716675,
0.25427258014678955,
0.07960762828588486,
-0.14168384671211243,
-0.03883327543735504,
0.13620120286941528,
0.3100415766239166,
-0.27009937167167664,
0.18963637948036194,
0.028339482843875885,
-0.06186274066567421,
-0.381966769695282,
0.018724411725997925,
0.23477274179458618,
-0.036194123327732086,
-0.15249939262866974,
0.3468860983848572,
0.17074128985404968,
0.12525570392608643,
0.30806687474250793,
0.0328315794467926,
0.029910311102867126,
0.07081391662359238,
0.6417878866195679,
0.08652365952730179,
-0.12977148592472076,
-0.1805025041103363,
0.2108938992023468,
0.3226078152656555,
0.019642602652311325,
0.23635217547416687,
-0.16104158759117126,
-0.09952323138713837,
0.5075374841690063,
0.11246931552886963,
0.3850136399269104,
-0.4347786009311676,
-0.25721049308776855,
0.23998141288757324,
0.19256681203842163,
-0.10240688920021057,
-0.229301318526268,
0.2666913568973541,
-0.041811294853687286,
0.0673992782831192,
0.18745306134223938,
0.1447358876466751,
-0.14631444215774536,
-0.14792783558368683,
-0.08817078918218613,
0.2589762508869171,
0.10003727674484253,
0.32301443815231323,
0.3873805105686188,
0.08769051730632782,
0.20061440765857697,
0.2830289304256439,
0.00408703088760376,
0.2287392020225525,
0.43773818016052246,
0.15115860104560852,
0.5266004800796509,
0.22638028860092163,
-0.18223518133163452,
0.16571764647960663,
-0.43603846430778503,
0.3076906204223633,
0.36468538641929626,
-0.023316875100135803,
0.37752315402030945,
0.07889902591705322,
0.016954384744167328,
-0.24602605402469635,
-0.21222059428691864,
-0.10944034904241562,
0.13942553102970123,
-0.3041970133781433,
-0.235371932387352,
-0.3121086359024048,
-0.13213086128234863,
-0.13754497468471527,
-0.07148755341768265,
-0.15193113684654236,
-0.30253076553344727,
-0.057481780648231506,
-0.20387347042560577,
-0.2318934053182602,
-0.36374035477638245,
-0.21387585997581482,
0.1020711362361908,
0.19707879424095154,
-0.4080289304256439,
0.27516117691993713,
-0.5679628252983093,
0.09499631822109222,
0.03904052823781967,
0.24208499491214752,
0.48219871520996094,
0.43245118856430054,
0.044068001210689545,
-0.05181122198700905,
-0.1633724570274353,
-0.0612274631857872,
-0.19967572391033173,
0.302009254693985,
-0.26578739285469055,
-0.25361332297325134,
0.2182401567697525,
-0.00009970087558031082,
-0.05803349241614342,
-0.18262024223804474,
0.2935670018196106,
0.11672075092792511,
0.1213613748550415,
0.015031486749649048,
-0.09789162874221802,
-0.23462024331092834,
0.0527510866522789,
-0.08899273723363876,
-0.03349817916750908,
-0.05280813202261925,
0.41157177090644836,
-0.018378708511590958,
0.3797943890094757,
-0.013717693276703358,
0.05041307955980301,
0.015792474150657654,
0.08551391214132309,
0.2835370898246765,
-0.11679133027791977,
-0.4355110228061676,
-0.29767388105392456,
-0.25315630435943604,
0.35756683349609375,
-0.12180517613887787,
0.1767740547657013,
-0.08061739802360535,
0.031770557165145874,
-0.054689936339855194,
0.051971495151519775,
0.023727133870124817,
0.21999189257621765,
-0.24823763966560364,
0.448382169008255,
-0.01992386020720005,
-0.11909307539463043,
-0.34547698497772217,
-0.06391026824712753,
0.105897456407547,
-0.3796476721763611,
0.4108385145664215,
-0.2762211859226227,
-0.034082330763339996,
0.10255187749862671,
0.17052233219146729,
0.1183762401342392,
-0.3222672641277313,
0.305408239364624,
0.4743518531322479,
0.31781530380249023,
-0.1179482564330101,
0.24245718121528625,
-0.2454407811164856,
-0.10854324698448181,
-0.4504469633102417,
0.12430892884731293,
-0.27171751856803894,
0.08585178852081299,
-0.06995857506990433,
-0.16035889089107513,
-0.06243271753191948,
-0.3463861346244812,
0.3841708302497864,
-0.33740484714508057,
-0.3504067063331604,
0.16773253679275513,
-0.10432210564613342,
0.09324688464403152,
0.06575734168291092,
0.1521935760974884,
-0.0016546882688999176,
0.39113011956214905,
0.08105428516864777,
-0.30181294679641724,
0.01904301345348358,
-0.7586725354194641,
-0.17368260025978088,
-0.3408787250518799,
0.2611923813819885,
0.10819528996944427,
-0.39163336157798767,
-0.1283496469259262,
-0.38934803009033203,
0.5021345615386963,
-0.026604630053043365,
-0.18145450949668884,
0.02273567020893097,
-0.1448027342557907,
-0.003151107579469681,
-0.2296760380268097,
0.568733274936676,
0.09239870309829712,
-0.28101515769958496,
0.3919547200202942,
-0.2754526436328888
] |
https://github.com/huggingface/datasets/issues/4755 | Datasets.map causes incorrect overflow_to_sample_mapping when used with tokenizers and small batch size | I was trying the [Question answering](https://huggingface.co/learn/nlp-course/chapter7/7#question-answering) tutorial on Hugging face when i faced the same problem. The preprocessing step is [here](https://huggingface.co/learn/nlp-course/chapter7/7#processing-the-validation-data). i have changed ```max_length=200, stride=50```,
```
validation_dataset = raw_datasets['validation'].select(range(8)).map(
preprocess_validation_examples,
batched=True,
remove_columns=raw_datasets["validation"].column_names,
num_proc=1
)
print(validation_dataset['overflow_to_sample_mapping'])
print(validation_dataset['example_id'])
```
result
```
[0, 1, 2, 3, 4, 5, 6, 7]
['56be4db0acb8001400a502ec', '56be4db0acb8001400a502ed', '56be4db0acb8001400a502ee',
'56be4db0acb8001400a502ef', '56be4db0acb8001400a502f0', '56be8e613aeaaa14008c90d1',
'56be8e613aeaaa14008c90d2', '56be8e613aeaaa14008c90d3']
```
when ```num_proc=2```, result -
```
[0, 1, 2, 3, 0, 1, 2, 3]
['56be4db0acb8001400a502ec', '56be4db0acb8001400a502ed', '56be4db0acb8001400a502ee',
'56be4db0acb8001400a502ef', '56be4db0acb8001400a502f0', '56be8e613aeaaa14008c90d1',
'56be8e613aeaaa14008c90d2', '56be8e613aeaaa14008c90d3']
```
when ```num_proc=3```, result -
```
[0, 1, 2, 0, 1, 2, 0, 1]
['56be4db0acb8001400a502ec', '56be4db0acb8001400a502ed', '56be4db0acb8001400a502ee',
'56be4db0acb8001400a502ef', '56be4db0acb8001400a502f0', '56be8e613aeaaa14008c90d1',
'56be8e613aeaaa14008c90d2', '56be8e613aeaaa14008c90d3']
```
The```overflow_to_sample_mapping``` changes with ```num_proc```, but ```example_id``` field remains the same . It seems that each process in ```map``` has its own counter for overflow_to_sample_mapping. If you are using ```overflow_to_sample_mapping``` inside the ```preprocess_validation_examples``` function, then there is no issue. | ## Describe the bug
When using `tokenizer`, we can retrieve the field `overflow_to_sample_mapping`, since long samples will be overflown into multiple token sequences.
However, when tokenizing is done via `Dataset.map`, with `n_proc > 1`, the `overflow_to_sample_mapping` field is wrong. This seems to be because each tokenizer only looks at its share of the samples, and maps to the index _within its share_, but then `Dataset.map` collates them together.
## Steps to reproduce the bug
1. Make a dataset of 3 strings.
2. Tokenize via Dataset.map with n_proc = 8
3. Inspect the `overflow_to_sample_mapping` field
## Expected results
`[0, 1, 2]`
## Actual results
`[0, 0, 0]`
Notes:
1. I have not yet extracted a minimal example, but the above works reliably
2. If the dataset is large, I've yet to determine if this bug still happens a. not at all b. always c. on the small, leftover batch at the end.
| 139 | Datasets.map causes incorrect overflow_to_sample_mapping when used with tokenizers and small batch size
## Describe the bug
When using `tokenizer`, we can retrieve the field `overflow_to_sample_mapping`, since long samples will be overflown into multiple token sequences.
However, when tokenizing is done via `Dataset.map`, with `n_proc > 1`, the `overflow_to_sample_mapping` field is wrong. This seems to be because each tokenizer only looks at its share of the samples, and maps to the index _within its share_, but then `Dataset.map` collates them together.
## Steps to reproduce the bug
1. Make a dataset of 3 strings.
2. Tokenize via Dataset.map with n_proc = 8
3. Inspect the `overflow_to_sample_mapping` field
## Expected results
`[0, 1, 2]`
## Actual results
`[0, 0, 0]`
Notes:
1. I have not yet extracted a minimal example, but the above works reliably
2. If the dataset is large, I've yet to determine if this bug still happens a. not at all b. always c. on the small, leftover batch at the end.
I was trying the [Question answering](https://huggingface.co/learn/nlp-course/chapter7/7#question-answering) tutorial on Hugging face when i faced the same problem. The preprocessing step is [here](https://huggingface.co/learn/nlp-course/chapter7/7#processing-the-validation-data). i have changed ```max_length=200, stride=50```,
```
validation_dataset = raw_datasets['validation'].select(range(8)).map(
preprocess_validation_examples,
batched=True,
remove_columns=raw_datasets["validation"].column_names,
num_proc=1
)
print(validation_dataset['overflow_to_sample_mapping'])
print(validation_dataset['example_id'])
```
result
```
[0, 1, 2, 3, 4, 5, 6, 7]
['56be4db0acb8001400a502ec', '56be4db0acb8001400a502ed', '56be4db0acb8001400a502ee',
'56be4db0acb8001400a502ef', '56be4db0acb8001400a502f0', '56be8e613aeaaa14008c90d1',
'56be8e613aeaaa14008c90d2', '56be8e613aeaaa14008c90d3']
```
when ```num_proc=2```, result -
```
[0, 1, 2, 3, 0, 1, 2, 3]
['56be4db0acb8001400a502ec', '56be4db0acb8001400a502ed', '56be4db0acb8001400a502ee',
'56be4db0acb8001400a502ef', '56be4db0acb8001400a502f0', '56be8e613aeaaa14008c90d1',
'56be8e613aeaaa14008c90d2', '56be8e613aeaaa14008c90d3']
```
when ```num_proc=3```, result -
```
[0, 1, 2, 0, 1, 2, 0, 1]
['56be4db0acb8001400a502ec', '56be4db0acb8001400a502ed', '56be4db0acb8001400a502ee',
'56be4db0acb8001400a502ef', '56be4db0acb8001400a502f0', '56be8e613aeaaa14008c90d1',
'56be8e613aeaaa14008c90d2', '56be8e613aeaaa14008c90d3']
```
The```overflow_to_sample_mapping``` changes with ```num_proc```, but ```example_id``` field remains the same . It seems that each process in ```map``` has its own counter for overflow_to_sample_mapping. If you are using ```overflow_to_sample_mapping``` inside the ```preprocess_validation_examples``` function, then there is no issue. | [
-0.26761865615844727,
-0.2340690791606903,
0.07868227362632751,
0.06765780597925186,
0.029236195608973503,
-0.1428496241569519,
0.04256002604961395,
0.07200469076633453,
-0.04074838012456894,
0.06729298830032349,
0.22891736030578613,
0.2538045644760132,
-0.04525277763605118,
-0.12501609325408936,
0.020591460168361664,
0.010173875838518143,
0.2900935411453247,
-0.12310731410980225,
0.09958171844482422,
0.023057900369167328,
-0.168157160282135,
0.10231596976518631,
-0.2653180658817291,
0.055373094975948334,
-0.13152121007442474,
-0.08360276371240616,
-0.02609572559595108,
-0.2838246822357178,
-0.23391443490982056,
-0.4623987078666687,
-0.07505669444799423,
0.004878934472799301,
0.02713838964700699,
0.3538189232349396,
-0.00012364423309918493,
-0.2591410279273987,
0.15230131149291992,
0.09437296539545059,
0.005375182256102562,
-0.08735981583595276,
-0.11787658929824829,
-0.38641175627708435,
-0.2576597332954407,
0.06734897941350937,
0.13984867930412292,
-0.26597341895103455,
0.10230693966150284,
-0.0021849721670150757,
0.410194993019104,
0.23956242203712463,
0.07539816200733185,
0.4402468204498291,
-0.014823131263256073,
0.06630920618772507,
0.11280600726604462,
0.11629216372966766,
0.04107370972633362,
0.07311692833900452,
0.3750162422657013,
-0.21770545840263367,
-0.35680803656578064,
0.04222014546394348,
-0.11459988355636597,
-0.38332563638687134,
0.04291585460305214,
-0.04991527646780014,
0.15840014815330505,
-0.4096202552318573,
0.024188194423913956,
-0.06074060499668121,
-0.080841563642025,
-0.06566675752401352,
-0.23959344625473022,
-0.5402288436889648,
-0.27593114972114563,
0.1263629049062729,
-0.015698641538619995,
-0.11710819602012634,
0.002421809360384941,
-0.07167263329029083,
-0.7225780487060547,
0.03279976174235344,
0.11033499240875244,
0.37384283542633057,
-0.17810991406440735,
0.22661398351192474,
-0.12854361534118652,
0.3062882721424103,
0.12632766366004944,
-0.2529323101043701,
-0.1454450786113739,
-0.32626873254776,
-0.04628651216626167,
0.33648255467414856,
-0.16466522216796875,
-0.2654600739479065,
0.3363650143146515,
-0.38311874866485596,
0.42613670229911804,
0.10235309600830078,
-0.13162007927894592,
0.062440138310194016,
-0.04608181118965149,
0.13426056504249573,
0.5007350444793701,
0.4033462405204773,
0.12939009070396423,
0.5870992541313171,
0.04155910760164261,
-0.02536255121231079,
0.033972907811403275,
0.09694147109985352,
0.029229220002889633,
-0.13874125480651855,
-0.20982159674167633,
-0.09591902047395706,
-0.22243493795394897,
-0.0848880261182785,
-0.20557372272014618,
0.27710455656051636,
-0.31381216645240784,
0.22829753160476685,
0.1700393408536911,
0.16136617958545685,
0.16006307303905487,
-0.04774685949087143,
-0.3066706657409668,
0.18215706944465637,
-0.04260080307722092,
-0.24072036147117615,
-0.15110443532466888,
-0.27966976165771484,
-0.3658698797225952,
0.15030083060264587,
0.0852988213300705,
0.06939840316772461,
0.3605952262878418,
0.3609607517719269,
0.05042411386966705,
-0.09239929914474487,
-0.20243680477142334,
-0.163141131401062,
0.5437750220298767,
-0.0029218532145023346,
-0.017228523269295692,
0.4187364876270294,
0.09937398135662079,
0.08317972719669342,
-0.20891353487968445,
0.11462314426898956,
-0.3494834303855896,
-0.12207271158695221,
0.1896592676639557,
0.09090398997068405,
-0.2869800925254822,
0.11609695106744766,
-0.34159737825393677,
0.3193013370037079,
0.5195613503456116,
-0.12098263204097748,
0.01695866882801056,
-0.19112971425056458,
-0.2020890861749649,
-0.13841955363750458,
0.22778236865997314,
0.11309371143579483,
-0.08822961896657944,
-0.1343698352575302,
0.11644956469535828,
0.22412918508052826,
0.4993521273136139,
0.5483375787734985,
-0.2715056836605072,
0.15050965547561646,
-0.512067437171936,
0.5021528601646423,
0.13074229657649994,
-0.10739614069461823,
-0.5589959621429443,
0.308277428150177,
-0.33938056230545044,
0.19895538687705994,
-0.4382542371749878,
-0.1907041370868683,
0.6571966409683228,
-0.05136466026306152,
0.20697827637195587,
0.2610028386116028,
-0.22218629717826843,
0.1829037219285965,
-0.45528703927993774,
0.16208882629871368,
0.1162429004907608,
-0.25270959734916687,
-0.035765763372182846,
0.0430617518723011,
0.009796537458896637,
-0.2398274689912796,
0.21084776520729065,
0.10034137964248657,
0.18615251779556274,
0.1790023148059845,
0.24749010801315308,
-0.24591083824634552,
-0.0001841578632593155,
-0.00765426829457283,
0.07558275014162064,
-0.00038712844252586365,
-0.08129089325666428,
-0.14726737141609192,
0.11525250971317291,
-0.1976381093263626,
-0.17261195182800293,
0.19790615141391754,
-0.04407105967402458,
-0.025857415050268173,
-0.013301806524395943,
-0.019716009497642517,
0.275380939245224,
-0.012850720435380936,
0.050512660294771194,
-0.23095783591270447,
-0.08622623980045319,
0.20085865259170532,
-0.19146530330181122,
-0.07803792506456375,
0.02953893505036831,
0.07637996971607208,
-0.2590950131416321,
0.15300199389457703,
0.28580617904663086,
-0.1563916802406311,
0.013963856734335423,
0.3606642484664917,
0.1440327912569046,
-0.12856952846050262,
-0.40111103653907776,
-0.01616273820400238,
0.2754311263561249,
-0.09062236547470093,
-0.054887935519218445,
0.03729287534952164,
-0.07685242593288422,
-0.09397963434457779,
0.19908973574638367,
0.4314040541648865,
0.2590108811855316,
0.2928262948989868,
-0.13565677404403687,
0.2282804250717163,
0.14209739863872528,
0.009665977209806442,
-0.29305800795555115,
-0.23114582896232605,
0.03141362965106964,
0.17861105501651764,
0.20776022970676422,
-0.02764490805566311,
0.012281179428100586,
0.2597754895687103,
0.4340210556983948,
-0.12315034866333008,
-0.20391574501991272,
0.07620950043201447,
-0.49174702167510986,
-0.19247591495513916,
0.1275867074728012,
0.19866929948329926,
0.305742084980011,
0.14386491477489471,
0.09973466396331787,
-0.21680782735347748,
-0.0813237801194191,
-0.03011699765920639,
0.10234934091567993,
0.09537595510482788,
-0.12977814674377441,
0.20763850212097168,
0.3535345792770386,
0.13958998024463654,
-0.25629231333732605,
0.1745246797800064,
0.09517006576061249,
0.05004791170358658,
-0.3784048557281494,
0.12148631364107132,
0.04191379249095917,
-0.24528878927230835,
-0.147721067070961,
-0.26223036646842957,
-0.2716129720211029,
-0.5624260902404785,
0.1391107141971588,
0.20226328074932098,
-0.24362823367118835,
0.17024081945419312,
0.06675425171852112,
0.3871932625770569,
-0.05775684118270874,
-0.1387498825788498,
0.03828631341457367,
0.14650575816631317,
-0.622238039970398,
-0.05951987951993942,
0.2712060809135437,
-0.3846988379955292,
0.20904682576656342,
0.1169397309422493,
-0.2672905921936035,
-0.3471182584762573,
-0.48676759004592896,
0.09304308146238327,
-0.016862377524375916,
0.3454382121562958,
0.08671268820762634,
-0.03212699294090271,
-0.17863070964813232,
-0.16364294290542603,
0.021248022094368935,
-0.22076667845249176,
-0.3383748233318329,
0.14623349905014038,
-0.06124964728951454,
-0.14061367511749268,
-0.23711562156677246,
0.11297102272510529,
0.1355685442686081,
-0.11771506071090698,
0.21040666103363037,
-0.27715983986854553,
0.13658741116523743,
0.27924540638923645,
-0.12855836749076843,
-0.09159288555383682,
-0.5688900947570801,
-0.38647377490997314,
-0.37589094042778015,
-0.22924718260765076,
0.27632737159729004,
-0.28060993552207947,
-0.3299387991428375,
-0.2705467641353607,
-0.11196550726890564,
-0.03949389234185219,
0.34584563970565796,
-0.14384356141090393,
0.17703962326049805,
-0.18840248882770538,
0.24016523361206055,
0.060324061661958694,
-0.02024766616523266,
0.12910383939743042,
-0.07763226330280304,
0.08741311728954315,
0.0026835836470127106,
-0.0976913571357727,
0.2288193702697754,
0.16051959991455078,
0.3889983892440796,
-0.08635120838880539,
0.20019513368606567,
0.39233869314193726,
0.8326750993728638,
0.3942034840583801,
-0.22402186691761017,
0.2051299810409546,
-0.1108262911438942,
0.1078617125749588,
-0.16904866695404053,
-0.2623545527458191,
0.064766526222229,
0.04334750771522522,
-0.022445568814873695,
0.19050562381744385,
-0.04049914330244064,
0.08952834457159042,
0.4702480733394623,
0.1475079357624054,
-0.16350293159484863,
-0.3134770095348358,
0.18855121731758118,
-0.17620651423931122,
0.19464877247810364,
0.25010794401168823,
0.20892000198364258,
-0.31898754835128784,
-0.22301524877548218,
-0.08762910962104797,
-0.24419479072093964,
0.3322855830192566,
0.06459013372659683,
-0.7107258439064026,
0.011705032549798489,
-0.7804500460624695,
0.2742704451084137,
-0.034788575023412704,
0.684083878993988,
0.09545141458511353,
-0.042335107922554016,
-0.047121599316596985,
0.2098141759634018,
1.057498812675476,
-0.018271805718541145,
0.0579291395843029,
-0.21091026067733765,
0.023080073297023773,
-0.4470035135746002,
-0.09104949980974197,
0.01674279198050499,
0.5095614790916443,
0.28410404920578003,
0.7330942153930664,
-0.28491470217704773,
0.12645232677459717,
0.054278142750263214,
0.007345416583120823,
-0.024016616865992546,
-0.09531725943088531,
0.0516686774790287,
0.04790632426738739,
0.01078655757009983,
0.11795704066753387,
0.3054473400115967,
0.4038623571395874,
-0.07463354617357254,
-0.2904282808303833,
0.07744479179382324,
-0.05164453387260437,
0.0516626313328743,
0.11185899376869202,
0.27870678901672363,
-0.05869055539369583,
0.20884384214878082,
0.1415387988090515,
0.09087417274713516,
0.4776667058467865,
0.025632115080952644,
0.02437354251742363,
-0.3221754729747772,
0.0367765873670578,
0.26823246479034424,
0.3900788724422455,
0.29651927947998047,
0.0891694724559784,
0.24151694774627686,
-0.16723981499671936,
0.1227216124534607,
-0.24419236183166504,
0.3915555775165558,
0.20114701986312866,
0.22341541945934296,
-0.3185821771621704,
-0.032536618411540985,
0.11890625953674316,
0.22308295965194702,
-0.05677899345755577,
0.29273873567581177,
0.025689467787742615,
-0.4753698706626892,
0.5204075574874878,
-0.03268791735172272,
0.7596457004547119,
-0.02286161482334137,
0.18908901512622833,
0.0520864874124527,
0.3739827275276184,
0.4172869622707367,
-0.06806155294179916,
0.20138509571552277,
-0.3463301658630371,
-0.26330554485321045,
0.13442035019397736,
-0.1325157731771469,
-0.030074380338191986,
0.20397189259529114,
0.18962231278419495,
0.26766061782836914,
0.001825675368309021,
0.547441840171814,
0.04660414159297943,
-0.029484815895557404,
0.11195781081914902,
-0.1497393697500229,
-0.033717039972543716,
0.05027686059474945,
0.08904532343149185,
0.2013259381055832,
0.001993553712964058,
-0.04982312023639679,
-0.1489281952381134,
-0.319522500038147,
-0.35761362314224243,
-0.010686129331588745,
-0.45250454545021057,
0.005820246413350105,
0.32400956749916077,
0.1776818186044693,
0.17058482766151428,
0.15487560629844666,
0.07454030960798264,
0.32030919194221497,
-0.05730807036161423,
-0.03500917926430702,
0.21164804697036743,
0.03547140955924988,
0.21738019585609436,
-0.30437612533569336,
0.052629996091127396,
0.18101707100868225,
0.12283090502023697,
-0.03493946045637131,
0.03153809905052185,
0.018764741718769073,
-0.27577275037765503,
0.10838210582733154,
0.2634184956550598,
-0.45606935024261475,
-0.2185632884502411,
-0.014968819916248322,
0.1469009965658188,
-0.20697057247161865,
-0.04293890669941902,
-0.1000395119190216,
-0.2726636230945587,
0.21360978484153748,
-0.02808104082942009,
-0.11322303861379623,
0.05189978703856468,
0.3753684461116791,
-0.349425733089447,
-0.0949762687087059,
0.28673213720321655,
-0.1354193389415741,
-0.0612550713121891,
-0.0008982084691524506,
0.16820967197418213,
0.43034493923187256,
-0.2585090696811676,
0.011332393623888493,
-0.39286476373672485,
-0.035091497004032135,
-0.07788695394992828,
0.3373052775859833,
0.17563284933567047,
-0.1573217809200287,
-0.0747235044836998,
-0.3003043532371521,
-0.31624412536621094,
-0.007027298212051392,
-0.15310774743556976,
0.03013620339334011,
0.09789969772100449,
0.2852441966533661,
-0.3342739939689636,
0.22002892196178436,
-0.1854201853275299,
-0.23435139656066895,
-0.023130059242248535,
0.17707808315753937,
-0.3324042558670044,
0.06717486679553986,
-0.04717151075601578,
-0.21283987164497375,
-0.05881053954362869,
0.41668230295181274,
-0.04432599991559982,
-0.10580333322286606,
-0.07013329118490219,
0.16426953673362732,
0.3661825358867645,
-0.28015628457069397,
0.19727161526679993,
0.2009977400302887,
-0.038447584956884384,
-0.35003358125686646,
0.02196997031569481,
0.08904049545526505,
-0.012245818972587585,
-0.10543468594551086,
0.20500484108924866,
0.09673851728439331,
0.14976851642131805,
0.1434980034828186,
-0.021763846278190613,
0.12238878011703491,
0.1560322791337967,
0.5781431198120117,
-0.026417382061481476,
-0.13668102025985718,
-0.25388067960739136,
0.20977893471717834,
0.46165382862091064,
0.04424767941236496,
0.16472876071929932,
-0.14370128512382507,
-0.25640907883644104,
0.36107975244522095,
0.21967341005802155,
0.3471119701862335,
-0.35235774517059326,
-0.28398048877716064,
0.3260502219200134,
0.13164883852005005,
-0.0670575499534607,
-0.19444076716899872,
0.40411773324012756,
0.07107093185186386,
0.04354393854737282,
0.17909027636051178,
0.1955336183309555,
-0.10249130427837372,
-0.08087098598480225,
-0.0786135122179985,
0.3367339074611664,
0.12962105870246887,
0.31807807087898254,
0.44481804966926575,
0.026623252779245377,
0.20967774093151093,
0.35749977827072144,
0.014347847551107407,
0.19576741755008698,
0.1749948412179947,
-0.030758388340473175,
0.5555998682975769,
0.19714847207069397,
0.018381476402282715,
0.15381644666194916,
-0.4336475729942322,
0.16799908876419067,
0.44583436846733093,
0.04030828922986984,
0.45823168754577637,
0.0037035271525382996,
0.14473643898963928,
-0.14342956244945526,
-0.30775561928749084,
-0.12423812597990036,
0.25716033577919006,
-0.2960461378097534,
-0.20133021473884583,
-0.2969285249710083,
-0.07657373696565628,
-0.22649462521076202,
0.039892975240945816,
-0.198133185505867,
-0.34426629543304443,
0.21997281908988953,
-0.2686173915863037,
-0.21798075735569,
-0.4326755404472351,
-0.37620535492897034,
0.16847771406173706,
0.147933229804039,
-0.36379340291023254,
0.4008999764919281,
-0.5843425393104553,
0.0031292587518692017,
0.028518259525299072,
0.3012959361076355,
0.40815621614456177,
0.3893744647502899,
0.1403278112411499,
0.03545879200100899,
-0.16662782430648804,
-0.007650509476661682,
-0.148657888174057,
0.4192521274089813,
-0.1133681982755661,
-0.21526534855365753,
0.2088337540626526,
-0.05763447284698486,
-0.0423315055668354,
-0.1625634878873825,
0.2613486051559448,
0.21049487590789795,
0.06093239411711693,
-0.05532895773649216,
-0.11358796060085297,
-0.19839173555374146,
-0.029939845204353333,
-0.10268258303403854,
-0.0470663420855999,
-0.025093555450439453,
0.34188345074653625,
-0.0014334926381707191,
0.38950496912002563,
-0.08733735233545303,
0.03991911932826042,
-0.04035113379359245,
0.23560285568237305,
0.43132349848747253,
-0.16222891211509705,
-0.45055514574050903,
-0.31827831268310547,
-0.33183661103248596,
0.29688891768455505,
-0.04983966425061226,
0.1958605796098709,
-0.08144763112068176,
-0.02251145802438259,
-0.09955445677042007,
0.029612204059958458,
-0.05953596532344818,
0.14800432324409485,
-0.2004976123571396,
0.48155835270881653,
0.03449725732207298,
0.02085808664560318,
-0.23758740723133087,
0.03922634571790695,
0.13480110466480255,
-0.2709893584251404,
0.42806634306907654,
-0.15392521023750305,
-0.10132154822349548,
0.14455685019493103,
0.23725908994674683,
-0.0417168103158474,
-0.28712984919548035,
0.2845271825790405,
0.5076854228973389,
0.21962489187717438,
-0.11984547227621078,
0.06478886306285858,
-0.2792506814002991,
0.03524908795952797,
-0.44395214319229126,
0.2073415219783783,
-0.1647699475288391,
0.22497758269309998,
-0.09884946048259735,
-0.13060392439365387,
-0.16957662999629974,
-0.282907634973526,
0.412547767162323,
-0.3966861665248871,
-0.34890216588974,
0.21723173558712006,
-0.0958448201417923,
0.010575219988822937,
0.1501307487487793,
0.23657718300819397,
-0.021907761693000793,
0.27203571796417236,
0.05742533504962921,
-0.2676626741886139,
0.1065986379981041,
-0.8303499817848206,
-0.11610573530197144,
-0.1862454116344452,
0.21825501322746277,
0.2008192241191864,
-0.5805644989013672,
-0.3138030767440796,
-0.41562172770500183,
0.366784930229187,
-0.04786963760852814,
-0.17757989466190338,
0.06111818924546242,
-0.18843846023082733,
-0.06332147866487503,
-0.190565288066864,
0.6935876607894897,
0.27104976773262024,
-0.31404581665992737,
0.5315787196159363,
-0.32436323165893555
] |
https://github.com/huggingface/datasets/issues/4752 | DatasetInfo issue when testing multiple configs: mixed task_templates | I've narrowed down the issue to the `dataset_module_factory` which already creates a `dataset_infos.json` file down in the `.cache/modules/dataset_modules/..` folder. That JSON file already contains the wrong task_templates for `unfiltered`. | ## Describe the bug
When running the `datasets-cli test` it would seem that some config properties in a DatasetInfo get mangled, leading to issues, e.g., about the ClassLabel.
## Steps to reproduce the bug
In summary, what I want to do is create three configs:
- unfiltered: no classlabel, no tasks. Gets data from unfiltered.json.gz (I'd want this without splits, just one chunk of data, but that does not seem possible?)
- filtered_sentiment: `review_sentiment` as ClassLabel, TextClassification task with `review_sentiment` as label. Gets train/test split from respective json.gz files
- filtered_rating: `review_rating0` as ClassLabel, TextClassification task with `review_rating0` as label. Gets train/test split from respective json.gz files
This might be a bit tedious to reproduce, so I am sorry, but these are the steps:
- Clone datasets -> `datasets/` and install it
- Clone `https://huggingface.co/datasets/BramVanroy/hebban-reviews` into `datasets/datasets` so that you have a new folder `datasets/datasets/hebban-reviews/`.
- Replace the HebbanReviews class with this new one:
```python
class HebbanReviews(datasets.GeneratorBasedBuilder):
"""The Hebban book reviews dataset."""
BUILDER_CONFIGS = [
HebbanReviewsConfig(
name="unfiltered",
description=_HEBBAN_REVIEWS_UNFILTERED_DESCRIPTION,
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_sentiment",
description=f"This config has the negative, neutral, and positive sentiment scores as ClassLabel in the 'review_sentiment' column.\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_rating",
description=f"This config has the 5-class ratings as ClassLabel in the 'review_rating0' column (which is a variant of 'review_rating' that starts counting from 0 instead of 1).\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
)
]
DEFAULT_CONFIG_NAME = "filtered_sentiment"
_URLS = {
"train": "train.jsonl.gz",
"test": "test.jsonl.gz",
"unfiltered": "unfiltered.jsonl.gz",
}
def _info(self):
features = {
"review_title": datasets.Value("string"),
"review_text": datasets.Value("string"),
"review_text_without_quotes": datasets.Value("string"),
"review_n_quotes": datasets.Value("int32"),
"review_n_tokens": datasets.Value("int32"),
"review_rating": datasets.Value("int32"),
"review_rating0": datasets.Value("int32"),
"review_author_url": datasets.Value("string"),
"review_author_type": datasets.Value("string"),
"review_n_likes": datasets.Value("int32"),
"review_n_comments": datasets.Value("int32"),
"review_url": datasets.Value("string"),
"review_published_date": datasets.Value("string"),
"review_crawl_date": datasets.Value("string"),
"lid": datasets.Value("string"),
"lid_probability": datasets.Value("float32"),
"review_sentiment": datasets.features.ClassLabel(names=["negative", "neutral", "positive"]),
"review_sentiment_label": datasets.Value("string"),
"book_id": datasets.Value("int32"),
}
if self.config.name == "filtered_sentiment":
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_sentiment")]
elif self.config.name == "filtered_rating":
# For CrossEntropy, our classes need to start at index 0 -- not 1
features["review_rating0"] = datasets.features.ClassLabel(names=["1", "2", "3", "4", "5"])
features["review_sentiment"] = datasets.Value("int32")
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_rating0")]
elif self.config.name == "unfiltered": # no ClassLabels in unfiltered
features["review_sentiment"] = datasets.Value("int32")
task_templates = None
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
print("AT INFO", self.config.name, task_templates)
return datasets.DatasetInfo(
description=self.config.description,
features=datasets.Features(features),
homepage="https://huggingface.co/datasets/BramVanroy/hebban-reviews",
citation=_HEBBAN_REVIEWS_CITATION,
task_templates=task_templates,
license="cc-by-4.0"
)
def _split_generators(self, dl_manager):
if self.config.name.startswith("filtered"):
files = dl_manager.download_and_extract({"train": "train.jsonl.gz",
"test": "test.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"data_file": files["test"]
},
),
]
elif self.config.name == "unfiltered":
files = dl_manager.download_and_extract({"train": "unfiltered.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
]
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
def _generate_examples(self, data_file):
lines = Path(data_file).open(encoding="utf-8").readlines()
for line_idx, line in enumerate(lines):
row = json.loads(line)
yield line_idx, row
```
- finally, run `datasets-cli test ./datasets/hebban-reviews/ --save_infos --all_configs` from within the topmost `datasets` directory
## Expected results
Succeeding tests for three different configs.
## Actual results
I printed out the values that are given to `DatasetInfo` for config name and task_templates, as you can see. There, as expected, I get `unfiltered None`. I also modified datasets/info.py and added this line [at L.170](https://github.com/huggingface/datasets/blob/f5847a304aa1b38b3a3c54a8318b4df60f1299bc/src/datasets/info.py#L170):
```python
print("INTERNALLY AT INFO.PY", self.config_name, self.task_templates)
```
to my surprise, here I get `unfiltered [TextClassification(task='text-classification', text_column='review_text_without_quotes', label_column='review_sentiment')]`. So one way or another, here I suddenly see that `unfiltered` now does have a task_template -- even though that is not what is written in the data loading script, as the first print statement correctly shows.
I do not quite understand how, but it seems that the config name and task_templates get mixed.
This ultimately leads to the following error, but this trace may not be very useful in itself:
```
Traceback (most recent call last):
File "C:\Users\bramv\.virtualenvs\hebban-U6poXNQd\Scripts\datasets-cli-script.py", line 33, in <module>
sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())
File "c:\dev\python\hebban\datasets\src\datasets\commands\datasets_cli.py", line 39, in main
service.run()
File "c:\dev\python\hebban\datasets\src\datasets\commands\test.py", line 144, in run
builder.as_dataset()
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 899, in as_dataset
datasets = map_nested(
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 393, in map_nested
mapped = [
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 394, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 330, in _single_map_nested
return function(data_struct)
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 930, in _build_single_dataset
ds = self._as_dataset(
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 1006, in _as_dataset
return Dataset(fingerprint=fingerprint, **dataset_kwargs)
File "c:\dev\python\hebban\datasets\src\datasets\arrow_dataset.py", line 661, in __init__
info = info.copy() if info is not None else DatasetInfo()
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 286, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 176, in __post_init__
self.task_templates = [
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 177, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "c:\dev\python\hebban\datasets\src\datasets\tasks\text_classification.py", line 22, in align_with_features
raise ValueError(f"Column {self.label_column} is not a ClassLabel.")
ValueError: Column review_sentiment is not a ClassLabel.
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3 | 29 | DatasetInfo issue when testing multiple configs: mixed task_templates
## Describe the bug
When running the `datasets-cli test` it would seem that some config properties in a DatasetInfo get mangled, leading to issues, e.g., about the ClassLabel.
## Steps to reproduce the bug
In summary, what I want to do is create three configs:
- unfiltered: no classlabel, no tasks. Gets data from unfiltered.json.gz (I'd want this without splits, just one chunk of data, but that does not seem possible?)
- filtered_sentiment: `review_sentiment` as ClassLabel, TextClassification task with `review_sentiment` as label. Gets train/test split from respective json.gz files
- filtered_rating: `review_rating0` as ClassLabel, TextClassification task with `review_rating0` as label. Gets train/test split from respective json.gz files
This might be a bit tedious to reproduce, so I am sorry, but these are the steps:
- Clone datasets -> `datasets/` and install it
- Clone `https://huggingface.co/datasets/BramVanroy/hebban-reviews` into `datasets/datasets` so that you have a new folder `datasets/datasets/hebban-reviews/`.
- Replace the HebbanReviews class with this new one:
```python
class HebbanReviews(datasets.GeneratorBasedBuilder):
"""The Hebban book reviews dataset."""
BUILDER_CONFIGS = [
HebbanReviewsConfig(
name="unfiltered",
description=_HEBBAN_REVIEWS_UNFILTERED_DESCRIPTION,
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_sentiment",
description=f"This config has the negative, neutral, and positive sentiment scores as ClassLabel in the 'review_sentiment' column.\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_rating",
description=f"This config has the 5-class ratings as ClassLabel in the 'review_rating0' column (which is a variant of 'review_rating' that starts counting from 0 instead of 1).\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
)
]
DEFAULT_CONFIG_NAME = "filtered_sentiment"
_URLS = {
"train": "train.jsonl.gz",
"test": "test.jsonl.gz",
"unfiltered": "unfiltered.jsonl.gz",
}
def _info(self):
features = {
"review_title": datasets.Value("string"),
"review_text": datasets.Value("string"),
"review_text_without_quotes": datasets.Value("string"),
"review_n_quotes": datasets.Value("int32"),
"review_n_tokens": datasets.Value("int32"),
"review_rating": datasets.Value("int32"),
"review_rating0": datasets.Value("int32"),
"review_author_url": datasets.Value("string"),
"review_author_type": datasets.Value("string"),
"review_n_likes": datasets.Value("int32"),
"review_n_comments": datasets.Value("int32"),
"review_url": datasets.Value("string"),
"review_published_date": datasets.Value("string"),
"review_crawl_date": datasets.Value("string"),
"lid": datasets.Value("string"),
"lid_probability": datasets.Value("float32"),
"review_sentiment": datasets.features.ClassLabel(names=["negative", "neutral", "positive"]),
"review_sentiment_label": datasets.Value("string"),
"book_id": datasets.Value("int32"),
}
if self.config.name == "filtered_sentiment":
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_sentiment")]
elif self.config.name == "filtered_rating":
# For CrossEntropy, our classes need to start at index 0 -- not 1
features["review_rating0"] = datasets.features.ClassLabel(names=["1", "2", "3", "4", "5"])
features["review_sentiment"] = datasets.Value("int32")
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_rating0")]
elif self.config.name == "unfiltered": # no ClassLabels in unfiltered
features["review_sentiment"] = datasets.Value("int32")
task_templates = None
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
print("AT INFO", self.config.name, task_templates)
return datasets.DatasetInfo(
description=self.config.description,
features=datasets.Features(features),
homepage="https://huggingface.co/datasets/BramVanroy/hebban-reviews",
citation=_HEBBAN_REVIEWS_CITATION,
task_templates=task_templates,
license="cc-by-4.0"
)
def _split_generators(self, dl_manager):
if self.config.name.startswith("filtered"):
files = dl_manager.download_and_extract({"train": "train.jsonl.gz",
"test": "test.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"data_file": files["test"]
},
),
]
elif self.config.name == "unfiltered":
files = dl_manager.download_and_extract({"train": "unfiltered.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
]
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
def _generate_examples(self, data_file):
lines = Path(data_file).open(encoding="utf-8").readlines()
for line_idx, line in enumerate(lines):
row = json.loads(line)
yield line_idx, row
```
- finally, run `datasets-cli test ./datasets/hebban-reviews/ --save_infos --all_configs` from within the topmost `datasets` directory
## Expected results
Succeeding tests for three different configs.
## Actual results
I printed out the values that are given to `DatasetInfo` for config name and task_templates, as you can see. There, as expected, I get `unfiltered None`. I also modified datasets/info.py and added this line [at L.170](https://github.com/huggingface/datasets/blob/f5847a304aa1b38b3a3c54a8318b4df60f1299bc/src/datasets/info.py#L170):
```python
print("INTERNALLY AT INFO.PY", self.config_name, self.task_templates)
```
to my surprise, here I get `unfiltered [TextClassification(task='text-classification', text_column='review_text_without_quotes', label_column='review_sentiment')]`. So one way or another, here I suddenly see that `unfiltered` now does have a task_template -- even though that is not what is written in the data loading script, as the first print statement correctly shows.
I do not quite understand how, but it seems that the config name and task_templates get mixed.
This ultimately leads to the following error, but this trace may not be very useful in itself:
```
Traceback (most recent call last):
File "C:\Users\bramv\.virtualenvs\hebban-U6poXNQd\Scripts\datasets-cli-script.py", line 33, in <module>
sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())
File "c:\dev\python\hebban\datasets\src\datasets\commands\datasets_cli.py", line 39, in main
service.run()
File "c:\dev\python\hebban\datasets\src\datasets\commands\test.py", line 144, in run
builder.as_dataset()
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 899, in as_dataset
datasets = map_nested(
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 393, in map_nested
mapped = [
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 394, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 330, in _single_map_nested
return function(data_struct)
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 930, in _build_single_dataset
ds = self._as_dataset(
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 1006, in _as_dataset
return Dataset(fingerprint=fingerprint, **dataset_kwargs)
File "c:\dev\python\hebban\datasets\src\datasets\arrow_dataset.py", line 661, in __init__
info = info.copy() if info is not None else DatasetInfo()
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 286, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 176, in __post_init__
self.task_templates = [
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 177, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "c:\dev\python\hebban\datasets\src\datasets\tasks\text_classification.py", line 22, in align_with_features
raise ValueError(f"Column {self.label_column} is not a ClassLabel.")
ValueError: Column review_sentiment is not a ClassLabel.
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
I've narrowed down the issue to the `dataset_module_factory` which already creates a `dataset_infos.json` file down in the `.cache/modules/dataset_modules/..` folder. That JSON file already contains the wrong task_templates for `unfiltered`. | [
-0.30294740200042725,
-0.02238108217716217,
-0.007900869473814964,
0.27841848134994507,
0.04747239127755165,
0.0910637304186821,
0.4126910865306854,
0.2915855348110199,
-0.2092212736606598,
-0.03551861643791199,
-0.2731928825378418,
0.08178993314504623,
-0.011083702556788921,
0.13023871183395386,
-0.16048872470855713,
0.07670483738183975,
0.1474226862192154,
-0.08985315263271332,
-0.09656168520450592,
0.20267952978610992,
-0.017200278118252754,
0.21734634041786194,
-0.12220072001218796,
-0.03424946963787079,
-0.2773225009441376,
-0.37570691108703613,
-0.2987944185733795,
0.2699897289276123,
0.024026833474636078,
-0.0822402760386467,
0.4878433346748352,
0.37967467308044434,
-0.3503599464893341,
0.6244824528694153,
-0.00011843802349176258,
0.15155130624771118,
0.0972118079662323,
0.009496333077549934,
-0.2661677896976471,
0.09607415646314621,
-0.31376296281814575,
-0.0023348331451416016,
-0.2756499946117401,
-0.1757371574640274,
-0.06886974722146988,
0.12302394956350327,
-0.41851964592933655,
-0.22040289640426636,
0.1484028548002243,
0.24308347702026367,
0.10377523303031921,
0.00045577622950077057,
-0.49932119250297546,
-0.0640961304306984,
0.010494440793991089,
0.25357291102409363,
-0.22226499021053314,
0.11761537194252014,
0.49024760723114014,
-0.07115299999713898,
0.2600264549255371,
0.35451340675354004,
-0.00934913381934166,
0.2315017580986023,
-0.04921826720237732,
-0.12209361046552658,
0.07247484475374222,
-0.09800451993942261,
-0.05923350155353546,
0.4250367283821106,
0.2362995743751526,
-0.3477702736854553,
-0.46994349360466003,
-0.5202530026435852,
0.16242948174476624,
0.014794176444411278,
0.36311429738998413,
0.010697206482291222,
-0.037740834057331085,
0.10765853524208069,
-0.2840100824832916,
0.04026622325181961,
-0.03446117788553238,
0.0064111873507499695,
-0.10375277698040009,
0.43704673647880554,
-0.008264534175395966,
0.1022193506360054,
-0.08514080941677094,
-0.11168956756591797,
0.12013427913188934,
-0.4067937731742859,
-0.7067835330963135,
-0.1079534962773323,
-0.049676407128572464,
-0.341122031211853,
-0.13030660152435303,
-0.18154996633529663,
0.31539732217788696,
0.2408171147108078,
0.08242148160934448,
0.060703881084918976,
0.012631786055862904,
-0.09725586324930191,
0.4210072457790375,
0.29027441143989563,
0.19097751379013062,
0.40642961859703064,
0.26388657093048096,
0.19310176372528076,
-0.058817919343709946,
-0.0015215128660202026,
0.12058024108409882,
-0.2742440700531006,
0.13083933293819427,
-0.1646212339401245,
0.23042304813861847,
-0.17569410800933838,
-0.37292832136154175,
0.06822537630796432,
-0.2918047606945038,
0.058104902505874634,
0.2049405574798584,
0.2656727731227875,
0.047772955149412155,
0.10153806954622269,
-0.10444634407758713,
0.3402908444404602,
-0.1372677981853485,
-0.10812675207853317,
-0.15691335499286652,
-0.14111347496509552,
-0.070014089345932,
0.11362706869840622,
0.2755240201950073,
0.05651902034878731,
0.28145331144332886,
0.2408474236726761,
0.22184276580810547,
-0.378208190202713,
0.1672673374414444,
-0.10321526229381561,
0.1521044671535492,
0.09522119909524918,
-0.10524831712245941,
0.38632750511169434,
0.06714776903390884,
-0.2995522916316986,
-0.29128822684288025,
-0.0780433639883995,
-0.09854058176279068,
-0.22279642522335052,
0.2447563111782074,
0.08734250068664551,
-0.3716716170310974,
0.05698850750923157,
-0.012325949966907501,
0.31940358877182007,
-0.04265349358320236,
0.03953750059008598,
0.004407830536365509,
-0.34046995639801025,
-0.04738398268818855,
0.037430718541145325,
0.05000441521406174,
0.3237130641937256,
-0.3583018481731415,
-0.18152520060539246,
0.0657571330666542,
-0.21654610335826874,
-0.13675877451896667,
0.14903046190738678,
-0.15584947168827057,
0.42019593715667725,
-0.11621874570846558,
-0.04432879760861397,
0.3490850031375885,
-0.508638858795166,
-0.3181789815425873,
0.3312610387802124,
0.2739675045013428,
0.5006310343742371,
0.16337062418460846,
-0.20708444714546204,
-0.08359388262033463,
-0.23928731679916382,
0.22696274518966675,
0.2723633050918579,
-0.13612963259220123,
0.25166982412338257,
-0.2128518670797348,
0.08108443021774292,
0.2277229130268097,
0.012970924377441406,
0.08957242965698242,
-0.09286085516214371,
-0.2578110694885254,
-0.22394409775733948,
0.4652453362941742,
-0.20627495646476746,
0.23446223139762878,
0.2924785614013672,
0.09512890875339508,
0.08256068825721741,
0.037674713879823685,
-0.1378660351037979,
-0.5247583389282227,
0.35784533619880676,
0.17264308035373688,
0.011291906237602234,
0.053374625742435455,
-0.1032719835639,
-0.25574150681495667,
0.05118735134601593,
-0.426187127828598,
-0.32721513509750366,
0.09827578067779541,
0.253141313791275,
-0.03260829672217369,
-0.4232892394065857,
0.050733696669340134,
0.30906417965888977,
-0.006415907293558121,
-0.051514312624931335,
0.12068943679332733,
0.1881147027015686,
0.0705747976899147,
-0.10051732510328293,
-0.0875592827796936,
0.10870195180177689,
0.08519020676612854,
-0.3111230432987213,
-0.21870675683021545,
0.39548370242118835,
0.05662901699542999,
-0.2038026601076126,
0.1014162003993988,
0.10244999825954437,
0.2254587560892105,
-0.08249424397945404,
-0.0491158589720726,
-0.08166936039924622,
0.04001569747924805,
-0.30917808413505554,
-0.35690414905548096,
0.38244473934173584,
0.06042828410863876,
0.4350970685482025,
-0.12450483441352844,
0.021071752533316612,
0.3688424825668335,
-0.1712431013584137,
-0.2754276692867279,
-0.017534546554088593,
0.18711447715759277,
-0.24341793358325958,
-0.061730243265628815,
0.08539225906133652,
-0.3521660268306732,
0.262542724609375,
0.08992883563041687,
-0.030741184949874878,
-0.1323876678943634,
-0.1799335777759552,
0.06876052170991898,
0.0751698836684227,
0.19443242251873016,
0.42690804600715637,
0.5369592308998108,
0.007716989144682884,
-0.04517574980854988,
0.13759714365005493,
-0.28347286581993103,
-0.049411479383707047,
0.20051854848861694,
0.15927129983901978,
0.316822350025177,
0.3332633674144745,
0.1119963601231575,
-0.2297208309173584,
0.14488190412521362,
-0.29987475275993347,
0.3413277268409729,
0.08635950833559036,
-0.6140109300613403,
0.20784582197666168,
-0.1691744476556778,
-0.12081652879714966,
-0.2746560573577881,
-0.23959992825984955,
-0.1957550197839737,
-0.3629877269268036,
0.11780692636966705,
0.13587601482868195,
-0.2514084279537201,
0.3278820812702179,
-0.11392238736152649,
0.22041292488574982,
-0.21731090545654297,
-0.2574416399002075,
-0.21695466339588165,
-0.14543397724628448,
-0.32382306456565857,
-0.037541091442108154,
0.3051351010799408,
0.1980976164340973,
0.1414935290813446,
0.054991237819194794,
-0.45136815309524536,
-0.23185548186302185,
-0.23729968070983887,
0.27718058228492737,
-0.12472391128540039,
0.6841238141059875,
0.16233918070793152,
-0.07313552498817444,
0.016349971294403076,
0.020333778113126755,
0.348846435546875,
0.39639854431152344,
-0.08512945473194122,
0.032774753868579865,
-0.031254541128873825,
-0.19580374658107758,
-0.18461918830871582,
-0.41656777262687683,
-0.05452672392129898,
-0.06304634362459183,
-0.10725678503513336,
-0.19681178033351898,
-0.0383167639374733,
0.507735013961792,
0.23199398815631866,
-0.2083609700202942,
0.15657362341880798,
0.21413224935531616,
0.010869170539081097,
-0.35761597752571106,
0.18333639204502106,
-0.20416131615638733,
-0.07767495512962341,
-0.3424185514450073,
-0.18814782798290253,
0.13390277326107025,
0.1506783813238144,
-0.1775297075510025,
0.10523650795221329,
-0.0675475224852562,
0.24764585494995117,
-0.04864706099033356,
-0.35507598519325256,
-0.060225337743759155,
-0.005551348906010389,
0.10983450710773468,
-0.4448879361152649,
-0.2285103052854538,
0.3637837767601013,
-0.29598286747932434,
0.45867013931274414,
-0.14842119812965393,
-0.07053431123495102,
-0.13339415192604065,
0.23468782007694244,
0.3427053391933441,
0.140370175242424,
-0.0030405521392822266,
0.11336252838373184,
0.43805545568466187,
0.11737431585788727,
-0.2728126645088196,
0.08221817016601562,
0.26453834772109985,
-0.1485050916671753,
0.06231708824634552,
0.12721973657608032,
0.00529232993721962,
0.15262363851070404,
0.33951082825660706,
-0.005649205297231674,
-0.3147982656955719,
0.2126520872116089,
-0.254329115152359,
-0.08115681260824203,
0.10507242381572723,
-0.08086257427930832,
0.006275450810790062,
0.131730854511261,
0.06777364015579224,
0.282659649848938,
-0.4461374580860138,
-0.06187594309449196,
-0.3719719350337982,
-0.3061441481113434,
-0.221865713596344,
-0.015830084681510925,
0.15920017659664154,
0.2542322874069214,
-0.11193621903657913,
0.08349824696779251,
-0.03799106180667877,
-0.05268380790948868,
0.7994440793991089,
-0.492439866065979,
0.15295280516147614,
0.673557698726654,
0.028424225747585297,
-0.22087863087654114,
-0.4287688732147217,
-0.49351248145103455,
0.16777856647968292,
0.8473813533782959,
0.6940190196037292,
-0.2710752785205841,
-0.36370500922203064,
0.08224336802959442,
-0.09520605206489563,
-0.26247912645339966,
-0.2851734161376953,
0.025146786123514175,
-0.5268335938453674,
-0.07737290114164352,
-0.005302213132381439,
0.15002407133579254,
0.24720145761966705,
-0.14551876485347748,
-0.1355331391096115,
0.023839829489588737,
0.1496885120868683,
0.01437368243932724,
0.137516051530838,
0.13102345168590546,
0.1364269256591797,
0.4778844714164734,
-0.116569384932518,
0.25825953483581543,
0.3476444482803345,
0.3731439411640167,
0.03129032626748085,
-0.03881599009037018,
-0.12525781989097595,
-0.19249139726161957,
0.18733394145965576,
0.2369605153799057,
0.10725174099206924,
-0.10137509554624557,
-0.1201166957616806,
0.19387689232826233,
0.008181506767868996,
0.3628070056438446,
0.3493698239326477,
0.15325956046581268,
-0.5413298606872559,
-0.4839423596858978,
0.1904551386833191,
0.08920833468437195,
-0.27653300762176514,
0.7664533853530884,
-0.17526833713054657,
-0.4139542877674103,
0.2061002105474472,
-0.014302186667919159,
0.4774814248085022,
0.19909900426864624,
-0.06460152566432953,
0.4362499415874481,
-0.22147440910339355,
0.0701952874660492,
-0.13366413116455078,
0.13726705312728882,
-0.24148625135421753,
-0.036574576050043106,
0.250306636095047,
-0.09620854258537292,
0.1715114414691925,
0.20199744403362274,
-0.19593003392219543,
0.13778479397296906,
-0.1144411712884903,
-0.2526431679725647,
-0.08138792216777802,
-0.18015998601913452,
-0.18497250974178314,
-0.16941353678703308,
-0.17123405635356903,
0.09656955301761627,
-0.04758705943822861,
-0.07668270170688629,
-0.07638916373252869,
0.029429705813527107,
-0.34364053606987,
0.14512252807617188,
-0.33797186613082886,
0.08286643773317337,
0.04177199304103851,
0.06509771198034286,
0.3799169659614563,
-0.2006126493215561,
0.09379863739013672,
-0.09765690565109253,
0.2877299189567566,
0.04540073126554489,
-0.10428079962730408,
0.44819211959838867,
-0.04319322854280472,
0.19420190155506134,
0.11845072358846664,
-0.12950098514556885,
0.4238022565841675,
0.16334733366966248,
-0.38506656885147095,
-0.3049914836883545,
-0.2544783353805542,
0.06539265811443329,
0.0836789458990097,
-0.3945302963256836,
-0.08254265785217285,
-0.36229828000068665,
0.2802731990814209,
0.18204590678215027,
0.3202376365661621,
-0.3893996775150299,
0.05504167824983597,
-0.08140058815479279,
-0.2394430935382843,
0.555970311164856,
-0.2737073600292206,
-0.28880488872528076,
-0.057047318667173386,
-0.11125100404024124,
-0.1639154851436615,
0.12358333170413971,
0.47870343923568726,
0.15415312349796295,
0.20568037033081055,
-0.2514577805995941,
0.35785213112831116,
0.1977171152830124,
0.10243842750787735,
0.3788062036037445,
-0.13461799919605255,
-0.20568011701107025,
-0.08177836984395981,
0.5105408430099487,
0.24028216302394867,
0.13436393439769745,
0.10581307113170624,
-0.18847736716270447,
0.03669246286153793,
-0.1389889121055603,
0.17428380250930786,
0.40131592750549316,
-0.23716247081756592,
0.1476311832666397,
-0.012832626700401306,
0.12030772864818573,
-0.23142218589782715,
-0.21918056905269623,
-0.3880561888217926,
0.0035209301859140396,
-0.035787034779787064,
0.41874343156814575,
0.07366735488176346,
0.05696853622794151,
0.03600114583969116,
-0.16242548823356628,
0.06139282509684563,
-0.15606263279914856,
-0.33054518699645996,
0.15753263235092163,
0.14704260230064392,
0.017397504299879074,
0.10641789436340332,
0.13302798569202423,
0.050953105092048645,
-0.26003119349479675,
0.1326448768377304,
0.04381674528121948,
0.13220302760601044,
0.19757211208343506,
-0.16148242354393005,
-0.130599707365036,
-0.08450743556022644,
0.06591498106718063,
0.1410742551088333,
-0.08063589036464691,
0.06744788587093353,
0.35670724511146545,
0.025442952290177345,
-0.06159461662173271,
-0.15436924993991852,
0.15116538107395172,
-0.2891048192977905,
0.14197714626789093,
0.15071412920951843,
-0.33874398469924927,
0.2733452618122101,
0.42923781275749207,
0.3980385661125183,
0.45599639415740967,
-0.2838955819606781,
0.0529305562376976,
0.13076528906822205,
0.1807517111301422,
0.0399647131562233,
-0.021631237119436264,
0.15172913670539856,
-0.02377920225262642,
0.016780313104391098,
0.3494323492050171,
-0.22614410519599915,
-0.23735888302326202,
0.17031589150428772,
-0.11877621710300446,
0.448103129863739,
-0.08232814818620682,
0.25575003027915955,
0.1291850209236145,
-0.23470580577850342,
0.07069848477840424,
0.5356854200363159,
-0.1439708024263382,
0.2502623498439789,
0.1384826898574829,
0.2817561626434326,
0.06920953840017319,
-0.1088687852025032,
0.0037017352879047394,
-0.15493157505989075,
-0.17275752127170563,
0.21193580329418182,
0.00041562318801879883,
-0.17702794075012207,
-0.010149329900741577,
0.07378562539815903,
0.4655272960662842,
-0.5435712933540344,
-0.4389743506908417,
0.008942091837525368,
0.058752041310071945,
-0.007092557847499847,
-0.1409931182861328,
-0.6827965378761292,
-0.19716301560401917,
0.03138841688632965,
0.1528775542974472,
-0.01027260348200798,
0.009534917771816254,
0.37494006752967834,
-0.025792330503463745,
-0.24065159261226654,
-0.7254043221473694,
0.2568790018558502,
0.053037047386169434,
0.11422387510538101,
-0.3785347640514374,
0.051566820591688156,
0.05876700580120087,
-0.38976871967315674,
0.2913079261779785,
0.473924845457077,
0.5683947801589966,
0.09446381032466888,
0.4471369683742523,
-0.32132723927497864,
-0.13413311541080475,
-0.06806561350822449,
0.005931610241532326,
0.19575358927249908,
0.12373273074626923,
-0.2245982438325882,
0.471495658159256,
0.08197536319494247,
-0.020407509058713913,
0.08720177412033081,
0.292571097612381,
0.11291816830635071,
-0.3001949191093445,
0.2867952287197113,
-0.04124294966459274,
-0.12891505658626556,
0.08425372838973999,
-0.19267040491104126,
-0.13947179913520813,
0.05625130236148834,
0.29485630989074707,
0.03138221055269241,
0.2712312936782837,
-0.09173458814620972,
0.06634096056222916,
0.2238904982805252,
0.47943854331970215,
-0.15532788634300232,
-0.45963457226753235,
-0.286092609167099,
-0.09414677321910858,
-0.5416746735572815,
-0.20735183358192444,
-0.16065667569637299,
-0.043496038764715195,
0.22205589711666107,
0.2730088233947754,
0.03751217573881149,
-0.12538371980190277,
0.3400004506111145,
0.2281753271818161,
0.2344316989183426,
0.09209892153739929,
-0.5376959443092346,
-0.281800240278244,
0.1377544105052948,
0.11376465111970901,
0.2871457636356354,
-0.22940358519554138,
0.045601986348629,
0.26715606451034546,
-0.08008400350809097,
0.1593988537788391,
-0.1964317411184311,
0.33772292733192444,
-0.41770222783088684,
0.14139634370803833,
0.2331722378730774,
0.48351964354515076,
0.2029017210006714,
-0.047514885663986206,
-0.3638101816177368,
-0.2828819453716278,
-0.3068445920944214,
-0.09993434697389603,
-0.3041667342185974,
0.30564215779304504,
-0.2672106921672821,
0.17745333909988403,
-0.13446302711963654,
-0.1141609326004982,
0.11268223822116852,
-0.09533273428678513,
-0.04007153958082199,
0.1301737129688263,
-0.05452629551291466,
0.13949641585350037,
0.15021991729736328,
0.19984689354896545,
-0.13408681750297546,
0.28425273299217224,
-0.32294178009033203,
-0.24708232283592224,
0.40658846497535706,
-0.019005747511982918,
-0.3879238963127136,
0.016935281455516815,
0.13802041113376617,
0.0448787659406662,
0.005428901873528957,
-0.22432297468185425,
-0.04250071942806244,
0.4385403096675873,
-0.035499170422554016,
-0.1839331090450287,
0.2760704755783081,
0.13236401975154877,
-0.02316749095916748,
0.06996025145053864,
-0.047732144594192505,
0.06623825430870056,
-0.3423503339290619,
0.2695068120956421,
0.11304938793182373
] |
https://github.com/huggingface/datasets/issues/4752 | DatasetInfo issue when testing multiple configs: mixed task_templates | Ugh. Found the issue: apparently `datasets` was reusing the already existing `dataset_infos.json` that is inside `datasets/datasets/hebban-reviews`! Is this desired behavior?
Perhaps when `--save_infos` and `--all_configs` are given, an existing `dataset_infos.json` file should first be deleted before continuing with the test? Because that would assume that the user wants to create a new infos file for all configs anyway. | ## Describe the bug
When running the `datasets-cli test` it would seem that some config properties in a DatasetInfo get mangled, leading to issues, e.g., about the ClassLabel.
## Steps to reproduce the bug
In summary, what I want to do is create three configs:
- unfiltered: no classlabel, no tasks. Gets data from unfiltered.json.gz (I'd want this without splits, just one chunk of data, but that does not seem possible?)
- filtered_sentiment: `review_sentiment` as ClassLabel, TextClassification task with `review_sentiment` as label. Gets train/test split from respective json.gz files
- filtered_rating: `review_rating0` as ClassLabel, TextClassification task with `review_rating0` as label. Gets train/test split from respective json.gz files
This might be a bit tedious to reproduce, so I am sorry, but these are the steps:
- Clone datasets -> `datasets/` and install it
- Clone `https://huggingface.co/datasets/BramVanroy/hebban-reviews` into `datasets/datasets` so that you have a new folder `datasets/datasets/hebban-reviews/`.
- Replace the HebbanReviews class with this new one:
```python
class HebbanReviews(datasets.GeneratorBasedBuilder):
"""The Hebban book reviews dataset."""
BUILDER_CONFIGS = [
HebbanReviewsConfig(
name="unfiltered",
description=_HEBBAN_REVIEWS_UNFILTERED_DESCRIPTION,
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_sentiment",
description=f"This config has the negative, neutral, and positive sentiment scores as ClassLabel in the 'review_sentiment' column.\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_rating",
description=f"This config has the 5-class ratings as ClassLabel in the 'review_rating0' column (which is a variant of 'review_rating' that starts counting from 0 instead of 1).\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
)
]
DEFAULT_CONFIG_NAME = "filtered_sentiment"
_URLS = {
"train": "train.jsonl.gz",
"test": "test.jsonl.gz",
"unfiltered": "unfiltered.jsonl.gz",
}
def _info(self):
features = {
"review_title": datasets.Value("string"),
"review_text": datasets.Value("string"),
"review_text_without_quotes": datasets.Value("string"),
"review_n_quotes": datasets.Value("int32"),
"review_n_tokens": datasets.Value("int32"),
"review_rating": datasets.Value("int32"),
"review_rating0": datasets.Value("int32"),
"review_author_url": datasets.Value("string"),
"review_author_type": datasets.Value("string"),
"review_n_likes": datasets.Value("int32"),
"review_n_comments": datasets.Value("int32"),
"review_url": datasets.Value("string"),
"review_published_date": datasets.Value("string"),
"review_crawl_date": datasets.Value("string"),
"lid": datasets.Value("string"),
"lid_probability": datasets.Value("float32"),
"review_sentiment": datasets.features.ClassLabel(names=["negative", "neutral", "positive"]),
"review_sentiment_label": datasets.Value("string"),
"book_id": datasets.Value("int32"),
}
if self.config.name == "filtered_sentiment":
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_sentiment")]
elif self.config.name == "filtered_rating":
# For CrossEntropy, our classes need to start at index 0 -- not 1
features["review_rating0"] = datasets.features.ClassLabel(names=["1", "2", "3", "4", "5"])
features["review_sentiment"] = datasets.Value("int32")
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_rating0")]
elif self.config.name == "unfiltered": # no ClassLabels in unfiltered
features["review_sentiment"] = datasets.Value("int32")
task_templates = None
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
print("AT INFO", self.config.name, task_templates)
return datasets.DatasetInfo(
description=self.config.description,
features=datasets.Features(features),
homepage="https://huggingface.co/datasets/BramVanroy/hebban-reviews",
citation=_HEBBAN_REVIEWS_CITATION,
task_templates=task_templates,
license="cc-by-4.0"
)
def _split_generators(self, dl_manager):
if self.config.name.startswith("filtered"):
files = dl_manager.download_and_extract({"train": "train.jsonl.gz",
"test": "test.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"data_file": files["test"]
},
),
]
elif self.config.name == "unfiltered":
files = dl_manager.download_and_extract({"train": "unfiltered.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
]
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
def _generate_examples(self, data_file):
lines = Path(data_file).open(encoding="utf-8").readlines()
for line_idx, line in enumerate(lines):
row = json.loads(line)
yield line_idx, row
```
- finally, run `datasets-cli test ./datasets/hebban-reviews/ --save_infos --all_configs` from within the topmost `datasets` directory
## Expected results
Succeeding tests for three different configs.
## Actual results
I printed out the values that are given to `DatasetInfo` for config name and task_templates, as you can see. There, as expected, I get `unfiltered None`. I also modified datasets/info.py and added this line [at L.170](https://github.com/huggingface/datasets/blob/f5847a304aa1b38b3a3c54a8318b4df60f1299bc/src/datasets/info.py#L170):
```python
print("INTERNALLY AT INFO.PY", self.config_name, self.task_templates)
```
to my surprise, here I get `unfiltered [TextClassification(task='text-classification', text_column='review_text_without_quotes', label_column='review_sentiment')]`. So one way or another, here I suddenly see that `unfiltered` now does have a task_template -- even though that is not what is written in the data loading script, as the first print statement correctly shows.
I do not quite understand how, but it seems that the config name and task_templates get mixed.
This ultimately leads to the following error, but this trace may not be very useful in itself:
```
Traceback (most recent call last):
File "C:\Users\bramv\.virtualenvs\hebban-U6poXNQd\Scripts\datasets-cli-script.py", line 33, in <module>
sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())
File "c:\dev\python\hebban\datasets\src\datasets\commands\datasets_cli.py", line 39, in main
service.run()
File "c:\dev\python\hebban\datasets\src\datasets\commands\test.py", line 144, in run
builder.as_dataset()
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 899, in as_dataset
datasets = map_nested(
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 393, in map_nested
mapped = [
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 394, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 330, in _single_map_nested
return function(data_struct)
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 930, in _build_single_dataset
ds = self._as_dataset(
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 1006, in _as_dataset
return Dataset(fingerprint=fingerprint, **dataset_kwargs)
File "c:\dev\python\hebban\datasets\src\datasets\arrow_dataset.py", line 661, in __init__
info = info.copy() if info is not None else DatasetInfo()
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 286, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 176, in __post_init__
self.task_templates = [
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 177, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "c:\dev\python\hebban\datasets\src\datasets\tasks\text_classification.py", line 22, in align_with_features
raise ValueError(f"Column {self.label_column} is not a ClassLabel.")
ValueError: Column review_sentiment is not a ClassLabel.
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3 | 58 | DatasetInfo issue when testing multiple configs: mixed task_templates
## Describe the bug
When running the `datasets-cli test` it would seem that some config properties in a DatasetInfo get mangled, leading to issues, e.g., about the ClassLabel.
## Steps to reproduce the bug
In summary, what I want to do is create three configs:
- unfiltered: no classlabel, no tasks. Gets data from unfiltered.json.gz (I'd want this without splits, just one chunk of data, but that does not seem possible?)
- filtered_sentiment: `review_sentiment` as ClassLabel, TextClassification task with `review_sentiment` as label. Gets train/test split from respective json.gz files
- filtered_rating: `review_rating0` as ClassLabel, TextClassification task with `review_rating0` as label. Gets train/test split from respective json.gz files
This might be a bit tedious to reproduce, so I am sorry, but these are the steps:
- Clone datasets -> `datasets/` and install it
- Clone `https://huggingface.co/datasets/BramVanroy/hebban-reviews` into `datasets/datasets` so that you have a new folder `datasets/datasets/hebban-reviews/`.
- Replace the HebbanReviews class with this new one:
```python
class HebbanReviews(datasets.GeneratorBasedBuilder):
"""The Hebban book reviews dataset."""
BUILDER_CONFIGS = [
HebbanReviewsConfig(
name="unfiltered",
description=_HEBBAN_REVIEWS_UNFILTERED_DESCRIPTION,
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_sentiment",
description=f"This config has the negative, neutral, and positive sentiment scores as ClassLabel in the 'review_sentiment' column.\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_rating",
description=f"This config has the 5-class ratings as ClassLabel in the 'review_rating0' column (which is a variant of 'review_rating' that starts counting from 0 instead of 1).\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
)
]
DEFAULT_CONFIG_NAME = "filtered_sentiment"
_URLS = {
"train": "train.jsonl.gz",
"test": "test.jsonl.gz",
"unfiltered": "unfiltered.jsonl.gz",
}
def _info(self):
features = {
"review_title": datasets.Value("string"),
"review_text": datasets.Value("string"),
"review_text_without_quotes": datasets.Value("string"),
"review_n_quotes": datasets.Value("int32"),
"review_n_tokens": datasets.Value("int32"),
"review_rating": datasets.Value("int32"),
"review_rating0": datasets.Value("int32"),
"review_author_url": datasets.Value("string"),
"review_author_type": datasets.Value("string"),
"review_n_likes": datasets.Value("int32"),
"review_n_comments": datasets.Value("int32"),
"review_url": datasets.Value("string"),
"review_published_date": datasets.Value("string"),
"review_crawl_date": datasets.Value("string"),
"lid": datasets.Value("string"),
"lid_probability": datasets.Value("float32"),
"review_sentiment": datasets.features.ClassLabel(names=["negative", "neutral", "positive"]),
"review_sentiment_label": datasets.Value("string"),
"book_id": datasets.Value("int32"),
}
if self.config.name == "filtered_sentiment":
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_sentiment")]
elif self.config.name == "filtered_rating":
# For CrossEntropy, our classes need to start at index 0 -- not 1
features["review_rating0"] = datasets.features.ClassLabel(names=["1", "2", "3", "4", "5"])
features["review_sentiment"] = datasets.Value("int32")
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_rating0")]
elif self.config.name == "unfiltered": # no ClassLabels in unfiltered
features["review_sentiment"] = datasets.Value("int32")
task_templates = None
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
print("AT INFO", self.config.name, task_templates)
return datasets.DatasetInfo(
description=self.config.description,
features=datasets.Features(features),
homepage="https://huggingface.co/datasets/BramVanroy/hebban-reviews",
citation=_HEBBAN_REVIEWS_CITATION,
task_templates=task_templates,
license="cc-by-4.0"
)
def _split_generators(self, dl_manager):
if self.config.name.startswith("filtered"):
files = dl_manager.download_and_extract({"train": "train.jsonl.gz",
"test": "test.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"data_file": files["test"]
},
),
]
elif self.config.name == "unfiltered":
files = dl_manager.download_and_extract({"train": "unfiltered.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
]
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
def _generate_examples(self, data_file):
lines = Path(data_file).open(encoding="utf-8").readlines()
for line_idx, line in enumerate(lines):
row = json.loads(line)
yield line_idx, row
```
- finally, run `datasets-cli test ./datasets/hebban-reviews/ --save_infos --all_configs` from within the topmost `datasets` directory
## Expected results
Succeeding tests for three different configs.
## Actual results
I printed out the values that are given to `DatasetInfo` for config name and task_templates, as you can see. There, as expected, I get `unfiltered None`. I also modified datasets/info.py and added this line [at L.170](https://github.com/huggingface/datasets/blob/f5847a304aa1b38b3a3c54a8318b4df60f1299bc/src/datasets/info.py#L170):
```python
print("INTERNALLY AT INFO.PY", self.config_name, self.task_templates)
```
to my surprise, here I get `unfiltered [TextClassification(task='text-classification', text_column='review_text_without_quotes', label_column='review_sentiment')]`. So one way or another, here I suddenly see that `unfiltered` now does have a task_template -- even though that is not what is written in the data loading script, as the first print statement correctly shows.
I do not quite understand how, but it seems that the config name and task_templates get mixed.
This ultimately leads to the following error, but this trace may not be very useful in itself:
```
Traceback (most recent call last):
File "C:\Users\bramv\.virtualenvs\hebban-U6poXNQd\Scripts\datasets-cli-script.py", line 33, in <module>
sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())
File "c:\dev\python\hebban\datasets\src\datasets\commands\datasets_cli.py", line 39, in main
service.run()
File "c:\dev\python\hebban\datasets\src\datasets\commands\test.py", line 144, in run
builder.as_dataset()
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 899, in as_dataset
datasets = map_nested(
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 393, in map_nested
mapped = [
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 394, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 330, in _single_map_nested
return function(data_struct)
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 930, in _build_single_dataset
ds = self._as_dataset(
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 1006, in _as_dataset
return Dataset(fingerprint=fingerprint, **dataset_kwargs)
File "c:\dev\python\hebban\datasets\src\datasets\arrow_dataset.py", line 661, in __init__
info = info.copy() if info is not None else DatasetInfo()
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 286, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 176, in __post_init__
self.task_templates = [
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 177, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "c:\dev\python\hebban\datasets\src\datasets\tasks\text_classification.py", line 22, in align_with_features
raise ValueError(f"Column {self.label_column} is not a ClassLabel.")
ValueError: Column review_sentiment is not a ClassLabel.
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Ugh. Found the issue: apparently `datasets` was reusing the already existing `dataset_infos.json` that is inside `datasets/datasets/hebban-reviews`! Is this desired behavior?
Perhaps when `--save_infos` and `--all_configs` are given, an existing `dataset_infos.json` file should first be deleted before continuing with the test? Because that would assume that the user wants to create a new infos file for all configs anyway. | [
-0.30294740200042725,
-0.02238108217716217,
-0.007900869473814964,
0.27841848134994507,
0.04747239127755165,
0.0910637304186821,
0.4126910865306854,
0.2915855348110199,
-0.2092212736606598,
-0.03551861643791199,
-0.2731928825378418,
0.08178993314504623,
-0.011083702556788921,
0.13023871183395386,
-0.16048872470855713,
0.07670483738183975,
0.1474226862192154,
-0.08985315263271332,
-0.09656168520450592,
0.20267952978610992,
-0.017200278118252754,
0.21734634041786194,
-0.12220072001218796,
-0.03424946963787079,
-0.2773225009441376,
-0.37570691108703613,
-0.2987944185733795,
0.2699897289276123,
0.024026833474636078,
-0.0822402760386467,
0.4878433346748352,
0.37967467308044434,
-0.3503599464893341,
0.6244824528694153,
-0.00011843802349176258,
0.15155130624771118,
0.0972118079662323,
0.009496333077549934,
-0.2661677896976471,
0.09607415646314621,
-0.31376296281814575,
-0.0023348331451416016,
-0.2756499946117401,
-0.1757371574640274,
-0.06886974722146988,
0.12302394956350327,
-0.41851964592933655,
-0.22040289640426636,
0.1484028548002243,
0.24308347702026367,
0.10377523303031921,
0.00045577622950077057,
-0.49932119250297546,
-0.0640961304306984,
0.010494440793991089,
0.25357291102409363,
-0.22226499021053314,
0.11761537194252014,
0.49024760723114014,
-0.07115299999713898,
0.2600264549255371,
0.35451340675354004,
-0.00934913381934166,
0.2315017580986023,
-0.04921826720237732,
-0.12209361046552658,
0.07247484475374222,
-0.09800451993942261,
-0.05923350155353546,
0.4250367283821106,
0.2362995743751526,
-0.3477702736854553,
-0.46994349360466003,
-0.5202530026435852,
0.16242948174476624,
0.014794176444411278,
0.36311429738998413,
0.010697206482291222,
-0.037740834057331085,
0.10765853524208069,
-0.2840100824832916,
0.04026622325181961,
-0.03446117788553238,
0.0064111873507499695,
-0.10375277698040009,
0.43704673647880554,
-0.008264534175395966,
0.1022193506360054,
-0.08514080941677094,
-0.11168956756591797,
0.12013427913188934,
-0.4067937731742859,
-0.7067835330963135,
-0.1079534962773323,
-0.049676407128572464,
-0.341122031211853,
-0.13030660152435303,
-0.18154996633529663,
0.31539732217788696,
0.2408171147108078,
0.08242148160934448,
0.060703881084918976,
0.012631786055862904,
-0.09725586324930191,
0.4210072457790375,
0.29027441143989563,
0.19097751379013062,
0.40642961859703064,
0.26388657093048096,
0.19310176372528076,
-0.058817919343709946,
-0.0015215128660202026,
0.12058024108409882,
-0.2742440700531006,
0.13083933293819427,
-0.1646212339401245,
0.23042304813861847,
-0.17569410800933838,
-0.37292832136154175,
0.06822537630796432,
-0.2918047606945038,
0.058104902505874634,
0.2049405574798584,
0.2656727731227875,
0.047772955149412155,
0.10153806954622269,
-0.10444634407758713,
0.3402908444404602,
-0.1372677981853485,
-0.10812675207853317,
-0.15691335499286652,
-0.14111347496509552,
-0.070014089345932,
0.11362706869840622,
0.2755240201950073,
0.05651902034878731,
0.28145331144332886,
0.2408474236726761,
0.22184276580810547,
-0.378208190202713,
0.1672673374414444,
-0.10321526229381561,
0.1521044671535492,
0.09522119909524918,
-0.10524831712245941,
0.38632750511169434,
0.06714776903390884,
-0.2995522916316986,
-0.29128822684288025,
-0.0780433639883995,
-0.09854058176279068,
-0.22279642522335052,
0.2447563111782074,
0.08734250068664551,
-0.3716716170310974,
0.05698850750923157,
-0.012325949966907501,
0.31940358877182007,
-0.04265349358320236,
0.03953750059008598,
0.004407830536365509,
-0.34046995639801025,
-0.04738398268818855,
0.037430718541145325,
0.05000441521406174,
0.3237130641937256,
-0.3583018481731415,
-0.18152520060539246,
0.0657571330666542,
-0.21654610335826874,
-0.13675877451896667,
0.14903046190738678,
-0.15584947168827057,
0.42019593715667725,
-0.11621874570846558,
-0.04432879760861397,
0.3490850031375885,
-0.508638858795166,
-0.3181789815425873,
0.3312610387802124,
0.2739675045013428,
0.5006310343742371,
0.16337062418460846,
-0.20708444714546204,
-0.08359388262033463,
-0.23928731679916382,
0.22696274518966675,
0.2723633050918579,
-0.13612963259220123,
0.25166982412338257,
-0.2128518670797348,
0.08108443021774292,
0.2277229130268097,
0.012970924377441406,
0.08957242965698242,
-0.09286085516214371,
-0.2578110694885254,
-0.22394409775733948,
0.4652453362941742,
-0.20627495646476746,
0.23446223139762878,
0.2924785614013672,
0.09512890875339508,
0.08256068825721741,
0.037674713879823685,
-0.1378660351037979,
-0.5247583389282227,
0.35784533619880676,
0.17264308035373688,
0.011291906237602234,
0.053374625742435455,
-0.1032719835639,
-0.25574150681495667,
0.05118735134601593,
-0.426187127828598,
-0.32721513509750366,
0.09827578067779541,
0.253141313791275,
-0.03260829672217369,
-0.4232892394065857,
0.050733696669340134,
0.30906417965888977,
-0.006415907293558121,
-0.051514312624931335,
0.12068943679332733,
0.1881147027015686,
0.0705747976899147,
-0.10051732510328293,
-0.0875592827796936,
0.10870195180177689,
0.08519020676612854,
-0.3111230432987213,
-0.21870675683021545,
0.39548370242118835,
0.05662901699542999,
-0.2038026601076126,
0.1014162003993988,
0.10244999825954437,
0.2254587560892105,
-0.08249424397945404,
-0.0491158589720726,
-0.08166936039924622,
0.04001569747924805,
-0.30917808413505554,
-0.35690414905548096,
0.38244473934173584,
0.06042828410863876,
0.4350970685482025,
-0.12450483441352844,
0.021071752533316612,
0.3688424825668335,
-0.1712431013584137,
-0.2754276692867279,
-0.017534546554088593,
0.18711447715759277,
-0.24341793358325958,
-0.061730243265628815,
0.08539225906133652,
-0.3521660268306732,
0.262542724609375,
0.08992883563041687,
-0.030741184949874878,
-0.1323876678943634,
-0.1799335777759552,
0.06876052170991898,
0.0751698836684227,
0.19443242251873016,
0.42690804600715637,
0.5369592308998108,
0.007716989144682884,
-0.04517574980854988,
0.13759714365005493,
-0.28347286581993103,
-0.049411479383707047,
0.20051854848861694,
0.15927129983901978,
0.316822350025177,
0.3332633674144745,
0.1119963601231575,
-0.2297208309173584,
0.14488190412521362,
-0.29987475275993347,
0.3413277268409729,
0.08635950833559036,
-0.6140109300613403,
0.20784582197666168,
-0.1691744476556778,
-0.12081652879714966,
-0.2746560573577881,
-0.23959992825984955,
-0.1957550197839737,
-0.3629877269268036,
0.11780692636966705,
0.13587601482868195,
-0.2514084279537201,
0.3278820812702179,
-0.11392238736152649,
0.22041292488574982,
-0.21731090545654297,
-0.2574416399002075,
-0.21695466339588165,
-0.14543397724628448,
-0.32382306456565857,
-0.037541091442108154,
0.3051351010799408,
0.1980976164340973,
0.1414935290813446,
0.054991237819194794,
-0.45136815309524536,
-0.23185548186302185,
-0.23729968070983887,
0.27718058228492737,
-0.12472391128540039,
0.6841238141059875,
0.16233918070793152,
-0.07313552498817444,
0.016349971294403076,
0.020333778113126755,
0.348846435546875,
0.39639854431152344,
-0.08512945473194122,
0.032774753868579865,
-0.031254541128873825,
-0.19580374658107758,
-0.18461918830871582,
-0.41656777262687683,
-0.05452672392129898,
-0.06304634362459183,
-0.10725678503513336,
-0.19681178033351898,
-0.0383167639374733,
0.507735013961792,
0.23199398815631866,
-0.2083609700202942,
0.15657362341880798,
0.21413224935531616,
0.010869170539081097,
-0.35761597752571106,
0.18333639204502106,
-0.20416131615638733,
-0.07767495512962341,
-0.3424185514450073,
-0.18814782798290253,
0.13390277326107025,
0.1506783813238144,
-0.1775297075510025,
0.10523650795221329,
-0.0675475224852562,
0.24764585494995117,
-0.04864706099033356,
-0.35507598519325256,
-0.060225337743759155,
-0.005551348906010389,
0.10983450710773468,
-0.4448879361152649,
-0.2285103052854538,
0.3637837767601013,
-0.29598286747932434,
0.45867013931274414,
-0.14842119812965393,
-0.07053431123495102,
-0.13339415192604065,
0.23468782007694244,
0.3427053391933441,
0.140370175242424,
-0.0030405521392822266,
0.11336252838373184,
0.43805545568466187,
0.11737431585788727,
-0.2728126645088196,
0.08221817016601562,
0.26453834772109985,
-0.1485050916671753,
0.06231708824634552,
0.12721973657608032,
0.00529232993721962,
0.15262363851070404,
0.33951082825660706,
-0.005649205297231674,
-0.3147982656955719,
0.2126520872116089,
-0.254329115152359,
-0.08115681260824203,
0.10507242381572723,
-0.08086257427930832,
0.006275450810790062,
0.131730854511261,
0.06777364015579224,
0.282659649848938,
-0.4461374580860138,
-0.06187594309449196,
-0.3719719350337982,
-0.3061441481113434,
-0.221865713596344,
-0.015830084681510925,
0.15920017659664154,
0.2542322874069214,
-0.11193621903657913,
0.08349824696779251,
-0.03799106180667877,
-0.05268380790948868,
0.7994440793991089,
-0.492439866065979,
0.15295280516147614,
0.673557698726654,
0.028424225747585297,
-0.22087863087654114,
-0.4287688732147217,
-0.49351248145103455,
0.16777856647968292,
0.8473813533782959,
0.6940190196037292,
-0.2710752785205841,
-0.36370500922203064,
0.08224336802959442,
-0.09520605206489563,
-0.26247912645339966,
-0.2851734161376953,
0.025146786123514175,
-0.5268335938453674,
-0.07737290114164352,
-0.005302213132381439,
0.15002407133579254,
0.24720145761966705,
-0.14551876485347748,
-0.1355331391096115,
0.023839829489588737,
0.1496885120868683,
0.01437368243932724,
0.137516051530838,
0.13102345168590546,
0.1364269256591797,
0.4778844714164734,
-0.116569384932518,
0.25825953483581543,
0.3476444482803345,
0.3731439411640167,
0.03129032626748085,
-0.03881599009037018,
-0.12525781989097595,
-0.19249139726161957,
0.18733394145965576,
0.2369605153799057,
0.10725174099206924,
-0.10137509554624557,
-0.1201166957616806,
0.19387689232826233,
0.008181506767868996,
0.3628070056438446,
0.3493698239326477,
0.15325956046581268,
-0.5413298606872559,
-0.4839423596858978,
0.1904551386833191,
0.08920833468437195,
-0.27653300762176514,
0.7664533853530884,
-0.17526833713054657,
-0.4139542877674103,
0.2061002105474472,
-0.014302186667919159,
0.4774814248085022,
0.19909900426864624,
-0.06460152566432953,
0.4362499415874481,
-0.22147440910339355,
0.0701952874660492,
-0.13366413116455078,
0.13726705312728882,
-0.24148625135421753,
-0.036574576050043106,
0.250306636095047,
-0.09620854258537292,
0.1715114414691925,
0.20199744403362274,
-0.19593003392219543,
0.13778479397296906,
-0.1144411712884903,
-0.2526431679725647,
-0.08138792216777802,
-0.18015998601913452,
-0.18497250974178314,
-0.16941353678703308,
-0.17123405635356903,
0.09656955301761627,
-0.04758705943822861,
-0.07668270170688629,
-0.07638916373252869,
0.029429705813527107,
-0.34364053606987,
0.14512252807617188,
-0.33797186613082886,
0.08286643773317337,
0.04177199304103851,
0.06509771198034286,
0.3799169659614563,
-0.2006126493215561,
0.09379863739013672,
-0.09765690565109253,
0.2877299189567566,
0.04540073126554489,
-0.10428079962730408,
0.44819211959838867,
-0.04319322854280472,
0.19420190155506134,
0.11845072358846664,
-0.12950098514556885,
0.4238022565841675,
0.16334733366966248,
-0.38506656885147095,
-0.3049914836883545,
-0.2544783353805542,
0.06539265811443329,
0.0836789458990097,
-0.3945302963256836,
-0.08254265785217285,
-0.36229828000068665,
0.2802731990814209,
0.18204590678215027,
0.3202376365661621,
-0.3893996775150299,
0.05504167824983597,
-0.08140058815479279,
-0.2394430935382843,
0.555970311164856,
-0.2737073600292206,
-0.28880488872528076,
-0.057047318667173386,
-0.11125100404024124,
-0.1639154851436615,
0.12358333170413971,
0.47870343923568726,
0.15415312349796295,
0.20568037033081055,
-0.2514577805995941,
0.35785213112831116,
0.1977171152830124,
0.10243842750787735,
0.3788062036037445,
-0.13461799919605255,
-0.20568011701107025,
-0.08177836984395981,
0.5105408430099487,
0.24028216302394867,
0.13436393439769745,
0.10581307113170624,
-0.18847736716270447,
0.03669246286153793,
-0.1389889121055603,
0.17428380250930786,
0.40131592750549316,
-0.23716247081756592,
0.1476311832666397,
-0.012832626700401306,
0.12030772864818573,
-0.23142218589782715,
-0.21918056905269623,
-0.3880561888217926,
0.0035209301859140396,
-0.035787034779787064,
0.41874343156814575,
0.07366735488176346,
0.05696853622794151,
0.03600114583969116,
-0.16242548823356628,
0.06139282509684563,
-0.15606263279914856,
-0.33054518699645996,
0.15753263235092163,
0.14704260230064392,
0.017397504299879074,
0.10641789436340332,
0.13302798569202423,
0.050953105092048645,
-0.26003119349479675,
0.1326448768377304,
0.04381674528121948,
0.13220302760601044,
0.19757211208343506,
-0.16148242354393005,
-0.130599707365036,
-0.08450743556022644,
0.06591498106718063,
0.1410742551088333,
-0.08063589036464691,
0.06744788587093353,
0.35670724511146545,
0.025442952290177345,
-0.06159461662173271,
-0.15436924993991852,
0.15116538107395172,
-0.2891048192977905,
0.14197714626789093,
0.15071412920951843,
-0.33874398469924927,
0.2733452618122101,
0.42923781275749207,
0.3980385661125183,
0.45599639415740967,
-0.2838955819606781,
0.0529305562376976,
0.13076528906822205,
0.1807517111301422,
0.0399647131562233,
-0.021631237119436264,
0.15172913670539856,
-0.02377920225262642,
0.016780313104391098,
0.3494323492050171,
-0.22614410519599915,
-0.23735888302326202,
0.17031589150428772,
-0.11877621710300446,
0.448103129863739,
-0.08232814818620682,
0.25575003027915955,
0.1291850209236145,
-0.23470580577850342,
0.07069848477840424,
0.5356854200363159,
-0.1439708024263382,
0.2502623498439789,
0.1384826898574829,
0.2817561626434326,
0.06920953840017319,
-0.1088687852025032,
0.0037017352879047394,
-0.15493157505989075,
-0.17275752127170563,
0.21193580329418182,
0.00041562318801879883,
-0.17702794075012207,
-0.010149329900741577,
0.07378562539815903,
0.4655272960662842,
-0.5435712933540344,
-0.4389743506908417,
0.008942091837525368,
0.058752041310071945,
-0.007092557847499847,
-0.1409931182861328,
-0.6827965378761292,
-0.19716301560401917,
0.03138841688632965,
0.1528775542974472,
-0.01027260348200798,
0.009534917771816254,
0.37494006752967834,
-0.025792330503463745,
-0.24065159261226654,
-0.7254043221473694,
0.2568790018558502,
0.053037047386169434,
0.11422387510538101,
-0.3785347640514374,
0.051566820591688156,
0.05876700580120087,
-0.38976871967315674,
0.2913079261779785,
0.473924845457077,
0.5683947801589966,
0.09446381032466888,
0.4471369683742523,
-0.32132723927497864,
-0.13413311541080475,
-0.06806561350822449,
0.005931610241532326,
0.19575358927249908,
0.12373273074626923,
-0.2245982438325882,
0.471495658159256,
0.08197536319494247,
-0.020407509058713913,
0.08720177412033081,
0.292571097612381,
0.11291816830635071,
-0.3001949191093445,
0.2867952287197113,
-0.04124294966459274,
-0.12891505658626556,
0.08425372838973999,
-0.19267040491104126,
-0.13947179913520813,
0.05625130236148834,
0.29485630989074707,
0.03138221055269241,
0.2712312936782837,
-0.09173458814620972,
0.06634096056222916,
0.2238904982805252,
0.47943854331970215,
-0.15532788634300232,
-0.45963457226753235,
-0.286092609167099,
-0.09414677321910858,
-0.5416746735572815,
-0.20735183358192444,
-0.16065667569637299,
-0.043496038764715195,
0.22205589711666107,
0.2730088233947754,
0.03751217573881149,
-0.12538371980190277,
0.3400004506111145,
0.2281753271818161,
0.2344316989183426,
0.09209892153739929,
-0.5376959443092346,
-0.281800240278244,
0.1377544105052948,
0.11376465111970901,
0.2871457636356354,
-0.22940358519554138,
0.045601986348629,
0.26715606451034546,
-0.08008400350809097,
0.1593988537788391,
-0.1964317411184311,
0.33772292733192444,
-0.41770222783088684,
0.14139634370803833,
0.2331722378730774,
0.48351964354515076,
0.2029017210006714,
-0.047514885663986206,
-0.3638101816177368,
-0.2828819453716278,
-0.3068445920944214,
-0.09993434697389603,
-0.3041667342185974,
0.30564215779304504,
-0.2672106921672821,
0.17745333909988403,
-0.13446302711963654,
-0.1141609326004982,
0.11268223822116852,
-0.09533273428678513,
-0.04007153958082199,
0.1301737129688263,
-0.05452629551291466,
0.13949641585350037,
0.15021991729736328,
0.19984689354896545,
-0.13408681750297546,
0.28425273299217224,
-0.32294178009033203,
-0.24708232283592224,
0.40658846497535706,
-0.019005747511982918,
-0.3879238963127136,
0.016935281455516815,
0.13802041113376617,
0.0448787659406662,
0.005428901873528957,
-0.22432297468185425,
-0.04250071942806244,
0.4385403096675873,
-0.035499170422554016,
-0.1839331090450287,
0.2760704755783081,
0.13236401975154877,
-0.02316749095916748,
0.06996025145053864,
-0.047732144594192505,
0.06623825430870056,
-0.3423503339290619,
0.2695068120956421,
0.11304938793182373
] |
https://github.com/huggingface/datasets/issues/4752 | DatasetInfo issue when testing multiple configs: mixed task_templates | Hi! I think this is a reasonable solution. Would you be interested in submitting a PR? | ## Describe the bug
When running the `datasets-cli test` it would seem that some config properties in a DatasetInfo get mangled, leading to issues, e.g., about the ClassLabel.
## Steps to reproduce the bug
In summary, what I want to do is create three configs:
- unfiltered: no classlabel, no tasks. Gets data from unfiltered.json.gz (I'd want this without splits, just one chunk of data, but that does not seem possible?)
- filtered_sentiment: `review_sentiment` as ClassLabel, TextClassification task with `review_sentiment` as label. Gets train/test split from respective json.gz files
- filtered_rating: `review_rating0` as ClassLabel, TextClassification task with `review_rating0` as label. Gets train/test split from respective json.gz files
This might be a bit tedious to reproduce, so I am sorry, but these are the steps:
- Clone datasets -> `datasets/` and install it
- Clone `https://huggingface.co/datasets/BramVanroy/hebban-reviews` into `datasets/datasets` so that you have a new folder `datasets/datasets/hebban-reviews/`.
- Replace the HebbanReviews class with this new one:
```python
class HebbanReviews(datasets.GeneratorBasedBuilder):
"""The Hebban book reviews dataset."""
BUILDER_CONFIGS = [
HebbanReviewsConfig(
name="unfiltered",
description=_HEBBAN_REVIEWS_UNFILTERED_DESCRIPTION,
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_sentiment",
description=f"This config has the negative, neutral, and positive sentiment scores as ClassLabel in the 'review_sentiment' column.\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_rating",
description=f"This config has the 5-class ratings as ClassLabel in the 'review_rating0' column (which is a variant of 'review_rating' that starts counting from 0 instead of 1).\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
)
]
DEFAULT_CONFIG_NAME = "filtered_sentiment"
_URLS = {
"train": "train.jsonl.gz",
"test": "test.jsonl.gz",
"unfiltered": "unfiltered.jsonl.gz",
}
def _info(self):
features = {
"review_title": datasets.Value("string"),
"review_text": datasets.Value("string"),
"review_text_without_quotes": datasets.Value("string"),
"review_n_quotes": datasets.Value("int32"),
"review_n_tokens": datasets.Value("int32"),
"review_rating": datasets.Value("int32"),
"review_rating0": datasets.Value("int32"),
"review_author_url": datasets.Value("string"),
"review_author_type": datasets.Value("string"),
"review_n_likes": datasets.Value("int32"),
"review_n_comments": datasets.Value("int32"),
"review_url": datasets.Value("string"),
"review_published_date": datasets.Value("string"),
"review_crawl_date": datasets.Value("string"),
"lid": datasets.Value("string"),
"lid_probability": datasets.Value("float32"),
"review_sentiment": datasets.features.ClassLabel(names=["negative", "neutral", "positive"]),
"review_sentiment_label": datasets.Value("string"),
"book_id": datasets.Value("int32"),
}
if self.config.name == "filtered_sentiment":
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_sentiment")]
elif self.config.name == "filtered_rating":
# For CrossEntropy, our classes need to start at index 0 -- not 1
features["review_rating0"] = datasets.features.ClassLabel(names=["1", "2", "3", "4", "5"])
features["review_sentiment"] = datasets.Value("int32")
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_rating0")]
elif self.config.name == "unfiltered": # no ClassLabels in unfiltered
features["review_sentiment"] = datasets.Value("int32")
task_templates = None
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
print("AT INFO", self.config.name, task_templates)
return datasets.DatasetInfo(
description=self.config.description,
features=datasets.Features(features),
homepage="https://huggingface.co/datasets/BramVanroy/hebban-reviews",
citation=_HEBBAN_REVIEWS_CITATION,
task_templates=task_templates,
license="cc-by-4.0"
)
def _split_generators(self, dl_manager):
if self.config.name.startswith("filtered"):
files = dl_manager.download_and_extract({"train": "train.jsonl.gz",
"test": "test.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"data_file": files["test"]
},
),
]
elif self.config.name == "unfiltered":
files = dl_manager.download_and_extract({"train": "unfiltered.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
]
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
def _generate_examples(self, data_file):
lines = Path(data_file).open(encoding="utf-8").readlines()
for line_idx, line in enumerate(lines):
row = json.loads(line)
yield line_idx, row
```
- finally, run `datasets-cli test ./datasets/hebban-reviews/ --save_infos --all_configs` from within the topmost `datasets` directory
## Expected results
Succeeding tests for three different configs.
## Actual results
I printed out the values that are given to `DatasetInfo` for config name and task_templates, as you can see. There, as expected, I get `unfiltered None`. I also modified datasets/info.py and added this line [at L.170](https://github.com/huggingface/datasets/blob/f5847a304aa1b38b3a3c54a8318b4df60f1299bc/src/datasets/info.py#L170):
```python
print("INTERNALLY AT INFO.PY", self.config_name, self.task_templates)
```
to my surprise, here I get `unfiltered [TextClassification(task='text-classification', text_column='review_text_without_quotes', label_column='review_sentiment')]`. So one way or another, here I suddenly see that `unfiltered` now does have a task_template -- even though that is not what is written in the data loading script, as the first print statement correctly shows.
I do not quite understand how, but it seems that the config name and task_templates get mixed.
This ultimately leads to the following error, but this trace may not be very useful in itself:
```
Traceback (most recent call last):
File "C:\Users\bramv\.virtualenvs\hebban-U6poXNQd\Scripts\datasets-cli-script.py", line 33, in <module>
sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())
File "c:\dev\python\hebban\datasets\src\datasets\commands\datasets_cli.py", line 39, in main
service.run()
File "c:\dev\python\hebban\datasets\src\datasets\commands\test.py", line 144, in run
builder.as_dataset()
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 899, in as_dataset
datasets = map_nested(
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 393, in map_nested
mapped = [
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 394, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 330, in _single_map_nested
return function(data_struct)
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 930, in _build_single_dataset
ds = self._as_dataset(
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 1006, in _as_dataset
return Dataset(fingerprint=fingerprint, **dataset_kwargs)
File "c:\dev\python\hebban\datasets\src\datasets\arrow_dataset.py", line 661, in __init__
info = info.copy() if info is not None else DatasetInfo()
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 286, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 176, in __post_init__
self.task_templates = [
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 177, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "c:\dev\python\hebban\datasets\src\datasets\tasks\text_classification.py", line 22, in align_with_features
raise ValueError(f"Column {self.label_column} is not a ClassLabel.")
ValueError: Column review_sentiment is not a ClassLabel.
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3 | 16 | DatasetInfo issue when testing multiple configs: mixed task_templates
## Describe the bug
When running the `datasets-cli test` it would seem that some config properties in a DatasetInfo get mangled, leading to issues, e.g., about the ClassLabel.
## Steps to reproduce the bug
In summary, what I want to do is create three configs:
- unfiltered: no classlabel, no tasks. Gets data from unfiltered.json.gz (I'd want this without splits, just one chunk of data, but that does not seem possible?)
- filtered_sentiment: `review_sentiment` as ClassLabel, TextClassification task with `review_sentiment` as label. Gets train/test split from respective json.gz files
- filtered_rating: `review_rating0` as ClassLabel, TextClassification task with `review_rating0` as label. Gets train/test split from respective json.gz files
This might be a bit tedious to reproduce, so I am sorry, but these are the steps:
- Clone datasets -> `datasets/` and install it
- Clone `https://huggingface.co/datasets/BramVanroy/hebban-reviews` into `datasets/datasets` so that you have a new folder `datasets/datasets/hebban-reviews/`.
- Replace the HebbanReviews class with this new one:
```python
class HebbanReviews(datasets.GeneratorBasedBuilder):
"""The Hebban book reviews dataset."""
BUILDER_CONFIGS = [
HebbanReviewsConfig(
name="unfiltered",
description=_HEBBAN_REVIEWS_UNFILTERED_DESCRIPTION,
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_sentiment",
description=f"This config has the negative, neutral, and positive sentiment scores as ClassLabel in the 'review_sentiment' column.\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
),
HebbanReviewsConfig(
name="filtered_rating",
description=f"This config has the 5-class ratings as ClassLabel in the 'review_rating0' column (which is a variant of 'review_rating' that starts counting from 0 instead of 1).\n{_HEBBAN_REVIEWS_FILTERED_DESCRIPTION}",
version=datasets.Version(_HEBBAN_VERSION)
)
]
DEFAULT_CONFIG_NAME = "filtered_sentiment"
_URLS = {
"train": "train.jsonl.gz",
"test": "test.jsonl.gz",
"unfiltered": "unfiltered.jsonl.gz",
}
def _info(self):
features = {
"review_title": datasets.Value("string"),
"review_text": datasets.Value("string"),
"review_text_without_quotes": datasets.Value("string"),
"review_n_quotes": datasets.Value("int32"),
"review_n_tokens": datasets.Value("int32"),
"review_rating": datasets.Value("int32"),
"review_rating0": datasets.Value("int32"),
"review_author_url": datasets.Value("string"),
"review_author_type": datasets.Value("string"),
"review_n_likes": datasets.Value("int32"),
"review_n_comments": datasets.Value("int32"),
"review_url": datasets.Value("string"),
"review_published_date": datasets.Value("string"),
"review_crawl_date": datasets.Value("string"),
"lid": datasets.Value("string"),
"lid_probability": datasets.Value("float32"),
"review_sentiment": datasets.features.ClassLabel(names=["negative", "neutral", "positive"]),
"review_sentiment_label": datasets.Value("string"),
"book_id": datasets.Value("int32"),
}
if self.config.name == "filtered_sentiment":
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_sentiment")]
elif self.config.name == "filtered_rating":
# For CrossEntropy, our classes need to start at index 0 -- not 1
features["review_rating0"] = datasets.features.ClassLabel(names=["1", "2", "3", "4", "5"])
features["review_sentiment"] = datasets.Value("int32")
task_templates = [datasets.TextClassification(text_column="review_text_without_quotes", label_column="review_rating0")]
elif self.config.name == "unfiltered": # no ClassLabels in unfiltered
features["review_sentiment"] = datasets.Value("int32")
task_templates = None
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
print("AT INFO", self.config.name, task_templates)
return datasets.DatasetInfo(
description=self.config.description,
features=datasets.Features(features),
homepage="https://huggingface.co/datasets/BramVanroy/hebban-reviews",
citation=_HEBBAN_REVIEWS_CITATION,
task_templates=task_templates,
license="cc-by-4.0"
)
def _split_generators(self, dl_manager):
if self.config.name.startswith("filtered"):
files = dl_manager.download_and_extract({"train": "train.jsonl.gz",
"test": "test.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
datasets.SplitGenerator(
name=datasets.Split.TEST,
gen_kwargs={
"data_file": files["test"]
},
),
]
elif self.config.name == "unfiltered":
files = dl_manager.download_and_extract({"train": "unfiltered.jsonl.gz"})
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={
"data_file": files["train"]
},
),
]
else:
raise ValueError(f"Unsupported config {self.config.name}. Expected one of 'filtered_sentiment' (default),"
f" 'filtered_rating', or 'unfiltered'")
def _generate_examples(self, data_file):
lines = Path(data_file).open(encoding="utf-8").readlines()
for line_idx, line in enumerate(lines):
row = json.loads(line)
yield line_idx, row
```
- finally, run `datasets-cli test ./datasets/hebban-reviews/ --save_infos --all_configs` from within the topmost `datasets` directory
## Expected results
Succeeding tests for three different configs.
## Actual results
I printed out the values that are given to `DatasetInfo` for config name and task_templates, as you can see. There, as expected, I get `unfiltered None`. I also modified datasets/info.py and added this line [at L.170](https://github.com/huggingface/datasets/blob/f5847a304aa1b38b3a3c54a8318b4df60f1299bc/src/datasets/info.py#L170):
```python
print("INTERNALLY AT INFO.PY", self.config_name, self.task_templates)
```
to my surprise, here I get `unfiltered [TextClassification(task='text-classification', text_column='review_text_without_quotes', label_column='review_sentiment')]`. So one way or another, here I suddenly see that `unfiltered` now does have a task_template -- even though that is not what is written in the data loading script, as the first print statement correctly shows.
I do not quite understand how, but it seems that the config name and task_templates get mixed.
This ultimately leads to the following error, but this trace may not be very useful in itself:
```
Traceback (most recent call last):
File "C:\Users\bramv\.virtualenvs\hebban-U6poXNQd\Scripts\datasets-cli-script.py", line 33, in <module>
sys.exit(load_entry_point('datasets', 'console_scripts', 'datasets-cli')())
File "c:\dev\python\hebban\datasets\src\datasets\commands\datasets_cli.py", line 39, in main
service.run()
File "c:\dev\python\hebban\datasets\src\datasets\commands\test.py", line 144, in run
builder.as_dataset()
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 899, in as_dataset
datasets = map_nested(
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 393, in map_nested
mapped = [
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 394, in <listcomp>
_single_map_nested((function, obj, types, None, True, None))
File "c:\dev\python\hebban\datasets\src\datasets\utils\py_utils.py", line 330, in _single_map_nested
return function(data_struct)
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 930, in _build_single_dataset
ds = self._as_dataset(
File "c:\dev\python\hebban\datasets\src\datasets\builder.py", line 1006, in _as_dataset
return Dataset(fingerprint=fingerprint, **dataset_kwargs)
File "c:\dev\python\hebban\datasets\src\datasets\arrow_dataset.py", line 661, in __init__
info = info.copy() if info is not None else DatasetInfo()
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 286, in copy
return self.__class__(**{k: copy.deepcopy(v) for k, v in self.__dict__.items()})
File "<string>", line 20, in __init__
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 176, in __post_init__
self.task_templates = [
File "c:\dev\python\hebban\datasets\src\datasets\info.py", line 177, in <listcomp>
template.align_with_features(self.features) for template in (self.task_templates)
File "c:\dev\python\hebban\datasets\src\datasets\tasks\text_classification.py", line 22, in align_with_features
raise ValueError(f"Column {self.label_column} is not a ClassLabel.")
ValueError: Column review_sentiment is not a ClassLabel.
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Hi! I think this is a reasonable solution. Would you be interested in submitting a PR? | [
-0.30294740200042725,
-0.02238108217716217,
-0.007900869473814964,
0.27841848134994507,
0.04747239127755165,
0.0910637304186821,
0.4126910865306854,
0.2915855348110199,
-0.2092212736606598,
-0.03551861643791199,
-0.2731928825378418,
0.08178993314504623,
-0.011083702556788921,
0.13023871183395386,
-0.16048872470855713,
0.07670483738183975,
0.1474226862192154,
-0.08985315263271332,
-0.09656168520450592,
0.20267952978610992,
-0.017200278118252754,
0.21734634041786194,
-0.12220072001218796,
-0.03424946963787079,
-0.2773225009441376,
-0.37570691108703613,
-0.2987944185733795,
0.2699897289276123,
0.024026833474636078,
-0.0822402760386467,
0.4878433346748352,
0.37967467308044434,
-0.3503599464893341,
0.6244824528694153,
-0.00011843802349176258,
0.15155130624771118,
0.0972118079662323,
0.009496333077549934,
-0.2661677896976471,
0.09607415646314621,
-0.31376296281814575,
-0.0023348331451416016,
-0.2756499946117401,
-0.1757371574640274,
-0.06886974722146988,
0.12302394956350327,
-0.41851964592933655,
-0.22040289640426636,
0.1484028548002243,
0.24308347702026367,
0.10377523303031921,
0.00045577622950077057,
-0.49932119250297546,
-0.0640961304306984,
0.010494440793991089,
0.25357291102409363,
-0.22226499021053314,
0.11761537194252014,
0.49024760723114014,
-0.07115299999713898,
0.2600264549255371,
0.35451340675354004,
-0.00934913381934166,
0.2315017580986023,
-0.04921826720237732,
-0.12209361046552658,
0.07247484475374222,
-0.09800451993942261,
-0.05923350155353546,
0.4250367283821106,
0.2362995743751526,
-0.3477702736854553,
-0.46994349360466003,
-0.5202530026435852,
0.16242948174476624,
0.014794176444411278,
0.36311429738998413,
0.010697206482291222,
-0.037740834057331085,
0.10765853524208069,
-0.2840100824832916,
0.04026622325181961,
-0.03446117788553238,
0.0064111873507499695,
-0.10375277698040009,
0.43704673647880554,
-0.008264534175395966,
0.1022193506360054,
-0.08514080941677094,
-0.11168956756591797,
0.12013427913188934,
-0.4067937731742859,
-0.7067835330963135,
-0.1079534962773323,
-0.049676407128572464,
-0.341122031211853,
-0.13030660152435303,
-0.18154996633529663,
0.31539732217788696,
0.2408171147108078,
0.08242148160934448,
0.060703881084918976,
0.012631786055862904,
-0.09725586324930191,
0.4210072457790375,
0.29027441143989563,
0.19097751379013062,
0.40642961859703064,
0.26388657093048096,
0.19310176372528076,
-0.058817919343709946,
-0.0015215128660202026,
0.12058024108409882,
-0.2742440700531006,
0.13083933293819427,
-0.1646212339401245,
0.23042304813861847,
-0.17569410800933838,
-0.37292832136154175,
0.06822537630796432,
-0.2918047606945038,
0.058104902505874634,
0.2049405574798584,
0.2656727731227875,
0.047772955149412155,
0.10153806954622269,
-0.10444634407758713,
0.3402908444404602,
-0.1372677981853485,
-0.10812675207853317,
-0.15691335499286652,
-0.14111347496509552,
-0.070014089345932,
0.11362706869840622,
0.2755240201950073,
0.05651902034878731,
0.28145331144332886,
0.2408474236726761,
0.22184276580810547,
-0.378208190202713,
0.1672673374414444,
-0.10321526229381561,
0.1521044671535492,
0.09522119909524918,
-0.10524831712245941,
0.38632750511169434,
0.06714776903390884,
-0.2995522916316986,
-0.29128822684288025,
-0.0780433639883995,
-0.09854058176279068,
-0.22279642522335052,
0.2447563111782074,
0.08734250068664551,
-0.3716716170310974,
0.05698850750923157,
-0.012325949966907501,
0.31940358877182007,
-0.04265349358320236,
0.03953750059008598,
0.004407830536365509,
-0.34046995639801025,
-0.04738398268818855,
0.037430718541145325,
0.05000441521406174,
0.3237130641937256,
-0.3583018481731415,
-0.18152520060539246,
0.0657571330666542,
-0.21654610335826874,
-0.13675877451896667,
0.14903046190738678,
-0.15584947168827057,
0.42019593715667725,
-0.11621874570846558,
-0.04432879760861397,
0.3490850031375885,
-0.508638858795166,
-0.3181789815425873,
0.3312610387802124,
0.2739675045013428,
0.5006310343742371,
0.16337062418460846,
-0.20708444714546204,
-0.08359388262033463,
-0.23928731679916382,
0.22696274518966675,
0.2723633050918579,
-0.13612963259220123,
0.25166982412338257,
-0.2128518670797348,
0.08108443021774292,
0.2277229130268097,
0.012970924377441406,
0.08957242965698242,
-0.09286085516214371,
-0.2578110694885254,
-0.22394409775733948,
0.4652453362941742,
-0.20627495646476746,
0.23446223139762878,
0.2924785614013672,
0.09512890875339508,
0.08256068825721741,
0.037674713879823685,
-0.1378660351037979,
-0.5247583389282227,
0.35784533619880676,
0.17264308035373688,
0.011291906237602234,
0.053374625742435455,
-0.1032719835639,
-0.25574150681495667,
0.05118735134601593,
-0.426187127828598,
-0.32721513509750366,
0.09827578067779541,
0.253141313791275,
-0.03260829672217369,
-0.4232892394065857,
0.050733696669340134,
0.30906417965888977,
-0.006415907293558121,
-0.051514312624931335,
0.12068943679332733,
0.1881147027015686,
0.0705747976899147,
-0.10051732510328293,
-0.0875592827796936,
0.10870195180177689,
0.08519020676612854,
-0.3111230432987213,
-0.21870675683021545,
0.39548370242118835,
0.05662901699542999,
-0.2038026601076126,
0.1014162003993988,
0.10244999825954437,
0.2254587560892105,
-0.08249424397945404,
-0.0491158589720726,
-0.08166936039924622,
0.04001569747924805,
-0.30917808413505554,
-0.35690414905548096,
0.38244473934173584,
0.06042828410863876,
0.4350970685482025,
-0.12450483441352844,
0.021071752533316612,
0.3688424825668335,
-0.1712431013584137,
-0.2754276692867279,
-0.017534546554088593,
0.18711447715759277,
-0.24341793358325958,
-0.061730243265628815,
0.08539225906133652,
-0.3521660268306732,
0.262542724609375,
0.08992883563041687,
-0.030741184949874878,
-0.1323876678943634,
-0.1799335777759552,
0.06876052170991898,
0.0751698836684227,
0.19443242251873016,
0.42690804600715637,
0.5369592308998108,
0.007716989144682884,
-0.04517574980854988,
0.13759714365005493,
-0.28347286581993103,
-0.049411479383707047,
0.20051854848861694,
0.15927129983901978,
0.316822350025177,
0.3332633674144745,
0.1119963601231575,
-0.2297208309173584,
0.14488190412521362,
-0.29987475275993347,
0.3413277268409729,
0.08635950833559036,
-0.6140109300613403,
0.20784582197666168,
-0.1691744476556778,
-0.12081652879714966,
-0.2746560573577881,
-0.23959992825984955,
-0.1957550197839737,
-0.3629877269268036,
0.11780692636966705,
0.13587601482868195,
-0.2514084279537201,
0.3278820812702179,
-0.11392238736152649,
0.22041292488574982,
-0.21731090545654297,
-0.2574416399002075,
-0.21695466339588165,
-0.14543397724628448,
-0.32382306456565857,
-0.037541091442108154,
0.3051351010799408,
0.1980976164340973,
0.1414935290813446,
0.054991237819194794,
-0.45136815309524536,
-0.23185548186302185,
-0.23729968070983887,
0.27718058228492737,
-0.12472391128540039,
0.6841238141059875,
0.16233918070793152,
-0.07313552498817444,
0.016349971294403076,
0.020333778113126755,
0.348846435546875,
0.39639854431152344,
-0.08512945473194122,
0.032774753868579865,
-0.031254541128873825,
-0.19580374658107758,
-0.18461918830871582,
-0.41656777262687683,
-0.05452672392129898,
-0.06304634362459183,
-0.10725678503513336,
-0.19681178033351898,
-0.0383167639374733,
0.507735013961792,
0.23199398815631866,
-0.2083609700202942,
0.15657362341880798,
0.21413224935531616,
0.010869170539081097,
-0.35761597752571106,
0.18333639204502106,
-0.20416131615638733,
-0.07767495512962341,
-0.3424185514450073,
-0.18814782798290253,
0.13390277326107025,
0.1506783813238144,
-0.1775297075510025,
0.10523650795221329,
-0.0675475224852562,
0.24764585494995117,
-0.04864706099033356,
-0.35507598519325256,
-0.060225337743759155,
-0.005551348906010389,
0.10983450710773468,
-0.4448879361152649,
-0.2285103052854538,
0.3637837767601013,
-0.29598286747932434,
0.45867013931274414,
-0.14842119812965393,
-0.07053431123495102,
-0.13339415192604065,
0.23468782007694244,
0.3427053391933441,
0.140370175242424,
-0.0030405521392822266,
0.11336252838373184,
0.43805545568466187,
0.11737431585788727,
-0.2728126645088196,
0.08221817016601562,
0.26453834772109985,
-0.1485050916671753,
0.06231708824634552,
0.12721973657608032,
0.00529232993721962,
0.15262363851070404,
0.33951082825660706,
-0.005649205297231674,
-0.3147982656955719,
0.2126520872116089,
-0.254329115152359,
-0.08115681260824203,
0.10507242381572723,
-0.08086257427930832,
0.006275450810790062,
0.131730854511261,
0.06777364015579224,
0.282659649848938,
-0.4461374580860138,
-0.06187594309449196,
-0.3719719350337982,
-0.3061441481113434,
-0.221865713596344,
-0.015830084681510925,
0.15920017659664154,
0.2542322874069214,
-0.11193621903657913,
0.08349824696779251,
-0.03799106180667877,
-0.05268380790948868,
0.7994440793991089,
-0.492439866065979,
0.15295280516147614,
0.673557698726654,
0.028424225747585297,
-0.22087863087654114,
-0.4287688732147217,
-0.49351248145103455,
0.16777856647968292,
0.8473813533782959,
0.6940190196037292,
-0.2710752785205841,
-0.36370500922203064,
0.08224336802959442,
-0.09520605206489563,
-0.26247912645339966,
-0.2851734161376953,
0.025146786123514175,
-0.5268335938453674,
-0.07737290114164352,
-0.005302213132381439,
0.15002407133579254,
0.24720145761966705,
-0.14551876485347748,
-0.1355331391096115,
0.023839829489588737,
0.1496885120868683,
0.01437368243932724,
0.137516051530838,
0.13102345168590546,
0.1364269256591797,
0.4778844714164734,
-0.116569384932518,
0.25825953483581543,
0.3476444482803345,
0.3731439411640167,
0.03129032626748085,
-0.03881599009037018,
-0.12525781989097595,
-0.19249139726161957,
0.18733394145965576,
0.2369605153799057,
0.10725174099206924,
-0.10137509554624557,
-0.1201166957616806,
0.19387689232826233,
0.008181506767868996,
0.3628070056438446,
0.3493698239326477,
0.15325956046581268,
-0.5413298606872559,
-0.4839423596858978,
0.1904551386833191,
0.08920833468437195,
-0.27653300762176514,
0.7664533853530884,
-0.17526833713054657,
-0.4139542877674103,
0.2061002105474472,
-0.014302186667919159,
0.4774814248085022,
0.19909900426864624,
-0.06460152566432953,
0.4362499415874481,
-0.22147440910339355,
0.0701952874660492,
-0.13366413116455078,
0.13726705312728882,
-0.24148625135421753,
-0.036574576050043106,
0.250306636095047,
-0.09620854258537292,
0.1715114414691925,
0.20199744403362274,
-0.19593003392219543,
0.13778479397296906,
-0.1144411712884903,
-0.2526431679725647,
-0.08138792216777802,
-0.18015998601913452,
-0.18497250974178314,
-0.16941353678703308,
-0.17123405635356903,
0.09656955301761627,
-0.04758705943822861,
-0.07668270170688629,
-0.07638916373252869,
0.029429705813527107,
-0.34364053606987,
0.14512252807617188,
-0.33797186613082886,
0.08286643773317337,
0.04177199304103851,
0.06509771198034286,
0.3799169659614563,
-0.2006126493215561,
0.09379863739013672,
-0.09765690565109253,
0.2877299189567566,
0.04540073126554489,
-0.10428079962730408,
0.44819211959838867,
-0.04319322854280472,
0.19420190155506134,
0.11845072358846664,
-0.12950098514556885,
0.4238022565841675,
0.16334733366966248,
-0.38506656885147095,
-0.3049914836883545,
-0.2544783353805542,
0.06539265811443329,
0.0836789458990097,
-0.3945302963256836,
-0.08254265785217285,
-0.36229828000068665,
0.2802731990814209,
0.18204590678215027,
0.3202376365661621,
-0.3893996775150299,
0.05504167824983597,
-0.08140058815479279,
-0.2394430935382843,
0.555970311164856,
-0.2737073600292206,
-0.28880488872528076,
-0.057047318667173386,
-0.11125100404024124,
-0.1639154851436615,
0.12358333170413971,
0.47870343923568726,
0.15415312349796295,
0.20568037033081055,
-0.2514577805995941,
0.35785213112831116,
0.1977171152830124,
0.10243842750787735,
0.3788062036037445,
-0.13461799919605255,
-0.20568011701107025,
-0.08177836984395981,
0.5105408430099487,
0.24028216302394867,
0.13436393439769745,
0.10581307113170624,
-0.18847736716270447,
0.03669246286153793,
-0.1389889121055603,
0.17428380250930786,
0.40131592750549316,
-0.23716247081756592,
0.1476311832666397,
-0.012832626700401306,
0.12030772864818573,
-0.23142218589782715,
-0.21918056905269623,
-0.3880561888217926,
0.0035209301859140396,
-0.035787034779787064,
0.41874343156814575,
0.07366735488176346,
0.05696853622794151,
0.03600114583969116,
-0.16242548823356628,
0.06139282509684563,
-0.15606263279914856,
-0.33054518699645996,
0.15753263235092163,
0.14704260230064392,
0.017397504299879074,
0.10641789436340332,
0.13302798569202423,
0.050953105092048645,
-0.26003119349479675,
0.1326448768377304,
0.04381674528121948,
0.13220302760601044,
0.19757211208343506,
-0.16148242354393005,
-0.130599707365036,
-0.08450743556022644,
0.06591498106718063,
0.1410742551088333,
-0.08063589036464691,
0.06744788587093353,
0.35670724511146545,
0.025442952290177345,
-0.06159461662173271,
-0.15436924993991852,
0.15116538107395172,
-0.2891048192977905,
0.14197714626789093,
0.15071412920951843,
-0.33874398469924927,
0.2733452618122101,
0.42923781275749207,
0.3980385661125183,
0.45599639415740967,
-0.2838955819606781,
0.0529305562376976,
0.13076528906822205,
0.1807517111301422,
0.0399647131562233,
-0.021631237119436264,
0.15172913670539856,
-0.02377920225262642,
0.016780313104391098,
0.3494323492050171,
-0.22614410519599915,
-0.23735888302326202,
0.17031589150428772,
-0.11877621710300446,
0.448103129863739,
-0.08232814818620682,
0.25575003027915955,
0.1291850209236145,
-0.23470580577850342,
0.07069848477840424,
0.5356854200363159,
-0.1439708024263382,
0.2502623498439789,
0.1384826898574829,
0.2817561626434326,
0.06920953840017319,
-0.1088687852025032,
0.0037017352879047394,
-0.15493157505989075,
-0.17275752127170563,
0.21193580329418182,
0.00041562318801879883,
-0.17702794075012207,
-0.010149329900741577,
0.07378562539815903,
0.4655272960662842,
-0.5435712933540344,
-0.4389743506908417,
0.008942091837525368,
0.058752041310071945,
-0.007092557847499847,
-0.1409931182861328,
-0.6827965378761292,
-0.19716301560401917,
0.03138841688632965,
0.1528775542974472,
-0.01027260348200798,
0.009534917771816254,
0.37494006752967834,
-0.025792330503463745,
-0.24065159261226654,
-0.7254043221473694,
0.2568790018558502,
0.053037047386169434,
0.11422387510538101,
-0.3785347640514374,
0.051566820591688156,
0.05876700580120087,
-0.38976871967315674,
0.2913079261779785,
0.473924845457077,
0.5683947801589966,
0.09446381032466888,
0.4471369683742523,
-0.32132723927497864,
-0.13413311541080475,
-0.06806561350822449,
0.005931610241532326,
0.19575358927249908,
0.12373273074626923,
-0.2245982438325882,
0.471495658159256,
0.08197536319494247,
-0.020407509058713913,
0.08720177412033081,
0.292571097612381,
0.11291816830635071,
-0.3001949191093445,
0.2867952287197113,
-0.04124294966459274,
-0.12891505658626556,
0.08425372838973999,
-0.19267040491104126,
-0.13947179913520813,
0.05625130236148834,
0.29485630989074707,
0.03138221055269241,
0.2712312936782837,
-0.09173458814620972,
0.06634096056222916,
0.2238904982805252,
0.47943854331970215,
-0.15532788634300232,
-0.45963457226753235,
-0.286092609167099,
-0.09414677321910858,
-0.5416746735572815,
-0.20735183358192444,
-0.16065667569637299,
-0.043496038764715195,
0.22205589711666107,
0.2730088233947754,
0.03751217573881149,
-0.12538371980190277,
0.3400004506111145,
0.2281753271818161,
0.2344316989183426,
0.09209892153739929,
-0.5376959443092346,
-0.281800240278244,
0.1377544105052948,
0.11376465111970901,
0.2871457636356354,
-0.22940358519554138,
0.045601986348629,
0.26715606451034546,
-0.08008400350809097,
0.1593988537788391,
-0.1964317411184311,
0.33772292733192444,
-0.41770222783088684,
0.14139634370803833,
0.2331722378730774,
0.48351964354515076,
0.2029017210006714,
-0.047514885663986206,
-0.3638101816177368,
-0.2828819453716278,
-0.3068445920944214,
-0.09993434697389603,
-0.3041667342185974,
0.30564215779304504,
-0.2672106921672821,
0.17745333909988403,
-0.13446302711963654,
-0.1141609326004982,
0.11268223822116852,
-0.09533273428678513,
-0.04007153958082199,
0.1301737129688263,
-0.05452629551291466,
0.13949641585350037,
0.15021991729736328,
0.19984689354896545,
-0.13408681750297546,
0.28425273299217224,
-0.32294178009033203,
-0.24708232283592224,
0.40658846497535706,
-0.019005747511982918,
-0.3879238963127136,
0.016935281455516815,
0.13802041113376617,
0.0448787659406662,
0.005428901873528957,
-0.22432297468185425,
-0.04250071942806244,
0.4385403096675873,
-0.035499170422554016,
-0.1839331090450287,
0.2760704755783081,
0.13236401975154877,
-0.02316749095916748,
0.06996025145053864,
-0.047732144594192505,
0.06623825430870056,
-0.3423503339290619,
0.2695068120956421,
0.11304938793182373
] |
https://github.com/huggingface/datasets/issues/4750 | Easily create loading script for benchmark comprising multiple huggingface datasets | Hi ! I think the simplest is to copy paste the `_split_generators` code from the other datasets and do a bunch of if-else, as in the glue dataset: https://huggingface.co/datasets/glue/blob/main/glue.py#L467 | Hi,
I would like to create a loading script for a benchmark comprising multiple huggingface datasets.
The function _split_generators needs to return the files for the respective dataset. However, the files are not always in the same location for each dataset. I want to just make a wrapper dataset that provides a single interface to all the underlying datasets.
I thought about downloading the files with the load_dataset function and then providing the link to the cached file. But this seems a bit inelegant to me. What approach would you propose to do this?
Please let me know if you have any questions.
Cheers,
Joel | 29 | Easily create loading script for benchmark comprising multiple huggingface datasets
Hi,
I would like to create a loading script for a benchmark comprising multiple huggingface datasets.
The function _split_generators needs to return the files for the respective dataset. However, the files are not always in the same location for each dataset. I want to just make a wrapper dataset that provides a single interface to all the underlying datasets.
I thought about downloading the files with the load_dataset function and then providing the link to the cached file. But this seems a bit inelegant to me. What approach would you propose to do this?
Please let me know if you have any questions.
Cheers,
Joel
Hi ! I think the simplest is to copy paste the `_split_generators` code from the other datasets and do a bunch of if-else, as in the glue dataset: https://huggingface.co/datasets/glue/blob/main/glue.py#L467 | [
-0.28242307901382446,
-0.36613157391548157,
-0.012129168026149273,
0.3533135652542114,
-0.1201755553483963,
-0.058816585689783096,
0.2566535770893097,
0.38626936078071594,
0.6584388613700867,
0.150325208902359,
-0.1860688030719757,
-0.11190982162952423,
-0.12338083237409592,
0.5508994460105896,
0.36171141266822815,
-0.27301427721977234,
-0.02894672006368637,
0.2997760772705078,
-0.06717739999294281,
0.1836167573928833,
-0.20267634093761444,
0.15959535539150238,
0.20723862946033478,
-0.11625351011753082,
-0.16749942302703857,
0.2264072746038437,
-0.22461359202861786,
0.10290596634149551,
0.09160469472408295,
-0.16654379665851593,
0.40162143111228943,
0.6279938220977783,
-0.01202261634171009,
0.43557503819465637,
-0.00012262609379831702,
0.07808512449264526,
-0.007519766688346863,
-0.2331928312778473,
-0.08031025528907776,
-0.17011506855487823,
0.08725779503583908,
-0.013031533919274807,
0.2012692242860794,
-0.15844693779945374,
-0.183664470911026,
-0.024049285799264908,
0.036131665110588074,
-0.8254760503768921,
0.4756590723991394,
-0.1411750614643097,
0.020096372812986374,
0.4317253828048706,
-0.545373260974884,
0.05915360897779465,
0.2557108700275421,
0.05284935235977173,
0.10085155814886093,
0.0929248183965683,
0.4305119812488556,
-0.2981244623661041,
-0.1603105366230011,
0.1366201490163803,
-0.14882004261016846,
-0.08822265267372131,
0.39404186606407166,
-0.06865882128477097,
-0.31251007318496704,
-0.2811461389064789,
-0.11644279211759567,
0.333711177110672,
0.12656170129776,
-0.35511747002601624,
-0.41648685932159424,
-0.45070144534111023,
-0.1180814579129219,
-0.2808382511138916,
-0.08210376650094986,
0.13642604649066925,
0.0348646342754364,
0.0769309550523758,
-0.2225223183631897,
-0.05219139903783798,
-0.07891033589839935,
-0.168415367603302,
0.14095377922058105,
-0.22407087683677673,
-0.07613130658864975,
0.12074561417102814,
0.28723058104515076,
0.2688744068145752,
0.02576105296611786,
-0.17410755157470703,
0.1361050307750702,
0.07375293225049973,
-0.1710396707057953,
0.046160630881786346,
-0.006083153188228607,
0.24457362294197083,
0.4332430362701416,
0.5069093108177185,
0.23328545689582825,
0.10249464958906174,
0.11236711591482162,
0.023478958755731583,
0.01553268264979124,
0.18807266652584076,
0.19571740925312042,
-0.18105903267860413,
0.14882832765579224,
0.14831653237342834,
-0.19922342896461487,
-0.13047266006469727,
-0.05821016803383827,
-0.04605790972709656,
-0.17045935988426208,
0.09275373816490173,
-0.1268623024225235,
-0.053160425275564194,
-0.09912741184234619,
-0.1214761957526207,
0.29496562480926514,
-0.19837932288646698,
0.11707639694213867,
0.35562485456466675,
0.019111860543489456,
0.2976806163787842,
0.09659403562545776,
0.30522096157073975,
-0.2562073767185211,
-0.31677040457725525,
-0.1513245701789856,
0.12006424367427826,
-0.21703238785266876,
0.5009307265281677,
0.129913330078125,
-0.28309115767478943,
0.1677960902452469,
-0.04186607897281647,
0.10208199918270111,
-0.26734864711761475,
0.3259744644165039,
0.01793300174176693,
0.14700201153755188,
-0.0627354085445404,
0.48650625348091125,
0.011419320479035378,
0.20125067234039307,
-0.029983755201101303,
-0.4356796145439148,
-0.3019343614578247,
-0.0733313038945198,
-0.3173871636390686,
0.20789718627929688,
-0.0075843436643481255,
-0.23804889619350433,
0.35115668177604675,
-0.3223536014556885,
0.2428262084722519,
-0.07249922305345535,
-0.21174204349517822,
-0.09317115694284439,
0.13129383325576782,
-0.5220097899436951,
-0.2615678906440735,
0.3539239466190338,
0.7845141291618347,
-0.1496274471282959,
-0.26375120878219604,
0.0498337596654892,
-0.2981979548931122,
-0.27321988344192505,
0.1230313628911972,
-0.1296929121017456,
0.2370505928993225,
-0.43518388271331787,
0.0075973570346832275,
0.15802216529846191,
-0.43323472142219543,
-0.26447343826293945,
0.3553316295146942,
-0.3208710551261902,
0.35467055439949036,
0.5620773434638977,
0.2946081757545471,
0.20246872305870056,
-0.2418336123228073,
0.013338424265384674,
0.40566229820251465,
-0.06362403184175491,
0.21932652592658997,
0.06936201453208923,
-0.11266398429870605,
0.13350817561149597,
0.2489476352930069,
-0.055142227560281754,
-0.07530894130468369,
-0.013147331774234772,
-0.40467995405197144,
0.2833992540836334,
-0.11935842037200928,
0.0745200663805008,
0.1736190766096115,
-0.24456577003002167,
0.20532307028770447,
-0.1665465533733368,
-0.0064428821206092834,
-0.6796053647994995,
0.2900703549385071,
-0.20855535566806793,
-0.28409403562545776,
0.14562031626701355,
-0.439170241355896,
-0.15192362666130066,
-0.10844603925943375,
-0.17400935292243958,
0.011542247608304024,
-0.043761178851127625,
0.2957998514175415,
0.2588450312614441,
-0.04096848890185356,
-0.4101487696170807,
0.4274016320705414,
0.266613245010376,
0.09399867057800293,
-0.555057942867279,
0.3912065625190735,
0.26526227593421936,
0.01934238150715828,
0.24628767371177673,
0.10384497791528702,
0.006941597908735275,
-0.4122335612773895,
0.2661330997943878,
0.27931562066078186,
0.32675808668136597,
0.3485839366912842,
0.35651588439941406,
0.215115487575531,
0.004063669592142105,
0.008067850023508072,
0.15183424949645996,
-0.18383213877677917,
-0.18788950145244598,
-0.3068297803401947,
-0.08683864027261734,
0.7007615566253662,
-0.15570224821567535,
0.4251328706741333,
0.08617527782917023,
-0.06025487929582596,
-0.05511689931154251,
-0.2905580997467041,
-0.20489780604839325,
-0.09793456643819809,
0.35962945222854614,
0.009734461084008217,
0.6312618255615234,
0.0769728422164917,
-0.038860954344272614,
0.2725231945514679,
0.1337370127439499,
-0.07685714960098267,
-0.0010585784912109375,
-0.010049879550933838,
-0.008179493248462677,
-0.022733766585588455,
-0.14062859117984772,
0.226122185587883,
0.31871506571769714,
0.1408754587173462,
0.07404061406850815,
0.021389007568359375,
0.17382510006427765,
-0.11336488276720047,
0.14323438704013824,
-0.18765564262866974,
-0.09648866206407547,
0.24902105331420898,
-0.2995546758174896,
-0.26443108916282654,
-0.10935349762439728,
-0.02582097053527832,
-0.11670306324958801,
-0.3494933247566223,
-0.296148419380188,
0.07924652099609375,
0.02184121496975422,
-0.3122144043445587,
-0.3077744245529175,
-0.21179094910621643,
-0.2902931571006775,
-0.20502808690071106,
-0.006509508937597275,
0.08475172519683838,
0.11737145483493805,
0.057264544069767,
-0.036287542432546616,
0.6561912298202515,
-0.29672256112098694,
-0.08412960916757584,
-0.05571051687002182,
-0.23906807601451874,
0.017941800877451897,
-0.10947652161121368,
0.32473278045654297,
0.21499355137348175,
0.40322378277778625,
-0.35451942682266235,
0.09552160650491714,
-0.13587501645088196,
0.19601640105247498,
0.21790754795074463,
-0.029338188469409943,
0.08800926804542542,
0.2962524890899658,
0.2353208065032959,
0.28466713428497314,
-0.1892377734184265,
0.01594552956521511,
-0.202259361743927,
-0.09986754506826401,
-0.11804389953613281,
0.032230306416749954,
0.06488818675279617,
-0.028854448348283768,
0.03664539009332657,
-0.1891072690486908,
-0.09592321515083313,
0.29755735397338867,
-0.1623319536447525,
0.19795294106006622,
-0.31428247690200806,
0.054334018379449844,
-0.1020406037569046,
-0.32794058322906494,
-0.018128208816051483,
-0.0672878548502922,
-0.592998743057251,
0.08418212831020355,
-0.229793518781662,
-0.1206178069114685,
-0.021745365113019943,
-0.06574831902980804,
0.3469570577144623,
0.01942920871078968,
-0.40499454736709595,
-0.18650341033935547,
0.13650201261043549,
-0.10247737914323807,
0.07341142743825912,
0.19112443923950195,
0.08606734871864319,
0.03826131299138069,
0.1776605099439621,
-0.1451859325170517,
-0.018945157527923584,
0.18842312693595886,
-0.5863243937492371,
-0.008657626807689667,
0.027640122920274734,
0.20038896799087524,
-0.13182556629180908,
0.5527688264846802,
0.37530291080474854,
0.021718742325901985,
0.14673461019992828,
-0.2245507538318634,
0.4551108479499817,
0.023543424904346466,
-0.30703863501548767,
-0.20364949107170105,
-0.1295434534549713,
-0.05370812490582466,
0.2159227430820465,
-0.023698490113019943,
0.41561147570610046,
-0.41359764337539673,
-0.12073579430580139,
0.026991933584213257,
-0.3357490599155426,
0.13495999574661255,
-0.051145486533641815,
-0.0018149390816688538,
-0.08153578639030457,
-0.07976621389389038,
-0.2729525566101074,
0.16164535284042358,
0.15145502984523773,
0.33945369720458984,
0.5510486364364624,
0.04062284529209137,
-0.4037781357765198,
0.21168771386146545,
-0.2769327461719513,
0.3475523591041565,
0.20499062538146973,
-0.340254008769989,
0.10180895030498505,
-0.015726951882243156,
-0.09215205907821655,
-0.0033744359388947487,
0.7163480520248413,
0.0025662463158369064,
0.03470022231340408,
-0.007811591029167175,
-0.26370400190353394,
-0.47554874420166016,
0.08452704548835754,
0.18196766078472137,
0.22653837502002716,
0.004681209102272987,
0.37220701575279236,
-0.4051670432090759,
-0.3658214211463928,
0.024584075435996056,
0.30686283111572266,
-0.30085673928260803,
-0.3234518766403198,
-0.4636210501194,
-0.08791026473045349,
0.0031219851225614548,
-0.10900478810071945,
-0.1090003028512001,
-0.08970828354358673,
-0.22513055801391602,
-0.1350710093975067,
0.02951948717236519,
-0.14595219492912292,
0.2091093510389328,
0.02103559300303459,
0.3817359209060669,
-0.02844359166920185,
0.26043567061424255,
0.4149809777736664,
-0.022642754018306732,
-0.12172061204910278,
0.5399349927902222,
-0.5965875387191772,
-0.0584903210401535,
-0.11164280027151108,
0.23963934183120728,
0.4027329683303833,
0.4133214056491852,
0.04133232310414314,
0.11524008214473724,
-0.059587858617305756,
0.003368087112903595,
-0.4813876152038574,
0.14018532633781433,
-0.11010786890983582,
-0.22266945242881775,
-0.19735659658908844,
-0.6658390760421753,
0.6127519607543945,
0.2716566324234009,
-0.048341069370508194,
0.5934616327285767,
0.2602253556251526,
-0.213655486702919,
0.2601931095123291,
-0.02612888813018799,
0.9779490828514099,
-0.38588541746139526,
0.3928912878036499,
0.08041685074567795,
0.07901905477046967,
0.3423265218734741,
-0.23501364886760712,
0.09834666550159454,
-0.44921889901161194,
-0.5017977356910706,
-0.16027548909187317,
-0.19730326533317566,
-0.34197673201560974,
0.14793658256530762,
-0.12055382132530212,
0.4385487735271454,
-0.042976438999176025,
-0.07553668320178986,
-0.19621504843235016,
0.37937647104263306,
-0.33665305376052856,
-0.16726312041282654,
-0.023444514721632004,
-0.05181907117366791,
-0.10349641740322113,
0.3919268250465393,
-0.0307201836258173,
-0.16429278254508972,
0.11800913512706757,
-0.10723108798265457,
-0.054403845220804214,
0.0864122286438942,
-0.32255327701568604,
-0.027231786400079727,
-0.15360791981220245,
0.047199904918670654,
-0.16903840005397797,
0.15541291236877441,
0.10611005872488022,
-0.09317238628864288,
0.027179323136806488,
-0.045308392494916916,
-0.11855477839708328,
-0.24341796338558197,
-0.20752397179603577,
-0.19373738765716553,
0.11136998236179352,
0.18915343284606934,
-0.19680625200271606,
-0.03473220765590668,
0.10829752683639526,
-0.07598169147968292,
-0.0032660961151123047,
0.027740206569433212,
-0.03356247395277023,
-0.3145769536495209,
-0.12200446426868439,
0.13140451908111572,
0.1652926802635193,
-0.04298261180520058,
-0.022692326456308365,
0.2590080797672272,
-0.043158382177352905,
0.08182655274868011,
-0.2489749938249588,
-0.0788125991821289,
-0.004402119666337967,
0.26853859424591064,
-0.20971348881721497,
-0.38173970580101013,
0.11961620301008224,
0.34433016180992126,
0.03058570623397827,
-0.1712208390235901,
-0.04837338998913765,
0.6986209154129028,
-0.23527878522872925,
0.27683374285697937,
-0.32927486300468445,
0.05692698061466217,
-0.022198673337697983,
0.20442278683185577,
0.3355724811553955,
0.05666140094399452,
0.2735166549682617,
-0.2918565273284912,
-0.1508142650127411,
0.3142551779747009,
0.13398517668247223,
0.38595929741859436,
0.16513115167617798,
-0.1737709641456604,
-0.059644393622875214,
0.33850544691085815,
-0.19645234942436218,
-0.005498756654560566,
0.20082828402519226,
-0.2808515429496765,
0.3845917284488678,
-0.02135792374610901,
0.22616738080978394,
0.09193301200866699,
-0.05267147719860077,
-0.05530863255262375,
-0.3240303099155426,
-0.006633684039115906,
-0.23801076412200928,
0.20338158309459686,
-0.15795472264289856,
0.08329872041940689,
-0.0015523601323366165,
-0.016856640577316284,
0.08532899618148804,
-0.4478093385696411,
0.26002639532089233,
0.2667286992073059,
-0.03643394261598587,
-0.1529906839132309,
0.15974238514900208,
-0.03215301036834717,
-0.4103674292564392,
0.12027911096811295,
0.017313674092292786,
0.24063712358474731,
0.08791835606098175,
0.10489945113658905,
-0.23245660960674286,
-0.1633516550064087,
0.29765018820762634,
0.25669780373573303,
0.6456506252288818,
0.08793051540851593,
0.17740431427955627,
0.07956714928150177,
-0.1267845779657364,
0.1767035871744156,
0.44889509677886963,
0.4612429440021515,
-0.2509971559047699,
0.34367635846138,
-0.18362566828727722,
0.0418383851647377,
-0.058978594839572906,
-0.10598618537187576,
0.2209334671497345,
0.018110956996679306,
-0.04805765673518181,
0.5386053919792175,
0.35081249475479126,
0.05505762994289398,
0.1323101669549942,
-0.10216451436281204,
0.41767027974128723,
0.18776065111160278,
0.11729006469249725,
-0.014164488762617111,
0.19317026436328888,
-0.06079163774847984,
0.14860698580741882,
0.38312605023384094,
0.38905367255210876,
-0.1743992567062378,
-0.23098281025886536,
0.5297011733055115,
-0.516414999961853,
0.08804044872522354,
-0.12748074531555176,
-0.34951603412628174,
-0.06251753866672516,
0.2226102352142334,
-0.03469717502593994,
0.12726861238479614,
-0.2501102685928345,
0.6432760953903198,
-0.45455294847488403,
0.023430922999978065,
-0.20234425365924835,
0.529958963394165,
0.26317110657691956,
-0.20485350489616394,
-0.002445962280035019,
-0.017842702567577362,
-0.2763059139251709,
0.07256193459033966,
0.2473730742931366,
-0.12059716880321503,
0.07546486705541611,
0.17803418636322021,
0.4231105446815491,
0.3972291052341461,
-0.35132643580436707,
0.3571864366531372,
0.2865472733974457,
-0.2917909026145935,
-0.03425268828868866,
0.5383429527282715,
0.10796687752008438,
0.2664813995361328,
-0.04757910966873169,
0.30671489238739014,
-0.014918431639671326,
-0.1794130653142929,
0.050640836358070374,
-0.0350368395447731,
0.08103666454553604,
-0.04804060608148575,
-0.14170923829078674,
-0.3066146969795227,
-0.09812882542610168,
0.3596930503845215,
0.06126388907432556,
-0.023087814450263977,
-0.06663279235363007,
0.1289452612400055,
0.11461834609508514,
-0.22958709299564362,
0.1454704850912094,
-0.17004726827144623,
-0.011835012584924698,
-0.38218551874160767,
0.2137741893529892,
-0.558560848236084,
0.1363591104745865,
0.18361897766590118,
0.02535165473818779,
-0.0004932284355163574,
-0.030619222670793533,
0.016901124268770218,
0.1515127271413803,
0.43320077657699585,
0.16474466025829315,
0.2105550467967987,
-0.4713406562805176,
-0.5382185578346252,
-0.47570037841796875,
-0.038291119039058685,
-0.08105234801769257,
-0.17401742935180664,
-0.17801600694656372,
0.15138275921344757,
-0.043392591178417206,
0.02610129304230213,
0.016247078776359558,
0.05707390978932381,
0.2424446940422058,
-0.016707144677639008,
-0.2012138068675995,
-0.23045529425144196,
-0.16973432898521423,
0.033828556537628174,
0.16657531261444092,
-0.013088170439004898,
-0.13510377705097198,
0.12229245901107788,
-0.050086069852113724,
0.010688225738704205,
0.25875934958457947,
0.16475175321102142,
-0.2718409597873688,
0.20698994398117065,
-0.20765715837478638,
0.28841114044189453,
0.03716062009334564,
-0.15419653058052063,
-0.08211492002010345,
0.12985973060131073,
-0.09650616347789764,
-0.07495399564504623,
0.059225186705589294,
0.11748608946800232,
-0.3159284293651581,
-0.11702632904052734,
-0.5078742504119873,
-0.011601505801081657,
0.20758886635303497,
-0.03439680486917496,
-0.24793484807014465,
-0.019755184650421143,
-0.14531098306179047,
0.11851079761981964,
0.41826897859573364,
0.4706264138221741,
-0.15583832561969757,
0.34744885563850403,
-0.05481225624680519,
0.06681797653436661,
0.37748804688453674,
-0.16527816653251648,
-0.06463699787855148,
0.03455885872244835,
0.34437379240989685,
-0.05228205770254135,
-0.07371445745229721,
-0.39724794030189514,
0.26700323820114136,
0.13630259037017822,
0.11865660548210144,
-0.012963682413101196,
0.3000735342502594,
0.05706755444407463,
-0.06587504595518112,
0.00009188428521156311,
-0.043129079043865204,
0.42082318663597107,
-0.23983582854270935,
-0.02971438691020012,
-0.2212444692850113
] |
https://github.com/huggingface/datasets/issues/4746 | Dataset Viewer issue for yanekyuk/wikikey | The dataset is empty, as far as I can tell: there are no files in the repository at https://huggingface.co/datasets/yanekyuk/wikikey/tree/main
Maybe the viewer can display a better message for empty datasets | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 30 | Dataset Viewer issue for yanekyuk/wikikey
### Link
_No response_
### Description
_No response_
### Owner
_No response_
The dataset is empty, as far as I can tell: there are no files in the repository at https://huggingface.co/datasets/yanekyuk/wikikey/tree/main
Maybe the viewer can display a better message for empty datasets | [
-0.030399218201637268,
0.03358881175518036,
-0.027283184230327606,
0.2718106508255005,
0.08809173107147217,
0.10236532241106033,
0.18875958025455475,
0.31571274995803833,
-0.2368868738412857,
0.2281379997730255,
0.20766262710094452,
0.17036490142345428,
-0.012126083485782146,
0.18291975557804108,
-0.19418925046920776,
-0.044868528842926025,
-0.07572334259748459,
0.3604030907154083,
0.06617218255996704,
-0.2246558517217636,
-0.27454909682273865,
0.16559267044067383,
-0.3249428868293762,
0.15021035075187683,
-0.09700426459312439,
-0.22519895434379578,
-0.13459375500679016,
-0.08998339623212814,
-0.25941357016563416,
-0.5287377238273621,
0.2867414653301239,
0.07912202179431915,
-0.1300457864999771,
0.29416581988334656,
-0.00011065616854466498,
0.07613387703895569,
0.6115493178367615,
0.012422872707247734,
-0.15970486402511597,
0.03354746848344803,
0.020229637622833252,
-0.5215804576873779,
0.24986201524734497,
-0.35164332389831543,
-0.22535505890846252,
-0.10429969429969788,
0.11792337894439697,
0.18147368729114532,
0.17100000381469727,
0.2542518973350525,
0.2088826447725296,
0.20385560393333435,
0.23415274918079376,
-0.0551297552883625,
-0.00854898989200592,
0.1220819279551506,
-0.08541835099458694,
-0.21407629549503326,
0.10025844722986221,
0.09086233377456665,
-0.05264260619878769,
0.389688640832901,
-0.05043884366750717,
-0.11503973603248596,
0.3701394200325012,
-0.16664813458919525,
0.15972286462783813,
-0.5657947063446045,
0.19756314158439636,
0.30694425106048584,
0.785304844379425,
0.0527837909758091,
0.05517496168613434,
-0.3180358409881592,
0.12367498129606247,
0.18773843348026276,
0.28070154786109924,
0.3736746311187744,
-0.35472387075424194,
0.09032437950372696,
-0.08601552248001099,
-0.20546072721481323,
-0.2250673770904541,
0.11890637874603271,
-0.538604199886322,
0.47993436455726624,
0.0018897331319749355,
0.1679629385471344,
0.19648009538650513,
-0.3073810935020447,
0.1778002381324768,
-0.28440603613853455,
-0.3467992842197418,
0.1911667138338089,
-0.10491037368774414,
-0.14090168476104736,
0.4423658847808838,
0.3087449371814728,
0.2254999279975891,
-0.1144392341375351,
-0.3905636668205261,
0.030179902911186218,
-0.03599860891699791,
0.010608822107315063,
0.2841477692127228,
0.052539680153131485,
0.30873870849609375,
0.37461933493614197,
0.39939218759536743,
0.11095350235700607,
0.1700562983751297,
-0.03647006303071976,
-0.14529062807559967,
-0.26032137870788574,
-0.03841685503721237,
-0.011019229888916016,
0.32309216260910034,
-0.038512036204338074,
0.051451265811920166,
0.24468715488910675,
-0.2670295834541321,
0.1167772188782692,
0.043128881603479385,
0.32312408089637756,
-0.11980345100164413,
0.32564640045166016,
-0.059912487864494324,
0.1274094134569168,
-0.10838363319635391,
-0.130853071808815,
-0.09655237197875977,
-0.09126231074333191,
0.014767531305551529,
-0.3126928210258484,
0.12686368823051453,
-0.22361232340335846,
0.32298678159713745,
0.06434566527605057,
0.06664014607667923,
-0.10180895030498505,
0.03562955558300018,
-0.032703936100006104,
-0.1601656973361969,
0.42293545603752136,
0.13629429042339325,
0.13099217414855957,
0.1425500512123108,
-0.39938265085220337,
-0.08853906393051147,
0.32795450091362,
-0.28895220160484314,
-0.24086050689220428,
-0.06076359748840332,
0.23043720424175262,
-0.1651586890220642,
-0.05977669358253479,
-0.16498520970344543,
0.3138120472431183,
-0.27373215556144714,
-0.24787075817584991,
0.06622546911239624,
0.11805807799100876,
0.02459409460425377,
-0.2197084277868271,
0.23407518863677979,
0.46562302112579346,
-0.24688945710659027,
-0.11949315667152405,
-0.33614426851272583,
-0.19979090988636017,
-0.25652602314949036,
-0.04068382456898689,
-0.077463798224926,
0.13705651462078094,
-0.3404034674167633,
0.23594032227993011,
0.29512926936149597,
-0.43537211418151855,
-0.570769190788269,
0.41842585802078247,
-0.12361852824687958,
0.05922067165374756,
0.015111640095710754,
0.004146249499171972,
0.1139376163482666,
0.008187800645828247,
-0.1703336387872696,
-0.20008033514022827,
0.19468407332897186,
0.04310537874698639,
-0.23115502297878265,
-0.1330527663230896,
-0.2293253391981125,
0.006224535405635834,
0.4620886743068695,
-0.09968606382608414,
0.08748074620962143,
-0.188555046916008,
0.3497461676597595,
-0.10736474394798279,
0.2429046481847763,
0.34671270847320557,
0.3725712299346924,
0.16353312134742737,
-0.18355408310890198,
0.4359651505947113,
-0.24431657791137695,
0.2061324119567871,
-0.13829512894153595,
0.13101837038993835,
-0.300007164478302,
-0.35406947135925293,
-0.19006836414337158,
0.03895709663629532,
-0.54433673620224,
-0.30359867215156555,
0.23253914713859558,
-0.003706105053424835,
-0.1337404102087021,
0.6276460886001587,
0.1561492681503296,
-0.1605498194694519,
0.2222081869840622,
0.10762055963277817,
0.0060882968828082085,
0.24948112666606903,
-0.16856467723846436,
0.15515142679214478,
-0.003875505179166794,
0.06122312694787979,
0.3132573962211609,
0.03999760374426842,
0.10657908767461777,
0.12856461107730865,
-0.22920474410057068,
0.23522189259529114,
0.07785069942474365,
-0.12121932208538055,
0.23491241037845612,
-0.41459542512893677,
0.241677388548851,
0.32897642254829407,
0.10156109184026718,
-0.12700924277305603,
-0.3577193021774292,
0.30444347858428955,
0.0963539406657219,
0.24508017301559448,
-0.15439049899578094,
0.289763480424881,
0.22093269228935242,
-0.07881756871938705,
0.06008148193359375,
-0.04284478724002838,
0.05223967134952545,
0.09448516368865967,
0.2596743702888489,
-0.10139550268650055,
-0.5235588550567627,
0.055462583899497986,
0.14171338081359863,
-0.13646794855594635,
0.14313560724258423,
-0.019540518522262573,
-0.4260326027870178,
-0.025214334949851036,
0.327538400888443,
0.17434361577033997,
-0.096466064453125,
0.18397018313407898,
-0.1563805490732193,
0.10077416151762009,
0.14714908599853516,
-0.18514642119407654,
0.14816884696483612,
0.05012070760130882,
0.2964926064014435,
0.41389158368110657,
-0.010974325239658356,
-0.15501897037029266,
-0.330274373292923,
0.11402171850204468,
0.05042372643947601,
0.3044503629207611,
-0.16072458028793335,
-0.3556559979915619,
-0.060892559587955475,
-0.45076483488082886,
0.34833237528800964,
0.045709289610385895,
-0.3119402229785919,
-0.6343482732772827,
0.2031363993883133,
0.12376901507377625,
-0.0867343321442604,
0.09944527596235275,
-0.2446865737438202,
-0.023429885506629944,
0.11365629732608795,
0.1376497894525528,
-0.3357731103897095,
-0.3148099482059479,
-0.2582396864891052,
0.12971140444278717,
0.1843326985836029,
-0.12538361549377441,
0.14395900070667267,
-0.3196566104888916,
0.15477216243743896,
-0.4614158868789673,
-0.4496256113052368,
0.227913036942482,
-0.1954144686460495,
0.22819367051124573,
0.08324979245662689,
0.4151805639266968,
-0.2749292850494385,
-0.06586126238107681,
0.44197291135787964,
-0.019303269684314728,
-0.1850733608007431,
0.09842509776353836,
0.07527098059654236,
0.055296774953603745,
-0.023325636982917786,
-0.17003294825553894,
-0.35027647018432617,
-0.27956679463386536,
0.11011474579572678,
0.07659301161766052,
0.038303568959236145,
0.15013757348060608,
0.1875116527080536,
0.013558822683990002,
-0.051226940006017685,
-0.22018632292747498,
-0.093783900141716,
-0.26534610986709595,
0.4361421465873718,
-0.24362386763095856,
-0.44906240701675415,
0.4450792372226715,
-0.16444692015647888,
0.15815424919128418,
-0.3643069267272949,
-0.740048885345459,
0.02930956706404686,
0.06096161901950836,
0.5418444871902466,
0.08223646879196167,
-0.1463773548603058,
0.23476675152778625,
0.21981339156627655,
-0.01673836261034012,
-0.11824386566877365,
0.026619981974363327,
-0.10135000199079514,
-0.22732758522033691,
0.10392855852842331,
0.060779958963394165,
0.5633826851844788,
0.03352539613842964,
0.631787121295929,
0.23821893334388733,
0.39521104097366333,
0.24571478366851807,
-0.12736432254314423,
0.5266909599304199,
0.03179517015814781,
-0.16715995967388153,
-0.047644924372434616,
0.2212766706943512,
0.15508964657783508,
0.3326602876186371,
0.15198931097984314,
-0.24594800174236298,
-0.2630929946899414,
-0.47923827171325684,
-0.4770147204399109,
-0.38097503781318665,
-0.2407761663198471,
-0.107635498046875,
0.12197209894657135,
-0.006919717416167259,
0.20807969570159912,
-0.0809246301651001,
-0.158960223197937,
-0.000026203691959381104,
0.3647029995918274,
0.023046433925628662,
-0.06742352247238159,
-0.32972878217697144,
0.07693180441856384,
-0.6080732345581055,
0.2199433594942093,
-0.22768618166446686,
-0.158566415309906,
0.06320129334926605,
0.1610724925994873,
0.16242413222789764,
-0.10056604444980621,
0.586672842502594,
-0.29155200719833374,
0.14028358459472656,
0.009693548083305359,
-0.08886098116636276,
-0.11034493148326874,
0.03341737017035484,
-0.03731665015220642,
-0.06705351918935776,
-0.34748077392578125,
0.22956795990467072,
-0.32040727138519287,
-0.0765262246131897,
0.07548723369836807,
-0.14478877186775208,
-0.37197786569595337,
-0.07128764688968658,
-0.12345786392688751,
-0.21984803676605225,
-0.19094200432300568,
0.024902746081352234,
-0.04774758219718933,
0.18556584417819977,
-0.014882702380418777,
0.06683680415153503,
-0.12532851099967957,
0.09581243991851807,
-0.01840568333864212,
0.16962163150310516,
0.43949073553085327,
0.0953364446759224,
0.09303814172744751,
0.22313328087329865,
0.18002383410930634,
0.36205679178237915,
0.5677419900894165,
0.20268215239048004,
-0.2476731836795807,
-0.1169155165553093,
-0.24991561472415924,
0.19725215435028076,
0.12919917702674866,
0.023492075502872467,
0.00012609362602233887,
0.050376154482364655,
0.13022124767303467,
-0.07936279475688934,
0.08390389382839203,
0.4504425525665283,
0.013489284552633762,
-0.3989356756210327,
-0.14161324501037598,
0.3927491307258606,
0.028943613171577454,
0.014715082943439484,
-0.08823202550411224,
0.542373776435852,
-0.09607458859682083,
-0.19442372024059296,
0.1273103654384613,
0.7350335121154785,
0.017925966531038284,
0.12848436832427979,
0.4296097755432129,
0.17256343364715576,
0.20981015264987946,
-0.3335734009742737,
0.21516156196594238,
-0.30923622846603394,
0.045909348875284195,
-0.115062415599823,
0.19228149950504303,
0.06995861977338791,
-0.09677162766456604,
-0.1675095558166504,
0.12249711900949478,
0.1872548907995224,
0.2822284698486328,
-0.13900858163833618,
0.10818733274936676,
-0.19696597754955292,
0.28641343116760254,
-0.048478178679943085,
0.19831427931785583,
0.09123529493808746,
0.33829817175865173,
-0.24189338088035583,
-0.18979816138744354,
-0.07846623659133911,
-0.26833608746528625,
-0.25515127182006836,
0.04888925701379776,
-0.10203593969345093,
0.12190665304660797,
-0.06239106133580208,
-0.495288610458374,
0.008238652721047401,
0.5754088759422302,
-0.09002737700939178,
0.378244549036026,
-0.3047994077205658,
0.33065053820610046,
-0.19243723154067993,
-0.18926207721233368,
-0.05975011736154556,
0.23749572038650513,
-0.007488129660487175,
-0.20790773630142212,
-0.5611914992332458,
0.25362297892570496,
-0.3249979019165039,
0.006642818450927734,
-0.2962864339351654,
0.0034411251544952393,
-0.15973156690597534,
-0.06884089857339859,
-0.18011923134326935,
-0.1201924979686737,
-0.0003148093819618225,
-0.10060010105371475,
0.12292861938476562,
0.03855746239423752,
-0.06743620336055756,
-0.24179711937904358,
0.18500107526779175,
-0.228125661611557,
0.067550428211689,
0.15794646739959717,
-0.07470579445362091,
0.1451239436864853,
0.583130955696106,
0.1573970913887024,
-0.1596674621105194,
-0.24955639243125916,
0.3941799998283386,
0.2936663031578064,
-0.2971123158931732,
0.03181827440857887,
0.16505129635334015,
0.05735930800437927,
0.0639120563864708,
0.3585105836391449,
0.01038239523768425,
-0.09600730985403061,
-0.02863716147840023,
-0.1293504536151886,
-0.21760646998882294,
0.3346490263938904,
-0.29759424924850464,
0.06134452670812607,
0.03375308960676193,
-0.24778734147548676,
0.4168822169303894,
-0.26571038365364075,
-0.33670616149902344,
0.012955565005540848,
-0.25026336312294006,
0.028388507664203644,
-0.08445718139410019,
0.12740196287631989,
0.011525271460413933,
-0.07709001004695892,
0.1308567225933075,
-0.16399848461151123,
-0.12633033096790314,
-0.2244867980480194,
0.15489834547042847,
0.12083815783262253,
0.16874727606773376,
0.0558951199054718,
0.2678351104259491,
-0.16979171335697174,
-0.13723358511924744,
0.01150577887892723,
0.06293696165084839,
0.047607697546482086,
-0.04465845227241516,
0.24872981011867523,
0.2990865409374237,
0.30231356620788574,
-0.43329381942749023,
0.16795426607131958,
0.009440653026103973,
0.03504205122590065,
-0.29277870059013367,
-0.10880260169506073,
0.28437429666519165,
0.03020397573709488,
0.02048311196267605,
0.2507116496562958,
-0.1358785778284073,
0.014757098630070686,
0.4592142403125763,
-0.09536223113536835,
0.36414834856987,
0.21874994039535522,
0.17209815979003906,
0.24495483934879303,
-0.12446172535419464,
0.10299941152334213,
0.4147578477859497,
0.2610861659049988,
-0.43977808952331543,
0.02302713319659233,
0.049740567803382874,
0.012010935693979263,
0.254118412733078,
-0.13206800818443298,
-0.05712318420410156,
-0.10614367574453354,
0.20060230791568756,
0.2465965747833252,
0.2811453640460968,
-0.25307387113571167,
0.3342619836330414,
0.9903207421302795,
-0.11894996464252472,
0.042291752994060516,
0.22257237136363983,
0.13739168643951416,
-0.04422084242105484,
0.3989343047142029,
-0.31633260846138,
0.06691724807024002,
0.10225065052509308,
-0.12883400917053223,
0.19595521688461304,
-0.15109679102897644,
0.06770074367523193,
-0.040416255593299866,
-0.1340113878250122,
-0.1234455332159996,
0.15017420053482056,
-0.02964143455028534,
0.14300298690795898,
-0.04901663586497307,
-0.265340656042099,
0.3329526484012604,
-0.3622451424598694,
0.03118639439344406,
-0.38671430945396423,
-0.4442838132381439,
-0.01721898466348648,
0.11730869114398956,
-0.008820980787277222,
-0.33451128005981445,
-0.18651583790779114,
-0.010220900177955627,
-0.29733407497406006,
-0.30413204431533813,
0.49481838941574097,
0.12359726428985596,
0.20348937809467316,
-0.01102793961763382,
0.13980841636657715,
0.34411555528640747,
0.11820270866155624,
0.11453653872013092,
0.5238881707191467,
0.3615046739578247,
0.14370685815811157,
-0.1164712905883789,
0.14835314452648163,
-0.06603717803955078,
-0.21967177093029022,
-0.023899883031845093,
0.043539274483919144,
0.21124747395515442,
0.20430363714694977,
0.04202556610107422,
0.18229836225509644,
-0.1850595921278,
0.29438233375549316,
-0.03111014887690544,
0.023805566132068634,
-0.07367849349975586,
-0.08387165516614914,
-0.37624990940093994,
-0.26153022050857544,
-0.15424489974975586,
-0.15828850865364075,
-0.27583080530166626,
0.1368299424648285,
0.2656509578227997,
0.34336793422698975,
-0.030026733875274658,
-0.4932158887386322,
0.10721446573734283,
-0.10596075654029846,
0.20922943949699402,
0.512416660785675,
-0.14731308817863464,
-0.10856769233942032,
-0.18346154689788818,
-0.8028930425643921,
0.3377026319503784,
-0.22711795568466187,
-0.4534495770931244,
-0.03042016550898552,
-0.1782664805650711,
-0.039116404950618744,
0.0376867800951004,
0.10086829960346222,
0.08553031831979752,
-0.09452687948942184,
0.10807535797357559,
-0.3388461768627167,
0.03131604194641113,
0.2975797653198242,
0.04971027001738548,
-0.05565362423658371,
-0.1841389536857605,
0.19439122080802917,
-0.14792664349079132,
0.10846131294965744,
0.06758154928684235,
0.2927601933479309,
-0.27452361583709717,
-0.12133859097957611,
0.15312811732292175,
0.14056344330310822,
0.4731386601924896,
-0.06210651993751526,
-0.02830817736685276,
-0.08735264837741852,
-0.012554023414850235,
-0.20454411208629608,
0.19984444975852966,
0.25295785069465637,
0.20892976224422455,
-0.024547768756747246,
-0.22178871929645538,
0.0267700906842947,
-0.32924938201904297,
0.005379512906074524,
0.32527366280555725,
-0.19895124435424805,
0.014905305579304695,
-0.04138398915529251,
-0.05751737579703331,
0.2029838114976883,
0.07172514498233795,
0.055316261947155,
-0.20915725827217102,
-0.35208189487457275,
-0.4341658651828766,
0.14978870749473572,
-0.4678589999675751,
-0.06631205230951309,
-0.20837609469890594,
-0.0388527512550354,
-0.01468774676322937,
-0.13215944170951843,
-0.20900782942771912,
0.09224259108304977,
0.38443273305892944,
0.004433233290910721,
-0.12607020139694214,
-0.17452359199523926,
-0.01934172213077545,
-0.1396256536245346,
-0.08674375712871552,
0.0888231098651886,
0.21487939357757568,
-0.1976006031036377,
-0.08408199995756149,
-0.26329320669174194
] |
https://github.com/huggingface/datasets/issues/4746 | Dataset Viewer issue for yanekyuk/wikikey | OK. Closing as it's not an error. We will work on making the error message a lot clearer. | ### Link
_No response_
### Description
_No response_
### Owner
_No response_ | 18 | Dataset Viewer issue for yanekyuk/wikikey
### Link
_No response_
### Description
_No response_
### Owner
_No response_
OK. Closing as it's not an error. We will work on making the error message a lot clearer. | [
-0.07279768586158752,
0.08109290897846222,
-0.05684897303581238,
0.1138695627450943,
0.175531268119812,
-0.08731485158205032,
0.42363032698631287,
0.2916473150253296,
-0.24551934003829956,
0.207700714468956,
0.08009187877178192,
0.2805224657058716,
0.10691715031862259,
0.23086152970790863,
-0.10196568071842194,
0.03889794275164604,
-0.05612362176179886,
0.2836223244667053,
0.16200761497020721,
0.005848929286003113,
-0.30222901701927185,
0.022975414991378784,
-0.28706851601600647,
0.36616063117980957,
-0.043739091604948044,
-0.12995946407318115,
-0.020691266283392906,
-0.06994128972291946,
-0.1447833925485611,
-0.5540250539779663,
0.27049583196640015,
0.18131035566329956,
-0.26710638403892517,
0.3067396879196167,
-0.00010063523950520903,
0.07770466804504395,
0.5293154716491699,
0.14279954135417938,
-0.12379822134971619,
0.1720840185880661,
-0.015208549797534943,
-0.5118958950042725,
0.018088148906826973,
-0.37870267033576965,
-0.11928480863571167,
-0.12414596229791641,
0.005135649815201759,
0.19401657581329346,
0.2790709137916565,
0.2243650257587433,
0.2985116243362427,
0.10599133372306824,
0.19520525634288788,
-0.17919956147670746,
0.019091274589300156,
-0.041204191744327545,
-0.09425544738769531,
-0.13903596997261047,
0.19152936339378357,
-0.06551534682512283,
-0.11509744077920914,
0.40801113843917847,
-0.15293990075588226,
-0.07605649530887604,
0.18878766894340515,
-0.29838547110557556,
0.2412359118461609,
-0.3128751218318939,
0.31564968824386597,
0.3240131437778473,
0.9358803629875183,
0.09509233385324478,
0.041812315583229065,
-0.2743586003780365,
0.018941491842269897,
0.393767386674881,
0.2397192418575287,
0.2605758011341095,
-0.33844348788261414,
0.09083005785942078,
-0.17409344017505646,
-0.16766192018985748,
-0.28993380069732666,
-0.014512956142425537,
-0.45495203137397766,
0.37488847970962524,
0.01715163327753544,
0.20894798636436462,
0.18075858056545258,
-0.4491172432899475,
0.3293144106864929,
-0.05077802389860153,
-0.2893468737602234,
0.027818404138088226,
-0.031523820012807846,
-0.2764173746109009,
0.3576635420322418,
0.24083536863327026,
0.3298424184322357,
-0.11704480648040771,
-0.21633626520633698,
0.1108635663986206,
0.16371111571788788,
0.08512331545352936,
0.2753114402294159,
0.04712614417076111,
0.14244288206100464,
0.24900545179843903,
0.47612953186035156,
0.025591902434825897,
-0.08180109411478043,
0.08865470439195633,
0.030241001397371292,
-0.33994534611701965,
-0.034275155514478683,
-0.09238643944263458,
0.23929868638515472,
-0.05730269476771355,
-0.030706768855452538,
0.39552631974220276,
-0.18217390775680542,
0.13062062859535217,
-0.05579649284482002,
0.46486833691596985,
-0.23185975849628448,
0.1375913918018341,
-0.10402785241603851,
-0.017338726669549942,
-0.09678619354963303,
0.059370096772909164,
-0.06354258954524994,
-0.04058373346924782,
-0.04168151319026947,
-0.27689558267593384,
0.02620883658528328,
-0.060765739530324936,
0.08561409264802933,
0.08536599576473236,
-0.021646559238433838,
-0.28022634983062744,
0.06796536594629288,
-0.09710781276226044,
-0.10909634083509445,
0.4303877651691437,
0.09382133185863495,
0.11905687302350998,
0.03414170816540718,
-0.4711805582046509,
0.07719474285840988,
0.2124209702014923,
-0.28952938318252563,
-0.22212810814380646,
-0.12261630594730377,
0.3347463011741638,
-0.0450204536318779,
-0.10320727527141571,
0.11231574416160583,
0.11445313692092896,
-0.11354336887598038,
-0.31588101387023926,
-0.10948269814252853,
0.16606619954109192,
0.00517093762755394,
-0.1373072862625122,
0.14018940925598145,
0.3015735149383545,
-0.2754937708377838,
-0.01512419804930687,
-0.3277152180671692,
-0.06429241597652435,
-0.0844544842839241,
0.011660709977149963,
-0.20573005080223083,
0.2614121437072754,
-0.30232053995132446,
0.2749330401420593,
0.3516231179237366,
-0.28554874658584595,
-0.5982992053031921,
0.4037117660045624,
-0.2958984076976776,
0.006341865286231041,
-0.12104348093271255,
0.015888942405581474,
0.24602645635604858,
-0.03679521754384041,
-0.011109493672847748,
-0.17454028129577637,
0.2574206590652466,
0.10232239216566086,
-0.33151310682296753,
-0.11826737970113754,
-0.16325482726097107,
0.011010706424713135,
0.32753250002861023,
-0.22899696230888367,
0.10960491746664047,
-0.12783575057983398,
0.26220348477363586,
-0.13159000873565674,
0.17121312022209167,
0.07065873593091965,
0.42370983958244324,
0.17110195755958557,
-0.013889018446207047,
0.3438211679458618,
-0.07024753838777542,
0.18898025155067444,
-0.1415313482284546,
0.08733893185853958,
-0.23353637754917145,
-0.3367682099342346,
-0.4572483003139496,
0.14641770720481873,
-0.4662049114704132,
-0.2637941241264343,
0.37832725048065186,
0.0012291893362998962,
-0.3506644666194916,
0.4448087513446808,
0.18541841208934784,
-0.22266437113285065,
0.19878330826759338,
0.02927541732788086,
0.29741567373275757,
0.02898453362286091,
-0.3623429536819458,
0.2216068059206009,
-0.06882498413324356,
0.09937204420566559,
0.2838357388973236,
0.15885542333126068,
0.14756140112876892,
0.10828840732574463,
-0.30200454592704773,
0.2839313745498657,
0.08627189695835114,
-0.3540535569190979,
0.24005790054798126,
-0.336001992225647,
0.09270964562892914,
0.2198057770729065,
0.07198407500982285,
-0.1370268166065216,
-0.1990753412246704,
0.2763221263885498,
0.0480952113866806,
0.07194115221500397,
-0.09595755487680435,
0.29875531792640686,
0.33724233508110046,
-0.20211689174175262,
0.12217783182859421,
-0.13661572337150574,
0.006048865616321564,
0.16801096498966217,
0.060433272272348404,
-0.1394488513469696,
-0.5016920566558838,
0.10425855219364166,
0.29903385043144226,
0.0028349757194519043,
0.298126220703125,
0.06607304513454437,
-0.2077024281024933,
-0.07289376109838486,
0.2751522660255432,
0.27745047211647034,
-0.031477585434913635,
0.18287219107151031,
-0.10106126964092255,
0.16770103573799133,
-0.0449519008398056,
-0.1992487609386444,
0.07714040577411652,
-0.028331778943538666,
0.2555110454559326,
0.43112313747406006,
0.1416584700345993,
-0.17265307903289795,
-0.29650580883026123,
0.02177930623292923,
0.009233349934220314,
0.1631910353899002,
-0.22891396284103394,
-0.27452602982521057,
0.03257405012845993,
-0.2826266586780548,
0.25222593545913696,
0.020139429718255997,
-0.17021113634109497,
-0.5173556208610535,
0.3372434377670288,
0.12363608181476593,
-0.19568906724452972,
0.186343252658844,
-0.32221928238868713,
0.18787983059883118,
0.08285060524940491,
0.2901853322982788,
-0.17229518294334412,
-0.3963479995727539,
-0.2272282838821411,
0.1983364373445511,
0.20308582484722137,
-0.23154973983764648,
0.2614161968231201,
-0.12610545754432678,
0.20568200945854187,
-0.4845728278160095,
-0.41297879815101624,
0.16882291436195374,
-0.1807425171136856,
0.2299879640340805,
0.07137733697891235,
0.4409576654434204,
-0.3208262324333191,
-0.20089775323867798,
0.36157193779945374,
0.18588243424892426,
-0.06843375414609909,
0.2083064615726471,
0.29410505294799805,
0.13590748608112335,
-0.03923126682639122,
-0.2111133635044098,
-0.18216845393180847,
-0.3034419119358063,
0.18242403864860535,
0.010196451097726822,
0.07475906610488892,
0.18546654284000397,
0.16710248589515686,
0.06790927052497864,
-0.026980141177773476,
-0.05904173105955124,
-0.2160441279411316,
0.014542248100042343,
0.3478665351867676,
-0.23959626257419586,
-0.5661494731903076,
0.32109448313713074,
0.06692927330732346,
0.134305939078331,
-0.30198824405670166,
-0.507352352142334,
0.012304120697081089,
0.18502295017242432,
0.3630746603012085,
0.04215628281235695,
-0.1300051063299179,
0.1479235738515854,
0.2523931562900543,
-0.17135556042194366,
-0.19556674361228943,
-0.016776645556092262,
-0.0572655126452446,
-0.22276154160499573,
-0.004038281738758087,
-0.031464286148548126,
0.463818222284317,
0.13557018339633942,
0.5732964873313904,
0.1011098325252533,
0.415823370218277,
0.16308358311653137,
-0.16908425092697144,
0.3520514965057373,
0.032338760793209076,
-0.2548867464065552,
0.015730546787381172,
-0.044341593980789185,
0.11019454896450043,
0.3236202001571655,
0.09946561604738235,
-0.3053564727306366,
-0.34563589096069336,
-0.2413863092660904,
-0.4016423523426056,
-0.4900435507297516,
-0.18182919919490814,
0.02004292607307434,
0.10377176105976105,
0.1453820914030075,
0.20473900437355042,
-0.12001174688339233,
-0.16887715458869934,
0.06185681000351906,
0.20972339808940887,
-0.09623812884092331,
-0.2115505337715149,
-0.40469929575920105,
-0.07359004765748978,
-0.41564929485321045,
0.26623326539993286,
-0.18072041869163513,
0.04783056676387787,
-0.12337067723274231,
-0.007556430995464325,
0.12801101803779602,
-0.1826721727848053,
0.6635526418685913,
-0.3660229742527008,
0.0868455022573471,
-0.07087424397468567,
0.14179931581020355,
0.015533210709691048,
-0.015255860984325409,
0.032773617655038834,
0.05707130581140518,
-0.3139971196651459,
0.2334207445383072,
-0.22977951169013977,
0.14685413241386414,
0.11915837973356247,
-0.31470683217048645,
-0.22174958884716034,
-0.12827390432357788,
-0.031117010861635208,
-0.25670868158340454,
-0.31833919882774353,
0.11058668047189713,
-0.07848678529262543,
0.12360089272260666,
-0.10192004591226578,
-0.16667219996452332,
-0.06879032403230667,
0.014613036066293716,
-0.04557479918003082,
0.25614553689956665,
0.1400754451751709,
0.06678537279367447,
0.0624244324862957,
0.17111770808696747,
0.14175623655319214,
0.32682642340660095,
0.3341931998729706,
0.25943055748939514,
-0.08170145750045776,
-0.23633968830108643,
-0.3570932149887085,
0.11478772759437561,
0.16811731457710266,
-0.021677494049072266,
-0.06474164873361588,
0.08922931551933289,
0.10096865892410278,
0.012597186490893364,
-0.0646863654255867,
0.4782696068286896,
-0.12729550898075104,
-0.42633721232414246,
-0.07467027008533478,
0.3034868538379669,
-0.07193566858768463,
-0.13367918133735657,
-0.11871230602264404,
0.44161874055862427,
-0.09580889344215393,
-0.2000279575586319,
0.12403511255979538,
0.9384701251983643,
0.07181208580732346,
0.11568780243396759,
0.16496756672859192,
0.013818912208080292,
0.1984875500202179,
-0.27956423163414,
0.22871001064777374,
-0.4153253436088562,
0.09234736859798431,
-0.10241338610649109,
0.036366935819387436,
0.07352402806282043,
-0.13478143513202667,
-0.38734570145606995,
-0.009944054298102856,
0.16489852964878082,
0.16171741485595703,
-0.07966194301843643,
0.14129571616649628,
-0.19421419501304626,
0.13028700649738312,
-0.10132279992103577,
0.2532704174518585,
0.020300157368183136,
0.23062832653522491,
-0.2107938826084137,
-0.21112369000911713,
-0.11226159334182739,
-0.2258986085653305,
-0.34744900465011597,
0.08748351782560349,
-0.07077651470899582,
0.19805285334587097,
-0.16166435182094574,
-0.43512028455734253,
0.008486486971378326,
0.3146217167377472,
-0.15712392330169678,
0.39684173464775085,
-0.283054381608963,
0.24384093284606934,
-0.12633252143859863,
-0.05991613119840622,
-0.012319757603108883,
0.06131424754858017,
0.060154445469379425,
-0.29502806067466736,
-0.3485727906227112,
0.32245635986328125,
-0.08613860607147217,
0.010236892849206924,
-0.23425644636154175,
0.12641237676143646,
-0.044375039637088776,
-0.2642771303653717,
-0.17988836765289307,
-0.20854637026786804,
-0.16110455989837646,
-0.20498499274253845,
0.20198547840118408,
-0.13906708359718323,
0.00837605632841587,
-0.004041895270347595,
0.1399012953042984,
-0.14016950130462646,
0.0719321221113205,
0.1951441764831543,
0.016151320189237595,
0.04067784547805786,
0.516005277633667,
0.06125751510262489,
-0.3369065523147583,
-0.28363916277885437,
0.2980518937110901,
0.08224108070135117,
-0.3564341962337494,
-0.07558097690343857,
0.09007532894611359,
-0.07336278259754181,
0.09646165370941162,
0.23080919682979584,
0.0026205554604530334,
0.04897617548704147,
-0.0649028792977333,
-0.17145195603370667,
-0.1281033307313919,
0.239589661359787,
-0.20027785003185272,
0.015946093946695328,
0.00589500367641449,
-0.09902150928974152,
0.3073080778121948,
-0.14420680701732635,
-0.4267066419124603,
-0.022350065410137177,
-0.3557870090007782,
-0.06269802153110504,
-0.301165908575058,
0.055549025535583496,
-0.16415682435035706,
-0.08072331547737122,
0.19721440970897675,
0.04137422889471054,
-0.2609198987483978,
-0.31246569752693176,
0.1822757124900818,
0.08231262117624283,
0.34492719173431396,
-0.05903849005699158,
0.10830900073051453,
-0.09839387238025665,
-0.023506779223680496,
0.15499617159366608,
0.05232463404536247,
-0.006048828363418579,
-0.16039423644542694,
0.02413412183523178,
0.1698784977197647,
0.22569912672042847,
-0.12932807207107544,
0.062124595046043396,
-0.020193494856357574,
0.18628104031085968,
-0.25779756903648376,
-0.09670454263687134,
0.1304122507572174,
-0.04473467543721199,
0.11966235190629959,
0.2661114037036896,
0.054783690720796585,
0.16828003525733948,
0.4739097058773041,
-0.18009597063064575,
0.1293228715658188,
0.1542416363954544,
0.25582069158554077,
0.44451528787612915,
-0.24013647437095642,
-0.06475178897380829,
0.38522493839263916,
0.33411771059036255,
-0.3910844027996063,
-0.07372426241636276,
0.14487650990486145,
-0.2782043516635895,
0.21266981959342957,
-0.14763042330741882,
-0.02406137064099312,
-0.07244852185249329,
0.04274991154670715,
0.31556081771850586,
0.3163750171661377,
-0.3929864168167114,
0.09030836820602417,
0.8276742696762085,
-0.21147528290748596,
0.06823889166116714,
0.23402687907218933,
0.13884921371936798,
0.1501466929912567,
0.2816590666770935,
-0.20801973342895508,
-0.030524296686053276,
0.29839441180229187,
0.017892111092805862,
0.32374757528305054,
-0.1144341230392456,
0.33640989661216736,
-0.07787051796913147,
-0.1758614182472229,
0.007516302168369293,
0.23315061628818512,
-0.1130308285355568,
0.1713542640209198,
0.10808366537094116,
-0.2745124399662018,
0.31222647428512573,
-0.3860172927379608,
0.00040978752076625824,
-0.312791645526886,
-0.4269889295101166,
-0.07708996534347534,
0.0254204198718071,
-0.1957417130470276,
-0.10983386635780334,
-0.16625049710273743,
-0.10369759798049927,
-0.2640990614891052,
-0.22641028463840485,
0.38193070888519287,
-0.02786940336227417,
0.11884425580501556,
-0.10546085983514786,
-0.005725523456931114,
0.24665522575378418,
0.21932457387447357,
-0.03000524267554283,
0.43768778443336487,
0.4027579724788666,
0.21531005203723907,
-0.26102307438850403,
0.13021960854530334,
-0.09892728924751282,
-0.08520251512527466,
0.021102067083120346,
0.11006662994623184,
0.23148147761821747,
-0.00906982272863388,
0.13973715901374817,
0.24067038297653198,
-0.24273239076137543,
0.27763378620147705,
0.1309189647436142,
0.023864109069108963,
-0.010759953409433365,
-0.2783992886543274,
-0.24565276503562927,
-0.31203216314315796,
-0.0369669571518898,
-0.14261338114738464,
-0.18071633577346802,
0.18042097985744476,
0.35389554500579834,
0.2507874667644501,
0.12110558897256851,
-0.5578231811523438,
0.1690748929977417,
0.07989709824323654,
0.3518177270889282,
0.3356533646583557,
-0.06463384628295898,
0.00432036817073822,
-0.01274937391281128,
-0.6040583252906799,
0.4129113554954529,
-0.16889703273773193,
-0.3083305358886719,
-0.0007403697818517685,
-0.19467182457447052,
-0.03511863201856613,
0.09619101881980896,
0.16252391040325165,
-0.001360308495350182,
0.014192997477948666,
0.20334744453430176,
-0.22511476278305054,
0.02468409202992916,
0.41416609287261963,
0.02208886109292507,
-0.03245696797966957,
-0.16368037462234497,
0.3839724361896515,
-0.20796053111553192,
0.24475088715553284,
0.07726806402206421,
0.16541226208209991,
-0.03831786662340164,
-0.20940575003623962,
0.26643893122673035,
0.09831620007753372,
0.42472854256629944,
-0.04552040621638298,
0.042164407670497894,
-0.04139161482453346,
-0.1117788776755333,
-0.05192876234650612,
0.1269279420375824,
0.3649645149707794,
0.015877701342105865,
0.15794283151626587,
-0.21331815421581268,
0.11783183366060257,
-0.21313193440437317,
-0.07469221949577332,
0.48814496397972107,
-0.08820368349552155,
-0.11052148044109344,
0.29503050446510315,
-0.1588907390832901,
-0.02612096257507801,
0.013560187071561813,
-0.049253106117248535,
-0.023811813443899155,
-0.4216150641441345,
-0.6707901954650879,
0.26679182052612305,
-0.27011412382125854,
-0.20723508298397064,
-0.15460684895515442,
0.12043788284063339,
-0.1738646924495697,
-0.04861126095056534,
-0.16871196031570435,
0.07606533914804459,
0.3657594621181488,
-0.030591920018196106,
-0.14030447602272034,
-0.2453579306602478,
-0.07965604960918427,
-0.1871272772550583,
-0.07689937204122543,
0.02264818176627159,
0.1419694423675537,
-0.04850998520851135,
-0.1051800549030304,
-0.1321256309747696
] |
https://github.com/huggingface/datasets/issues/4745 | Allow `list_datasets` to include private datasets | Thanks for opening this issue :)
If it can help, I think you can already use `huggingface_hub` to achieve this:
```python
>>> from huggingface_hub import HfApi
>>> [ds_info.id for ds_info in HfApi().list_datasets(use_auth_token=token) if ds_info.private]
['bigscience/xxxx', 'bigscience-catalogue-data/xxxxxxx', ... ]
```
---------
Though the latest versions of `huggingface_hub` that contain this feature are not available on python 3.6, so maybe we should first drop support for python 3.6 (see #4460) to update `list_datasets` in `datasets` as well (or we would have to copy/paste some `huggingface_hub` code) | I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually. | 84 | Allow `list_datasets` to include private datasets
I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually.
Thanks for opening this issue :)
If it can help, I think you can already use `huggingface_hub` to achieve this:
```python
>>> from huggingface_hub import HfApi
>>> [ds_info.id for ds_info in HfApi().list_datasets(use_auth_token=token) if ds_info.private]
['bigscience/xxxx', 'bigscience-catalogue-data/xxxxxxx', ... ]
```
---------
Though the latest versions of `huggingface_hub` that contain this feature are not available on python 3.6, so maybe we should first drop support for python 3.6 (see #4460) to update `list_datasets` in `datasets` as well (or we would have to copy/paste some `huggingface_hub` code) | [
-0.2407407909631729,
0.09022775292396545,
-0.1712995171546936,
0.26900479197502136,
-0.0063143037259578705,
0.22895395755767822,
0.39418959617614746,
0.42811140418052673,
0.48214811086654663,
0.11412980407476425,
-0.5409525632858276,
0.2599234879016876,
-0.2146034687757492,
0.17990882694721222,
0.11586575955152512,
0.16690489649772644,
0.10477149486541748,
-0.0697755217552185,
0.30697667598724365,
-0.26633068919181824,
-0.4220333397388458,
0.010521347634494305,
-0.03724139556288719,
-0.08932921290397644,
0.25941720604896545,
-0.11314932256937027,
0.23518604040145874,
0.09355242550373077,
0.12191598117351532,
-0.4160309135913849,
0.041073352098464966,
0.4707157015800476,
0.36053267121315,
-0.06396760791540146,
-0.00011808936687884852,
0.0703863650560379,
0.22168385982513428,
0.07904864102602005,
-0.24665077030658722,
-0.11995671689510345,
-0.5935318470001221,
-0.2995963394641876,
0.40638867020606995,
-0.039993323385715485,
-0.08007605373859406,
-0.10363725572824478,
-0.15460272133350372,
-0.18622560799121857,
0.04894324392080307,
0.2980769872665405,
0.11226123571395874,
0.43314850330352783,
-0.08834709227085114,
-0.2046588510274887,
0.12450644373893738,
0.2196447253227234,
-0.1619366556406021,
-0.3526269495487213,
0.1323825567960739,
0.08852583169937134,
0.13404302299022675,
0.029529321938753128,
-0.23815636336803436,
-0.03155922889709473,
0.4237363934516907,
0.05821025371551514,
-0.3279137909412384,
-0.47547677159309387,
0.008145030587911606,
0.3014196753501892,
0.6615716218948364,
-0.2116255760192871,
-0.30032414197921753,
-0.3284188210964203,
0.04051734879612923,
-0.22086212038993835,
-0.044232629239559174,
0.17127171158790588,
-0.1599910855293274,
0.17207928001880646,
-0.18873180449008942,
-0.37047210335731506,
-0.21546080708503723,
0.3218453526496887,
0.14648085832595825,
0.2031020075082779,
0.11720697581768036,
0.09111941605806351,
0.12878452241420746,
-0.32412469387054443,
0.23940987884998322,
-0.29881903529167175,
0.3025180697441101,
0.0003201384097337723,
-0.3900913894176483,
-0.10121254622936249,
0.11772695183753967,
0.3466110825538635,
0.3519343137741089,
0.42694365978240967,
-0.2666739523410797,
0.14548814296722412,
-0.4088743031024933,
0.12098312377929688,
0.09616313874721527,
-0.03627125918865204,
0.045983441174030304,
0.48050862550735474,
0.34911978244781494,
0.03900224715471268,
0.17539408802986145,
0.12950098514556885,
-0.12402379512786865,
0.21585194766521454,
-0.12740463018417358,
-0.07880814373493195,
0.01814858242869377,
-0.20893514156341553,
-0.14823313057422638,
0.14956670999526978,
-0.16316154599189758,
-0.13121306896209717,
0.39785850048065186,
0.44311556220054626,
0.20770151913166046,
-0.21348634362220764,
-0.14558908343315125,
0.0722624659538269,
0.36862924695014954,
-0.10332435369491577,
-0.17978963255882263,
-0.26018843054771423,
0.19746913015842438,
0.2742712199687958,
0.15365974605083466,
-0.07684150338172913,
0.08322159945964813,
0.05285248905420303,
0.5208817720413208,
0.07989312708377838,
0.026941342279314995,
0.1648149937391281,
0.3557405173778534,
0.3377212584018707,
0.14394578337669373,
0.037142783403396606,
0.26132291555404663,
-0.2463691532611847,
-0.45197004079818726,
0.07277756929397583,
-0.26318415999412537,
-0.5085309743881226,
-0.030911600217223167,
-0.030381646007299423,
-0.2323797345161438,
0.06120853126049042,
-0.33434802293777466,
0.1797957718372345,
-0.1325460970401764,
0.11045654118061066,
0.22503390908241272,
0.008557962253689766,
-0.09891125559806824,
-0.2251364290714264,
0.04642058163881302,
0.3248831629753113,
-0.08967180550098419,
0.04163879156112671,
-0.2511034309864044,
-0.14694416522979736,
-0.21274039149284363,
0.20776352286338806,
-0.30001530051231384,
0.03531508520245552,
-0.3485722541809082,
0.20328925549983978,
0.2400379329919815,
-0.350498229265213,
-0.447965532541275,
0.06098249554634094,
0.13190369307994843,
-0.019333913922309875,
0.03232061117887497,
0.2428492307662964,
0.34565404057502747,
-0.18722312152385712,
0.08751615881919861,
0.3783898949623108,
0.20269624888896942,
-0.1968972086906433,
0.18338261544704437,
-0.18189656734466553,
0.14637741446495056,
0.16818197071552277,
0.16700531542301178,
0.2026585340499878,
0.1655118763446808,
0.1483137309551239,
0.5294700860977173,
-0.12482361495494843,
-0.13089419901371002,
0.09887660294771194,
0.21357429027557373,
0.38765186071395874,
0.04335542023181915,
-0.06705400347709656,
-0.19882506132125854,
0.09035757929086685,
-0.013114195317029953,
0.17910711467266083,
-0.1250990629196167,
-0.336348295211792,
0.10788533836603165,
0.062109045684337616,
-0.21010185778141022,
0.1622798889875412,
0.06099184602499008,
0.3208972215652466,
0.006725337356328964,
-0.04884391278028488,
-0.08636902272701263,
0.333857923746109,
-0.25013118982315063,
0.12928839027881622,
-0.3508608043193817,
0.28223857283592224,
0.4266691207885742,
0.31806331872940063,
0.1697174608707428,
0.36420968174934387,
0.4216463267803192,
0.12560538947582245,
-0.002018798142671585,
0.004710093140602112,
0.19199296832084656,
-0.26747679710388184,
0.3149976432323456,
0.6360800266265869,
0.19196732342243195,
-0.1954059600830078,
0.21833860874176025,
0.1960454285144806,
-0.003283072030171752,
-0.005347508937120438,
0.34318405389785767,
0.2786078453063965,
0.0748521015048027,
0.43435725569725037,
-0.24298527836799622,
0.21490269899368286,
0.037931717932224274,
0.14480771124362946,
-0.2905244529247284,
-0.19627779722213745,
-0.10899710655212402,
0.03477806597948074,
0.0693095475435257,
-0.283301442861557,
-0.261028528213501,
0.05117228999733925,
-0.055141907185316086,
-0.16493767499923706,
0.10414986312389374,
0.17766493558883667,
-0.17934557795524597,
0.27995559573173523,
0.38420569896698,
0.18558736145496368,
0.24647407233715057,
0.17066773772239685,
-0.16266249120235443,
-0.022880708798766136,
0.037830136716365814,
0.030713751912117004,
0.19468706846237183,
0.3492969870567322,
-0.11541565507650375,
-0.3688303828239441,
0.3503686189651489,
-0.1184544488787651,
-0.15281598269939423,
-0.39532971382141113,
-0.1847982406616211,
0.2105974704027176,
-0.2273833006620407,
-0.04804480820894241,
-0.31705212593078613,
-0.053457580506801605,
0.517096996307373,
-0.267851859331131,
-0.37072405219078064,
-0.12272651493549347,
-0.016942255198955536,
-0.02005380019545555,
0.08300144970417023,
0.11548896133899689,
-0.16471168398857117,
0.4815981984138489,
0.006821474060416222,
-0.47788941860198975,
-0.00371001660823822,
0.23177973926067352,
0.16189318895339966,
-0.031026603654026985,
0.28805121779441833,
-0.13690680265426636,
0.24309669435024261,
0.1022854596376419,
-0.011036554351449013,
-0.6314741373062134,
-0.14885206520557404,
0.0861860066652298,
-0.19162991642951965,
-0.09015127271413803,
0.1650160551071167,
-0.10744108259677887,
0.09414969384670258,
-0.16024821996688843,
0.020658407360315323,
0.11657200753688812,
0.12960009276866913,
0.053250208497047424,
-0.18162919580936432,
-0.07622749358415604,
0.100033238530159,
0.2188417613506317,
-0.44252899289131165,
-0.2880166172981262,
0.4511147737503052,
0.21405752003192902,
0.23164241015911102,
-0.019616365432739258,
-0.24332551658153534,
0.0233265683054924,
-0.4095079302787781,
-0.1877051591873169,
-0.2725619971752167,
-0.2875581681728363,
0.4229882061481476,
-0.27338385581970215,
-0.0918661504983902,
0.20015168190002441,
-0.2517125904560089,
0.038303229957818985,
-0.18350522220134735,
-0.5213011503219604,
-0.447536438703537,
-0.35209712386131287,
0.39912739396095276,
-0.15766525268554688,
0.026461603119969368,
0.16302505135536194,
-0.10250391811132431,
0.16656966507434845,
-0.09390580654144287,
-0.5106564164161682,
-0.016518406569957733,
-0.15893509984016418,
0.146260604262352,
0.1028907373547554,
-0.2672416567802429,
-0.01022074744105339,
0.4580690264701843,
0.5826706290245056,
0.2022036612033844,
0.047761134803295135,
0.07144027203321457,
0.3007979393005371,
0.1506071388721466,
-0.39776715636253357,
-0.10714343190193176,
0.019977182149887085,
-0.2888718247413635,
0.35640209913253784,
0.04999879002571106,
-0.11312640458345413,
0.12059624493122101,
-0.09642437100410461,
-0.2724772095680237,
-0.2573913633823395,
-0.13143156468868256,
0.1943950206041336,
0.3039759397506714,
0.02395615354180336,
0.04638676345348358,
-0.41739559173583984,
-0.27367863059043884,
0.0037083616480231285,
0.31530243158340454,
0.26253315806388855,
0.03687525540590286,
-0.19991201162338257,
-0.30636799335479736,
-0.40574130415916443,
0.41945046186447144,
-0.17427800595760345,
0.32653746008872986,
-0.13992616534233093,
0.16397258639335632,
0.029060669243335724,
0.394765704870224,
0.559838056564331,
-0.35974353551864624,
-0.16553565859794617,
0.042444467544555664,
-0.32872194051742554,
-0.11123033612966537,
0.031059633940458298,
-0.05005263164639473,
-0.16363376379013062,
-0.1696862280368805,
0.49306371808052063,
-0.1268409788608551,
-0.129209503531456,
-0.11352969706058502,
-0.07446114718914032,
0.03516120836138725,
-0.1674761176109314,
0.15271936357021332,
-0.24352067708969116,
-0.358177125453949,
0.09830522537231445,
-0.01367156207561493,
0.15609894692897797,
-0.21991942822933197,
0.04656754061579704,
0.10633953660726547,
-0.1287592351436615,
0.39003098011016846,
0.04535840079188347,
0.34557339549064636,
0.32457229495048523,
0.188890278339386,
0.22482140362262726,
-0.08211959898471832,
0.30550098419189453,
0.5400995016098022,
-0.13421916961669922,
-0.5620735287666321,
-0.19177642464637756,
0.09102683514356613,
0.33342546224594116,
0.3323196768760681,
-0.20534980297088623,
0.5134327411651611,
-0.06983426958322525,
0.12839645147323608,
-0.20504672825336456,
0.08743738383054733,
0.023170147091150284,
-0.17070092260837555,
-0.34858471155166626,
-0.4774447977542877,
0.47039610147476196,
0.08288392424583435,
-0.18886277079582214,
0.015597552061080933,
0.3351956903934479,
-0.3996310532093048,
0.1444178819656372,
0.015993177890777588,
0.7550978064537048,
-0.09666784107685089,
0.2169916182756424,
-0.13668492436408997,
0.20272709429264069,
0.5179423093795776,
-0.24208560585975647,
0.013126393780112267,
-0.22704796493053436,
-0.06892085820436478,
-0.031646862626075745,
-0.2013155072927475,
0.08388970792293549,
-0.23278452455997467,
-0.04823088273406029,
0.09273992478847504,
-0.023354660719633102,
0.40880095958709717,
-0.21910451352596283,
0.10046267509460449,
-0.2580088675022125,
-0.4188408851623535,
-0.06956683844327927,
0.12404128909111023,
-0.16309474408626556,
0.0894639641046524,
0.06377806514501572,
-0.3601486086845398,
-0.1344819962978363,
-0.14755231142044067,
-0.5908734798431396,
-0.2317427396774292,
-0.21385237574577332,
-0.16965119540691376,
0.18830876052379608,
-0.33575552701950073,
0.5163479447364807,
0.2080015242099762,
0.39859408140182495,
0.362802654504776,
-0.447647362947464,
-0.1338530331850052,
-0.25203976035118103,
0.09840061515569687,
-0.3409447968006134,
-0.12974822521209717,
0.0228799507021904,
0.15202036499977112,
0.034733258187770844,
0.08142983913421631,
0.21299637854099274,
-0.475233256816864,
-0.5581308603286743,
0.34841662645339966,
0.40049731731414795,
-0.23328346014022827,
0.02944803237915039,
0.07168944180011749,
-0.2147170752286911,
-0.19218388199806213,
0.044462963938713074,
0.29527902603149414,
-0.29698827862739563,
0.020619984716176987,
0.01769520714879036,
-0.02261371538043022,
-0.07461526989936829,
0.0425284318625927,
0.05090689659118652,
-0.070834219455719,
0.15199893712997437,
0.1766856610774994,
-0.03279220685362816,
-0.17984813451766968,
0.14629802107810974,
0.20042134821414948,
-0.00009889155626296997,
0.1367517113685608,
0.17888711392879486,
0.12529270350933075,
-0.3115798234939575,
-0.015509765595197678,
-0.1387602537870407,
-0.047076039016246796,
-0.08775210380554199,
-0.35215088725090027,
-0.23675437271595,
0.22283264994621277,
-0.5191337466239929,
0.3044261932373047,
-0.16408169269561768,
0.0797128677368164,
-0.35258105397224426,
-0.32352975010871887,
-0.18131327629089355,
0.02753433957695961,
-0.45916593074798584,
-0.14833755791187286,
-0.2021908015012741,
0.22987216711044312,
0.2532760202884674,
-0.15456825494766235,
-0.00014525651931762695,
0.14272606372833252,
-0.23325775563716888,
-0.1639813780784607,
-0.12591202557086945,
0.1579245626926422,
0.28825974464416504,
-0.004876414313912392,
-0.007810537237673998,
-0.25373512506484985,
-0.03938864544034004,
-0.34464526176452637,
0.2722707986831665,
0.18021342158317566,
0.09432970732450485,
0.12190119922161102,
0.2777850031852722,
-0.19341495633125305,
0.1655205339193344,
0.11805760860443115,
0.05325645953416824,
0.22280922532081604,
0.14131945371627808,
0.14872132241725922,
-0.295960396528244,
0.001049719750881195,
0.18730182945728302,
0.44441723823547363,
0.38967615365982056,
0.1823539137840271,
0.42444050312042236,
-0.04022818058729172,
-0.18921233713626862,
0.20732422173023224,
0.29369381070137024,
-0.1140395849943161,
-0.24600151181221008,
0.3040013015270233,
0.21477997303009033,
0.03813422471284866,
-0.21547465026378632,
-0.35895395278930664,
0.07498808205127716,
0.19105306267738342,
0.13935428857803345,
0.5028299689292908,
0.41974905133247375,
-0.014702431857585907,
0.04452051967382431,
-0.14176514744758606,
0.2856011390686035,
0.05912955105304718,
0.18348129093647003,
0.47169893980026245,
0.033720891922712326,
0.16616997122764587,
0.2590228319168091,
0.3534530699253082,
-0.1015753373503685,
0.7193474173545837,
-0.1353626251220703,
0.5203452110290527,
0.04483122378587723,
-0.24708479642868042,
0.6144621968269348,
-0.4125024974346161,
0.028580592945218086,
-0.42055684328079224,
0.030866310000419617,
0.12095163762569427,
-0.3502526581287384,
-0.13638243079185486,
-0.07771354913711548,
0.25485971570014954,
-0.06355241686105728,
-0.08258496224880219,
0.02812514267861843,
0.0814979076385498,
0.20699119567871094,
-0.10994171351194382,
0.19935405254364014,
-0.22345614433288574,
0.1830148696899414,
-0.9645143151283264,
-0.13080143928527832,
-0.14726638793945312,
0.1913764476776123,
-0.25774186849594116,
-0.17897939682006836,
0.43411096930503845,
-0.08722627907991409,
-0.11872807145118713,
-0.22957701981067657,
-0.24369992315769196,
-0.04099906235933304,
0.16634085774421692,
-0.17335374653339386,
0.11766374111175537,
-0.13257147371768951,
0.10731863975524902,
0.02758760005235672,
-0.27945464849472046,
0.0020813271403312683,
-0.024791479110717773,
0.009903916157782078,
0.07816746830940247,
0.0711497887969017,
0.18164245784282684,
-0.021975606679916382,
0.021003995090723038,
0.12971824407577515,
-0.26574984192848206,
0.1961740106344223,
-0.3009655177593231,
0.5963128805160522,
-0.0726570412516594,
-0.20561495423316956,
-0.30401962995529175,
0.10484027862548828,
-0.18956121802330017,
0.035871751606464386,
0.7984707951545715,
0.3465045094490051,
0.2114376723766327,
-0.05853816494345665,
-0.012943926267325878,
-0.3660305142402649,
0.06078508496284485,
0.232184037566185,
0.26529666781425476,
-0.29160991311073303,
0.0814819186925888,
-0.054973065853118896,
0.12588322162628174,
-0.2445664405822754,
-0.15436497330665588,
0.29313454031944275,
-0.06022310256958008,
0.38883936405181885,
0.19152028858661652,
0.27662193775177,
-0.17786237597465515,
0.14986558258533478,
0.06394936144351959,
-0.005274247378110886,
-0.07603871822357178,
-0.036732763051986694,
0.09158516675233841,
0.03588303178548813,
0.11087510734796524,
0.33368536829948425,
-0.27492260932922363,
-0.08628876507282257,
-0.2926298975944519,
0.12979118525981903,
0.0854739397764206,
-0.04778497666120529,
0.5729210376739502,
0.21762299537658691,
0.23502962291240692,
0.07817330956459045,
0.08138944953680038,
-0.29461124539375305,
-0.14818646013736725,
-0.23809830844402313,
-0.027845971286296844,
-0.2858341932296753,
0.213645339012146,
-0.31936436891555786,
-0.18494248390197754,
-0.14761289954185486,
0.1037764623761177,
0.04741144925355911,
0.005106179043650627,
0.0725998729467392,
0.3677276372909546,
-0.29352474212646484,
0.22599951922893524,
0.16102273762226105,
0.08042112737894058,
0.10646404325962067,
-0.07786654680967331,
-0.015065431594848633,
-0.25138553977012634,
0.6209192276000977,
-0.6090940237045288,
-0.4626964330673218,
-0.02500416338443756,
0.23392334580421448,
-0.07945085316896439,
-0.20329289138317108,
-0.3256651759147644,
-0.14631907641887665,
0.2644880414009094,
-0.11789598315954208,
-0.02370278164744377,
0.04661649838089943,
0.10577155649662018,
0.21822111308574677,
-0.1481933891773224,
-0.044611915946006775,
0.14650839567184448,
-0.12433343380689621,
0.1095724105834961,
-0.38793057203292847
] |
https://github.com/huggingface/datasets/issues/4745 | Allow `list_datasets` to include private datasets | Great, thanks @lhoestq the workaround works! I think it would be intuitive to have the support directly in `datasets` but it makes sense to wait given that the workaround exists :) | I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually. | 31 | Allow `list_datasets` to include private datasets
I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually.
Great, thanks @lhoestq the workaround works! I think it would be intuitive to have the support directly in `datasets` but it makes sense to wait given that the workaround exists :) | [
-0.36706212162971497,
0.2388341724872589,
-0.21399037539958954,
0.16870927810668945,
-0.03367892652750015,
0.21034163236618042,
0.4328232705593109,
0.3512451946735382,
0.42124444246292114,
0.17374423146247864,
-0.3727339804172516,
0.3447163701057434,
-0.16999661922454834,
0.113786481320858,
0.08944906294345856,
0.2349487543106079,
0.13299983739852905,
-0.05174523591995239,
0.3729441165924072,
-0.19767184555530548,
-0.38628482818603516,
-0.07450836151838303,
-0.19200527667999268,
-0.13617216050624847,
0.187923401594162,
-0.13524796068668365,
0.3475063741207123,
-0.03686477243900299,
0.08341307938098907,
-0.43049386143684387,
0.062067724764347076,
0.48725295066833496,
0.32014352083206177,
-0.12754902243614197,
-0.00011768154945457354,
0.12564750015735626,
0.36347901821136475,
0.12227831780910492,
-0.2048344910144806,
-0.17739315330982208,
-0.7752360105514526,
-0.183186873793602,
0.37915003299713135,
-0.06750836968421936,
0.001932986080646515,
-0.05510533228516579,
-0.04446539282798767,
-0.3057599663734436,
-0.04096892476081848,
0.266637921333313,
0.11513803154230118,
0.34297144412994385,
-0.14772817492485046,
-0.23240168392658234,
0.07491151988506317,
0.2700473666191101,
-0.18616396188735962,
-0.5420442819595337,
0.1859528124332428,
0.11481000483036041,
0.09904571622610092,
-0.07660636305809021,
-0.14408396184444427,
-0.07600937783718109,
0.374030739068985,
-0.00651091244071722,
-0.3650347590446472,
-0.4222412109375,
-0.00722016766667366,
0.1523451954126358,
0.8936988115310669,
-0.1337336301803589,
-0.217032328248024,
-0.17997023463249207,
-0.03144734352827072,
-0.04539738595485687,
-0.013362593948841095,
0.04906781017780304,
-0.14029085636138916,
0.18159303069114685,
-0.2603338956832886,
-0.39232632517814636,
-0.29292917251586914,
0.34991538524627686,
0.08434316515922546,
0.24884650111198425,
0.15971772372722626,
0.16410820186138153,
-0.005481287837028503,
-0.2800178527832031,
0.39399453997612,
-0.3221670389175415,
0.251199334859848,
-0.050155024975538254,
-0.3038809299468994,
-0.11475907266139984,
0.036147717386484146,
0.317741334438324,
0.3548820912837982,
0.4428035616874695,
-0.2581217288970947,
0.20347318053245544,
-0.3826029300689697,
0.1535971760749817,
0.026797639206051826,
0.012424059212207794,
0.2810089886188507,
0.5037934184074402,
0.3869740962982178,
-0.05108984559774399,
0.018456730991601944,
0.07277079671621323,
-0.2190679907798767,
0.25070682168006897,
-0.1880297213792801,
-0.049350105226039886,
-0.0964193269610405,
-0.18820461630821228,
-0.10332073271274567,
0.08639388531446457,
-0.061595119535923004,
-0.14113426208496094,
0.4429487884044647,
0.41419079899787903,
0.3382381200790405,
-0.25615251064300537,
-0.27781549096107483,
-0.010903406888246536,
0.4232614040374756,
-0.277739018201828,
-0.17076781392097473,
-0.24722827970981598,
0.08330234885215759,
0.24004317820072174,
0.16470807790756226,
0.10328388214111328,
0.07795065641403198,
0.020643748342990875,
0.5048190355300903,
0.07035648077726364,
0.113078773021698,
0.19836975634098053,
0.3319365978240967,
0.30724021792411804,
0.19007360935211182,
0.08370748162269592,
0.16832230985164642,
-0.23296453058719635,
-0.33890289068222046,
0.22506383061408997,
-0.32952141761779785,
-0.5621995329856873,
-0.04529981315135956,
-0.013248884119093418,
-0.24617813527584076,
0.05686107277870178,
-0.331147164106369,
0.21595169603824615,
-0.1011253371834755,
-0.014634720981121063,
0.14613576233386993,
-0.059110723435878754,
-0.11751869320869446,
-0.26138851046562195,
-0.005888456478714943,
0.1523573398590088,
-0.2587636411190033,
0.1316830962896347,
-0.34677964448928833,
-0.16050687432289124,
-0.19668981432914734,
0.0022624097764492035,
-0.3833676874637604,
-0.007048711180686951,
-0.268818736076355,
0.42949020862579346,
0.33079737424850464,
-0.36408132314682007,
-0.41049259901046753,
0.06723304092884064,
0.18162591755390167,
-0.1734423190355301,
0.017430730164051056,
0.1959564983844757,
0.39058917760849,
-0.13028040528297424,
-0.010361477732658386,
0.324968159198761,
0.20803222060203552,
-0.23726192116737366,
0.18736889958381653,
-0.1418790966272354,
0.07231218367815018,
0.16791276633739471,
0.14298135042190552,
0.1604366898536682,
0.3073934018611908,
0.2894781231880188,
0.4058762490749359,
-0.12519684433937073,
-0.03179975599050522,
0.0831952691078186,
0.21208974719047546,
0.1971767246723175,
0.07767514884471893,
-0.0837191641330719,
-0.27012813091278076,
0.176863431930542,
0.07247205078601837,
0.15481463074684143,
-0.04987761378288269,
-0.2815423011779785,
0.14959636330604553,
0.12148972600698471,
-0.22861643135547638,
0.22266103327274323,
0.08782437443733215,
0.2937684655189514,
-0.08397949486970901,
-0.10474932193756104,
-0.11574606597423553,
0.1793428212404251,
-0.2553686797618866,
0.08595634996891022,
-0.24785412847995758,
0.21188713610172272,
0.37987974286079407,
0.3324950933456421,
0.13522139191627502,
0.26990368962287903,
0.4176129400730133,
0.11079934239387512,
-0.04726044088602066,
0.030671317130327225,
0.286002516746521,
-0.22991420328617096,
0.373394638299942,
0.6579082012176514,
0.1499340534210205,
-0.2262495458126068,
0.2599004805088043,
0.1511669009923935,
-0.05870327353477478,
-0.0016490407288074493,
0.262758731842041,
0.19231939315795898,
0.1060369610786438,
0.36008599400520325,
-0.2614601254463196,
0.2320544719696045,
0.09774354100227356,
0.16149510443210602,
-0.23886001110076904,
-0.24091584980487823,
-0.12322725355625153,
0.02889026515185833,
0.1265934705734253,
-0.3479287624359131,
-0.1733265221118927,
0.13320258259773254,
-0.07628689706325531,
-0.13263210654258728,
0.1281042993068695,
0.07798286527395248,
-0.195857435464859,
0.16219764947891235,
0.4802921414375305,
0.294720321893692,
0.2597461938858032,
0.16737580299377441,
-0.09170792996883392,
-0.12220575660467148,
-0.02712259441614151,
-0.027964189648628235,
0.21634510159492493,
0.30517417192459106,
-0.1101374700665474,
-0.33444902300834656,
0.3261150121688843,
-0.16562099754810333,
-0.1544458270072937,
-0.3921421766281128,
-0.04638396203517914,
0.22335684299468994,
-0.21241053938865662,
-0.16197457909584045,
-0.39964431524276733,
-0.01899123191833496,
0.581623375415802,
-0.1357109546661377,
-0.28818127512931824,
-0.16760776937007904,
0.08648833632469177,
-0.019909147173166275,
0.05695728585124016,
0.1562148928642273,
-0.19582828879356384,
0.5382550954818726,
-0.0012976452708244324,
-0.38139256834983826,
-0.06328044831752777,
0.22697488963603973,
0.1177305206656456,
0.010805610567331314,
0.3764997720718384,
-0.12818537652492523,
0.16603519022464752,
0.25871771574020386,
0.08955446630716324,
-0.5459907054901123,
-0.18918193876743317,
0.11369197070598602,
-0.14731614291667938,
-0.07651777565479279,
0.06429122388362885,
-0.17277215421199799,
0.027743056416511536,
-0.0569884330034256,
-0.08714532852172852,
0.07365427166223526,
0.06756435334682465,
-0.07318276166915894,
-0.25537073612213135,
-0.17737628519535065,
0.011058960109949112,
0.17075708508491516,
-0.331607460975647,
-0.2264544665813446,
0.3638684153556824,
0.23910464346408844,
0.22211337089538574,
-0.018710490316152573,
-0.21964120864868164,
-0.029868748039007187,
-0.3923629820346832,
-0.332967072725296,
-0.2849951982498169,
-0.30110567808151245,
0.47627338767051697,
-0.3707476854324341,
-0.048503730446100235,
0.3459472954273224,
-0.14072848856449127,
0.10591687262058258,
-0.034466300159692764,
-0.4305354952812195,
-0.3459790050983429,
-0.2408500462770462,
0.40378013253211975,
-0.1252685934305191,
-0.17641040682792664,
0.2052210122346878,
-0.04260258376598358,
0.15616007149219513,
-0.20081138610839844,
-0.4927428960800171,
-0.004002660512924194,
-0.15591835975646973,
0.16653762757778168,
0.03962859883904457,
-0.3194517195224762,
0.0613044835627079,
0.42954689264297485,
0.4989292025566101,
0.21126596629619598,
-0.042282313108444214,
0.09942413866519928,
0.19793564081192017,
0.22248363494873047,
-0.22306396067142487,
-0.048589304089546204,
0.07483627647161484,
-0.4194849133491516,
0.39356887340545654,
0.05889568105340004,
-0.18188218772411346,
0.09347370266914368,
-0.06380236148834229,
-0.19363242387771606,
-0.16342423856258392,
-0.11491964757442474,
0.09390205144882202,
0.39222779870033264,
0.1135791540145874,
0.0467674657702446,
-0.4384177625179291,
-0.26042845845222473,
-0.06895259022712708,
0.22705894708633423,
0.31060656905174255,
-0.02746429108083248,
-0.39947062730789185,
-0.2859184145927429,
-0.3210241198539734,
0.4295006990432739,
-0.15392060577869415,
0.38429370522499084,
-0.16118843853473663,
0.22606489062309265,
0.0024302229285240173,
0.3970400094985962,
0.3994870185852051,
-0.6244006156921387,
-0.14543595910072327,
-0.027180641889572144,
-0.14008840918540955,
0.0019267629832029343,
0.0020979121327400208,
-0.0008991844952106476,
-0.00996313150972128,
-0.30980145931243896,
0.49097517132759094,
-0.03611854463815689,
-0.08136773854494095,
-0.13607798516750336,
-0.16313926875591278,
0.06617879867553711,
-0.1582764983177185,
0.26039665937423706,
-0.1709814965724945,
-0.2809402346611023,
-0.013283662497997284,
-0.06459847837686539,
0.09170733392238617,
-0.16304711997509003,
-0.024655379354953766,
0.1255369335412979,
-0.1236652210354805,
0.3503926396369934,
0.10944679379463196,
0.3288802206516266,
0.2725203335285187,
0.1499277651309967,
0.18310299515724182,
-0.15970702469348907,
0.3509368598461151,
0.3550317883491516,
-0.0353570319712162,
-0.48166370391845703,
-0.048880718648433685,
-0.04044137895107269,
0.33749672770500183,
0.2481462061405182,
-0.27005112171173096,
0.43671250343322754,
-0.08702483773231506,
-0.05876375734806061,
-0.03062070906162262,
0.055804893374443054,
0.004417311400175095,
-0.20015959441661835,
-0.38684573769569397,
-0.43184715509414673,
0.39576956629753113,
0.05271896347403526,
-0.22470137476921082,
0.06251956522464752,
0.13317671418190002,
-0.3962124288082123,
0.16987286508083344,
0.1227690577507019,
0.6613816618919373,
-0.04093248397111893,
0.0786912739276886,
-0.12176690250635147,
0.3366805911064148,
0.4603198170661926,
-0.32054561376571655,
0.005958466790616512,
-0.21562297642230988,
-0.045602601021528244,
-0.06762859225273132,
-0.2164524495601654,
0.13727784156799316,
-0.04485712945461273,
-0.020507406443357468,
0.03561902791261673,
0.06334489583969116,
0.6129620671272278,
-0.13325507938861847,
0.022147394716739655,
-0.10822074860334396,
-0.28440508246421814,
0.1706509292125702,
0.12762172520160675,
-0.1285833865404129,
-0.08366617560386658,
0.019593436270952225,
-0.30840378999710083,
-0.17978353798389435,
-0.12153691053390503,
-0.577464759349823,
-0.22904881834983826,
-0.08879165351390839,
-0.14514519274234772,
0.10900703072547913,
-0.3138588070869446,
0.5819606184959412,
0.16169241070747375,
0.37764692306518555,
0.3670502007007599,
-0.5112640261650085,
-0.026398230344057083,
-0.31137922406196594,
0.09294597059488297,
-0.32816776633262634,
-0.19476816058158875,
-0.05372770130634308,
0.08840321749448776,
0.11379536241292953,
0.06509534269571304,
0.16717331111431122,
-0.6044337153434753,
-0.7001526951789856,
0.39260005950927734,
0.4514414072036743,
-0.19215770065784454,
-0.024884629994630814,
0.07110810279846191,
-0.29025354981422424,
-0.1973535567522049,
0.06043929234147072,
0.19380024075508118,
-0.2033034712076187,
0.16358338296413422,
-0.06948477029800415,
0.01677827537059784,
-0.015484269708395004,
-0.07455753535032272,
0.08173774182796478,
-0.11078941076993942,
0.07441255450248718,
0.08583524823188782,
-0.051229942589998245,
-0.1898830235004425,
0.1903705894947052,
0.20110909640789032,
0.028151601552963257,
0.0386795774102211,
0.09426373988389969,
0.20733730494976044,
-0.23328831791877747,
-0.013552229851484299,
-0.23226265609264374,
0.09482771158218384,
-0.11439825594425201,
-0.3459298014640808,
-0.06608036905527115,
0.2031484991312027,
-0.5850285291671753,
0.25747084617614746,
-0.1947292685508728,
0.08332748711109161,
-0.35277512669563293,
-0.35858142375946045,
-0.17718514800071716,
-0.003363889642059803,
-0.40395382046699524,
-0.12914979457855225,
-0.23245951533317566,
0.28267526626586914,
0.16822119057178497,
-0.15258313715457916,
-0.01739555224776268,
0.1310594528913498,
-0.22027286887168884,
-0.1371343731880188,
0.06243151053786278,
0.17035041749477386,
0.40995562076568604,
0.10063835978507996,
-0.05841860920190811,
-0.1813204139471054,
-0.11605532467365265,
-0.22672472894191742,
0.11129075288772583,
0.10583000630140305,
-0.00922403484582901,
0.1509542018175125,
0.3444161117076874,
-0.0947192832827568,
0.15058252215385437,
0.21209126710891724,
0.12989544868469238,
0.3302396535873413,
0.11264333128929138,
0.2743654251098633,
-0.17468492686748505,
-0.01798982173204422,
0.12170828133821487,
0.3902118504047394,
0.2790594696998596,
0.2918962240219116,
0.3762878179550171,
-0.0758647471666336,
-0.0742800310254097,
0.15801823139190674,
0.2097560167312622,
-0.054454706609249115,
-0.27792030572891235,
0.28458866477012634,
0.1707790493965149,
0.03737010434269905,
-0.12561240792274475,
-0.4201645255088806,
0.1399075984954834,
0.17416749894618988,
0.08974139392375946,
0.39259326457977295,
0.5176927447319031,
-0.026518356055021286,
0.17881113290786743,
-0.10093715041875839,
0.3294505178928375,
-0.08204007148742676,
0.1609763354063034,
0.49338576197624207,
0.03857726976275444,
0.15210364758968353,
0.33562561869621277,
0.30777570605278015,
-0.14716601371765137,
0.8245278596878052,
-0.11464451998472214,
0.5570521950721741,
0.2904829978942871,
-0.239164799451828,
0.6209412217140198,
-0.33673903346061707,
0.05896568298339844,
-0.37014275789260864,
0.0642065703868866,
0.08114716410636902,
-0.33345523476600647,
-0.29841262102127075,
-0.004797038622200489,
0.36680617928504944,
-0.04443206638097763,
-0.24410183727741241,
0.0011334531009197235,
0.10197201371192932,
-0.0731736421585083,
-0.19705218076705933,
0.2387300729751587,
-0.2128371149301529,
0.07152551412582397,
-0.8064584136009216,
-0.2017492949962616,
-0.17852963507175446,
0.14087775349617004,
-0.1339322179555893,
-0.012814491987228394,
0.45043835043907166,
-0.19166690111160278,
-0.11261962354183197,
-0.10786173492670059,
-0.3633868098258972,
-0.03767867386341095,
0.24742905795574188,
-0.22955097258090973,
0.04291367158293724,
-0.16453978419303894,
0.19555199146270752,
-0.024865929037332535,
-0.3250400125980377,
-0.04782979190349579,
-0.021618245169520378,
0.0955478847026825,
0.1144924983382225,
-0.017548486590385437,
0.21108472347259521,
-0.0022755758836865425,
0.08781237155199051,
0.16751356422901154,
-0.2056681364774704,
0.11432844400405884,
-0.23045191168785095,
0.4538431763648987,
0.03901989758014679,
-0.2747111916542053,
-0.1288450062274933,
0.11781005561351776,
-0.06364979594945908,
-0.037810515612363815,
0.818391740322113,
0.3460392951965332,
0.17611443996429443,
-0.14800240099430084,
-0.004304997622966766,
-0.3734719455242157,
0.07416550815105438,
0.13394878804683685,
0.1956176459789276,
-0.21906444430351257,
-0.10775358974933624,
-0.046095576137304306,
0.23942583799362183,
-0.24243706464767456,
-0.14481166005134583,
0.26544860005378723,
-0.021061066538095474,
0.47063151001930237,
0.20701292157173157,
0.3094027042388916,
-0.17696325480937958,
0.13252170383930206,
0.10601551830768585,
0.008448995649814606,
-0.04481073096394539,
0.11293220520019531,
0.07881633192300797,
-0.022144321352243423,
0.10184157639741898,
0.4040813744068146,
-0.1318042278289795,
-0.11185741424560547,
-0.3490416407585144,
0.07277342677116394,
0.1809302568435669,
0.012850325554609299,
0.6197221875190735,
0.18326018750667572,
0.3079884350299835,
0.02962547540664673,
0.2302536964416504,
-0.3439251482486725,
-0.1351187378168106,
-0.23523716628551483,
-0.04484337568283081,
-0.29398050904273987,
0.10785265266895294,
-0.2699880599975586,
-0.05020516738295555,
-0.12441295385360718,
-0.07649581879377365,
-0.10837870091199875,
0.06872117519378662,
0.0651123970746994,
0.2930993139743805,
-0.3404659032821655,
0.16901083290576935,
0.10383264720439911,
0.014586366713047028,
0.21712349355220795,
-0.12376073747873306,
-0.06823068857192993,
-0.19640634953975677,
0.5136927366256714,
-0.5404394268989563,
-0.5466383099555969,
0.05429902672767639,
0.11460317671298981,
-0.11490216106176376,
-0.1671341210603714,
-0.21061989665031433,
-0.2557389438152313,
0.3695271909236908,
-0.12176615744829178,
0.05543702468276024,
0.017948415130376816,
0.20332534611225128,
0.25830063223838806,
-0.18333543837070465,
-0.09645314514636993,
0.21217089891433716,
-0.11522260308265686,
0.015295162796974182,
-0.37484729290008545
] |
https://github.com/huggingface/datasets/issues/4745 | Allow `list_datasets` to include private datasets | i also think that going forward we should replace more and more implementations inside datasets with the corresponding ones from `huggingface_hub` (same as we're doing in `transformers`) | I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually. | 27 | Allow `list_datasets` to include private datasets
I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually.
i also think that going forward we should replace more and more implementations inside datasets with the corresponding ones from `huggingface_hub` (same as we're doing in `transformers`) | [
-0.31781333684921265,
0.045434728264808655,
-0.18101336061954498,
0.2624085247516632,
-0.08682224899530411,
0.20398208498954773,
0.4568547010421753,
0.338810533285141,
0.45900219678878784,
0.16035446524620056,
-0.4918583631515503,
0.2582712173461914,
-0.12066314369440079,
0.2042899876832962,
0.17530015110969543,
0.1814025342464447,
0.123785600066185,
-0.04277612268924713,
0.27339082956314087,
-0.2021820992231369,
-0.41075408458709717,
-0.04142926633358002,
-0.12640032172203064,
-0.028874576091766357,
0.13459816575050354,
-0.15183815360069275,
0.31662771105766296,
0.004062294960021973,
0.12343131750822067,
-0.3565669357776642,
0.09315629303455353,
0.5310347676277161,
0.3128177523612976,
-0.04481958597898483,
-0.00012181424972368404,
0.13215838372707367,
0.3194454312324524,
0.1503314971923828,
-0.16823670268058777,
-0.05395561456680298,
-0.7018857002258301,
-0.2576485276222229,
0.39612430334091187,
-0.07416700571775436,
0.010801579803228378,
-0.02630053088068962,
-0.06004771590232849,
-0.12048957496881485,
0.10332942008972168,
0.13727237284183502,
0.07432921975851059,
0.48915669322013855,
-0.1873457431793213,
-0.17230726778507233,
0.030300550162792206,
0.3728104829788208,
-0.17919273674488068,
-0.4917876124382019,
0.1576475203037262,
0.18661952018737793,
0.03280778229236603,
-0.0689983069896698,
-0.1319602131843567,
-0.09373435378074646,
0.4663950800895691,
0.049111463129520416,
-0.445634663105011,
-0.36384913325309753,
-0.04190095514059067,
0.270222932100296,
0.8097363710403442,
-0.24951082468032837,
-0.29785972833633423,
-0.3052615821361542,
-0.09028858691453934,
-0.154806986451149,
-0.008901149034500122,
0.047491468489170074,
-0.13119472563266754,
0.23091137409210205,
-0.2626397907733917,
-0.4218718409538269,
-0.2247069925069809,
0.22086606919765472,
0.10476677119731903,
0.2948566675186157,
0.14835438132286072,
0.14804530143737793,
0.07378512620925903,
-0.2450055032968521,
0.3692907691001892,
-0.307284414768219,
0.3110627830028534,
-0.14320026338100433,
-0.3497806787490845,
-0.09317126870155334,
0.09685788303613663,
0.4076959490776062,
0.39213377237319946,
0.5218028426170349,
-0.23803986608982086,
0.1971486210823059,
-0.40792399644851685,
0.12964344024658203,
0.006299678236246109,
-0.010777220129966736,
0.12375456094741821,
0.5040737390518188,
0.3565201163291931,
-0.05082112178206444,
0.15259811282157898,
0.12354016304016113,
-0.12084110826253891,
0.30305734276771545,
-0.13493064045906067,
-0.11219067126512527,
-0.09637854248285294,
-0.17491398751735687,
-0.026774756610393524,
0.05809831991791725,
-0.037063635885715485,
-0.135182186961174,
0.4463566243648529,
0.30607008934020996,
0.34222766757011414,
-0.23026049137115479,
-0.20391041040420532,
-0.009225573390722275,
0.4235547184944153,
-0.24486637115478516,
-0.18192991614341736,
-0.2950044870376587,
0.10290679335594177,
0.3104628920555115,
0.08897168934345245,
0.003407364711165428,
0.10474707931280136,
-0.00930359959602356,
0.5362982153892517,
0.1260627955198288,
0.016662878915667534,
0.23983068764209747,
0.26779699325561523,
0.3045505881309509,
0.05513283237814903,
0.024630757048726082,
0.10906662046909332,
-0.16264919936656952,
-0.390096515417099,
0.10176387429237366,
-0.29656004905700684,
-0.5700100064277649,
0.0071883294731378555,
-0.06803842633962631,
-0.30738842487335205,
0.10765684396028519,
-0.42262354493141174,
0.24475298821926117,
-0.1159755066037178,
0.021059181541204453,
0.23158442974090576,
-0.004283618181943893,
-0.15383128821849823,
-0.18987607955932617,
0.040286190807819366,
0.2294594645500183,
-0.16061846911907196,
0.03914228826761246,
-0.22747209668159485,
-0.16816386580467224,
-0.24613738059997559,
0.1985463798046112,
-0.4102415144443512,
0.10260704904794693,
-0.2992287874221802,
0.33685624599456787,
0.29448774456977844,
-0.3756820857524872,
-0.4880000054836273,
-0.0058141546323895454,
0.138082817196846,
-0.12584514915943146,
0.05141797661781311,
0.23529744148254395,
0.36639833450317383,
-0.1660965532064438,
0.027539297938346863,
0.3107585906982422,
0.14692331850528717,
-0.27827519178390503,
0.23997808992862701,
-0.19444191455841064,
0.13841868937015533,
0.13390430808067322,
0.16300883889198303,
0.24092358350753784,
0.1957365870475769,
0.29280930757522583,
0.37328845262527466,
-0.0880361944437027,
-0.10179751366376877,
0.08447781205177307,
0.08903773874044418,
0.19903405010700226,
0.10157691687345505,
-0.10174374282360077,
-0.378162145614624,
0.13554593920707703,
-0.004778865724802017,
0.11464197933673859,
-0.0798456072807312,
-0.3250800371170044,
0.1400909721851349,
0.10624820739030838,
-0.17291302978992462,
0.2513011693954468,
-0.010253645479679108,
0.3352575898170471,
-0.015640271827578545,
-0.23132023215293884,
-0.22569890320301056,
0.2702428698539734,
-0.2456004023551941,
0.17424041032791138,
-0.36684268712997437,
0.28619667887687683,
0.4040832817554474,
0.3195793926715851,
0.08366116881370544,
0.35878774523735046,
0.28967931866645813,
0.03490900993347168,
0.010176698677241802,
0.02996433526277542,
0.22488375008106232,
-0.13576564192771912,
0.36274755001068115,
0.7357670068740845,
0.18676799535751343,
-0.2426815927028656,
0.24417854845523834,
0.09654346108436584,
-0.0775286853313446,
-0.025466710329055786,
0.2646915316581726,
0.13735109567642212,
0.07963168621063232,
0.37488853931427,
-0.2968776524066925,
0.15716344118118286,
0.02319534681737423,
0.212735116481781,
-0.3382589817047119,
-0.16074201464653015,
-0.13070906698703766,
0.10037130117416382,
0.1740153729915619,
-0.2239549607038498,
-0.1858087182044983,
0.003705129027366638,
-0.01451512798666954,
-0.21690058708190918,
0.11518731713294983,
0.12605345249176025,
-0.180998295545578,
0.15326687693595886,
0.41111260652542114,
0.1602785885334015,
0.17804141342639923,
0.17682993412017822,
-0.11791794002056122,
-0.0578126534819603,
-0.005327547900378704,
-0.003824998624622822,
0.1265130490064621,
0.39636170864105225,
-0.15865270793437958,
-0.3441755771636963,
0.2836368680000305,
-0.11479423195123672,
-0.18305516242980957,
-0.4464566707611084,
-0.09955809265375137,
0.2086251825094223,
-0.22371260821819305,
-0.11104317754507065,
-0.33843040466308594,
-0.036879122257232666,
0.502200186252594,
-0.15832068026065826,
-0.3609110116958618,
-0.10799041390419006,
-0.028664857149124146,
-0.06602473556995392,
0.11346980929374695,
0.15749424695968628,
-0.11992339789867401,
0.6987444162368774,
-0.05875580757856369,
-0.3224361836910248,
-0.16652804613113403,
0.20715463161468506,
0.12947094440460205,
-0.05929725617170334,
0.3368796408176422,
-0.07574809342622757,
0.17877165973186493,
0.12161434441804886,
0.10386984050273895,
-0.5793867707252502,
-0.17533674836158752,
0.11178331077098846,
-0.15557178854942322,
-0.1250922679901123,
0.1311831772327423,
-0.12843018770217896,
0.009161997586488724,
-0.09685494005680084,
-0.061609458178281784,
0.08234627544879913,
0.07304917275905609,
-0.023043056949973106,
-0.2426622360944748,
-0.14509868621826172,
0.08198164403438568,
0.241961270570755,
-0.35819050669670105,
-0.26459357142448425,
0.4512753486633301,
0.14424332976341248,
0.1827152669429779,
0.06931295245885849,
-0.3315321207046509,
0.027058318257331848,
-0.42588862776756287,
-0.2869742512702942,
-0.2187511920928955,
-0.35353636741638184,
0.43547624349594116,
-0.19833537936210632,
0.020049892365932465,
0.15113922953605652,
-0.22311478853225708,
0.0621003657579422,
-0.052095960825681686,
-0.4703522324562073,
-0.39733457565307617,
-0.3469991981983185,
0.4095437526702881,
-0.08834783732891083,
-0.042778536677360535,
0.25514182448387146,
-0.058350998908281326,
0.2401077002286911,
-0.09417569637298584,
-0.5934645533561707,
-0.014748170971870422,
-0.09882443398237228,
0.09543577581644058,
0.151143416762352,
-0.26690301299095154,
0.013808347284793854,
0.42923158407211304,
0.510776162147522,
0.10996909439563751,
-0.030069448053836823,
0.08075258880853653,
0.23266170918941498,
0.16696104407310486,
-0.27239036560058594,
-0.0008506367448717356,
0.11325676739215851,
-0.3818850517272949,
0.3271389603614807,
0.025741539895534515,
-0.05615205317735672,
0.1352490931749344,
-0.08396479487419128,
-0.22897785902023315,
-0.16805456578731537,
-0.09867988526821136,
0.18893910944461823,
0.4001334309577942,
0.11503107845783234,
0.043280139565467834,
-0.38759270310401917,
-0.17320889234542847,
0.03035932034254074,
0.256438672542572,
0.348758339881897,
-0.015389625914394855,
-0.3824314475059509,
-0.3470354676246643,
-0.3483823537826538,
0.4010779857635498,
-0.13157124817371368,
0.30613455176353455,
-0.15217667818069458,
0.2366933822631836,
-0.025299347937107086,
0.42621973156929016,
0.4955233931541443,
-0.5042051672935486,
-0.16347037255764008,
-0.08454692363739014,
-0.2270507961511612,
-0.03325150907039642,
-0.011485759168863297,
-0.012564834207296371,
-0.11295146495103836,
-0.2981719374656677,
0.5525553822517395,
-0.09973537921905518,
-0.09620080888271332,
-0.061297014355659485,
-0.03814425691962242,
0.06804487109184265,
-0.1835564821958542,
0.22126977145671844,
-0.21069404482841492,
-0.3025062382221222,
0.10088710486888885,
-0.08709687739610672,
0.034001272171735764,
-0.0937204360961914,
-0.05981887876987457,
0.156732976436615,
-0.18247529864311218,
0.3270103931427002,
0.1650376170873642,
0.3098677396774292,
0.304038941860199,
0.08805204927921295,
0.26170551776885986,
-0.08496654033660889,
0.2651900053024292,
0.3935061991214752,
-0.11378757655620575,
-0.5254891514778137,
-0.09034454077482224,
0.0965622216463089,
0.32420995831489563,
0.30575376749038696,
-0.17310944199562073,
0.48206838965415955,
-0.0019766539335250854,
0.020277850329875946,
-0.1199551448225975,
0.0674126148223877,
0.06529760360717773,
-0.12127520143985748,
-0.3843275010585785,
-0.472567617893219,
0.4815966784954071,
0.12878617644309998,
-0.20739099383354187,
-0.040469326078891754,
0.35755234956741333,
-0.41490790247917175,
0.14874045550823212,
0.061472803354263306,
0.7581146955490112,
-0.08063127100467682,
0.10118231177330017,
-0.09596384316682816,
0.31574463844299316,
0.5574675798416138,
-0.3025519847869873,
-0.01593438908457756,
-0.14641714096069336,
-0.09047792106866837,
-0.10994163155555725,
-0.26389142870903015,
0.0801071971654892,
-0.17706768214702606,
-0.009944945573806763,
0.09032298624515533,
0.03794393688440323,
0.6139427423477173,
-0.12940441071987152,
0.1015981137752533,
-0.1166243627667427,
-0.4028676152229309,
0.09893039613962173,
0.06834591180086136,
-0.14929252862930298,
0.008378466591238976,
0.01532730646431446,
-0.268019437789917,
-0.11656686663627625,
-0.09740719199180603,
-0.5779514908790588,
-0.2847950756549835,
-0.06006366387009621,
-0.07834183424711227,
0.22512279450893402,
-0.299003541469574,
0.516839325428009,
0.2449951469898224,
0.4779319763183594,
0.322595477104187,
-0.4760459065437317,
-0.04648296907544136,
-0.3599902391433716,
0.1268751174211502,
-0.33480462431907654,
-0.14667823910713196,
-0.04123362898826599,
0.1330414116382599,
0.012861110270023346,
0.03785572946071625,
0.21545839309692383,
-0.6155288815498352,
-0.5920603275299072,
0.24850314855575562,
0.4105091691017151,
-0.21642173826694489,
0.09228619933128357,
0.10147780179977417,
-0.22410650551319122,
-0.22724369168281555,
0.008269017562270164,
0.25490787625312805,
-0.23533011972904205,
0.12346231937408447,
0.022678876295685768,
-0.03076428547501564,
-0.046515803784132004,
-0.09107578545808792,
0.08384878933429718,
-0.13294515013694763,
0.0426940843462944,
0.09095807373523712,
-0.025717653334140778,
-0.1481075882911682,
0.16107290983200073,
0.33136582374572754,
0.01700202375650406,
0.060177188366651535,
0.05309220030903816,
0.12061925232410431,
-0.3269698917865753,
0.05135520175099373,
-0.08519852161407471,
-0.00854511559009552,
-0.1492614895105362,
-0.2824336886405945,
-0.20962947607040405,
0.3614580035209656,
-0.5165104269981384,
0.31314924359321594,
-0.11102404445409775,
0.08187809586524963,
-0.37557607889175415,
-0.3431617021560669,
-0.13223659992218018,
-0.07395725697278976,
-0.42908722162246704,
-0.1663459837436676,
-0.1644258201122284,
0.24691241979599,
0.18665075302124023,
-0.2136465460062027,
-0.07086864113807678,
0.21365685760974884,
-0.21231910586357117,
-0.10543828457593918,
-0.04228794202208519,
0.19576869904994965,
0.3013867139816284,
0.07965153455734253,
-0.04586564004421234,
-0.1304081231355667,
-0.04594526067376137,
-0.37174445390701294,
0.19455279409885406,
0.06857359409332275,
0.14128093421459198,
0.1601485311985016,
0.3297306299209595,
-0.0930425301194191,
0.09036587178707123,
0.20864048600196838,
0.1737547665834427,
0.23530313372612,
0.1263648271560669,
0.2662108838558197,
-0.18686145544052124,
-0.04432079568505287,
0.11841895431280136,
0.4580790102481842,
0.47488391399383545,
0.2692895829677582,
0.30613452196121216,
-0.05663646012544632,
-0.11792594194412231,
0.19340598583221436,
0.2624768912792206,
-0.0682603269815445,
-0.2651441991329193,
0.2832995653152466,
0.14179986715316772,
-0.009744295850396156,
-0.12505289912223816,
-0.3367510437965393,
0.2158617228269577,
0.2478981763124466,
0.09579744935035706,
0.5279004573822021,
0.5156248807907104,
0.05260290205478668,
0.10195959359407425,
-0.17191579937934875,
0.3510754108428955,
-0.05298134684562683,
0.2175934910774231,
0.5017766952514648,
0.054268110543489456,
0.2389620691537857,
0.3636815547943115,
0.37026113271713257,
-0.07320526987314224,
0.7937950491905212,
-0.07979487627744675,
0.5577938556671143,
0.06725979596376419,
-0.13034410774707794,
0.646861732006073,
-0.35666996240615845,
0.011304046958684921,
-0.4219396114349365,
0.11081034690141678,
0.1020318791270256,
-0.2722523808479309,
-0.259027361869812,
-0.06837894767522812,
0.2440304309129715,
-0.12044806778430939,
-0.18557055294513702,
-0.037011146545410156,
0.019254906103014946,
0.07800476253032684,
-0.16588075459003448,
0.252880722284317,
-0.1835557222366333,
0.13690072298049927,
-0.8704692721366882,
-0.1578296720981598,
-0.20429714024066925,
0.14915773272514343,
-0.07966548949480057,
-0.11228606849908829,
0.478363960981369,
-0.1489218771457672,
-0.11514441668987274,
-0.1444251835346222,
-0.34694337844848633,
-0.1353573203086853,
0.16571015119552612,
-0.12420078366994858,
0.01911061257123947,
-0.2335188388824463,
0.1721043586730957,
0.07007936388254166,
-0.3004913628101349,
-0.044749870896339417,
-0.08076885342597961,
0.022567737847566605,
0.0036296099424362183,
0.043326299637556076,
0.15197715163230896,
-0.026072340086102486,
0.09829400479793549,
0.0938347727060318,
-0.28111401200294495,
0.17691107094287872,
-0.31944677233695984,
0.4946390688419342,
-0.026889611035585403,
-0.3292711675167084,
-0.15163761377334595,
0.14366723597049713,
-0.0917581170797348,
0.04151568561792374,
0.7502061128616333,
0.3333349823951721,
0.0899553969502449,
-0.06539282947778702,
-0.04679124057292938,
-0.35335952043533325,
0.14646098017692566,
0.24209453165531158,
0.23743826150894165,
-0.2112906277179718,
-0.018680348992347717,
-0.010648585855960846,
0.16264426708221436,
-0.1679956167936325,
-0.15654540061950684,
0.2968520224094391,
-0.07012093812227249,
0.3730230927467346,
0.21063804626464844,
0.272540420293808,
-0.21197137236595154,
0.11340262740850449,
0.020658403635025024,
0.05569992586970329,
-0.04192354157567024,
0.05544722080230713,
0.0528586283326149,
-0.025679374113678932,
0.14844080805778503,
0.40210390090942383,
-0.02291540428996086,
-0.17814043164253235,
-0.347018301486969,
0.15595433115959167,
0.11786919832229614,
-0.11290483176708221,
0.5245329737663269,
0.20741797983646393,
0.2994842231273651,
0.11996587365865707,
0.19933195412158966,
-0.33635762333869934,
-0.21470384299755096,
-0.23277290165424347,
-0.031043529510498047,
-0.3524007797241211,
0.13859456777572632,
-0.31966277956962585,
-0.08244197070598602,
-0.19261059165000916,
-0.050793588161468506,
-0.0069755204021930695,
0.01628221571445465,
0.015445249155163765,
0.26498398184776306,
-0.35740432143211365,
0.16121943295001984,
0.19508308172225952,
0.03923436626791954,
0.19525393843650818,
-0.1316361129283905,
0.018950365483760834,
-0.13237988948822021,
0.5585445165634155,
-0.49470213055610657,
-0.45473259687423706,
0.01243146788328886,
0.12891313433647156,
-0.044241130352020264,
-0.2150106579065323,
-0.314024955034256,
-0.2549123466014862,
0.2707122266292572,
-0.1685342788696289,
-0.022444769740104675,
0.05395467206835747,
0.2440018206834793,
0.2289731353521347,
-0.1897733509540558,
-0.009232796728610992,
0.16577684879302979,
-0.17516663670539856,
0.060474295169115067,
-0.3694406747817993
] |
https://github.com/huggingface/datasets/issues/4745 | Allow `list_datasets` to include private datasets | `datasets.list_datasets` is now deprecated in favor of `huggingface_hub.list_datasets` (returns private datasets when `token` is present), so I'm closing this issue. | I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually. | 20 | Allow `list_datasets` to include private datasets
I am working with a large collection of private datasets, it would be convenient for me to be able to list them.
I would envision extending the convention of using `use_auth_token` keyword argument to `list_datasets` function, then calling:
```
list_datasets(use_auth_token="my_token")
```
would return the list of all datasets I have permissions to view, including private ones. The only current alternative I see is to use the hub website to manually obtain the list of dataset names - this is in the context of BigScience where respective private spaces contain hundreds of datasets, so not very convenient to list manually.
`datasets.list_datasets` is now deprecated in favor of `huggingface_hub.list_datasets` (returns private datasets when `token` is present), so I'm closing this issue. | [
-0.35511213541030884,
0.15006837248802185,
-0.20737211406230927,
0.19087514281272888,
-0.07998719066381454,
0.20234817266464233,
0.4435308277606964,
0.3617459535598755,
0.4644303619861603,
0.11035358160734177,
-0.40475502610206604,
0.3337220847606659,
-0.1913793832063675,
0.09251783788204193,
0.12433218210935593,
0.24950310587882996,
0.14004822075366974,
-0.06970416009426117,
0.44002240896224976,
-0.26014798879623413,
-0.39728400111198425,
-0.06254740059375763,
-0.1410333514213562,
-0.05654381215572357,
0.1816430687904358,
-0.10708986967802048,
0.38632932305336,
0.027655314654111862,
0.08766303956508636,
-0.3502712845802307,
-0.0038672182708978653,
0.5168794989585876,
0.2573724091053009,
-0.17165866494178772,
-0.00012058015272486955,
0.08339162170886993,
0.30623573064804077,
0.11631573736667633,
-0.2204246073961258,
-0.13757117092609406,
-0.7020685076713562,
-0.24472007155418396,
0.363070011138916,
-0.04148343577980995,
0.0018005035817623138,
-0.08403867483139038,
-0.07772427797317505,
-0.19838976860046387,
-0.004426002502441406,
0.2610921263694763,
0.0887560248374939,
0.3625103533267975,
-0.19160646200180054,
-0.18773604929447174,
0.06981048732995987,
0.25526952743530273,
-0.11168540269136429,
-0.5653547048568726,
0.09965261816978455,
0.16958720982074738,
0.15570548176765442,
-0.06781536340713501,
-0.2296014130115509,
-0.10744379460811615,
0.4495806396007538,
-0.016213703900575638,
-0.41444510221481323,
-0.39116740226745605,
0.018018800765275955,
0.1837996244430542,
0.8155712485313416,
-0.19100648164749146,
-0.20412637293338776,
-0.21607646346092224,
-0.023025933653116226,
-0.08146068453788757,
0.016116350889205933,
0.04167243093252182,
-0.10738538205623627,
0.16111619770526886,
-0.21778003871440887,
-0.4294355511665344,
-0.23786860704421997,
0.3334047198295593,
0.10662546753883362,
0.260072261095047,
0.16361895203590393,
0.18163517117500305,
0.07242363691329956,
-0.34794098138809204,
0.3049613833427429,
-0.3576093018054962,
0.2345450222492218,
-0.06896068900823593,
-0.31439656019210815,
-0.048304397612810135,
0.10912799835205078,
0.3134981691837311,
0.33233240246772766,
0.5275441408157349,
-0.26089969277381897,
0.17939651012420654,
-0.4123132824897766,
0.13959965109825134,
0.029751893132925034,
0.0298922061920166,
0.23683616518974304,
0.49515607953071594,
0.2961329221725464,
-0.14606711268424988,
0.07382181286811829,
0.11689864844083786,
-0.18929395079612732,
0.2684412896633148,
-0.15382233262062073,
-0.09258493036031723,
-0.0791691243648529,
-0.2002306431531906,
-0.05316814035177231,
0.1268784999847412,
-0.1080704778432846,
-0.18191242218017578,
0.44907110929489136,
0.45630189776420593,
0.33378225564956665,
-0.2844347059726715,
-0.2325020432472229,
-0.014884565025568008,
0.43090304732322693,
-0.25365889072418213,
-0.18673276901245117,
-0.24407832324504852,
0.15858487784862518,
0.275005578994751,
0.07795365154743195,
0.0905156284570694,
0.05869164317846298,
0.000051460228860378265,
0.48331135511398315,
0.11038681864738464,
0.11853785812854767,
0.20769989490509033,
0.3819141089916229,
0.2916549742221832,
0.19021691381931305,
0.11036492139101028,
0.16446149349212646,
-0.2144298255443573,
-0.4059469699859619,
0.1998330056667328,
-0.35133013129234314,
-0.5867675542831421,
-0.011088626459240913,
-0.03956397622823715,
-0.2438938021659851,
0.09087029099464417,
-0.36557087302207947,
0.2399846464395523,
-0.07380875200033188,
0.02308804914355278,
0.20388874411582947,
-0.07055503129959106,
-0.08139588683843613,
-0.2849960923194885,
-0.024974718689918518,
0.14604097604751587,
-0.1636616587638855,
0.06930266320705414,
-0.26995307207107544,
-0.1587144285440445,
-0.2144942581653595,
0.14613474905490875,
-0.39433059096336365,
0.06076563894748688,
-0.270079106092453,
0.4451867341995239,
0.3300841152667999,
-0.3803117871284485,
-0.42560213804244995,
0.04882074519991875,
0.18719635903835297,
-0.1526951789855957,
0.014403671026229858,
0.2151777148246765,
0.37902724742889404,
-0.14604488015174866,
0.0844043418765068,
0.3306517004966736,
0.22613227367401123,
-0.2760362923145294,
0.2546534240245819,
-0.14905263483524323,
0.09790672361850739,
0.11499786376953125,
0.13469158113002777,
0.14727458357810974,
0.19726505875587463,
0.2655578851699829,
0.3941144347190857,
-0.12081238627433777,
-0.11397138237953186,
0.10631182044744492,
0.1986638605594635,
0.21673943102359772,
0.07027258723974228,
-0.045751847326755524,
-0.22718119621276855,
0.07984628528356552,
0.056020379066467285,
0.12288253009319305,
-0.029377877712249756,
-0.31806880235671997,
0.16597789525985718,
0.1099766418337822,
-0.17489254474639893,
0.29165753722190857,
0.0412985235452652,
0.3597056567668915,
-0.050891853868961334,
-0.12881533801555634,
-0.15359587967395782,
0.15544383227825165,
-0.21170565485954285,
0.0997222289443016,
-0.29052796959877014,
0.1739732027053833,
0.3964088559150696,
0.32071444392204285,
0.1002597063779831,
0.27633440494537354,
0.40988460183143616,
0.11776617914438248,
0.014136077836155891,
0.014005154371261597,
0.22433876991271973,
-0.24700452387332916,
0.3391386866569519,
0.706231415271759,
0.14732548594474792,
-0.20470306277275085,
0.24782855808734894,
0.06378549337387085,
-0.08048515021800995,
-0.038191959261894226,
0.3356703519821167,
0.18726928532123566,
0.1557331681251526,
0.38631120324134827,
-0.285147488117218,
0.19325566291809082,
0.06417632848024368,
0.19542072713375092,
-0.274399995803833,
-0.1746569722890854,
-0.09270517528057098,
0.11462412774562836,
0.0848967581987381,
-0.30986741185188293,
-0.1489657759666443,
0.13463354110717773,
-0.04515022411942482,
-0.2127130776643753,
0.13093118369579315,
0.10085298866033554,
-0.16140484809875488,
0.1876966655254364,
0.44022423028945923,
0.1576155722141266,
0.2068442404270172,
0.16748939454555511,
-0.11112901568412781,
-0.10800004750490189,
-0.04187076911330223,
0.012739459052681923,
0.18543994426727295,
0.29842013120651245,
-0.1764984130859375,
-0.3408644497394562,
0.2824392318725586,
-0.18090391159057617,
-0.15525206923484802,
-0.4542544484138489,
-0.08380061388015747,
0.25861334800720215,
-0.2101636677980423,
-0.089222252368927,
-0.3870653212070465,
0.02430446445941925,
0.5969939827919006,
-0.23472943902015686,
-0.349698007106781,
-0.14269143342971802,
-0.0005603097379207611,
-0.026876185089349747,
0.08482754230499268,
0.15533208847045898,
-0.15774886310100555,
0.5843960046768188,
-0.0006411783397197723,
-0.4032894968986511,
-0.025708407163619995,
0.25049978494644165,
0.10702148824930191,
-0.03761160001158714,
0.33511021733283997,
-0.09743665903806686,
0.1603473275899887,
0.17983558773994446,
0.08322755247354507,
-0.5604944229125977,
-0.10960779339075089,
0.11788133531808853,
-0.17305275797843933,
-0.12604710459709167,
0.12220079451799393,
-0.17775379121303558,
0.004067827016115189,
-0.10909130424261093,
-0.04433417692780495,
0.11449156701564789,
0.09115806221961975,
-0.04651696979999542,
-0.26869702339172363,
-0.15974360704421997,
0.07116784155368805,
0.25239574909210205,
-0.3194696009159088,
-0.22749421000480652,
0.39472752809524536,
0.2734803557395935,
0.20932476222515106,
-0.00657337810844183,
-0.2432214617729187,
0.01605387032032013,
-0.44314315915107727,
-0.30519169569015503,
-0.3161814510822296,
-0.2759961187839508,
0.4184291958808899,
-0.26292094588279724,
-0.019625723361968994,
0.24004510045051575,
-0.19017238914966583,
0.09381483495235443,
-0.06417251378297806,
-0.42576736211776733,
-0.3922078311443329,
-0.22870363295078278,
0.38742005825042725,
-0.1913478821516037,
-0.1474175900220871,
0.18474486470222473,
-0.05260290950536728,
0.19442640244960785,
-0.1472775638103485,
-0.5671003460884094,
0.007849186658859253,
-0.12816587090492249,
0.1855732500553131,
0.11517307907342911,
-0.2863086462020874,
0.025831956416368484,
0.4571368098258972,
0.5110025405883789,
0.18187226355075836,
-0.08000975847244263,
0.08301395922899246,
0.22664757072925568,
0.22362667322158813,
-0.25565481185913086,
-0.05341699346899986,
0.10828667879104614,
-0.42982637882232666,
0.3376346826553345,
0.024073559790849686,
-0.07908716052770615,
0.14990732073783875,
-0.07133965194225311,
-0.2413194179534912,
-0.1691463440656662,
-0.024730132892727852,
0.1630052626132965,
0.34534555673599243,
0.10772016644477844,
0.08153712004423141,
-0.4959043264389038,
-0.22699591517448425,
-0.03818734735250473,
0.272263765335083,
0.3241317570209503,
-0.056092072278261185,
-0.3953045606613159,
-0.33186280727386475,
-0.3836974501609802,
0.4452141523361206,
-0.1627689003944397,
0.36148717999458313,
-0.17771600186824799,
0.21428880095481873,
-0.03982631862163544,
0.37862417101860046,
0.44401979446411133,
-0.5902112126350403,
-0.13286836445331573,
0.02276439219713211,
-0.18079234659671783,
-0.02462727203965187,
0.029079969972372055,
-0.017730792984366417,
-0.08583898097276688,
-0.2597492039203644,
0.4719789922237396,
-0.09394320845603943,
-0.033706724643707275,
-0.15486766397953033,
-0.11842415481805801,
0.07139776647090912,
-0.1310109794139862,
0.2540406584739685,
-0.22309887409210205,
-0.33298566937446594,
0.026295267045497894,
-0.13157020509243011,
0.09310362488031387,
-0.10785207152366638,
0.02246307209134102,
0.12777592241764069,
-0.14929020404815674,
0.38392573595046997,
0.11644023656845093,
0.34379568696022034,
0.3028102517127991,
0.08577914535999298,
0.1556980311870575,
-0.1928427517414093,
0.3253048062324524,
0.34920406341552734,
-0.03597058728337288,
-0.4766392707824707,
-0.12521058320999146,
0.020641975104808807,
0.3656582236289978,
0.2619401514530182,
-0.25030916929244995,
0.5182356238365173,
-0.06686592847108841,
-0.035688623785972595,
-0.025647342205047607,
0.11707007139921188,
0.0608026385307312,
-0.16718190908432007,
-0.4342361092567444,
-0.4868283271789551,
0.4047091007232666,
0.08510266244411469,
-0.243174746632576,
0.08280962705612183,
0.1916751265525818,
-0.3799837827682495,
0.17800475656986237,
0.11746425926685333,
0.7366635203361511,
-0.08117349445819855,
0.06438560783863068,
-0.13350918889045715,
0.3799784183502197,
0.45100390911102295,
-0.3205382227897644,
-0.006494114175438881,
-0.1667487919330597,
-0.047803428024053574,
-0.03031120076775551,
-0.24078652262687683,
0.02143741026520729,
-0.08795066177845001,
-0.012253351509571075,
-0.0035419161431491375,
0.05416193604469299,
0.6353134512901306,
-0.18820694088935852,
0.04853679984807968,
-0.11351988464593887,
-0.3178628385066986,
0.14585065841674805,
0.10115887224674225,
-0.14468826353549957,
-0.04752231016755104,
0.035329632461071014,
-0.2956116795539856,
-0.13069279491901398,
-0.1774120330810547,
-0.6011978983879089,
-0.2885390818119049,
-0.1153748482465744,
-0.13348370790481567,
0.1410239189863205,
-0.3293074369430542,
0.4236350655555725,
0.14334237575531006,
0.3372063636779785,
0.3562186658382416,
-0.4608005881309509,
-0.05075803026556969,
-0.30783048272132874,
0.06913600116968155,
-0.38078996539115906,
-0.1712324023246765,
-0.052067577838897705,
0.08485972136259079,
0.08551526814699173,
0.13713133335113525,
0.2334934026002884,
-0.6205218434333801,
-0.6306567192077637,
0.3877103328704834,
0.4632750153541565,
-0.18745285272598267,
-0.007341957651078701,
0.09363178163766861,
-0.2974846065044403,
-0.14518986642360687,
0.01739998534321785,
0.237868532538414,
-0.21078409254550934,
0.09495295584201813,
0.016071591526269913,
-0.024613935500383377,
-0.06956718862056732,
-0.060201264917850494,
0.10199131816625595,
-0.10912372916936874,
0.06161094456911087,
0.06644907593727112,
-0.017943499609827995,
-0.1565062403678894,
0.15627393126487732,
0.21440169215202332,
0.081593357026577,
0.06893263012170792,
0.04839586466550827,
0.15127642452716827,
-0.300037145614624,
0.0018685944378376007,
-0.14140865206718445,
0.06458725780248642,
-0.14991755783557892,
-0.3102107644081116,
-0.11740268766880035,
0.237401083111763,
-0.5169622302055359,
0.27471867203712463,
-0.17218151688575745,
0.06152520328760147,
-0.38664600253105164,
-0.3569078743457794,
-0.1400056779384613,
-0.03412643074989319,
-0.40229329466819763,
-0.15515854954719543,
-0.25044310092926025,
0.3154106140136719,
0.18883174657821655,
-0.1451312154531479,
-0.047401703894138336,
0.0990125760436058,
-0.21599356830120087,
-0.12931880354881287,
-0.008031202480196953,
0.18799608945846558,
0.37377989292144775,
0.0959218293428421,
-0.055866699665784836,
-0.1853915899991989,
-0.02719951793551445,
-0.30783578753471375,
0.1149328202009201,
0.11314942687749863,
0.059777699410915375,
0.13308873772621155,
0.305009126663208,
-0.08144325762987137,
0.1738465428352356,
0.20165792107582092,
0.12049853801727295,
0.29338783025741577,
0.13486447930335999,
0.30248603224754333,
-0.14186914265155792,
-0.020220693200826645,
0.06808820366859436,
0.4113750755786896,
0.3738793730735779,
0.2599921226501465,
0.3071303963661194,
-0.030225001275539398,
-0.09180043637752533,
0.16730034351348877,
0.2105347216129303,
-0.044164806604385376,
-0.3061814606189728,
0.28392112255096436,
0.10976840555667877,
-0.0017348136752843857,
-0.09361109137535095,
-0.4022216796875,
0.1339140087366104,
0.2043614238500595,
0.07358792424201965,
0.4609963893890381,
0.49006661772727966,
-0.04194256290793419,
0.15830612182617188,
-0.1217125728726387,
0.34054994583129883,
-0.0709296315908432,
0.13891953229904175,
0.5008653402328491,
0.018269922584295273,
0.20002727210521698,
0.3569956123828888,
0.37043535709381104,
-0.07537955790758133,
0.8341726660728455,
-0.10197184234857559,
0.5707284808158875,
0.23170757293701172,
-0.2169128954410553,
0.6186138987541199,
-0.33628275990486145,
0.04761845991015434,
-0.3518839478492737,
0.04487242177128792,
0.14649882912635803,
-0.2666453421115875,
-0.328640878200531,
-0.013017267920076847,
0.29406315088272095,
-0.07969916611909866,
-0.1492851972579956,
-0.02053367719054222,
0.06972198188304901,
0.037518978118896484,
-0.15358443558216095,
0.256006121635437,
-0.19388364255428314,
0.144718736410141,
-0.8673483729362488,
-0.20997047424316406,
-0.21354620158672333,
0.15424522757530212,
-0.09902292490005493,
-0.008021030575037003,
0.42712777853012085,
-0.22462862730026245,
-0.12410442531108856,
-0.16405250132083893,
-0.3471137285232544,
-0.0402890220284462,
0.29378437995910645,
-0.26240867376327515,
0.08932479470968246,
-0.17525307834148407,
0.1900845766067505,
0.06202089041471481,
-0.3521593511104584,
-0.017405686900019646,
-0.06639908254146576,
0.05798286199569702,
0.06596650183200836,
0.0061022620648145676,
0.17340333759784698,
-0.0107090063393116,
0.07239928841590881,
0.1149284690618515,
-0.20174844563007355,
0.1177137941122055,
-0.22631362080574036,
0.5184631943702698,
-0.0024494603276252747,
-0.2701878845691681,
-0.2290996015071869,
0.1479242593050003,
-0.051457371562719345,
0.014843837358057499,
0.7668372988700867,
0.40021657943725586,
0.1762058138847351,
-0.07023251801729202,
-0.024661829695105553,
-0.36829107999801636,
0.07308399677276611,
0.1359427571296692,
0.19724518060684204,
-0.18626967072486877,
-0.03256377950310707,
-0.01886819675564766,
0.20747514069080353,
-0.2520502805709839,
-0.18609783053398132,
0.2987935245037079,
-0.020055294036865234,
0.4392980635166168,
0.19198846817016602,
0.29504063725471497,
-0.12984810769557953,
0.1170252189040184,
0.08567816764116287,
0.044512007385492325,
-0.05365224555134773,
0.06631337106227875,
0.08003690838813782,
-0.009884750470519066,
0.13314345479011536,
0.40511664748191833,
-0.11128148436546326,
-0.12979698181152344,
-0.34848296642303467,
0.033358655869960785,
0.11607895791530609,
-0.028830155730247498,
0.619560182094574,
0.21600206196308136,
0.33104705810546875,
0.0519370511174202,
0.21981993317604065,
-0.2911744713783264,
-0.11308861523866653,
-0.22047506272792816,
-0.00010310113430023193,
-0.3121526837348938,
0.044699035584926605,
-0.26338186860084534,
-0.021527010947465897,
-0.11484531313180923,
0.038604218512773514,
0.0009581446647644043,
0.020219629630446434,
0.01796896941959858,
0.3138582408428192,
-0.30884891748428345,
0.1726396381855011,
0.10424322634935379,
-0.011948540806770325,
0.21250826120376587,
-0.07749006897211075,
0.0017327815294265747,
-0.1258375644683838,
0.5619924664497375,
-0.5807384848594666,
-0.5125113725662231,
-0.001851673936471343,
0.13540424406528473,
-0.10632992535829544,
-0.17607270181179047,
-0.25339317321777344,
-0.2730771005153656,
0.35551127791404724,
-0.15953171253204346,
-0.012095319107174873,
0.0073345499113202095,
0.18092890083789825,
0.2515448331832886,
-0.18489733338356018,
-0.12340672314167023,
0.1955607831478119,
-0.19592523574829102,
0.056989673525094986,
-0.3536054491996765
] |
https://github.com/huggingface/datasets/issues/4744 | Remove instructions to generate dummy data from our docs | Note that for me personally, conceptually all the dummy data (even for "canonical" datasets) should be superseded by `datasets-server`, which performs some kind of CI/CD of datasets (including the canonical ones) | In our docs, we indicate to generate the dummy data: https://huggingface.co/docs/datasets/dataset_script#testing-data-and-checksum-metadata
However:
- dummy data makes sense only for datasets in our GitHub repo: so that we can test their loading with our CI
- for datasets on the Hub:
- they do not pass any CI test requiring dummy data
- there are no instructions on how they can test their dataset locally using the dummy data
- the generation of the dummy data assumes our GitHub directory structure:
- the dummy data will be generated under `./datasets/<dataset_name>/dummy` even if locally there is no `./datasets` directory (which is the usual case). See issue:
- #4742
CC: @stevhliu | 31 | Remove instructions to generate dummy data from our docs
In our docs, we indicate to generate the dummy data: https://huggingface.co/docs/datasets/dataset_script#testing-data-and-checksum-metadata
However:
- dummy data makes sense only for datasets in our GitHub repo: so that we can test their loading with our CI
- for datasets on the Hub:
- they do not pass any CI test requiring dummy data
- there are no instructions on how they can test their dataset locally using the dummy data
- the generation of the dummy data assumes our GitHub directory structure:
- the dummy data will be generated under `./datasets/<dataset_name>/dummy` even if locally there is no `./datasets` directory (which is the usual case). See issue:
- #4742
CC: @stevhliu
Note that for me personally, conceptually all the dummy data (even for "canonical" datasets) should be superseded by `datasets-server`, which performs some kind of CI/CD of datasets (including the canonical ones) | [
-0.02785693109035492,
-0.2410700023174286,
-0.039112888276576996,
0.199554905295372,
0.11549055576324463,
0.10173336416482925,
0.383828341960907,
0.11605188250541687,
0.2553574740886688,
0.33947861194610596,
-0.04621175676584244,
0.009783570654690266,
-0.06736115366220474,
0.39556631445884705,
0.04807312414050102,
0.09563325345516205,
-0.0039575546979904175,
0.10702908784151077,
-0.2188655436038971,
0.021301448345184326,
-0.19925366342067719,
0.016598159447312355,
0.004873111844062805,
-0.06164884567260742,
-0.3700697422027588,
0.04955831915140152,
0.015987569466233253,
0.3688683807849884,
-0.4324052631855011,
-0.30736514925956726,
0.3693855106830597,
0.3291386067867279,
-0.06612618267536163,
0.5109047889709473,
-0.00010464990918990225,
0.13326048851013184,
0.39420294761657715,
-0.1514035314321518,
-0.5637096166610718,
-0.04822517931461334,
0.061335958540439606,
0.0567302331328392,
-0.06591220200061798,
-0.14462020993232727,
-0.3182395398616791,
0.1608504056930542,
-0.07698921859264374,
-0.05440724641084671,
0.12414520978927612,
0.30162420868873596,
0.24097152054309845,
0.573107123374939,
-0.16218072175979614,
-0.12717796862125397,
0.17209646105766296,
0.5426911115646362,
-0.2697901725769043,
0.4226277470588684,
0.18887919187545776,
0.1613049954175949,
-0.08939064294099808,
0.2611265182495117,
0.06808339059352875,
0.24454531073570251,
0.07985353469848633,
0.09408912062644958,
0.1092715859413147,
-0.25109538435935974,
0.050841331481933594,
0.24220922589302063,
0.41378796100616455,
-0.40102487802505493,
-0.33075734972953796,
-0.13228684663772583,
0.0026013993192464113,
-0.11617353558540344,
0.13610993325710297,
0.26092809438705444,
-0.031607307493686676,
0.26855823397636414,
-0.45347827672958374,
-0.11950419843196869,
-0.007136151194572449,
0.0012451335787773132,
0.1300325095653534,
-0.036575183272361755,
-0.20582589507102966,
0.026708681136369705,
0.10170051455497742,
-0.006487537175416946,
-0.21834686398506165,
-0.38436439633369446,
-0.1791461706161499,
-0.13109347224235535,
0.14186230301856995,
-0.392915815114975,
-0.031417928636074066,
0.2938772737979889,
0.6045827269554138,
0.23911671340465546,
-0.008572536520659924,
0.12185532599687576,
-0.2006167620420456,
0.0727439597249031,
0.005469856783747673,
0.15039832890033722,
0.10562969744205475,
0.357839435338974,
0.3249690532684326,
0.5385098457336426,
0.17570547759532928,
-0.04748808592557907,
0.062320418655872345,
0.08756842464208603,
-0.16512176394462585,
0.06963545829057693,
0.38139981031417847,
-0.33529895544052124,
-0.28225308656692505,
0.0663195550441742,
0.296813428401947,
0.12401865422725677,
0.21601220965385437,
0.29972606897354126,
-0.07327110320329666,
-0.08547672629356384,
-0.18021826446056366,
0.2738345265388489,
-0.14524725079536438,
-0.2211943119764328,
-0.247908353805542,
0.041133813560009,
-0.06491219997406006,
0.2603312134742737,
0.2855127155780792,
-0.2233714610338211,
0.4790226221084595,
0.1506463885307312,
0.31904280185699463,
-0.05700932815670967,
0.2839290499687195,
-0.0549662820994854,
0.20642565190792084,
0.422145813703537,
-0.028532084077596664,
-0.14201629161834717,
0.16307230293750763,
-0.14763933420181274,
-0.18908937275409698,
-0.010485433042049408,
-0.14689302444458008,
-0.4223250448703766,
-0.244626984000206,
0.22750988602638245,
-0.32163041830062866,
0.15138405561447144,
-0.35105031728744507,
0.023241596296429634,
-0.12907209992408752,
0.007719602435827255,
0.12079731374979019,
0.14085033535957336,
-0.39978766441345215,
-0.05113532394170761,
0.263957679271698,
0.5839855670928955,
0.09950806200504303,
-0.03939735144376755,
0.059586118906736374,
-0.2164398431777954,
-0.0760192796587944,
0.12586887180805206,
-0.2326287478208542,
0.2505122125148773,
-0.4105846881866455,
-0.16356642544269562,
-0.12151271849870682,
-0.594373881816864,
0.08269040286540985,
0.07728951424360275,
-0.05141180008649826,
0.22199879586696625,
-0.0009342432022094727,
-0.1799687296152115,
0.049202919006347656,
-0.125772163271904,
-0.222793310880661,
0.05708156153559685,
-0.2129913717508316,
0.19813688099384308,
-0.32755911350250244,
-0.32918840646743774,
-0.030667155981063843,
0.1011388897895813,
-0.1425492763519287,
0.19234752655029297,
-0.029040008783340454,
-0.1154300644993782,
0.06123900040984154,
-0.18111275136470795,
0.134771928191185,
0.10294830799102783,
0.17017939686775208,
-0.22107721865177155,
0.020815663039684296,
0.15733426809310913,
-0.6386448740959167,
0.3016168773174286,
0.13073758780956268,
0.38796883821487427,
0.02647595852613449,
-0.5264455080032349,
-0.36988365650177,
-0.04753429815173149,
-0.11808158457279205,
-0.19746658205986023,
0.17616896331310272,
0.09133754670619965,
0.2921682596206665,
-0.11569362878799438,
-0.07050023227930069,
0.13563555479049683,
-0.32756274938583374,
0.27782711386680603,
-0.40984073281288147,
0.2535499632358551,
0.0265808068215847,
0.19458331167697906,
0.22122135758399963,
0.09522813558578491,
-0.09269639104604721,
-0.3155984878540039,
0.052243586629629135,
0.3357268273830414,
0.2657853662967682,
0.16389435529708862,
0.42772170901298523,
0.3432379364967346,
0.2989356517791748,
-0.036857008934020996,
0.08914133906364441,
0.07452084124088287,
0.025236308574676514,
0.06660329550504684,
-0.4042460322380066,
0.3362758755683899,
-0.1886128932237625,
-0.22740119695663452,
-0.18299688398838043,
-0.08286476135253906,
0.25726911425590515,
-0.17617827653884888,
-0.22025065124034882,
-0.4155869483947754,
0.030941998586058617,
0.15997391939163208,
0.2736995220184326,
0.12721066176891327,
-0.12287259846925735,
0.08064162731170654,
0.11047263443470001,
-0.30666637420654297,
-0.04028185456991196,
0.06950272619724274,
0.11179091781377792,
-0.18620747327804565,
0.14918215572834015,
-0.00660194456577301,
0.32580307126045227,
0.15602192282676697,
0.026485156267881393,
0.0830131471157074,
-0.06691190600395203,
-0.17069374024868011,
0.17007148265838623,
-0.01782485842704773,
-0.11991745978593826,
0.08356224000453949,
-0.1119377613067627,
-0.2958272695541382,
-0.27662819623947144,
0.08000677824020386,
0.19036434590816498,
0.2843484878540039,
-0.41506585478782654,
-0.2186499685049057,
-0.04149631783366203,
-0.04744766280055046,
-0.03867490217089653,
-0.05992947891354561,
-0.1986323595046997,
-0.1661248654127121,
0.22533775866031647,
0.3003298044204712,
-0.3830324709415436,
0.0677073672413826,
0.14819073677062988,
0.41532739996910095,
-0.07352957874536514,
-0.13820046186447144,
-0.29684484004974365,
-0.053920455276966095,
-0.2149883210659027,
0.14654166996479034,
0.19975849986076355,
0.18859264254570007,
0.4500279128551483,
-0.5174155831336975,
0.08770320564508438,
-0.4771532416343689,
-0.18478292226791382,
0.21704988181591034,
-0.10712341964244843,
0.4452979564666748,
0.24257712066173553,
0.23743845522403717,
0.002813883125782013,
0.07039447128772736,
0.10898846387863159,
-0.1622319221496582,
-0.2904019057750702,
-0.04726777970790863,
-0.059538256376981735,
-0.016235727816820145,
-0.4031487703323364,
-0.30949661135673523,
-0.06766121089458466,
-0.15916988253593445,
-0.057053349912166595,
0.05190417543053627,
0.08966031670570374,
0.14666645228862762,
0.08149396628141403,
-0.042067188769578934,
-0.008622651919722557,
0.003523541148751974,
-0.4155693054199219,
-0.9345912933349609,
0.112193763256073,
-0.30902037024497986,
-0.22206653654575348,
0.018381241708993912,
-0.22180449962615967,
0.19182254374027252,
-0.14911264181137085,
-0.4649527668952942,
-0.6741335391998291,
0.10822367668151855,
0.2895994782447815,
0.20273317396640778,
-0.10724024474620819,
0.24684254825115204,
-0.00843462347984314,
-0.08142098784446716,
-0.16818907856941223,
-0.26257166266441345,
0.07956511527299881,
-0.006183058023452759,
0.03810662031173706,
-0.04636573791503906,
0.13003835082054138,
-0.14680631458759308,
0.48901981115341187,
0.38792166113853455,
-0.028800319880247116,
0.1248781830072403,
-0.08509175479412079,
0.5710631608963013,
-0.21660584211349487,
-0.05170314013957977,
-0.05570254847407341,
0.11034183949232101,
-0.17779453098773956,
0.4506221413612366,
0.14002671837806702,
0.27873337268829346,
-0.06591404229402542,
0.005970083177089691,
-0.18333876132965088,
-0.43170085549354553,
-0.002789415419101715,
-0.24530059099197388,
0.05836953967809677,
0.0561034269630909,
-0.004869706928730011,
-0.07897590100765228,
-0.13717308640480042,
0.031070061028003693,
0.3718470335006714,
0.14542518556118011,
-0.07904387265443802,
-0.4659910500049591,
0.18616178631782532,
-0.3650074005126953,
0.16096830368041992,
0.12370435148477554,
0.12573912739753723,
-0.06800366938114166,
0.09982708841562271,
-0.07134665548801422,
0.03887581080198288,
0.15763665735721588,
-0.4691414535045624,
-0.020553596317768097,
0.0076223742216825485,
-0.18526560068130493,
-0.27380773425102234,
-0.11028765141963959,
-0.096642404794693,
0.14463715255260468,
-0.07313168048858643,
0.5015609860420227,
-0.5252472162246704,
-0.45009684562683105,
0.3628789782524109,
0.2569204568862915,
-0.10184448957443237,
0.017344817519187927,
-0.39457154273986816,
-0.37947770953178406,
-0.30767539143562317,
0.16209617257118225,
0.024632597342133522,
-0.06417392939329147,
-0.29663780331611633,
-0.03366754204034805,
0.24026843905448914,
0.18578872084617615,
0.2768562138080597,
0.12045885622501373,
0.2252342402935028,
0.16394327580928802,
0.26176923513412476,
0.325416624546051,
-0.009014546871185303,
0.22590111196041107,
0.7224962711334229,
-0.15812499821186066,
-0.14529559016227722,
-0.10037928074598312,
-0.10221397131681442,
-0.07949557155370712,
0.3322957754135132,
0.15534816682338715,
0.0716131404042244,
-0.12865203619003296,
0.0728055015206337,
-0.5368913412094116,
0.26029109954833984,
-0.033062659204006195,
-0.0031169247813522816,
-0.2117779701948166,
-0.12238278985023499,
0.19400596618652344,
-0.048560500144958496,
-0.06636782735586166,
0.37820592522621155,
0.13891571760177612,
-0.2542668879032135,
0.24039287865161896,
0.14974406361579895,
0.7844447493553162,
-0.03803464025259018,
0.22914907336235046,
0.27091410756111145,
-0.030886869877576828,
0.2557746469974518,
-0.3297564387321472,
-0.14649507403373718,
-0.2566525936126709,
-0.11098054051399231,
0.008295400068163872,
-0.024780094623565674,
0.20672550797462463,
-0.02397085726261139,
-0.29155993461608887,
0.2189178317785263,
-0.10389010608196259,
0.6163233518600464,
-0.17582008242607117,
0.4263737201690674,
-0.28060102462768555,
-0.23192287981510162,
0.12533429265022278,
0.25665444135665894,
0.026758121326565742,
0.16935200989246368,
-0.12388864159584045,
0.02168463170528412,
-0.0946660041809082,
-0.29017174243927,
0.03430713713169098,
-0.06479154527187347,
-0.12288634479045868,
-0.06370928883552551,
0.0659715086221695,
0.07995592057704926,
-0.24777081608772278,
0.004687212407588959,
0.7414565086364746,
0.34657374024391174,
-0.3512316942214966,
0.03330431878566742,
-0.21673452854156494,
0.11217811703681946,
-0.11456041038036346,
-0.12306683510541916,
0.09263341128826141,
-0.014857975766062737,
-0.4428417384624481,
-0.13856220245361328,
-0.028547994792461395,
-0.10832391679286957,
0.09595157206058502,
-0.2844841480255127,
-0.022334158420562744,
-0.5679274797439575,
0.043400201946496964,
-0.04608650505542755,
-0.14243899285793304,
-0.12038786709308624,
0.1896127164363861,
0.2010640799999237,
-0.2239396721124649,
0.17032289505004883,
0.23997969925403595,
-0.41682881116867065,
-0.28932198882102966,
-0.056020043790340424,
-0.13211172819137573,
0.07863713055849075,
0.02302428148686886,
-0.2926728427410126,
0.009008686989545822,
-0.39324983954429626,
0.16709467768669128,
0.26873213052749634,
-0.3180243670940399,
0.18646930158138275,
0.07949492335319519,
-0.16848847270011902,
-0.08603942394256592,
0.27057158946990967,
0.28762370347976685,
-0.040818244218826294,
0.002758670598268509,
-0.2489856779575348,
-0.4107353985309601,
0.21363848447799683,
0.24720346927642822,
0.5180538892745972,
0.06976769119501114,
0.040701743215322495,
0.0034141335636377335,
0.07281341403722763,
-0.4014165699481964,
0.021210748702287674,
-0.32354313135147095,
0.21143820881843567,
0.21216361224651337,
-0.034877024590969086,
0.33539074659347534,
-0.20216603577136993,
0.06731829792261124,
-0.0941789448261261,
-0.37654048204421997,
-0.24804648756980896,
-0.13655436038970947,
0.10904613137245178,
-0.033780813217163086,
-0.11103817075490952,
0.015391147695481777,
0.16736941039562225,
-0.04260794445872307,
-0.22149020433425903,
0.34851011633872986,
0.11505965143442154,
0.0020543932914733887,
0.12049412727355957,
0.08057349920272827,
0.06439211964607239,
-0.1767486333847046,
-0.023012381047010422,
0.06976845860481262,
0.26724952459335327,
-0.09508752822875977,
0.0034212134778499603,
-0.21714378893375397,
-0.15883196890354156,
0.30140921473503113,
0.29135680198669434,
0.18868568539619446,
0.12557446956634521,
0.07849211245775223,
0.0537201426923275,
0.12919673323631287,
0.1393158733844757,
0.3238227963447571,
0.0224185511469841,
-0.3078620731830597,
-0.03386800363659859,
0.24631145596504211,
0.2898550033569336,
-0.15356409549713135,
-0.1291225105524063,
0.24370379745960236,
-0.03362482041120529,
0.24806413054466248,
0.32146066427230835,
0.43648430705070496,
0.12798963487148285,
0.2646407186985016,
0.045416153967380524,
0.2652459144592285,
-0.022892028093338013,
0.036731041967868805,
0.08129113912582397,
-0.38574734330177307,
-0.00115928053855896,
0.16224846243858337,
-0.055865492671728134,
0.08768771588802338,
-0.03840717673301697,
0.07483644038438797,
0.6122953295707703,
-0.012603171169757843,
0.2639382481575012,
0.12558265030384064,
-0.18259836733341217,
0.3755803406238556,
0.16551294922828674,
-0.10963934659957886,
-0.007673434913158417,
0.11294519901275635,
0.3627593517303467,
-0.3225160539150238,
-0.16161583364009857,
-0.5741732120513916,
-0.020097482949495316,
-0.13599509000778198,
-0.02884651906788349,
-0.22817620635032654,
-0.004069045186042786,
-0.12873026728630066,
0.044259797781705856,
0.15890547633171082,
-0.0985175222158432,
0.2147056758403778,
-0.11946408450603485,
-0.25040721893310547,
0.01755404844880104,
0.08547242730855942,
0.30316635966300964,
0.07252148538827896,
-0.09736236184835434,
0.15847307443618774,
0.3095560073852539,
-0.04794523864984512,
0.15710119903087616,
0.47216296195983887,
0.3124171197414398,
-0.11578221619129181,
0.12160955369472504,
-0.08328980952501297,
-0.03173818066716194,
-0.0006388574838638306,
-0.10733530670404434,
0.40232887864112854,
-0.17501291632652283,
-0.20740950107574463,
0.378388911485672,
0.26342126727104187,
-0.20403437316417694,
-0.1395556628704071,
-0.010884787887334824,
-0.31647568941116333,
-0.14310437440872192,
0.2807411551475525,
0.15039753913879395,
0.07277678698301315,
-0.12229594588279724,
-0.003112480044364929,
-0.1728058010339737,
-0.06332478672266006,
0.4524843096733093,
-0.14486423134803772,
0.21377304196357727,
-0.271083265542984,
0.1301920861005783,
0.032882411032915115,
0.45827633142471313,
0.21272756159305573,
-0.0768548771739006,
-0.40283849835395813,
-0.2467290312051773,
-0.5016599893569946,
0.0912695825099945,
-0.15784743428230286,
-0.053120680153369904,
0.09408380836248398,
0.03773587942123413,
0.16900499165058136,
0.3262760043144226,
-0.298076868057251,
-0.3561619520187378,
0.11811696738004684,
-0.12701377272605896,
-0.20233575999736786,
0.12071134150028229,
-0.3468119502067566,
-0.016932589933276176,
0.1355610340833664,
-0.601722240447998,
0.20758746564388275,
0.08769793808460236,
0.016624517738819122,
0.14735805988311768,
0.27046698331832886,
0.23497334122657776,
-0.2571117579936981,
0.1719353199005127,
0.10362566262483597,
0.3318043351173401,
-0.1360768973827362,
0.00897887535393238,
-0.17154563963413239,
-0.09322082996368408,
-0.14608293771743774,
0.13128650188446045,
-0.0686827003955841,
0.14139382541179657,
-0.00515992846339941,
-0.06823432445526123,
-0.1822308450937271,
0.15496431291103363,
0.2931724786758423,
0.09349017590284348,
-0.2013062983751297,
0.045544274151325226,
-0.19336619973182678,
-0.19388845562934875,
0.0993538573384285,
0.30677247047424316,
-0.10718995332717896,
0.14775127172470093,
0.02761625498533249,
-0.18982082605361938,
0.6678882241249084,
-0.05644448101520538,
-0.045617908239364624,
-0.22843526303768158,
0.29436492919921875,
0.17385852336883545,
-0.38295525312423706,
-0.5824015140533447,
0.38076695799827576,
0.1550532877445221,
-0.0011460892856121063,
-0.07654154300689697,
0.37216368317604065,
0.18640735745429993,
0.1316753774881363,
-0.027658578008413315,
0.45840173959732056,
-0.039000242948532104,
-0.16084326803684235,
0.18436430394649506,
-0.17031130194664001
] |
https://github.com/huggingface/datasets/issues/4744 | Remove instructions to generate dummy data from our docs | I totally agree: next step should be rethinking if dummy data makes sense for canonical datasets (once we have datasets-server) and eventually remove it.
But for now, we could at least start by removing the indication to generate dummy data from our docs. | In our docs, we indicate to generate the dummy data: https://huggingface.co/docs/datasets/dataset_script#testing-data-and-checksum-metadata
However:
- dummy data makes sense only for datasets in our GitHub repo: so that we can test their loading with our CI
- for datasets on the Hub:
- they do not pass any CI test requiring dummy data
- there are no instructions on how they can test their dataset locally using the dummy data
- the generation of the dummy data assumes our GitHub directory structure:
- the dummy data will be generated under `./datasets/<dataset_name>/dummy` even if locally there is no `./datasets` directory (which is the usual case). See issue:
- #4742
CC: @stevhliu | 43 | Remove instructions to generate dummy data from our docs
In our docs, we indicate to generate the dummy data: https://huggingface.co/docs/datasets/dataset_script#testing-data-and-checksum-metadata
However:
- dummy data makes sense only for datasets in our GitHub repo: so that we can test their loading with our CI
- for datasets on the Hub:
- they do not pass any CI test requiring dummy data
- there are no instructions on how they can test their dataset locally using the dummy data
- the generation of the dummy data assumes our GitHub directory structure:
- the dummy data will be generated under `./datasets/<dataset_name>/dummy` even if locally there is no `./datasets` directory (which is the usual case). See issue:
- #4742
CC: @stevhliu
I totally agree: next step should be rethinking if dummy data makes sense for canonical datasets (once we have datasets-server) and eventually remove it.
But for now, we could at least start by removing the indication to generate dummy data from our docs. | [
-0.011543713510036469,
-0.19179721176624298,
-0.018710779026150703,
0.1561170518398285,
0.20634526014328003,
0.020942427217960358,
0.3873959481716156,
0.268899142742157,
0.2308344542980194,
0.37518537044525146,
-0.00498806731775403,
0.04575367644429207,
-0.040706735104322433,
0.36946091055870056,
-0.06840623170137405,
0.10657290369272232,
-0.015463441610336304,
0.11310601979494095,
-0.11497341096401215,
0.004816219210624695,
-0.15071947872638702,
-0.011704431846737862,
0.01807485520839691,
-0.025722861289978027,
-0.39878547191619873,
0.026558892801404,
0.06734073907136917,
0.28308165073394775,
-0.408119261264801,
-0.3447810113430023,
0.2213752269744873,
0.28213557600975037,
-0.04785551503300667,
0.47626793384552,
-0.00010148104774998501,
0.0997314602136612,
0.43250828981399536,
-0.13425123691558838,
-0.4876195192337036,
-0.025011077523231506,
0.06107119470834732,
0.04904549568891525,
-0.061575569212436676,
-0.1574142575263977,
-0.3581300675868988,
0.11895023286342621,
-0.14840619266033173,
-0.06778378039598465,
0.07750166952610016,
0.27830907702445984,
0.28038933873176575,
0.5785653591156006,
-0.12677541375160217,
-0.12670612335205078,
0.18623626232147217,
0.42952293157577515,
-0.3093068599700928,
0.3893420100212097,
0.21071669459342957,
0.08406049758195877,
-0.13510751724243164,
0.3216015100479126,
0.09662698954343796,
0.29083001613616943,
0.033601853996515274,
0.11131061613559723,
0.13481248915195465,
-0.21874964237213135,
0.08152459561824799,
0.2653903067111969,
0.42779335379600525,
-0.3398834466934204,
-0.3427804112434387,
-0.16635775566101074,
0.04961884766817093,
-0.07710634171962738,
0.17131444811820984,
0.21837997436523438,
-0.05746280029416084,
0.27931803464889526,
-0.32516124844551086,
-0.15226812660694122,
-0.026867426931858063,
-0.014482095837593079,
0.0908324271440506,
-0.045874446630477905,
-0.2002965658903122,
-0.0021910369396209717,
0.20567236840724945,
0.007197720929980278,
-0.16840359568595886,
-0.2504357099533081,
-0.17163826525211334,
-0.20573854446411133,
0.06854144483804703,
-0.3515397310256958,
0.0013506785035133362,
0.20962193608283997,
0.5424861311912537,
0.13774195313453674,
0.02191464975476265,
0.16618835926055908,
-0.17249475419521332,
0.07053546607494354,
0.020844716578722,
0.1164679080247879,
0.1375933438539505,
0.34784185886383057,
0.3297196626663208,
0.5394635200500488,
0.18906021118164062,
-0.037257663905620575,
0.10447253286838531,
0.012976444326341152,
-0.12797993421554565,
0.08041709661483765,
0.40456610918045044,
-0.37240317463874817,
-0.29328832030296326,
0.08399533480405807,
0.2338179349899292,
0.21771621704101562,
0.19195078313350677,
0.288979709148407,
-0.08269424736499786,
-0.030851803719997406,
-0.12044870108366013,
0.26188337802886963,
-0.1925634741783142,
-0.24747130274772644,
-0.2292817234992981,
-0.02924491837620735,
-0.10425401479005814,
0.20153096318244934,
0.2658205032348633,
-0.16095763444900513,
0.4047890305519104,
0.19413067400455475,
0.3229883313179016,
-0.026059582829475403,
0.2296600043773651,
-0.056669674813747406,
0.23482686281204224,
0.3695652484893799,
-0.04187140613794327,
-0.10543124377727509,
0.13833695650100708,
-0.18119820952415466,
-0.12206663936376572,
-0.058288224041461945,
-0.167708158493042,
-0.3853306770324707,
-0.33930668234825134,
0.26673948764801025,
-0.29152148962020874,
0.14589500427246094,
-0.23547658324241638,
0.045516327023506165,
-0.11474249511957169,
0.047722723335027695,
0.07385934889316559,
0.1219216138124466,
-0.40101101994514465,
-0.040439754724502563,
0.20376193523406982,
0.5354681015014648,
0.11984474956989288,
0.026872985064983368,
0.10748696327209473,
-0.17966057360172272,
-0.0851459726691246,
0.1472916305065155,
-0.2577095329761505,
0.2116999626159668,
-0.3662209212779999,
-0.11278925836086273,
-0.17624449729919434,
-0.5911988019943237,
0.016474749892950058,
0.08784602582454681,
-0.08439883589744568,
0.1366272121667862,
0.022781401872634888,
-0.21427011489868164,
0.04967988654971123,
-0.10909969359636307,
-0.20751163363456726,
-0.024323102086782455,
-0.1226046234369278,
0.23506340384483337,
-0.4414374530315399,
-0.3496648073196411,
-0.045769236981868744,
0.07998257875442505,
-0.09376996755599976,
0.17009380459785461,
-0.049316249787807465,
-0.03837358206510544,
0.11757553368806839,
-0.2233441174030304,
0.15259434282779694,
0.1326223611831665,
0.29275989532470703,
-0.21239326894283295,
0.04418126493692398,
0.10809559375047684,
-0.6334531307220459,
0.27754005789756775,
0.09690256416797638,
0.38672807812690735,
0.017886072397232056,
-0.5698609352111816,
-0.3145146667957306,
-0.03676469624042511,
-0.1009528636932373,
-0.13768507540225983,
0.22581374645233154,
0.05829776078462601,
0.1807408481836319,
-0.15065467357635498,
-0.02207431197166443,
0.07240563631057739,
-0.3431953489780426,
0.23001225292682648,
-0.38491034507751465,
0.17760314047336578,
0.019723117351531982,
0.17106571793556213,
0.27593863010406494,
0.09014801681041718,
-0.07830094546079636,
-0.18165071308612823,
0.038872577250003815,
0.2808804512023926,
0.25724977254867554,
0.12251661717891693,
0.4088243246078491,
0.3496131896972656,
0.22261790931224823,
-0.03885350003838539,
0.07156475633382797,
0.07998208701610565,
-0.009852830320596695,
0.0768810287117958,
-0.440134733915329,
0.33143219351768494,
-0.19322878122329712,
-0.17845627665519714,
-0.24378760159015656,
-0.014748034067451954,
0.27230799198150635,
-0.23420344293117523,
-0.19870509207248688,
-0.44568467140197754,
0.02239418216049671,
0.1624060869216919,
0.23342178761959076,
0.09237152338027954,
-0.17200568318367004,
0.18112267553806305,
0.14702080190181732,
-0.2011890560388565,
-0.05893286317586899,
0.09787441790103912,
0.1127203106880188,
-0.22649362683296204,
0.12468010187149048,
-0.0036156512796878815,
0.23269888758659363,
0.2436840683221817,
0.01157018169760704,
0.04779325798153877,
-0.07785806804895401,
-0.14270542562007904,
0.18893636763095856,
-0.0015935897827148438,
-0.11437820643186569,
0.10706173628568649,
-0.06516055762767792,
-0.2745647132396698,
-0.3395731449127197,
0.141639843583107,
0.176564022898674,
0.3555482029914856,
-0.4754762351512909,
-0.24663145840168,
-0.1289859563112259,
-0.0529421791434288,
-0.022173501551151276,
-0.04690049961209297,
-0.23650681972503662,
-0.23098133504390717,
0.26528868079185486,
0.299578458070755,
-0.41937196254730225,
0.07632676512002945,
0.15871119499206543,
0.38610899448394775,
-0.046831827610731125,
-0.06003656983375549,
-0.28031104803085327,
-0.13943977653980255,
-0.20495837926864624,
0.17409005761146545,
0.23193053901195526,
0.20908455550670624,
0.5378279089927673,
-0.48345357179641724,
0.028374213725328445,
-0.49787813425064087,
-0.2900654077529907,
0.17501136660575867,
-0.0644344910979271,
0.4785810112953186,
0.25800514221191406,
0.27331238985061646,
0.04896025359630585,
0.06743994355201721,
0.07876460999250412,
-0.19259853661060333,
-0.2576691508293152,
-0.05726669356226921,
-0.06490486860275269,
0.021466528996825218,
-0.4148193299770355,
-0.3912636339664459,
0.008500337600708008,
-0.19243639707565308,
-0.04868704080581665,
-0.03497077897191048,
0.09380149096250534,
0.14917483925819397,
0.11603745818138123,
-0.012674117460846901,
-0.05957825854420662,
-0.04435780644416809,
-0.4584241807460785,
-0.8071237802505493,
0.11507344245910645,
-0.2542843520641327,
-0.3271492123603821,
0.03800209239125252,
-0.16815191507339478,
0.15377894043922424,
-0.15411153435707092,
-0.4094874858856201,
-0.596598207950592,
0.10289319604635239,
0.2924370765686035,
0.1708787977695465,
-0.13879001140594482,
0.22283366322517395,
0.017973270267248154,
-0.14316529035568237,
-0.21662107110023499,
-0.22480043768882751,
0.10523392260074615,
-0.04089364409446716,
0.08310291171073914,
-0.06974945962429047,
0.1232185959815979,
-0.07229466736316681,
0.4483012557029724,
0.33990174531936646,
-0.048813674598932266,
0.13537898659706116,
-0.12629827857017517,
0.5969952344894409,
-0.21213823556900024,
-0.09327028691768646,
-0.07414080202579498,
0.09996340423822403,
-0.11449038982391357,
0.4431486129760742,
0.10022031515836716,
0.22687065601348877,
-0.02821836993098259,
0.038250211626291275,
-0.14839863777160645,
-0.47963133454322815,
0.04503250867128372,
-0.1287335902452469,
0.03909921646118164,
0.10619063675403595,
-0.02612476423382759,
-0.10226714611053467,
-0.17202144861221313,
0.060145359486341476,
0.2938792109489441,
0.16161777079105377,
-0.1033036857843399,
-0.4236583411693573,
0.299986869096756,
-0.34887656569480896,
0.11769033968448639,
0.13136960566043854,
0.12223275750875473,
-0.0812886580824852,
0.03566280007362366,
-0.02219851315021515,
0.015897246077656746,
0.1988902986049652,
-0.4648051857948303,
-0.010546538978815079,
0.000993531197309494,
-0.1992386430501938,
-0.2655237317085266,
-0.1105286180973053,
-0.16667257249355316,
0.14857840538024902,
-0.019330710172653198,
0.47086232900619507,
-0.5418394804000854,
-0.4753214716911316,
0.3369940221309662,
0.23577991127967834,
-0.10511224716901779,
-0.005107586272060871,
-0.40052616596221924,
-0.2858763337135315,
-0.3008020222187042,
0.15958261489868164,
0.0478716716170311,
-0.056814346462488174,
-0.27590736746788025,
-0.11425749957561493,
0.21963627636432648,
0.13778555393218994,
0.2865002155303955,
0.11641286313533783,
0.27316462993621826,
0.1263427883386612,
0.28159087896347046,
0.3043750524520874,
0.06215318292379379,
0.3272915482521057,
0.7262769937515259,
-0.17284801602363586,
-0.13968858122825623,
-0.07429179549217224,
-0.2093527913093567,
-0.11297129839658737,
0.3446210026741028,
0.15341243147850037,
0.10298004746437073,
-0.16370998322963715,
0.15199679136276245,
-0.5154533386230469,
0.22986654937267303,
0.027845848351716995,
-0.002757171168923378,
-0.15698789060115814,
-0.03929902985692024,
0.23932379484176636,
-0.07370154559612274,
-0.12000355869531631,
0.3727196753025055,
0.1226033866405487,
-0.23986557126045227,
0.24147869646549225,
0.12544232606887817,
0.754637598991394,
-0.058310844004154205,
0.17161664366722107,
0.3182901442050934,
-0.0478220097720623,
0.2468443065881729,
-0.24439319968223572,
-0.14383837580680847,
-0.2555381655693054,
-0.06603372097015381,
0.01902792789041996,
0.05471591278910637,
0.1963188350200653,
-0.001269124448299408,
-0.27179479598999023,
0.17162960767745972,
-0.14506591856479645,
0.5840086340904236,
-0.17416192591190338,
0.44464927911758423,
-0.26280781626701355,
-0.19542033970355988,
0.061048828065395355,
0.27206504344940186,
0.030749626457691193,
0.06968171894550323,
-0.06492992490530014,
-0.05140305310487747,
-0.12762923538684845,
-0.2950313091278076,
0.014862589538097382,
-0.05464879050850868,
-0.09304190427064896,
-0.0827532559633255,
0.03996885567903519,
0.13916660845279694,
-0.1788598895072937,
-0.011097211390733719,
0.6206080913543701,
0.3358360528945923,
-0.44462209939956665,
0.0791960060596466,
-0.20192676782608032,
0.0781555026769638,
-0.04876602813601494,
-0.12268869578838348,
0.12186717987060547,
-0.03313128650188446,
-0.46796420216560364,
-0.15833237767219543,
-0.001050255261361599,
-0.11896056681871414,
0.05582764744758606,
-0.2816511392593384,
-0.04086930304765701,
-0.5704668164253235,
0.051515426486730576,
-0.06385426223278046,
-0.15339843928813934,
-0.14865003526210785,
0.2358216494321823,
0.1557941734790802,
-0.1759415566921234,
0.16477632522583008,
0.32164275646209717,
-0.3995591402053833,
-0.2334783524274826,
0.034199535846710205,
-0.09634340554475784,
0.11265626549720764,
0.011114384979009628,
-0.2778330445289612,
-0.058236248791217804,
-0.4203322231769562,
0.10275011509656906,
0.2709256708621979,
-0.3229280710220337,
0.14063647389411926,
0.1354420930147171,
-0.18298017978668213,
0.01253768801689148,
0.2130204290151596,
0.23028971254825592,
-0.07488752156496048,
-0.02579137310385704,
-0.2195548415184021,
-0.3736034333705902,
0.18140318989753723,
0.1367769092321396,
0.4870985448360443,
0.043927937746047974,
0.023389162495732307,
-0.022292206063866615,
0.07915055006742477,
-0.4419938325881958,
0.035268306732177734,
-0.2981918454170227,
0.25115281343460083,
0.1383643001317978,
-0.050044894218444824,
0.34248706698417664,
-0.22493061423301697,
0.1001877561211586,
-0.08026348054409027,
-0.3314436674118042,
-0.28395211696624756,
-0.15375949442386627,
0.093923419713974,
-0.059799082577228546,
-0.014802401885390282,
0.05631978437304497,
0.14482907950878143,
-0.14088428020477295,
-0.2053082436323166,
0.310982346534729,
0.17625898122787476,
0.021191928535699844,
0.18002788722515106,
0.07944528013467789,
0.08036087453365326,
-0.03985254094004631,
-0.030152030289173126,
0.03322768211364746,
0.2335813045501709,
-0.13161955773830414,
0.005653049796819687,
-0.26622581481933594,
-0.11000848561525345,
0.3445487916469574,
0.26432764530181885,
0.09671187400817871,
0.14239078760147095,
0.07898945361375809,
0.07681986689567566,
0.1097644716501236,
0.12832750380039215,
0.35072004795074463,
0.023857932537794113,
-0.3351130485534668,
-0.1269630491733551,
0.23487341403961182,
0.3231031894683838,
-0.2409713864326477,
-0.11394618451595306,
0.21386490762233734,
-0.06423880159854889,
0.23868533968925476,
0.32350343465805054,
0.4839436709880829,
0.01500411331653595,
0.28442102670669556,
0.038723547011613846,
0.19974637031555176,
-0.10347706079483032,
0.004342320375144482,
0.10256706178188324,
-0.39783912897109985,
-0.061246830970048904,
0.17918552458286285,
-0.13596677780151367,
0.0835246741771698,
0.05138029158115387,
0.0835457593202591,
0.5719179511070251,
-0.03804563730955124,
0.3100537657737732,
0.08867156505584717,
-0.12410075962543488,
0.36086782813072205,
0.18998824059963226,
-0.06380999088287354,
0.03421637415885925,
0.11881159245967865,
0.34547102451324463,
-0.22764818370342255,
-0.1337536871433258,
-0.5196162462234497,
-0.03876858577132225,
-0.18796348571777344,
-0.014681791886687279,
-0.21222682297229767,
0.024313554167747498,
-0.14321893453598022,
0.025314707309007645,
0.1289197951555252,
-0.03769584000110626,
0.1989021897315979,
-0.062236666679382324,
-0.24398760497570038,
-0.010681642219424248,
0.030597064644098282,
0.24277710914611816,
0.17808768153190613,
-0.1657271534204483,
0.06896430999040604,
0.1964452564716339,
-0.01127258688211441,
0.18923282623291016,
0.47814181447029114,
0.3382512032985687,
-0.028395038098096848,
0.1389417052268982,
-0.1501673012971878,
0.0040085772052407265,
0.009057903662323952,
-0.08048843592405319,
0.4012753367424011,
-0.1378350406885147,
-0.20443180203437805,
0.4201856255531311,
0.2580987513065338,
-0.24402101337909698,
-0.17570053040981293,
-0.08928415179252625,
-0.2225887030363083,
-0.07827574014663696,
0.18055811524391174,
0.21822039783000946,
0.0615198016166687,
-0.15515215694904327,
-0.06433513015508652,
-0.1428612619638443,
-0.06272336840629578,
0.45811474323272705,
-0.13342329859733582,
0.22054782509803772,
-0.3621733784675598,
0.14973317086696625,
0.03147478774189949,
0.501007080078125,
0.10529889166355133,
-0.1338893473148346,
-0.34947121143341064,
-0.17274919152259827,
-0.5649532675743103,
0.12925715744495392,
-0.16702556610107422,
-0.08596539497375488,
0.14337369799613953,
0.034378781914711,
0.12676730751991272,
0.30507463216781616,
-0.2045082002878189,
-0.37955981492996216,
0.1468369960784912,
-0.1668035238981247,
-0.27572306990623474,
0.1596595197916031,
-0.2756422162055969,
-0.075886569917202,
0.19449220597743988,
-0.6148539185523987,
0.2496553659439087,
0.0896717831492424,
0.06874793022871017,
0.0682859867811203,
0.27882108092308044,
0.20161184668540955,
-0.1174347996711731,
0.15506276488304138,
0.13047337532043457,
0.31987130641937256,
-0.18278038501739502,
-0.021920597180724144,
-0.22628208994865417,
-0.14552205801010132,
-0.16955986618995667,
0.2397664189338684,
0.04486590623855591,
0.13044700026512146,
0.04264017194509506,
-0.11196371912956238,
-0.2046017199754715,
0.20372430980205536,
0.2664561867713928,
0.1203947514295578,
-0.1937389224767685,
0.06664323061704636,
-0.11628223955631256,
-0.08507656306028366,
-0.0005743894726037979,
0.26621437072753906,
-0.08860121667385101,
0.11643235385417938,
-0.003279775381088257,
-0.30076104402542114,
0.6496264934539795,
-0.04213190823793411,
-0.03053322620689869,
-0.12011722475290298,
0.34791266918182373,
0.17209196090698242,
-0.3956072926521301,
-0.7189174294471741,
0.2969973385334015,
0.15199819207191467,
0.05520471930503845,
-0.08595907688140869,
0.3444344699382782,
0.11987748742103577,
0.16559375822544098,
-0.03412940725684166,
0.472248375415802,
0.036072988063097,
-0.10102095454931259,
0.18714378774166107,
-0.1981584131717682
] |
https://github.com/huggingface/datasets/issues/4742 | Dummy data nowhere to be found | Hi @BramVanroy, thanks for reporting.
First of all, please note that you do not need the dummy data: this was the case when we were adding datasets to the `datasets` library (on this GitHub repo), so that we could test the correct loading of all datasets with our CI. However, this is no longer the case for datasets on the Hub.
- We should definitely update our docs.
Second, the dummy data is generated locally:
- in your case, the dummy data will be generated inside the directory: `./datasets/hebban-reviews/dummy`
- please note the preceding `./datasets` directory: the reason for this is that the command to generate the dummy data was specifically created for our `datasets` library, and therefore assumes our directory structure: commands are run from the root directory of our GitHub repo, and datasets scripts are under `./datasets`
| ## Describe the bug
To finalize my dataset, I wanted to create dummy data as per the guide and I ran
```shell
datasets-cli dummy_data datasets/hebban-reviews --auto_generate
```
where hebban-reviews is [this repo](https://huggingface.co/datasets/BramVanroy/hebban-reviews). And even though the scripts runs and shows a message at the end that it succeeded, I cannot find the dummy data anywhere. Where is it?
## Expected results
To see the dummy data in the datasets' folder or in the folder where I ran the command.
## Actual results
I see the following message but I cannot find the dummy data anywhere.
```
Dummy data generation done and dummy data test succeeded for config 'filtered''.
Automatic dummy data generation succeeded for all configs of '.\datasets\hebban-reviews\'
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
| 139 | Dummy data nowhere to be found
## Describe the bug
To finalize my dataset, I wanted to create dummy data as per the guide and I ran
```shell
datasets-cli dummy_data datasets/hebban-reviews --auto_generate
```
where hebban-reviews is [this repo](https://huggingface.co/datasets/BramVanroy/hebban-reviews). And even though the scripts runs and shows a message at the end that it succeeded, I cannot find the dummy data anywhere. Where is it?
## Expected results
To see the dummy data in the datasets' folder or in the folder where I ran the command.
## Actual results
I see the following message but I cannot find the dummy data anywhere.
```
Dummy data generation done and dummy data test succeeded for config 'filtered''.
Automatic dummy data generation succeeded for all configs of '.\datasets\hebban-reviews\'
```
## Environment info
- `datasets` version: 2.4.1.dev0
- Platform: Windows-10-10.0.19041-SP0
- Python version: 3.8.8
- PyArrow version: 8.0.0
- Pandas version: 1.4.3
Hi @BramVanroy, thanks for reporting.
First of all, please note that you do not need the dummy data: this was the case when we were adding datasets to the `datasets` library (on this GitHub repo), so that we could test the correct loading of all datasets with our CI. However, this is no longer the case for datasets on the Hub.
- We should definitely update our docs.
Second, the dummy data is generated locally:
- in your case, the dummy data will be generated inside the directory: `./datasets/hebban-reviews/dummy`
- please note the preceding `./datasets` directory: the reason for this is that the command to generate the dummy data was specifically created for our `datasets` library, and therefore assumes our directory structure: commands are run from the root directory of our GitHub repo, and datasets scripts are under `./datasets`
| [
-0.08476535975933075,
0.04323665797710419,
0.020455893129110336,
0.2214217633008957,
0.06339038908481598,
0.16641145944595337,
0.5988914370536804,
-0.014363080263137817,
0.08097237348556519,
0.1957332044839859,
-0.02974100597202778,
-0.029453717172145844,
0.10871540009975433,
-0.08145316690206528,
0.12888896465301514,
0.02942732162773609,
0.1744861602783203,
0.07817003130912781,
0.0802215039730072,
-0.12871351838111877,
-0.18510740995407104,
0.2916398346424103,
-0.22381900250911713,
0.0237601138651371,
-0.32816892862319946,
0.16006596386432648,
-0.3382750451564789,
0.32720285654067993,
-0.06893536448478699,
-0.1402393877506256,
0.5045545101165771,
0.16576984524726868,
0.10933251678943634,
0.7561354637145996,
-0.00011757078755181283,
0.19116409122943878,
0.4780954122543335,
-0.25348538160324097,
-0.6908294558525085,
-0.09897106885910034,
0.019482582807540894,
-0.055681318044662476,
-0.24367961287498474,
0.009110137820243835,
-0.1834929883480072,
0.012516481801867485,
-0.08520349115133286,
-0.27895963191986084,
-0.21432234346866608,
0.35464605689048767,
0.12817621231079102,
0.217416912317276,
-0.0036387406289577484,
-0.10358989238739014,
0.17781266570091248,
0.73442143201828,
-0.25762057304382324,
0.16395989060401917,
0.006881095468997955,
0.1995355486869812,
0.4199129641056061,
-0.02019696868956089,
0.023470761254429817,
0.033473335206508636,
-0.09957360476255417,
0.43847891688346863,
0.08759623765945435,
-0.2650586664676666,
0.1743941307067871,
0.3286994695663452,
0.45522353053092957,
-0.5520018935203552,
-0.37872374057769775,
-0.08840316534042358,
-0.04187390208244324,
-0.05436333641409874,
0.15326520800590515,
0.42417389154434204,
-0.10297232866287231,
0.09076347947120667,
-0.09227383881807327,
0.11707223206758499,
-0.08635925501585007,
0.21519321203231812,
-0.03461117297410965,
0.19552630186080933,
-0.042905502021312714,
0.04841507971286774,
0.11707764863967896,
-0.03183060884475708,
-0.02176794409751892,
-0.5033445358276367,
-0.3231459856033325,
0.2044612169265747,
0.09840524196624756,
-0.2503545880317688,
-0.0367281511425972,
0.2036779522895813,
0.11635860055685043,
0.17132143676280975,
0.06455650925636292,
-0.026489678770303726,
-0.11955158412456512,
0.09190375357866287,
-0.013883661478757858,
0.23410730063915253,
-0.10955341905355453,
0.482391357421875,
0.36662840843200684,
0.41263967752456665,
0.2643771171569824,
-0.15354490280151367,
0.021943077445030212,
0.2096540927886963,
0.08077660202980042,
0.030847610905766487,
0.2789897322654724,
-0.011000864207744598,
-0.5299056172370911,
0.08711881190538406,
-0.00016391649842262268,
-0.018440112471580505,
0.05284978449344635,
0.25017762184143066,
-0.11171331256628036,
0.026308942586183548,
0.05403628945350647,
0.1370966136455536,
-0.33466583490371704,
-0.1863991767168045,
-0.2353709638118744,
-0.012735236436128616,
-0.20329426229000092,
0.012816477566957474,
0.2578108310699463,
0.07522451132535934,
0.423848956823349,
0.19771598279476166,
0.0059018731117248535,
0.06411834061145782,
0.3593214750289917,
-0.12124967575073242,
0.1940164864063263,
0.37382349371910095,
0.06724292039871216,
-0.14559639990329742,
0.05830707401037216,
-0.2071821540594101,
-0.17761583626270294,
0.2933404743671417,
-0.05811206251382828,
-0.13027308881282806,
-0.267120361328125,
0.1150587648153305,
-0.4685075879096985,
-0.01599036157131195,
-0.1594831645488739,
0.2750452160835266,
-0.005483806133270264,
0.004924088716506958,
0.05138244479894638,
-0.0795186311006546,
-0.1663268655538559,
-0.12008864432573318,
0.3423539698123932,
0.8359342217445374,
-0.7828123569488525,
-0.0417301170527935,
-0.2297334522008896,
0.07507571578025818,
0.07184378057718277,
-0.04797646030783653,
-0.0679403617978096,
0.5108204483985901,
-0.3995070457458496,
-0.15639135241508484,
-0.07173047214746475,
-0.3728450834751129,
-0.03520502895116806,
-0.03201064094901085,
0.19669415056705475,
0.23270262777805328,
-0.010725602507591248,
-0.05616308003664017,
-0.1935223937034607,
-0.07276182621717453,
-0.29068201780319214,
-0.11036577820777893,
-0.24963438510894775,
-0.21925286948680878,
-0.08445969223976135,
-0.2341955155134201,
0.12782402336597443,
-0.04463092237710953,
-0.07357755303382874,
0.2250339686870575,
-0.042441584169864655,
-0.28692373633384705,
0.14443549513816833,
-0.04561636224389076,
0.14737549424171448,
0.28598761558532715,
0.2643945515155792,
0.16363930702209473,
0.29583755135536194,
0.09949066489934921,
-0.30899080634117126,
0.14549067616462708,
-0.0015151575207710266,
0.23093414306640625,
-0.11526629328727722,
-0.2662316560745239,
-0.33314672112464905,
0.04198162257671356,
-0.17873786389827728,
-0.0764559954404831,
0.13411980867385864,
0.3560137450695038,
0.3368282616138458,
-0.043677907437086105,
0.0016597844660282135,
0.3122095763683319,
-0.0016945097595453262,
0.13966764509677887,
-0.5104748010635376,
0.34726452827453613,
0.05335473269224167,
-0.14391569793224335,
-0.14279505610466003,
0.47975534200668335,
0.052435263991355896,
-0.2966068685054779,
0.07679583877325058,
0.475302517414093,
0.17520299553871155,
-0.0307195782661438,
0.2536068558692932,
-0.0006067007780075073,
0.2936088442802429,
0.039735037833452225,
0.27024438977241516,
0.406940758228302,
0.1475740373134613,
0.06546130031347275,
-0.38782215118408203,
0.1692555844783783,
0.03123949095606804,
-0.03412724286317825,
-0.19238151609897614,
-0.08682869374752045,
0.3287324607372284,
-0.1345328390598297,
0.03406146913766861,
-0.220524862408638,
0.04948669672012329,
0.06658151745796204,
0.4443226456642151,
0.16673031449317932,
-0.20629183948040009,
0.3950554132461548,
0.2530120611190796,
-0.2939773201942444,
0.029993627220392227,
0.1157865896821022,
-0.19861754775047302,
-0.10073194652795792,
0.08640161156654358,
0.23301823437213898,
0.7311699986457825,
0.15380606055259705,
-0.10138924419879913,
-0.2419356107711792,
-0.17639562487602234,
-0.1585673838853836,
0.1717076450586319,
0.08800762891769409,
-0.2504679262638092,
0.17024973034858704,
-0.13170470297336578,
-0.09922467917203903,
-0.1578059196472168,
0.01635606959462166,
0.029245583340525627,
0.3658541142940521,
-0.35466545820236206,
0.014607159420847893,
-0.17469419538974762,
0.08716998249292374,
0.14582104980945587,
-0.13684354722499847,
0.025074075907468796,
-0.29001951217651367,
0.11776316165924072,
-0.019885409623384476,
-0.14387322962284088,
-0.16630777716636658,
-0.00939413532614708,
0.40402209758758545,
-0.17714057862758636,
-0.013849163427948952,
-0.6510522961616516,
0.0081021161749959,
-0.6761945486068726,
0.02040484920144081,
-0.0031443703919649124,
0.03141160309314728,
0.3233587145805359,
-0.26341548562049866,
0.07842385023832321,
-0.07150028645992279,
-0.31240323185920715,
0.023520512506365776,
0.0018598996102809906,
0.5812911987304688,
0.3332884907722473,
0.18113452196121216,
-0.1078600287437439,
0.1368185430765152,
0.20095176994800568,
-0.037044115364551544,
-0.23274187743663788,
0.34762170910835266,
-0.13981184363365173,
-0.08430933952331543,
-0.2587701082229614,
-0.32286980748176575,
-0.436857134103775,
0.016730312258005142,
-0.11336477100849152,
0.0019318051636219025,
-0.108298659324646,
0.19418694078922272,
0.18253903090953827,
-0.09387094527482986,
0.16153505444526672,
-0.18373297154903412,
-0.20975646376609802,
-0.5915191173553467,
0.435806006193161,
-0.3941110074520111,
-0.11880417168140411,
0.18085964024066925,
-0.2834388017654419,
0.1415310502052307,
-0.26059162616729736,
-0.4857339859008789,
-0.15707288682460785,
-0.05195033550262451,
0.09801632165908813,
0.02325894683599472,
-0.18402130901813507,
0.3979554772377014,
-0.011009925976395607,
0.06426946818828583,
-0.45539867877960205,
-0.3715907037258148,
0.22669818997383118,
-0.030590727925300598,
0.3504754304885864,
0.02676749788224697,
0.1952926218509674,
-0.05883364379405975,
0.4179455041885376,
0.4484504163265228,
-0.1599561870098114,
0.060016438364982605,
0.050289593636989594,
0.7536908984184265,
-0.10586007684469223,
-0.11002442985773087,
-0.13025571405887604,
0.2295958399772644,
0.01710166037082672,
0.2945808470249176,
0.23464065790176392,
0.04162067919969559,
-0.024384457617998123,
0.0924324244260788,
-0.06380695104598999,
-0.18747471272945404,
-0.10516321659088135,
-0.1862528771162033,
0.09245051443576813,
-0.002327844500541687,
-0.0365811362862587,
-0.3006703555583954,
-0.3416668176651001,
-0.016616350039839745,
0.303210973739624,
0.2665330767631531,
0.18380551040172577,
-0.3599718511104584,
-0.07884593307971954,
-0.3731365203857422,
-0.059941425919532776,
-0.17013248801231384,
0.34810835123062134,
-0.17997008562088013,
0.22170162200927734,
-0.04244033992290497,
0.09696456789970398,
0.29488426446914673,
-0.5897490382194519,
-0.03104168176651001,
0.26150867342948914,
0.22924751043319702,
-0.46050629019737244,
-0.14810359477996826,
-0.1409655064344406,
0.33396968245506287,
0.20343415439128876,
0.1820087432861328,
-0.5291750431060791,
-0.10424891114234924,
0.418150931596756,
0.205971360206604,
-0.3063013553619385,
-0.33187565207481384,
-0.324876993894577,
-0.44253578782081604,
0.027461038902401924,
-0.12543246150016785,
0.024857250973582268,
0.08586598932743073,
-0.057361356914043427,
-0.24750958383083344,
0.43587276339530945,
-0.0833011269569397,
0.3138561546802521,
-0.1319519728422165,
0.484009712934494,
0.06457778066396713,
0.3190055787563324,
0.22642481327056885,
0.05346819385886192,
0.13330049812793732,
0.5221344232559204,
-0.05436338111758232,
-0.15670698881149292,
-0.01979639381170273,
-0.36382490396499634,
0.24739474058151245,
0.20297491550445557,
-0.05104544386267662,
-0.09523000568151474,
-0.40096911787986755,
0.1162918210029602,
-0.3490244150161743,
0.15243881940841675,
0.08588867634534836,
0.005695701576769352,
-0.1371534764766693,
-0.33637189865112305,
0.05333418399095535,
-0.25672128796577454,
0.08960840106010437,
0.5983350276947021,
0.03224005922675133,
-0.3449273407459259,
0.44939130544662476,
-0.01667686551809311,
0.7609249949455261,
0.2288682460784912,
0.11937320232391357,
0.09884729236364365,
-0.015775445848703384,
0.111791230738163,
-0.31233149766921997,
-0.1275998204946518,
-0.18982110917568207,
0.2664790749549866,
-0.04539533331990242,
-0.04212663322687149,
0.07802675664424896,
0.29393982887268066,
-0.4673963189125061,
0.1790042221546173,
-0.4048219323158264,
0.2270471453666687,
0.13597372174263,
-0.002921324223279953,
-0.1314413696527481,
-0.15660366415977478,
0.49491018056869507,
0.1352122277021408,
0.10230604559183121,
0.11367760598659515,
-0.08177804201841354,
-0.09545419365167618,
-0.27688857913017273,
0.18982139229774475,
-0.17021292448043823,
-0.09746658056974411,
-0.3922579288482666,
-0.07851574569940567,
0.15190425515174866,
-0.19182538986206055,
-0.46678537130355835,
0.17559537291526794,
0.7732083201408386,
0.3194219768047333,
-0.2645140588283539,
0.1989472359418869,
-0.1684533655643463,
0.0874783992767334,
0.19662953913211823,
-0.20302680134773254,
0.021438082680106163,
0.19102829694747925,
-0.48124679923057556,
-0.23011401295661926,
-0.12361685931682587,
-0.17667602002620697,
-0.09604166448116302,
-0.3820125460624695,
0.15976668894290924,
-0.2907588481903076,
0.0065605659037828445,
-0.08874067664146423,
-0.16185997426509857,
-0.1618902087211609,
0.09436412155628204,
0.3853307366371155,
-0.1655219942331314,
0.2774338126182556,
-0.38915932178497314,
-0.32416069507598877,
-0.3246181905269623,
-0.13117769360542297,
-0.06680901348590851,
0.19713540375232697,
0.09361748397350311,
-0.06983210146427155,
0.01833759993314743,
-0.1517067849636078,
0.09999125450849533,
-0.01136685535311699,
-0.5348648428916931,
0.2132900357246399,
0.0007031271234154701,
0.14347140491008759,
0.10313042998313904,
-0.05906229838728905,
0.09856066107749939,
-0.31466439366340637,
-0.36354607343673706,
-0.42938941717147827,
-0.16351152956485748,
-0.07353635132312775,
0.40159013867378235,
0.47172704339027405,
0.0890868678689003,
-0.2326531708240509,
0.2695423364639282,
-0.05372139811515808,
-0.2544431686401367,
-0.1963876187801361,
-0.12000706791877747,
0.009615916758775711,
0.1526048332452774,
0.10355138778686523,
0.17172478139400482,
-0.10197633504867554,
-0.0005183462053537369,
-0.05273780971765518,
0.14100149273872375,
-0.12783680856227875,
-0.14483751356601715,
0.137661412358284,
-0.1050202026963234,
-0.1905941367149353,
0.058224599808454514,
-0.04854985326528549,
-0.13226793706417084,
-0.30188533663749695,
0.05865911766886711,
0.04938966780900955,
-0.11924366652965546,
0.1120234802365303,
-0.11377887427806854,
0.06657961755990982,
0.020834412425756454,
0.06429742276668549,
0.2290428876876831,
0.1389169842004776,
0.13177812099456787,
0.16089272499084473,
0.20774208009243011,
-0.02410869672894478,
0.0855746790766716,
0.10413233190774918,
-0.30048447847366333,
0.016609221696853638,
0.44005364179611206,
-0.28819090127944946,
0.22670549154281616,
0.07293158769607544,
0.1698783040046692,
0.02695104107260704,
-0.2597962021827698,
0.1095583438873291,
0.12940552830696106,
0.14849694073200226,
-0.2179415076971054,
-0.21202364563941956,
0.22107695043087006,
0.3361477851867676,
0.12834903597831726,
0.30857256054878235,
0.3694983124732971,
-0.17002981901168823,
0.37932658195495605,
0.19797596335411072,
0.42807725071907043,
-0.12612943351268768,
0.12483704090118408,
0.4095648229122162,
-0.1737908124923706,
0.2662147581577301,
0.1578192561864853,
-0.10680702328681946,
-0.16286319494247437,
0.2749105393886566,
0.4966970682144165,
0.4846755862236023,
0.1922488510608673,
0.12869879603385925,
-0.08640215545892715,
-0.2528487741947174,
0.16170960664749146,
0.08058971166610718,
-0.13230672478675842,
0.0667109563946724,
0.010222114622592926,
0.4286932945251465,
-0.36382734775543213,
0.004665900953114033,
-0.5102396607398987,
-0.3029842674732208,
-0.37538179755210876,
-0.042419835925102234,
-0.13281700015068054,
-0.08123406022787094,
-0.09524578601121902,
-0.061720870435237885,
0.48440438508987427,
-0.19845010340213776,
-0.06717287003993988,
-0.15333500504493713,
-0.3284132480621338,
-0.12991786003112793,
0.10592225939035416,
0.24349042773246765,
0.04067857563495636,
-0.0462413989007473,
0.2794661521911621,
0.2500877380371094,
-0.19242766499519348,
0.21821531653404236,
0.48031702637672424,
0.27764374017715454,
0.23742090165615082,
0.0516141802072525,
0.15812692046165466,
0.03591515123844147,
-0.234612375497818,
-0.03915059566497803,
0.5700711607933044,
-0.11954888701438904,
-0.10981190204620361,
0.1029311865568161,
0.14703862369060516,
-0.05302659794688225,
-0.03998949006199837,
0.24854856729507446,
-0.002686126157641411,
-0.260131299495697,
0.5068010091781616,
-0.22166067361831665,
-0.1959766149520874,
-0.049772799015045166,
-0.08397351950407028,
-0.2452830970287323,
-0.26771482825279236,
0.5820057988166809,
-0.23785154521465302,
-0.04665037989616394,
-0.491158127784729,
0.05182646960020065,
-0.20749352872371674,
0.21248742938041687,
0.08024543523788452,
-0.40663430094718933,
-0.44363951683044434,
-0.25271978974342346,
-0.43877285718917847,
-0.08450394123792648,
-0.3180573284626007,
-0.15283936262130737,
0.05856684222817421,
0.2637336254119873,
-0.007337093353271484,
-0.17206592857837677,
0.13181865215301514,
-0.1321658492088318,
0.15910087525844574,
0.30528366565704346,
-0.30267906188964844,
-0.25378182530403137,
-0.2941135764122009,
0.2424602508544922,
-0.07735389471054077,
-0.4054374396800995,
0.04698021337389946,
0.15583869814872742,
-0.0931842029094696,
0.07040315121412277,
-0.12324102222919464,
0.4314272999763489,
0.21129204332828522,
0.16360333561897278,
0.17720241844654083,
0.39836248755455017,
0.029196687042713165,
0.32872438430786133,
-0.25841596722602844,
0.07742002606391907,
-0.22944535315036774,
0.0503481850028038,
-0.10683149099349976,
0.14505568146705627,
-0.3545806109905243,
-0.08094307780265808,
-0.1175590306520462,
-0.22038187086582184,
0.36894458532333374,
0.1753353774547577,
-0.19234873354434967,
0.17292621731758118,
-0.41391152143478394,
-0.05067131295800209,
0.41264569759368896,
0.11207149177789688,
-0.10814870893955231,
0.03263840824365616,
0.22304333746433258,
-0.06568776071071625,
0.17920270562171936,
-0.0868120938539505,
-0.1389055699110031,
-0.25709035992622375,
0.07230329513549805,
-0.12969300150871277,
-0.10040435940027237,
-0.2740168869495392,
0.19903361797332764,
0.383306622505188,
0.14116524159908295,
0.12939903140068054,
0.38473349809646606,
0.042876582592725754,
0.29841068387031555,
0.07971569895744324,
0.34086522459983826,
0.1394219696521759,
0.004398299381136894,
0.5743787288665771,
-0.08188226819038391
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.