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/2387 | datasets 1.6 ignores cache | I understand your point @stas00, as I am not very convinced with current implementation.
My concern is: which numerical value should then pass a user who wants `keep_in_memory=True` by default, independently of dataset size? Currently it is `0` for this case. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 41 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
I understand your point @stas00, as I am not very convinced with current implementation.
My concern is: which numerical value should then pass a user who wants `keep_in_memory=True` by default, independently of dataset size? Currently it is `0` for this case. | [
-0.21584829688072205,
0.020310938358306885,
0.04224285110831261,
0.14041554927825928,
0.1821746528148651,
0.046231210231781006,
0.14098046720027924,
0.3139563202857971,
0.0551588274538517,
-0.0644526332616806,
-0.23593774437904358,
-0.05794752761721611,
-0.02470039576292038,
-0.3315778374671936,
-0.10819010436534882,
0.019804969429969788,
0.21446523070335388,
0.023075968027114868,
-0.16784194111824036,
-0.04096858948469162,
-0.14435866475105286,
0.26739442348480225,
-0.12829148769378662,
-0.22863785922527313,
-0.6212523579597473,
0.1536586582660675,
-0.05398784205317497,
-0.05782859027385712,
-0.14363379776477814,
-0.3942036032676697,
0.3681201934814453,
0.2826850414276123,
0.11369535326957703,
0.4599291682243347,
-0.00012042995513183996,
0.15956906974315643,
0.20316892862319946,
0.021155400201678276,
-0.41049355268478394,
-0.05735562741756439,
0.03545454144477844,
-0.08395922183990479,
0.021498430520296097,
0.16403114795684814,
-0.2790546119213104,
-0.03063715249300003,
0.19111797213554382,
-0.574643075466156,
0.4524192810058594,
0.34329578280448914,
0.1602972447872162,
0.5254043340682983,
-0.14875738322734833,
-0.037879835814237595,
-0.06083414703607559,
-0.030115224421024323,
-0.3328552544116974,
0.0926356166601181,
0.13140353560447693,
0.08421652019023895,
-0.27702876925468445,
0.3524876832962036,
0.09798575937747955,
-0.021821074187755585,
0.16133686900138855,
0.010781224817037582,
-0.1585710644721985,
0.020284418016672134,
0.2987549304962158,
0.10706205666065216,
0.37876495718955994,
-0.2141118347644806,
-0.5825321078300476,
-0.33645233511924744,
-0.35387122631073,
0.006453385576605797,
0.34401094913482666,
-0.0655079185962677,
0.13791432976722717,
0.3956795632839203,
-0.43314990401268005,
-0.06844641268253326,
0.06999412178993225,
-0.004433669149875641,
0.061145395040512085,
0.2066848874092102,
-0.11624637991189957,
-0.09949441999197006,
0.12310265004634857,
0.1499091386795044,
0.19375279545783997,
-0.16352784633636475,
-0.10912464559078217,
0.29927825927734375,
-0.35598915815353394,
-0.010812900960445404,
0.16669921576976776,
0.03966230899095535,
0.011087935417890549,
0.11882426589727402,
0.06401419639587402,
0.13640478253364563,
0.09252827614545822,
-0.25497978925704956,
-0.07287751138210297,
0.5833613276481628,
0.194710373878479,
0.2663048505783081,
0.018418066203594208,
0.04759516194462776,
-0.15672896802425385,
-0.09623382240533829,
-0.044799357652664185,
-0.2194099724292755,
0.22287409007549286,
-0.07246392965316772,
0.16001932322978973,
-0.17798863351345062,
-0.008368371054530144,
0.16883087158203125,
0.05226162075996399,
-0.10712029784917831,
0.14251983165740967,
0.2979218363761902,
-0.1997743397951126,
0.2688971757888794,
-0.07179193198680878,
-0.16609174013137817,
-0.2827942669391632,
0.04258936271071434,
-0.3636680245399475,
-0.06255635619163513,
-0.28465238213539124,
0.2555699646472931,
0.26763394474983215,
-0.37241846323013306,
0.4367181062698364,
0.13248562812805176,
0.22684526443481445,
0.01826716959476471,
0.0358220636844635,
-0.11249940097332001,
0.3517662286758423,
0.14983685314655304,
-0.4831211566925049,
0.41046425700187683,
0.09792642295360565,
0.15432089567184448,
-0.2801338732242584,
-0.034504763782024384,
-0.16246643662452698,
-0.2589806020259857,
0.17886923253536224,
0.0967065617442131,
-0.475932240486145,
-0.28512585163116455,
0.12386225908994675,
0.24923229217529297,
0.3530563712120056,
-0.18263983726501465,
0.05768778920173645,
-0.05464710295200348,
-0.3108605742454529,
-0.042419079691171646,
0.20721694827079773,
0.611078143119812,
-0.0987185686826706,
-0.27018994092941284,
0.3160686790943146,
0.07831836491823196,
0.1078268364071846,
0.24697889387607574,
-0.11518052220344543,
-0.20416295528411865,
-0.09440943598747253,
-0.045154135674238205,
0.21275100111961365,
-0.27991604804992676,
-0.656403124332428,
0.0895092636346817,
0.0316261351108551,
0.27868688106536865,
0.06271900236606598,
-0.030414212495088577,
0.1169167011976242,
-0.2188132405281067,
-0.16988858580589294,
0.17601928114891052,
0.0873950719833374,
0.11032342165708542,
-0.4886091947555542,
-0.31973373889923096,
0.004968628287315369,
0.014940589666366577,
0.16073967516422272,
0.1425744593143463,
-0.20669114589691162,
0.19837872684001923,
0.06475815922021866,
0.10646720230579376,
0.238235205411911,
0.4176747798919678,
-0.057785678654909134,
-0.25080424547195435,
0.2393510788679123,
-0.20668461918830872,
-0.4679911732673645,
0.38137418031692505,
-0.05819973349571228,
0.15043634176254272,
0.05138995498418808,
-0.09193535149097443,
-0.3147406578063965,
-0.19004566967487335,
-0.3224796652793884,
-0.4129859209060669,
0.029199600219726562,
0.08356159925460815,
0.46644893288612366,
-0.06278927624225616,
-0.2708919048309326,
0.4161112904548645,
0.17768526077270508,
0.20261967182159424,
-0.19791534543037415,
-0.036706775426864624,
-0.07149934023618698,
-0.12923435866832733,
-0.37207549810409546,
-0.05481507629156113,
0.15075108408927917,
-0.2703869044780731,
-0.16460588574409485,
0.4357373118400574,
-0.05497439205646515,
0.12648530304431915,
-0.01637866348028183,
0.27872398495674133,
0.13101519644260406,
0.20948383212089539,
0.12619736790657043,
0.18614457547664642,
-0.17185255885124207,
-0.020707838237285614,
-0.040091536939144135,
0.374408483505249,
0.1988709270954132,
0.2121002972126007,
0.1096511036157608,
-0.057896293699741364,
-0.05238098278641701,
0.020036187022924423,
-0.027195099741220474,
-0.3291664123535156,
0.2592809498310089,
-0.09703293442726135,
0.6289585828781128,
0.19152872264385223,
0.0682511031627655,
0.2737971544265747,
0.7349140048027039,
0.19943124055862427,
-0.23233738541603088,
0.14957723021507263,
-0.2541774809360504,
-0.3552420735359192,
0.16007526218891144,
0.28084132075309753,
0.3655431568622589,
0.09676315635442734,
0.4016492962837219,
0.12173143029212952,
-0.05928127467632294,
-0.09258200228214264,
0.1318960189819336,
-0.103767991065979,
0.03655640780925751,
-0.07430800050497055,
0.056555259972810745,
0.2631292939186096,
-0.3260217607021332,
0.1360270082950592,
0.01172001101076603,
0.10843480378389359,
-0.11941887438297272,
0.24091608822345734,
-0.3367220163345337,
0.27846476435661316,
-0.13545365631580353,
-0.14320097863674164,
-0.3787074089050293,
-0.20354129374027252,
-0.04893707484006882,
0.11523683369159698,
-0.0025183502584695816,
0.32485368847846985,
-0.2567093074321747,
0.17130477726459503,
-0.03613027185201645,
-0.30389800667762756,
-0.4968312084674835,
-0.14644862711429596,
-0.2653333246707916,
-0.05227586254477501,
-0.007760761771351099,
-0.37814879417419434,
-0.041796788573265076,
-0.17041565477848053,
-0.24277395009994507,
-0.1978735774755478,
-0.3297617435455322,
0.15431928634643555,
-0.07255367189645767,
-0.028923751786351204,
-0.07184725999832153,
0.056893642991781235,
-0.13047707080841064,
0.09073072671890259,
0.17321719229221344,
-0.35068508982658386,
-0.1693694144487381,
-0.03692014142870903,
0.08410683274269104,
0.14310495555400848,
-0.21307234466075897,
-0.21049052476882935,
0.00770597904920578,
-0.27911505103111267,
0.13159260153770447,
-0.16913773119449615,
-0.03631100803613663,
0.5730293989181519,
0.018048003315925598,
0.04935425519943237,
-0.15419863164424896,
0.1935804784297943,
-0.28173595666885376,
-0.5460475087165833,
0.44806548953056335,
-0.00683469045907259,
-0.36912068724632263,
-0.1439012885093689,
0.013762935996055603,
0.1789388358592987,
0.3921636939048767,
-0.18156318366527557,
-0.24659274518489838,
-0.39608901739120483,
0.0011066459119319916,
0.21099261939525604,
0.06586411595344543,
0.6789287328720093,
-0.012012675404548645,
-0.05644751340150833,
-0.21564066410064697,
-0.11548101902008057,
0.14036980271339417,
-0.17449089884757996,
0.32187002897262573,
-0.2863914966583252,
0.11334939301013947,
0.2614363431930542,
0.6822908520698547,
0.21176432073116302,
-0.054289329797029495,
0.22974425554275513,
0.22260752320289612,
0.48358458280563354,
-0.3701799511909485,
-0.2817356586456299,
-0.030361058190464973,
-0.22764495015144348,
0.04231822490692139,
0.10513655841350555,
0.28540825843811035,
0.1345895528793335,
-0.1757144182920456,
0.08382885158061981,
0.07810597121715546,
-0.28135502338409424,
0.03971435874700546,
-0.34403637051582336,
0.33229467272758484,
0.4198826849460602,
0.352690190076828,
-0.29395732283592224,
-0.06161084026098251,
0.08503097295761108,
0.16777658462524414,
0.24163350462913513,
0.16131551563739777,
-0.13083943724632263,
0.6268689036369324,
-0.782776951789856,
0.21769508719444275,
-0.021080292761325836,
0.2715778648853302,
0.11716797947883606,
-0.2589392066001892,
0.0737982839345932,
-0.07937896996736526,
0.46842533349990845,
0.03452921286225319,
-0.091562420129776,
0.08982902765274048,
-0.25841569900512695,
-0.32636189460754395,
-0.06760496646165848,
0.0506657175719738,
0.06552737951278687,
0.5230581760406494,
0.3059903681278229,
-0.2612777352333069,
-0.5721397995948792,
-0.00252409465610981,
0.026563838124275208,
0.06707152724266052,
-0.07005112618207932,
-0.309541791677475,
-0.010731562972068787,
-0.05100935325026512,
-0.04545515030622482,
0.21166905760765076,
0.05121684446930885,
0.009773625060915947,
0.20603491365909576,
-0.23570914566516876,
-0.07497097551822662,
0.11236363649368286,
0.08760824799537659,
0.24824798107147217,
-0.13537448644638062,
0.21410557627677917,
0.3516710102558136,
0.0993536114692688,
-0.1307244449853897,
0.3770352303981781,
-0.15819303691387177,
-0.5206750631332397,
-0.03820884972810745,
0.2025385946035385,
-0.10039589554071426,
0.36105573177337646,
-0.14932270348072052,
-0.04942450672388077,
0.11878718435764313,
0.03089882805943489,
-0.09496531635522842,
0.34570789337158203,
0.2662646770477295,
0.15490588545799255,
-0.3207559287548065,
-0.4492103159427643,
0.42681270837783813,
0.08613890409469604,
-0.03036576509475708,
0.30225807428359985,
0.3320181369781494,
-0.18875472247600555,
0.13813966512680054,
-0.03812459856271744,
0.7185447216033936,
0.1204461082816124,
0.39835017919540405,
0.1804787516593933,
-0.10226477682590485,
0.416535884141922,
0.1965271681547165,
0.26794636249542236,
-0.15170395374298096,
-0.36949288845062256,
0.04004724323749542,
-0.03968941792845726,
0.07798619568347931,
0.14644019305706024,
-0.07728838175535202,
0.30255505442619324,
0.16517159342765808,
0.23534400761127472,
0.15264597535133362,
0.10489414632320404,
-0.17423248291015625,
-0.09782831370830536,
-0.08543574810028076,
0.14951618015766144,
-0.09774872660636902,
0.352014422416687,
-0.04460704326629639,
-0.028866298496723175,
0.02283928170800209,
-0.31221234798431396,
-0.19369542598724365,
0.08014518767595291,
-0.40667009353637695,
0.13650530576705933,
0.3283129930496216,
-0.32347777485847473,
0.10018664598464966,
0.021860163658857346,
0.4756092429161072,
-0.12112641334533691,
-0.19545137882232666,
0.23201078176498413,
-0.18953070044517517,
0.17078359425067902,
0.10861391574144363,
-0.17739687860012054,
0.3854377269744873,
0.11221035569906235,
0.037697695195674896,
-0.36451297998428345,
-0.25037917494773865,
-0.426832377910614,
0.1346520185470581,
0.005634337663650513,
-0.12937390804290771,
-0.2019224762916565,
0.039618946611881256,
0.05772433429956436,
-0.1295119673013687,
-0.2113541066646576,
0.1154869794845581,
0.0673520639538765,
0.04947379231452942,
0.06625518202781677,
-0.15441466867923737,
-0.21198728680610657,
-0.17640645802021027,
0.6264654397964478,
-0.10774322599172592,
-0.50859135389328,
0.4606698751449585,
-0.03960365429520607,
-0.27200794219970703,
-0.007272247225046158,
-0.2138533592224121,
0.2910134196281433,
-0.5071913599967957,
0.2666518986225128,
-0.0812651515007019,
-0.3147019147872925,
0.08674126863479614,
0.14540618658065796,
0.033226508647203445,
-0.0632968619465828,
-0.2446780800819397,
0.06862139701843262,
-0.5114704966545105,
0.008605509996414185,
-0.20045976340770721,
0.21937932074069977,
-0.07295898348093033,
0.002434004098176956,
-0.011456351727247238,
0.15091635286808014,
-0.24758465588092804,
0.03133736923336983,
0.0655503198504448,
-0.020034611225128174,
0.07157894968986511,
-0.44751840829849243,
0.519418478012085,
-0.21061496436595917,
-0.07882657647132874,
0.08933338522911072,
-0.36921873688697815,
-0.13951678574085236,
-0.2798082232475281,
0.15582317113876343,
0.020190026611089706,
-0.06329747289419174,
-0.1017562747001648,
0.2242698222398758,
-0.1317821592092514,
-0.3850979208946228,
0.2663275897502899,
0.42673763632774353,
-0.08594110608100891,
0.21773545444011688,
0.15436723828315735,
0.20085138082504272,
0.15707670152187347,
-0.11204551160335541,
-0.11531795561313629,
0.08053291589021683,
0.07986386120319366,
0.23234359920024872,
0.02329959347844124,
0.07374487817287445,
-0.06671860069036484,
0.05984170734882355,
0.2692279815673828,
-0.01681268960237503,
0.2843047082424164,
-0.24425648152828217,
-0.16338258981704712,
0.17659440636634827,
0.26945802569389343,
0.2560472786426544,
0.23523065447807312,
-0.35319411754608154,
0.05149843543767929,
0.13675862550735474,
-0.06650633364915848,
-0.09131418913602829,
0.2504137456417084,
0.12064950168132782,
0.16050973534584045,
0.0472535565495491,
0.081791952252388,
0.19531738758087158,
0.5193356275558472,
0.23480364680290222,
0.5798421502113342,
-0.29668593406677246,
0.39428848028182983,
0.14552900195121765,
0.3598194718360901,
0.1383572816848755,
0.6228572130203247,
0.059276267886161804,
0.008825205266475677,
0.06378424167633057,
-0.18409720063209534,
0.4451977014541626,
-0.1497717797756195,
0.2619174122810364,
-0.14699706435203552,
-0.26221615076065063,
-0.13805703818798065,
0.008339554071426392,
-0.14964643120765686,
0.23425540328025818,
-0.1989997923374176,
0.30889034271240234,
-0.20921362936496735,
-0.13994456827640533,
-0.14026358723640442,
0.009693920612335205,
-0.18278005719184875,
-0.32700589299201965,
0.27310389280319214,
0.0293133407831192,
-0.025441955775022507,
0.03490089997649193,
-0.040633443742990494,
0.013208620250225067,
0.35043415427207947,
-0.12686392664909363,
0.05776876211166382,
-0.21363648772239685,
-0.16553065180778503,
-0.08698979765176773,
0.3347529172897339,
-0.09475579112768173,
0.3914242088794708,
-0.10918882489204407,
-0.11418598890304565,
-0.06273253262042999,
0.5630705952644348,
0.24438881874084473,
0.2078849822282791,
0.033292390406131744,
0.13163800537586212,
-0.10752418637275696,
-0.031200043857097626,
-0.10291318595409393,
0.389537513256073,
-0.06376858055591583,
-0.15379461646080017,
0.028889723122119904,
0.02816501073539257,
-0.07448944449424744,
0.048342812806367874,
-0.43299201130867004,
0.013191361911594868,
-0.29839372634887695,
0.59552401304245,
-0.13271352648735046,
-0.2584170699119568,
-0.05778779834508896,
0.1808203160762787,
-0.18530002236366272,
0.14273346960544586,
0.19719421863555908,
-0.14727120101451874,
0.0389879010617733,
-0.25114530324935913,
0.046063125133514404,
0.2118891030550003,
0.5874782204627991,
0.44272005558013916,
0.03716471046209335,
-0.20491550862789154,
-0.031413860619068146,
-0.5466335415840149,
0.010971009731292725,
0.16608314216136932,
0.40068939328193665,
-0.0006395447999238968,
0.027808615937829018,
-0.19015634059906006,
0.061738744378089905,
0.024827033281326294,
0.15841752290725708,
-0.06573216617107391,
-0.12598350644111633,
-0.34693482518196106,
0.260881245136261,
0.013286489993333817,
0.00043924711644649506,
0.1867111474275589,
-0.2607446014881134,
0.08679959923028946,
0.0810842216014862,
-0.03249872475862503,
-0.13749635219573975,
0.08216579258441925,
0.01621732860803604,
-0.16073137521743774,
0.24065075814723969,
0.30362987518310547,
-0.08840256929397583,
0.17020058631896973,
-0.1911838948726654,
-0.6736300587654114,
-0.09309915453195572,
-0.18958137929439545,
-0.06929945200681686,
-0.14848889410495758,
0.36559048295021057,
-0.3894745707511902,
-0.41644683480262756,
-0.2334030419588089,
0.25340136885643005,
0.15258589386940002,
-0.02860374003648758,
-0.1299513280391693,
-0.045787036418914795,
-0.12606050074100494,
0.22340528666973114,
0.23472194373607635,
0.44054701924324036,
-0.029499687254428864,
0.14464497566223145,
-0.6241056323051453,
-0.3679641783237457,
0.4854188859462738,
-0.3664083182811737,
-0.25166910886764526,
-0.11988565325737,
0.1506166160106659,
0.35090404748916626,
-0.4559536278247833,
-0.7183162569999695,
0.06427492946386337,
0.15439346432685852,
0.046817928552627563,
-0.2576729357242584,
0.24993827939033508,
0.038384467363357544,
0.12654909491539001,
-0.14452321827411652,
0.5700886845588684,
0.2609197497367859,
-0.18836610019207,
-0.026507215574383736,
-0.10230612009763718
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | That's a good question, and again the normal bytes can be used for that:
```
MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=1e12 # (~2**40)
```
Since it's unlikely that anybody will have more than 1TB RAM.
It's also silly that it uses BYTES and not MBYTES - that level of refinement doesn't seem to be of a practical use in this context.
Not sure when it was added and if there are back-compat issues here, but perhaps it could be renamed `MAX_IN_MEMORY_DATASET_SIZE` and support 1M, 1G, 1T, etc.
But scientific notation is quite intuitive too, as each 000 zeros is the next M, G, T multiplier. Minus the discrepancy of 1024 vs 1000, which adds up. And it is easy to write down `1e12`, as compared to `1099511627776` (2**40). (`1.1e12` is more exact).
| Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 127 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
That's a good question, and again the normal bytes can be used for that:
```
MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES=1e12 # (~2**40)
```
Since it's unlikely that anybody will have more than 1TB RAM.
It's also silly that it uses BYTES and not MBYTES - that level of refinement doesn't seem to be of a practical use in this context.
Not sure when it was added and if there are back-compat issues here, but perhaps it could be renamed `MAX_IN_MEMORY_DATASET_SIZE` and support 1M, 1G, 1T, etc.
But scientific notation is quite intuitive too, as each 000 zeros is the next M, G, T multiplier. Minus the discrepancy of 1024 vs 1000, which adds up. And it is easy to write down `1e12`, as compared to `1099511627776` (2**40). (`1.1e12` is more exact).
| [
-0.21584829688072205,
0.020310938358306885,
0.04224285110831261,
0.14041554927825928,
0.1821746528148651,
0.046231210231781006,
0.14098046720027924,
0.3139563202857971,
0.0551588274538517,
-0.0644526332616806,
-0.23593774437904358,
-0.05794752761721611,
-0.02470039576292038,
-0.3315778374671936,
-0.10819010436534882,
0.019804969429969788,
0.21446523070335388,
0.023075968027114868,
-0.16784194111824036,
-0.04096858948469162,
-0.14435866475105286,
0.26739442348480225,
-0.12829148769378662,
-0.22863785922527313,
-0.6212523579597473,
0.1536586582660675,
-0.05398784205317497,
-0.05782859027385712,
-0.14363379776477814,
-0.3942036032676697,
0.3681201934814453,
0.2826850414276123,
0.11369535326957703,
0.4599291682243347,
-0.00012042995513183996,
0.15956906974315643,
0.20316892862319946,
0.021155400201678276,
-0.41049355268478394,
-0.05735562741756439,
0.03545454144477844,
-0.08395922183990479,
0.021498430520296097,
0.16403114795684814,
-0.2790546119213104,
-0.03063715249300003,
0.19111797213554382,
-0.574643075466156,
0.4524192810058594,
0.34329578280448914,
0.1602972447872162,
0.5254043340682983,
-0.14875738322734833,
-0.037879835814237595,
-0.06083414703607559,
-0.030115224421024323,
-0.3328552544116974,
0.0926356166601181,
0.13140353560447693,
0.08421652019023895,
-0.27702876925468445,
0.3524876832962036,
0.09798575937747955,
-0.021821074187755585,
0.16133686900138855,
0.010781224817037582,
-0.1585710644721985,
0.020284418016672134,
0.2987549304962158,
0.10706205666065216,
0.37876495718955994,
-0.2141118347644806,
-0.5825321078300476,
-0.33645233511924744,
-0.35387122631073,
0.006453385576605797,
0.34401094913482666,
-0.0655079185962677,
0.13791432976722717,
0.3956795632839203,
-0.43314990401268005,
-0.06844641268253326,
0.06999412178993225,
-0.004433669149875641,
0.061145395040512085,
0.2066848874092102,
-0.11624637991189957,
-0.09949441999197006,
0.12310265004634857,
0.1499091386795044,
0.19375279545783997,
-0.16352784633636475,
-0.10912464559078217,
0.29927825927734375,
-0.35598915815353394,
-0.010812900960445404,
0.16669921576976776,
0.03966230899095535,
0.011087935417890549,
0.11882426589727402,
0.06401419639587402,
0.13640478253364563,
0.09252827614545822,
-0.25497978925704956,
-0.07287751138210297,
0.5833613276481628,
0.194710373878479,
0.2663048505783081,
0.018418066203594208,
0.04759516194462776,
-0.15672896802425385,
-0.09623382240533829,
-0.044799357652664185,
-0.2194099724292755,
0.22287409007549286,
-0.07246392965316772,
0.16001932322978973,
-0.17798863351345062,
-0.008368371054530144,
0.16883087158203125,
0.05226162075996399,
-0.10712029784917831,
0.14251983165740967,
0.2979218363761902,
-0.1997743397951126,
0.2688971757888794,
-0.07179193198680878,
-0.16609174013137817,
-0.2827942669391632,
0.04258936271071434,
-0.3636680245399475,
-0.06255635619163513,
-0.28465238213539124,
0.2555699646472931,
0.26763394474983215,
-0.37241846323013306,
0.4367181062698364,
0.13248562812805176,
0.22684526443481445,
0.01826716959476471,
0.0358220636844635,
-0.11249940097332001,
0.3517662286758423,
0.14983685314655304,
-0.4831211566925049,
0.41046425700187683,
0.09792642295360565,
0.15432089567184448,
-0.2801338732242584,
-0.034504763782024384,
-0.16246643662452698,
-0.2589806020259857,
0.17886923253536224,
0.0967065617442131,
-0.475932240486145,
-0.28512585163116455,
0.12386225908994675,
0.24923229217529297,
0.3530563712120056,
-0.18263983726501465,
0.05768778920173645,
-0.05464710295200348,
-0.3108605742454529,
-0.042419079691171646,
0.20721694827079773,
0.611078143119812,
-0.0987185686826706,
-0.27018994092941284,
0.3160686790943146,
0.07831836491823196,
0.1078268364071846,
0.24697889387607574,
-0.11518052220344543,
-0.20416295528411865,
-0.09440943598747253,
-0.045154135674238205,
0.21275100111961365,
-0.27991604804992676,
-0.656403124332428,
0.0895092636346817,
0.0316261351108551,
0.27868688106536865,
0.06271900236606598,
-0.030414212495088577,
0.1169167011976242,
-0.2188132405281067,
-0.16988858580589294,
0.17601928114891052,
0.0873950719833374,
0.11032342165708542,
-0.4886091947555542,
-0.31973373889923096,
0.004968628287315369,
0.014940589666366577,
0.16073967516422272,
0.1425744593143463,
-0.20669114589691162,
0.19837872684001923,
0.06475815922021866,
0.10646720230579376,
0.238235205411911,
0.4176747798919678,
-0.057785678654909134,
-0.25080424547195435,
0.2393510788679123,
-0.20668461918830872,
-0.4679911732673645,
0.38137418031692505,
-0.05819973349571228,
0.15043634176254272,
0.05138995498418808,
-0.09193535149097443,
-0.3147406578063965,
-0.19004566967487335,
-0.3224796652793884,
-0.4129859209060669,
0.029199600219726562,
0.08356159925460815,
0.46644893288612366,
-0.06278927624225616,
-0.2708919048309326,
0.4161112904548645,
0.17768526077270508,
0.20261967182159424,
-0.19791534543037415,
-0.036706775426864624,
-0.07149934023618698,
-0.12923435866832733,
-0.37207549810409546,
-0.05481507629156113,
0.15075108408927917,
-0.2703869044780731,
-0.16460588574409485,
0.4357373118400574,
-0.05497439205646515,
0.12648530304431915,
-0.01637866348028183,
0.27872398495674133,
0.13101519644260406,
0.20948383212089539,
0.12619736790657043,
0.18614457547664642,
-0.17185255885124207,
-0.020707838237285614,
-0.040091536939144135,
0.374408483505249,
0.1988709270954132,
0.2121002972126007,
0.1096511036157608,
-0.057896293699741364,
-0.05238098278641701,
0.020036187022924423,
-0.027195099741220474,
-0.3291664123535156,
0.2592809498310089,
-0.09703293442726135,
0.6289585828781128,
0.19152872264385223,
0.0682511031627655,
0.2737971544265747,
0.7349140048027039,
0.19943124055862427,
-0.23233738541603088,
0.14957723021507263,
-0.2541774809360504,
-0.3552420735359192,
0.16007526218891144,
0.28084132075309753,
0.3655431568622589,
0.09676315635442734,
0.4016492962837219,
0.12173143029212952,
-0.05928127467632294,
-0.09258200228214264,
0.1318960189819336,
-0.103767991065979,
0.03655640780925751,
-0.07430800050497055,
0.056555259972810745,
0.2631292939186096,
-0.3260217607021332,
0.1360270082950592,
0.01172001101076603,
0.10843480378389359,
-0.11941887438297272,
0.24091608822345734,
-0.3367220163345337,
0.27846476435661316,
-0.13545365631580353,
-0.14320097863674164,
-0.3787074089050293,
-0.20354129374027252,
-0.04893707484006882,
0.11523683369159698,
-0.0025183502584695816,
0.32485368847846985,
-0.2567093074321747,
0.17130477726459503,
-0.03613027185201645,
-0.30389800667762756,
-0.4968312084674835,
-0.14644862711429596,
-0.2653333246707916,
-0.05227586254477501,
-0.007760761771351099,
-0.37814879417419434,
-0.041796788573265076,
-0.17041565477848053,
-0.24277395009994507,
-0.1978735774755478,
-0.3297617435455322,
0.15431928634643555,
-0.07255367189645767,
-0.028923751786351204,
-0.07184725999832153,
0.056893642991781235,
-0.13047707080841064,
0.09073072671890259,
0.17321719229221344,
-0.35068508982658386,
-0.1693694144487381,
-0.03692014142870903,
0.08410683274269104,
0.14310495555400848,
-0.21307234466075897,
-0.21049052476882935,
0.00770597904920578,
-0.27911505103111267,
0.13159260153770447,
-0.16913773119449615,
-0.03631100803613663,
0.5730293989181519,
0.018048003315925598,
0.04935425519943237,
-0.15419863164424896,
0.1935804784297943,
-0.28173595666885376,
-0.5460475087165833,
0.44806548953056335,
-0.00683469045907259,
-0.36912068724632263,
-0.1439012885093689,
0.013762935996055603,
0.1789388358592987,
0.3921636939048767,
-0.18156318366527557,
-0.24659274518489838,
-0.39608901739120483,
0.0011066459119319916,
0.21099261939525604,
0.06586411595344543,
0.6789287328720093,
-0.012012675404548645,
-0.05644751340150833,
-0.21564066410064697,
-0.11548101902008057,
0.14036980271339417,
-0.17449089884757996,
0.32187002897262573,
-0.2863914966583252,
0.11334939301013947,
0.2614363431930542,
0.6822908520698547,
0.21176432073116302,
-0.054289329797029495,
0.22974425554275513,
0.22260752320289612,
0.48358458280563354,
-0.3701799511909485,
-0.2817356586456299,
-0.030361058190464973,
-0.22764495015144348,
0.04231822490692139,
0.10513655841350555,
0.28540825843811035,
0.1345895528793335,
-0.1757144182920456,
0.08382885158061981,
0.07810597121715546,
-0.28135502338409424,
0.03971435874700546,
-0.34403637051582336,
0.33229467272758484,
0.4198826849460602,
0.352690190076828,
-0.29395732283592224,
-0.06161084026098251,
0.08503097295761108,
0.16777658462524414,
0.24163350462913513,
0.16131551563739777,
-0.13083943724632263,
0.6268689036369324,
-0.782776951789856,
0.21769508719444275,
-0.021080292761325836,
0.2715778648853302,
0.11716797947883606,
-0.2589392066001892,
0.0737982839345932,
-0.07937896996736526,
0.46842533349990845,
0.03452921286225319,
-0.091562420129776,
0.08982902765274048,
-0.25841569900512695,
-0.32636189460754395,
-0.06760496646165848,
0.0506657175719738,
0.06552737951278687,
0.5230581760406494,
0.3059903681278229,
-0.2612777352333069,
-0.5721397995948792,
-0.00252409465610981,
0.026563838124275208,
0.06707152724266052,
-0.07005112618207932,
-0.309541791677475,
-0.010731562972068787,
-0.05100935325026512,
-0.04545515030622482,
0.21166905760765076,
0.05121684446930885,
0.009773625060915947,
0.20603491365909576,
-0.23570914566516876,
-0.07497097551822662,
0.11236363649368286,
0.08760824799537659,
0.24824798107147217,
-0.13537448644638062,
0.21410557627677917,
0.3516710102558136,
0.0993536114692688,
-0.1307244449853897,
0.3770352303981781,
-0.15819303691387177,
-0.5206750631332397,
-0.03820884972810745,
0.2025385946035385,
-0.10039589554071426,
0.36105573177337646,
-0.14932270348072052,
-0.04942450672388077,
0.11878718435764313,
0.03089882805943489,
-0.09496531635522842,
0.34570789337158203,
0.2662646770477295,
0.15490588545799255,
-0.3207559287548065,
-0.4492103159427643,
0.42681270837783813,
0.08613890409469604,
-0.03036576509475708,
0.30225807428359985,
0.3320181369781494,
-0.18875472247600555,
0.13813966512680054,
-0.03812459856271744,
0.7185447216033936,
0.1204461082816124,
0.39835017919540405,
0.1804787516593933,
-0.10226477682590485,
0.416535884141922,
0.1965271681547165,
0.26794636249542236,
-0.15170395374298096,
-0.36949288845062256,
0.04004724323749542,
-0.03968941792845726,
0.07798619568347931,
0.14644019305706024,
-0.07728838175535202,
0.30255505442619324,
0.16517159342765808,
0.23534400761127472,
0.15264597535133362,
0.10489414632320404,
-0.17423248291015625,
-0.09782831370830536,
-0.08543574810028076,
0.14951618015766144,
-0.09774872660636902,
0.352014422416687,
-0.04460704326629639,
-0.028866298496723175,
0.02283928170800209,
-0.31221234798431396,
-0.19369542598724365,
0.08014518767595291,
-0.40667009353637695,
0.13650530576705933,
0.3283129930496216,
-0.32347777485847473,
0.10018664598464966,
0.021860163658857346,
0.4756092429161072,
-0.12112641334533691,
-0.19545137882232666,
0.23201078176498413,
-0.18953070044517517,
0.17078359425067902,
0.10861391574144363,
-0.17739687860012054,
0.3854377269744873,
0.11221035569906235,
0.037697695195674896,
-0.36451297998428345,
-0.25037917494773865,
-0.426832377910614,
0.1346520185470581,
0.005634337663650513,
-0.12937390804290771,
-0.2019224762916565,
0.039618946611881256,
0.05772433429956436,
-0.1295119673013687,
-0.2113541066646576,
0.1154869794845581,
0.0673520639538765,
0.04947379231452942,
0.06625518202781677,
-0.15441466867923737,
-0.21198728680610657,
-0.17640645802021027,
0.6264654397964478,
-0.10774322599172592,
-0.50859135389328,
0.4606698751449585,
-0.03960365429520607,
-0.27200794219970703,
-0.007272247225046158,
-0.2138533592224121,
0.2910134196281433,
-0.5071913599967957,
0.2666518986225128,
-0.0812651515007019,
-0.3147019147872925,
0.08674126863479614,
0.14540618658065796,
0.033226508647203445,
-0.0632968619465828,
-0.2446780800819397,
0.06862139701843262,
-0.5114704966545105,
0.008605509996414185,
-0.20045976340770721,
0.21937932074069977,
-0.07295898348093033,
0.002434004098176956,
-0.011456351727247238,
0.15091635286808014,
-0.24758465588092804,
0.03133736923336983,
0.0655503198504448,
-0.020034611225128174,
0.07157894968986511,
-0.44751840829849243,
0.519418478012085,
-0.21061496436595917,
-0.07882657647132874,
0.08933338522911072,
-0.36921873688697815,
-0.13951678574085236,
-0.2798082232475281,
0.15582317113876343,
0.020190026611089706,
-0.06329747289419174,
-0.1017562747001648,
0.2242698222398758,
-0.1317821592092514,
-0.3850979208946228,
0.2663275897502899,
0.42673763632774353,
-0.08594110608100891,
0.21773545444011688,
0.15436723828315735,
0.20085138082504272,
0.15707670152187347,
-0.11204551160335541,
-0.11531795561313629,
0.08053291589021683,
0.07986386120319366,
0.23234359920024872,
0.02329959347844124,
0.07374487817287445,
-0.06671860069036484,
0.05984170734882355,
0.2692279815673828,
-0.01681268960237503,
0.2843047082424164,
-0.24425648152828217,
-0.16338258981704712,
0.17659440636634827,
0.26945802569389343,
0.2560472786426544,
0.23523065447807312,
-0.35319411754608154,
0.05149843543767929,
0.13675862550735474,
-0.06650633364915848,
-0.09131418913602829,
0.2504137456417084,
0.12064950168132782,
0.16050973534584045,
0.0472535565495491,
0.081791952252388,
0.19531738758087158,
0.5193356275558472,
0.23480364680290222,
0.5798421502113342,
-0.29668593406677246,
0.39428848028182983,
0.14552900195121765,
0.3598194718360901,
0.1383572816848755,
0.6228572130203247,
0.059276267886161804,
0.008825205266475677,
0.06378424167633057,
-0.18409720063209534,
0.4451977014541626,
-0.1497717797756195,
0.2619174122810364,
-0.14699706435203552,
-0.26221615076065063,
-0.13805703818798065,
0.008339554071426392,
-0.14964643120765686,
0.23425540328025818,
-0.1989997923374176,
0.30889034271240234,
-0.20921362936496735,
-0.13994456827640533,
-0.14026358723640442,
0.009693920612335205,
-0.18278005719184875,
-0.32700589299201965,
0.27310389280319214,
0.0293133407831192,
-0.025441955775022507,
0.03490089997649193,
-0.040633443742990494,
0.013208620250225067,
0.35043415427207947,
-0.12686392664909363,
0.05776876211166382,
-0.21363648772239685,
-0.16553065180778503,
-0.08698979765176773,
0.3347529172897339,
-0.09475579112768173,
0.3914242088794708,
-0.10918882489204407,
-0.11418598890304565,
-0.06273253262042999,
0.5630705952644348,
0.24438881874084473,
0.2078849822282791,
0.033292390406131744,
0.13163800537586212,
-0.10752418637275696,
-0.031200043857097626,
-0.10291318595409393,
0.389537513256073,
-0.06376858055591583,
-0.15379461646080017,
0.028889723122119904,
0.02816501073539257,
-0.07448944449424744,
0.048342812806367874,
-0.43299201130867004,
0.013191361911594868,
-0.29839372634887695,
0.59552401304245,
-0.13271352648735046,
-0.2584170699119568,
-0.05778779834508896,
0.1808203160762787,
-0.18530002236366272,
0.14273346960544586,
0.19719421863555908,
-0.14727120101451874,
0.0389879010617733,
-0.25114530324935913,
0.046063125133514404,
0.2118891030550003,
0.5874782204627991,
0.44272005558013916,
0.03716471046209335,
-0.20491550862789154,
-0.031413860619068146,
-0.5466335415840149,
0.010971009731292725,
0.16608314216136932,
0.40068939328193665,
-0.0006395447999238968,
0.027808615937829018,
-0.19015634059906006,
0.061738744378089905,
0.024827033281326294,
0.15841752290725708,
-0.06573216617107391,
-0.12598350644111633,
-0.34693482518196106,
0.260881245136261,
0.013286489993333817,
0.00043924711644649506,
0.1867111474275589,
-0.2607446014881134,
0.08679959923028946,
0.0810842216014862,
-0.03249872475862503,
-0.13749635219573975,
0.08216579258441925,
0.01621732860803604,
-0.16073137521743774,
0.24065075814723969,
0.30362987518310547,
-0.08840256929397583,
0.17020058631896973,
-0.1911838948726654,
-0.6736300587654114,
-0.09309915453195572,
-0.18958137929439545,
-0.06929945200681686,
-0.14848889410495758,
0.36559048295021057,
-0.3894745707511902,
-0.41644683480262756,
-0.2334030419588089,
0.25340136885643005,
0.15258589386940002,
-0.02860374003648758,
-0.1299513280391693,
-0.045787036418914795,
-0.12606050074100494,
0.22340528666973114,
0.23472194373607635,
0.44054701924324036,
-0.029499687254428864,
0.14464497566223145,
-0.6241056323051453,
-0.3679641783237457,
0.4854188859462738,
-0.3664083182811737,
-0.25166910886764526,
-0.11988565325737,
0.1506166160106659,
0.35090404748916626,
-0.4559536278247833,
-0.7183162569999695,
0.06427492946386337,
0.15439346432685852,
0.046817928552627563,
-0.2576729357242584,
0.24993827939033508,
0.038384467363357544,
0.12654909491539001,
-0.14452321827411652,
0.5700886845588684,
0.2609197497367859,
-0.18836610019207,
-0.026507215574383736,
-0.10230612009763718
] |
https://github.com/huggingface/datasets/issues/2387 | datasets 1.6 ignores cache | Great! Thanks, @stas00.
I am implementing your suggestion to turn off default value when set to `0`.
For the other suggestion (allowing different metric prefixes), I will discuss with @lhoestq to agree on its implementation. | Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
| 35 | datasets 1.6 ignores cache
Moving from https://github.com/huggingface/transformers/issues/11801#issuecomment-845546612
Quoting @VictorSanh:
>
> I downgraded datasets to `1.5.0` and printed `tokenized_datasets.cache_files` (L335):
>
> > `{'train': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-c6aefe81ca4e5152.arrow'}], 'validation': [{'filename': '/home/victor/.cache/huggingface/datasets/openwebtext10k/plain_text/1.0.0/3a8df094c671b4cb63ed0b41f40fb3bd855e9ce2e3765e5df50abcdfb5ec144b/cache-97cf4c813e6469c6.arrow'}]}`
>
> while the same command with the latest version of datasets (actually starting at `1.6.0`) gives:
> > `{'train': [], 'validation': []}`
>
I also confirm that downgrading to `datasets==1.5.0` makes things fast again - i.e. cache is used.
to reproduce:
```
USE_TF=0 python examples/pytorch/language-modeling/run_clm.py \
--model_name_or_path gpt2 \
--dataset_name "stas/openwebtext-10k" \
--output_dir output_dir \
--overwrite_output_dir \
--do_train \
--do_eval \
--max_train_samples 1000 \
--max_eval_samples 200 \
--per_device_train_batch_size 4 \
--per_device_eval_batch_size 4 \
--num_train_epochs 1 \
--warmup_steps 8 \
--block_size 64 \
--fp16 \
--report_to none
```
the first time the startup is slow and some 5 tqdm bars. It shouldn't do it on consequent runs. but with `datasets>1.5.0` it rebuilds on every run.
@lhoestq
Great! Thanks, @stas00.
I am implementing your suggestion to turn off default value when set to `0`.
For the other suggestion (allowing different metric prefixes), I will discuss with @lhoestq to agree on its implementation. | [
-0.21584829688072205,
0.020310938358306885,
0.04224285110831261,
0.14041554927825928,
0.1821746528148651,
0.046231210231781006,
0.14098046720027924,
0.3139563202857971,
0.0551588274538517,
-0.0644526332616806,
-0.23593774437904358,
-0.05794752761721611,
-0.02470039576292038,
-0.3315778374671936,
-0.10819010436534882,
0.019804969429969788,
0.21446523070335388,
0.023075968027114868,
-0.16784194111824036,
-0.04096858948469162,
-0.14435866475105286,
0.26739442348480225,
-0.12829148769378662,
-0.22863785922527313,
-0.6212523579597473,
0.1536586582660675,
-0.05398784205317497,
-0.05782859027385712,
-0.14363379776477814,
-0.3942036032676697,
0.3681201934814453,
0.2826850414276123,
0.11369535326957703,
0.4599291682243347,
-0.00012042995513183996,
0.15956906974315643,
0.20316892862319946,
0.021155400201678276,
-0.41049355268478394,
-0.05735562741756439,
0.03545454144477844,
-0.08395922183990479,
0.021498430520296097,
0.16403114795684814,
-0.2790546119213104,
-0.03063715249300003,
0.19111797213554382,
-0.574643075466156,
0.4524192810058594,
0.34329578280448914,
0.1602972447872162,
0.5254043340682983,
-0.14875738322734833,
-0.037879835814237595,
-0.06083414703607559,
-0.030115224421024323,
-0.3328552544116974,
0.0926356166601181,
0.13140353560447693,
0.08421652019023895,
-0.27702876925468445,
0.3524876832962036,
0.09798575937747955,
-0.021821074187755585,
0.16133686900138855,
0.010781224817037582,
-0.1585710644721985,
0.020284418016672134,
0.2987549304962158,
0.10706205666065216,
0.37876495718955994,
-0.2141118347644806,
-0.5825321078300476,
-0.33645233511924744,
-0.35387122631073,
0.006453385576605797,
0.34401094913482666,
-0.0655079185962677,
0.13791432976722717,
0.3956795632839203,
-0.43314990401268005,
-0.06844641268253326,
0.06999412178993225,
-0.004433669149875641,
0.061145395040512085,
0.2066848874092102,
-0.11624637991189957,
-0.09949441999197006,
0.12310265004634857,
0.1499091386795044,
0.19375279545783997,
-0.16352784633636475,
-0.10912464559078217,
0.29927825927734375,
-0.35598915815353394,
-0.010812900960445404,
0.16669921576976776,
0.03966230899095535,
0.011087935417890549,
0.11882426589727402,
0.06401419639587402,
0.13640478253364563,
0.09252827614545822,
-0.25497978925704956,
-0.07287751138210297,
0.5833613276481628,
0.194710373878479,
0.2663048505783081,
0.018418066203594208,
0.04759516194462776,
-0.15672896802425385,
-0.09623382240533829,
-0.044799357652664185,
-0.2194099724292755,
0.22287409007549286,
-0.07246392965316772,
0.16001932322978973,
-0.17798863351345062,
-0.008368371054530144,
0.16883087158203125,
0.05226162075996399,
-0.10712029784917831,
0.14251983165740967,
0.2979218363761902,
-0.1997743397951126,
0.2688971757888794,
-0.07179193198680878,
-0.16609174013137817,
-0.2827942669391632,
0.04258936271071434,
-0.3636680245399475,
-0.06255635619163513,
-0.28465238213539124,
0.2555699646472931,
0.26763394474983215,
-0.37241846323013306,
0.4367181062698364,
0.13248562812805176,
0.22684526443481445,
0.01826716959476471,
0.0358220636844635,
-0.11249940097332001,
0.3517662286758423,
0.14983685314655304,
-0.4831211566925049,
0.41046425700187683,
0.09792642295360565,
0.15432089567184448,
-0.2801338732242584,
-0.034504763782024384,
-0.16246643662452698,
-0.2589806020259857,
0.17886923253536224,
0.0967065617442131,
-0.475932240486145,
-0.28512585163116455,
0.12386225908994675,
0.24923229217529297,
0.3530563712120056,
-0.18263983726501465,
0.05768778920173645,
-0.05464710295200348,
-0.3108605742454529,
-0.042419079691171646,
0.20721694827079773,
0.611078143119812,
-0.0987185686826706,
-0.27018994092941284,
0.3160686790943146,
0.07831836491823196,
0.1078268364071846,
0.24697889387607574,
-0.11518052220344543,
-0.20416295528411865,
-0.09440943598747253,
-0.045154135674238205,
0.21275100111961365,
-0.27991604804992676,
-0.656403124332428,
0.0895092636346817,
0.0316261351108551,
0.27868688106536865,
0.06271900236606598,
-0.030414212495088577,
0.1169167011976242,
-0.2188132405281067,
-0.16988858580589294,
0.17601928114891052,
0.0873950719833374,
0.11032342165708542,
-0.4886091947555542,
-0.31973373889923096,
0.004968628287315369,
0.014940589666366577,
0.16073967516422272,
0.1425744593143463,
-0.20669114589691162,
0.19837872684001923,
0.06475815922021866,
0.10646720230579376,
0.238235205411911,
0.4176747798919678,
-0.057785678654909134,
-0.25080424547195435,
0.2393510788679123,
-0.20668461918830872,
-0.4679911732673645,
0.38137418031692505,
-0.05819973349571228,
0.15043634176254272,
0.05138995498418808,
-0.09193535149097443,
-0.3147406578063965,
-0.19004566967487335,
-0.3224796652793884,
-0.4129859209060669,
0.029199600219726562,
0.08356159925460815,
0.46644893288612366,
-0.06278927624225616,
-0.2708919048309326,
0.4161112904548645,
0.17768526077270508,
0.20261967182159424,
-0.19791534543037415,
-0.036706775426864624,
-0.07149934023618698,
-0.12923435866832733,
-0.37207549810409546,
-0.05481507629156113,
0.15075108408927917,
-0.2703869044780731,
-0.16460588574409485,
0.4357373118400574,
-0.05497439205646515,
0.12648530304431915,
-0.01637866348028183,
0.27872398495674133,
0.13101519644260406,
0.20948383212089539,
0.12619736790657043,
0.18614457547664642,
-0.17185255885124207,
-0.020707838237285614,
-0.040091536939144135,
0.374408483505249,
0.1988709270954132,
0.2121002972126007,
0.1096511036157608,
-0.057896293699741364,
-0.05238098278641701,
0.020036187022924423,
-0.027195099741220474,
-0.3291664123535156,
0.2592809498310089,
-0.09703293442726135,
0.6289585828781128,
0.19152872264385223,
0.0682511031627655,
0.2737971544265747,
0.7349140048027039,
0.19943124055862427,
-0.23233738541603088,
0.14957723021507263,
-0.2541774809360504,
-0.3552420735359192,
0.16007526218891144,
0.28084132075309753,
0.3655431568622589,
0.09676315635442734,
0.4016492962837219,
0.12173143029212952,
-0.05928127467632294,
-0.09258200228214264,
0.1318960189819336,
-0.103767991065979,
0.03655640780925751,
-0.07430800050497055,
0.056555259972810745,
0.2631292939186096,
-0.3260217607021332,
0.1360270082950592,
0.01172001101076603,
0.10843480378389359,
-0.11941887438297272,
0.24091608822345734,
-0.3367220163345337,
0.27846476435661316,
-0.13545365631580353,
-0.14320097863674164,
-0.3787074089050293,
-0.20354129374027252,
-0.04893707484006882,
0.11523683369159698,
-0.0025183502584695816,
0.32485368847846985,
-0.2567093074321747,
0.17130477726459503,
-0.03613027185201645,
-0.30389800667762756,
-0.4968312084674835,
-0.14644862711429596,
-0.2653333246707916,
-0.05227586254477501,
-0.007760761771351099,
-0.37814879417419434,
-0.041796788573265076,
-0.17041565477848053,
-0.24277395009994507,
-0.1978735774755478,
-0.3297617435455322,
0.15431928634643555,
-0.07255367189645767,
-0.028923751786351204,
-0.07184725999832153,
0.056893642991781235,
-0.13047707080841064,
0.09073072671890259,
0.17321719229221344,
-0.35068508982658386,
-0.1693694144487381,
-0.03692014142870903,
0.08410683274269104,
0.14310495555400848,
-0.21307234466075897,
-0.21049052476882935,
0.00770597904920578,
-0.27911505103111267,
0.13159260153770447,
-0.16913773119449615,
-0.03631100803613663,
0.5730293989181519,
0.018048003315925598,
0.04935425519943237,
-0.15419863164424896,
0.1935804784297943,
-0.28173595666885376,
-0.5460475087165833,
0.44806548953056335,
-0.00683469045907259,
-0.36912068724632263,
-0.1439012885093689,
0.013762935996055603,
0.1789388358592987,
0.3921636939048767,
-0.18156318366527557,
-0.24659274518489838,
-0.39608901739120483,
0.0011066459119319916,
0.21099261939525604,
0.06586411595344543,
0.6789287328720093,
-0.012012675404548645,
-0.05644751340150833,
-0.21564066410064697,
-0.11548101902008057,
0.14036980271339417,
-0.17449089884757996,
0.32187002897262573,
-0.2863914966583252,
0.11334939301013947,
0.2614363431930542,
0.6822908520698547,
0.21176432073116302,
-0.054289329797029495,
0.22974425554275513,
0.22260752320289612,
0.48358458280563354,
-0.3701799511909485,
-0.2817356586456299,
-0.030361058190464973,
-0.22764495015144348,
0.04231822490692139,
0.10513655841350555,
0.28540825843811035,
0.1345895528793335,
-0.1757144182920456,
0.08382885158061981,
0.07810597121715546,
-0.28135502338409424,
0.03971435874700546,
-0.34403637051582336,
0.33229467272758484,
0.4198826849460602,
0.352690190076828,
-0.29395732283592224,
-0.06161084026098251,
0.08503097295761108,
0.16777658462524414,
0.24163350462913513,
0.16131551563739777,
-0.13083943724632263,
0.6268689036369324,
-0.782776951789856,
0.21769508719444275,
-0.021080292761325836,
0.2715778648853302,
0.11716797947883606,
-0.2589392066001892,
0.0737982839345932,
-0.07937896996736526,
0.46842533349990845,
0.03452921286225319,
-0.091562420129776,
0.08982902765274048,
-0.25841569900512695,
-0.32636189460754395,
-0.06760496646165848,
0.0506657175719738,
0.06552737951278687,
0.5230581760406494,
0.3059903681278229,
-0.2612777352333069,
-0.5721397995948792,
-0.00252409465610981,
0.026563838124275208,
0.06707152724266052,
-0.07005112618207932,
-0.309541791677475,
-0.010731562972068787,
-0.05100935325026512,
-0.04545515030622482,
0.21166905760765076,
0.05121684446930885,
0.009773625060915947,
0.20603491365909576,
-0.23570914566516876,
-0.07497097551822662,
0.11236363649368286,
0.08760824799537659,
0.24824798107147217,
-0.13537448644638062,
0.21410557627677917,
0.3516710102558136,
0.0993536114692688,
-0.1307244449853897,
0.3770352303981781,
-0.15819303691387177,
-0.5206750631332397,
-0.03820884972810745,
0.2025385946035385,
-0.10039589554071426,
0.36105573177337646,
-0.14932270348072052,
-0.04942450672388077,
0.11878718435764313,
0.03089882805943489,
-0.09496531635522842,
0.34570789337158203,
0.2662646770477295,
0.15490588545799255,
-0.3207559287548065,
-0.4492103159427643,
0.42681270837783813,
0.08613890409469604,
-0.03036576509475708,
0.30225807428359985,
0.3320181369781494,
-0.18875472247600555,
0.13813966512680054,
-0.03812459856271744,
0.7185447216033936,
0.1204461082816124,
0.39835017919540405,
0.1804787516593933,
-0.10226477682590485,
0.416535884141922,
0.1965271681547165,
0.26794636249542236,
-0.15170395374298096,
-0.36949288845062256,
0.04004724323749542,
-0.03968941792845726,
0.07798619568347931,
0.14644019305706024,
-0.07728838175535202,
0.30255505442619324,
0.16517159342765808,
0.23534400761127472,
0.15264597535133362,
0.10489414632320404,
-0.17423248291015625,
-0.09782831370830536,
-0.08543574810028076,
0.14951618015766144,
-0.09774872660636902,
0.352014422416687,
-0.04460704326629639,
-0.028866298496723175,
0.02283928170800209,
-0.31221234798431396,
-0.19369542598724365,
0.08014518767595291,
-0.40667009353637695,
0.13650530576705933,
0.3283129930496216,
-0.32347777485847473,
0.10018664598464966,
0.021860163658857346,
0.4756092429161072,
-0.12112641334533691,
-0.19545137882232666,
0.23201078176498413,
-0.18953070044517517,
0.17078359425067902,
0.10861391574144363,
-0.17739687860012054,
0.3854377269744873,
0.11221035569906235,
0.037697695195674896,
-0.36451297998428345,
-0.25037917494773865,
-0.426832377910614,
0.1346520185470581,
0.005634337663650513,
-0.12937390804290771,
-0.2019224762916565,
0.039618946611881256,
0.05772433429956436,
-0.1295119673013687,
-0.2113541066646576,
0.1154869794845581,
0.0673520639538765,
0.04947379231452942,
0.06625518202781677,
-0.15441466867923737,
-0.21198728680610657,
-0.17640645802021027,
0.6264654397964478,
-0.10774322599172592,
-0.50859135389328,
0.4606698751449585,
-0.03960365429520607,
-0.27200794219970703,
-0.007272247225046158,
-0.2138533592224121,
0.2910134196281433,
-0.5071913599967957,
0.2666518986225128,
-0.0812651515007019,
-0.3147019147872925,
0.08674126863479614,
0.14540618658065796,
0.033226508647203445,
-0.0632968619465828,
-0.2446780800819397,
0.06862139701843262,
-0.5114704966545105,
0.008605509996414185,
-0.20045976340770721,
0.21937932074069977,
-0.07295898348093033,
0.002434004098176956,
-0.011456351727247238,
0.15091635286808014,
-0.24758465588092804,
0.03133736923336983,
0.0655503198504448,
-0.020034611225128174,
0.07157894968986511,
-0.44751840829849243,
0.519418478012085,
-0.21061496436595917,
-0.07882657647132874,
0.08933338522911072,
-0.36921873688697815,
-0.13951678574085236,
-0.2798082232475281,
0.15582317113876343,
0.020190026611089706,
-0.06329747289419174,
-0.1017562747001648,
0.2242698222398758,
-0.1317821592092514,
-0.3850979208946228,
0.2663275897502899,
0.42673763632774353,
-0.08594110608100891,
0.21773545444011688,
0.15436723828315735,
0.20085138082504272,
0.15707670152187347,
-0.11204551160335541,
-0.11531795561313629,
0.08053291589021683,
0.07986386120319366,
0.23234359920024872,
0.02329959347844124,
0.07374487817287445,
-0.06671860069036484,
0.05984170734882355,
0.2692279815673828,
-0.01681268960237503,
0.2843047082424164,
-0.24425648152828217,
-0.16338258981704712,
0.17659440636634827,
0.26945802569389343,
0.2560472786426544,
0.23523065447807312,
-0.35319411754608154,
0.05149843543767929,
0.13675862550735474,
-0.06650633364915848,
-0.09131418913602829,
0.2504137456417084,
0.12064950168132782,
0.16050973534584045,
0.0472535565495491,
0.081791952252388,
0.19531738758087158,
0.5193356275558472,
0.23480364680290222,
0.5798421502113342,
-0.29668593406677246,
0.39428848028182983,
0.14552900195121765,
0.3598194718360901,
0.1383572816848755,
0.6228572130203247,
0.059276267886161804,
0.008825205266475677,
0.06378424167633057,
-0.18409720063209534,
0.4451977014541626,
-0.1497717797756195,
0.2619174122810364,
-0.14699706435203552,
-0.26221615076065063,
-0.13805703818798065,
0.008339554071426392,
-0.14964643120765686,
0.23425540328025818,
-0.1989997923374176,
0.30889034271240234,
-0.20921362936496735,
-0.13994456827640533,
-0.14026358723640442,
0.009693920612335205,
-0.18278005719184875,
-0.32700589299201965,
0.27310389280319214,
0.0293133407831192,
-0.025441955775022507,
0.03490089997649193,
-0.040633443742990494,
0.013208620250225067,
0.35043415427207947,
-0.12686392664909363,
0.05776876211166382,
-0.21363648772239685,
-0.16553065180778503,
-0.08698979765176773,
0.3347529172897339,
-0.09475579112768173,
0.3914242088794708,
-0.10918882489204407,
-0.11418598890304565,
-0.06273253262042999,
0.5630705952644348,
0.24438881874084473,
0.2078849822282791,
0.033292390406131744,
0.13163800537586212,
-0.10752418637275696,
-0.031200043857097626,
-0.10291318595409393,
0.389537513256073,
-0.06376858055591583,
-0.15379461646080017,
0.028889723122119904,
0.02816501073539257,
-0.07448944449424744,
0.048342812806367874,
-0.43299201130867004,
0.013191361911594868,
-0.29839372634887695,
0.59552401304245,
-0.13271352648735046,
-0.2584170699119568,
-0.05778779834508896,
0.1808203160762787,
-0.18530002236366272,
0.14273346960544586,
0.19719421863555908,
-0.14727120101451874,
0.0389879010617733,
-0.25114530324935913,
0.046063125133514404,
0.2118891030550003,
0.5874782204627991,
0.44272005558013916,
0.03716471046209335,
-0.20491550862789154,
-0.031413860619068146,
-0.5466335415840149,
0.010971009731292725,
0.16608314216136932,
0.40068939328193665,
-0.0006395447999238968,
0.027808615937829018,
-0.19015634059906006,
0.061738744378089905,
0.024827033281326294,
0.15841752290725708,
-0.06573216617107391,
-0.12598350644111633,
-0.34693482518196106,
0.260881245136261,
0.013286489993333817,
0.00043924711644649506,
0.1867111474275589,
-0.2607446014881134,
0.08679959923028946,
0.0810842216014862,
-0.03249872475862503,
-0.13749635219573975,
0.08216579258441925,
0.01621732860803604,
-0.16073137521743774,
0.24065075814723969,
0.30362987518310547,
-0.08840256929397583,
0.17020058631896973,
-0.1911838948726654,
-0.6736300587654114,
-0.09309915453195572,
-0.18958137929439545,
-0.06929945200681686,
-0.14848889410495758,
0.36559048295021057,
-0.3894745707511902,
-0.41644683480262756,
-0.2334030419588089,
0.25340136885643005,
0.15258589386940002,
-0.02860374003648758,
-0.1299513280391693,
-0.045787036418914795,
-0.12606050074100494,
0.22340528666973114,
0.23472194373607635,
0.44054701924324036,
-0.029499687254428864,
0.14464497566223145,
-0.6241056323051453,
-0.3679641783237457,
0.4854188859462738,
-0.3664083182811737,
-0.25166910886764526,
-0.11988565325737,
0.1506166160106659,
0.35090404748916626,
-0.4559536278247833,
-0.7183162569999695,
0.06427492946386337,
0.15439346432685852,
0.046817928552627563,
-0.2576729357242584,
0.24993827939033508,
0.038384467363357544,
0.12654909491539001,
-0.14452321827411652,
0.5700886845588684,
0.2609197497367859,
-0.18836610019207,
-0.026507215574383736,
-0.10230612009763718
] |
https://github.com/huggingface/datasets/issues/2377 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather | Hi ! This is because we are actually using the arrow streaming format. We plan to switch to the arrow IPC format.
More info at #1933 | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
| 26 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
Hi ! This is because we are actually using the arrow streaming format. We plan to switch to the arrow IPC format.
More info at #1933 | [
-0.2040332406759262,
0.1602182686328888,
-0.024091709405183792,
0.37150096893310547,
0.1489746868610382,
0.2544103264808655,
-0.006909426301717758,
0.5975210070610046,
-0.5161227583885193,
-0.11885400116443634,
-0.3667038083076477,
0.6461246609687805,
-0.07226517796516418,
-0.7478834390640259,
0.07418051362037659,
0.25508809089660645,
0.19215291738510132,
0.10284394770860672,
-0.08289016783237457,
-0.06577729433774948,
-0.08976554870605469,
0.20926176011562347,
-0.057189956307411194,
0.27526503801345825,
-0.36637529730796814,
-0.08847418427467346,
0.08422711491584778,
0.24116677045822144,
0.06672586500644684,
-0.341041624546051,
0.3246596157550812,
-0.13353925943374634,
0.08212288469076157,
0.17351235449314117,
-0.00011423780233599246,
0.18003235757350922,
0.35462480783462524,
-0.11444152891635895,
-0.2745331823825836,
0.0962589830160141,
0.30130767822265625,
0.021619034931063652,
0.2277010828256607,
-0.3599591851234436,
0.21596071124076843,
-0.45082271099090576,
0.0920102596282959,
-0.18631306290626526,
0.46546393632888794,
0.543674886226654,
0.1880560964345932,
0.1298351287841797,
0.24797137081623077,
0.11846398562192917,
0.6443865895271301,
0.0946032851934433,
-0.1738114207983017,
0.6543810367584229,
-0.1060602068901062,
-0.13335829973220825,
-0.2428009808063507,
-0.03750298544764519,
-0.2614385485649109,
-0.06182873621582985,
-0.046379126608371735,
0.14919446408748627,
-0.13615131378173828,
-0.2698405683040619,
-0.08364208787679672,
-0.008620768785476685,
0.2848905622959137,
-0.5713863372802734,
-0.3896680474281311,
0.014982782304286957,
0.1416035294532776,
-0.11297958344221115,
0.20313957333564758,
0.23240943253040314,
-0.20086370408535004,
0.2662529945373535,
0.3600386381149292,
0.10513365268707275,
-0.3550494909286499,
0.17756672203540802,
0.19635728001594543,
-0.3350895941257477,
-0.13830994069576263,
0.07528571784496307,
0.10550661385059357,
0.2164953500032425,
0.4860536456108093,
0.02334071509540081,
-0.1866559386253357,
-0.03199831396341324,
-0.059709761291742325,
0.11978578567504883,
-0.03456834703683853,
0.02612968161702156,
0.12668851017951965,
0.2536795139312744,
0.3568301498889923,
0.03112727776169777,
-0.024877073243260384,
0.29565584659576416,
-0.24254676699638367,
-0.20753873884677887,
-0.012028925120830536,
-0.24473336338996887,
0.4849908947944641,
-0.007227159570902586,
-0.10940460860729218,
-0.1298019289970398,
0.08734267950057983,
-0.1138177141547203,
0.3794027864933014,
-0.27560949325561523,
0.399311900138855,
-0.17659218609333038,
-0.4321514070034027,
0.062113355845212936,
-0.12486205250024796,
0.11264826357364655,
-0.08111919462680817,
0.24524444341659546,
0.06823454797267914,
-0.13487979769706726,
0.16609714925289154,
0.4020651578903198,
-0.12241589277982712,
-0.30045953392982483,
-0.0893309935927391,
-0.07933768630027771,
0.10359056293964386,
0.06838832050561905,
0.18803192675113678,
-0.2568868398666382,
0.22376541793346405,
0.1502271592617035,
0.002820044755935669,
0.08673126995563507,
-0.015381756238639355,
-0.34521153569221497,
0.029086321592330933,
0.19927820563316345,
0.14879466593265533,
0.20662228763103485,
0.09153182804584503,
-0.2093014121055603,
-0.12304046750068665,
0.147711843252182,
-0.20025214552879333,
-0.0906476378440857,
-0.2770579755306244,
0.1281215399503708,
0.00467262975871563,
-0.014755554497241974,
-0.6079195141792297,
-0.08934375643730164,
0.07978538423776627,
-0.3689199984073639,
0.06630411744117737,
-0.2139708399772644,
0.23916849493980408,
-0.5171182751655579,
0.19669657945632935,
0.19870126247406006,
-0.4703060984611511,
0.3383234143257141,
-0.18788403272628784,
-0.13235504925251007,
0.1699744164943695,
0.23646104335784912,
-0.18008065223693848,
-0.039769984781742096,
-0.31844833493232727,
0.36594390869140625,
0.628264307975769,
-0.21152657270431519,
-0.5290195345878601,
0.026554569602012634,
0.00944439321756363,
-0.09247764199972153,
0.12124913930892944,
0.10066085308790207,
0.19235752522945404,
-0.07838284224271774,
0.07307890802621841,
0.11139438301324844,
0.1752781718969345,
-0.09645421802997589,
-0.4493744671344757,
0.0013988055288791656,
-0.12518256902694702,
0.013960752636194229,
-0.3602592647075653,
-0.230296790599823,
0.46380534768104553,
-0.3822004199028015,
0.39073488116264343,
0.015933774411678314,
0.22057177126407623,
0.1957494169473648,
0.31980714201927185,
-0.05180096626281738,
-0.08623962849378586,
-0.12104178965091705,
-0.35502949357032776,
0.04921042174100876,
0.04268930107355118,
-0.28428328037261963,
-0.30079829692840576,
-0.35536831617355347,
-0.050407033413648605,
0.08466114103794098,
-0.14558205008506775,
0.004623951390385628,
0.11440971493721008,
-0.057740092277526855,
0.13212242722511292,
0.42650189995765686,
-0.13043910264968872,
-0.0774214044213295,
-0.18394619226455688,
0.18631553649902344,
0.07736086845397949,
0.3832543194293976,
-0.17104756832122803,
-0.42525574564933777,
0.05467844754457474,
-0.0013699084520339966,
-0.06634054332971573,
-0.01817687600851059,
-0.1635926067829132,
0.4444548487663269,
-0.10484814643859863,
-0.0027793794870376587,
0.10656948387622833,
0.00272350013256073,
0.025875896215438843,
-0.4440295398235321,
0.07029373198747635,
0.2675184905529022,
0.21141140162944794,
0.11475398391485214,
-0.16186586022377014,
0.4025799036026001,
0.23455075919628143,
-0.05265551060438156,
-0.05953282117843628,
-0.07638151943683624,
0.29200658202171326,
0.1740584820508957,
0.004943700507283211,
0.09265778958797455,
-0.06246664747595787,
0.06988544762134552,
0.40330833196640015,
-0.2243364006280899,
-0.2936951518058777,
0.1701297163963318,
0.45824840664863586,
0.1070466935634613,
0.20351842045783997,
0.1900099515914917,
-0.4580402970314026,
-0.07279285788536072,
0.26449406147003174,
0.09985484182834625,
0.36135661602020264,
0.23051872849464417,
0.12193334102630615,
-0.18435625731945038,
-0.33922967314720154,
-0.24280641973018646,
0.12256376445293427,
0.10365860164165497,
0.30054840445518494,
0.2048090696334839,
0.3009166717529297,
-0.027212005108594894,
-0.5037742853164673,
-0.19163693487644196,
-0.09732723981142044,
0.023829840123653412,
-0.21014653146266937,
0.25680670142173767,
-0.23812617361545563,
-0.33536669611930847,
-0.21724508702754974,
-0.12483290582895279,
-0.1586037278175354,
-0.31032687425613403,
-0.036553725600242615,
0.5780177116394043,
0.02327261120080948,
-0.11160396784543991,
-0.15079422295093536,
-0.06207425892353058,
0.21441863477230072,
-0.15835389494895935,
-0.38969212770462036,
0.08005017042160034,
-0.5274578928947449,
0.044388432055711746,
0.39251065254211426,
-0.08379871398210526,
0.3802197277545929,
0.15377956628799438,
0.13954026997089386,
-0.4493102431297302,
0.002102099359035492,
-0.11229333281517029,
-0.2809177041053772,
0.41903433203697205,
-0.3382553458213806,
0.10934876650571823,
-0.26375097036361694,
-0.08912335336208344,
0.17178967595100403,
-0.015429667197167873,
-0.19379845261573792,
0.1257682889699936,
0.03717370703816414,
-0.007129209581762552,
-0.009525137022137642,
-0.19344443082809448,
-0.15419620275497437,
-0.3427513539791107,
0.27945077419281006,
-0.05024747923016548,
0.06499999761581421,
-0.020281124860048294,
0.2540161907672882,
0.47802919149398804,
0.06823676824569702,
0.09170042723417282,
0.051878731697797775,
-0.1818198263645172,
0.7161715030670166,
-0.17220917344093323,
-0.364095538854599,
0.16335685551166534,
-0.05500075966119766,
0.11007747054100037,
0.06105987727642059,
-0.5219793915748596,
-0.28395432233810425,
-0.006811095401644707,
0.6309646368026733,
-0.06638924032449722,
-0.010587228462100029,
0.19170373678207397,
0.03535137698054314,
-0.07994765788316727,
-0.04744841530919075,
0.08404269814491272,
-0.1530010998249054,
0.032328322529792786,
0.0995263084769249,
-0.10429688543081284,
0.3168243169784546,
-0.06425535678863525,
0.6338436603546143,
0.14604540169239044,
0.09352291375398636,
0.5382615327835083,
-0.31655246019363403,
0.34798282384872437,
-0.19607669115066528,
-0.09643258899450302,
-0.3640475869178772,
-0.3192090094089508,
0.062113553285598755,
0.0054769366979599,
0.059530600905418396,
-0.16234803199768066,
0.10422858595848083,
0.01882687583565712,
-0.38892126083374023,
-0.33108460903167725,
0.17351318895816803,
-0.15450991690158844,
-0.10188711434602737,
-0.034069426357746124,
0.13194072246551514,
0.346171498298645,
-0.23306453227996826,
0.14959095418453217,
0.3263348937034607,
0.17938512563705444,
0.1115909293293953,
0.1782159060239792,
-0.19872063398361206,
-0.33247247338294983,
0.24400517344474792,
-0.06070490553975105,
0.112035371363163,
0.09345681965351105,
-0.11823992431163788,
0.2939034700393677,
-0.116898313164711,
0.5011329054832458,
0.1405363380908966,
-0.024212710559368134,
0.27025777101516724,
0.2670382261276245,
-0.621515154838562,
-0.07479487359523773,
-0.031412675976753235,
0.014358453452587128,
-0.06016728654503822,
0.22607918083667755,
-0.03390181064605713,
0.008819583803415298,
-0.1876794695854187,
0.264336496591568,
-0.06380432099103928,
0.1802327185869217,
-0.2145405113697052,
-0.27971410751342773,
-0.2812088429927826,
-0.02337440848350525,
0.15155455470085144,
-0.03183986246585846,
-0.2828216552734375,
-0.21020713448524475,
-0.20413653552532196,
-0.20650139451026917,
0.06238847225904465,
0.12137888371944427,
0.38087889552116394,
-0.24504216015338898,
0.1007576584815979,
-0.09313036501407623,
-0.010214485228061676,
0.5208438038825989,
0.5118017196655273,
0.2257416844367981,
-0.46118444204330444,
-0.1422625184059143,
-0.1319175511598587,
0.038469478487968445,
0.10682882368564606,
-0.2773246765136719,
-0.026536457240581512,
-0.26172637939453125,
-0.17412899434566498,
0.06487709283828735,
0.05408323183655739,
0.2572912573814392,
-0.30831843614578247,
-0.07067536562681198,
-0.018243998289108276,
0.7317114472389221,
0.11170120537281036,
0.08366569876670837,
0.28631362318992615,
0.32118111848831177,
-0.10725919157266617,
0.464164137840271,
0.21228322386741638,
0.7479278445243835,
0.043138161301612854,
0.4643590450286865,
0.5308563709259033,
-0.2122960388660431,
0.016033656895160675,
-0.16498219966888428,
0.17852529883384705,
-0.3695942163467407,
-0.03267394006252289,
-0.02994258888065815,
0.013426560908555984,
-0.10001594573259354,
0.014235172420740128,
0.0010390616953372955,
-0.06077384576201439,
0.01996089518070221,
0.0011286288499832153,
-0.06765875220298767,
-0.11161812394857407,
-0.2184182107448578,
-0.058807503432035446,
-0.1353927105665207,
0.1330665647983551,
0.053556349128484726,
-0.08946673572063446,
0.19219142198562622,
-0.3127533197402954,
-0.564592719078064,
0.008815541863441467,
-0.1491820216178894,
0.15723803639411926,
-0.19519779086112976,
0.41691964864730835,
-0.17627723515033722,
-0.5911449193954468,
-0.13032221794128418,
0.27615752816200256,
-0.21002618968486786,
-0.20870716869831085,
-0.11287437379360199,
-0.13830611109733582,
0.32524847984313965,
-0.1204836368560791,
-0.14169278740882874,
-0.26387080550193787,
0.3116104304790497,
-0.020835813134908676,
0.09037593752145767,
0.1997547149658203,
-0.005999469198286533,
-0.22223614156246185,
0.24246090650558472,
0.18910662829875946,
0.2453874796628952,
-0.10292369872331619,
-0.10395187139511108,
-0.385019451379776,
-0.3170557916164398,
-0.2708212435245514,
0.11129814386367798,
0.06073574349284172,
0.15596036612987518,
-0.0029877424240112305,
-0.04953325167298317,
-0.07720496505498886,
0.060842033475637436,
0.525767982006073,
-0.10849969834089279,
0.12391036748886108,
0.3488388657569885,
-0.21543654799461365,
-0.24444955587387085,
-0.18009531497955322,
0.3286754786968231,
0.03232889249920845,
-0.7142600417137146,
0.3077322840690613,
-0.03781904652714729,
0.3314645290374756,
-0.2094840705394745,
-0.16968579590320587,
0.17571015655994415,
-0.22758600115776062,
-0.2607494592666626,
-0.33196961879730225,
-0.3052564561367035,
0.28264933824539185,
0.12607094645500183,
0.02776646427810192,
0.13686326146125793,
-0.20622462034225464,
0.11973245441913605,
-0.26210010051727295,
-0.2328123152256012,
0.18259254097938538,
0.22931629419326782,
-0.028684642165899277,
-0.0013065487146377563,
0.12938404083251953,
0.21120135486125946,
0.049256857484579086,
0.10664200782775879,
0.26110100746154785,
0.013167369179427624,
-0.2077660858631134,
-0.030849188566207886,
0.14104154706001282,
0.09171996265649796,
-0.036527007818222046,
-0.03833921253681183,
-0.2797231078147888,
-0.00273975171148777,
-0.10044210404157639,
-0.14711718261241913,
-0.13170844316482544,
-0.04071607440710068,
-0.058072783052921295,
0.49796488881111145,
0.2660640776157379,
-0.005335327237844467,
0.0013513937592506409,
-0.16199199855327606,
0.18021151423454285,
-0.1033187136054039,
0.0690188780426979,
-0.13133180141448975,
-0.09963051974773407,
-0.3911687433719635,
-0.04289501905441284,
-0.16322530806064606,
0.011755246669054031,
0.2443060576915741,
-0.2647141218185425,
-0.19165711104869843,
0.03817203268408775,
0.20378243923187256,
0.46493014693260193,
-0.15926754474639893,
-0.19721205532550812,
0.30946609377861023,
0.1419484168291092,
-0.06947432458400726,
-0.054208170622587204,
-0.027801379561424255,
-0.15135277807712555,
-0.11065046489238739,
-0.050244323909282684,
-0.0706554427742958,
-0.00531788170337677,
-0.1682126522064209,
-0.06436578929424286,
0.08700140565633774,
-0.18880926072597504,
-0.04262900725007057,
0.2759278118610382,
0.1424252986907959,
0.15025940537452698,
0.26901358366012573,
-0.049971502274274826,
0.3420373201370239,
0.5846752524375916,
-0.08604944497346878,
0.21057943999767303,
0.23411688208580017,
-0.1995130479335785,
-0.11956975609064102,
-0.2119225710630417,
-0.24840547144412994,
-0.3364697992801666,
0.0029919296503067017,
0.21386173367500305,
0.2108577936887741,
0.6503987908363342,
0.10613949596881866,
-0.10712550580501556,
0.03916201740503311,
0.1595209687948227,
-0.09887739270925522,
0.10204555094242096,
0.09033617377281189,
-0.04351193457841873,
0.1965126097202301,
0.07377424836158752,
-0.3059621751308441,
-0.2051434963941574,
0.1116173267364502,
0.3435761332511902,
-0.1187390685081482,
-0.05925077944993973,
0.1965908408164978,
0.1987667977809906,
0.2077503502368927,
-0.04248049110174179,
0.03571072593331337,
0.2661929130554199,
0.022638898342847824,
-0.20926441252231598,
-0.05005868524312973,
0.479576975107193,
0.05337703973054886,
-0.03903099149465561,
0.11924348771572113,
-0.026942569762468338,
-0.07285581529140472,
-0.03084682486951351,
0.0892176404595375,
0.23044775426387787,
0.23294347524642944,
0.2975417673587799,
0.17881497740745544,
-0.10635426640510559,
-0.012292839586734772,
-0.1355467587709427,
0.14129462838172913,
0.03302149847149849,
0.20033496618270874,
-0.2876667380332947,
-0.3980258107185364,
-0.20610776543617249,
-0.22611382603645325,
-0.06009288132190704,
0.13516226410865784,
0.37320733070373535,
-0.008725186809897423,
-0.03438640385866165,
-0.023107260465621948,
0.07422985136508942,
-0.08433832228183746,
0.2900451123714447,
0.4074527323246002,
0.09980237483978271,
-0.1530342549085617,
-0.07337342202663422,
-0.4634939730167389,
0.17582067847251892,
-0.12391059100627899,
0.11787493526935577,
-0.09903035312891006,
0.2496945708990097,
0.04205290228128433,
0.0901108980178833,
0.15349921584129333,
-0.23410823941230774,
0.22167809307575226,
0.5094468593597412,
-0.21631991863250732,
-0.07032325863838196,
-0.03879917412996292,
-0.06733029335737228,
-0.06957905739545822,
-0.41088420152664185,
0.2714146077632904,
-0.12259555608034134,
0.10921864956617355,
-0.0908554419875145,
-0.1614263653755188,
0.12386131286621094,
0.239054337143898,
0.6692216992378235,
-0.12426100671291351,
0.21275493502616882,
-0.07502192258834839,
-0.08666078001260757,
-0.3000469207763672,
0.05261490121483803,
-0.0731734037399292,
0.17817795276641846,
0.00022437795996665955,
0.5266050100326538,
-0.040452465415000916,
-0.30385997891426086,
-0.17414796352386475,
0.30721521377563477,
-0.05748302862048149,
-0.023513030260801315,
-0.05279464274644852,
0.03847048431634903,
-0.1573578119277954,
0.11572916805744171,
-0.05780124291777611,
0.027186408638954163,
0.011674441397190094,
0.21897710859775543,
-0.46291226148605347,
-0.6108031272888184,
0.41288718581199646,
-0.31122899055480957,
-0.03610976040363312,
0.2989272177219391,
0.42742666602134705,
0.25026586651802063,
0.09310970455408096,
-0.35299330949783325,
-0.15125972032546997,
0.47585371136665344,
-0.24476298689842224,
-0.23510584235191345,
0.27248188853263855,
0.011676307767629623,
0.1664247363805771,
-0.03150886297225952,
0.5087145566940308,
0.02130081132054329,
-0.2097078412771225,
0.04940268024802208,
-0.46089088916778564
] |
https://github.com/huggingface/datasets/issues/2377 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather | Not sure if this was resolved, but I am getting a similar error when trying to load a dataset.arrow file directly: `ArrowInvalid: Not an Arrow file` | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
| 26 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
Not sure if this was resolved, but I am getting a similar error when trying to load a dataset.arrow file directly: `ArrowInvalid: Not an Arrow file` | [
-0.1831992119550705,
0.20106762647628784,
-0.007374785840511322,
0.44540685415267944,
0.17873996496200562,
0.25841864943504333,
-0.022258523851633072,
0.6304508447647095,
-0.5147768259048462,
-0.1729961782693863,
-0.31670066714286804,
0.6856517791748047,
-0.07944158464670181,
-0.7523323893547058,
0.08654417097568512,
0.2733731269836426,
0.15963764488697052,
0.07289418578147888,
-0.06551697850227356,
-0.04259712994098663,
-0.12199180573225021,
0.24575650691986084,
-0.052072908729314804,
0.3996140956878662,
-0.3432466983795166,
-0.0572030171751976,
0.13525664806365967,
0.28882962465286255,
0.03816821798682213,
-0.3487527370452881,
0.43569451570510864,
-0.19142840802669525,
0.1591988503932953,
0.09819333255290985,
-0.00011717061715899035,
0.23373930156230927,
0.4014814496040344,
-0.07351291179656982,
-0.31931859254837036,
0.019572585821151733,
0.25474247336387634,
-0.05224889516830444,
0.32230016589164734,
-0.3391822874546051,
0.24721947312355042,
-0.4859420955181122,
0.05650583654642105,
-0.18572954833507538,
0.5279343724250793,
0.4854256808757782,
0.16967520117759705,
0.10889790952205658,
0.3235171437263489,
0.04190406948328018,
0.586155891418457,
0.09096414595842361,
-0.17664624750614166,
0.697019100189209,
-0.10118062794208527,
-0.2516404986381531,
-0.20394966006278992,
-0.02028484269976616,
-0.16542260348796844,
-0.022108204662799835,
0.05660697817802429,
0.10023879259824753,
-0.02728380262851715,
-0.24169769883155823,
-0.08739445358514786,
-0.06051233410835266,
0.3125109076499939,
-0.5504615306854248,
-0.4227212965488434,
-0.06110531836748123,
0.17807117104530334,
-0.024412471801042557,
0.30198949575424194,
0.20232173800468445,
-0.17475639283657074,
0.2750808000564575,
0.4077298641204834,
0.10498527437448502,
-0.30390000343322754,
0.17572170495986938,
0.1566588282585144,
-0.3821560740470886,
-0.1562443971633911,
0.13558945059776306,
0.1749962419271469,
0.1355791687965393,
0.4724782705307007,
0.09652204066514969,
-0.19244468212127686,
0.0728001520037651,
-0.13658109307289124,
0.22082102298736572,
-0.049560099840164185,
0.04600866511464119,
0.17775332927703857,
0.21940702199935913,
0.3629716634750366,
-0.0019539669156074524,
-0.0857333093881607,
0.2913839519023895,
-0.12309303879737854,
-0.21559716761112213,
0.04826071113348007,
-0.23992083966732025,
0.34663820266723633,
-0.08552366495132446,
-0.05632569268345833,
-0.08029259741306305,
-0.095774345099926,
-0.29062700271606445,
0.3845250606536865,
-0.2502138018608093,
0.4292529821395874,
-0.2188156247138977,
-0.431734561920166,
0.05960363149642944,
-0.24956253170967102,
0.06571631878614426,
-0.09220065176486969,
0.22999286651611328,
0.12673434615135193,
-0.10697788745164871,
0.18068261444568634,
0.3775533437728882,
-0.12308168411254883,
-0.32257458567619324,
-0.027074337005615234,
-0.044122155755758286,
0.02487974986433983,
0.07491886615753174,
0.2219461053609848,
-0.26549032330513,
0.2031247466802597,
0.09883376210927963,
-0.010173872113227844,
0.04140598326921463,
0.04710806906223297,
-0.3031058609485626,
-0.028303399682044983,
0.2208992838859558,
0.14394758641719818,
0.2510209381580353,
0.15647147595882416,
-0.24511952698230743,
-0.1694594919681549,
0.1355975866317749,
-0.21904489398002625,
-0.14596892893314362,
-0.26474252343177795,
0.08643343299627304,
-0.004997365176677704,
-0.0147000253200531,
-0.5967698693275452,
-0.10072547197341919,
0.0859927162528038,
-0.37029245495796204,
0.04649118706583977,
-0.3210321068763733,
0.2592307925224304,
-0.46529102325439453,
0.21251586079597473,
0.20058467984199524,
-0.5641687512397766,
0.3021160066127777,
-0.17514656484127045,
-0.20790289342403412,
0.013648614287376404,
0.20711910724639893,
-0.30562078952789307,
0.0717650055885315,
-0.34571927785873413,
0.28331005573272705,
0.6540770530700684,
-0.21776455640792847,
-0.5363069176673889,
0.008207540959119797,
0.019185125827789307,
-0.09741639345884323,
0.030198439955711365,
0.04839927703142166,
0.06792156398296356,
-0.0670594796538353,
0.11215078830718994,
0.08246852457523346,
0.20184394717216492,
-0.1881198287010193,
-0.3839673101902008,
-0.0704922154545784,
-0.07214184105396271,
0.15808334946632385,
-0.30601590871810913,
-0.2500131130218506,
0.4298851788043976,
-0.44065454602241516,
0.3312053978443146,
0.001751527190208435,
0.2210482805967331,
0.26786792278289795,
0.2407425194978714,
0.035190414637327194,
-0.026891367509961128,
-0.09814473986625671,
-0.4120170474052429,
0.11777103692293167,
0.009614337235689163,
-0.3655036687850952,
-0.3493536114692688,
-0.33468925952911377,
-0.04735665023326874,
0.1351679265499115,
-0.17718227207660675,
0.08858292549848557,
0.07123275101184845,
-0.08982078731060028,
0.0632992535829544,
0.37621572613716125,
-0.1341119408607483,
-0.059901557862758636,
-0.15311169624328613,
0.18764115869998932,
0.0602215938270092,
0.3263368308544159,
-0.14748242497444153,
-0.40185606479644775,
0.05992722511291504,
0.045647650957107544,
-0.05843392014503479,
-0.0268059391528368,
-0.15705516934394836,
0.3875916004180908,
-0.10496356338262558,
-0.05388005077838898,
0.10202696919441223,
-0.024911358952522278,
-0.002027031034231186,
-0.4538029134273529,
-0.025874661281704903,
0.20722205936908722,
0.2300718128681183,
0.08253105729818344,
-0.11864074319601059,
0.3998103141784668,
0.2610916793346405,
-0.014808200299739838,
-0.08280064165592194,
-0.025330424308776855,
0.25983139872550964,
0.15034997463226318,
-0.042868904769420624,
0.1257876306772232,
-0.06934870779514313,
0.07192498445510864,
0.4748917818069458,
-0.17901940643787384,
-0.25541841983795166,
0.07707725465297699,
0.3184126019477844,
0.07161219418048859,
0.16681134700775146,
0.15962137281894684,
-0.46377915143966675,
-0.03283950313925743,
0.24143266677856445,
0.14954017102718353,
0.37045979499816895,
0.19085751473903656,
0.08104196190834045,
-0.19560708105564117,
-0.3278559148311615,
-0.19801872968673706,
0.053925175219774246,
0.14623552560806274,
0.35406795144081116,
0.23630842566490173,
0.21903015673160553,
-0.01062238123267889,
-0.4703649580478668,
-0.1792985051870346,
-0.054056257009506226,
0.02284211665391922,
-0.26476815342903137,
0.2597663700580597,
-0.19510729610919952,
-0.2910458743572235,
-0.2638416290283203,
-0.15305796265602112,
-0.16868586838245392,
-0.3090701699256897,
-0.0947350561618805,
0.5110859274864197,
0.050110165029764175,
-0.06601158529520035,
-0.1159587949514389,
-0.031179293990135193,
0.20780450105667114,
-0.18416640162467957,
-0.3348689675331116,
0.03742864727973938,
-0.5400722622871399,
-0.0066714659333229065,
0.42816171050071716,
-0.11304920166730881,
0.35502734780311584,
0.16558293998241425,
0.21454504132270813,
-0.5294801592826843,
0.017973624169826508,
-0.05659904330968857,
-0.2647436261177063,
0.4183644950389862,
-0.29347294569015503,
0.0911465436220169,
-0.27727410197257996,
-0.05410037934780121,
0.2334834635257721,
0.04603573679924011,
-0.14022046327590942,
0.07420535385608673,
0.047766465693712234,
-0.018144911155104637,
-0.019007354974746704,
-0.17446407675743103,
-0.20341868698596954,
-0.31741276383399963,
0.2733360528945923,
-0.02838914468884468,
0.024154018610715866,
-0.021392781287431717,
0.2606675922870636,
0.5273218154907227,
0.07813802361488342,
0.03849487751722336,
0.033994730561971664,
-0.06665707379579544,
0.7296238541603088,
-0.14301177859306335,
-0.34201350808143616,
0.19652342796325684,
-0.03425977751612663,
0.12956500053405762,
0.09780194610357285,
-0.4608408212661743,
-0.23387353122234344,
0.01758967712521553,
0.5916262269020081,
-0.13190095126628876,
-0.0008053015917539597,
0.20571497082710266,
0.10315544903278351,
-0.03989042341709137,
-0.058041781187057495,
0.05140579119324684,
-0.10045134276151657,
-0.07060490548610687,
0.12353019416332245,
-0.07977058738470078,
0.3126043975353241,
-0.11521299183368683,
0.665199339389801,
0.061821166425943375,
0.06584532558917999,
0.43888065218925476,
-0.2911820709705353,
0.31049495935440063,
-0.12069537490606308,
-0.0807611495256424,
-0.4461783170700073,
-0.3737548887729645,
0.06525658816099167,
-0.0053592249751091,
0.08928978443145752,
-0.1579427421092987,
0.1396627277135849,
0.03521590307354927,
-0.3912845551967621,
-0.2877548635005951,
0.10727585107088089,
-0.1653594970703125,
-0.09861256927251816,
0.013182394206523895,
0.11889038234949112,
0.2901386618614197,
-0.1374547779560089,
0.19971863925457,
0.39891523122787476,
0.2023758590221405,
0.11524108052253723,
0.0955711156129837,
-0.1646966189146042,
-0.24677833914756775,
0.2768421769142151,
-0.058665692806243896,
0.11290129274129868,
0.11608406901359558,
-0.13458572328090668,
0.3150467872619629,
-0.17419862747192383,
0.5080369710922241,
0.1763070672750473,
0.008468274027109146,
0.3045985698699951,
0.20511843264102936,
-0.6527942419052124,
-0.14516288042068481,
0.03884728625416756,
0.07147081941366196,
-0.03795670345425606,
0.18491917848587036,
-0.013085097074508667,
-0.05491039901971817,
-0.16341131925582886,
0.24025578796863556,
-0.11496049165725708,
0.1459483504295349,
-0.21834684908390045,
-0.3289247155189514,
-0.3116893172264099,
-0.1472046673297882,
0.10014116764068604,
-0.0007350370287895203,
-0.19562621414661407,
-0.1267114132642746,
-0.3054959177970886,
-0.2027376890182495,
0.05612574517726898,
0.10286453366279602,
0.4022678732872009,
-0.21488642692565918,
0.0845402330160141,
0.026055388152599335,
0.050839655101299286,
0.5489652156829834,
0.4739442467689514,
0.20834881067276,
-0.5060911774635315,
-0.12626677751541138,
-0.1382472664117813,
0.02186772972345352,
0.06484968215227127,
-0.35897353291511536,
-0.1277778446674347,
-0.2692835032939911,
-0.24975337088108063,
0.0219731442630291,
0.01633569411933422,
0.22615088522434235,
-0.2821993827819824,
-0.11102581024169922,
-0.06907513737678528,
0.795221209526062,
0.1875731647014618,
0.017930448055267334,
0.3567965626716614,
0.33808356523513794,
-0.13786932826042175,
0.4101770520210266,
0.23646903038024902,
0.6594303846359253,
-0.04635262489318848,
0.4587439000606537,
0.5849667191505432,
-0.15444427728652954,
-0.0320122092962265,
-0.12175784260034561,
0.15450093150138855,
-0.4142095148563385,
0.0067761740647256374,
-0.02457127720117569,
-0.03927529603242874,
-0.0890582874417305,
0.11455579102039337,
0.11532431840896606,
-0.12378483265638351,
0.04460848867893219,
-0.035972628742456436,
-0.04704960435628891,
-0.0730464905500412,
-0.19006946682929993,
-0.051351163536310196,
-0.07485238462686539,
0.11455649137496948,
0.044467244297266006,
0.010513728484511375,
0.1094706580042839,
-0.298300564289093,
-0.5861973166465759,
0.006364263594150543,
-0.07201072573661804,
0.1730489432811737,
-0.1756492555141449,
0.5481598377227783,
-0.12785059213638306,
-0.5062636137008667,
-0.006685778498649597,
0.29077884554862976,
-0.1644447296857834,
-0.27970296144485474,
-0.15496689081192017,
-0.0515478290617466,
0.2721547782421112,
-0.17590031027793884,
-0.14543770253658295,
-0.2326495200395584,
0.30191662907600403,
0.05316323786973953,
0.13853296637535095,
0.1326065957546234,
-0.0714963898062706,
-0.20631860196590424,
0.1800422966480255,
0.1744879186153412,
0.16653645038604736,
-0.14651009440422058,
-0.15956416726112366,
-0.37342768907546997,
-0.18433669209480286,
-0.20474761724472046,
0.07763877511024475,
0.0806209072470665,
0.21228109300136566,
-0.09552974253892899,
-0.038363028317689896,
-0.11327267438173294,
0.1956319659948349,
0.5003564953804016,
-0.1878853142261505,
0.04587659239768982,
0.4507099688053131,
-0.17422108352184296,
-0.15201333165168762,
-0.16360360383987427,
0.34342026710510254,
0.08735911548137665,
-0.7321167588233948,
0.2866147756576538,
-0.029190072789788246,
0.3706626296043396,
-0.1882990300655365,
-0.11119954288005829,
0.27483803033828735,
-0.2834896743297577,
-0.1793147623538971,
-0.38231754302978516,
-0.2844666838645935,
0.3346800208091736,
0.057612158358097076,
0.04118325933814049,
0.14222115278244019,
-0.2291007936000824,
0.14846207201480865,
-0.31813114881515503,
-0.18260423839092255,
0.22106650471687317,
0.2550833523273468,
-0.1087164580821991,
0.060772430151700974,
0.18002301454544067,
0.11368637531995773,
0.07015365362167358,
0.07383772730827332,
0.18817947804927826,
-0.010346120223402977,
-0.16580349206924438,
-0.025917865335941315,
0.15567168593406677,
0.0750342383980751,
-0.018915148451924324,
-0.010445643216371536,
-0.3665297031402588,
0.00036121904850006104,
-0.057631395757198334,
-0.1617567092180252,
-0.10502668470144272,
-0.04364974796772003,
-0.02798280119895935,
0.47724366188049316,
0.24356701970100403,
-0.1274028867483139,
0.07690560072660446,
-0.1370992809534073,
0.15671804547309875,
-0.10907205939292908,
0.03855721279978752,
-0.12855184078216553,
-0.01157388836145401,
-0.45099973678588867,
0.016376066952943802,
-0.15465155243873596,
-0.003795165568590164,
0.21023565530776978,
-0.3387634754180908,
-0.13224129378795624,
0.05929506570100784,
0.2050611972808838,
0.49138906598091125,
-0.2594589293003082,
-0.12870287895202637,
0.2971150875091553,
0.1097862496972084,
-0.09973156452178955,
0.0072094411589205265,
-0.006250794976949692,
-0.18374937772750854,
-0.16746264696121216,
-0.09886341542005539,
-0.052508220076560974,
0.007166020572185516,
-0.1904897838830948,
-0.0722663551568985,
0.1585388332605362,
-0.1566207855939865,
-0.0762910395860672,
0.3577248454093933,
0.1387365460395813,
0.13810794055461884,
0.3333456218242645,
-0.012072764337062836,
0.36793288588523865,
0.6138402223587036,
-0.12576144933700562,
0.14857470989227295,
0.2513732612133026,
-0.11042840778827667,
-0.15018248558044434,
-0.22979742288589478,
-0.18697716295719147,
-0.21661251783370972,
0.09338847547769547,
0.08659851551055908,
0.1966855674982071,
0.774726927280426,
0.07865701615810394,
-0.1433032751083374,
0.07125769555568695,
0.10011262446641922,
-0.10601133853197098,
0.1037241667509079,
-0.009022044017910957,
-0.04550398141145706,
0.11731131374835968,
0.07004588842391968,
-0.35902002453804016,
-0.2072257548570633,
0.14368034899234772,
0.3244319558143616,
-0.10187233984470367,
-0.08819365501403809,
0.2172570824623108,
0.27588778734207153,
0.15316957235336304,
-0.036872901022434235,
-0.015428224578499794,
0.13812588155269623,
-0.03208471089601517,
-0.19043563306331635,
-0.011594725772738457,
0.4744965732097626,
0.1114630401134491,
-0.06261388957500458,
0.015860741958022118,
-0.06534601747989655,
0.01949426345527172,
-0.028053585439920425,
0.10218150168657303,
0.20469090342521667,
0.25053316354751587,
0.3805396556854248,
0.13695292174816132,
-0.06903587281703949,
-0.08051490783691406,
-0.1015610545873642,
0.1601611226797104,
-0.040498699992895126,
0.1678374707698822,
-0.30758100748062134,
-0.4073037803173065,
-0.1134820282459259,
-0.1274126172065735,
-0.06875946372747421,
0.12958507239818573,
0.4084552228450775,
0.12593722343444824,
-0.01354444120079279,
-0.011483171954751015,
0.05752413719892502,
-0.10107854008674622,
0.309797078371048,
0.4820612370967865,
0.11071239411830902,
-0.13518650829792023,
-0.07671968638896942,
-0.6318694353103638,
0.17268873751163483,
-0.1442704200744629,
0.06341162323951721,
0.0057418979704380035,
0.20882268249988556,
0.05159491300582886,
0.12253168225288391,
0.19521847367286682,
-0.21173466742038727,
0.2140621840953827,
0.3855675756931305,
-0.19477543234825134,
-0.13785991072654724,
0.058116793632507324,
-0.033221885561943054,
-0.09360295534133911,
-0.4646914601325989,
0.18164978921413422,
-0.08572240173816681,
0.08263546973466873,
-0.10524451732635498,
-0.21311204135417938,
0.13176463544368744,
0.1493251919746399,
0.714902400970459,
-0.1612011343240738,
0.20820866525173187,
0.07287333905696869,
-0.04387935996055603,
-0.34546953439712524,
-0.0314827486872673,
0.00021691340953111649,
0.2513539493083954,
-0.047679122537374496,
0.46983179450035095,
-0.06835868209600449,
-0.21086649596691132,
-0.18396124243736267,
0.20199976861476898,
-0.07243593037128448,
0.007181968539953232,
-0.19331340491771698,
0.0804629996418953,
-0.1728990375995636,
0.1316739022731781,
-0.04566291347146034,
0.04191203787922859,
-0.00007022172212600708,
0.27144306898117065,
-0.4673972725868225,
-0.4921545386314392,
0.37925365567207336,
-0.3513132333755493,
-0.06088367477059364,
0.36098161339759827,
0.38991835713386536,
0.2742861211299896,
0.0760604664683342,
-0.3233281672000885,
-0.13067559897899628,
0.525718629360199,
-0.18352031707763672,
-0.24062789976596832,
0.23170435428619385,
0.036301203072071075,
0.1273507922887802,
-0.06179122254252434,
0.4845370352268219,
-0.04244823008775711,
-0.1437298208475113,
0.015309039503335953,
-0.4007166624069214
] |
https://github.com/huggingface/datasets/issues/2377 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather | Since we're using the streaming format, you need to use `open_stream`:
```python
import pyarrow as pa
def in_memory_arrow_table_from_file(filename: str) -> pa.Table:
in_memory_stream = pa.input_stream(filename)
opened_stream = pa.ipc.open_stream(in_memory_stream)
pa_table = opened_stream.read_all()
return pa_table
def memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
memory_mapped_stream = pa.memory_map(filename)
opened_stream = pa.ipc.open_stream(memory_mapped_stream)
pa_table = opened_stream.read_all()
return pa_table
``` | ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
| 49 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
Since we're using the streaming format, you need to use `open_stream`:
```python
import pyarrow as pa
def in_memory_arrow_table_from_file(filename: str) -> pa.Table:
in_memory_stream = pa.input_stream(filename)
opened_stream = pa.ipc.open_stream(in_memory_stream)
pa_table = opened_stream.read_all()
return pa_table
def memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
memory_mapped_stream = pa.memory_map(filename)
opened_stream = pa.ipc.open_stream(memory_mapped_stream)
pa_table = opened_stream.read_all()
return pa_table
``` | [
-0.21624472737312317,
0.11896482110023499,
-0.037573907524347305,
0.3734046220779419,
0.20306625962257385,
0.232123464345932,
-0.04541613534092903,
0.5734183192253113,
-0.5510637760162354,
-0.09114545583724976,
-0.33249738812446594,
0.6647444367408752,
-0.06050500273704529,
-0.7868351936340332,
0.11773253232240677,
0.24878761172294617,
0.19071540236473083,
0.09164781868457794,
-0.10322046279907227,
-0.04799804091453552,
-0.15110298991203308,
0.17836111783981323,
-0.04667007550597191,
0.26802417635917664,
-0.32083165645599365,
-0.06756536662578583,
0.09861937165260315,
0.20708006620407104,
0.053325653076171875,
-0.3171939551830292,
0.25676485896110535,
-0.11567029356956482,
0.0669940784573555,
0.18799540400505066,
-0.00011358415940776467,
0.19160152971744537,
0.28336387872695923,
-0.1074332669377327,
-0.2509620487689972,
0.09227925539016724,
0.28588345646858215,
0.01794510707259178,
0.18042907118797302,
-0.3463588058948517,
0.19497814774513245,
-0.4624428153038025,
0.05131795257329941,
-0.24572855234146118,
0.47867846488952637,
0.541341245174408,
0.2096826285123825,
0.0894426554441452,
0.23964865505695343,
0.093950055539608,
0.6799872517585754,
0.09782205522060394,
-0.1834544539451599,
0.6059095859527588,
-0.1142445057630539,
-0.21378935873508453,
-0.26636868715286255,
0.00835437048226595,
-0.28357812762260437,
-0.013527978211641312,
-0.012344077229499817,
0.18626898527145386,
-0.10116638988256454,
-0.2172333002090454,
-0.06214882433414459,
-0.011791221797466278,
0.23572030663490295,
-0.5892625451087952,
-0.3415818214416504,
-0.014809992164373398,
0.07955677807331085,
-0.16786974668502808,
0.20551136136054993,
0.26096561551094055,
-0.22259622812271118,
0.23260542750358582,
0.3826029598712921,
0.13345830142498016,
-0.3334331214427948,
0.13772258162498474,
0.22804808616638184,
-0.31491419672966003,
-0.13507498800754547,
0.05524756759405136,
0.19539646804332733,
0.16132016479969025,
0.47458988428115845,
0.04978427290916443,
-0.19267553091049194,
-0.0031924238428473473,
-0.05964371934533119,
0.15600214898586273,
-0.0017351359128952026,
-0.0666971281170845,
0.19026708602905273,
0.2265411913394928,
0.4664934277534485,
0.067191481590271,
0.040807291865348816,
0.2657412886619568,
-0.2512010931968689,
-0.15548443794250488,
-0.10132346302270889,
-0.17940419912338257,
0.4626409411430359,
0.07925019413232803,
-0.14326730370521545,
-0.11915295571088791,
0.08972808718681335,
-0.1559014916419983,
0.44316014647483826,
-0.2485899031162262,
0.4106212258338928,
-0.16598978638648987,
-0.43957534432411194,
0.11218064278364182,
-0.16958104074001312,
0.11945195496082306,
-0.09855182468891144,
0.31575652956962585,
0.07309894263744354,
-0.1363731324672699,
0.21345500648021698,
0.3699157238006592,
-0.15387742221355438,
-0.2722102999687195,
-0.11013904213905334,
-0.08033418655395508,
0.03767533227801323,
0.11608006060123444,
0.19006028771400452,
-0.15060965716838837,
0.23467107117176056,
0.1417611688375473,
-0.04796314984560013,
0.04756338894367218,
0.009074442088603973,
-0.39377328753471375,
0.07644712924957275,
0.18607105314731598,
0.14129537343978882,
0.15954433381557465,
0.09260301291942596,
-0.17950725555419922,
-0.08893971890211105,
0.1704581081867218,
-0.12914201617240906,
-0.0687195286154747,
-0.1907617747783661,
0.17086540162563324,
0.04163447022438049,
0.027555426582694054,
-0.6407467722892761,
-0.04138781502842903,
0.10749218612909317,
-0.3406038284301758,
0.08411724865436554,
-0.16765253245830536,
0.15312489867210388,
-0.5269802212715149,
0.27464669942855835,
0.2246226817369461,
-0.4356776475906372,
0.32094132900238037,
-0.1741383671760559,
-0.1553286612033844,
0.18042990565299988,
0.21893958747386932,
-0.1646415740251541,
-0.01481533795595169,
-0.31475943326950073,
0.3746519088745117,
0.6232662796974182,
-0.19198061525821686,
-0.5388436913490295,
-0.00866510160267353,
0.0017100796103477478,
-0.08053205162286758,
0.10536043345928192,
0.0987156480550766,
0.16015756130218506,
-0.014107477851212025,
0.11714600026607513,
0.16079111397266388,
0.17013931274414062,
-0.04062807932496071,
-0.4394043982028961,
-0.005275903269648552,
-0.12404544651508331,
0.016164228320121765,
-0.3056402802467346,
-0.24105104804039001,
0.4686846435070038,
-0.34712326526641846,
0.3958575129508972,
-0.0028201714158058167,
0.2463417649269104,
0.2332010567188263,
0.3219585716724396,
-0.01798880100250244,
-0.07929372042417526,
-0.16092222929000854,
-0.3517185151576996,
0.0296490341424942,
-0.0028036069124937057,
-0.30802348256111145,
-0.32566797733306885,
-0.34288614988327026,
0.013496803119778633,
0.11672363430261612,
-0.17377862334251404,
-0.0023410357534885406,
0.15206849575042725,
-0.018185779452323914,
0.13478869199752808,
0.4188719391822815,
-0.08313951641321182,
-0.0798271894454956,
-0.19593025743961334,
0.18812182545661926,
0.10390876233577728,
0.37039655447006226,
-0.172983780503273,
-0.4464471936225891,
0.04098806530237198,
0.039832621812820435,
-0.019630998373031616,
0.026902196928858757,
-0.15994083881378174,
0.44546836614608765,
-0.08027397841215134,
-0.03425218164920807,
0.04009365662932396,
-0.004376634955406189,
0.008500702679157257,
-0.4600291848182678,
0.06689120084047318,
0.24755506217479706,
0.2428172379732132,
0.09741833060979843,
-0.07919146865606308,
0.39631688594818115,
0.24382050335407257,
-0.035494156181812286,
-0.024345360696315765,
-0.08913525193929672,
0.2702634036540985,
0.17001543939113617,
0.08333507925271988,
0.07588213682174683,
-0.046833138912916183,
0.09085461497306824,
0.38362666964530945,
-0.21283426880836487,
-0.2947489023208618,
0.13205242156982422,
0.45636650919914246,
0.1045941412448883,
0.22527235746383667,
0.15028084814548492,
-0.457267165184021,
-0.08418057858943939,
0.23774926364421844,
0.12680494785308838,
0.4077146053314209,
0.22240804135799408,
0.15691813826560974,
-0.1424206644296646,
-0.34607937932014465,
-0.21530857682228088,
0.13504815101623535,
0.1280447542667389,
0.32562482357025146,
0.23792093992233276,
0.31252700090408325,
-0.027401495724916458,
-0.5072550177574158,
-0.16014309227466583,
-0.06577496230602264,
0.06420064717531204,
-0.19889231026172638,
0.20891886949539185,
-0.24018129706382751,
-0.3873904347419739,
-0.23064075410366058,
-0.06250669062137604,
-0.11388641595840454,
-0.2795897424221039,
-0.012871962040662766,
0.5803012847900391,
-0.01794639229774475,
-0.08601324260234833,
-0.11644516885280609,
-0.04680483043193817,
0.20222266018390656,
-0.17060105502605438,
-0.3894982933998108,
0.0621284656226635,
-0.47347384691238403,
0.06269040703773499,
0.3566902279853821,
-0.0791245549917221,
0.36704888939857483,
0.18755711615085602,
0.11800135672092438,
-0.5009884834289551,
-0.002894476056098938,
-0.12152239680290222,
-0.23957891762256622,
0.40617460012435913,
-0.34324267506599426,
0.09847767651081085,
-0.2147851288318634,
-0.12737104296684265,
0.2107054591178894,
-0.04680337756872177,
-0.24772250652313232,
0.11180701851844788,
0.08217180520296097,
0.0455000139772892,
-0.05174238607287407,
-0.18148112297058105,
-0.10083920508623123,
-0.39735472202301025,
0.2760537266731262,
0.00044590607285499573,
0.08021774888038635,
-0.03754720836877823,
0.24139618873596191,
0.49444952607154846,
0.06625387072563171,
0.16372708976268768,
0.022160854190587997,
-0.049336135387420654,
0.6518263220787048,
-0.1752425730228424,
-0.38279590010643005,
0.16266995668411255,
-0.061608828604221344,
0.13142311573028564,
0.11756552755832672,
-0.5109104514122009,
-0.26124870777130127,
-0.04212382435798645,
0.5280638337135315,
-0.14508362114429474,
-0.03402503579854965,
0.18981489539146423,
0.07304888963699341,
-0.11619279533624649,
-0.057567890733480453,
0.01712670549750328,
-0.13188210129737854,
-0.038487814366817474,
0.09416728466749191,
-0.11770162731409073,
0.352399080991745,
-0.015412213280797005,
0.5926799774169922,
0.09529630839824677,
0.10307237505912781,
0.5469440817832947,
-0.3450506329536438,
0.3012329936027527,
-0.1665225327014923,
-0.08876223862171173,
-0.3816547989845276,
-0.3195263147354126,
0.06034647673368454,
-0.04067680239677429,
0.03747715801000595,
-0.18668027222156525,
0.11023138463497162,
0.028298847377300262,
-0.4052119553089142,
-0.3330898582935333,
0.17044557631015778,
-0.16335240006446838,
-0.11734303086996078,
-0.035569578409194946,
0.09938184171915054,
0.2799226939678192,
-0.2399633228778839,
0.14053140580654144,
0.2792692184448242,
0.1176546961069107,
0.09231966733932495,
0.1097116619348526,
-0.13659515976905823,
-0.34004834294319153,
0.26231539249420166,
-0.08211693167686462,
0.11909536272287369,
0.06325271725654602,
-0.176701158285141,
0.2803564667701721,
-0.13619744777679443,
0.4705469608306885,
0.1650586873292923,
0.01605594903230667,
0.24826133251190186,
0.22831621766090393,
-0.5705320835113525,
-0.08994735777378082,
-0.04187857359647751,
-0.022862933576107025,
-0.14441920816898346,
0.2063532918691635,
-0.04556591436266899,
0.007416331209242344,
-0.14591602981090546,
0.21715451776981354,
-0.04211004823446274,
0.21550364792346954,
-0.23490174114704132,
-0.3117752969264984,
-0.2762359380722046,
-0.0005132332444190979,
0.17381331324577332,
0.04887925460934639,
-0.22580786049365997,
-0.18488216400146484,
-0.21781344711780548,
-0.21229368448257446,
0.03790785372257233,
0.12458470463752747,
0.43353942036628723,
-0.25423887372016907,
0.10582071542739868,
-0.11496734619140625,
0.02032962441444397,
0.5409411191940308,
0.491228312253952,
0.21097317337989807,
-0.4093049168586731,
-0.1282077431678772,
-0.09434431046247482,
0.06026226654648781,
0.10125403106212616,
-0.2810460031032562,
0.045918770134449005,
-0.26244279742240906,
-0.17045673727989197,
0.02916509285569191,
0.06753700971603394,
0.2535230815410614,
-0.30397599935531616,
-0.03713547810912132,
-0.0795987918972969,
0.6731047034263611,
0.17527340352535248,
0.04268623888492584,
0.3374343514442444,
0.2473619133234024,
-0.1881406456232071,
0.49350428581237793,
0.2411395013332367,
0.759892463684082,
0.01046072319149971,
0.48235785961151123,
0.5461262464523315,
-0.21778519451618195,
-0.0531332790851593,
-0.1827106922864914,
0.20036008954048157,
-0.3510749042034149,
-0.07954172044992447,
-0.005870217457413673,
-0.017844881862401962,
-0.11003043502569199,
-0.016486920416355133,
-0.001764826476573944,
-0.09620549529790878,
0.06914618611335754,
0.01331842690706253,
-0.04156454652547836,
-0.16137118637561798,
-0.2306758463382721,
-0.05601539835333824,
-0.15417546033859253,
0.14510749280452728,
0.04507704824209213,
-0.13169226050376892,
0.17978835105895996,
-0.2937188744544983,
-0.5517231225967407,
-0.03323044627904892,
-0.1444491744041443,
0.13691529631614685,
-0.36852163076400757,
0.4097747802734375,
-0.24433758854866028,
-0.5363667011260986,
-0.17237697541713715,
0.2963457405567169,
-0.25398916006088257,
-0.18329311907291412,
-0.08673262596130371,
-0.13798683881759644,
0.31291237473487854,
-0.07119584083557129,
-0.15303920209407806,
-0.2455478310585022,
0.3316148817539215,
-0.031061414629220963,
0.07100582867860794,
0.19884854555130005,
-0.01800638809800148,
-0.25726786255836487,
0.18175700306892395,
0.20146960020065308,
0.20100373029708862,
-0.10539982467889786,
-0.09996312856674194,
-0.38032102584838867,
-0.35139328241348267,
-0.26514801383018494,
0.13974377512931824,
0.02425898239016533,
0.10282862186431885,
0.005696311593055725,
-0.055005308240652084,
-0.09560640156269073,
0.06870444118976593,
0.5402465462684631,
-0.11619649082422256,
0.14830748736858368,
0.33174407482147217,
-0.21511071920394897,
-0.23757894337177277,
-0.20740386843681335,
0.28389936685562134,
0.08288551867008209,
-0.6578779220581055,
0.31212711334228516,
-0.05073869600892067,
0.2571934461593628,
-0.1721288412809372,
-0.12106363475322723,
0.19315756857395172,
-0.19024062156677246,
-0.2087487280368805,
-0.3019460439682007,
-0.3527693748474121,
0.32069990038871765,
0.08039288222789764,
0.05220935866236687,
0.1342461109161377,
-0.18513421714305878,
0.10033214837312698,
-0.21407243609428406,
-0.26154160499572754,
0.20732064545154572,
0.17095567286014557,
-0.02974575012922287,
-0.05128052830696106,
0.10396675765514374,
0.1901363730430603,
0.06748387217521667,
0.1454608291387558,
0.30584973096847534,
0.012323779053986073,
-0.2364262044429779,
-0.01222577877342701,
0.12007831782102585,
0.06037920340895653,
-0.05533752590417862,
-0.08880019932985306,
-0.3312608003616333,
0.03120623342692852,
-0.12418913841247559,
-0.10380516946315765,
-0.12533217668533325,
-0.030597873032093048,
-0.039068885147571564,
0.5303951501846313,
0.25730544328689575,
0.013854660093784332,
-0.008453704416751862,
-0.22773629426956177,
0.13276274502277374,
-0.08721219748258591,
0.05279052257537842,
-0.13027410209178925,
-0.09655652940273285,
-0.3846910297870636,
-0.08029501885175705,
-0.1672031432390213,
-0.02227390930056572,
0.23214572668075562,
-0.226999893784523,
-0.2789226472377777,
0.03503181040287018,
0.22322024405002594,
0.4216861426830292,
-0.16397684812545776,
-0.16853784024715424,
0.32231780886650085,
0.16863732039928436,
-0.08447356522083282,
-0.052767179906368256,
-0.011579664424061775,
-0.20242075622081757,
-0.06764397770166397,
-0.019959233701229095,
-0.06283025443553925,
0.010245919227600098,
-0.20819880068302155,
-0.054258789867162704,
0.06333158165216446,
-0.18487057089805603,
-0.034211792051792145,
0.2564989924430847,
0.15971225500106812,
0.13916534185409546,
0.25779223442077637,
-0.004146795719861984,
0.3762742877006531,
0.588047206401825,
-0.08676860481500626,
0.2362704575061798,
0.15683716535568237,
-0.1951945722103119,
-0.12269125133752823,
-0.2149626463651657,
-0.27051877975463867,
-0.22394785284996033,
-0.020872533321380615,
0.1928444802761078,
0.12972033023834229,
0.6068633198738098,
0.1427152007818222,
-0.1226964071393013,
0.07567240297794342,
0.1245265007019043,
-0.1340077817440033,
0.10529567301273346,
0.09796667098999023,
-0.03135921061038971,
0.1266569197177887,
0.043781157582998276,
-0.24162569642066956,
-0.19742147624492645,
0.134081169962883,
0.28481143712997437,
-0.1193365752696991,
0.021959323436021805,
0.22284084558486938,
0.24961063265800476,
0.19617970287799835,
-0.09555649012327194,
0.017833128571510315,
0.24786487221717834,
0.013344313949346542,
-0.22655102610588074,
-0.01234852708876133,
0.4604828655719757,
0.11707344651222229,
-0.08509647846221924,
0.1103048324584961,
-0.029924161732196808,
-0.07509417831897736,
-0.10099788010120392,
0.12479328364133835,
0.2696457803249359,
0.2250775694847107,
0.28525999188423157,
0.19166199862957,
-0.1312587410211563,
-0.04196834936738014,
-0.05696677789092064,
0.164009690284729,
0.014968222007155418,
0.17961882054805756,
-0.26894888281822205,
-0.43731969594955444,
-0.18650878965854645,
-0.23186969757080078,
-0.06881623715162277,
0.14806382358074188,
0.35976266860961914,
-0.04458819702267647,
-0.0042893653735518456,
0.0017577903345227242,
0.08071962743997574,
-0.026176970452070236,
0.2604575753211975,
0.3784804940223694,
0.09271073341369629,
-0.2230421006679535,
-0.12482637166976929,
-0.5139057040214539,
0.17863765358924866,
-0.11749140918254852,
0.07362281531095505,
-0.08720045536756516,
0.2976711690425873,
-0.0049028173089027405,
0.05552402883768082,
0.16925910115242004,
-0.22037065029144287,
0.22185537219047546,
0.522419810295105,
-0.2705932855606079,
-0.12359839677810669,
-0.008418731391429901,
-0.08381189405918121,
-0.04263198748230934,
-0.40867236256599426,
0.22574754059314728,
-0.10820217430591583,
0.12585130333900452,
-0.10380131006240845,
-0.1186242550611496,
0.09649711847305298,
0.3263740837574005,
0.6459754109382629,
-0.1540244221687317,
0.2085685431957245,
-0.09702492505311966,
-0.04909772425889969,
-0.29780834913253784,
0.022234324365854263,
-0.06286393851041794,
0.1609821915626526,
0.00031272321939468384,
0.4863804280757904,
-0.026407839730381966,
-0.27022191882133484,
-0.20793813467025757,
0.2778860330581665,
-0.04576560854911804,
-0.04220080003142357,
-0.093592569231987,
0.10408733785152435,
-0.08558511734008789,
0.13767985999584198,
-0.05356738716363907,
0.02408456988632679,
-0.005596734583377838,
0.24868805706501007,
-0.49725860357284546,
-0.622718870639801,
0.4023037552833557,
-0.3051971197128296,
-0.008998744189739227,
0.31698912382125854,
0.4615223705768585,
0.2701982259750366,
0.07245616614818573,
-0.41353508830070496,
-0.16667218506336212,
0.46619153022766113,
-0.20356014370918274,
-0.26956677436828613,
0.28991109132766724,
-0.054140787571668625,
0.1549641191959381,
-0.040528979152441025,
0.49715980887413025,
-0.0037791505455970764,
-0.19154375791549683,
0.06466801464557648,
-0.4684430956840515
] |
https://github.com/huggingface/datasets/issues/2377 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather | > η±δΊζ们使η¨ζ΅ζ ΌεΌοΌε ζ€ζ¨ιθ¦δ½Ώη¨`open_stream`οΌ
>
> ```python
> import pyarrow as pa
>
> def in_memory_arrow_table_from_file(filename: str) -> pa.Table:
> in_memory_stream = pa.input_stream(filename)
> opened_stream = pa.ipc.open_stream(in_memory_stream)
> pa_table = opened_stream.read_all()
> return pa_table
>
> def memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
> memory_mapped_stream = pa.memory_map(filename)
> opened_stream = pa.ipc.open_stream(memory_mapped_stream)
> pa_table = opened_stream.read_all()
> return pa_table
> ```
Thank you very much for providing the code that can read arrow file to pa_table and finally to dict, but how to implement the reverse process, how to restore a dict to arrow file?
| ## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
| 90 | ArrowDataset.save_to_disk produces files that cannot be read using pyarrow.feather
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce the bug
```python
from datasets import load_dataset
from pyarrow import feather
dataset = load_dataset('imdb', split='train')
dataset.save_to_disk('dataset_dir')
table = feather.read_table('dataset_dir/dataset.arrow')
```
## Expected results
I expect that the saved dataset can be read by the official Apache Arrow methods.
## Actual results
```
File "/usr/local/lib/python3.7/site-packages/pyarrow/feather.py", line 236, in read_table
reader.open(source, use_memory_map=memory_map)
File "pyarrow/feather.pxi", line 67, in pyarrow.lib.FeatherReader.open
File "pyarrow/error.pxi", line 123, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 85, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Not a Feather V1 or Arrow IPC file
```
## Environment info
<!-- You can run the command `datasets-cli env` and copy-and-paste its output below. -->
- `datasets` version: datasets-1.6.2
- Platform: Linux
- Python version: 3.7
- PyArrow version: 0.17.1, also 2.0.0
> η±δΊζ们使η¨ζ΅ζ ΌεΌοΌε ζ€ζ¨ιθ¦δ½Ώη¨`open_stream`οΌ
>
> ```python
> import pyarrow as pa
>
> def in_memory_arrow_table_from_file(filename: str) -> pa.Table:
> in_memory_stream = pa.input_stream(filename)
> opened_stream = pa.ipc.open_stream(in_memory_stream)
> pa_table = opened_stream.read_all()
> return pa_table
>
> def memory_mapped_arrow_table_from_file(filename: str) -> pa.Table:
> memory_mapped_stream = pa.memory_map(filename)
> opened_stream = pa.ipc.open_stream(memory_mapped_stream)
> pa_table = opened_stream.read_all()
> return pa_table
> ```
Thank you very much for providing the code that can read arrow file to pa_table and finally to dict, but how to implement the reverse process, how to restore a dict to arrow file?
| [
-0.18661484122276306,
0.15257155895233154,
-0.04614218324422836,
0.40615588426589966,
0.19235862791538239,
0.23081019520759583,
-0.04866480454802513,
0.5946781635284424,
-0.5452988147735596,
-0.10046908259391785,
-0.3435958921909332,
0.6925766468048096,
-0.06452377140522003,
-0.773205578327179,
0.09775227308273315,
0.2465709000825882,
0.19324351847171783,
0.10469891875982285,
-0.09870633482933044,
-0.05819856375455856,
-0.1524292528629303,
0.1990029215812683,
-0.050515975803136826,
0.31601446866989136,
-0.29934796690940857,
-0.07935810834169388,
0.09042864292860031,
0.20262235403060913,
0.027290668338537216,
-0.3136554956436157,
0.2710490822792053,
-0.1303117424249649,
0.0702725276350975,
0.1741616129875183,
-0.00011440030357334763,
0.21896018087863922,
0.2653536796569824,
-0.08626876026391983,
-0.25309184193611145,
0.06442991644144058,
0.2905086576938629,
-0.015062933787703514,
0.18350766599178314,
-0.3832707107067108,
0.21909111738204956,
-0.4800473749637604,
0.040282923728227615,
-0.19021809101104736,
0.46895313262939453,
0.5414703488349915,
0.2038576900959015,
0.10851617157459259,
0.27804386615753174,
0.09135781228542328,
0.6951140761375427,
0.08912967145442963,
-0.17717809975147247,
0.6311328411102295,
-0.11762496829032898,
-0.2035530060529709,
-0.275583416223526,
-0.018638495355844498,
-0.2696399688720703,
-0.006352018564939499,
-0.03758323937654495,
0.17851383984088898,
-0.07310117036104202,
-0.23452633619308472,
-0.06743010133504868,
-0.012694112956523895,
0.25035619735717773,
-0.6067675948143005,
-0.33675333857536316,
-0.023679260164499283,
0.08567501604557037,
-0.14172282814979553,
0.2206667959690094,
0.25442415475845337,
-0.20741084218025208,
0.26003333926200867,
0.4098328948020935,
0.15035584568977356,
-0.35089734196662903,
0.1526966691017151,
0.23024240136146545,
-0.35021692514419556,
-0.14310675859451294,
0.07102137058973312,
0.20159335434436798,
0.16831137239933014,
0.46608492732048035,
0.053976744413375854,
-0.2046511471271515,
-0.004761192947626114,
-0.07713446021080017,
0.15850986540317535,
0.000630110502243042,
-0.0262906476855278,
0.2070077657699585,
0.23745842278003693,
0.40567371249198914,
0.04138615354895592,
0.01868901029229164,
0.27464622259140015,
-0.24993392825126648,
-0.18033170700073242,
-0.08789955824613571,
-0.17959903180599213,
0.43132805824279785,
0.0586414560675621,
-0.12842734158039093,
-0.1054609939455986,
0.0675068348646164,
-0.19762416183948517,
0.43058812618255615,
-0.224115788936615,
0.4429090619087219,
-0.1755407154560089,
-0.4392220079898834,
0.11481687426567078,
-0.15963435173034668,
0.0996018499135971,
-0.09886455535888672,
0.3002336323261261,
0.08321712166070938,
-0.13940805196762085,
0.2047591656446457,
0.3598300814628601,
-0.15953226387500763,
-0.30549588799476624,
-0.08751106262207031,
-0.054966021329164505,
0.0572064183652401,
0.10201619565486908,
0.18229509890079498,
-0.16534395515918732,
0.20808090269565582,
0.16109684109687805,
-0.04869157820940018,
0.025770217180252075,
0.006618835031986237,
-0.4173828661441803,
0.048811621963977814,
0.1883629858493805,
0.14164234697818756,
0.17307056486606598,
0.09462741762399673,
-0.2095208466053009,
-0.08300335705280304,
0.1762615144252777,
-0.15707480907440186,
-0.0638015940785408,
-0.23546721041202545,
0.1561933159828186,
0.02788066491484642,
0.045909833163022995,
-0.6367968916893005,
-0.056692760437726974,
0.10873991250991821,
-0.332296222448349,
0.0983356460928917,
-0.18732517957687378,
0.17046155035495758,
-0.5269699096679688,
0.25707516074180603,
0.20846980810165405,
-0.445108562707901,
0.3488065302371979,
-0.1657608300447464,
-0.18161579966545105,
0.14708054065704346,
0.21073231101036072,
-0.17044876515865326,
0.03464430570602417,
-0.32456323504447937,
0.35562026500701904,
0.6451489329338074,
-0.17554377019405365,
-0.5562057495117188,
-0.01766037940979004,
0.001733735203742981,
-0.0841120034456253,
0.10694819688796997,
0.0783640444278717,
0.13291625678539276,
-0.019013311713933945,
0.08987852185964584,
0.13882139325141907,
0.18388351798057556,
-0.06662648916244507,
-0.4416181445121765,
-0.01378433033823967,
-0.10950542986392975,
0.030073825269937515,
-0.30858007073402405,
-0.2554307281970978,
0.47915229201316833,
-0.37835487723350525,
0.3949929177761078,
-0.010591674596071243,
0.21712741255760193,
0.24931125342845917,
0.3057436943054199,
-0.035352498292922974,
-0.0578233078122139,
-0.16888520121574402,
-0.35484257340431213,
0.03632707893848419,
-0.005938895046710968,
-0.3177788555622101,
-0.32124143838882446,
-0.34255921840667725,
-0.013833125121891499,
0.12984830141067505,
-0.18297690153121948,
0.029044970870018005,
0.1389906108379364,
-0.028958536684513092,
0.13640396296977997,
0.43153688311576843,
-0.08082392811775208,
-0.09528626501560211,
-0.21975493431091309,
0.1931687444448471,
0.07973697781562805,
0.3772667348384857,
-0.1863555610179901,
-0.4327123463153839,
0.03777799755334854,
0.04820200800895691,
-0.02202015370130539,
0.010086970403790474,
-0.1593683958053589,
0.41760140657424927,
-0.07149820029735565,
-0.0449286550283432,
0.02936616539955139,
-0.004714414477348328,
-0.0070232003927230835,
-0.45973461866378784,
0.038571521639823914,
0.21767912805080414,
0.25443795323371887,
0.11886090785264969,
-0.08273028582334518,
0.40401697158813477,
0.23858563601970673,
-0.05548859387636185,
-0.0444159135222435,
-0.09732934832572937,
0.2611963152885437,
0.14310385286808014,
0.09580109268426895,
0.0883491188287735,
-0.01573200151324272,
0.11937683820724487,
0.4116716980934143,
-0.19198857247829437,
-0.26957327127456665,
0.12140641361474991,
0.4746549129486084,
0.07623988389968872,
0.2291671633720398,
0.15548959374427795,
-0.42530304193496704,
-0.06893934309482574,
0.21014349162578583,
0.12688560783863068,
0.39127933979034424,
0.21128727495670319,
0.1281631737947464,
-0.1431889832019806,
-0.3511466085910797,
-0.2126942276954651,
0.12170873582363129,
0.15833577513694763,
0.3289993107318878,
0.2609272003173828,
0.31225481629371643,
-0.012546743266284466,
-0.48840251564979553,
-0.17826338112354279,
-0.048066578805446625,
0.081596240401268,
-0.2149907946586609,
0.2362605184316635,
-0.24217097461223602,
-0.374747097492218,
-0.22793832421302795,
-0.07687079906463623,
-0.11253567039966583,
-0.2709581255912781,
-0.0383724570274353,
0.5609807372093201,
-0.0007101483643054962,
-0.10040294378995895,
-0.1077786237001419,
-0.059794679284095764,
0.1982736587524414,
-0.152913436293602,
-0.3903645873069763,
0.07490600645542145,
-0.4934206008911133,
0.04923858866095543,
0.3906267285346985,
-0.07227008789777756,
0.36574968695640564,
0.1551232784986496,
0.13270825147628784,
-0.48867523670196533,
-0.018585968762636185,
-0.11234128475189209,
-0.23191426694393158,
0.4292868971824646,
-0.33375054597854614,
0.08212116360664368,
-0.24512378871440887,
-0.11551349610090256,
0.19578304886817932,
-0.006013659760355949,
-0.251071959733963,
0.12296618521213531,
0.045650411397218704,
0.03146278113126755,
-0.03560194745659828,
-0.19952327013015747,
-0.13018164038658142,
-0.37701350450515747,
0.28666815161705017,
-0.01712612248957157,
0.09477400034666061,
-0.02506229281425476,
0.22987456619739532,
0.5105900168418884,
0.06846726685762405,
0.16690047085285187,
0.026827502995729446,
-0.055665869265794754,
0.6705484986305237,
-0.15761511027812958,
-0.3799996078014374,
0.15877436101436615,
-0.0741150826215744,
0.11393368244171143,
0.06926437467336655,
-0.5173836946487427,
-0.28423649072647095,
-0.0405815914273262,
0.5843122601509094,
-0.14946436882019043,
-0.04939482361078262,
0.1827719509601593,
0.05106199160218239,
-0.08951997011899948,
-0.06376879662275314,
0.018623720854520798,
-0.12314989417791367,
-0.043377429246902466,
0.07007408142089844,
-0.12200505286455154,
0.3561452627182007,
-0.0141768679022789,
0.5729794502258301,
0.09291428327560425,
0.1088574230670929,
0.5261644124984741,
-0.3167704641819,
0.31369948387145996,
-0.1538950800895691,
-0.10532964020967484,
-0.3805769383907318,
-0.3174837529659271,
0.06457646191120148,
-0.030609697103500366,
0.013554224744439125,
-0.14140872657299042,
0.13672217726707458,
-0.00850595347583294,
-0.4264677166938782,
-0.3318188786506653,
0.16442765295505524,
-0.12754018604755402,
-0.12186100333929062,
-0.03169407323002815,
0.09902223199605942,
0.28756749629974365,
-0.22263920307159424,
0.14079807698726654,
0.32670754194259644,
0.1187780499458313,
0.09846491366624832,
0.09430237114429474,
-0.16657207906246185,
-0.30449342727661133,
0.2496977001428604,
-0.07195653766393661,
0.12607024610042572,
0.08940224349498749,
-0.14694339036941528,
0.3016495704650879,
-0.15863683819770813,
0.48949116468429565,
0.2101968377828598,
0.028169363737106323,
0.2617157995700836,
0.2466527223587036,
-0.5689225196838379,
-0.09585043787956238,
-0.03749890998005867,
-0.013499988242983818,
-0.10332855582237244,
0.21867474913597107,
-0.038392357528209686,
-0.010242655873298645,
-0.13401155173778534,
0.2492733746767044,
-0.05815666541457176,
0.1911943405866623,
-0.22156788408756256,
-0.332191526889801,
-0.28463417291641235,
-0.012468777596950531,
0.15167169272899628,
0.06365068256855011,
-0.2299327701330185,
-0.1716354787349701,
-0.19976778328418732,
-0.22162634134292603,
0.02632090449333191,
0.13949143886566162,
0.41408461332321167,
-0.2725594937801361,
0.11464463174343109,
-0.12709522247314453,
-0.00018955394625663757,
0.5348801016807556,
0.4804261028766632,
0.18639153242111206,
-0.4507361650466919,
-0.12782108783721924,
-0.12233401089906693,
0.0454380065202713,
0.057155631482601166,
-0.3112238943576813,
0.045474760234355927,
-0.288263201713562,
-0.17564235627651215,
0.052329421043395996,
0.04475542902946472,
0.24631336331367493,
-0.29569482803344727,
-0.07189911603927612,
-0.04062633216381073,
0.6873977780342102,
0.16790588200092316,
0.035755157470703125,
0.31396055221557617,
0.25665605068206787,
-0.16302761435508728,
0.48996400833129883,
0.2193676233291626,
0.7394723892211914,
0.010112930089235306,
0.445483535528183,
0.5622783303260803,
-0.23239688575267792,
-0.02473021298646927,
-0.17684076726436615,
0.18418046832084656,
-0.3589995801448822,
-0.08307499438524246,
-0.012689433991909027,
-0.01463555172085762,
-0.08323625475168228,
0.005573108792304993,
0.022488165646791458,
-0.10654713213443756,
0.07385478913784027,
-0.02678338810801506,
-0.028777891770005226,
-0.14855073392391205,
-0.1798587143421173,
-0.039011161774396896,
-0.1592559814453125,
0.12960277497768402,
0.033468566834926605,
-0.12309154868125916,
0.17254438996315002,
-0.30208802223205566,
-0.5528616309165955,
-0.04198118671774864,
-0.13372661173343658,
0.12235719710588455,
-0.3403112590312958,
0.4155689477920532,
-0.18300381302833557,
-0.5552809834480286,
-0.12890130281448364,
0.29180029034614563,
-0.22784055769443512,
-0.17927132546901703,
-0.08501582592725754,
-0.14279408752918243,
0.291256844997406,
-0.06865360587835312,
-0.13434605300426483,
-0.2600663900375366,
0.32269129157066345,
-0.02095092460513115,
0.08288796991109848,
0.1791669726371765,
-0.02061518281698227,
-0.244288370013237,
0.18465924263000488,
0.20772704482078552,
0.22722205519676208,
-0.11614708602428436,
-0.09229785203933716,
-0.40466251969337463,
-0.3205268979072571,
-0.27674204111099243,
0.127792090177536,
0.03484571352601051,
0.1231883242726326,
-0.00025597959756851196,
-0.09303690493106842,
-0.11790469288825989,
0.08635303378105164,
0.5077247023582458,
-0.11273951083421707,
0.1448272317647934,
0.33518487215042114,
-0.2039383053779602,
-0.23122236132621765,
-0.20237353444099426,
0.31041401624679565,
0.07039983570575714,
-0.709477961063385,
0.3024159073829651,
-0.04038742557168007,
0.3022174835205078,
-0.1856807917356491,
-0.13227719068527222,
0.1991383582353592,
-0.21675124764442444,
-0.20560111105442047,
-0.3439374566078186,
-0.32981693744659424,
0.310031920671463,
0.09338350594043732,
0.02224711887538433,
0.17453062534332275,
-0.1838158816099167,
0.10984659194946289,
-0.20765863358974457,
-0.24227309226989746,
0.2198411077260971,
0.1666291207075119,
-0.044351160526275635,
-0.01645204797387123,
0.10669124126434326,
0.16091962158679962,
0.06460292637348175,
0.13147804141044617,
0.3004527688026428,
0.02054433524608612,
-0.22920560836791992,
-0.028033092617988586,
0.12774980068206787,
0.05957124009728432,
-0.035981014370918274,
-0.07765471190214157,
-0.3319709300994873,
0.03580110892653465,
-0.10856067389249802,
-0.12402498722076416,
-0.12619677186012268,
-0.03142130374908447,
-0.03577639162540436,
0.49920669198036194,
0.2681773006916046,
-0.01236850954592228,
0.012842971831560135,
-0.22504770755767822,
0.11654894053936005,
-0.08317892253398895,
0.08372996747493744,
-0.12379025667905807,
-0.07387473434209824,
-0.4293321371078491,
-0.09854867309331894,
-0.16328676044940948,
-0.03136975318193436,
0.223974347114563,
-0.23659493029117584,
-0.2553633451461792,
0.04024272784590721,
0.18886949121952057,
0.416922390460968,
-0.18274298310279846,
-0.16081325709819794,
0.3382181227207184,
0.15387962758541107,
-0.09260468930006027,
-0.06917548179626465,
0.00038543902337551117,
-0.2018701583147049,
-0.08999267220497131,
-0.025031812489032745,
-0.07021896541118622,
-0.0006269142031669617,
-0.17782743275165558,
-0.054480232298374176,
0.05173158273100853,
-0.1489526927471161,
-0.03917649760842323,
0.30851924419403076,
0.1625950187444687,
0.1386633813381195,
0.27559590339660645,
-0.01832517981529236,
0.3706852197647095,
0.6045922040939331,
-0.08981671184301376,
0.2276802808046341,
0.17748472094535828,
-0.1938755214214325,
-0.11654848605394363,
-0.2227168083190918,
-0.25591862201690674,
-0.23112666606903076,
0.006471037864685059,
0.15527459979057312,
0.11722910404205322,
0.6049050092697144,
0.1669054925441742,
-0.09580355882644653,
0.08774489909410477,
0.1311429738998413,
-0.12829554080963135,
0.12012860178947449,
0.08431971073150635,
-0.027134999632835388,
0.14780327677726746,
0.028352852910757065,
-0.2600918412208557,
-0.21501441299915314,
0.13650110363960266,
0.29359957575798035,
-0.13681749999523163,
0.016012093052268028,
0.20808425545692444,
0.2732904553413391,
0.16279907524585724,
-0.09199599176645279,
0.03147212043404579,
0.2538950443267822,
0.005933739244937897,
-0.24462157487869263,
-0.01505892165005207,
0.471159428358078,
0.10174141824245453,
-0.07596014440059662,
0.08621389418840408,
-0.04610741510987282,
-0.061618074774742126,
-0.08684586733579636,
0.12925197184085846,
0.23200513422489166,
0.24570851027965546,
0.3072906732559204,
0.17817549407482147,
-0.11885809153318405,
-0.03987434133887291,
-0.042928751558065414,
0.15975594520568848,
-0.024573544040322304,
0.19980767369270325,
-0.2618631422519684,
-0.4466494023799896,
-0.17391367256641388,
-0.22212859988212585,
-0.05198989436030388,
0.1350775510072708,
0.367154598236084,
-0.00998544692993164,
-0.004262011498212814,
-0.000131264328956604,
0.07468394935131073,
-0.04094339534640312,
0.23500992357730865,
0.3949988782405853,
0.10200117528438568,
-0.2165052443742752,
-0.10255996137857437,
-0.5076594948768616,
0.19199776649475098,
-0.11324669420719147,
0.07040906697511673,
-0.04612549766898155,
0.2566138505935669,
-0.016483932733535767,
0.06668920069932938,
0.18847066164016724,
-0.2011054903268814,
0.235772043466568,
0.5140233039855957,
-0.2695576846599579,
-0.11648133397102356,
-0.004997469484806061,
-0.10492187738418579,
-0.058596931397914886,
-0.41877204179763794,
0.2436503767967224,
-0.08204767853021622,
0.11442137509584427,
-0.12791432440280914,
-0.10854974389076233,
0.1153620034456253,
0.31815028190612793,
0.6403942108154297,
-0.126474067568779,
0.1955150067806244,
-0.0918792337179184,
-0.044693998992443085,
-0.2799484133720398,
0.04681716859340668,
-0.04585486277937889,
0.20528197288513184,
-0.001988481730222702,
0.46262750029563904,
-0.031247932463884354,
-0.2579992115497589,
-0.17676272988319397,
0.24745051562786102,
-0.07240143418312073,
-0.004923331085592508,
-0.0821608453989029,
0.10988838225603104,
-0.09995405375957489,
0.13573820888996124,
-0.05337195843458176,
0.010267890989780426,
0.013081014156341553,
0.2544326186180115,
-0.4985608458518982,
-0.6068084239959717,
0.3688051402568817,
-0.32496893405914307,
-0.015904581174254417,
0.3129459619522095,
0.4825957715511322,
0.25995177030563354,
0.06831026077270508,
-0.392840176820755,
-0.18523037433624268,
0.5034059286117554,
-0.1879899799823761,
-0.2534482777118683,
0.2999733090400696,
-0.041271667927503586,
0.17650020122528076,
-0.03434355929493904,
0.5070629715919495,
-0.005799081176519394,
-0.2011038362979889,
0.08244986832141876,
-0.46951842308044434
] |
https://github.com/huggingface/datasets/issues/2373 | Loading dataset from local path | Version below works, checked again in the docs, and data_files should be a path.
```
ds = datasets.load_dataset('my_script.py',
data_files='/data/dir/corpus.txt',
cache_dir='.')
``` | I'm trying to load a local dataset with the code below
```
ds = datasets.load_dataset('my_script.py',
data_files='corpus.txt',
data_dir='/data/dir',
cache_dir='.')
```
But internally a BuilderConfig is created, which tries to use getmtime on the data_files string, without using data_dir. Is this a bug or am I not using the load_dataset correctly?
https://github.com/huggingface/datasets/blob/bc61954083f74e6460688202e9f77dde2475319c/src/datasets/builder.py#L153 | 21 | Loading dataset from local path
I'm trying to load a local dataset with the code below
```
ds = datasets.load_dataset('my_script.py',
data_files='corpus.txt',
data_dir='/data/dir',
cache_dir='.')
```
But internally a BuilderConfig is created, which tries to use getmtime on the data_files string, without using data_dir. Is this a bug or am I not using the load_dataset correctly?
https://github.com/huggingface/datasets/blob/bc61954083f74e6460688202e9f77dde2475319c/src/datasets/builder.py#L153
Version below works, checked again in the docs, and data_files should be a path.
```
ds = datasets.load_dataset('my_script.py',
data_files='/data/dir/corpus.txt',
cache_dir='.')
``` | [
-0.36348965764045715,
0.22408539056777954,
0.05344425514340401,
0.4514973759651184,
0.14152982831001282,
-0.12070658802986145,
0.49879688024520874,
0.06493666768074036,
0.1139446496963501,
0.12790338695049286,
0.16706222295761108,
0.11647893488407135,
-0.000026462599635124207,
0.16189716756343842,
0.2033517211675644,
0.22347630560398102,
-0.0005673244595527649,
0.07684357464313507,
-0.15611180663108826,
-0.06864511966705322,
-0.23243126273155212,
0.11964771151542664,
-0.015647143125534058,
0.18718093633651733,
-0.3966725468635559,
0.316148042678833,
0.004132913425564766,
0.6595543622970581,
0.0201509241014719,
-0.15945401787757874,
0.46352535486221313,
-0.019413813948631287,
0.26264095306396484,
0.6896225214004517,
-0.0001233973598573357,
0.31950563192367554,
0.4197114109992981,
-0.13705435395240784,
-0.44519293308258057,
-0.3630017638206482,
-0.3213690519332886,
-0.12058471888303757,
0.27304720878601074,
-0.11777178943157196,
-0.31393033266067505,
0.16846077144145966,
0.12964291870594025,
-0.4796310067176819,
0.12510555982589722,
0.35126248002052307,
0.08643336594104767,
0.19551785290241241,
-0.4008839726448059,
-0.00748834665864706,
0.08753056824207306,
0.4546239376068115,
0.003939947113394737,
0.28681397438049316,
0.2027198076248169,
-0.05095604807138443,
0.04030994325876236,
-0.1094476580619812,
-0.11455193907022476,
0.16706670820713043,
0.7290751338005066,
0.20446953177452087,
0.24629569053649902,
0.1195373460650444,
0.12717962265014648,
0.20976713299751282,
0.8114510774612427,
-0.21892666816711426,
-0.35673126578330994,
-0.34758779406547546,
-0.29597994685173035,
-0.13218945264816284,
0.2913793623447418,
0.19590076804161072,
-0.32830923795700073,
0.15502725541591644,
-0.2826426923274994,
-0.17591078579425812,
-0.0385543517768383,
0.3217870593070984,
0.021644607186317444,
0.2445598691701889,
-0.13236214220523834,
0.23209866881370544,
-0.1640595644712448,
0.09899408370256424,
0.3219020664691925,
-0.39727866649627686,
-0.025057058781385422,
0.23577697575092316,
0.19882173836231232,
0.345713347196579,
0.04927688091993332,
0.41591182351112366,
-0.04021589830517769,
0.018808532506227493,
-0.04867824912071228,
0.031959403306245804,
-0.059486567974090576,
0.13285912573337555,
0.42875564098358154,
0.04504120722413063,
0.16612926125526428,
0.14579665660858154,
0.1568097174167633,
0.015914514660835266,
-0.1326693296432495,
-0.11070840805768967,
-0.097972571849823,
-0.45746082067489624,
-0.10042877495288849,
-0.19337156414985657,
0.22956500947475433,
-0.14939665794372559,
0.04645062983036041,
-0.27240321040153503,
0.2526026666164398,
-0.08674921840429306,
0.3000946342945099,
0.38816699385643005,
-0.16468733549118042,
-0.13380995392799377,
-0.0842714011669159,
0.22511181235313416,
-0.1790880411863327,
0.048314958810806274,
-0.35832732915878296,
-0.26507073640823364,
-0.2043488472700119,
0.02765604667365551,
-0.04733360558748245,
-0.24384289979934692,
0.2838289141654968,
-0.05133448913693428,
0.15490186214447021,
-0.1537652462720871,
-0.19941754639148712,
0.13641595840454102,
0.1271742284297943,
0.3635900020599365,
-0.2581697702407837,
0.1701277792453766,
0.2217475324869156,
-0.36675411462783813,
-0.2471635341644287,
0.29832491278648376,
-0.30655747652053833,
-0.5425297021865845,
0.014951998367905617,
0.055900078266859055,
-0.21243874728679657,
0.0018622875213623047,
-0.06381487101316452,
-0.14495763182640076,
0.4413242042064667,
0.011179961264133453,
-0.1396733522415161,
-0.029744155704975128,
-0.5766785144805908,
-0.06877034157514572,
0.29720067977905273,
0.626958429813385,
-0.474459707736969,
-0.22997918725013733,
-0.03549448028206825,
-0.1582820564508438,
0.12617464363574982,
0.09543660283088684,
-0.5179560780525208,
0.5660903453826904,
-0.2751980721950531,
-0.26632124185562134,
0.5033835768699646,
-0.44921666383743286,
-0.10948043316602707,
0.572726845741272,
-0.24677422642707825,
-0.14744122326374054,
0.03934616595506668,
0.16607438027858734,
-0.18551121652126312,
-0.11981658637523651,
0.29403337836265564,
0.4177989959716797,
-0.04290377348661423,
0.10911350697278976,
-0.09202063083648682,
-0.11668707430362701,
0.17993395030498505,
0.11572660505771637,
-0.020852889865636826,
0.2262749969959259,
0.15642216801643372,
-0.11436924338340759,
0.16038385033607483,
-0.020293492823839188,
0.09399845451116562,
0.21067401766777039,
-0.25375238060951233,
0.06582900881767273,
0.12784355878829956,
0.15467354655265808,
-0.5286964178085327,
0.3985966444015503,
-0.04807658493518829,
-0.15693338215351105,
0.06955482065677643,
-0.0701722800731659,
-0.1584971845149994,
0.1753198653459549,
-0.4332985579967499,
0.07155010104179382,
-0.11696594208478928,
0.29413580894470215,
-0.01041669026017189,
-0.18620385229587555,
-0.26255589723587036,
0.09079709649085999,
-0.08276158571243286,
0.10091640800237656,
-0.2276255488395691,
-0.003243502229452133,
0.07230769097805023,
-0.013983027078211308,
-0.2208838313817978,
0.13989852368831635,
0.04649744927883148,
-0.15806971490383148,
-0.13677486777305603,
0.3328721821308136,
0.11752945929765701,
0.43916410207748413,
-0.1691032350063324,
0.07237978279590607,
0.08578549325466156,
0.26358893513679504,
0.15446823835372925,
0.05649254843592644,
0.10032730549573898,
-0.19379177689552307,
-0.12972086668014526,
0.2046453058719635,
-0.1600630134344101,
0.39117440581321716,
-0.0227395910769701,
-0.09614446759223938,
0.17777733504772186,
0.04372808709740639,
-0.16708557307720184,
-0.053598128259181976,
-0.006444152444601059,
0.06018650531768799,
0.4769275188446045,
0.2809218764305115,
-0.1788143813610077,
0.029252976179122925,
0.061593443155288696,
-0.022473551332950592,
-0.07841382175683975,
0.04491322487592697,
-0.16925689578056335,
-0.11533137410879135,
-0.07131866365671158,
0.07335850596427917,
0.30550438165664673,
0.04558687284588814,
0.18433497846126556,
0.01997455395758152,
0.07140108197927475,
-0.3972019851207733,
0.15884457528591156,
0.09648964554071426,
0.0015544791240245104,
0.10229545831680298,
-0.2346717119216919,
-0.2873324751853943,
-0.19572857022285461,
0.20771847665309906,
0.08727407455444336,
-0.0018093828111886978,
-0.5557535886764526,
0.29861828684806824,
-0.337338387966156,
-0.2322007417678833,
-0.3124394118785858,
-0.542455792427063,
-0.1791621744632721,
-0.1586725115776062,
-0.16135022044181824,
0.11121851205825806,
-0.03872961550951004,
-0.018735790625214577,
-0.0045745279639959335,
0.17167970538139343,
-0.02362947352230549,
-0.6744973659515381,
-0.12747925519943237,
-0.26609882712364197,
-0.3435395061969757,
-0.1125141978263855,
0.4159901738166809,
0.08572053909301758,
-0.035380586981773376,
-0.35244157910346985,
-0.05736362561583519,
-0.14744701981544495,
0.21983188390731812,
0.3596019744873047,
0.09329155832529068,
0.7534445524215698,
0.18832653760910034,
0.02021031081676483,
0.23763920366764069,
0.08742859214544296,
0.29513606429100037,
0.1826605498790741,
0.01835678704082966,
-0.0442107655107975,
0.036641404032707214,
-0.08592498302459717,
-0.3417373597621918,
-0.04147081822156906,
-0.20507584512233734,
-0.18075917661190033,
0.13919693231582642,
0.2741290032863617,
0.15450146794319153,
0.6428113579750061,
0.15566039085388184,
0.08049776405096054,
-0.1419399529695511,
0.19031313061714172,
-0.12236285954713821,
-0.8258020281791687,
0.08878107368946075,
-0.1459876000881195,
-0.2825872302055359,
-0.11993255466222763,
-0.036819785833358765,
0.17500482499599457,
-0.12008671462535858,
-0.3841399550437927,
0.01650199666619301,
0.038910623639822006,
0.19341826438903809,
0.3129934072494507,
-0.02687537856400013,
0.1477227807044983,
-0.16650280356407166,
0.1391681432723999,
-0.11518830060958862,
-0.22017647325992584,
0.3047439455986023,
-0.04637669026851654,
0.068113774061203,
0.39824697375297546,
0.27017566561698914,
-0.3490624725818634,
0.6581438183784485,
-0.04194723442196846,
-0.1354842633008957,
0.26875239610671997,
-0.3474254310131073,
0.5696567893028259,
-0.36771923303604126,
-0.19214613735675812,
0.12787461280822754,
0.2734453082084656,
-0.563301146030426,
0.35236021876335144,
0.3173479735851288,
0.04214489459991455,
-0.278006911277771,
-0.14253972470760345,
-0.009334325790405273,
-0.26351526379585266,
-0.0356825515627861,
-0.03577406704425812,
-0.08396158367395401,
0.2509803771972656,
0.2607080936431885,
-0.1420857012271881,
-0.12884080410003662,
-0.05280334874987602,
0.5240065455436707,
0.1827685534954071,
0.07125584036111832,
-0.03315537050366402,
0.05387814715504646,
-0.36078500747680664,
0.09303222596645355,
-0.0018486058106645942,
0.07119497656822205,
-0.02947850525379181,
-0.07477767765522003,
0.1303325742483139,
0.007590007036924362,
0.5740775465965271,
-0.0426572784781456,
0.27000516653060913,
0.19737787544727325,
-0.14769330620765686,
-0.49563902616500854,
-0.005018133670091629,
0.32443177700042725,
0.35472190380096436,
-0.21192513406276703,
0.5544858574867249,
0.02480340749025345,
-0.3523009121417999,
-0.1425226777791977,
0.2888287901878357,
-0.3024057447910309,
-0.27552491426467896,
-0.2828810214996338,
-0.09085868299007416,
-0.1693258285522461,
-0.13591739535331726,
-0.26444271206855774,
0.16047236323356628,
0.31734561920166016,
-0.05426197871565819,
0.019996402785182,
0.27405059337615967,
-0.101223424077034,
-0.24052181839942932,
0.26035383343696594,
-0.051235031336545944,
0.1918950080871582,
0.3695371150970459,
0.27246546745300293,
0.13307414948940277,
0.48917797207832336,
-0.15258729457855225,
0.05896734073758125,
0.10667777061462402,
-0.11384303122758865,
0.2623555064201355,
0.35422658920288086,
-0.2661116421222687,
-0.28500446677207947,
0.43558791279792786,
-0.07140886783599854,
-0.4431215524673462,
0.1451997309923172,
0.0650886818766594,
-0.05850336328148842,
-0.012494442984461784,
-0.7041832208633423,
0.3211219310760498,
-0.028769172728061676,
-0.09167145192623138,
0.34145572781562805,
-0.27610522508621216,
-0.36768457293510437,
0.036656565964221954,
0.051457297056913376,
0.5803362727165222,
-0.11092856526374817,
0.3393073081970215,
0.49122387170791626,
0.10376878082752228,
-0.12056176364421844,
-0.019809914752840996,
-0.11634872853755951,
-0.35020366311073303,
0.07329950481653214,
-0.07539404928684235,
-0.20701880753040314,
0.07149505615234375,
0.4098736047744751,
0.08383241295814514,
0.32902443408966064,
-0.21011492609977722,
0.494448721408844,
0.007387083489447832,
0.22721418738365173,
0.06015817075967789,
-0.35344138741493225,
-0.056569986045360565,
0.05227421969175339,
0.06426063179969788,
0.2843470573425293,
-0.17758363485336304,
0.0962948203086853,
0.04192022606730461,
-0.12118684500455856,
0.1079065203666687,
0.02365245670080185,
-0.1989728808403015,
0.03798939287662506,
0.16696922481060028,
-0.30384284257888794,
-0.3285152316093445,
0.35718998312950134,
0.18556338548660278,
-0.08420990407466888,
-0.2812749147415161,
0.19427527487277985,
-0.14520514011383057,
0.10373962670564651,
-0.16156162321567535,
-0.058767493814229965,
0.15013539791107178,
-0.03641166165471077,
0.00874781608581543,
-0.3542819619178772,
-0.3601643443107605,
-0.3469100594520569,
0.2884584963321686,
0.04095018282532692,
0.09744694828987122,
-0.16047073900699615,
-0.3576008975505829,
0.015593990683555603,
0.31569015979766846,
-0.00221937894821167,
0.04402530938386917,
0.193398118019104,
-0.0006953708361834288,
0.049402303993701935,
-0.000018052756786346436,
-0.522116482257843,
-0.11392118036746979,
0.26398202776908875,
-0.05919487774372101,
0.13990233838558197,
0.48830685019493103,
0.1480216532945633,
-0.12671764194965363,
-0.09117495268583298,
0.28642407059669495,
0.28086403012275696,
-0.08196700364351273,
0.08186367154121399,
0.24992161989212036,
0.0719752162694931,
0.034453146159648895,
0.4461497366428375,
0.12572020292282104,
-0.12935477495193481,
-0.24813291430473328,
-0.36154183745384216,
-0.3472002148628235,
0.059997670352458954,
-0.15472622215747833,
0.13913072645664215,
0.20288759469985962,
-0.08087538182735443,
0.1917209029197693,
-0.29647862911224365,
-0.15241241455078125,
-0.050297386944293976,
0.07778315991163254,
0.06936903297901154,
0.2164885252714157,
0.2236097753047943,
0.3147006928920746,
-0.0005696238949894905,
-0.06753044575452805,
-0.3426746129989624,
-0.24850556254386902,
-0.09015380591154099,
-0.02613956853747368,
0.20687387883663177,
0.01222083531320095,
-0.06919228285551071,
0.05072946473956108,
-0.3420839309692383,
-0.3368498682975769,
-0.29216691851615906,
0.22890329360961914,
0.2773241102695465,
-0.09910307824611664,
-0.04582986980676651,
0.24318824708461761,
0.13267596065998077,
-0.06904656440019608,
0.1624128371477127,
-0.03831857442855835,
0.36690855026245117,
-0.0795847624540329,
0.12483027577400208,
-0.3500242233276367,
-0.0815616026520729,
0.1967010498046875,
0.21489372849464417,
0.049061670899391174,
0.16047346591949463,
0.30992591381073,
-0.46758103370666504,
0.18036076426506042,
0.1435188353061676,
0.4164131283760071,
0.20391246676445007,
-0.18850232660770416,
0.0596926286816597,
0.21569472551345825,
-0.012617712840437889,
-0.048964451998472214,
-0.1370919793844223,
0.10808214545249939,
0.03048378974199295,
-0.030682247132062912,
0.31733083724975586,
0.16856230795383453,
-0.08036983013153076,
-0.08990003168582916,
0.04712240397930145,
0.4480670392513275,
-0.07068807631731033,
-0.05075374245643616,
0.3608313798904419,
-0.1141715943813324,
0.3597216308116913,
0.27217352390289307,
0.34586289525032043,
0.11396025866270065,
0.5598073601722717,
-0.05265984684228897,
0.00002386420965194702,
0.20402008295059204,
0.1723182648420334,
-0.16342595219612122,
-0.5923697352409363,
0.3253556787967682,
0.23902791738510132,
-0.10987180471420288,
-0.16110306978225708,
-0.11570622026920319,
0.5343709588050842,
-0.2219633311033249,
0.25050103664398193,
-0.21629121899604797,
0.17097193002700806,
-0.10292746871709824,
-0.42510905861854553,
-0.30793920159339905,
-0.14122185111045837,
0.2282501459121704,
-0.01862451247870922,
-0.16146062314510345,
-0.06444931030273438,
-0.14944180846214294,
-0.16450665891170502,
0.1885358840227127,
0.06293357908725739,
0.31347909569740295,
-0.052845001220703125,
-0.47768181562423706,
-0.2475823611021042,
0.31054842472076416,
-0.20905135571956635,
0.1323188841342926,
0.32614946365356445,
0.016829580068588257,
0.28410646319389343,
0.3334078788757324,
0.04736429452896118,
-0.09627960622310638,
-0.07107032835483551,
-0.1093626394867897,
-0.3242410719394684,
0.17649222910404205,
-0.3072255253791809,
0.08207663893699646,
0.47048643231391907,
0.06942908465862274,
-0.06978760659694672,
0.08795353770256042,
0.15330088138580322,
0.324448823928833,
-0.22353409230709076,
0.31364956498146057,
0.12433278560638428,
-0.006872240453958511,
-0.07627149671316147,
0.17009888589382172,
-0.20686542987823486,
-0.06776659935712814,
0.6105201840400696,
0.07706167548894882,
0.31277143955230713,
-0.021563060581684113,
-0.013297779485583305,
-0.017982468008995056,
0.6097301244735718,
0.15469086170196533,
0.26494044065475464,
-0.2072945088148117,
0.008738994598388672,
-0.7007184624671936,
0.027111873030662537,
-0.09706750512123108,
0.3181783854961395,
0.15447458624839783,
0.11893731355667114,
0.10336168855428696,
0.052531130611896515,
0.04557313024997711,
-0.01273358054459095,
0.10660845786333084,
-0.1811344027519226,
0.21783538162708282,
-0.3707613945007324,
-0.25381922721862793,
0.19916792213916779,
0.060661859810352325,
-0.49848198890686035,
0.08056317269802094,
-0.3372355103492737,
-0.08701151609420776,
0.06404532492160797,
0.0036407187581062317,
0.20896361768245697,
-0.06510714441537857,
0.2528848648071289,
-0.10773105919361115,
0.13231270015239716,
0.061413317918777466,
0.06692488491535187,
-0.48297351598739624,
-0.20130248367786407,
-0.390919029712677,
0.09296856820583344,
-0.5008549094200134,
0.03836521506309509,
-0.6236849427223206,
0.11196987330913544,
-0.6095495223999023,
-0.039255715906620026,
0.13572512567043304,
-0.13873012363910675,
-0.04221720993518829,
-0.05550780147314072,
-0.41502299904823303,
0.18581978976726532,
0.17461565136909485,
0.011104825884103775,
-0.017715267837047577,
0.11925236880779266,
0.0035479888319969177,
-0.08098797500133514,
0.6704127788543701,
-0.276620090007782,
-0.23860369622707367,
-0.044081151485443115,
-0.07265697419643402,
0.030004628002643585,
-0.32328203320503235,
-0.22785663604736328,
0.16097047924995422,
0.40656164288520813,
-0.07125400006771088,
0.01534276083111763,
-0.2961616814136505,
-0.08069354295730591,
0.25294309854507446,
-0.12260162830352783,
0.12222225964069366,
0.016147781163454056,
-0.2187943011522293,
-0.22711680829524994,
-0.3131072521209717
] |
https://github.com/huggingface/datasets/issues/2350 | `FaissIndex.save` throws error on GPU | Just in case, this is a workaround that I use in my code and it seems to do the job.
```python
if use_gpu_index:
data["train"]._indexes["text_emb"].faiss_index = faiss.index_gpu_to_cpu(data["train"]._indexes["text_emb"].faiss_index)
``` | ## Describe the bug
After training an index with a factory string `OPQ16_128,IVF512,PQ32` on GPU, `.save_faiss_index` throws this error.
```
File "index_wikipedia.py", line 119, in <module>
data["train"].save_faiss_index("text_emb", index_save_path)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 470, in save_faiss_index
index.save(file)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 334, in save
faiss.write_index(index, str(file))
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/faiss/swigfaiss_avx2.py", line 5654, in write_index
return _swigfaiss.write_index(*args)
RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /root/miniconda3/conda-bld/faiss-pkg_1613235005464/work/faiss/impl/index_write.cpp:453: don't know how to serialize this type of index
```
## Steps to reproduce the bug
Any dataset will do, I just selected a familiar one.
```python
import numpy as np
import datasets
INDEX_STR = "OPQ16_128,IVF512,PQ32"
INDEX_SAVE_PATH = "will_not_save.faiss"
data = datasets.load_dataset("Fraser/news-category-dataset", split=f"train[:10000]")
def encode(item):
return {"text_emb": np.random.randn(768).astype(np.float32)}
data = data.map(encode)
data.add_faiss_index(column="text_emb", string_factory=INDEX_STR, train_size=10_000, device=0)
data.save_faiss_index("text_emb", INDEX_SAVE_PATH)
```
## Expected results
Saving the index
## Actual results
Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) ... don't know how to serialize this type of index
## Environment info
- `datasets` version: 1.6.2
- Platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyTorch version (GPU?): 1.8.1+cu111 (True)
- Tensorflow version (GPU?): 2.2.0 (False)
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No
I will be proposing a fix in a couple of minutes | 27 | `FaissIndex.save` throws error on GPU
## Describe the bug
After training an index with a factory string `OPQ16_128,IVF512,PQ32` on GPU, `.save_faiss_index` throws this error.
```
File "index_wikipedia.py", line 119, in <module>
data["train"].save_faiss_index("text_emb", index_save_path)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 470, in save_faiss_index
index.save(file)
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/datasets/search.py", line 334, in save
faiss.write_index(index, str(file))
File "/home/vlialin/miniconda3/envs/cat/lib/python3.8/site-packages/faiss/swigfaiss_avx2.py", line 5654, in write_index
return _swigfaiss.write_index(*args)
RuntimeError: Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) at /root/miniconda3/conda-bld/faiss-pkg_1613235005464/work/faiss/impl/index_write.cpp:453: don't know how to serialize this type of index
```
## Steps to reproduce the bug
Any dataset will do, I just selected a familiar one.
```python
import numpy as np
import datasets
INDEX_STR = "OPQ16_128,IVF512,PQ32"
INDEX_SAVE_PATH = "will_not_save.faiss"
data = datasets.load_dataset("Fraser/news-category-dataset", split=f"train[:10000]")
def encode(item):
return {"text_emb": np.random.randn(768).astype(np.float32)}
data = data.map(encode)
data.add_faiss_index(column="text_emb", string_factory=INDEX_STR, train_size=10_000, device=0)
data.save_faiss_index("text_emb", INDEX_SAVE_PATH)
```
## Expected results
Saving the index
## Actual results
Error in void faiss::write_index(const faiss::Index*, faiss::IOWriter*) ... don't know how to serialize this type of index
## Environment info
- `datasets` version: 1.6.2
- Platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.10
- Python version: 3.8.8
- PyTorch version (GPU?): 1.8.1+cu111 (True)
- Tensorflow version (GPU?): 2.2.0 (False)
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No
I will be proposing a fix in a couple of minutes
Just in case, this is a workaround that I use in my code and it seems to do the job.
```python
if use_gpu_index:
data["train"]._indexes["text_emb"].faiss_index = faiss.index_gpu_to_cpu(data["train"]._indexes["text_emb"].faiss_index)
``` | [
-0.11386916041374207,
0.2311161458492279,
0.049321647733449936,
0.2159426063299179,
0.35923755168914795,
0.1624380648136139,
0.5158483982086182,
0.509063720703125,
0.2508893609046936,
0.2249036431312561,
0.06692999601364136,
0.23696021735668182,
0.05093236640095711,
-0.06800352036952972,
-0.1380849927663803,
-0.03890709578990936,
0.2700772285461426,
0.26283973455429077,
0.1573566496372223,
-0.16931456327438354,
-0.4407011866569519,
0.011672824621200562,
-0.001744598150253296,
0.2576279938220978,
-0.24858354032039642,
-0.044677965342998505,
-0.09316109120845795,
0.016883622854948044,
-0.10027503222227097,
-0.4397270381450653,
0.06796091049909592,
-0.27872800827026367,
0.48366034030914307,
0.3083128333091736,
-0.00011195111437700689,
0.16159255802631378,
0.2866710424423218,
-0.17243655025959015,
-0.22634297609329224,
0.14830532670021057,
-0.06781984865665436,
0.1392589807510376,
0.03826804459095001,
-0.29125741124153137,
-0.17101633548736572,
-0.29875117540359497,
0.09409662336111069,
-0.27199339866638184,
-0.12360185384750366,
0.30526459217071533,
0.2272423356771469,
-0.19253575801849365,
0.3093000054359436,
-0.1131986677646637,
0.1893385648727417,
-0.020289696753025055,
-0.1342301219701767,
0.04981175810098648,
-0.39209407567977905,
0.341063916683197,
0.2851158082485199,
0.36607903242111206,
-0.012644489295780659,
-0.4190099835395813,
-0.2800433039665222,
0.17593415081501007,
0.601368248462677,
-0.2439565658569336,
0.11664705723524094,
-0.04168349504470825,
0.13410577178001404,
-0.288817435503006,
-0.3871854245662689,
0.18968915939331055,
0.24920491874217987,
-0.49399176239967346,
-0.047707244753837585,
0.06561966985464096,
0.04721163585782051,
0.28032177686691284,
0.5671787261962891,
-0.10802038758993149,
-0.1454773247241974,
-0.04824434220790863,
0.18102429807186127,
0.07697148621082306,
-0.04556996747851372,
0.20254525542259216,
-0.0905095636844635,
-0.28893744945526123,
-0.18790729343891144,
-0.0037429966032505035,
0.09842853993177414,
-0.05473896488547325,
-0.34312009811401367,
0.006289612501859665,
-0.1757073998451233,
-0.43424639105796814,
-0.0055383555591106415,
-0.006651733070611954,
-0.4312518239021301,
-0.008348152041435242,
0.27033600211143494,
0.11885242164134979,
-0.350114643573761,
0.16056311130523682,
0.009782284498214722,
-0.16193336248397827,
0.1525246500968933,
0.021843792870640755,
-0.21328312158584595,
-0.0922403559088707,
-0.11685100197792053,
0.12364930659532547,
-0.18911616504192352,
-0.07333283126354218,
0.21622665226459503,
-0.22175005078315735,
-0.5828651785850525,
0.37584084272384644,
-0.3595435619354248,
0.1377793252468109,
0.011137333698570728,
0.5140858888626099,
0.07913151383399963,
0.050104666501283646,
0.16527937352657318,
0.23398828506469727,
-0.11105465143918991,
-0.1419420689344406,
-0.21111202239990234,
-0.11084392666816711,
0.25962769985198975,
0.23572222888469696,
-0.16447997093200684,
-0.3422326147556305,
-0.002744817640632391,
0.06697516143321991,
-0.34034329652786255,
-0.02361995168030262,
0.10933463275432587,
-0.2806958556175232,
0.002856314182281494,
0.30313292145729065,
0.1009417474269867,
0.07515495270490646,
0.19129951298236847,
-0.3268488645553589,
-0.10660679638385773,
0.04020383954048157,
0.06743650883436203,
-0.14084862172603607,
-0.37249958515167236,
0.2187591791152954,
0.2860944867134094,
-0.19728389382362366,
0.6523481607437134,
0.07536163181066513,
0.3555600941181183,
0.1765325367450714,
0.09534559398889542,
-0.06761796027421951,
-0.0979849249124527,
-0.3917907476425171,
0.3624824583530426,
0.14306747913360596,
-0.18603360652923584,
-0.011312548071146011,
0.09574610739946365,
0.06627639383077621,
0.3802831768989563,
0.5683289170265198,
0.31603723764419556,
0.2390821874141693,
-0.21215172111988068,
0.420356810092926,
0.27264198660850525,
-0.37799933552742004,
-0.28028491139411926,
0.13307148218154907,
-0.13572928309440613,
-0.2128632366657257,
0.20117104053497314,
0.05915316939353943,
0.1582612544298172,
-0.058434780687093735,
0.4598638713359833,
0.11829718202352524,
0.06503206491470337,
-0.10885419696569443,
-0.49009355902671814,
-0.5541250705718994,
0.2036341279745102,
0.10985322296619415,
0.008476119488477707,
-0.1918824315071106,
-0.1755233108997345,
-0.5428341627120972,
0.2811937630176544,
-0.2432643473148346,
-0.07378549128770828,
0.024940110743045807,
0.7233155369758606,
0.1537608802318573,
0.24237950146198273,
-0.036604829132556915,
0.13837116956710815,
-0.06222335249185562,
-0.1854720115661621,
-0.02904430776834488,
-0.11470896005630493,
-0.23717620968818665,
-0.022327657788991928,
0.018374500796198845,
0.03650467097759247,
0.049405261874198914,
0.11411245167255402,
0.013147450983524323,
-0.1199360191822052,
0.34343239665031433,
-0.2094564586877823,
0.03981177136301994,
-0.3076534569263458,
0.06262179464101791,
-0.20816415548324585,
0.07222651690244675,
-0.3703281879425049,
-0.4066973924636841,
-0.14258655905723572,
0.17012128233909607,
0.34742820262908936,
-0.18631324172019958,
0.012518217787146568,
0.39880847930908203,
0.0344947949051857,
-0.15583352744579315,
0.10123033821582794,
0.026210233569145203,
-0.0489245280623436,
-0.25363489985466003,
0.030738849192857742,
0.5145238637924194,
0.18807920813560486,
0.14721980690956116,
-0.004877254366874695,
0.335509717464447,
0.19630584120750427,
-0.024238847196102142,
-0.08469703048467636,
0.13067816197872162,
0.4605294167995453,
-0.008766114711761475,
-0.03395861014723778,
-0.2989703416824341,
0.028429359197616577,
0.02683713100850582,
0.05559495463967323,
-0.041833773255348206,
-0.6681856513023376,
0.2340371012687683,
0.271889328956604,
0.0009311996400356293,
0.5030537247657776,
0.08905941247940063,
-0.3418864607810974,
0.054703809320926666,
-0.08956575393676758,
-0.5434661507606506,
0.23455382883548737,
0.13728299736976624,
-0.14673402905464172,
-0.12370283156633377,
-0.33535706996917725,
-0.17710383236408234,
0.416913777589798,
-0.2255946844816208,
0.0904390886425972,
0.10402899980545044,
0.10147152096033096,
0.059389546513557434,
-0.18809953331947327,
0.033748168498277664,
-0.1696741133928299,
0.01775635965168476,
-0.31703677773475647,
0.1562788486480713,
-0.13127116858959198,
0.013449706137180328,
-0.24442753195762634,
-0.18427538871765137,
-0.03216583654284477,
0.04431501030921936,
0.05388762801885605,
0.1305154711008072,
-0.11422207951545715,
0.28442472219467163,
-0.32029369473457336,
0.32815733551979065,
0.4209783375263214,
-0.12389696389436722,
-0.05179351568222046,
-0.01826212741434574,
-0.3266086280345917,
-0.039724454283714294,
0.060018718242645264,
-0.018972747027873993,
0.16229382157325745,
-0.08220222592353821,
-0.04531411826610565,
-0.21578656136989594,
-0.0934126004576683,
0.08351729810237885,
-0.14677788317203522,
0.38597869873046875,
-0.03449949622154236,
0.08701610565185547,
0.005154643207788467,
-0.034413810819387436,
0.10846955329179764,
0.04589930921792984,
-0.060474880039691925,
-0.0019144956022500992,
-0.17694956064224243,
0.031945616006851196,
-0.15693284571170807,
-0.2086741030216217,
-0.19142238795757294,
-0.23424483835697174,
0.28270959854125977,
-0.037362102419137955,
0.20859624445438385,
0.1510174572467804,
0.04117811471223831,
0.2148137390613556,
0.11204537749290466,
-0.08298475295305252,
-0.3446108102798462,
-0.11679966002702713,
0.3281378448009491,
-0.023373592644929886,
-0.48751363158226013,
0.08828352391719818,
0.06341885775327682,
-0.1923588514328003,
-0.0627998635172844,
-0.09271755814552307,
0.3474024832248688,
-0.038161247968673706,
0.08321423828601837,
-0.15458793938159943,
0.155523881316185,
0.29916298389434814,
-0.079735167324543,
-0.05006823688745499,
-0.12722893059253693,
-0.14830656349658966,
0.23766109347343445,
0.07840681076049805,
0.3545718789100647,
-0.20866450667381287,
0.3585050404071808,
-0.027799880132079124,
0.44869059324264526,
0.28963297605514526,
-0.34328311681747437,
0.2418363094329834,
-0.06333178281784058,
0.2357195019721985,
-0.051296643912792206,
-0.1933172345161438,
0.2188631147146225,
0.011307761073112488,
-0.24358457326889038,
0.12164012342691422,
-0.3592107892036438,
0.0010471697896718979,
0.2625236511230469,
0.13176178932189941,
-0.012519542127847672,
-0.2619677484035492,
0.1138250082731247,
-0.0019277073442935944,
0.3059885501861572,
-0.16390907764434814,
0.38125455379486084,
0.07672344148159027,
0.1408039927482605,
0.2754310667514801,
0.4634263515472412,
0.25282368063926697,
-0.07807569950819016,
0.16760516166687012,
-0.19338203966617584,
-0.3587155342102051,
0.2600283622741699,
0.007713114842772484,
0.7269444465637207,
-0.07580357789993286,
-0.1717393398284912,
0.21199476718902588,
-0.045222166925668716,
0.7033807039260864,
-0.18836677074432373,
-0.30670881271362305,
0.36722850799560547,
0.35156479477882385,
-0.5859761834144592,
-0.17059378325939178,
-0.13656021654605865,
0.09839580953121185,
0.07489475607872009,
0.4549065828323364,
-0.09621273726224899,
-0.1658409982919693,
0.08272413909435272,
0.017661137506365776,
-0.30542102456092834,
-0.20550881326198578,
-0.3597080707550049,
-0.29320189356803894,
-0.18515682220458984,
0.2824063003063202,
-0.21689827740192413,
0.21418361365795135,
-0.0700109452009201,
0.26651275157928467,
-0.5732182860374451,
-0.12136202305555344,
-0.03491799533367157,
-0.009225701913237572,
0.3289048969745636,
-0.12248380482196808,
0.11294566094875336,
0.08899614214897156,
0.08805239200592041,
0.21549944579601288,
-0.02490067481994629,
0.1573171466588974,
0.07492449879646301,
0.11200451850891113,
-0.08666838705539703,
0.09695634990930557,
0.24780362844467163,
-0.10182435810565948,
0.05576551705598831,
-0.19263476133346558,
-0.04163689166307449,
-0.38434046506881714,
-0.03723675385117531,
0.27318471670150757,
-0.0681489109992981,
-0.3149111866950989,
-0.05483625829219818,
0.5327312350273132,
-0.08085831254720688,
-0.09249871224164963,
0.05703677609562874,
0.23782238364219666,
-0.2765052020549774,
0.7876929044723511,
0.5123696327209473,
0.8745917677879333,
-0.024933122098445892,
0.23877571523189545,
0.313633531332016,
-0.4298110008239746,
0.4504746198654175,
-0.08738566935062408,
0.3265612721443176,
-0.6909170150756836,
-0.2089761346578598,
0.007177332416176796,
0.038797710090875626,
0.1789015829563141,
-0.368388831615448,
-0.49581125378608704,
-0.010302325710654259,
-0.2931321859359741,
-0.042661044746637344,
0.06842169910669327,
0.1311560571193695,
-0.10148216038942337,
-0.3177870512008667,
-0.11300186812877655,
0.12609319388866425,
0.19392085075378418,
-0.03984398767352104,
-0.04788528382778168,
-0.11769022047519684,
-0.12018801271915436,
0.017348341643810272,
-0.23809045553207397,
0.17133137583732605,
-0.07186219841241837,
0.449012815952301,
-0.24360156059265137,
-0.18581968545913696,
-0.23321343958377838,
-0.3181998133659363,
0.5306912064552307,
-0.14262203872203827,
-0.1438911110162735,
-0.16893348097801208,
-0.04618827998638153,
-0.05200605094432831,
-0.0457245334982872,
-0.25776058435440063,
0.4293535351753235,
0.10324458032846451,
-0.12714208662509918,
0.003966666758060455,
0.1561393141746521,
-0.0028366558253765106,
-0.29473888874053955,
-0.13677732646465302,
-0.41672730445861816,
-0.17053824663162231,
-0.25910672545433044,
-0.21236476302146912,
0.12812183797359467,
-0.14328572154045105,
0.12665840983390808,
0.12549255788326263,
-0.21481305360794067,
0.36634013056755066,
-0.19370552897453308,
-0.1992465704679489,
-0.09686815738677979,
0.33778026700019836,
0.17166194319725037,
0.22840076684951782,
0.4187215566635132,
-0.03127751499414444,
-0.13124501705169678,
-0.28683051466941833,
-0.008742701262235641,
0.058875251561403275,
0.10390614718198776,
0.04447381943464279,
-0.30018967390060425,
-0.19035813212394714,
-0.07657337188720703,
-0.056748438626527786,
0.09825184941291809,
-0.40791401267051697,
-0.3621657192707062,
-0.19886700809001923,
-0.39845505356788635,
0.048511967062950134,
-0.06949105858802795,
0.19060447812080383,
-0.034238528460264206,
0.22577381134033203,
-0.1961168646812439,
-0.20545783638954163,
-0.31270986795425415,
0.05222025513648987,
-0.2639785408973694,
0.1025279089808464,
-0.1675955355167389,
-0.07676013559103012,
0.19807979464530945,
-0.04227646067738533,
0.18427225947380066,
0.2328883707523346,
0.02750491164624691,
-0.18868494033813477,
-0.3180932402610779,
0.09429260343313217,
0.07797871530056,
0.0868215560913086,
-0.11646758019924164,
-0.08052125573158264,
-0.16693289577960968,
-0.012343570590019226,
-0.16847431659698486,
0.18319538235664368,
-0.059179142117500305,
0.17523755133152008,
-0.08390229940414429,
0.1367417573928833,
-0.015272263437509537,
-0.004783280193805695,
0.13125933706760406,
0.34500712156295776,
0.07495519518852234,
0.17244607210159302,
-0.41825518012046814,
0.0649811178445816,
-0.1920059621334076,
0.009752139449119568,
0.22205187380313873,
0.1787428855895996,
0.1739414930343628,
-0.2661895155906677,
-0.3385118246078491,
0.09609668701887131,
-0.04413706064224243,
0.2958502173423767,
-0.33342617750167847,
-0.1905689537525177,
0.195924311876297,
0.22073644399642944,
-0.06759484857320786,
-0.03424237668514252,
0.21210572123527527,
-0.30656322836875916,
-0.10313144326210022,
0.23372414708137512,
0.35735905170440674,
0.23692718148231506,
-0.35518038272857666,
0.11684071272611618,
0.23025695979595184,
0.30612510442733765,
-0.017234571278095245,
0.00008144229650497437,
0.19745652377605438,
0.1980649083852768,
0.14067406952381134,
0.16162660717964172,
0.5372239351272583,
0.7073376774787903,
0.009822554886341095,
0.19495028257369995,
0.2589000463485718,
-0.016817856580018997,
-0.06783216446638107,
0.03410615399479866,
0.2200888842344284,
0.03671851009130478,
-0.03081248700618744,
0.09025543183088303,
-0.005316503345966339,
0.10245169699192047,
-0.2976321578025818,
-0.33778196573257446,
-0.010341974906623363,
0.23416483402252197,
-0.29713428020477295,
-0.17466063797473907,
-0.01574401743710041,
0.12657499313354492,
-0.03710481896996498,
-0.1824047863483429,
0.027761444449424744,
0.10887511074542999,
-0.04757507145404816,
0.18551532924175262,
-0.17676480114459991,
-0.16554585099220276,
-0.22766774892807007,
0.5172168612480164,
0.35381028056144714,
-0.20132924616336823,
0.06860902905464172,
0.034288808703422546,
-0.1833888590335846,
-0.2204376459121704,
0.20491835474967957,
0.47632861137390137,
0.4229629635810852,
-0.405306875705719,
0.3371577560901642,
-0.06080997362732887,
0.012129714712500572,
0.03331680968403816,
-0.19487008452415466,
0.050250642001628876,
0.0437498539686203,
0.26162397861480713,
0.14419111609458923,
-0.043596334755420685,
-0.15281353890895844,
0.24454151093959808,
0.4285229742527008,
-0.0031450381502509117,
-0.031815193593502045,
-0.2115766406059265,
0.06569042056798935,
-0.029151570051908493,
-0.07215096801519394,
-0.33799317479133606,
0.31029388308525085,
0.4012335538864136,
-0.08701086789369583,
0.25442957878112793,
0.14738038182258606,
0.07806696742773056,
-0.12072478234767914,
0.22958999872207642,
0.12370191514492035,
-0.09283291548490524,
-0.24310904741287231,
0.027511224150657654,
-0.13230961561203003,
0.2722805142402649,
-0.06674231588840485,
0.14015084505081177,
0.19521281123161316,
0.5284094214439392,
0.003288857638835907,
-0.21315449476242065,
0.2024681717157364,
0.1564045399427414,
0.33371537923812866,
0.30438703298568726,
-0.20111675560474396,
-0.06493169069290161,
-0.3702440857887268,
-0.11552019417285919,
-0.0019274316728115082,
-0.23822176456451416,
0.3254852592945099,
0.010603622533380985,
0.1508498191833496,
-0.10657051205635071,
-0.2740846872329712,
-0.08999677002429962,
-0.2683737576007843,
0.8571717143058777,
0.16990648210048676,
-0.1377745270729065,
-0.2573099136352539,
-0.339368999004364,
-0.0660356879234314,
0.01797674037516117,
-0.3312302529811859,
0.09666088968515396,
-0.017148692160844803,
0.2599122226238251,
-0.20013590157032013,
-0.24017946422100067,
-0.3278619050979614,
0.6025989651679993,
0.1020164042711258,
-0.18820178508758545,
-0.20617914199829102,
0.31538671255111694,
-0.23672080039978027,
-0.10874877870082855,
0.03242673724889755,
0.21041995286941528,
0.04710441082715988,
0.5866938233375549,
-0.18955184519290924,
-0.2843568027019501,
0.5402361154556274,
-0.32238125801086426,
-0.22812330722808838,
-0.11422831565141678,
0.41933968663215637,
0.31928062438964844,
0.3078451454639435,
-0.5473867654800415,
-0.08137985318899155,
0.22163662314414978,
0.054965078830718994,
-0.19709564745426178,
-0.1857767403125763,
0.22532546520233154,
-0.052556417882442474,
-0.10444536805152893,
0.010251253843307495,
0.07744960486888885,
0.13657963275909424,
0.0969914048910141,
-0.29579252004623413
] |
https://github.com/huggingface/datasets/issues/2347 | Add an API to access the language and pretty name of a dataset | Hi ! With @bhavitvyamalik we discussed about having something like
```python
from datasets import load_dataset_card
dataset_card = load_dataset_card("squad")
print(dataset_card.metadata.pretty_name)
# Stanford Question Answering Dataset (SQuAD)
print(dataset_card.metadata.languages)
# ["en"]
```
What do you think ?
I don't know if you already have a way to load the model tags in `transformers` but we can agree on the API to have something consistent.
Also note that the pretty name would only be used to show users something prettier than a dataset id, but in the end the source of truth will stay the dataset id (here `squad`). | It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts. | 95 | Add an API to access the language and pretty name of a dataset
It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts.
Hi ! With @bhavitvyamalik we discussed about having something like
```python
from datasets import load_dataset_card
dataset_card = load_dataset_card("squad")
print(dataset_card.metadata.pretty_name)
# Stanford Question Answering Dataset (SQuAD)
print(dataset_card.metadata.languages)
# ["en"]
```
What do you think ?
I don't know if you already have a way to load the model tags in `transformers` but we can agree on the API to have something consistent.
Also note that the pretty name would only be used to show users something prettier than a dataset id, but in the end the source of truth will stay the dataset id (here `squad`). | [
-0.18838630616664886,
0.11107869446277618,
-0.1189650148153305,
0.33187365531921387,
0.3078960180282593,
0.12758103013038635,
0.27148887515068054,
0.270574688911438,
-0.1630477011203766,
0.2370297908782959,
0.18236762285232544,
0.5307037234306335,
-0.2200148105621338,
0.3426439166069031,
0.20764294266700745,
-0.19734950363636017,
-0.07991378754377365,
-0.0694943219423294,
0.0691232904791832,
-0.06899137049913406,
-0.1761096864938736,
-0.09074993431568146,
0.16333052515983582,
0.1583641767501831,
-0.03018764778971672,
0.026196151971817017,
-0.05226855352520943,
-0.3547733724117279,
-0.049088358879089355,
-0.38332971930503845,
0.026507126167416573,
0.26857757568359375,
0.2704099118709564,
0.05354868620634079,
-0.0001118512445827946,
-0.1514769196510315,
0.42804980278015137,
-0.08540116250514984,
-0.3574965298175812,
-0.3493795394897461,
-0.30738815665245056,
-0.12950901687145233,
0.17392052710056305,
-0.37604761123657227,
-0.1767502725124359,
-0.32675302028656006,
0.2022298276424408,
-0.35407042503356934,
0.26440244913101196,
-0.061954133212566376,
0.1767701357603073,
0.14592128992080688,
-0.19462452828884125,
-0.009848085232079029,
0.1031239777803421,
0.63722163438797,
-0.13743029534816742,
0.07192090153694153,
0.3668978810310364,
-0.03152342513203621,
0.05378885194659233,
0.42547735571861267,
0.14570270478725433,
-0.09927384555339813,
0.11429310590028763,
0.2550070285797119,
0.05851555988192558,
-0.24412402510643005,
0.19676393270492554,
0.308009535074234,
0.6004468202590942,
-0.3262733817100525,
-0.5997586250305176,
-0.36568307876586914,
-0.022137422114610672,
0.026922406628727913,
-0.10596462339162827,
0.10072044283151627,
0.005573650822043419,
0.3257192075252533,
0.06483732163906097,
-0.11781969666481018,
-0.324755996465683,
0.1506287306547165,
0.28713610768318176,
0.6731758117675781,
0.06360962241888046,
0.22268876433372498,
-0.2268858700990677,
-0.053606197237968445,
0.2841743528842926,
-0.2307618260383606,
-0.019271325320005417,
0.3466576933860779,
0.030782975256443024,
-0.25913572311401367,
0.07648254185914993,
-0.06776515394449234,
0.04041734337806702,
0.268667995929718,
0.024603769183158875,
0.25208714604377747,
-0.18396705389022827,
0.057052258402109146,
0.1863698810338974,
-0.0583459734916687,
0.36566904187202454,
0.34743669629096985,
0.13959617912769318,
-0.2905351221561432,
0.33699557185173035,
-0.1128106638789177,
-0.400959312915802,
0.3998141884803772,
0.14554639160633087,
0.2362406849861145,
0.11471761763095856,
0.029319722205400467,
0.13920432329177856,
0.0995042622089386,
-0.003115542232990265,
-0.19377319514751434,
0.04378239065408707,
0.20904496312141418,
-0.102965347468853,
0.48383212089538574,
-0.057531312108039856,
-0.05588848143815994,
0.26197540760040283,
-0.2849515676498413,
-0.03960495814681053,
-0.042876895517110825,
-0.15563032031059265,
0.20164252817630768,
0.13356328010559082,
0.4709705114364624,
0.1575274020433426,
-0.20210853219032288,
0.02113797515630722,
0.08886626362800598,
0.5216773152351379,
-0.10725744068622589,
0.16994020342826843,
-0.1429649293422699,
-0.15530657768249512,
0.24788369238376617,
0.03408532962203026,
-0.331637978553772,
-0.38183414936065674,
0.09097550809383392,
-0.17947468161582947,
-0.0662018209695816,
-0.22352491319179535,
0.20195141434669495,
-0.12367786467075348,
-0.07438725978136063,
-0.39691922068595886,
0.5461207628250122,
0.06218666955828667,
-0.03364814445376396,
0.0947905108332634,
0.04390063136816025,
-0.08058663457632065,
-0.01771075278520584,
-0.10085411369800568,
0.48070693016052246,
-0.3225238025188446,
-0.3198373019695282,
0.1414935290813446,
-0.19291110336780548,
-0.16377803683280945,
-0.16369690001010895,
-0.41271665692329407,
0.27816271781921387,
0.0034139547497034073,
-0.05159296840429306,
0.4448740780353546,
-0.4333399534225464,
-0.03182157874107361,
0.1604061871767044,
-0.05319518595933914,
-0.08307017385959625,
0.2868573069572449,
0.2067544311285019,
0.1231197789311409,
0.0766080841422081,
-0.02145429700613022,
0.4316633939743042,
-0.1471991389989853,
0.013514013960957527,
0.09248107671737671,
-0.5783836841583252,
0.18797002732753754,
0.48532843589782715,
0.15013161301612854,
-0.08931180089712143,
0.023871473968029022,
0.2388894259929657,
0.43896979093551636,
-0.19982561469078064,
0.033159129321575165,
-0.12844599783420563,
0.25463297963142395,
-0.07271885871887207,
0.1066732332110405,
-0.28644895553588867,
-0.46317416429519653,
0.09160805493593216,
-0.18453887104988098,
0.3253057599067688,
-0.20720301568508148,
-0.3501715064048767,
0.18266674876213074,
0.06918520480394363,
-0.15767301619052887,
0.2429235726594925,
0.11337214708328247,
-0.041859932243824005,
-0.11353376507759094,
-0.13306081295013428,
-0.14949052035808563,
0.06750974804162979,
-0.09911570698022842,
-0.0889890044927597,
-0.5047961473464966,
-0.0932677835226059,
0.07359001785516739,
0.13284480571746826,
-0.3385683596134186,
0.01572149246931076,
-0.12939387559890747,
-0.15482839941978455,
-0.08186713606119156,
0.0013927631080150604,
0.3518502414226532,
0.11507667601108551,
0.19761577248573303,
0.6180108785629272,
0.29058438539505005,
-0.26174280047416687,
0.050449974834918976,
0.32261765003204346,
0.216833233833313,
0.012178458273410797,
-0.3475641906261444,
0.35831379890441895,
-0.06800515949726105,
0.27370983362197876,
0.09674184024333954,
-0.1490735113620758,
0.4255130887031555,
0.1746971160173416,
-0.37742799520492554,
-0.3048309087753296,
-0.060177821666002274,
0.14652769267559052,
0.14752469956874847,
-0.056813642382621765,
0.00016567111015319824,
0.14344626665115356,
0.5072768926620483,
-0.08790359646081924,
0.05340099334716797,
0.031084774062037468,
-0.08184612542390823,
-0.011130478233098984,
0.042271628975868225,
0.2109895795583725,
0.22270646691322327,
0.24076811969280243,
-0.27918776869773865,
-0.06004277616739273,
0.28378310799598694,
-0.04285275936126709,
0.26949185132980347,
0.40830349922180176,
0.04916659742593765,
-0.23137900233268738,
-0.04854857176542282,
0.13541269302368164,
0.09251420944929123,
-0.5166599750518799,
0.17627273499965668,
0.0856548398733139,
-0.10000507533550262,
0.27049294114112854,
0.11030688881874084,
-0.3297908306121826,
-0.30409225821495056,
-0.35678982734680176,
-0.14669078588485718,
-0.2314637452363968,
0.027681194245815277,
-0.41740933060646057,
-0.2768646776676178,
0.12855549156665802,
-0.10565932095050812,
0.2818373143672943,
-0.21661816537380219,
-0.28017503023147583,
-0.08088213205337524,
-0.6389326453208923,
-0.18287110328674316,
0.02829863503575325,
0.19392356276512146,
-0.12331676483154297,
0.4811221659183502,
-0.1316089779138565,
0.24420540034770966,
0.09484654664993286,
-0.51688551902771,
0.22213298082351685,
0.14774534106254578,
0.15036174654960632,
0.0017755478620529175,
-0.0010788291692733765,
0.32423895597457886,
-0.09513988345861435,
0.08965639024972916,
-0.12820012867450714,
0.24952450394630432,
-0.06757894158363342,
-0.06333760172128677,
-0.2475164532661438,
-0.12163582444190979,
-0.3174871802330017,
-0.6008806824684143,
-0.16474948823451996,
0.04975877329707146,
-0.058556534349918365,
0.1887986958026886,
0.38614463806152344,
-0.13143594563007355,
0.2721606194972992,
-0.16658799350261688,
-0.04428730905056,
-0.14685280621051788,
-0.08805713802576065,
0.1331968605518341,
-0.10978387296199799,
-0.1724703311920166,
-0.1961836814880371,
-0.2997511625289917,
0.2696593105792999,
-0.26510530710220337,
0.09181137382984161,
-0.1628441959619522,
-0.059725649654865265,
0.06776230037212372,
0.013744417577981949,
0.03919490799307823,
0.3031953275203705,
0.18963152170181274,
0.03165920078754425,
0.13819792866706848,
-0.15636111795902252,
0.13737772405147552,
0.07961864024400711,
0.09164395183324814,
-0.09599250555038452,
0.11443019658327103,
-0.23329445719718933,
0.429127037525177,
-0.057969044893980026,
-0.24867267906665802,
0.09412924945354462,
0.11766499280929565,
-0.03987739607691765,
0.19802141189575195,
-0.21204550564289093,
-0.19624796509742737,
-0.06987681984901428,
-0.10648253560066223,
0.34613481163978577,
-0.07216838747262955,
-0.4198966324329376,
-0.21041880548000336,
-0.01212676614522934,
-0.2709897756576538,
-0.23034882545471191,
0.42629364132881165,
-0.24710243940353394,
0.029464803636074066,
0.16585193574428558,
0.16178110241889954,
-0.3989673852920532,
-0.004736291244626045,
0.05862792208790779,
0.01790556311607361,
0.012240596115589142,
-0.10635728389024734,
-0.45930901169776917,
-0.20833736658096313,
0.16585463285446167,
0.25476300716400146,
0.14048261940479279,
0.11631420999765396,
-0.10708697885274887,
-0.059194475412368774,
-0.042707666754722595,
0.04858753830194473,
0.383209228515625,
-0.2628864049911499,
-0.2734740376472473,
-0.15134799480438232,
-0.09408966451883316,
-0.2443833202123642,
-0.004743080586194992,
-0.44924086332321167,
-0.2510789930820465,
0.06725097447633743,
0.5958282351493835,
-0.34254559874534607,
-0.13682079315185547,
-0.006786186248064041,
0.11040830612182617,
-0.32475125789642334,
-0.12077737599611282,
-0.06128569692373276,
0.08933331817388535,
-0.3224771320819855,
0.009052954614162445,
0.028801502659916878,
-0.060501519590616226,
0.12050486356019974,
0.018633320927619934,
0.002925179898738861,
0.21229839324951172,
0.285738468170166,
0.5010878443717957,
0.005169575102627277,
0.10105477273464203,
0.1019243597984314,
0.1425132006406784,
0.06530431658029556,
-0.26375457644462585,
0.2954244315624237,
-0.11718636751174927,
-0.451086163520813,
0.15699389576911926,
-0.19348178803920746,
0.41097933053970337,
0.24778439104557037,
0.10502690821886063,
0.23900067806243896,
0.3234277665615082,
-0.041920006275177,
-0.5307348370552063,
0.20668451488018036,
-0.1548740416765213,
0.10491239279508591,
-0.5274233818054199,
-0.9195453524589539,
0.6403460502624512,
-0.03599681705236435,
-0.24544939398765564,
0.13277684152126312,
0.27893349528312683,
-0.3952603340148926,
0.9277620315551758,
0.2805681526660919,
1.1838773488998413,
-0.11090569198131561,
0.11335781216621399,
-0.29158300161361694,
-0.2011343091726303,
0.6841208934783936,
-0.21747124195098877,
-0.09817177802324295,
-0.3596971333026886,
-0.10682838410139084,
-0.10669916123151779,
-0.02061500772833824,
0.1701849400997162,
0.4003399610519409,
-0.2707737982273102,
0.007098028436303139,
0.0679803192615509,
0.2797982692718506,
0.09000152349472046,
0.6961334943771362,
-0.10640200227499008,
-0.5078458189964294,
-0.1485537737607956,
0.10921701788902283,
-0.28807157278060913,
-0.000612940639257431,
-0.14430955052375793,
-0.23251491785049438,
-0.22260570526123047,
-0.07178959250450134,
-0.303566038608551,
0.10496660321950912,
-0.20983953773975372,
0.19039934873580933,
-0.06778332591056824,
0.025350511074066162,
0.4092516601085663,
-0.07564330101013184,
0.20828421413898468,
0.30112966895103455,
-0.32398900389671326,
0.1833634078502655,
-0.200425386428833,
0.15889757871627808,
0.12420352548360825,
-0.09747633337974548,
0.34600961208343506,
0.12205088883638382,
-0.3134865462779999,
0.354521244764328,
0.2316942662000656,
0.06503001600503922,
-0.5912466049194336,
-0.03234265744686127,
0.21094045042991638,
-0.11958381533622742,
-0.22721636295318604,
-0.1336144357919693,
-0.17758259177207947,
0.008896902203559875,
0.1382502168416977,
0.20325151085853577,
-0.23601976037025452,
0.13286535441875458,
0.2284073382616043,
-0.028666187077760696,
-0.08317551016807556,
-0.043063290417194366,
0.01032436452805996,
-0.13838475942611694,
0.22292403876781464,
0.07317215204238892,
-0.08809919655323029,
-0.2573055028915405,
0.15894073247909546,
0.29454007744789124,
-0.5770973563194275,
-0.34476351737976074,
0.20882201194763184,
-0.3290337324142456,
-0.16391612589359283,
-0.21639707684516907,
0.18215054273605347,
-0.008537009358406067,
-0.06310783326625824,
-0.22034937143325806,
-0.3973640501499176,
0.2896134853363037,
0.13925960659980774,
0.2403065711259842,
0.06784994155168533,
-0.3488299250602722,
-0.25700968503952026,
0.24801087379455566,
-0.32640618085861206,
-0.3125217854976654,
0.02088593877851963,
0.20377980172634125,
0.12414050847291946,
0.04633335769176483,
0.03686875104904175,
-0.2900845408439636,
0.05256094038486481,
-0.09615163505077362,
0.03326834738254547,
-0.2268173098564148,
-0.4099673330783844,
0.1431797295808792,
0.12583588063716888,
0.02873930148780346,
-0.1444208323955536,
-0.08908635377883911,
0.11207929253578186,
-0.34304964542388916,
0.09002251923084259,
-0.01470281183719635,
0.12792618572711945,
0.44790005683898926,
0.14007039368152618,
0.08522385358810425,
-0.23263518512248993,
0.2551235258579254,
0.08845291286706924,
0.23506908118724823,
0.3074107766151428,
0.21317897737026215,
-0.02866469882428646,
-0.006874106824398041,
-0.09189898520708084,
0.23670506477355957,
0.32323622703552246,
0.2591972351074219,
0.019937291741371155,
0.03315792977809906,
0.31835439801216125,
0.31116411089897156,
-0.016221847385168076,
0.10084271430969238,
0.014845958910882473,
-0.018662793561816216,
0.1883949637413025,
0.23237763345241547,
-0.2617148458957672,
0.004087528213858604,
-0.028803538531064987,
-0.10456641763448715,
0.1420137733221054,
0.44952836632728577,
-0.026092633605003357,
0.4359006881713867,
0.002775028347969055,
-0.05433155596256256,
0.5126651525497437,
0.05427902191877365,
0.20526930689811707,
0.39019450545310974,
0.010082986205816269,
0.12123973667621613,
0.20003756880760193,
0.18717898428440094,
0.2621738612651825,
0.23544947803020477,
-0.15859809517860413,
0.5301887392997742,
0.05683206766843796,
0.13885082304477692,
0.2717409133911133,
0.10856419801712036,
-0.09605522453784943,
-0.19258970022201538,
0.03696285933256149,
0.4369644224643707,
0.19606241583824158,
-0.05562489479780197,
0.04791346937417984,
0.06799489259719849,
-0.2876182496547699,
-0.15705591440200806,
0.058042243123054504,
-0.26676106452941895,
0.036830149590969086,
-0.07226032018661499,
-0.06056114658713341,
-0.1712152510881424,
0.06366892158985138,
-0.36445242166519165,
0.027163855731487274,
0.17701846361160278,
-0.027799472212791443,
0.0680299624800682,
0.008592290803790092,
0.2444879412651062,
0.1561802476644516,
-0.2653382420539856,
-0.14342942833900452,
0.09311988949775696,
-0.06880651414394379,
-0.2415267527103424,
0.1719188243150711,
0.023570161312818527,
0.11387042701244354,
-0.1319379359483719,
0.32897430658340454,
-0.13611041009426117,
-0.10003011673688889,
-0.16040314733982086,
0.18976588547229767,
0.1998181939125061,
0.03661714866757393,
0.021432098001241684,
0.1722930669784546,
-0.10961181670427322,
-0.3068859577178955,
0.1988537758588791,
0.04782136157155037,
-0.03923751786351204,
0.608942449092865,
0.19559797644615173,
-0.14150497317314148,
-0.13413743674755096,
0.15175658464431763,
-0.5333812832832336,
0.2032196968793869,
0.5581696033477783,
0.16502638161182404,
0.03168368339538574,
-0.06249334663152695,
0.043693430721759796,
-0.011329323053359985,
0.3779027462005615,
0.11152152717113495,
0.27411723136901855,
-0.34510526061058044,
0.32762569189071655,
-0.4101557731628418,
-0.11485079675912857,
0.1545850783586502,
0.18771012127399445,
0.03735960274934769,
-0.07405325025320053,
0.3624296486377716,
0.17159171402454376,
-0.24548889696598053,
0.14777345955371857,
-0.0864703357219696,
0.126827210187912,
-0.27892518043518066,
-0.23523397743701935,
-0.17527242004871368,
0.2359231412410736,
0.06592419743537903,
-0.18393254280090332,
-0.05102185532450676,
0.16285015642642975,
-0.05996435880661011,
-0.6815496683120728,
-0.12166404724121094,
0.2556995749473572,
-0.07087037712335587,
0.39998894929885864,
-0.005488928407430649,
0.36386221647262573,
-0.017995260655879974,
0.08983241766691208,
-0.1918761432170868,
-0.19611848890781403,
-0.03332047164440155,
0.4306815266609192,
0.11517767608165741,
0.1724218875169754,
-0.014109240844845772,
-0.19969694316387177,
-0.22733433544635773,
-0.33051663637161255,
-0.29134368896484375,
-0.3692660331726074,
-0.4320272207260132,
-0.05033005028963089,
-0.19145682454109192,
0.015161506831645966,
-0.19385045766830444,
0.1640467792749405,
0.06465800106525421,
0.0513591542840004,
0.07392518222332001,
0.038044825196266174,
0.30934032797813416,
-0.30060064792633057,
-0.3384077250957489,
-0.07319649308919907,
0.0880766361951828,
-0.38108697533607483,
0.14827914535999298,
-0.633980393409729,
0.1331758201122284,
0.3060174584388733,
-0.13052311539649963,
-0.03261271119117737,
0.2848793864250183,
0.440970242023468,
0.19681021571159363,
-0.30643293261528015,
0.2921519875526428,
-0.07987941056489944,
0.005739064887166023,
-0.2772654592990875,
-0.18489627540111542
] |
https://github.com/huggingface/datasets/issues/2347 | Add an API to access the language and pretty name of a dataset | What dataset_info method are you talking about @julien-c ? In `huggingface_hub` I can only see `model_info`. | It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts. | 16 | Add an API to access the language and pretty name of a dataset
It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts.
What dataset_info method are you talking about @julien-c ? In `huggingface_hub` I can only see `model_info`. | [
-0.27594253420829773,
-0.14917497336864471,
-0.08736248314380646,
0.41507768630981445,
0.342138409614563,
0.11897226423025131,
0.38973909616470337,
0.3709770143032074,
-0.022361131384968758,
0.37463676929473877,
0.07790323346853256,
0.5090553760528564,
-0.06015053391456604,
0.38418176770210266,
0.3461492657661438,
-0.2023467719554901,
-0.11724794656038284,
0.01296822726726532,
-0.08033391833305359,
-0.12114831060171127,
-0.19621409475803375,
0.05210350453853607,
0.11083656549453735,
0.12417033314704895,
-0.2669217586517334,
0.04545621573925018,
-0.05400057137012482,
-0.13884210586547852,
-0.07908895611763,
-0.33752450346946716,
0.08654364198446274,
0.28503546118736267,
0.2838588058948517,
0.02946266531944275,
-0.00010763965110527351,
-0.024508308619260788,
0.47768813371658325,
-0.15159526467323303,
-0.3618725538253784,
-0.22177185118198395,
-0.3296574354171753,
-0.1733141988515854,
0.24182848632335663,
-0.4034040868282318,
-0.18845102190971375,
-0.21383151412010193,
0.22442123293876648,
-0.15808042883872986,
0.3432016670703888,
0.05130278691649437,
0.21729721128940582,
0.3994906544685364,
-0.10267616808414459,
-0.13736306130886078,
0.047613151371479034,
0.6418020129203796,
-0.2143191248178482,
-0.06894281506538391,
0.26457029581069946,
0.13622063398361206,
-0.1340632438659668,
0.48639488220214844,
0.2200397402048111,
-0.15400397777557373,
0.05014164745807648,
0.1936682015657425,
0.02802075818181038,
-0.19955189526081085,
0.19388142228126526,
0.2981422245502472,
0.5250980257987976,
-0.2898886203765869,
-0.47240981459617615,
-0.3455623388290405,
-0.07657643407583237,
0.005902627483010292,
-0.06327833980321884,
0.10383296012878418,
-0.07815739512443542,
0.331046998500824,
-0.0015481621958315372,
-0.1827414184808731,
-0.36988016963005066,
-0.08848856389522552,
0.3872867822647095,
0.6222913265228271,
-0.06677910685539246,
0.21563845872879028,
-0.1351897418498993,
-0.06148920953273773,
0.28252649307250977,
-0.16908200085163116,
-0.12772496044635773,
0.2868184447288513,
-0.03932356461882591,
-0.31089138984680176,
0.23933422565460205,
0.11929060518741608,
0.06759315729141235,
0.13767793774604797,
0.1428588479757309,
0.35731667280197144,
-0.18099386990070343,
0.08885358273983002,
0.13850225508213043,
-0.03075423277914524,
0.30935782194137573,
0.2264126092195511,
0.2360428422689438,
-0.021527953445911407,
0.3387371599674225,
-0.21906208992004395,
-0.32927513122558594,
0.4511212408542633,
0.024906396865844727,
0.2304002046585083,
0.10447795689105988,
-0.016483165323734283,
0.14434193074703217,
-0.035427745431661606,
0.2760777473449707,
-0.252201110124588,
0.17822855710983276,
0.2969043552875519,
-0.05139695480465889,
0.3812255859375,
-0.11835120618343353,
-0.11536659300327301,
0.09541571140289307,
-0.354655385017395,
-0.11898870021104813,
-0.03834909200668335,
-0.19363713264465332,
0.2752448320388794,
0.07666191458702087,
0.33256351947784424,
0.16663073003292084,
-0.1525791883468628,
0.0196099653840065,
0.2120027244091034,
0.37841281294822693,
0.02971993386745453,
0.1751953661441803,
0.014085408300161362,
-0.1419984996318817,
0.14743547141551971,
0.05964574217796326,
-0.08740472048521042,
-0.4299756586551666,
-0.013639353215694427,
-0.38223984837532043,
-0.3169519305229187,
-0.2568473815917969,
0.19827483594417572,
-0.08723911643028259,
0.050136879086494446,
-0.30388200283050537,
0.6148661375045776,
-0.0784490630030632,
-0.10667738318443298,
0.12582282721996307,
0.11141429841518402,
-0.17365798354148865,
-0.05882277712225914,
-0.06184072047472,
0.42575472593307495,
-0.2679537832736969,
-0.3829318881034851,
-0.030753083527088165,
-0.3184657394886017,
-0.04778742045164108,
-0.10053828358650208,
-0.5002001523971558,
0.21817749738693237,
-0.09351406246423721,
0.051831066608428955,
0.49717992544174194,
-0.32731547951698303,
-0.04258802533149719,
0.1693953424692154,
-0.01667638123035431,
-0.08044470846652985,
0.26928794384002686,
0.15715943276882172,
0.0533846877515316,
0.03252306953072548,
-0.004432998597621918,
0.27253884077072144,
-0.15329250693321228,
0.029405174776911736,
0.06305818259716034,
-0.5404418706893921,
0.05461089313030243,
0.3931620121002197,
0.024233687669038773,
0.08292350172996521,
0.11602269113063812,
0.2529345750808716,
0.4412272870540619,
-0.19625675678253174,
0.043301232159137726,
0.048578787595033646,
0.24257990717887878,
-0.14257273077964783,
0.1200503408908844,
-0.2552194893360138,
-0.5282456874847412,
0.1342339813709259,
-0.2967628538608551,
0.3904133439064026,
-0.2090807408094406,
-0.3232305645942688,
0.18480855226516724,
0.14156024158000946,
-0.11268073320388794,
0.0030877795070409775,
0.1554500162601471,
0.08296497166156769,
-0.07351311296224594,
-0.2124798446893692,
-0.2460971176624298,
0.18519136309623718,
-0.07520215213298798,
-0.07619384676218033,
-0.6570010781288147,
-0.10365995764732361,
0.032633714377880096,
0.04529411345720291,
-0.2922036051750183,
-0.006101079285144806,
-0.050363197922706604,
-0.21643473207950592,
-0.12347286194562912,
0.08442363142967224,
0.29596173763275146,
0.12331648916006088,
0.0977296233177185,
0.5998768210411072,
0.22187861800193787,
-0.13261358439922333,
-0.04507138580083847,
0.04764176160097122,
0.20046575367450714,
0.029668942093849182,
-0.32120180130004883,
0.4076055884361267,
0.08485740423202515,
0.19175386428833008,
0.10733115673065186,
-0.05580839514732361,
0.3379789888858795,
0.2143080234527588,
-0.29948851466178894,
-0.31782615184783936,
-0.022886019200086594,
0.2004348486661911,
0.2086057960987091,
-0.038723401725292206,
-0.04294756054878235,
0.12272700667381287,
0.6142538785934448,
-0.07712987065315247,
-0.03940259665250778,
0.1776134967803955,
0.062075383961200714,
-0.05802558362483978,
0.20857557654380798,
0.17282596230506897,
0.2795032262802124,
0.24702970683574677,
-0.2898239493370056,
0.0175849087536335,
0.2250060886144638,
-0.042623914778232574,
0.21762949228286743,
0.2541164755821228,
0.10076216608285904,
-0.2975417375564575,
-0.06936950981616974,
0.09423529356718063,
-0.08050794154405594,
-0.5052793622016907,
0.14704644680023193,
0.10810864716768265,
-0.114617720246315,
0.21349410712718964,
0.004820359870791435,
-0.1865452527999878,
-0.22608338296413422,
-0.2593691349029541,
-0.24238327145576477,
-0.23215749859809875,
0.06392578780651093,
-0.344391793012619,
-0.27310749888420105,
0.1675049215555191,
-0.16855208575725555,
0.42095598578453064,
-0.19392505288124084,
-0.07944521307945251,
-0.32744789123535156,
-0.4993184804916382,
-0.18781372904777527,
0.05640409514307976,
0.1114862710237503,
-0.08590563386678696,
0.433353453874588,
-0.1752041131258011,
0.2551010847091675,
0.045165929943323135,
-0.4706527292728424,
0.35590052604675293,
-0.033787406980991364,
0.10944677144289017,
0.2159409523010254,
0.1232696995139122,
0.31015002727508545,
-0.0756676197052002,
0.15845219790935516,
-0.20968230068683624,
0.11835256218910217,
-0.09827421605587006,
-0.09855879843235016,
-0.21476930379867554,
-0.1783457249403,
-0.22318783402442932,
-0.35745513439178467,
-0.3391284942626953,
0.15384197235107422,
-0.14684008061885834,
0.266187459230423,
0.3840100169181824,
-0.18795520067214966,
0.3901928663253784,
-0.13181577622890472,
0.006987781263887882,
-0.17640292644500732,
-0.2814931571483612,
0.08713333308696747,
-0.2605353891849518,
-0.2236507087945938,
-0.25182169675827026,
-0.20017066597938538,
0.33160585165023804,
-0.1917024403810501,
-0.004878424108028412,
-0.14157259464263916,
-0.32001543045043945,
0.03962380811572075,
0.04852256923913956,
0.10057353228330612,
0.5203322768211365,
0.17143893241882324,
-0.0038116443902254105,
0.003642883151769638,
-0.3489680886268616,
0.128970205783844,
0.18562239408493042,
0.038187138736248016,
-0.04485991597175598,
0.12240415066480637,
-0.2703685760498047,
0.35099363327026367,
-0.14662866294384003,
-0.13902629911899567,
0.2506445646286011,
-0.02242010273039341,
0.1232723817229271,
-0.020253390073776245,
-0.17599011957645416,
-0.1975344717502594,
-0.026125892996788025,
-0.12810185551643372,
0.2923993468284607,
-0.09986215829849243,
-0.21148857474327087,
-0.28656256198883057,
-0.1411038041114807,
-0.13244058191776276,
-0.26345381140708923,
0.4139842092990875,
-0.1196354329586029,
0.09641954302787781,
0.12256795167922974,
0.1635971963405609,
-0.3575398623943329,
0.09894483536481857,
0.07904011011123657,
0.071818046271801,
0.05861091986298561,
-0.14384141564369202,
-0.46325916051864624,
-0.20924535393714905,
-0.04059647023677826,
0.31203675270080566,
0.0798460990190506,
0.09897366911172867,
-0.2552240192890167,
-0.19339719414710999,
-0.043764978647232056,
0.00998652633279562,
0.38931572437286377,
-0.2974933683872223,
-0.4550477862358093,
-0.1842500865459442,
-0.23640617728233337,
-0.3232528269290924,
0.025784488767385483,
-0.4025111496448517,
-0.21866287291049957,
-0.03482077643275261,
0.630706787109375,
-0.36568495631217957,
-0.33080700039863586,
0.06331752985715866,
0.003972675651311874,
-0.3565927743911743,
-0.11634397506713867,
-0.19000551104545593,
0.06245095282793045,
-0.3366023898124695,
-0.08492813259363174,
0.02008049003779888,
-0.02102518640458584,
0.16212999820709229,
0.09799309074878693,
0.1038384884595871,
0.1954335868358612,
0.17014180123806,
0.5530715584754944,
-0.03272487223148346,
0.07671564072370529,
0.008706532418727875,
0.20720236003398895,
0.1496102511882782,
-0.15145061910152435,
0.36552149057388306,
-0.10819977521896362,
-0.37770843505859375,
0.20841696858406067,
-0.09886810183525085,
0.40413862466812134,
0.3018052279949188,
0.12141060829162598,
0.3060573637485504,
0.31977519392967224,
0.013270348310470581,
-0.571226179599762,
0.2327617108821869,
0.00380130298435688,
0.01524211373180151,
-0.5912836790084839,
-0.729543149471283,
0.6037889719009399,
-0.18069696426391602,
-0.16620506346225739,
0.2758646309375763,
0.44417572021484375,
-0.37435999512672424,
0.8279212713241577,
0.23873969912528992,
1.1571497917175293,
0.004929658025503159,
0.10821044445037842,
-0.21903401613235474,
-0.17637190222740173,
0.6383495330810547,
-0.1340518742799759,
-0.03543906286358833,
-0.31631168723106384,
-0.12725040316581726,
-0.15563282370567322,
0.04543949291110039,
0.2552591562271118,
0.2740699350833893,
-0.27878662943840027,
0.06185539439320564,
0.1432453691959381,
0.20306557416915894,
-0.07261981815099716,
0.5821613073348999,
-0.22017915546894073,
-0.5713000893592834,
-0.2741287648677826,
0.13410621881484985,
-0.2298971563577652,
0.13368239998817444,
-0.12099776417016983,
-0.3156328797340393,
-0.06032213941216469,
-0.2010241448879242,
-0.36413609981536865,
0.03499497473239899,
-0.18706919252872467,
0.07555314898490906,
0.07280124723911285,
0.1158522516489029,
0.346506267786026,
-0.05908070132136345,
0.15764164924621582,
0.2652764916419983,
-0.4127758741378784,
0.2081744372844696,
-0.33867233991622925,
0.19519004225730896,
-0.000996732385829091,
-0.13990548253059387,
0.3260088860988617,
0.026308327913284302,
-0.4010031521320343,
0.22740235924720764,
0.15535090863704681,
0.08116412162780762,
-0.42719128727912903,
-0.058917999267578125,
0.11835132539272308,
-0.13510087132453918,
-0.1909102201461792,
-0.1581842303276062,
-0.2536535859107971,
-0.1162063479423523,
0.16126075387001038,
0.07363590598106384,
-0.20750579237937927,
0.06474286317825317,
0.2558287978172302,
-0.024677664041519165,
-0.15407417714595795,
-0.013058900833129883,
-0.16138768196105957,
-0.1768430471420288,
0.17807646095752716,
0.05515105649828911,
-0.05711383372545242,
-0.29742956161499023,
0.10337723046541214,
0.5576291084289551,
-0.6720747947692871,
-0.21360953152179718,
0.15435375273227692,
-0.32626888155937195,
-0.17956122756004333,
-0.0015341974794864655,
0.14896740019321442,
-0.08956760913133621,
-0.09930600225925446,
-0.13932645320892334,
-0.5680271983146667,
0.2761213183403015,
0.022276755422353745,
0.33415353298187256,
0.02257375791668892,
-0.291190505027771,
-0.13355347514152527,
0.3174349069595337,
-0.3666871190071106,
-0.38551050424575806,
-0.0382176898419857,
0.11879575997591019,
0.20270639657974243,
0.09076130390167236,
0.22560641169548035,
-0.15372125804424286,
0.03618832677602768,
0.0366792231798172,
-0.0618627592921257,
-0.18937745690345764,
-0.43906697630882263,
0.1291116178035736,
0.0757046788930893,
0.10535472631454468,
-0.1097319945693016,
-0.04485173523426056,
0.011141028255224228,
-0.34430378675460815,
0.24893611669540405,
0.04684782028198242,
0.1269065886735916,
0.5435541868209839,
0.2113696187734604,
0.0683462992310524,
-0.28152525424957275,
0.14730402827262878,
0.151902973651886,
0.30998295545578003,
0.24643297493457794,
0.09006942808628082,
-0.23110654950141907,
-0.020708169788122177,
-0.011920522898435593,
0.3951294422149658,
0.42286217212677,
0.19546350836753845,
-0.05162014812231064,
0.19059567153453827,
0.2433229386806488,
0.15494313836097717,
0.1229509562253952,
-0.025109805166721344,
0.0028265223372727633,
0.006944799795746803,
0.23302721977233887,
0.21948833763599396,
-0.17004168033599854,
0.03649105504155159,
-0.03246709704399109,
-0.17863517999649048,
0.14700624346733093,
0.4730042815208435,
0.06293176114559174,
0.4394761919975281,
0.19331228733062744,
-0.03913167119026184,
0.3884008228778839,
-0.018023915588855743,
0.1633429229259491,
0.4092828333377838,
-0.0543864406645298,
0.23352237045764923,
0.431581050157547,
0.13843783736228943,
0.290599524974823,
0.3131820559501648,
-0.14123588800430298,
0.5300728678703308,
0.018079359084367752,
0.14208798110485077,
0.3447795808315277,
-0.06358039379119873,
-0.04743305966258049,
-0.2558327317237854,
0.02652755379676819,
0.4020932614803314,
0.12371411174535751,
0.03593030571937561,
0.06168653070926666,
0.05327477306127548,
-0.36573392152786255,
-0.08722180128097534,
-0.1554144322872162,
-0.21914730966091156,
0.0888078361749649,
-0.022028472274541855,
-0.09626097232103348,
-0.1248001754283905,
0.17010514438152313,
-0.0733877569437027,
0.04729591682553291,
0.06609747558832169,
0.08695147186517715,
0.10958238691091537,
-0.061501599848270416,
0.32587891817092896,
0.18741771578788757,
-0.22201542556285858,
-0.019038153812289238,
0.18660284578800201,
-0.21591806411743164,
-0.14552654325962067,
0.20047925412654877,
0.06515543162822723,
0.06976048648357391,
0.05860569328069687,
0.30834779143333435,
-0.0643000602722168,
-0.09091111272573471,
-0.14696310460567474,
0.26063641905784607,
0.19618383049964905,
0.14022120833396912,
0.000980699434876442,
0.17453843355178833,
-0.13177694380283356,
-0.2461852878332138,
0.05265682190656662,
0.10503159463405609,
-0.05192801356315613,
0.5253125429153442,
0.16507384181022644,
-0.2007722556591034,
-0.20890726149082184,
0.14330865442752838,
-0.4348697364330292,
0.19774232804775238,
0.4484321177005768,
0.02864580973982811,
0.0409163236618042,
-0.1360030472278595,
0.0782456174492836,
-0.02455298602581024,
0.6048407554626465,
0.13330109417438507,
0.08839751034975052,
-0.27851635217666626,
0.10971680283546448,
-0.3128061294555664,
-0.06255989521741867,
0.17690543830394745,
0.18582764267921448,
0.11769821494817734,
-0.1474124789237976,
0.33640870451927185,
0.0009133033454418182,
-0.12758295238018036,
-0.025955868884921074,
-0.04273022711277008,
0.09221795201301575,
-0.25095272064208984,
-0.15465129911899567,
-0.20822276175022125,
0.07996834814548492,
0.038061268627643585,
-0.1675686240196228,
0.07930365204811096,
0.2785615921020508,
-0.07246153801679611,
-0.6869019269943237,
0.01197122037410736,
0.19524449110031128,
-0.06336618959903717,
0.27830857038497925,
0.12509073317050934,
0.4131278395652771,
-0.24563086032867432,
0.11881371587514877,
-0.25100037455558777,
-0.1941516399383545,
-0.030201803892850876,
0.23117953538894653,
0.10999758541584015,
0.08967724442481995,
0.027212997898459435,
-0.3131047785282135,
-0.4556751549243927,
-0.11585946381092072,
-0.13302582502365112,
-0.1714405119419098,
-0.3130781650543213,
0.01913088746368885,
-0.2408621609210968,
-0.10936794430017471,
0.05005904659628868,
0.1687128245830536,
0.16117024421691895,
-0.10189833492040634,
0.043099045753479004,
0.022652069106698036,
0.37170079350471497,
-0.1529974788427353,
-0.4717790186405182,
0.004761821590363979,
0.08351746201515198,
-0.4209587872028351,
0.026865212246775627,
-0.721428394317627,
0.1415533423423767,
0.18854762613773346,
-0.11729147285223007,
-0.17675963044166565,
0.4244626462459564,
0.3451026380062103,
0.1086065024137497,
-0.2637026309967041,
0.43207141757011414,
0.11486512422561646,
-0.02278386428952217,
-0.22369004786014557,
-0.1537882536649704
] |
https://github.com/huggingface/datasets/issues/2347 | Add an API to access the language and pretty name of a dataset | Indeed, this info can now be fetched with `huggingface_hub.dataset_info`, so I think we can close this issue. | It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts. | 17 | Add an API to access the language and pretty name of a dataset
It would be super nice to have an API to get some metadata of the dataset from the name and args passed to `load_dataset`. This way we could programmatically infer the language and the name of a dataset when creating model cards automatically in the Transformers examples scripts.
Indeed, this info can now be fetched with `huggingface_hub.dataset_info`, so I think we can close this issue. | [
-0.32249054312705994,
-0.1655098795890808,
-0.08794800937175751,
0.37995266914367676,
0.333950936794281,
0.09806307405233383,
0.3920844793319702,
0.380858838558197,
0.07264544069766998,
0.3009544312953949,
0.04058223217725754,
0.4458234906196594,
-0.09999758750200272,
0.4816895127296448,
0.26157188415527344,
-0.2526393532752991,
-0.025962240993976593,
0.004068940877914429,
-0.014141038060188293,
-0.12058953195810318,
-0.2452874630689621,
0.12242761999368668,
0.16238778829574585,
0.17437328398227692,
-0.3339046835899353,
-0.018027180805802345,
0.06422970443964005,
-0.08845534175634384,
-0.22453318536281586,
-0.29289528727531433,
0.121768519282341,
0.3033314049243927,
0.2216367870569229,
-0.018735192716121674,
-0.00010768720676423982,
-0.021987993270158768,
0.3884839415550232,
-0.11848684400320053,
-0.28214406967163086,
-0.24829576909542084,
-0.22280526161193848,
-0.14645293354988098,
0.2122296839952469,
-0.2825305759906769,
-0.16929849982261658,
-0.18760155141353607,
0.19267836213111877,
-0.10219818353652954,
0.35533401370048523,
-0.0013838745653629303,
0.2260817587375641,
0.4687977135181427,
-0.23781730234622955,
-0.12407512217760086,
0.01674504578113556,
0.62852942943573,
-0.24648839235305786,
-0.022172383964061737,
0.2429884374141693,
-0.005008765030652285,
-0.2484760284423828,
0.4680268466472626,
0.18616890907287598,
-0.20398367941379547,
0.15666870772838593,
0.15525519847869873,
-0.06851787120103836,
-0.17678561806678772,
0.0969942957162857,
0.28613337874412537,
0.40634316205978394,
-0.32487908005714417,
-0.5401071906089783,
-0.4299629032611847,
-0.09242788702249527,
-0.0018212217837572098,
0.058687660843133926,
0.12064580619335175,
-0.10055941343307495,
0.34107309579849243,
0.01733132265508175,
-0.240562304854393,
-0.35721179842948914,
-0.10185886919498444,
0.2828308641910553,
0.517946720123291,
0.014885840937495232,
0.1682940423488617,
-0.08084714412689209,
-0.015010561794042587,
0.24560971558094025,
-0.12387479841709137,
-0.08034618198871613,
0.23920799791812897,
-0.13917377591133118,
-0.2634255290031433,
0.2144184112548828,
0.19812867045402527,
0.079895980656147,
0.15546968579292297,
0.14386112987995148,
0.3576523959636688,
-0.1747579574584961,
0.15900543332099915,
0.14361150562763214,
0.04203203320503235,
0.35149964690208435,
0.11119214445352554,
0.3636094331741333,
0.09484182298183441,
0.44514456391334534,
-0.09692163020372391,
-0.32061707973480225,
0.38015511631965637,
-0.07051094621419907,
0.1985940933227539,
0.1783296763896942,
0.009816240519285202,
0.09296078979969025,
0.09219297021627426,
0.3811630606651306,
-0.17841894924640656,
0.14139577746391296,
0.3067774176597595,
0.05825358256697655,
0.4551750421524048,
-0.09381474554538727,
-0.0028794892132282257,
0.045902319252491,
-0.3564569354057312,
-0.11452048271894455,
-0.05350865051150322,
-0.24599280953407288,
0.25329262018203735,
0.10290524363517761,
0.3402979373931885,
0.1931348592042923,
-0.10823898017406464,
-0.031508706510066986,
0.14944647252559662,
0.3030226528644562,
-0.01086227037012577,
0.09615881741046906,
0.13653366267681122,
-0.1208747923374176,
0.11144941300153732,
0.04936021938920021,
-0.07017496973276138,
-0.3385659158229828,
0.01230565831065178,
-0.2193889319896698,
-0.2674853503704071,
-0.23771412670612335,
0.23765969276428223,
-0.2018306702375412,
0.05182662233710289,
-0.38922563195228577,
0.5540938973426819,
-0.07486092299222946,
-0.032307352870702744,
0.14849455654621124,
0.14555934071540833,
-0.24571464955806732,
-0.008319766260683537,
-0.06122950464487076,
0.45018792152404785,
-0.18974100053310394,
-0.3830207884311676,
0.10868033766746521,
-0.4226512014865875,
-0.16883859038352966,
-0.022701337933540344,
-0.4749733507633209,
0.18451035022735596,
-0.08877044916152954,
0.08480890095233917,
0.40520384907722473,
-0.38868194818496704,
-0.08112894743680954,
0.11036507785320282,
-0.05928093194961548,
-0.03943917155265808,
0.20019957423210144,
0.12492045015096664,
0.0894601047039032,
0.029176175594329834,
0.034378498792648315,
0.29862260818481445,
-0.14599765837192535,
0.09130731225013733,
-0.0011438019573688507,
-0.5024879574775696,
0.06960369646549225,
0.4475243091583252,
0.11415156722068787,
0.03970051184296608,
0.00982397049665451,
0.2620304226875305,
0.3467405438423157,
-0.191277876496315,
0.06515687704086304,
0.01063511148095131,
0.24335503578186035,
-0.22024695575237274,
0.1489684134721756,
-0.24308031797409058,
-0.6849619746208191,
0.15391072630882263,
-0.3201885521411896,
0.4227408468723297,
-0.2068316489458084,
-0.3170440196990967,
0.11800993233919144,
0.1483718305826187,
-0.21063248813152313,
0.05930410698056221,
0.12788452208042145,
-0.03766888380050659,
-0.19003741443157196,
-0.19976554811000824,
-0.3536362648010254,
0.25611528754234314,
-0.1663145124912262,
0.060719843953847885,
-0.6542150974273682,
-0.0465177483856678,
0.03332563117146492,
0.09816500544548035,
-0.20188447833061218,
0.04225308448076248,
-0.08994003385305405,
-0.1974271982908249,
-0.1010819748044014,
0.07080650329589844,
0.2975809872150421,
0.2254045605659485,
0.04732435941696167,
0.5637586116790771,
0.32785671949386597,
-0.14561769366264343,
-0.031059695407748222,
-0.04028782993555069,
0.15764431655406952,
0.03116822987794876,
-0.314868688583374,
0.39959001541137695,
0.017900638282299042,
0.18586058914661407,
0.05462288111448288,
-0.10515452921390533,
0.2997896671295166,
0.14528895914554596,
-0.29456087946891785,
-0.27506744861602783,
0.009943079203367233,
0.22330902516841888,
0.22563375532627106,
0.029343795031309128,
-0.055339328944683075,
0.13966912031173706,
0.6361750364303589,
-0.12260685861110687,
-0.07823463529348373,
0.3057105243206024,
0.11784855276346207,
-0.05641452968120575,
0.1838943064212799,
0.24242208898067474,
0.22609111666679382,
0.18705257773399353,
-0.317473828792572,
0.11734814196825027,
0.15664005279541016,
-0.0789266973733902,
0.21454620361328125,
0.28345000743865967,
0.15195508301258087,
-0.133916437625885,
-0.08441644161939621,
0.0553835891187191,
-0.2775099277496338,
-0.4293062090873718,
0.13804927468299866,
0.1288050413131714,
-0.14030009508132935,
0.07734321057796478,
0.052201151847839355,
-0.17050853371620178,
-0.17604351043701172,
-0.1732831597328186,
-0.32311978936195374,
-0.2706339657306671,
0.0828084647655487,
-0.17476913332939148,
-0.43456047773361206,
0.19918614625930786,
-0.05599365383386612,
0.4694331884384155,
-0.21535621583461761,
-0.000426391139626503,
-0.3114266097545624,
-0.5332023501396179,
-0.13605639338493347,
0.053890425711870193,
0.11270567029714584,
-0.03430181369185448,
0.41486304998397827,
-0.27326568961143494,
0.21404464542865753,
0.023763079196214676,
-0.4051818549633026,
0.3494189977645874,
-0.04231890290975571,
0.15235280990600586,
0.21864084899425507,
0.20170104503631592,
0.24893395602703094,
-0.18646563589572906,
0.14759576320648193,
-0.2359701693058014,
0.012678677216172218,
-0.09191443771123886,
-0.08580753952264786,
-0.20678970217704773,
-0.16334690153598785,
-0.25013992190361023,
-0.3010872006416321,
-0.42893993854522705,
0.1478148251771927,
-0.25741878151893616,
0.2621954083442688,
0.34707552194595337,
-0.20047158002853394,
0.24366551637649536,
-0.13539664447307587,
-0.07695707678794861,
-0.21659308671951294,
-0.2895240783691406,
0.03535255789756775,
-0.20494744181632996,
-0.2731815576553345,
-0.2394779771566391,
-0.22022908926010132,
0.3644581437110901,
-0.2308267503976822,
-0.00511704757809639,
-0.18320782482624054,
-0.2046394646167755,
0.08010374009609222,
0.018780075013637543,
0.0402221754193306,
0.40909188985824585,
0.2830219864845276,
-0.033627334982156754,
-0.016368184238672256,
-0.3021303713321686,
0.19494156539440155,
0.2200498878955841,
-0.055637799203395844,
-0.050111979246139526,
0.10492879897356033,
-0.22940488159656525,
0.33677858114242554,
-0.06475083529949188,
-0.05868148431181908,
0.3066514730453491,
0.11075419932603836,
0.19199177622795105,
-0.022341765463352203,
-0.14947162568569183,
-0.2544218897819519,
-0.00618569552898407,
-0.04975500702857971,
0.31946444511413574,
-0.05562758445739746,
-0.13205677270889282,
-0.21265161037445068,
-0.18189862370491028,
-0.09051442891359329,
-0.28972434997558594,
0.4207727909088135,
-0.14152449369430542,
0.09065999835729599,
0.1790940910577774,
0.15741953253746033,
-0.3427201807498932,
0.1143527552485466,
0.16511622071266174,
0.041844625025987625,
0.07326680421829224,
-0.12319937348365784,
-0.4642176628112793,
-0.22268038988113403,
-0.1444840133190155,
0.18057505786418915,
0.11165338009595871,
0.19640673696994781,
-0.24177201092243195,
-0.17716553807258606,
-0.08083061873912811,
0.011882329359650612,
0.5268004536628723,
-0.2832423746585846,
-0.3508482575416565,
-0.16751854121685028,
-0.22392266988754272,
-0.3461296856403351,
-0.009876374155282974,
-0.2689279317855835,
-0.16032709181308746,
-0.0633215606212616,
0.6559942960739136,
-0.3388109505176544,
-0.3996838331222534,
0.0322427861392498,
0.13151971995830536,
-0.3257255256175995,
-0.13418540358543396,
-0.18890976905822754,
0.011953826993703842,
-0.36447668075561523,
0.01445835828781128,
0.10433661192655563,
-0.060799695551395416,
0.09471737593412399,
0.06240197643637657,
0.15372398495674133,
0.09794368594884872,
0.18807676434516907,
0.5753747224807739,
0.04830925911664963,
0.08614396303892136,
0.03140038624405861,
0.23542329668998718,
0.03825557604432106,
-0.17545032501220703,
0.42579492926597595,
-0.0764804482460022,
-0.39515265822410583,
0.2585758864879608,
-0.09434584528207779,
0.28894704580307007,
0.33842962980270386,
0.12010446190834045,
0.28367096185684204,
0.3034091889858246,
0.031757622957229614,
-0.5500662922859192,
0.20755286514759064,
-0.09167447686195374,
0.13283438980579376,
-0.5260714888572693,
-0.5451096296310425,
0.5570181012153625,
-0.22795741260051727,
-0.19769033789634705,
0.27717363834381104,
0.5089870691299438,
-0.3526621460914612,
0.9123684167861938,
0.15246915817260742,
1.1084340810775757,
-0.054811008274555206,
0.13798531889915466,
-0.06718170642852783,
-0.13163083791732788,
0.6533740758895874,
-0.25035732984542847,
-0.023991957306861877,
-0.3445451259613037,
-0.1354072391986847,
-0.15314777195453644,
0.012960467487573624,
0.17165648937225342,
0.1857561320066452,
-0.19391721487045288,
0.06958020478487015,
0.15830539166927338,
0.2496647834777832,
-0.03007405810058117,
0.6216822862625122,
-0.24237453937530518,
-0.6106575727462769,
-0.29026222229003906,
0.11436520516872406,
-0.2790738344192505,
0.14681485295295715,
-0.21934297680854797,
-0.2632598876953125,
-0.023908628150820732,
-0.2334556132555008,
-0.3153761625289917,
0.0462510883808136,
-0.18646302819252014,
0.08604103326797485,
0.05536390468478203,
0.1539575755596161,
0.3681294918060303,
-0.021693777292966843,
0.2100323885679245,
0.14742371439933777,
-0.3826734125614166,
0.2749299108982086,
-0.3086937963962555,
0.19732990860939026,
-0.03053775243461132,
-0.1301795244216919,
0.40404754877090454,
-0.007874216884374619,
-0.3833959400653839,
0.07913186401128769,
0.09437671303749084,
0.1567218154668808,
-0.29331153631210327,
-0.08479638397693634,
0.08655040711164474,
-0.23307207226753235,
-0.18934784829616547,
-0.17873430252075195,
-0.17852239310741425,
-0.1708911508321762,
0.16560441255569458,
0.02440684288740158,
-0.1765781193971634,
-0.005937911570072174,
0.34365057945251465,
-0.10681372880935669,
-0.13397632539272308,
0.060049112886190414,
-0.06143723428249359,
-0.2688608169555664,
0.15039214491844177,
0.1396767497062683,
-0.09550176560878754,
-0.332727313041687,
0.06714480370283127,
0.615333080291748,
-0.7979894280433655,
-0.1115790456533432,
0.13793568313121796,
-0.4788551926612854,
-0.23551951348781586,
0.05530896037817001,
0.2195444107055664,
-0.13698074221611023,
-0.026536982506513596,
-0.13558849692344666,
-0.5596526265144348,
0.36372482776641846,
0.0273795947432518,
0.3183022737503052,
0.1113317683339119,
-0.24917931854724884,
-0.08995883911848068,
0.2509218752384186,
-0.3652978837490082,
-0.30023193359375,
-0.19194771349430084,
0.14046646654605865,
0.10593748837709427,
-0.02080957591533661,
0.20705433189868927,
-0.26323091983795166,
0.04082535207271576,
0.05954486131668091,
-0.14738743007183075,
-0.20583459734916687,
-0.4715915322303772,
0.13600696623325348,
0.08946488052606583,
0.09789891541004181,
-0.01774289458990097,
0.06075626611709595,
0.0008758455514907837,
-0.26905760169029236,
0.30172497034072876,
0.040643371641635895,
0.07294037193059921,
0.44314104318618774,
0.18722346425056458,
0.1531600058078766,
-0.17011694610118866,
0.10106197744607925,
0.15444603562355042,
0.28768810629844666,
0.18417784571647644,
0.04443391412496567,
-0.19114303588867188,
0.006503112614154816,
0.0665549710392952,
0.35524430871009827,
0.3982798457145691,
0.16555801033973694,
-0.031912147998809814,
0.17548224329948425,
0.1569855660200119,
0.14469805359840393,
0.17449019849300385,
-0.025002941489219666,
-0.023416588082909584,
-0.07097650319337845,
0.22063958644866943,
0.2518118619918823,
-0.2796438932418823,
-0.029139749705791473,
0.055168718099594116,
-0.17263711988925934,
0.11988501250743866,
0.3938097059726715,
0.24041280150413513,
0.38568568229675293,
0.23733744025230408,
0.007071511819958687,
0.4475552439689636,
-0.017112411558628082,
0.2783038318157196,
0.3180747628211975,
-0.13871219754219055,
0.2306338995695114,
0.36599063873291016,
0.12157157063484192,
0.29668155312538147,
0.29004454612731934,
-0.1387050747871399,
0.5362277626991272,
-0.03054167330265045,
0.2637482285499573,
0.31862688064575195,
-0.17402921617031097,
-0.023357849568128586,
-0.25328201055526733,
-0.039478451013565063,
0.3661770522594452,
0.15943443775177002,
0.049678441137075424,
0.019129622727632523,
-0.04199542477726936,
-0.3721279501914978,
0.00714261457324028,
-0.2118385136127472,
-0.21431805193424225,
0.12230214476585388,
-0.09960773587226868,
-0.06544698774814606,
-0.08012111485004425,
0.12886974215507507,
-0.08355382084846497,
0.08216674625873566,
0.08336558938026428,
0.05505158007144928,
0.0924416035413742,
-0.044351726770401,
0.28412845730781555,
0.15140989422798157,
-0.17402346432209015,
0.007929645478725433,
0.2847810983657837,
-0.21195310354232788,
-0.17655086517333984,
0.2517412602901459,
0.010416992008686066,
0.014608677476644516,
-0.02780650183558464,
0.3269388675689697,
-0.06476561725139618,
0.008961161598563194,
-0.14398890733718872,
0.21207909286022186,
0.1631409376859665,
0.27981430292129517,
0.03950868919491768,
0.18135115504264832,
-0.14769016206264496,
-0.33691179752349854,
0.03169981390237808,
0.04339783638715744,
0.07183024287223816,
0.555158793926239,
0.11314630508422852,
-0.1915079653263092,
-0.22909817099571228,
0.14570066332817078,
-0.4025823771953583,
0.22724099457263947,
0.4693816900253296,
0.026205604895949364,
0.09149614721536636,
-0.19210192561149597,
0.07672769576311111,
-0.0010510589927434921,
0.6630334258079529,
0.13990087807178497,
0.05682280287146568,
-0.31887760758399963,
0.084304079413414,
-0.32789987325668335,
-0.019381709396839142,
0.15112145245075226,
0.3263741135597229,
0.2354477047920227,
-0.1954483836889267,
0.28083109855651855,
0.024284278973937035,
-0.09606307744979858,
0.12540049850940704,
-0.09459599107503891,
-0.06398241966962814,
-0.3499002158641815,
-0.07831533253192902,
-0.16597498953342438,
0.040102165192365646,
0.03767407685518265,
-0.218357115983963,
0.13931725919246674,
0.2182959020137787,
-0.08268637210130692,
-0.6502209305763245,
0.026177041232585907,
0.12070159614086151,
-0.14820390939712524,
0.28346511721611023,
0.16589894890785217,
0.22392511367797852,
-0.18765774369239807,
0.0959770455956459,
-0.2354927361011505,
-0.29073384404182434,
-0.06196077913045883,
0.242404967546463,
0.10795563459396362,
0.18459774553775787,
0.00010091625154018402,
-0.3099992573261261,
-0.42695558071136475,
-0.19744987785816193,
-0.12531480193138123,
-0.07295069098472595,
-0.4078349471092224,
0.16140705347061157,
-0.22803765535354614,
-0.01746569573879242,
0.03432570770382881,
0.21122142672538757,
0.14214405417442322,
-0.07704918831586838,
-0.0407206192612648,
-0.042190685868263245,
0.4437658190727234,
-0.19496551156044006,
-0.46279236674308777,
0.10603075474500656,
0.045042701065540314,
-0.1922324001789093,
-0.042944081127643585,
-0.7940798997879028,
0.12645450234413147,
0.09356188774108887,
-0.08195137977600098,
-0.21794041991233826,
0.4045417308807373,
0.2552134096622467,
0.01310008391737938,
-0.230876162648201,
0.4226367175579071,
0.09009571373462677,
-0.1586877554655075,
-0.20254571735858917,
-0.21292592585086823
] |
https://github.com/huggingface/datasets/issues/2345 | [Question] How to move and reuse preprocessed dataset? | <s>Hi :) Can you share with us the code you used ?</s>
EDIT: from https://github.com/huggingface/transformers/issues/11665#issuecomment-838348291 I understand you're using the run_clm.py script. Can you share your logs ?
| Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this? | 28 | [Question] How to move and reuse preprocessed dataset?
Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this?
<s>Hi :) Can you share with us the code you used ?</s>
EDIT: from https://github.com/huggingface/transformers/issues/11665#issuecomment-838348291 I understand you're using the run_clm.py script. Can you share your logs ?
| [
-0.16012437641620636,
-0.3261335492134094,
0.06538279354572296,
0.33965086936950684,
0.286460280418396,
0.17157283425331116,
0.1354575902223587,
0.18122465908527374,
-0.0809113159775734,
-0.15583758056163788,
-0.13778993487358093,
0.039877284318208694,
-0.16895942389965057,
0.05872010439634323,
0.29856806993484497,
-0.26737675070762634,
0.15522480010986328,
0.01882246881723404,
-0.32016173005104065,
0.047561995685100555,
-0.05998101085424423,
0.004169754683971405,
-0.05905507877469063,
-0.20079146325588226,
-0.4416157901287079,
-0.031377196311950684,
-0.24801518023014069,
0.1666659563779831,
0.1828494817018509,
-0.18625779449939728,
0.25329262018203735,
0.24204932153224945,
0.3576464056968689,
0.6828818917274475,
-0.00012436334509402514,
0.13355721533298492,
-0.272815465927124,
-0.2317272424697876,
-0.2766869366168976,
0.03312867879867554,
0.3927207887172699,
-0.12148616462945938,
-0.1350308209657669,
-0.18297016620635986,
-0.43992355465888977,
-0.3136431872844696,
-0.13450226187705994,
-0.42789897322654724,
0.7499090433120728,
0.16959509253501892,
0.042768340557813644,
-0.213215634226799,
-0.27782323956489563,
0.00850350596010685,
0.027856864035129547,
0.06359817832708359,
-0.014203974977135658,
0.1301349699497223,
0.29926860332489014,
0.056122250854969025,
0.27045151591300964,
0.02005191706120968,
-0.13393063843250275,
0.14008928835391998,
0.15269239246845245,
-0.2002476453781128,
-0.2576470375061035,
-0.00237400084733963,
0.20374158024787903,
-0.017766565084457397,
0.3946382403373718,
-0.5167757868766785,
-0.07368218153715134,
-0.32284489274024963,
0.0029747835360467434,
-0.5202159285545349,
-0.2885063588619232,
0.12190204858779907,
0.09309808909893036,
0.47450289130210876,
-0.4211559295654297,
-0.4792870283126831,
-0.12700919806957245,
-0.4231944680213928,
0.20904883742332458,
0.17585483193397522,
-0.03343352675437927,
0.2210969626903534,
-0.00027884170413017273,
0.34287136793136597,
0.24613380432128906,
0.0327332466840744,
-0.20686855912208557,
0.23028086125850677,
-0.038643527776002884,
0.04168073832988739,
-0.1857779324054718,
0.1895514875650406,
-0.03549100086092949,
0.3463308811187744,
-0.021985024213790894,
-0.2044130563735962,
0.3041282892227173,
-0.2163732945919037,
-0.031089767813682556,
0.3699342906475067,
-0.238205224275589,
0.3691023886203766,
0.061607010662555695,
-0.254856139421463,
-0.33969634771347046,
-0.2820076644420624,
-0.3452651798725128,
-0.07960677891969681,
0.3917405605316162,
0.34458786249160767,
0.13777096569538116,
-0.1579306572675705,
0.09674631804227829,
0.03251812979578972,
0.030501969158649445,
-0.3261359632015228,
-0.13528567552566528,
0.19699662923812866,
0.01509357150644064,
0.12617307901382446,
0.293851375579834,
0.08263643085956573,
-0.11281206458806992,
-0.3416503667831421,
-0.1811542510986328,
0.14554232358932495,
-0.33310118317604065,
0.34819960594177246,
0.028701413422822952,
-0.014870144426822662,
0.2117709219455719,
0.015366966836154461,
0.10506786406040192,
-0.11697367578744888,
0.4738585650920868,
-0.07936479151248932,
0.1513179987668991,
0.2509046494960785,
-0.13665489852428436,
0.24948330223560333,
0.29127249121665955,
0.34619325399398804,
-0.23795080184936523,
0.5287489891052246,
-0.21549946069717407,
-0.34981390833854675,
0.48907649517059326,
-0.06873677670955658,
0.028009437024593353,
0.1787002831697464,
-0.28509870171546936,
0.06609074026346207,
0.45317888259887695,
0.04260707274079323,
-0.03639853745698929,
-0.25887012481689453,
-0.15594354271888733,
-0.2766833007335663,
0.2264140248298645,
0.1548081487417221,
-0.3293088376522064,
-0.15834084153175354,
0.34454551339149475,
0.22852155566215515,
0.351931095123291,
0.3867344558238983,
-0.29955777525901794,
0.4961076080799103,
-0.2172495722770691,
-0.3410746455192566,
0.4171506464481354,
-0.3627423644065857,
-0.08318408578634262,
0.0610206201672554,
-0.058627597987651825,
0.029593976214528084,
0.039539411664009094,
0.07287809252738953,
-0.16417059302330017,
-0.32656362652778625,
-0.39166414737701416,
0.5252674221992493,
0.06572826951742172,
0.0954929068684578,
-0.30081692337989807,
-0.28642401099205017,
0.2404656559228897,
-0.18505504727363586,
0.07820732891559601,
0.1647511124610901,
-0.13512805104255676,
0.0696578398346901,
0.2654244005680084,
-0.1466570496559143,
0.1503959447145462,
0.21129348874092102,
0.17970095574855804,
0.10575120151042938,
-0.04256832227110863,
0.022896569222211838,
-0.40021196007728577,
0.12646520137786865,
-0.24174964427947998,
-0.28408196568489075,
0.3042551875114441,
-0.16354067623615265,
-0.2996504008769989,
-0.18779464066028595,
-0.2450944036245346,
-0.23756730556488037,
-0.08999375998973846,
0.16761073470115662,
0.48520582914352417,
-0.2807748019695282,
-0.21595114469528198,
0.40229329466819763,
-0.024898771196603775,
0.09422606229782104,
-0.06146535649895668,
0.2730468213558197,
-0.05323787033557892,
-0.1499195396900177,
-0.15675321221351624,
-0.14149022102355957,
0.3739396631717682,
-0.3398057222366333,
-0.10570695996284485,
0.3445957899093628,
0.031597841531038284,
0.13847580552101135,
0.09726299345493317,
0.3569541573524475,
-0.0082062017172575,
-0.22922173142433167,
0.27191096544265747,
-0.010220419615507126,
-0.027484219521284103,
-0.09119065850973129,
-0.31779542565345764,
0.37257206439971924,
0.026295673102140427,
0.17166976630687714,
0.09857384860515594,
-0.22304701805114746,
-0.12047860026359558,
-0.20005539059638977,
0.1363731175661087,
0.23610830307006836,
0.008320238441228867,
0.16062328219413757,
0.34460073709487915,
0.20634567737579346,
-0.04032670706510544,
0.24034449458122253,
0.3612615168094635,
0.05532706901431084,
-0.0649842843413353,
-0.1507967710494995,
-0.22886472940444946,
-0.30634182691574097,
0.06693344563245773,
0.06150037422776222,
0.04326406866312027,
0.06684113293886185,
0.2860628664493561,
0.2623818516731262,
0.05532344430685043,
-0.04617481306195259,
0.0767877846956253,
-0.2649206519126892,
0.4027981758117676,
0.050080105662345886,
0.01913975365459919,
0.06342068314552307,
0.22200703620910645,
0.4308409094810486,
0.2273503839969635,
0.4133347272872925,
-0.19753572344779968,
0.28977730870246887,
-0.22995314002037048,
0.1958618462085724,
-0.1645818054676056,
0.12513746321201324,
0.023575924336910248,
0.10686953365802765,
-0.216639444231987,
0.36308759450912476,
0.3512010872364044,
0.06731147319078445,
-0.001581486314535141,
0.06939388811588287,
-0.06739582121372223,
-0.25495660305023193,
-0.08744648098945618,
-0.2556747496128082,
-0.07445921003818512,
-0.08613993227481842,
0.2902083694934845,
-0.12083776295185089,
0.26387903094291687,
0.1115594431757927,
-0.07418400049209595,
-0.28307968378067017,
0.24498218297958374,
0.23415425419807434,
0.008220547810196877,
0.13758282363414764,
-0.14804957807064056,
0.32385551929473877,
0.14077579975128174,
0.2528512179851532,
-0.013953052461147308,
-0.14293980598449707,
-0.06608115881681442,
-0.16445884108543396,
-0.18600469827651978,
0.1651822328567505,
-0.079392209649086,
-0.2665187120437622,
-0.17224107682704926,
-0.04401069134473801,
0.16939714550971985,
0.1464497148990631,
0.015791434794664383,
-0.03709656745195389,
0.04608825966715813,
-0.22819043695926666,
0.3308413326740265,
0.19977334141731262,
-0.19720132648944855,
-0.7081508040428162,
0.18703114986419678,
-0.08555850386619568,
-0.13609513640403748,
0.018775414675474167,
0.11960960924625397,
0.20301923155784607,
0.22348423302173615,
-0.3637009859085083,
-0.133710116147995,
-0.14794786274433136,
0.07380083203315735,
-0.03952951729297638,
0.27163752913475037,
0.48049062490463257,
0.05773082748055458,
0.0834793820977211,
0.02195224165916443,
-0.08035367727279663,
0.38069504499435425,
0.13155627250671387,
0.1364147663116455,
0.1978854537010193,
0.2309722900390625,
0.13044022023677826,
0.8657284379005432,
0.14932383596897125,
-0.08539286255836487,
0.16922631859779358,
0.05962763726711273,
0.2112225890159607,
-0.30189481377601624,
-0.052155062556266785,
0.014780708588659763,
0.033352404832839966,
-0.3499488830566406,
0.17035932838916779,
0.020553402602672577,
-0.13422845304012299,
-0.11046045273542404,
0.09835262596607208,
-0.013528332114219666,
-0.20506149530410767,
0.17405067384243011,
0.057183463126420975,
0.4164000451564789,
0.170070081949234,
-0.05920194089412689,
-0.2642395496368408,
-0.09062135219573975,
0.08674953877925873,
-0.12534432113170624,
0.5051721334457397,
0.3344728648662567,
-0.49850478768348694,
-0.059376589953899384,
-0.4051252603530884,
0.2841690182685852,
-0.1172836571931839,
0.005669539328664541,
0.03324378654360771,
-0.1058061346411705,
0.20110145211219788,
-0.22896595299243927,
0.2696991562843323,
-0.1669822633266449,
0.08312608301639557,
0.35717442631721497,
-0.13331761956214905,
-0.003628091886639595,
-0.1654502898454666,
0.0012459643185138702,
0.20425066351890564,
0.25255274772644043,
-0.09186457097530365,
-0.23783418536186218,
-0.33946362137794495,
0.06861865520477295,
0.25824424624443054,
-0.5208461284637451,
0.06371700763702393,
-0.21251901984214783,
-0.47966909408569336,
-0.34960293769836426,
0.13028736412525177,
0.3499254584312439,
0.0401248037815094,
-0.19079715013504028,
0.3724319636821747,
-0.15830369293689728,
0.04891557991504669,
0.32826584577560425,
-0.08347269892692566,
0.38564974069595337,
0.13489021360874176,
0.12372826039791107,
0.11123862862586975,
0.18298138678073883,
0.016510775312781334,
0.291461318731308,
-0.2944534718990326,
0.38881200551986694,
-0.11822416633367538,
0.038346067070961,
0.3628849685192108,
0.29604819416999817,
-0.08488298952579498,
0.10075771063566208,
-0.19634272158145905,
0.11075843870639801,
-0.5120963454246521,
0.016059087589383125,
0.07578711956739426,
-0.0612056627869606,
-0.5460212230682373,
-0.7416174411773682,
0.002743236720561981,
0.31194812059402466,
-0.14137470722198486,
0.3256015181541443,
-0.1791393905878067,
-0.34823524951934814,
0.12492738664150238,
0.1337277740240097,
1.270158052444458,
-0.36826246976852417,
0.3932274878025055,
0.04073106497526169,
-0.06165239214897156,
0.2148333042860031,
-0.3995703458786011,
-0.048481330275535583,
-0.35408297181129456,
-0.19104106724262238,
0.04142133891582489,
-0.14020229876041412,
0.270131379365921,
0.1966874897480011,
-0.16862092912197113,
0.466683566570282,
-0.38777416944503784,
-0.18282905220985413,
-0.08219847828149796,
0.27410823106765747,
0.30675172805786133,
0.006217479705810547,
0.28448641300201416,
0.04411163926124573,
-0.25606292486190796,
0.03129919618368149,
-0.18875554203987122,
0.17665114998817444,
0.1492128223180771,
0.1573367416858673,
-0.32516276836395264,
-0.05472411960363388,
-0.5776569247245789,
0.10043254494667053,
-0.35108137130737305,
-0.454256534576416,
0.025712009519338608,
0.04670681431889534,
0.6525633931159973,
0.042726755142211914,
-0.04459426552057266,
0.2635800540447235,
-0.2201930582523346,
0.020986540243029594,
-0.20383073389530182,
0.17706887423992157,
0.3226626515388489,
0.07993096858263016,
-0.17618530988693237,
0.23241743445396423,
-0.00968744233250618,
-0.31733930110931396,
-0.15253616869449615,
-0.40096646547317505,
0.2816942632198334,
-0.28876829147338867,
-0.22855092585086823,
0.5524757504463196,
-0.014187144115567207,
-0.17868857085704803,
0.037779197096824646,
0.32035285234451294,
-0.31398072838783264,
0.3353337049484253,
-0.20602627098560333,
-0.2728106379508972,
-0.05205272510647774,
0.12358357012271881,
0.3762609660625458,
-0.3565502166748047,
0.40926218032836914,
0.2852987051010132,
-0.05035236477851868,
-0.07180175185203552,
-0.039705414324998856,
0.18626102805137634,
-0.41985026001930237,
0.2662215232849121,
0.031209738925099373,
0.056438133120536804,
0.0017469790764153004,
0.011773057281970978,
-0.0020348988473415375,
0.09725835919380188,
-0.11929161846637726,
0.16415353119373322,
-0.43604815006256104,
-0.1915823370218277,
0.24044987559318542,
0.4087910056114197,
0.21040594577789307,
0.053677868098020554,
-0.05889306962490082,
0.3609108626842499,
-0.20577746629714966,
0.14556977152824402,
0.05499942600727081,
0.14492183923721313,
0.24170340597629547,
-0.21051916480064392,
-0.011301646940410137,
-0.16702228784561157,
-0.05605684220790863,
-0.08157031238079071,
-0.09909121692180634,
-0.12872260808944702,
-0.37002602219581604,
0.22826312482357025,
-0.09820303320884705,
-0.062337249517440796,
-0.04294205829501152,
-0.5152865648269653,
0.03730989620089531,
-0.355905145406723,
0.1376359462738037,
0.293929785490036,
0.12370072305202484,
0.10710357129573822,
0.37441200017929077,
-0.3064485490322113,
-0.1304822862148285,
-0.0919969230890274,
0.11066809296607971,
-0.15355221927165985,
0.14881514012813568,
0.1349717378616333,
0.12690240144729614,
-0.11728671193122864,
-0.2406548410654068,
-0.024502180516719818,
0.548456609249115,
0.11060642451047897,
0.2084982991218567,
-0.16280660033226013,
-0.043651361018419266,
-0.11761397868394852,
0.19291658699512482,
0.03889920562505722,
-0.10154426842927933,
0.23501913249492645,
0.38353264331817627,
-0.043762512505054474,
-0.303484708070755,
0.22427621483802795,
0.2838374972343445,
-0.15231485664844513,
-0.18746213614940643,
0.4942163825035095,
0.37479835748672485,
0.46055853366851807,
-0.11841705441474915,
0.026678331196308136,
0.55528324842453,
-0.2129225730895996,
0.01997476816177368,
0.01000162586569786,
0.22588194906711578,
0.018315214663743973,
0.32310962677001953,
0.3641287684440613,
0.09607413411140442,
-0.005824193358421326,
-0.026235967874526978,
0.2425687164068222,
0.2165643274784088,
-0.026168350130319595,
-0.16564112901687622,
-0.39855629205703735,
-0.10742993652820587,
0.10019214451313019,
0.050280675292015076,
0.24423208832740784,
-0.2618635296821594,
0.23483192920684814,
0.2859801948070526,
-0.5793050527572632,
0.04399307817220688,
0.6533365845680237,
-0.08780193328857422,
-0.2688232362270355,
-0.14391647279262543,
-0.023238487541675568,
-0.174187570810318,
0.14524927735328674,
-0.06708544492721558,
-0.26452189683914185,
0.1441344916820526,
0.009660780429840088,
0.12447687983512878,
-0.003914114087820053,
0.12865349650382996,
0.0638972595334053,
0.07358173280954361,
0.02445599064230919,
0.3757624626159668,
0.13579176366329193,
-0.1839974820613861,
-0.0558847151696682,
0.012155137024819851,
0.1858714073896408,
-0.08887878805398941,
-0.22008609771728516,
0.325059711933136,
0.05658210068941116,
0.17787551879882812,
-0.10810568928718567,
0.0461844727396965,
-0.27071070671081543,
-0.07793822884559631,
-0.15021628141403198,
-0.05633702874183655,
0.005087709985673428,
-0.09750556945800781,
-0.2703384459018707,
-0.018438011407852173,
-0.08285823464393616,
0.5797551870346069,
0.2944808304309845,
-0.36804118752479553,
-0.0814160481095314,
0.3954348564147949,
-0.35132429003715515,
0.17194272577762604,
0.723590612411499,
-0.04041636362671852,
0.1165965273976326,
-0.10811672359704971,
-0.00023557059466838837,
0.3333338797092438,
0.24986037611961365,
0.21393811702728271,
0.06595022231340408,
-0.28394651412963867,
-0.27101773023605347,
-0.5490260124206543,
-0.07664642482995987,
-0.11911971867084503,
0.15204724669456482,
-0.07258830964565277,
0.04088073968887329,
0.28855976462364197,
-0.14871689677238464,
0.27673107385635376,
-0.018230212852358818,
0.29158905148506165,
0.182594433426857,
-0.20950111746788025,
-0.19717256724834442,
-0.1070292741060257,
0.4269377887248993,
0.02585715800523758,
-0.29443514347076416,
-0.008118633180856705,
0.4932321608066559,
-0.11124049872159958,
-0.33964210748672485,
0.06012691557407379,
0.012249242514371872,
0.10717406868934631,
0.2979596257209778,
-0.033613696694374084,
0.010399296879768372,
0.17519566416740417,
0.09916368126869202,
-0.10639534890651703,
0.18401455879211426,
-0.03183796629309654,
-0.26522842049598694,
-0.25967028737068176,
0.12237085402011871,
-0.6407400965690613,
-0.3083280026912689,
-0.45386889576911926,
-0.33857691287994385,
0.14369958639144897,
-0.04207929968833923,
-0.4410835802555084,
-0.24718664586544037,
-0.2558819353580475,
0.37395337224006653,
0.3258476257324219,
0.39890143275260925,
-0.16534359753131866,
0.009337924420833588,
-0.5237105488777161,
0.11571250855922699,
0.7863520979881287,
-0.02775115892291069,
-0.45559218525886536,
0.009499366395175457,
0.035279303789138794,
0.09275472909212112,
0.014647884294390678,
-0.2981969118118286,
0.12914323806762695,
0.237613245844841,
-0.04241102188825607,
-0.22377167642116547,
0.44079041481018066,
-0.32159286737442017,
0.09966112673282623,
0.04517395421862602,
0.35378018021583557,
0.005990630015730858,
-0.24018849432468414,
-0.43620240688323975,
-0.06648870557546616
] |
https://github.com/huggingface/datasets/issues/2345 | [Question] How to move and reuse preprocessed dataset? | Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same | Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this? | 33 | [Question] How to move and reuse preprocessed dataset?
Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this?
Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same | [
-0.23785878717899323,
-0.1530076414346695,
0.041656073182821274,
0.3084847331047058,
0.18331724405288696,
0.21348834037780762,
-0.05760854855179787,
0.2500767409801483,
-0.10958105325698853,
-0.2252918928861618,
-0.04646354168653488,
0.15800440311431885,
-0.12602251768112183,
-0.03571673110127449,
0.27025407552719116,
-0.19030451774597168,
0.19263984262943268,
-0.05153074860572815,
-0.2087465524673462,
-0.005713660269975662,
-0.05119887739419937,
-0.035019852221012115,
-0.022217456251382828,
-0.2187885195016861,
-0.34875214099884033,
-0.14322218298912048,
-0.2869340479373932,
0.157749205827713,
0.14091244339942932,
-0.2185288518667221,
0.14966648817062378,
0.19886496663093567,
0.3916563391685486,
0.5650047659873962,
-0.00012597382010426372,
0.08032119274139404,
-0.2605282664299011,
-0.19953101873397827,
-0.26371926069259644,
0.0004301220178604126,
0.4051913917064667,
-0.14694643020629883,
-0.1489049643278122,
-0.11501950025558472,
-0.4202829897403717,
-0.38495850563049316,
-0.1287568211555481,
-0.5107625126838684,
0.5873052477836609,
0.20248441398143768,
0.025847552344202995,
-0.4192655086517334,
-0.3031594455242157,
-0.0005874562775716186,
0.07715535908937454,
-0.10913294553756714,
0.02814044989645481,
0.17722056806087494,
0.2982751131057739,
0.06347930431365967,
0.2317207157611847,
-0.005960568320006132,
-0.16951468586921692,
0.22839461266994476,
0.08964025974273682,
-0.2463834136724472,
-0.2650190591812134,
0.010324593633413315,
0.21332955360412598,
-0.07821143418550491,
0.37871643900871277,
-0.5245105624198914,
-0.04089207947254181,
-0.302162230014801,
0.04407859593629837,
-0.6296888589859009,
-0.2901811897754669,
0.1405390053987503,
0.08987359702587128,
0.3329519033432007,
-0.3665984869003296,
-0.5225887894630432,
-0.027164943516254425,
-0.3522258400917053,
0.23708009719848633,
0.17141517996788025,
-0.016060873866081238,
0.20469769835472107,
0.017326947301626205,
0.35915786027908325,
0.3000124990940094,
0.06836768239736557,
-0.2626773715019226,
0.17619012296199799,
0.009651567786931992,
0.1386130154132843,
-0.10809087008237839,
0.30317234992980957,
-0.05753502994775772,
0.39151954650878906,
0.023515615612268448,
-0.23915231227874756,
0.3578469157218933,
-0.19922402501106262,
-0.0719342976808548,
0.2576839327812195,
-0.16834652423858643,
0.27665379643440247,
0.010220993310213089,
-0.3261595666408539,
-0.425462543964386,
-0.30589592456817627,
-0.34179115295410156,
-0.15319788455963135,
0.3950907588005066,
0.36230483651161194,
0.04954393208026886,
-0.19941648840904236,
0.07791569828987122,
0.12613128125667572,
-0.06755585968494415,
-0.36042165756225586,
-0.1975090354681015,
0.11432024836540222,
-0.03640652075409889,
0.06734606623649597,
0.21854092180728912,
0.10093094408512115,
-0.10917358845472336,
-0.43409812450408936,
-0.1762935072183609,
0.14030887186527252,
-0.33422815799713135,
0.4014987349510193,
0.01006333902478218,
-0.13991911709308624,
0.30739402770996094,
0.10289688408374786,
0.04523773491382599,
-0.14457353949546814,
0.4853771924972534,
-0.14543411135673523,
0.22677698731422424,
0.1687612235546112,
-0.09333443641662598,
0.1907973289489746,
0.30866390466690063,
0.4347535967826843,
-0.21615079045295715,
0.5089272260665894,
-0.2469208836555481,
-0.3078393042087555,
0.5280898809432983,
-0.07910837978124619,
0.05584698170423508,
0.1770816296339035,
-0.1443101167678833,
0.10374410450458527,
0.4253028333187103,
0.052826885133981705,
-0.03524138778448105,
-0.2709806561470032,
-0.19385017454624176,
-0.28528130054473877,
0.23838385939598083,
0.09726212918758392,
-0.3305191397666931,
-0.06297023594379425,
0.3851656913757324,
0.34164124727249146,
0.36172759532928467,
0.20831453800201416,
-0.24224573373794556,
0.4805539846420288,
-0.2082834392786026,
-0.3495693802833557,
0.4447627663612366,
-0.27325648069381714,
-0.01261921413242817,
0.059203315526247025,
0.00023061037063598633,
-0.009672127664089203,
0.028369195759296417,
0.054213788360357285,
-0.1592286229133606,
-0.26209449768066406,
-0.3656529188156128,
0.4215672016143799,
0.006927516311407089,
0.0015505868941545486,
-0.323552668094635,
-0.1850040853023529,
0.20350129902362823,
-0.2905149459838867,
0.0656411424279213,
0.13886308670043945,
-0.03448530286550522,
-0.03019142895936966,
0.20496982336044312,
-0.08198846876621246,
0.08434900641441345,
0.19556204974651337,
0.1572897732257843,
0.1549065113067627,
-0.10082103312015533,
0.07081302255392075,
-0.23960065841674805,
0.0875392034649849,
-0.16136762499809265,
-0.39618119597435,
0.44017553329467773,
-0.09771944582462311,
-0.2322435975074768,
-0.24173381924629211,
-0.1962096244096756,
-0.19001391530036926,
-0.07407638430595398,
0.2564919590950012,
0.4803420901298523,
-0.24775509536266327,
-0.13381735980510712,
0.41303667426109314,
-0.11295457929372787,
0.008651445619761944,
0.0035675857216119766,
0.16173994541168213,
-0.002603793516755104,
-0.18925173580646515,
-0.05390351265668869,
-0.1240684762597084,
0.41594696044921875,
-0.2461104691028595,
-0.0509941428899765,
0.31926441192626953,
0.09498962014913559,
0.060570184141397476,
0.07526911050081253,
0.2710302174091339,
-0.1237047091126442,
-0.11996603012084961,
0.3089158833026886,
-0.12303444743156433,
-0.08587991446256638,
-0.13370861113071442,
-0.20276722311973572,
0.35106155276298523,
0.12170973420143127,
0.15867634117603302,
0.11185573041439056,
-0.2967463433742523,
-0.13903330266475677,
-0.12289045751094818,
0.21264170110225677,
0.22220516204833984,
0.08911944925785065,
0.14002031087875366,
0.3727264404296875,
0.13292184472084045,
-0.1442527174949646,
0.3077136278152466,
0.2793324589729309,
0.13693127036094666,
-0.06440723687410355,
-0.16296744346618652,
-0.17813202738761902,
-0.34204238653182983,
0.10873612016439438,
0.016905587166547775,
0.03218468278646469,
0.04116577282547951,
0.3943568766117096,
0.3003910481929779,
-0.009594240225851536,
-0.0722704529762268,
0.012082688510417938,
-0.3623248338699341,
0.4106181263923645,
0.06696606427431107,
-0.0287394430488348,
0.05990225076675415,
0.26837000250816345,
0.495193749666214,
0.2788163721561432,
0.45210039615631104,
-0.1961212158203125,
0.21681536734104156,
-0.30172455310821533,
0.12974390387535095,
-0.12247936427593231,
0.16066665947437286,
0.06393269449472427,
0.07586397975683212,
-0.2171611189842224,
0.3982006311416626,
0.384476900100708,
0.05360392481088638,
-0.136561319231987,
0.07622863352298737,
-0.14812347292900085,
-0.20675687491893768,
0.005270443856716156,
-0.317188560962677,
-0.14346474409103394,
-0.08256767690181732,
0.29539600014686584,
-0.12938570976257324,
0.358415812253952,
0.09575805068016052,
-0.0763692706823349,
-0.2998501658439636,
0.3141583502292633,
0.15876036882400513,
0.08248387277126312,
0.1322537362575531,
-0.19299909472465515,
0.265924334526062,
0.10275709629058838,
0.2607208490371704,
-0.036482181400060654,
-0.11003272980451584,
-0.06440351903438568,
-0.19948746263980865,
-0.24382492899894714,
0.15602388978004456,
-0.0177238080650568,
-0.28507474064826965,
-0.09290666878223419,
0.017415892332792282,
0.042619578540325165,
0.23858503997325897,
0.02284732460975647,
-0.1819276511669159,
0.055591028183698654,
-0.2618442475795746,
0.30498236417770386,
0.25636816024780273,
-0.2394012063741684,
-0.7709587216377258,
0.14796605706214905,
-0.128196582198143,
-0.03326710686087608,
0.0822988748550415,
0.1963886022567749,
0.29008206725120544,
0.2994527220726013,
-0.41899871826171875,
-0.11117516458034515,
-0.032109782099723816,
0.14026863873004913,
-0.07524580508470535,
0.21256287395954132,
0.36017316579818726,
0.04972408339381218,
0.056432388722896576,
0.007619831711053848,
-0.08855892717838287,
0.37899065017700195,
0.06662881374359131,
0.1641150861978531,
0.20583847165107727,
0.30592405796051025,
0.17005838453769684,
0.7813286185264587,
0.20206090807914734,
-0.11953160166740417,
0.2247864007949829,
0.07024794816970825,
0.25247442722320557,
-0.3247462213039398,
0.05427706241607666,
0.16149084270000458,
0.03513830155134201,
-0.3057979941368103,
0.08492592722177505,
-0.019171707332134247,
-0.11129056662321091,
-0.12504330277442932,
0.1055365800857544,
-0.030705470591783524,
-0.12236692011356354,
0.16007879376411438,
-0.136875182390213,
0.44176098704338074,
0.1152697205543518,
-0.059714484959840775,
-0.3022229075431824,
-0.11328818649053574,
0.04530927911400795,
-0.21385936439037323,
0.5286320447921753,
0.41355523467063904,
-0.46549108624458313,
-0.051719844341278076,
-0.38036414980888367,
0.3111928105354309,
-0.11609359085559845,
0.06818736344575882,
0.03439059481024742,
-0.11867717653512955,
0.13503235578536987,
-0.2068353295326233,
0.09614904224872589,
-0.2219337373971939,
0.08728602528572083,
0.3639414608478546,
-0.006169162690639496,
0.10040821880102158,
-0.2459688037633896,
0.03812485560774803,
0.3307685852050781,
0.2019871175289154,
-0.18755924701690674,
-0.16587916016578674,
-0.30085718631744385,
0.04667132720351219,
0.2752126157283783,
-0.4799247086048126,
0.1115134209394455,
-0.2050667703151703,
-0.4821569621562958,
-0.21873392164707184,
0.21057134866714478,
0.25675395131111145,
0.06959285587072372,
-0.17358358204364777,
0.38100722432136536,
-0.17154459655284882,
0.01671069860458374,
0.3543286919593811,
-0.08668124675750732,
0.3993425667285919,
0.17086882889270782,
0.14616937935352325,
0.06032654270529747,
0.2983470559120178,
0.13288915157318115,
0.27681416273117065,
-0.4191562533378601,
0.4938597083091736,
-0.12471842020750046,
0.002068750560283661,
0.37094950675964355,
0.1941186636686325,
-0.132517471909523,
0.10681212693452835,
-0.31221675872802734,
0.0476854108273983,
-0.43043777346611023,
0.020357100293040276,
0.04583980143070221,
-0.10626167058944702,
-0.5128151774406433,
-0.8027756214141846,
-0.015952937304973602,
0.3981412351131439,
-0.1304422914981842,
0.41577497124671936,
-0.3875635266304016,
-0.29671409726142883,
-0.032983094453811646,
0.25220152735710144,
1.1055430173873901,
-0.2789766788482666,
0.3033004701137543,
-0.012561358511447906,
-0.1085079163312912,
0.18009726703166962,
-0.34060007333755493,
-0.03759177029132843,
-0.26079222559928894,
-0.156931534409523,
0.0234981682151556,
-0.11653532087802887,
0.2680087089538574,
0.22125686705112457,
-0.09872487187385559,
0.4781956672668457,
-0.39810067415237427,
-0.2551437318325043,
-0.09450326859951019,
0.20805388689041138,
0.28844597935676575,
0.16945435106754303,
0.4030931293964386,
0.048677921295166016,
-0.2707051634788513,
-0.07892104983329773,
-0.1453620195388794,
0.24967628717422485,
0.18755163252353668,
0.21183352172374725,
-0.3258017301559448,
-0.0970601737499237,
-0.6363193392753601,
-0.0228218212723732,
-0.46884480118751526,
-0.5695711374282837,
-0.06409604847431183,
0.027000052854418755,
0.6920269131660461,
-0.078373983502388,
0.05217874050140381,
0.192274272441864,
-0.10541906207799911,
-0.00012523272016551346,
-0.13126611709594727,
0.10473012924194336,
0.3144969642162323,
0.03210659325122833,
-0.09769640117883682,
0.2907635569572449,
0.0027103926986455917,
-0.31395798921585083,
-0.23783114552497864,
-0.3568243384361267,
0.2640896737575531,
-0.2140870839357376,
-0.22810858488082886,
0.5874049067497253,
0.09750629961490631,
-0.14917786419391632,
0.026064448058605194,
0.29767906665802,
-0.23883941769599915,
0.35823479294776917,
-0.33149537444114685,
-0.23712638020515442,
-0.055278655141592026,
0.09359364211559296,
0.32665523886680603,
-0.32534319162368774,
0.35273507237434387,
0.22977431118488312,
-0.06812463700771332,
-0.04923994839191437,
-0.07661636173725128,
0.1966189593076706,
-0.19451406598091125,
0.24312597513198853,
0.028232069686055183,
0.14771263301372528,
0.0749344527721405,
-0.12441094219684601,
-0.020303994417190552,
0.16624389588832855,
-0.0029203444719314575,
0.17605987191200256,
-0.29192593693733215,
-0.22856678068637848,
0.23357895016670227,
0.32546108961105347,
0.14555779099464417,
0.03578951209783554,
-0.036204177886247635,
0.3847227394580841,
-0.1643301546573639,
0.1703975349664688,
0.1472102403640747,
0.1958286017179489,
0.09670963883399963,
-0.027839362621307373,
-0.15058782696723938,
-0.07951468229293823,
-0.061350367963314056,
-0.07198846340179443,
-0.042462799698114395,
-0.10175496339797974,
-0.30528146028518677,
0.22708004713058472,
-0.13142022490501404,
0.01051255688071251,
0.025407548993825912,
-0.5276866555213928,
0.06009160727262497,
-0.2723102867603302,
0.04100443795323372,
0.25223737955093384,
0.07614471018314362,
0.10772596299648285,
0.3695375621318817,
-0.23981747031211853,
-0.01739920862019062,
-0.11289793252944946,
0.09502417594194412,
-0.07661508023738861,
0.1053006649017334,
0.20430079102516174,
0.21238093078136444,
-0.10243098437786102,
-0.1405514031648636,
-0.09461820870637894,
0.3850335478782654,
0.09947783499956131,
0.06076497212052345,
-0.16669374704360962,
-0.0035703927278518677,
-0.07910855114459991,
0.15110082924365997,
0.12830853462219238,
-0.021395228803157806,
0.18411147594451904,
0.4707876145839691,
-0.05095210671424866,
-0.30818304419517517,
0.1896890103816986,
0.2716934382915497,
-0.11237882822751999,
-0.19972556829452515,
0.45461973547935486,
0.39582034945487976,
0.3837065100669861,
-0.1981135755777359,
-0.05022919923067093,
0.42995306849479675,
-0.2597354054450989,
0.013986616395413876,
0.0014536082744598389,
0.3135935664176941,
0.005233485251665115,
0.2828737497329712,
0.3944243788719177,
-0.010801546275615692,
-0.0037894323468208313,
-0.009747929871082306,
0.3508376181125641,
0.38818472623825073,
-0.09304776787757874,
-0.21046575903892517,
-0.4430539011955261,
-0.09842854738235474,
0.14308646321296692,
0.10505902767181396,
0.27532923221588135,
-0.32741233706474304,
0.21625572443008423,
0.34005069732666016,
-0.6805122494697571,
0.10706868022680283,
0.5620389580726624,
-0.10465127974748611,
-0.26444482803344727,
-0.30835965275764465,
-0.07166017591953278,
-0.11368592083454132,
0.2115544080734253,
-0.06496308743953705,
-0.26482266187667847,
0.09528035670518875,
0.0017644315958023071,
0.07347308844327927,
-0.05376651883125305,
0.06909945607185364,
-0.021605193614959717,
0.03956777602434158,
0.06848986446857452,
0.4542488753795624,
0.07318660616874695,
-0.2653937041759491,
0.027685172855854034,
-0.032373927533626556,
0.1969396322965622,
-0.013179387897253036,
-0.1961672157049179,
0.29020556807518005,
0.10383300483226776,
0.1731048822402954,
-0.16795583069324493,
0.04508019983768463,
-0.20117047429084778,
-0.19191451370716095,
-0.13372394442558289,
-0.07895074784755707,
0.06492724269628525,
0.06937244534492493,
-0.27457916736602783,
-0.03636251389980316,
-0.04632947966456413,
0.48641642928123474,
0.3417537808418274,
-0.3559110462665558,
-0.017514441162347794,
0.4189004600048065,
-0.28054720163345337,
0.1513669192790985,
0.7690739035606384,
-0.03261918947100639,
0.045784540474414825,
-0.11324038356542587,
-0.005276977084577084,
0.2971605062484741,
0.23742538690567017,
0.1925993263721466,
0.0036203525960445404,
-0.2640182375907898,
-0.371471107006073,
-0.4844546318054199,
-0.042769499123096466,
-0.27414387464523315,
0.15246786177158356,
-0.13314031064510345,
0.07441741228103638,
0.25403323769569397,
-0.16761577129364014,
0.2727188467979431,
0.03359406068921089,
0.28130078315734863,
0.2858586311340332,
-0.2592863440513611,
-0.27759966254234314,
-0.1374000608921051,
0.46016964316368103,
0.05572930723428726,
-0.1455204039812088,
-0.06029898300766945,
0.39545753598213196,
-0.10138601809740067,
-0.3069753646850586,
-0.02616819366812706,
0.09529852867126465,
0.21491739153862,
0.3513467311859131,
-0.057654447853565216,
-0.02383105456829071,
0.14551159739494324,
0.13768765330314636,
-0.14066287875175476,
0.25951677560806274,
-0.04162409529089928,
-0.1788039207458496,
-0.29747679829597473,
-0.0157371386885643,
-0.6356418132781982,
-0.2866192162036896,
-0.4114285111427307,
-0.24975870549678802,
0.15432597696781158,
0.020092854276299477,
-0.2996421754360199,
-0.2943602204322815,
-0.11231579631567001,
0.34625720977783203,
0.33606475591659546,
0.41515785455703735,
-0.19476857781410217,
0.0636700838804245,
-0.5413556098937988,
0.14313547313213348,
0.6640558838844299,
-0.028307735919952393,
-0.31563785672187805,
-0.06690431386232376,
0.06137148663401604,
0.11238305270671844,
0.08195243775844574,
-0.23636025190353394,
0.10802572220563889,
0.2914656400680542,
-0.07504793256521225,
-0.18936532735824585,
0.4150596857070923,
-0.30938559770584106,
0.12590853869915009,
0.046756427735090256,
0.2780728340148926,
0.021297991275787354,
-0.24348331987857819,
-0.4002307057380676,
-0.06116388738155365
] |
https://github.com/huggingface/datasets/issues/2345 | [Question] How to move and reuse preprocessed dataset? | > Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same
I only changed the `preprocessing_num_workers` maybe it is the problem~ I will try again~ | Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this? | 48 | [Question] How to move and reuse preprocessed dataset?
Hi, I am training a gpt-2 from scratch using run_clm.py.
I want to move and reuse the preprocessed dataset (It take 2 hour to preprocess),
I tried to :
copy path_to_cache_dir/datasets to new_cache_dir/datasets
set export HF_DATASETS_CACHE="new_cache_dir/"
but the program still re-preprocess the whole dataset without loading cache.
I also tried to torch.save(lm_datasets, fw), but the saved file is only 14M.
What is the proper way to do this?
> Also note that for the caching to work, you must reuse the exact same parameters as in the first run. Did you change any parameter ? The `preprocessing_num_workers` should also stay the same
I only changed the `preprocessing_num_workers` maybe it is the problem~ I will try again~ | [
-0.23027920722961426,
-0.18237099051475525,
0.04121720418334007,
0.3404654860496521,
0.19807082414627075,
0.20862597227096558,
-0.037507008761167526,
0.25146156549453735,
-0.10370387136936188,
-0.20876769721508026,
-0.031436383724212646,
0.16302546858787537,
-0.13057363033294678,
-0.04403063654899597,
0.2582705020904541,
-0.19118382036685944,
0.1755550354719162,
-0.045262351632118225,
-0.19152700901031494,
-0.016570284962654114,
-0.053558263927698135,
-0.025110187008976936,
-0.032136283814907074,
-0.21022184193134308,
-0.354828417301178,
-0.12174566835165024,
-0.2918243706226349,
0.16535773873329163,
0.14795134961605072,
-0.20462891459465027,
0.15729816257953644,
0.17879348993301392,
0.40922001004219055,
0.5932114720344543,
-0.00012621936912182719,
0.060590699315071106,
-0.2513771057128906,
-0.1923409253358841,
-0.2729697525501251,
-0.018612191081047058,
0.3915594220161438,
-0.13809219002723694,
-0.14161823689937592,
-0.12926453351974487,
-0.4168548583984375,
-0.354006290435791,
-0.13188372552394867,
-0.5027409195899963,
0.6082744598388672,
0.20239025354385376,
0.03399375081062317,
-0.4183066785335541,
-0.30589181184768677,
-0.00011698517482727766,
0.0776553526520729,
-0.10235045850276947,
0.010761847719550133,
0.19950765371322632,
0.3009854853153229,
0.06557998806238174,
0.2533353865146637,
-0.005452628247439861,
-0.1913248896598816,
0.21613015234470367,
0.07716747373342514,
-0.24895836412906647,
-0.24196699261665344,
-0.0063000209629535675,
0.2172265648841858,
-0.06449713557958603,
0.3854008615016937,
-0.49558666348457336,
-0.02141452766954899,
-0.2836807072162628,
0.052571699023246765,
-0.6237025856971741,
-0.28474846482276917,
0.15358440577983856,
0.07427893579006195,
0.3391978144645691,
-0.36947423219680786,
-0.5197534561157227,
-0.028642211109399796,
-0.3435760736465454,
0.24527421593666077,
0.15273277461528778,
-0.03639542683959007,
0.21966272592544556,
-0.006444405764341354,
0.3711719512939453,
0.3126401901245117,
0.06752841174602509,
-0.26235777139663696,
0.17335115373134613,
-0.018106210976839066,
0.13033755123615265,
-0.11845550686120987,
0.3414284288883209,
-0.05967921018600464,
0.3688020706176758,
0.01898862048983574,
-0.21778631210327148,
0.3481888771057129,
-0.1931372880935669,
-0.06107025220990181,
0.2535795271396637,
-0.1575443148612976,
0.26744237542152405,
0.015301890671253204,
-0.3059370517730713,
-0.44100189208984375,
-0.30647122859954834,
-0.33552443981170654,
-0.17662250995635986,
0.4219074547290802,
0.37313413619995117,
0.05365496128797531,
-0.2267652302980423,
0.06512220948934555,
0.11510243266820908,
-0.09631079435348511,
-0.3628314435482025,
-0.18811650574207306,
0.11919093132019043,
-0.02679753303527832,
0.061993975192308426,
0.229840949177742,
0.11359543353319168,
-0.13001114130020142,
-0.4259296655654907,
-0.17846442759037018,
0.12098222970962524,
-0.36206358671188354,
0.40471386909484863,
0.017049193382263184,
-0.1473717838525772,
0.2812187075614929,
0.13470083475112915,
0.05767802149057388,
-0.15785661339759827,
0.4618591070175171,
-0.16006332635879517,
0.22256818413734436,
0.15691988170146942,
-0.08888080716133118,
0.21682417392730713,
0.30717337131500244,
0.4267370104789734,
-0.20223236083984375,
0.5157366991043091,
-0.2954547703266144,
-0.2999771535396576,
0.5050638318061829,
-0.08357887715101242,
0.07639365643262863,
0.20000311732292175,
-0.14160007238388062,
0.07938151061534882,
0.4280877411365509,
0.05876314267516136,
-0.03154229372739792,
-0.29421496391296387,
-0.19643741846084595,
-0.2926189601421356,
0.22954347729682922,
0.09536595642566681,
-0.3276762068271637,
-0.05931231752038002,
0.3742055594921112,
0.3352855443954468,
0.3759859800338745,
0.2220868170261383,
-0.24647638201713562,
0.46642035245895386,
-0.23966249823570251,
-0.3466237187385559,
0.44738349318504333,
-0.2679070830345154,
-0.015727361664175987,
0.07455848902463913,
-0.0023966431617736816,
-0.0045467279851436615,
0.017856664955615997,
0.03990533575415611,
-0.17056207358837128,
-0.26121431589126587,
-0.3734623193740845,
0.4028818607330322,
0.018268398940563202,
-0.018143776804208755,
-0.3461933434009552,
-0.1834285706281662,
0.21441809833049774,
-0.28156578540802,
0.06429985165596008,
0.1546643078327179,
-0.023660041391849518,
-0.03973514586687088,
0.2138565182685852,
-0.07063445448875427,
0.08128783106803894,
0.21073901653289795,
0.15814988315105438,
0.1610250174999237,
-0.08663509041070938,
0.0636221244931221,
-0.24183395504951477,
0.09508358687162399,
-0.18585027754306793,
-0.37369194626808167,
0.42662811279296875,
-0.07928632199764252,
-0.230980783700943,
-0.25797775387763977,
-0.20687083899974823,
-0.1903485208749771,
-0.07725575566291809,
0.2529398798942566,
0.4489649832248688,
-0.2513563632965088,
-0.1035173237323761,
0.42619985342025757,
-0.10116253793239594,
-0.006149264518171549,
0.012942144647240639,
0.18107378482818604,
-0.019684286788105965,
-0.19416657090187073,
-0.06440994143486023,
-0.11356248706579208,
0.45281264185905457,
-0.25041329860687256,
-0.07202417403459549,
0.3093146085739136,
0.08099491149187088,
0.03778330236673355,
0.06120778247714043,
0.2628933787345886,
-0.12487009912729263,
-0.14187167584896088,
0.29705604910850525,
-0.10962264239788055,
-0.08127804100513458,
-0.1403723955154419,
-0.18648993968963623,
0.30853092670440674,
0.12512324750423431,
0.1671193242073059,
0.09392300248146057,
-0.2757715880870819,
-0.13863536715507507,
-0.1613757163286209,
0.23555591702461243,
0.20983126759529114,
0.09031650424003601,
0.1427326798439026,
0.38337308168411255,
0.12530016899108887,
-0.15119411051273346,
0.30497393012046814,
0.2918564975261688,
0.15685594081878662,
-0.06599964946508408,
-0.1570335030555725,
-0.1817948818206787,
-0.3211260437965393,
0.08391123265028,
0.025723200291395187,
0.06249665468931198,
0.04988282173871994,
0.3670089542865753,
0.29067546129226685,
0.0059050871059298515,
-0.08496303856372833,
0.027596190571784973,
-0.3611501455307007,
0.42451906204223633,
0.08339409530162811,
-0.03294111043214798,
0.06889569014310837,
0.2673465609550476,
0.4997729957103729,
0.27032941579818726,
0.45328307151794434,
-0.22019687294960022,
0.20374521613121033,
-0.3384391963481903,
0.14291861653327942,
-0.14214491844177246,
0.17709682881832123,
0.0565391406416893,
0.06768489629030228,
-0.21874426305294037,
0.3874479830265045,
0.3927195072174072,
0.05597752332687378,
-0.11535467207431793,
0.07608498632907867,
-0.15754075348377228,
-0.1825379878282547,
-0.021274127066135406,
-0.30344313383102417,
-0.1745169758796692,
-0.08934289962053299,
0.31289947032928467,
-0.11447128653526306,
0.3428848087787628,
0.09563446789979935,
-0.08548711985349655,
-0.3158888518810272,
0.3085271120071411,
0.1482352763414383,
0.07990297675132751,
0.17361365258693695,
-0.19991734623908997,
0.2825096845626831,
0.0987996757030487,
0.26414692401885986,
-0.017163630574941635,
-0.11961346864700317,
-0.07318992167711258,
-0.19013367593288422,
-0.2272614687681198,
0.14318609237670898,
-0.02286992222070694,
-0.28410762548446655,
-0.11198917776346207,
0.00004521757364273071,
0.022469412535429,
0.21440936625003815,
0.025882821530103683,
-0.18332266807556152,
0.051368050277233124,
-0.2649681568145752,
0.2935570478439331,
0.25738516449928284,
-0.25785544514656067,
-0.76659095287323,
0.1563870906829834,
-0.1181640625,
-0.06546592712402344,
0.07678693532943726,
0.22341635823249817,
0.2946227788925171,
0.27626872062683105,
-0.4194139242172241,
-0.08271166682243347,
-0.034430913627147675,
0.14995545148849487,
-0.09588077664375305,
0.20324888825416565,
0.36510223150253296,
0.05336204171180725,
0.06027374416589737,
-0.009296145290136337,
-0.10479986667633057,
0.3742392659187317,
0.0774436816573143,
0.20636135339736938,
0.21596360206604004,
0.29401513934135437,
0.14510862529277802,
0.7868185639381409,
0.19515195488929749,
-0.11603930592536926,
0.25858646631240845,
0.08026779443025589,
0.2512441873550415,
-0.3090754747390747,
-0.01289687305688858,
0.17198611795902252,
0.037631988525390625,
-0.30381476879119873,
0.08741825819015503,
-0.028798885643482208,
-0.12785497307777405,
-0.13060341775417328,
0.08011271059513092,
-0.0449872687458992,
-0.13032840192317963,
0.15630121529102325,
-0.12708504498004913,
0.43290311098098755,
0.11490549147129059,
-0.06226770579814911,
-0.28006839752197266,
-0.11001085489988327,
0.05203370004892349,
-0.17492659389972687,
0.5241789221763611,
0.40212157368659973,
-0.48526862263679504,
-0.06360705196857452,
-0.3512474596500397,
0.3219735324382782,
-0.11578438431024551,
0.10282687842845917,
0.0073922984302043915,
-0.07976461201906204,
0.15732893347740173,
-0.18209639191627502,
0.14643561840057373,
-0.2514882981777191,
0.08118273317813873,
0.3863941729068756,
-0.0053781382739543915,
0.09936239570379257,
-0.25380268692970276,
0.053465697914361954,
0.3308381736278534,
0.20372426509857178,
-0.18131914734840393,
-0.17520588636398315,
-0.3217463791370392,
0.043407149612903595,
0.2783793807029724,
-0.47989216446876526,
0.05750960484147072,
-0.2167820781469345,
-0.462777316570282,
-0.21492749452590942,
0.18680185079574585,
0.25785142183303833,
0.0962296575307846,
-0.18622514605522156,
0.3677946925163269,
-0.15463373064994812,
0.028689473867416382,
0.34856486320495605,
-0.11752840876579285,
0.4073965847492218,
0.1658473163843155,
0.14700420200824738,
0.044477544724941254,
0.3160405158996582,
0.1348308026790619,
0.2624264359474182,
-0.4285266697406769,
0.49404236674308777,
-0.10705933719873428,
-0.001958424225449562,
0.3777114748954773,
0.19692328572273254,
-0.13402436673641205,
0.1191709041595459,
-0.30156010389328003,
0.07035276293754578,
-0.4203507602214813,
-0.022212201729416847,
0.06243366003036499,
-0.091646708548069,
-0.5123934149742126,
-0.7761765122413635,
-0.014444075524806976,
0.38699501752853394,
-0.1343573033809662,
0.42500337958335876,
-0.4090648889541626,
-0.3004298210144043,
-0.03224993124604225,
0.2574750483036041,
1.1520469188690186,
-0.24993996322155,
0.2839638888835907,
-0.016369089484214783,
-0.11217442899942398,
0.175240620970726,
-0.3207360506057739,
-0.05087772756814957,
-0.2835557758808136,
-0.1752745360136032,
0.02496478520333767,
-0.13390927016735077,
0.2799004018306732,
0.21945032477378845,
-0.11744509637355804,
0.4820215106010437,
-0.4274495244026184,
-0.24951386451721191,
-0.09071475267410278,
0.21424266695976257,
0.29733556509017944,
0.17248216271400452,
0.4000265896320343,
0.04707960784435272,
-0.27303093671798706,
-0.055563297122716904,
-0.14580988883972168,
0.20943595468997955,
0.18260836601257324,
0.2097635418176651,
-0.3370371460914612,
-0.09021616727113724,
-0.6582039594650269,
-0.026400219649076462,
-0.4553878903388977,
-0.5626402497291565,
-0.0016355682164430618,
0.01877664029598236,
0.6962360143661499,
-0.05976385995745659,
0.03414492309093475,
0.18858027458190918,
-0.10388975590467453,
0.012306063435971737,
-0.11830567568540573,
0.11310580372810364,
0.3138391673564911,
0.03379129618406296,
-0.13067598640918732,
0.275153785943985,
0.0025537703186273575,
-0.3120923638343811,
-0.2595791816711426,
-0.3384285569190979,
0.26287299394607544,
-0.22883130609989166,
-0.269202321767807,
0.5659245848655701,
0.10441204905509949,
-0.17462119460105896,
0.031633201986551285,
0.2832493782043457,
-0.23250092566013336,
0.3902263045310974,
-0.3128141164779663,
-0.2564023733139038,
-0.049573320895433426,
0.1170378029346466,
0.3268793523311615,
-0.3238462507724762,
0.38627365231513977,
0.2198897749185562,
-0.07809461653232574,
-0.05628348886966705,
-0.07845515012741089,
0.19178755581378937,
-0.21339151263237,
0.2346998006105423,
0.0292926374822855,
0.16812489926815033,
0.07503931224346161,
-0.14420674741268158,
-0.02518370747566223,
0.18458056449890137,
-0.0068636611104011536,
0.14839287102222443,
-0.2823742628097534,
-0.23915819823741913,
0.2126631736755371,
0.31086862087249756,
0.13896599411964417,
0.04355428367853165,
-0.01138272788375616,
0.37747856974601746,
-0.16954119503498077,
0.17381598055362701,
0.1361580342054367,
0.1900034099817276,
0.10557498782873154,
-0.04301171749830246,
-0.1715741604566574,
-0.09249532222747803,
-0.062179870903491974,
-0.07268783450126648,
-0.03864288330078125,
-0.10440585762262344,
-0.31258147954940796,
0.22721955180168152,
-0.12483956664800644,
0.018650442361831665,
0.01060569193214178,
-0.5460447669029236,
0.06608216464519501,
-0.25955015420913696,
0.009960208088159561,
0.25695446133613586,
0.07860395312309265,
0.11298689246177673,
0.37698641419410706,
-0.23835107684135437,
-0.04197077825665474,
-0.08398155122995377,
0.08836222440004349,
-0.07254603505134583,
0.11493265628814697,
0.17684313654899597,
0.2323455959558487,
-0.09961429238319397,
-0.16727544367313385,
-0.12295114248991013,
0.36467981338500977,
0.11547031998634338,
0.0624607615172863,
-0.14642204344272614,
0.019738655537366867,
-0.06209105998277664,
0.13607974350452423,
0.11752369999885559,
-0.030668869614601135,
0.1765672266483307,
0.48567312955856323,
-0.05339629203081131,
-0.3026414215564728,
0.20023943483829498,
0.2910366952419281,
-0.09907875955104828,
-0.22045841813087463,
0.45531678199768066,
0.3883111774921417,
0.36210277676582336,
-0.1899758130311966,
-0.04467020183801651,
0.43297481536865234,
-0.2688751816749573,
0.005053180735558271,
0.012992240488529205,
0.3136690557003021,
0.013778332620859146,
0.29580727219581604,
0.3763059079647064,
-0.036789171397686005,
-0.006809733808040619,
-0.010944880545139313,
0.33770278096199036,
0.39856448769569397,
-0.08336921036243439,
-0.18288007378578186,
-0.43475520610809326,
-0.11146663129329681,
0.15325036644935608,
0.0929499939084053,
0.26280564069747925,
-0.34644344449043274,
0.23017960786819458,
0.3239690065383911,
-0.6916000843048096,
0.1316186934709549,
0.5701601505279541,
-0.12107770889997482,
-0.23602214455604553,
-0.314092218875885,
-0.05840863287448883,
-0.11905108392238617,
0.17842017114162445,
-0.06884433329105377,
-0.2500268220901489,
0.10475672036409378,
0.03156864270567894,
0.038709770888090134,
-0.047005996108055115,
0.03871016204357147,
0.0005980916321277618,
0.037726033478975296,
0.056117262691259384,
0.43862107396125793,
0.056842535734176636,
-0.24714288115501404,
0.015762384980916977,
-0.011867115274071693,
0.19603456556797028,
0.034603532403707504,
-0.18176144361495972,
0.23707552254199982,
0.1254267692565918,
0.18166524171829224,
-0.15496499836444855,
0.057723771780729294,
-0.19789907336235046,
-0.17784936726093292,
-0.12923918664455414,
-0.07553847879171371,
0.055955223739147186,
0.07509636133909225,
-0.2512836158275604,
0.0002850182354450226,
-0.054096195846796036,
0.4733887314796448,
0.34211570024490356,
-0.35794350504875183,
-0.029958948493003845,
0.40785279870033264,
-0.27292633056640625,
0.17928270995616913,
0.7854658961296082,
-0.042931511998176575,
0.04639945179224014,
-0.13318531215190887,
-0.00526632834225893,
0.2972892224788666,
0.2528785765171051,
0.20972104370594025,
-0.0023795105516910553,
-0.2923395037651062,
-0.36107540130615234,
-0.5111788511276245,
-0.04793243855237961,
-0.2610592544078827,
0.15524683892726898,
-0.11502484977245331,
0.05861122906208038,
0.25919076800346375,
-0.18304374814033508,
0.3036313056945801,
0.04258061572909355,
0.30513545870780945,
0.29938608407974243,
-0.283643513917923,
-0.27195221185684204,
-0.11969712376594543,
0.45979830622673035,
0.05294719338417053,
-0.16392576694488525,
-0.026404153555631638,
0.4131958484649658,
-0.10128027200698853,
-0.31611186265945435,
-0.022376898676156998,
0.07934369146823883,
0.22791236639022827,
0.35972142219543457,
-0.054227061569690704,
-0.020811431109905243,
0.1456581950187683,
0.14366991817951202,
-0.12958140671253204,
0.2380608469247818,
-0.027284786105155945,
-0.15919369459152222,
-0.276235967874527,
-0.020770389586687088,
-0.6245564222335815,
-0.2775924801826477,
-0.4387022852897644,
-0.24654552340507507,
0.12489934265613556,
0.033426061272621155,
-0.30823060870170593,
-0.30337780714035034,
-0.09339836239814758,
0.3552972674369812,
0.3341153860092163,
0.4178357422351837,
-0.1940508484840393,
0.0660085454583168,
-0.559366762638092,
0.1297999620437622,
0.6791754961013794,
-0.019156470894813538,
-0.3333539664745331,
-0.0575459823012352,
0.08808266371488571,
0.09385077655315399,
0.06558084487915039,
-0.2357252836227417,
0.07162577658891678,
0.3024848997592926,
-0.06427551805973053,
-0.15962843596935272,
0.4308489263057709,
-0.31774619221687317,
0.1543847918510437,
0.06593675911426544,
0.2563072443008423,
0.0453030951321125,
-0.22204601764678955,
-0.3671284317970276,
-0.050321292132139206
] |
https://github.com/huggingface/datasets/issues/2344 | Is there a way to join multiple datasets in one? | Hi ! We don't have `join`/`merge` on a certain column as in pandas.
Maybe you can just use the [concatenate_datasets](https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=concatenate#datasets.concatenate_datasets) function.
| **Is your feature request related to a problem? Please describe.**
I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2?
**Describe the solution you'd like**
Id like to join them with a merge or join method, just like pandas dataframes.
**Additional context**
If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation. | 21 | Is there a way to join multiple datasets in one?
**Is your feature request related to a problem? Please describe.**
I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2?
**Describe the solution you'd like**
Id like to join them with a merge or join method, just like pandas dataframes.
**Additional context**
If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation.
Hi ! We don't have `join`/`merge` on a certain column as in pandas.
Maybe you can just use the [concatenate_datasets](https://huggingface.co/docs/datasets/package_reference/main_classes.html?highlight=concatenate#datasets.concatenate_datasets) function.
| [
-0.47733694314956665,
-0.6935086846351624,
-0.09794381260871887,
0.17958754301071167,
0.1399444341659546,
0.3247910439968109,
-0.20195035636425018,
0.09135641157627106,
0.02328057959675789,
0.031471461057662964,
-0.5830709934234619,
-0.014750590547919273,
0.20583830773830414,
0.48026418685913086,
0.09730317443609238,
-0.335227906703949,
0.2061464786529541,
0.05332610383629799,
-0.06825432181358337,
0.19073045253753662,
-0.005757510662078857,
0.12056272476911545,
-0.13839909434318542,
-0.052756473422050476,
-0.4373384714126587,
0.14367859065532684,
-0.5212434530258179,
-0.14369016885757446,
-0.2237616777420044,
0.14991524815559387,
0.3690568506717682,
0.3095443546772003,
0.15829922258853912,
0.44124895334243774,
-0.00011309365800116211,
-0.23986397683620453,
0.08313079178333282,
0.09189431369304657,
-0.11585496366024017,
-0.2447851449251175,
-0.2960634231567383,
-0.2401033341884613,
0.13320937752723694,
0.124176986515522,
-0.05575121194124222,
-0.03155554085969925,
0.07952073961496353,
0.06544726341962814,
0.09696968644857407,
-0.10989490151405334,
0.14444802701473236,
0.07971031218767166,
0.25002968311309814,
-0.17348520457744598,
-0.1637146770954132,
0.5111456513404846,
0.010818151757121086,
0.15243536233901978,
0.4946920573711395,
-0.04852136969566345,
0.6609491109848022,
-0.006498571950942278,
0.06655792891979218,
-0.06836983561515808,
0.22856125235557556,
0.10077544301748276,
-0.05084136873483658,
-0.4745709002017975,
-0.36077338457107544,
0.30828848481178284,
0.5458722710609436,
-0.12559232115745544,
-0.4932384490966797,
-0.23681965470314026,
0.24777007102966309,
0.02138526551425457,
-0.19133654236793518,
0.3288097381591797,
0.20860491693019867,
0.024096235632896423,
-0.20643624663352966,
-0.3917134702205658,
0.0532747358083725,
0.15835213661193848,
-0.06973578780889511,
0.19579577445983887,
-0.05132041499018669,
0.09082415699958801,
0.06955543905496597,
-0.26819121837615967,
0.0352075919508934,
-0.16608284413814545,
-0.151661679148674,
0.15951129794120789,
-0.6084681749343872,
-0.39926064014434814,
-0.226091206073761,
0.36284831166267395,
0.48024433851242065,
0.20241686701774597,
-0.1985308974981308,
0.005876604467630386,
-0.4315236508846283,
0.23007750511169434,
0.282500296831131,
-0.23996654152870178,
0.024039480835199356,
-0.2077752947807312,
0.3055000901222229,
-0.10439526289701462,
-0.11970509588718414,
-0.066792793571949,
0.10383646935224533,
-0.10812626034021378,
-0.45620787143707275,
-0.2621084749698639,
0.12902213633060455,
-0.024584118276834488,
0.00395485945045948,
-0.3191906809806824,
0.12430093437433243,
-0.0709657147526741,
-0.04131191968917847,
0.060606613755226135,
-0.16559983789920807,
0.11679729074239731,
-0.13964354991912842,
0.2302725613117218,
-0.19073271751403809,
-0.23042191565036774,
-0.07567198574542999,
0.11195220053195953,
0.016552764922380447,
0.28939929604530334,
-0.17126218974590302,
-0.4942789077758789,
-0.2040008157491684,
0.41338664293289185,
0.4074552059173584,
0.04691764712333679,
-0.08393790572881699,
-0.28429660201072693,
-0.15693622827529907,
0.09500283747911453,
0.27003639936447144,
-0.0443907231092453,
0.08420591056346893,
0.023763388395309448,
-0.14638352394104004,
-0.12032496184110641,
-0.4403834939002991,
-0.28853633999824524,
-0.4382287859916687,
0.09076693654060364,
0.04651705175638199,
-0.034136638045310974,
-0.4737578332424164,
0.47523555159568787,
-0.24979296326637268,
-0.09180006384849548,
-0.057073600590229034,
0.19232270121574402,
-0.17752762138843536,
-0.11399687081575394,
0.11596036702394485,
0.017362423241138458,
-0.077689528465271,
-0.1454378068447113,
0.13517211377620697,
-0.07031263411045074,
-0.32923761010169983,
0.18613669276237488,
-0.23839999735355377,
0.15500810742378235,
-0.10527527332305908,
0.004952192306518555,
0.36956217885017395,
-0.4302902817726135,
-0.02874108962714672,
0.0589245930314064,
0.15592269599437714,
-0.14391639828681946,
-0.0754963830113411,
0.27008798718452454,
0.04385475814342499,
0.11775391548871994,
0.1722821593284607,
0.4885491132736206,
-0.10669805109500885,
-0.17042841017246246,
0.16334281861782074,
-0.2834755778312683,
0.20854543149471283,
0.09724888205528259,
-0.03138328716158867,
-0.21481698751449585,
0.08631585538387299,
-0.1664014458656311,
0.22485122084617615,
-0.06070796027779579,
0.05288863927125931,
0.22436882555484772,
0.06302085518836975,
0.21025513112545013,
-0.008478029631078243,
-0.49053308367729187,
-0.4413350224494934,
-0.025932421907782555,
0.28552502393722534,
0.08499527722597122,
0.2845333516597748,
-0.24953408539295197,
0.1780858337879181,
-0.27934008836746216,
-0.09169256687164307,
-0.007967211306095123,
0.005874820053577423,
-0.021831609308719635,
0.18568842113018036,
-0.28263363242149353,
-0.5492194294929504,
0.6859903335571289,
0.11561122536659241,
0.014912125654518604,
-0.5255336165428162,
0.7264193892478943,
0.030215438455343246,
0.08212088793516159,
0.04996702820062637,
0.27667513489723206,
0.05785385146737099,
-0.06262791901826859,
0.2358023226261139,
0.13076108694076538,
-0.36586833000183105,
0.2062016725540161,
0.4405401349067688,
0.13159212470054626,
0.3730510175228119,
-0.2377307116985321,
-0.26014310121536255,
-0.3811037242412567,
0.06794145703315735,
-0.19564402103424072,
-0.360506534576416,
0.28508615493774414,
-0.020760659128427505,
0.30334270000457764,
0.06463790684938431,
0.04769449681043625,
0.09721198678016663,
-0.03692847490310669,
-0.17042262852191925,
0.03723134845495224,
-0.025171685963869095,
-0.019658703356981277,
-0.0002516843378543854,
0.16993345320224762,
-0.39791324734687805,
0.030212759971618652,
0.1181696206331253,
-0.006337452679872513,
-0.016139619052410126,
-0.0998307392001152,
-0.2815759479999542,
0.09551645070314407,
-0.022346118465065956,
0.047174129635095596,
0.42095309495925903,
0.21077531576156616,
-0.10051077604293823,
0.09120690822601318,
-0.022260870784521103,
0.015199650079011917,
0.04105379432439804,
0.19777753949165344,
-0.0018745624693110585,
0.157687246799469,
0.23791290819644928,
0.06292832642793655,
-0.04659406840801239,
-0.07101733982563019,
0.25906795263290405,
-0.027197690680623055,
-0.1693974882364273,
-0.2094568908214569,
-0.1284324675798416,
-0.32415398955345154,
-0.03183536231517792,
-0.3003273606300354,
-0.45720261335372925,
-0.2940027415752411,
-0.13207413256168365,
0.12831175327301025,
0.17832252383232117,
-0.010823532938957214,
0.17795374989509583,
0.5747696161270142,
-0.281928151845932,
0.22209575772285461,
-0.15668228268623352,
0.28540709614753723,
0.2318286895751953,
0.13720111548900604,
0.11106407642364502,
0.110561802983284,
0.3009604513645172,
-0.01587393693625927,
0.1589299738407135,
-0.49404245615005493,
-0.1534123569726944,
0.02959143929183483,
-0.23876602947711945,
0.21459515392780304,
0.054090626537799835,
0.2275942862033844,
-0.04277188703417778,
-0.32973340153694153,
0.30569854378700256,
0.17530173063278198,
-0.12375137209892273,
-0.19030649960041046,
0.0014496108051389456,
0.11994937062263489,
-0.06526817381381989,
0.047874391078948975,
-0.3397682011127472,
-0.25756171345710754,
0.1969040185213089,
-0.13475488126277924,
0.03662952780723572,
-0.2529945373535156,
-0.10649073868989944,
0.03019392490386963,
-0.33418548107147217,
-0.03533075749874115,
-0.04608779400587082,
-0.4317244589328766,
0.2534383535385132,
-0.22050617635250092,
-0.13050970435142517,
0.13445302844047546,
0.057315193116664886,
0.09837768971920013,
-0.3787456154823303,
-0.0478382408618927,
-0.3517187535762787,
-0.24645133316516876,
0.02671224996447563,
0.0777888372540474,
0.30562153458595276,
0.04396279901266098,
-0.06870590150356293,
0.051046229898929596,
0.04277161508798599,
-0.19384030997753143,
-0.19419974088668823,
0.4216267466545105,
0.21253705024719238,
-0.1220899447798729,
0.2178717851638794,
-0.20569512248039246,
0.14738431572914124,
0.644235372543335,
0.23560866713523865,
-0.041369691491127014,
0.0447312593460083,
0.18443624675273895,
-0.10918081551790237,
-0.481372594833374,
-0.07420475780963898,
-0.1004677414894104,
0.4089357852935791,
0.177337184548378,
0.36921724677085876,
0.4297562539577484,
-0.388572096824646,
-0.14694377779960632,
0.04801839590072632,
-0.022658808156847954,
-0.16609781980514526,
-0.12425766885280609,
0.0802994817495346,
-0.28286656737327576,
-0.6389856338500977,
-0.08559329807758331,
-0.04262583702802658,
-0.13982373476028442,
0.4228808283805847,
0.08307076245546341,
-0.08250989764928818,
-0.3596101999282837,
-0.19805200397968292,
-0.2996658980846405,
0.2538965940475464,
0.22774304449558258,
-0.1285480260848999,
0.03730534389615059,
0.33935922384262085,
-0.033712759613990784,
0.14879918098449707,
0.5826119184494019,
-0.1726081669330597,
-0.6704808473587036,
0.061628397554159164,
-0.17111359536647797,
-0.20939117670059204,
-0.06732037663459778,
0.13764046132564545,
0.14142903685569763,
-0.03798796609044075,
0.6065415740013123,
-0.19265638291835785,
-0.20452354848384857,
0.418209433555603,
0.26031824946403503,
-0.1448495239019394,
-0.13718131184577942,
-0.02557568997144699,
-0.04890905320644379,
-0.3120487928390503,
-0.22894442081451416,
0.059659287333488464,
0.2473796159029007,
0.06129923462867737,
-0.14330294728279114,
-0.03249319642782211,
-0.12592419981956482,
0.4951270818710327,
-0.23315198719501495,
0.06111454218626022,
0.39765214920043945,
0.11185643076896667,
0.21889440715312958,
0.06084681302309036,
-0.02512361668050289,
0.5964617729187012,
-0.00730302557349205,
-0.5920339226722717,
-0.047439396381378174,
0.053792212158441544,
0.8099607229232788,
-0.025401994585990906,
0.1866256296634674,
0.6380630731582642,
-0.2588059604167938,
0.12421847879886627,
-0.2145991325378418,
0.08657913655042648,
0.20604602992534637,
0.269650936126709,
-0.7012072801589966,
-0.24555449187755585,
0.5334428548812866,
0.12795299291610718,
0.07212534546852112,
0.25063300132751465,
0.3512205481529236,
-0.04616028070449829,
-0.1374613344669342,
-0.08918344229459763,
0.9792341589927673,
-0.013623297214508057,
0.0646694004535675,
-0.08480066806077957,
-0.09471951425075531,
0.627291202545166,
-0.14846190810203552,
0.055202025920152664,
0.01784278079867363,
-0.2724735736846924,
-0.13287439942359924,
-0.06503249704837799,
0.120124451816082,
-0.11202460527420044,
-0.17667320370674133,
0.10309267044067383,
-0.042350202798843384,
0.3266202211380005,
-0.08393510431051254,
0.2598118484020233,
0.05550882965326309,
-0.17962682247161865,
-0.37099042534828186,
0.058878518640995026,
-0.07566936314105988,
-0.12636709213256836,
-0.09264611452817917,
-0.036231879144907,
0.14693264663219452,
0.19389058649539948,
-0.26062631607055664,
-0.30293238162994385,
0.3281199038028717,
0.165166974067688,
0.13334454596042633,
-0.19080251455307007,
0.23595499992370605,
0.33867859840393066,
0.3834400177001953,
0.01565650850534439,
-0.2581951916217804,
0.07907836139202118,
-0.40216928720474243,
-0.08437132090330124,
-0.379714697599411,
-0.27399346232414246,
0.12698154151439667,
0.04400693625211716,
-0.2601501941680908,
0.31543293595314026,
0.3332211971282959,
-0.30632513761520386,
-0.35821664333343506,
0.30292725563049316,
-0.1516798883676529,
-0.21196679770946503,
-0.25804272294044495,
0.32632219791412354,
0.3057927191257477,
-0.14073842763900757,
0.0533413365483284,
0.27443772554397583,
-0.2274744212627411,
0.11496040225028992,
0.01776152476668358,
-0.09822599589824677,
-0.08110643923282623,
0.27350765466690063,
0.15083959698677063,
-0.24126510322093964,
0.15715819597244263,
0.28112533688545227,
0.025404121726751328,
0.043397195637226105,
0.11417203396558762,
0.43360862135887146,
-0.10879193991422653,
0.03887347877025604,
-0.0965186133980751,
0.37965941429138184,
0.07312458008527756,
0.1997225284576416,
0.16042137145996094,
-0.07994105666875839,
-0.08858570456504822,
-0.22321797907352448,
-0.171234130859375,
0.34214991331100464,
-0.025837305933237076,
0.22131697833538055,
0.0329447016119957,
0.1406087875366211,
0.1405455470085144,
0.5654825568199158,
-0.22082588076591492,
0.08641494810581207,
-0.19651055335998535,
0.021730994805693626,
0.16065502166748047,
0.11509593576192856,
-0.2585489749908447,
-0.09735576808452606,
-0.04710213840007782,
-0.05688805133104324,
0.10470782965421677,
-0.18686449527740479,
0.004120709374547005,
0.16338187456130981,
0.2580341100692749,
-0.0123335812240839,
-0.090027816593647,
-0.07457802444696426,
0.03455812484025955,
-0.19893932342529297,
0.12174881994724274,
-0.016448793932795525,
0.08358363062143326,
-0.19787120819091797,
0.3910054862499237,
-0.3001543879508972,
-0.2309037297964096,
0.14930786192417145,
0.3866788148880005,
0.10704050213098526,
0.003381784539669752,
-0.061890073120594025,
-0.10581420361995697,
-0.0933874323964119,
-0.023391028866171837,
0.1882748007774353,
0.3616147041320801,
-0.15706241130828857,
0.009891331195831299,
0.11906654387712479,
-0.021558469161391258,
0.022130465134978294,
0.4316726326942444,
-0.08031043410301208,
-0.09188244491815567,
0.6225715279579163,
0.024900108575820923,
0.04197598248720169,
-0.15967705845832825,
-0.21277107298374176,
0.22123576700687408,
0.1080702468752861,
-0.030618220567703247,
0.054271310567855835,
0.09248708188533783,
0.29695823788642883,
-0.17195074260234833,
-0.023820674046874046,
0.10183803737163544,
-0.011029236018657684,
0.28809043765068054,
0.33246609568595886,
0.2076006382703781,
-0.12690502405166626,
0.41564640402793884,
0.21110418438911438,
0.07390385866165161,
0.16099797189235687,
-0.21678286790847778,
0.05632558465003967,
0.07357199490070343,
-0.014143053442239761,
0.779104471206665,
-0.003928894177079201,
0.10169113427400589,
-0.17486688494682312,
0.08333496749401093,
-0.40817829966545105,
-0.004006192088127136,
0.2450890839099884,
-0.2864973247051239,
-0.3804771304130554,
-0.09748444706201553,
0.5531996488571167,
0.041275009512901306,
-0.1027698665857315,
0.34289562702178955,
-0.12116733193397522,
0.1395779401063919,
0.12337072193622589,
0.12229855358600616,
-0.4584871530532837,
0.24428562819957733,
-0.06418846547603607,
0.2247370183467865,
0.06177528202533722,
0.33955976366996765,
0.607072651386261,
0.2601691782474518,
-0.030947547405958176,
-0.1975223422050476,
0.20715883374214172,
0.022777147591114044,
-0.10208956897258759,
0.5970640778541565,
0.26250389218330383,
0.012228000909090042,
0.051305994391441345,
0.3758946359157562,
-0.05994575843214989,
0.05887540429830551,
0.2854727804660797,
-0.084919773042202,
-0.051626697182655334,
-0.3078393042087555,
0.258543461561203,
0.16019271314144135,
0.016752339899539948,
-0.057139817625284195,
-0.4110812544822693,
0.15428414940834045,
-0.888201892375946,
0.24300411343574524,
-0.21212919056415558,
-0.15566246211528778,
-0.0812818706035614,
0.14952164888381958,
-0.21426481008529663,
-0.16692475974559784,
0.5107846856117249,
-0.3032633364200592,
-0.152639240026474,
-0.049654629081487656,
0.09252692759037018,
0.1310437023639679,
0.3922293782234192,
0.484110027551651,
0.34317877888679504,
-0.17799535393714905,
-0.33534103631973267,
-0.29353922605514526,
-0.27495425939559937,
0.13686011731624603,
0.17347706854343414,
-0.16284000873565674,
0.06115984916687012,
-0.04818538576364517,
0.03912873938679695,
0.12453757226467133,
-0.1670336276292801,
0.17341582477092743,
0.01746097207069397,
-0.2168402075767517,
-0.1275699883699417,
0.09650353342294693,
-0.08454211801290512,
-0.0809868797659874,
0.24685761332511902,
0.402382493019104,
0.06462109833955765,
-0.11491339653730392,
-0.04566507041454315,
0.24843212962150574,
0.24903377890586853,
-0.33403345942497253,
-0.06835071742534637,
0.17555521428585052,
0.4713205397129059,
-0.07812198251485825,
0.2838202714920044,
-0.00829947367310524,
-0.3150530159473419,
-0.08181232959032059,
0.197058767080307,
-0.22040483355522156,
0.1018046885728836,
-0.3778833746910095,
-0.057126473635435104,
0.1697273850440979,
-0.16769380867481232,
-0.02462056837975979,
0.13126130402088165,
-0.2086881846189499,
-0.12023352086544037,
-0.17193469405174255,
-0.1216086745262146,
0.2517898976802826,
0.3607228994369507,
-0.08745312690734863,
-0.06759267300367355,
0.16520579159259796,
-0.12065624445676804,
0.061615511775016785,
0.09145165979862213,
-0.30865204334259033,
-0.31416940689086914,
-0.006271764636039734,
0.2522933781147003,
0.14396680891513824,
-0.5772435069084167,
-0.3370822072029114,
0.2370830476284027,
0.0840223878622055,
-0.07704459130764008,
0.5987443923950195,
0.27261173725128174,
-0.030715877190232277,
-0.2170371264219284,
0.02883772924542427,
0.11161205172538757,
0.026554251089692116,
-0.0034457221627235413,
-0.1477663516998291
] |
https://github.com/huggingface/datasets/issues/2344 | Is there a way to join multiple datasets in one? | Hi! You can use `datasets_sql` for that now. As of recently, PyArrow also supports querying tables via Substrait, so I think we can start adding these methods to the API soon. | **Is your feature request related to a problem? Please describe.**
I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2?
**Describe the solution you'd like**
Id like to join them with a merge or join method, just like pandas dataframes.
**Additional context**
If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation. | 31 | Is there a way to join multiple datasets in one?
**Is your feature request related to a problem? Please describe.**
I need to join 2 datasets, one that is in the hub and another I've created from my files. Is there an easy way to join these 2?
**Describe the solution you'd like**
Id like to join them with a merge or join method, just like pandas dataframes.
**Additional context**
If you want to extend an existing dataset with more data, for example for training a language model, you need that functionality. I've not found it in the documentation.
Hi! You can use `datasets_sql` for that now. As of recently, PyArrow also supports querying tables via Substrait, so I think we can start adding these methods to the API soon. | [
-0.5119077563285828,
-0.15334022045135498,
-0.12520936131477356,
0.12480781972408295,
0.15799427032470703,
0.3068709671497345,
-0.16159659624099731,
0.2924729287624359,
-0.3040856122970581,
-0.004179753363132477,
-0.52102130651474,
0.14300335943698883,
0.27716144919395447,
0.1345667541027069,
0.22990691661834717,
-0.39000290632247925,
0.200324147939682,
0.15800011157989502,
0.10111626237630844,
0.18308594822883606,
0.03371644765138626,
-0.04768930375576019,
-0.19258952140808105,
0.03301915526390076,
-0.40401560068130493,
0.10863881558179855,
-0.6276305913925171,
-0.186057448387146,
-0.35849666595458984,
-0.074619822204113,
0.30909740924835205,
0.22599652409553528,
0.2523714005947113,
0.304466187953949,
-0.00011568311310838908,
-0.17344653606414795,
0.14080753922462463,
0.10373443365097046,
-0.16259534657001495,
-0.23244048655033112,
-0.23440682888031006,
-0.18244056403636932,
0.26750221848487854,
0.017895475029945374,
0.010223783552646637,
-0.38236314058303833,
0.22596341371536255,
0.2600468099117279,
-0.08194796741008759,
-0.06066196411848068,
0.12214571237564087,
0.15285547077655792,
0.25371602177619934,
-0.11183793842792511,
0.11904127895832062,
0.2900422215461731,
0.0024401117116212845,
0.19498902559280396,
0.6549075841903687,
-0.2925878167152405,
0.5809212327003479,
-0.219271719455719,
-0.05514722317457199,
-0.015725336968898773,
0.11086256802082062,
0.11693479865789413,
0.003529280424118042,
-0.5582994222640991,
-0.3280293643474579,
0.12347037345170975,
0.734074056148529,
-0.3938639760017395,
-0.43917974829673767,
-0.12737174332141876,
0.17974528670310974,
-0.040740966796875,
-0.26313233375549316,
0.4905591607093811,
0.15130729973316193,
0.06917180120944977,
-0.04923573136329651,
-0.2583427429199219,
-0.07211152464151382,
0.2844841480255127,
-0.11842092871665955,
0.3553580939769745,
0.33055582642555237,
0.16310688853263855,
-0.06731827557086945,
-0.10528624057769775,
0.3160657286643982,
-0.17445775866508484,
-0.17636680603027344,
0.19531872868537903,
-0.6930742263793945,
-0.3916906416416168,
-0.15172165632247925,
0.284706175327301,
0.46980762481689453,
0.26427584886550903,
-0.1676994413137436,
-0.00787132978439331,
-0.1432897299528122,
0.22991159558296204,
0.3883809745311737,
-0.26797136664390564,
0.013789258897304535,
-0.21190181374549866,
0.292362779378891,
-0.5173439383506775,
-0.12245750427246094,
-0.018468167632818222,
-0.020726799964904785,
-0.10364198684692383,
-0.15398390591144562,
-0.193340003490448,
0.14850178360939026,
0.06398701667785645,
-0.046527571976184845,
-0.3700392544269562,
-0.21150431036949158,
-0.13596747815608978,
-0.15450625121593475,
0.0576610304415226,
-0.04006580635905266,
-0.007067948579788208,
-0.35530728101730347,
0.298112690448761,
-0.24055618047714233,
-0.23013725876808167,
-0.014054398983716965,
0.09822715818881989,
0.017554741352796555,
0.248284712433815,
-0.07949847728013992,
-0.3251335322856903,
-0.24541620910167694,
0.36110925674438477,
0.3077125549316406,
0.12918569147586823,
0.11988011002540588,
-0.1989654004573822,
-0.1866791546344757,
0.20324058830738068,
0.37877580523490906,
-0.019029907882213593,
-0.046782124787569046,
-0.07132315635681152,
-0.22180238366127014,
0.22120729088783264,
-0.433543860912323,
-0.4024052917957306,
-0.4599044919013977,
0.06376321613788605,
-0.0799417719244957,
-0.08684583008289337,
-0.24074164032936096,
0.4468681812286377,
-0.006576545536518097,
-0.169081449508667,
-0.03582447022199631,
0.07020366936922073,
0.029478196054697037,
-0.24982517957687378,
-0.006005511619150639,
-0.24105770885944366,
-0.3539590537548065,
0.04617816209793091,
0.20160087943077087,
-0.11128009855747223,
-0.2929929196834564,
0.17565301060676575,
-0.4137762784957886,
0.23768872022628784,
0.06473485380411148,
0.3051379323005676,
0.45795708894729614,
-0.328177273273468,
-0.2711750566959381,
-0.045818228274583817,
0.20360355079174042,
-0.26239538192749023,
-0.09270622581243515,
0.3431400954723358,
0.10099979490041733,
0.09404048323631287,
0.17175906896591187,
0.49619364738464355,
-0.16192585229873657,
-0.12117675691843033,
0.1026587188243866,
-0.24963051080703735,
0.23868288099765778,
0.25174883008003235,
0.06664831936359406,
-0.33668869733810425,
0.14333413541316986,
-0.26365911960601807,
0.34152841567993164,
-0.09316611289978027,
-0.02372940257191658,
0.020610429346561432,
0.24560695886611938,
0.009067472070455551,
0.1044178158044815,
-0.5430932641029358,
-0.28168606758117676,
0.06669248640537262,
0.12073172628879547,
0.14666907489299774,
0.12144871801137924,
-0.29767072200775146,
0.277987003326416,
-0.13041359186172485,
-0.15828031301498413,
0.055816829204559326,
0.023495540022850037,
-0.1169063150882721,
0.1805160492658615,
-0.3301710784435272,
-0.5053627490997314,
0.2538240849971771,
0.2174796462059021,
0.05272992327809334,
-0.307035356760025,
0.8624603748321533,
-0.01183718629181385,
-0.037716127932071686,
0.009976789355278015,
0.11639852821826935,
0.020069636404514313,
0.04082033783197403,
0.2543981969356537,
0.1775965392589569,
-0.14043036103248596,
0.17642763257026672,
0.34115490317344666,
0.10298256576061249,
0.3254264295101166,
-0.3294404447078705,
-0.14908342063426971,
-0.3308059573173523,
0.04478509724140167,
-0.1816350221633911,
-0.11313151568174362,
0.2057487666606903,
0.019151220098137856,
0.1597604751586914,
0.09290282428264618,
0.014271697029471397,
0.027714906260371208,
-0.06399474292993546,
-0.15947480499744415,
0.21085748076438904,
-0.10981529951095581,
0.1321243941783905,
-0.025721527636051178,
0.2157825231552124,
-0.28017669916152954,
0.16019701957702637,
0.13133469223976135,
-0.15430203080177307,
0.07068466395139694,
-0.19342154264450073,
-0.2843647003173828,
0.012322787195444107,
0.06837262958288193,
-0.07997548580169678,
0.3730868697166443,
0.2725781202316284,
-0.09834195673465729,
-0.06978312879800797,
-0.04931402578949928,
-0.04540272802114487,
0.08725715428590775,
0.2692264914512634,
0.0797075629234314,
0.10305927693843842,
0.3325410485267639,
0.11718742549419403,
0.02932017296552658,
0.01786898821592331,
0.3198564648628235,
0.06070472300052643,
-0.16304609179496765,
-0.18727372586727142,
-0.15464897453784943,
-0.31083449721336365,
0.14097148180007935,
-0.5357590913772583,
-0.31788143515586853,
-0.18682245910167694,
0.017606737092137337,
0.03905166685581207,
0.13763314485549927,
0.040708623826503754,
0.06589558720588684,
0.38606196641921997,
-0.24608133733272552,
0.0228686835616827,
-0.0733768567442894,
0.05601205676794052,
0.1910093128681183,
0.13826671242713928,
0.2119104266166687,
0.054612647742033005,
0.28008174896240234,
0.17498701810836792,
0.12081345915794373,
-0.4278721213340759,
-0.21714463829994202,
0.035178035497665405,
-0.18122652173042297,
0.31605973839759827,
-0.049970194697380066,
0.12054510414600372,
0.016753584146499634,
-0.3269662857055664,
0.25565508008003235,
0.20793844759464264,
-0.161272794008255,
-0.0974448174238205,
-0.08161810785531998,
0.04988422989845276,
-0.030734773725271225,
0.03510560467839241,
-0.5214102864265442,
-0.1559251993894577,
0.09274488687515259,
-0.05337362736463547,
0.15015843510627747,
-0.37618064880371094,
-0.027037624269723892,
-0.15451964735984802,
-0.24594414234161377,
-0.19281072914600372,
0.10893113911151886,
-0.1487652212381363,
0.3165307641029358,
-0.2071228325366974,
-0.22174502909183502,
0.04760913923382759,
-0.024449730291962624,
0.10026487708091736,
-0.12155482172966003,
-0.004433579742908478,
-0.2875514626502991,
-0.1356465071439743,
0.37222012877464294,
0.1656215339899063,
0.031095221638679504,
0.07830303907394409,
-0.0006122887134552002,
0.07721380889415741,
0.035926736891269684,
-0.06966888904571533,
-0.2716183066368103,
0.4920920431613922,
0.1767437756061554,
-0.1471424698829651,
0.07714194059371948,
-0.1666414439678192,
0.41515952348709106,
0.394986629486084,
0.15833508968353271,
0.05750931799411774,
-0.0791521817445755,
0.034581683576107025,
0.016391471028327942,
-0.3453585207462311,
-0.13753651082515717,
-0.2322496473789215,
0.25003618001937866,
0.3263906240463257,
0.30306926369667053,
-0.05394697189331055,
-0.3016420304775238,
-0.22833919525146484,
-0.05430065840482712,
-0.0018595494329929352,
-0.010382680222392082,
-0.1823461800813675,
0.13289427757263184,
-0.162925586104393,
-0.4780876636505127,
-0.04971492290496826,
-0.1768641173839569,
-0.2471405267715454,
0.18482020497322083,
0.11430265009403229,
-0.1332908719778061,
-0.2608741819858551,
-0.4208773374557495,
-0.25585901737213135,
0.21168573200702667,
0.2892872989177704,
-0.1924757957458496,
0.1844281107187271,
0.22218546271324158,
0.023058868944644928,
-0.008902749046683311,
0.5363459587097168,
-0.13104799389839172,
-0.6383197903633118,
0.10659085214138031,
0.07019483298063278,
-0.2859962582588196,
-0.08618152141571045,
0.11611159145832062,
0.23671045899391174,
-0.18622033298015594,
0.34955769777297974,
-0.19708505272865295,
-0.09067080169916153,
0.37599247694015503,
0.23773734271526337,
-0.11711625754833221,
-0.13011078536510468,
-0.08881749212741852,
-0.22250929474830627,
-0.19903799891471863,
-0.17672604322433472,
-0.025072552263736725,
0.16824103891849518,
-0.09630245715379715,
-0.20272283256053925,
0.06799589097499847,
-0.011125529184937477,
0.38591766357421875,
-0.12051095068454742,
0.0584266297519207,
0.08590114116668701,
0.1584964543581009,
-0.02365986257791519,
-0.12263886630535126,
0.4066162407398224,
0.5494169592857361,
0.004913885146379471,
-0.46317869424819946,
-0.01905398815870285,
0.06349065154790878,
0.8533045649528503,
-0.06326374411582947,
0.18528689444065094,
0.6703080534934998,
-0.36969834566116333,
0.023339617997407913,
-0.06273932754993439,
-0.168594092130661,
0.26279735565185547,
0.05676887929439545,
-0.5847798585891724,
-0.23462514579296112,
0.5789954662322998,
0.11517488956451416,
0.01840031147003174,
0.10999239981174469,
0.10939137637615204,
-0.006112664006650448,
0.07187433540821075,
0.07549916952848434,
0.9964184761047363,
-0.026982076466083527,
0.12767869234085083,
-0.01642816886305809,
-0.13822302222251892,
0.4816373288631439,
-0.2349291741847992,
0.16127994656562805,
-0.11191052198410034,
-0.22942450642585754,
-0.1767653375864029,
-0.11556684970855713,
0.029932372272014618,
0.12177978456020355,
-0.2237645834684372,
-0.02505449205636978,
0.03284722566604614,
0.36983948945999146,
0.12694749236106873,
0.2869730293750763,
0.01249367743730545,
0.023471102118492126,
-0.29497674107551575,
0.023310326039791107,
-0.045748271048069,
-0.26336997747421265,
-0.12799641489982605,
-0.12842880189418793,
0.022118691354990005,
0.14650359749794006,
-0.19725216925144196,
-0.19350695610046387,
0.23814040422439575,
0.12049516290426254,
-0.04434764012694359,
-0.33369767665863037,
0.11969079077243805,
0.3478780686855316,
-0.021762870252132416,
-0.12820665538311005,
-0.25991106033325195,
0.1848701536655426,
-0.20092496275901794,
-0.07293801754713058,
-0.24323631823062897,
-0.2942788302898407,
0.13093523681163788,
0.025111988186836243,
-0.4285352826118469,
0.36054494976997375,
0.2667003870010376,
-0.3246431350708008,
-0.5630782842636108,
0.3716394305229187,
-0.028551340103149414,
-0.09698174148797989,
-0.11413149535655975,
0.1640864908695221,
0.2298421859741211,
-0.19975529611110687,
0.0692213922739029,
0.20243576169013977,
-0.07809939235448837,
0.3390573263168335,
-0.16615155339241028,
-0.09638248383998871,
-0.1316203624010086,
0.2055666446685791,
0.368618369102478,
-0.07716293632984161,
0.24694983661174774,
0.3085804581642151,
0.02146892622113228,
0.0021758899092674255,
0.04425735026597977,
0.34026026725769043,
-0.09630750864744186,
-0.14224500954151154,
-0.12132707983255386,
0.653731644153595,
0.14168590307235718,
-0.11461402475833893,
0.1219407394528389,
-0.06970419734716415,
-0.19746622443199158,
-0.1922418773174286,
-0.0428091362118721,
0.4337729215621948,
0.22551347315311432,
0.2365424633026123,
0.12040015310049057,
0.14480236172676086,
0.1068512499332428,
0.6020616888999939,
-0.22090458869934082,
0.08664817363023758,
-0.13095304369926453,
0.15756112337112427,
-0.11743900179862976,
0.12458743155002594,
-0.41784220933914185,
-0.05570918321609497,
-0.015682155266404152,
-0.09830763936042786,
0.1327158808708191,
-0.17255502939224243,
0.130204439163208,
0.1374422311782837,
0.22621363401412964,
0.10542693734169006,
-0.04272860661149025,
-0.19351419806480408,
0.028850451111793518,
-0.09987294673919678,
0.09414659440517426,
-0.11205270141363144,
-0.007404722273349762,
-0.21888495981693268,
0.6802121996879578,
-0.3688054382801056,
-0.28441035747528076,
0.22337311506271362,
0.29481077194213867,
0.2068844437599182,
0.0977315828204155,
0.1999913454055786,
-0.06337977200746536,
-0.025446943938732147,
0.09291703253984451,
0.14969070255756378,
0.3330361247062683,
-0.2232131063938141,
0.08356510102748871,
0.05643860623240471,
-0.09880150854587555,
-0.2631756067276001,
0.5116095542907715,
0.02198745682835579,
-0.11723867058753967,
0.6102742552757263,
0.06647679954767227,
0.06699095666408539,
-0.214202880859375,
-0.21160255372524261,
0.1705336570739746,
0.03543556109070778,
-0.13512954115867615,
0.04082588106393814,
0.14617669582366943,
0.3203769326210022,
-0.1741495579481125,
-0.05516573414206505,
0.32560956478118896,
0.121685691177845,
0.1048741340637207,
0.5828748345375061,
0.1846475601196289,
-0.15135584771633148,
0.37867045402526855,
0.1525380164384842,
0.046457551419734955,
0.19294875860214233,
-0.3067387044429779,
0.21327830851078033,
0.15263435244560242,
-0.24120786786079407,
0.7241946458816528,
0.15611626207828522,
-0.08061949908733368,
-0.17472025752067566,
0.2506225109100342,
-0.511979877948761,
0.08675002306699753,
0.4003407955169678,
0.08009418100118637,
-0.26638466119766235,
-0.06857702136039734,
0.572130024433136,
0.11213865876197815,
0.03956988453865051,
-0.01751050166785717,
-0.20546174049377441,
0.18685969710350037,
0.013037022203207016,
-0.09045910835266113,
-0.4938960671424866,
0.18697905540466309,
0.04331294819712639,
0.20334157347679138,
-0.06733112782239914,
0.5031725168228149,
0.5431138873100281,
0.06346691399812698,
-0.07186805456876755,
-0.12436265498399734,
0.21895769238471985,
-0.14976707100868225,
-0.24294513463974,
0.42990216612815857,
0.3766019344329834,
0.15851427614688873,
-0.10329675674438477,
0.2299920618534088,
-0.08296109735965729,
0.00031582266092300415,
0.2541086971759796,
-0.10884641110897064,
-0.0004285350441932678,
-0.1528831273317337,
0.26825445890426636,
0.15996679663658142,
0.04863246902823448,
-0.048879388719797134,
-0.13147376477718353,
0.1056813895702362,
-0.7501717805862427,
0.1314440667629242,
-0.06130482256412506,
-0.47488823533058167,
0.2140209823846817,
0.027470052242279053,
-0.16486266255378723,
-0.17081697285175323,
0.6243021488189697,
-0.21388278901576996,
-0.1746557056903839,
-0.1487809121608734,
0.06640109419822693,
-0.004591111093759537,
0.5077128410339355,
0.4329603910446167,
0.6219313740730286,
-0.19357740879058838,
-0.2402566522359848,
-0.3080734610557556,
-0.178705632686615,
-0.15755027532577515,
0.17174763977527618,
-0.045217204838991165,
0.08461008220911026,
0.0841357558965683,
0.230674609541893,
0.1972670555114746,
-0.06116003170609474,
0.06594218313694,
0.31619951128959656,
-0.2904932498931885,
-0.0753537118434906,
0.057053662836551666,
0.009147805161774158,
-0.20591357350349426,
0.13191863894462585,
0.3890880048274994,
-0.10579672455787659,
-0.11584550142288208,
-0.2776373624801636,
0.03976041078567505,
0.6466372609138489,
-0.11595171689987183,
0.19541653990745544,
0.039425697177648544,
0.6487985849380493,
-0.02207731455564499,
0.5005599856376648,
0.07703863084316254,
-0.25987496972084045,
-0.1289418339729309,
0.12929025292396545,
-0.16832225024700165,
-0.11929495632648468,
-0.29937583208084106,
-0.15393754839897156,
0.25517699122428894,
-0.17791208624839783,
-0.12737129628658295,
0.1365204006433487,
0.05754532665014267,
-0.24773360788822174,
-0.09283918887376785,
-0.15821301937103271,
0.01973704621195793,
0.14109547436237335,
-0.05976235121488571,
-0.090704046189785,
0.017388850450515747,
-0.15124495327472687,
-0.0514669269323349,
-0.018444806337356567,
-0.24371705949306488,
-0.28618279099464417,
-0.06852059066295624,
0.004814423620700836,
0.3146267831325531,
-0.2902793288230896,
-0.38197752833366394,
0.3957715928554535,
0.1146726906299591,
-0.13478165864944458,
0.5847892761230469,
0.49420079588890076,
0.06095217540860176,
-0.2951188087463379,
0.0007421374320983887,
-0.04742886871099472,
-0.0779665857553482,
-0.23499886691570282,
-0.32867544889450073
] |
https://github.com/huggingface/datasets/issues/2343 | Columns are removed before or after map function applied? | Hi! Columns are removed **after** applying the function and **before** updating the examples with the function's output (as per the docs [here](https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset.map.remove_columns)). I agree the docs on this should be more clear. | ## Describe the bug
According to the documentation when applying map function the [remove_columns ](https://huggingface.co/docs/datasets/processing.html#removing-columns) will be removed after they are passed to the function, but in the [source code](https://huggingface.co/docs/datasets/package_reference/main_classes.html#datasets.Dataset.map) it's documented that they are removed before applying function. I thinks the source code doc is more accurate, right?
| 32 | Columns are removed before or after map function applied?
## Describe the bug
According to the documentation when applying map function the [remove_columns ](https://huggingface.co/docs/datasets/processing.html#removing-columns) will be removed after they are passed to the function, but in the [source code](https://huggingface.co/docs/datasets/package_reference/main_classes.html#datasets.Dataset.map) it's documented that they are removed before applying function. I thinks the source code doc is more accurate, right?
Hi! Columns are removed **after** applying the function and **before** updating the examples with the function's output (as per the docs [here](https://huggingface.co/docs/datasets/package_reference/main_classes#datasets.Dataset.map.remove_columns)). I agree the docs on this should be more clear. | [
0.3089647889137268,
-0.4776081144809723,
-0.025570228695869446,
0.24349844455718994,
0.12835893034934998,
-0.050276950001716614,
0.22119426727294922,
-0.21544991433620453,
0.3575490117073059,
0.12930987775325775,
-0.05823449790477753,
0.3217889070510864,
0.11714256554841995,
0.20059429109096527,
-0.02677103877067566,
-0.24954748153686523,
0.3884871006011963,
-0.008867226541042328,
-0.6786360740661621,
-0.11814814805984497,
-0.4453867971897125,
0.1659536510705948,
-0.5599676370620728,
0.009737767279148102,
0.17342232167720795,
-0.24228188395500183,
-0.29210174083709717,
0.10821656882762909,
-0.1425175815820694,
-0.014711863361299038,
-0.036712609231472015,
0.02058315835893154,
-0.26891031861305237,
0.3201863467693329,
-0.00011980513954767957,
-0.11024835705757141,
-0.09973886609077454,
0.011260611936450005,
0.3418847918510437,
0.06864771246910095,
-0.17298418283462524,
0.11278223991394043,
-0.0031793159432709217,
-0.11433110386133194,
0.18800482153892517,
-0.030197206884622574,
-0.31801939010620117,
-0.1894041746854782,
0.2666236162185669,
0.14160335063934326,
0.19486095011234283,
0.09508978575468063,
0.09205546975135803,
0.19096964597702026,
0.04989727959036827,
0.15106265246868134,
-0.034893617033958435,
0.04820779711008072,
-0.06724968552589417,
-0.15712633728981018,
0.032392218708992004,
0.442002534866333,
-0.016521133482456207,
-0.12362901866436005,
0.48819419741630554,
0.23015114665031433,
-0.04809851944446564,
-0.3593961000442505,
-0.035795196890830994,
0.08300641924142838,
0.38372039794921875,
-0.2732463479042053,
-0.14338809251785278,
-0.07141048461198807,
-0.05963725596666336,
-0.128876730799675,
0.30031177401542664,
-0.011010197922587395,
0.23879903554916382,
0.09127065539360046,
-0.6726473569869995,
-0.2379947006702423,
0.09766601026058197,
0.07817088067531586,
-0.06051087751984596,
-0.0055009350180625916,
-0.32439249753952026,
0.239152193069458,
0.16186495125293732,
-0.10410186648368835,
-0.3384314775466919,
-0.1673673838376999,
0.06822618097066879,
0.7309712767601013,
-0.07180516421794891,
-0.14097866415977478,
0.0958418920636177,
0.39043018221855164,
0.09245436638593674,
-0.0699467733502388,
-0.14277520775794983,
-0.028234541416168213,
-0.15872614085674286,
0.2860836386680603,
0.42140713334083557,
0.3976307213306427,
0.08167006075382233,
0.2657255530357361,
0.12942861020565033,
0.26674729585647583,
-0.01623324118554592,
-0.09129246324300766,
0.6853949427604675,
-0.0040289899334311485,
-0.22166404128074646,
-0.21187469363212585,
0.08751913905143738,
-0.2628444731235504,
-0.06401762366294861,
0.21569395065307617,
0.11275278776884079,
-0.1744881570339203,
0.03527042269706726,
0.33640435338020325,
0.004521182272583246,
0.10881413519382477,
-0.025484632700681686,
-0.09336112439632416,
-0.080387182533741,
0.195997416973114,
-0.3100750744342804,
0.16831322014331818,
-0.2481306493282318,
-0.023982776328921318,
-0.11878889799118042,
-0.1982361078262329,
0.3727094531059265,
0.3588198721408844,
0.08747439831495285,
-0.03191639482975006,
-0.2121162861585617,
-0.21813960373401642,
0.5996025800704956,
0.3518320322036743,
-0.31556400656700134,
0.1396980881690979,
-0.025204729288816452,
0.11023092269897461,
-0.16458562016487122,
0.22385737299919128,
-0.31562647223472595,
0.1321164071559906,
-0.06913340091705322,
0.11998523026704788,
0.1572416126728058,
0.2297629415988922,
-0.25286754965782166,
-0.011267803609371185,
0.052193108946084976,
-0.27559003233909607,
0.2377748191356659,
-0.07632821053266525,
-0.23498931527137756,
-0.3175126016139984,
0.03452977538108826,
0.21514517068862915,
-0.08928251266479492,
-0.00499199703335762,
0.22354911267757416,
-0.27488943934440613,
0.13786335289478302,
0.30260607600212097,
-0.12044838070869446,
0.12619240581989288,
-0.24595434963703156,
0.021221838891506195,
0.03076171875,
-0.2417081594467163,
-0.04337463527917862,
0.31182625889778137,
0.21326418220996857,
0.2721945643424988,
-0.3650315999984741,
-0.2568931579589844,
0.07497565448284149,
0.11174488067626953,
-0.2071249783039093,
-0.026475265622138977,
0.11238135397434235,
0.15862417221069336,
-0.057013023644685745,
0.07959865778684616,
0.1404537856578827,
-0.17063294351100922,
-0.20365945994853973,
0.4239065945148468,
0.140092134475708,
-0.261574387550354,
0.22917789220809937,
0.183351531624794,
0.1221851035952568,
0.5193518996238708,
0.1428930163383484,
0.0961235985159874,
-0.03175600618124008,
-0.09258157759904861,
-0.6139187216758728,
0.0353979617357254,
0.17222487926483154,
-0.16892781853675842,
-0.04332698881626129,
-0.17054760456085205,
-0.010199318639934063,
-0.048979900777339935,
-0.06616747379302979,
-0.0669732540845871,
-0.02346784994006157,
-0.20388278365135193,
0.2246389091014862,
-0.13066531717777252,
-0.49535462260246277,
0.42460766434669495,
-0.3335021138191223,
0.40355542302131653,
-0.47797444462776184,
-0.005288518965244293,
0.03361225128173828,
-0.046154577285051346,
-0.220822274684906,
0.13212832808494568,
0.13131964206695557,
-0.24914830923080444,
-0.06842031329870224,
0.7127470374107361,
0.14669987559318542,
0.12423581629991531,
-0.17592597007751465,
0.18464221060276031,
0.44140151143074036,
0.2811318039894104,
0.11715316772460938,
-0.01785896345973015,
0.2163592278957367,
0.06507223099470139,
-0.4427538812160492,
0.0591542050242424,
-0.2205578237771988,
0.07920682430267334,
0.06556800752878189,
-0.14120839536190033,
-0.0611492395401001,
0.12223337590694427,
-0.2675957679748535,
-0.3554423451423645,
-0.1971392184495926,
0.11418752372264862,
0.07002754509449005,
0.18256253004074097,
-0.20953552424907684,
-0.04222605377435684,
0.8140283823013306,
-0.13491441309452057,
-0.3195358216762543,
0.020746659487485886,
-0.11257254332304001,
-0.16105559468269348,
0.33947986364364624,
0.03275110200047493,
0.5889245867729187,
-0.03898245096206665,
0.060111332684755325,
0.09526178985834122,
0.05512189120054245,
0.07279312610626221,
0.08603256195783615,
0.041725996881723404,
0.12092860788106918,
-0.06677459180355072,
-0.006519937422126532,
0.1997668743133545,
-0.2880091071128845,
0.11868798732757568,
-0.16041068732738495,
0.2045367807149887,
-0.3139180839061737,
-0.24087737500667572,
-0.14751334488391876,
-0.30911877751350403,
0.03287373483181,
-0.04727689176797867,
-0.30901843309402466,
-0.2994021773338318,
-0.13469992578029633,
-0.10615117847919464,
-0.4494195878505707,
0.0656643807888031,
0.134393572807312,
0.1773972064256668,
-0.27762529253959656,
0.3444194495677948,
-0.07381979376077652,
0.1265518069267273,
0.20170649886131287,
0.01642996072769165,
-0.273938924074173,
-0.068571075797081,
0.036707162857055664,
-0.03377494588494301,
-0.2093723863363266,
-0.10076452046632767,
-0.46260544657707214,
0.192795068025589,
-0.31839418411254883,
0.034857477992773056,
0.2808428406715393,
0.2550963759422302,
-0.3641182780265808,
-0.026837773621082306,
0.10302967578172684,
-0.37719157338142395,
-0.2131384313106537,
-0.1659727841615677,
0.19239848852157593,
0.09675423055887222,
-0.39425644278526306,
-0.11361827701330185,
0.2648557722568512,
-0.1812300682067871,
0.31765085458755493,
-0.07483267784118652,
0.13738805055618286,
-0.204411119222641,
-0.05294130742549896,
-0.15239059925079346,
-0.5730510354042053,
0.17077229917049408,
-0.3736298680305481,
-0.6991507411003113,
0.07948454469442368,
-0.2663939893245697,
-0.2577112913131714,
0.0019319988787174225,
0.41209936141967773,
0.02808091975748539,
0.013713276013731956,
-0.11944803595542908,
-0.5165742635726929,
-0.1818075329065323,
0.0012759268283843994,
-0.07285275310277939,
0.5212464332580566,
0.36498284339904785,
-0.03156237304210663,
0.06290602684020996,
-0.19256114959716797,
-0.283809632062912,
0.07014007866382599,
0.491150438785553,
-0.06565157324075699,
0.25459545850753784,
0.4375638961791992,
-0.0778575986623764,
0.20164573192596436,
0.33714261651039124,
0.031507447361946106,
0.08029605448246002,
0.02333051711320877,
0.42658573389053345,
-0.18781933188438416,
0.035477034747600555,
0.12498744577169418,
0.031898342072963715,
0.08105086535215378,
0.22834309935569763,
0.2600327134132385,
0.0045586246997118,
-0.047939084470272064,
0.23045411705970764,
-0.41822004318237305,
-0.01219441182911396,
-0.03706585615873337,
0.15158246457576752,
0.3002288043498993,
0.11700575053691864,
0.029459036886692047,
-0.004929245449602604,
-0.018293656408786774,
0.014948539435863495,
0.1324794888496399,
0.67160964012146,
-0.16903568804264069,
-0.5147501826286316,
-0.08113252371549606,
-0.44305890798568726,
0.15401557087898254,
-0.041814472526311874,
-0.12999945878982544,
-0.07791662961244583,
-0.3823106288909912,
0.21767118573188782,
0.16127684712409973,
0.4023573398590088,
-0.14372064173221588,
-0.35717225074768066,
-0.16303080320358276,
-0.20132985711097717,
-0.4027901589870453,
0.009573619812726974,
-0.2240806221961975,
-0.014112469740211964,
0.25608745217323303,
0.7187570333480835,
-0.17518013715744019,
-0.35396692156791687,
0.17621472477912903,
0.06749705970287323,
0.013328153640031815,
-0.0024908888153731823,
-0.35812798142433167,
-0.23349308967590332,
-0.043889112770557404,
-0.07107586413621902,
0.1541423499584198,
-0.02476499229669571,
0.014180502854287624,
-0.06636040657758713,
0.4786564111709595,
-0.2283223271369934,
-0.07071952521800995,
0.13349410891532898,
0.3903113007545471,
-0.10893485695123672,
-0.0021475106477737427,
0.4284106492996216,
0.1066315770149231,
-0.22584643959999084,
0.3239441514015198,
-0.4072028696537018,
0.06490390002727509,
0.044719990342855453,
-0.23970113694667816,
0.5914176106452942,
0.27986273169517517,
-0.036289047449827194,
0.220320463180542,
-0.18628214299678802,
0.2570417821407318,
-0.350614070892334,
-0.20647373795509338,
0.4685835540294647,
0.07212139666080475,
0.07664433121681213,
-0.20685410499572754,
0.11471939086914062,
0.146344855427742,
-0.30891963839530945,
0.4579131007194519,
0.4839050769805908,
-0.23514506220817566,
0.26582032442092896,
-0.042841844260692596,
0.9880914092063904,
-0.13404510915279388,
-0.072822704911232,
-0.015328750014305115,
-0.0636180192232132,
0.43620648980140686,
-0.16355295479297638,
0.15698248147964478,
-0.23399220407009125,
-0.2336694896221161,
-0.136719211935997,
-0.06630001217126846,
0.4453844726085663,
0.14169666171073914,
0.07912148535251617,
0.15977191925048828,
-0.16755464673042297,
0.7537432909011841,
-0.2610534131526947,
-0.18121947348117828,
0.15566371381282806,
-0.2076418250799179,
-0.3202383816242218,
-0.011120086535811424,
0.09449487924575806,
0.23177628219127655,
-0.1852019727230072,
0.28406471014022827,
0.16565336287021637,
-0.2953454852104187,
0.2524983882904053,
-0.04883364215493202,
-0.10617712885141373,
-0.011534765362739563,
0.20214073359966278,
0.018441379070281982,
-0.14562514424324036,
0.5770781636238098,
0.18399301171302795,
-0.10723355412483215,
0.15998610854148865,
0.18203875422477722,
0.28219345211982727,
0.343158483505249,
-0.11758933216333389,
0.4355492889881134,
-0.10035212337970734,
-0.09376399219036102,
-0.04768596589565277,
-0.11190640181303024,
-0.3258143365383148,
-0.3328315019607544,
-0.3892759680747986,
0.1995946764945984,
-0.3025176525115967,
-0.39348945021629333,
-0.08696365356445312,
0.11621411144733429,
0.2871304750442505,
-0.07984639704227448,
0.046950921416282654,
0.17516770958900452,
-0.06538056582212448,
0.5568112730979919,
0.13646087050437927,
-0.18838024139404297,
-0.18303406238555908,
0.39507681131362915,
-0.03961418569087982,
0.10876180231571198,
-0.028778977692127228,
-0.09511154145002365,
-0.36180949211120605,
-0.09974059462547302,
-0.13145053386688232,
0.14168664813041687,
-0.23896774649620056,
0.0751643031835556,
-0.026920238509774208,
0.10005655884742737,
-0.0801972895860672,
0.36898043751716614,
-0.3116399645805359,
0.011555559933185577,
-0.14346100389957428,
-0.24001745879650116,
-0.27210620045661926,
0.5402786135673523,
0.1036527156829834,
0.07047919929027557,
0.19039097428321838,
-0.11143924295902252,
0.072482168674469,
0.16117723286151886,
-0.2697308659553528,
0.14252620935440063,
0.18729400634765625,
0.19929379224777222,
0.6350449323654175,
0.2745593190193176,
0.12290865182876587,
-0.3115364611148834,
0.07274316996335983,
0.07375675439834595,
-0.06601656228303909,
-0.11789586395025253,
0.035259392112493515,
0.16499227285385132,
-0.026998408138751984,
-0.35645729303359985,
-0.0671427845954895,
0.06219127029180527,
-0.1884060651063919,
-0.3135286867618561,
0.5855848789215088,
0.05148691684007645,
-0.02572684735059738,
0.1426248848438263,
-0.15622185170650482,
0.007092855870723724,
0.018846336752176285,
0.09560203552246094,
0.09635047614574432,
-0.0476510226726532,
0.17086395621299744,
-0.07396010309457779,
-0.22279220819473267,
-0.16529205441474915,
0.2007109820842743,
0.10111720860004425,
-0.1088024377822876,
0.07254853844642639,
0.5201243162155151,
-0.005769908428192139,
0.22103115916252136,
-0.10163635015487671,
0.5441368818283081,
-0.12239836156368256,
-0.1970759928226471,
-0.12607629597187042,
-0.16742384433746338,
0.15137401223182678,
-0.14946603775024414,
-0.04950826242566109,
0.194566011428833,
0.2746535837650299,
0.1822851151227951,
0.20676147937774658,
0.3371385633945465,
0.31151196360588074,
0.058839526027441025,
0.06461091339588165,
0.446927934885025,
-0.11094380915164948,
0.004284769296646118,
0.3981342315673828,
-0.17107361555099487,
0.25690704584121704,
0.40147775411605835,
0.21668557822704315,
-0.09417196363210678,
0.15334445238113403,
0.4268706440925598,
0.08146336674690247,
-0.08556939661502838,
0.33854538202285767,
0.22427648305892944,
-0.5936962962150574,
0.28124111890792847,
0.4473070502281189,
-0.1500481367111206,
-0.023910947144031525,
0.20223036408424377,
0.1256602257490158,
-0.144475519657135,
-0.4569943845272064,
-0.039306171238422394,
0.34785062074661255,
-0.24510210752487183,
-0.16385148465633392,
-0.08930592238903046,
-0.26649579405784607,
0.10599398612976074,
0.12984643876552582,
-0.16077962517738342,
-0.13189375400543213,
0.935860276222229,
-0.0738411545753479,
-0.026044562458992004,
-0.0015203747898340225,
-0.23194292187690735,
-0.2686721384525299,
0.4775482416152954,
0.11645050346851349,
0.20479519665241241,
-0.140530064702034,
0.20314157009124756,
0.10671669244766235,
0.14735712110996246,
-0.0509648434817791,
-0.17030659317970276,
0.2889964282512665,
0.22880451381206512,
0.03723377361893654,
-0.08794736117124557,
0.200750932097435,
0.5125405192375183,
-0.006074331700801849,
0.1148250550031662,
-0.06519109010696411,
0.09687657654285431,
-0.1046721562743187,
-0.0820348858833313,
-0.029323328286409378,
0.6772727966308594,
-0.26086294651031494,
0.32516855001449585,
-0.36213842034339905,
-0.30598321557044983,
-0.02657284587621689,
-0.1309100091457367,
-0.011531438678503036,
-0.12242719531059265,
-0.058887530118227005,
-0.09574025869369507,
0.03867156058549881,
-0.11898519843816757,
0.037081390619277954,
0.32005438208580017,
0.152998149394989,
0.37250956892967224,
-0.34282568097114563,
-0.26929569244384766,
-0.7318803668022156,
-0.4001443386077881,
-0.1298292577266693,
0.09295746684074402,
0.23328542709350586,
0.04611784964799881,
-0.009491455741226673,
0.12076598405838013,
-0.035995833575725555,
0.10532224178314209,
-0.32231828570365906,
-0.23762613534927368,
-0.05258958786725998,
0.012194111943244934,
0.025261785835027695,
-0.39491158723831177,
-0.0864952951669693,
0.046539224684238434,
-0.0884067565202713,
0.25542765855789185,
0.08958445489406586,
-0.0316789411008358,
-0.13738830387592316,
0.4702453017234802,
-0.27062299847602844,
-0.21493428945541382,
0.24669553339481354,
0.3106812536716461,
-0.07355241477489471,
-0.20176932215690613,
-0.1266886591911316,
0.1495233029127121,
-0.008662108331918716,
-0.08560051769018173,
0.1920950710773468,
-0.4165782332420349,
0.3423428237438202,
0.035897113382816315,
-0.260235995054245,
-0.11492548137903214,
0.049312833696603775,
-0.1109398603439331,
0.059952184557914734,
-0.31325075030326843,
-0.12186267971992493,
0.020220458507537842,
-0.249282568693161,
0.40491756796836853,
0.41045650839805603,
0.05042874440550804,
-0.09104885905981064,
-0.13271543383598328,
-0.05097200721502304,
0.4812631905078888,
-0.4103769063949585,
-0.0034484434872865677,
-0.06722619384527206,
0.06883663684129715,
0.07610420137643814,
-0.5409641265869141,
-0.7981171607971191,
-0.049776360392570496,
0.10820325464010239,
-0.2387610673904419,
-0.15763159096240997,
0.22399723529815674,
-0.41029059886932373,
-0.10191547870635986,
0.047541964799165726,
0.38420477509498596,
0.046112075448036194,
-0.0669240802526474,
0.1779543161392212,
-0.019630182534456253
] |
https://github.com/huggingface/datasets/issues/2337 | NonMatchingChecksumError for web_of_science dataset | I've raised a PR for this. Should work with `dataset = load_dataset("web_of_science", "WOS11967", ignore_verifications=True)`once it gets merged into the main branch. Thanks for reporting this! | NonMatchingChecksumError when trying to download the web_of_science dataset.
>NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://data.mendeley.com/datasets/9rw3vkcfy4/6/files/c9ea673d-5542-44c0-ab7b-f1311f7d61df/WebOfScience.zip?dl=1']
Setting `ignore_verfications=True` results in OSError.
>OSError: Cannot find data file.
Original error:
[Errno 20] Not a directory: '/root/.cache/huggingface/datasets/downloads/37ab2c42f50d553c1d0ea432baca3e9e11fedea4aeec63a81e6b7e25dd10d4e7/WOS5736/X.txt'
```python
dataset = load_dataset('web_of_science', 'WOS5736')
```
There are 3 data instances and they all don't work. 'WOS5736', 'WOS11967', 'WOS46985'
datasets 1.6.2
python 3.7.10
Ubuntu 18.04.5 LTS | 25 | NonMatchingChecksumError for web_of_science dataset
NonMatchingChecksumError when trying to download the web_of_science dataset.
>NonMatchingChecksumError: Checksums didn't match for dataset source files:
['https://data.mendeley.com/datasets/9rw3vkcfy4/6/files/c9ea673d-5542-44c0-ab7b-f1311f7d61df/WebOfScience.zip?dl=1']
Setting `ignore_verfications=True` results in OSError.
>OSError: Cannot find data file.
Original error:
[Errno 20] Not a directory: '/root/.cache/huggingface/datasets/downloads/37ab2c42f50d553c1d0ea432baca3e9e11fedea4aeec63a81e6b7e25dd10d4e7/WOS5736/X.txt'
```python
dataset = load_dataset('web_of_science', 'WOS5736')
```
There are 3 data instances and they all don't work. 'WOS5736', 'WOS11967', 'WOS46985'
datasets 1.6.2
python 3.7.10
Ubuntu 18.04.5 LTS
I've raised a PR for this. Should work with `dataset = load_dataset("web_of_science", "WOS11967", ignore_verifications=True)`once it gets merged into the main branch. Thanks for reporting this! | [
-0.08515875041484833,
-0.07917483150959015,
-0.06877351552248001,
0.21224771440029144,
0.14462970197200775,
0.1670498549938202,
-0.06744648516178131,
0.35615935921669006,
0.33571118116378784,
0.17037664353847504,
-0.1841287910938263,
-0.08829446136951447,
0.03202449902892113,
-0.04910021647810936,
-0.17920134961605072,
0.3910675644874573,
0.11154346168041229,
0.07040543109178543,
0.14896205067634583,
-0.02313869073987007,
-0.18310509622097015,
0.3623231053352356,
-0.07175563275814056,
-0.19761143624782562,
-0.17421028017997742,
0.21031002700328827,
0.07702990621328354,
0.2272590696811676,
-0.1206633672118187,
-0.24195300042629242,
0.5031521320343018,
0.1476857215166092,
0.2182934582233429,
0.5435404181480408,
-0.000125976832350716,
0.15167777240276337,
0.25659483671188354,
-0.03430826961994171,
-0.2887716293334961,
-0.29092884063720703,
-0.2795560956001282,
-0.4759109318256378,
-0.058786727488040924,
0.010869652032852173,
0.17460432648658752,
0.16570931673049927,
0.08828791975975037,
-0.18443386256694794,
0.04312634468078613,
0.3276798129081726,
0.09150324761867523,
0.578720211982727,
0.25563666224479675,
0.09548830986022949,
0.2089748978614807,
0.12257416546344757,
-0.03540494665503502,
0.3028367757797241,
0.342702180147171,
0.22101262211799622,
0.11646229028701782,
0.06072221323847771,
-0.22143962979316711,
0.35172486305236816,
0.10202694684267044,
-0.0368373841047287,
0.17356780171394348,
-0.5107842683792114,
0.2583925724029541,
0.5678055882453918,
0.49798664450645447,
-0.0043833255767822266,
-0.41952696442604065,
-0.16576465964317322,
-0.37333106994628906,
0.015746096149086952,
0.36659929156303406,
0.25913482904434204,
-0.3134579360485077,
0.013368552550673485,
-0.33019474148750305,
0.08453162014484406,
-0.077210932970047,
0.38961905241012573,
0.018024638295173645,
0.2835502624511719,
-0.029588256031274796,
-0.0571473091840744,
0.1161496639251709,
-0.10186776518821716,
0.5316735506057739,
-0.43824502825737,
0.2005496472120285,
0.14416112005710602,
-0.4212915897369385,
-0.17661377787590027,
-0.1564653217792511,
0.5054699182510376,
0.38025015592575073,
0.09734223037958145,
0.11994936317205429,
0.1752367913722992,
-0.3893418312072754,
0.1672763228416443,
0.07532995939254761,
0.11471739411354065,
-0.04744851589202881,
0.013532801531255245,
0.31223559379577637,
0.24396833777427673,
0.029743876308202744,
0.13695363700389862,
0.1577558070421219,
-0.32427293062210083,
0.3243068754673004,
-0.23139801621437073,
0.3200097680091858,
-0.42318761348724365,
-0.3306281566619873,
0.09065181761980057,
-0.3126274347305298,
-0.095594123005867,
0.1481838971376419,
0.33036744594573975,
-0.1278492957353592,
0.415251761674881,
0.00710412859916687,
0.18330590426921844,
-0.08024086058139801,
-0.10897613316774368,
-0.25289270281791687,
-0.06734418869018555,
0.06807799637317657,
0.22316458821296692,
0.33872297406196594,
-0.046490903943777084,
0.5633102059364319,
0.04719104245305061,
0.25532835721969604,
-0.024210752919316292,
0.06451266258955002,
0.11922663450241089,
-0.0653313621878624,
0.5076725482940674,
0.037769559770822525,
0.17639224231243134,
0.1925571858882904,
-0.020630046725273132,
-0.12922783195972443,
0.15454930067062378,
-0.29982975125312805,
-0.346696138381958,
-0.03616488724946976,
0.07290870696306229,
-0.5573635697364807,
-0.29707011580467224,
0.06675902009010315,
-0.33451926708221436,
0.18524928390979767,
-0.3027689456939697,
-0.024020321667194366,
-0.16866415739059448,
-0.007671739906072617,
-0.14570577442646027,
0.037420690059661865,
0.23803146183490753,
-0.14479753375053406,
-0.04072030633687973,
-0.03820169344544411,
-0.08330366015434265,
0.23427623510360718,
0.17728830873966217,
-0.052478402853012085,
-0.07863224297761917,
-0.40352997183799744,
-0.08021049201488495,
0.2724950611591339,
-0.15743689239025116,
-0.614874005317688,
0.09992116689682007,
0.18087904155254364,
0.2084609866142273,
0.22434978187084198,
0.17308269441127777,
-0.32094383239746094,
-0.08141309022903442,
-0.10341091454029083,
-0.12010642886161804,
-0.015614142641425133,
0.010025827214121819,
-0.3111903965473175,
-0.1605874001979828,
0.16139592230319977,
0.19054549932479858,
0.14213773608207703,
0.038894474506378174,
0.07761222124099731,
-0.29169023036956787,
0.44035059213638306,
-0.2310880422592163,
-0.010210947133600712,
0.155678391456604,
0.2587718069553375,
0.23197618126869202,
0.05061647668480873,
-0.18163487315177917,
-0.5557799935340881,
0.32318946719169617,
-0.1367998719215393,
-0.009690344333648682,
-0.03009369969367981,
-0.07737782597541809,
-0.14307725429534912,
-0.25695955753326416,
-0.2845996916294098,
-0.2503167390823364,
-0.09026753902435303,
0.2949233651161194,
0.4509861171245575,
-0.048933349549770355,
-0.15751908719539642,
0.03791060671210289,
-0.14193680882453918,
0.18654662370681763,
-0.3568159341812134,
0.33746421337127686,
-0.045254096388816833,
0.014525167644023895,
-0.027278855443000793,
0.037679798901081085,
0.127090185880661,
-0.044037871062755585,
-0.12271616607904434,
0.4065565764904022,
0.0182055477052927,
-0.05074124038219452,
0.10548979043960571,
0.4436124563217163,
0.135044127702713,
-0.12978200614452362,
-0.02143707312643528,
0.37854617834091187,
0.049499817192554474,
0.03357163816690445,
-0.20137882232666016,
0.24748606979846954,
-0.13905911147594452,
0.3544168174266815,
0.08804404735565186,
0.2606643736362457,
0.24485406279563904,
-0.1513049155473709,
-0.18409079313278198,
-0.0671156793832779,
0.4213167428970337,
-0.35617902874946594,
0.09809771180152893,
-0.08242036402225494,
-0.15690293908119202,
0.03166818618774414,
0.07914957404136658,
-0.2353099286556244,
0.008786894381046295,
0.21702155470848083,
0.06293587386608124,
-0.08831655979156494,
-0.05959893763065338,
0.5852566957473755,
0.5754346251487732,
0.19979168474674225,
0.11848056316375732,
0.08072751760482788,
-0.03011646866798401,
-0.12028466910123825,
0.11565084755420685,
0.22584624588489532,
0.08752855658531189,
0.3959541320800781,
0.056620217859745026,
-0.040673427283763885,
-0.4490392804145813,
-0.2895910143852234,
-0.0693226158618927,
0.2049109935760498,
-0.46178025007247925,
-0.07148436456918716,
-0.2673533856868744,
-0.02680031582713127,
-0.4079287052154541,
-0.14230233430862427,
-0.6074797511100769,
-0.5206984877586365,
0.0005134418606758118,
0.3735794723033905,
-0.02954724058508873,
0.336008220911026,
-0.47618940472602844,
-0.030932411551475525,
-0.170824334025383,
-0.06827429682016373,
-0.11131387948989868,
0.24012060463428497,
-0.07354386150836945,
-0.10283279418945312,
0.45623353123664856,
-0.008245737291872501,
0.28311386704444885,
-0.32462069392204285,
-0.0525071918964386,
-0.7112338542938232,
-0.3908773362636566,
0.04804757237434387,
0.027290254831314087,
-0.016577376052737236,
0.33024269342422485,
0.29186874628067017,
0.06967302411794662,
-0.20945242047309875,
0.23887884616851807,
-0.3470226526260376,
-0.27581652998924255,
0.14251141250133514,
-0.027026360854506493,
-0.03242040425539017,
0.16906802356243134,
-0.17878052592277527,
-0.2738601863384247,
-0.310621976852417,
-0.1619168221950531,
0.09886841475963593,
0.11759732663631439,
0.3009377717971802,
-0.006698525045067072,
0.059307921677827835,
0.05647362396121025,
0.24263592064380646,
-0.31337490677833557,
-0.8532568216323853,
0.46547797322273254,
0.0037948363460600376,
-0.18665282428264618,
0.2090541422367096,
-0.053875457495450974,
0.29357051849365234,
0.22972874343395233,
-0.4464188814163208,
-0.32018527388572693,
-0.31006407737731934,
-0.13665495812892914,
0.2622312307357788,
0.1717274785041809,
0.4347870349884033,
-0.150223508477211,
-0.025073310360312462,
-0.0867382064461708,
-0.17591248452663422,
0.06490786373615265,
-0.13060399889945984,
0.6317174434661865,
-0.07901167124509811,
0.057721324265003204,
0.045455191284418106,
0.7125911116600037,
0.38632604479789734,
0.0674954503774643,
0.30427831411361694,
0.2701839804649353,
0.3162381947040558,
0.06913121044635773,
-0.21327169239521027,
-0.20780055224895477,
-0.11379504203796387,
-0.018037602305412292,
0.2296578586101532,
0.08893178403377533,
0.08737773448228836,
-0.17191049456596375,
-0.007971066981554031,
-0.3711528480052948,
-0.16850800812244415,
-0.12884244322776794,
-0.0851927250623703,
0.2630026340484619,
0.16964559257030487,
-0.04374280571937561,
-0.1384739726781845,
-0.2854968011379242,
0.022427324205636978,
0.38930851221084595,
-0.016167834401130676,
0.05058012902736664,
-0.4088653028011322,
0.11297368258237839,
-0.27392899990081787,
0.4751007556915283,
-0.037260256707668304,
0.30570799112319946,
0.0980374813079834,
-0.17731952667236328,
0.04618234559893608,
-0.000306540634483099,
0.6603270769119263,
-0.39927273988723755,
0.24561439454555511,
-0.2270677536725998,
-0.0527217760682106,
-0.2520555257797241,
-0.27406588196754456,
0.03969306871294975,
0.16290394961833954,
0.3987034857273102,
0.33974117040634155,
-0.25406965613365173,
-0.0806218683719635,
0.20215600728988647,
0.08741883933544159,
-0.045002274215221405,
-0.43709930777549744,
-0.23322075605392456,
-0.26446327567100525,
-0.3989748954772949,
-0.20299118757247925,
0.015741506591439247,
0.16827407479286194,
-0.018936024978756905,
-0.00002341344952583313,
-0.0035437699407339096,
-0.09683647751808167,
0.4360724091529846,
-0.16600771248340607,
0.138636976480484,
0.10400528460741043,
0.1729806512594223,
0.2166641354560852,
0.17232012748718262,
0.409217894077301,
0.731895387172699,
-0.28749778866767883,
-0.6002774238586426,
-0.011357203125953674,
-0.052717722952365875,
0.05978734791278839,
0.30570846796035767,
0.09644846618175507,
-0.3372848927974701,
0.563247799873352,
0.19887077808380127,
0.058583397418260574,
-0.0768781304359436,
0.06755159050226212,
0.07075124233961105,
-0.2937157452106476,
-0.22777117788791656,
0.27312543988227844,
0.34299740195274353,
0.04260334372520447,
0.16352838277816772,
0.11388225853443146,
-0.024871790781617165,
0.1626584231853485,
0.14827585220336914,
1.0862957239151,
0.0878434106707573,
0.18608345091342926,
-0.05223778635263443,
-0.11041128635406494,
0.2627025246620178,
-0.19081133604049683,
0.10540589690208435,
-0.3536964952945709,
-0.30446138978004456,
-0.21957500278949738,
-0.27972397208213806,
0.1659424602985382,
0.1664835512638092,
-0.11623764038085938,
0.5488876700401306,
0.11682195961475372,
0.21600119769573212,
0.204786017537117,
0.1635703444480896,
-0.5091705322265625,
-0.03324691951274872,
-0.05908351391553879,
0.08841875195503235,
-0.09280019998550415,
0.5007266402244568,
-0.07782307267189026,
-0.1452210396528244,
-0.27541470527648926,
-0.1927771121263504,
-0.2730584740638733,
0.15954405069351196,
-0.1317400485277176,
0.24020007252693176,
0.32207220792770386,
-0.23708291351795197,
-0.11302788555622101,
0.4886993169784546,
0.38357919454574585,
-0.1671028882265091,
-0.35531187057495117,
0.13552173972129822,
0.2764637768268585,
-0.12449905276298523,
-0.01712230034172535,
-0.3096615672111511,
0.2277713418006897,
-0.08813545107841492,
-0.1494825929403305,
-0.04791698604822159,
-0.04368595778942108,
-0.5708996653556824,
-0.002088487148284912,
-0.23164062201976776,
-0.12375211715698242,
-0.41684669256210327,
-0.12625904381275177,
-0.19659370183944702,
0.02170252799987793,
-0.27033165097236633,
0.03172872215509415,
0.32459932565689087,
-0.30156123638153076,
0.1005060151219368,
0.0034998804330825806,
-0.2388792783021927,
-0.21213725209236145,
0.440242737531662,
-0.0634017139673233,
-0.09472388029098511,
0.30091336369514465,
0.10905541479587555,
-0.19309552013874054,
-0.03115871734917164,
0.03786297142505646,
-0.1890498846769333,
-0.3966253995895386,
0.17358873784542084,
-0.09290168434381485,
0.08760419487953186,
-0.0711563378572464,
0.2744777500629425,
0.2370479553937912,
0.25806644558906555,
-0.013826552778482437,
-0.6462165117263794,
-0.12485622614622116,
-0.09524598717689514,
0.061285100877285004,
0.5304853320121765,
-0.4701806902885437,
-0.07973454892635345,
0.000978732481598854,
-0.228804349899292,
-0.17745757102966309,
0.10991664975881577,
-0.23943999409675598,
-0.26273518800735474,
-0.17821475863456726,
0.022382281720638275,
0.13009750843048096,
-0.16346444189548492,
-0.05480208992958069,
0.0018501747399568558,
-0.221084862947464,
-0.040341317653656006,
-0.04347400739789009,
0.22579966485500336,
0.2479029893875122,
-0.12102565914392471,
0.31992194056510925,
0.011033933609724045,
-0.09199663996696472,
-0.005470259115099907,
-0.09532494843006134,
0.31373727321624756,
0.004057787358760834,
-0.0022816481068730354,
0.10968254506587982,
-0.07830869406461716,
-0.10452351719141006,
-0.025328557938337326,
-0.20692592859268188,
0.16308744251728058,
0.16183415055274963,
0.11519993841648102,
-0.05663922429084778,
-0.0262812040746212,
0.18526116013526917,
0.1343865990638733,
-0.0019730105996131897,
-0.19173449277877808,
0.26883605122566223,
-0.38609689474105835,
-0.20620469748973846,
0.5657045841217041,
0.4447374641895294,
0.42400893568992615,
-0.3189668655395508,
0.3215563893318176,
0.1060509905219078,
0.12015669047832489,
-0.2795184254646301,
-0.1221100315451622,
0.4327143132686615,
0.06036309152841568,
-0.02853517234325409,
0.20223549008369446,
0.04426221176981926,
-0.30048930644989014,
0.49220335483551025,
0.24664175510406494,
0.23341920971870422,
-0.3281930088996887,
0.36743462085723877,
0.4295714199542999,
-0.16271325945854187,
0.14194218814373016,
0.29746514558792114,
-0.06612588465213776,
0.01689818501472473,
-0.03694445639848709,
-0.08295273035764694,
0.24338530004024506,
-0.47844043374061584,
0.12669230997562408,
-0.07105309516191483,
-0.423319011926651,
0.19465500116348267,
0.013320237398147583,
-0.0027761459350585938,
-0.03045261651277542,
0.06992170214653015,
0.30760684609413147,
-0.26302286982536316,
0.11276792734861374,
-0.5174109935760498,
0.038168758153915405,
-0.035842083394527435,
0.09140980243682861,
0.07975330203771591,
-0.32254427671432495,
0.03467915207147598,
0.15571238100528717,
0.02309916540980339,
-0.250474214553833,
-0.027670927345752716,
-0.062157705426216125,
-0.34793293476104736,
-0.47918346524238586,
-0.03410736471414566,
0.00951453298330307,
-0.021460533142089844,
-0.0762249305844307,
0.05614276975393295,
0.23044678568840027,
-0.37663060426712036,
0.07804876565933228,
0.43580329418182373,
0.630570650100708,
0.24793827533721924,
-0.007843317463994026,
0.021425796672701836,
-0.21039453148841858,
-0.030974075198173523,
-0.04728316515684128,
0.35796159505844116,
0.008461140096187592,
-0.02921212837100029,
0.4339887797832489,
0.015658989548683167,
-0.09159057587385178,
0.016239330172538757,
-0.31488895416259766,
0.037281326949596405,
-0.2002284824848175,
0.5952571630477905,
-0.021335862576961517,
0.19633334875106812,
-0.03310726583003998,
0.05423588678240776,
-0.37366944551467896,
-0.3054954707622528,
-0.06477108597755432,
0.0438079908490181,
0.12105491012334824,
-0.020275406539440155,
0.006015028804540634,
-0.19543835520744324,
0.2912978231906891,
0.4983137249946594,
0.09905879199504852,
-0.32132217288017273,
-0.09410979598760605,
-0.8508204817771912,
0.15708254277706146,
-0.13762760162353516,
0.12171918153762817,
0.0024773026816546917,
0.14142554998397827,
-0.020225584506988525,
0.19380970299243927,
0.4343987703323364,
0.008165247738361359,
-0.15851686894893646,
0.06571504473686218,
0.06367026269435883,
-0.17664553225040436,
-0.011665470898151398,
-0.02283419854938984,
0.15257127583026886,
-0.25369197130203247,
0.16959497332572937,
0.003675796091556549,
-0.041565023362636566,
0.054204750806093216,
0.1688700169324875,
-0.07854161411523819,
-0.16209149360656738,
0.1832970827817917,
0.1747029721736908,
0.580179750919342,
0.008168261498212814,
-0.17353183031082153,
-0.124243825674057,
-0.06307197362184525,
-0.3637905716896057,
0.3822868764400482,
-0.07290676236152649,
0.3957028388977051,
-0.334664523601532,
-0.2453681379556656,
-0.3081837594509125,
0.18947753310203552,
0.1044967919588089,
-0.12843866646289825,
-0.07453323900699615,
0.15965214371681213,
-0.2124975621700287,
0.27881595492362976,
0.3082183599472046,
-0.03991561383008957,
-0.11913585662841797,
0.26213645935058594,
-0.28275322914123535,
-0.2975856065750122,
0.6069642305374146,
0.037315551191568375,
0.002740662544965744,
-0.29812508821487427,
0.12161190062761307,
-0.12061064690351486,
-0.0510750338435173,
-0.5369361639022827,
0.0036436542868614197,
0.3522103726863861,
0.06431367993354797,
-0.32709935307502747,
0.13264596462249756,
-0.1859239786863327,
-0.0038303621113300323,
0.03173680976033211,
0.4268348515033722,
0.21331292390823364,
-0.3390217125415802,
0.13847331702709198,
-0.13046133518218994
] |
https://github.com/huggingface/datasets/issues/2330 | Allow passing `desc` to `tqdm` in `Dataset.map()` | I think the user could pass the `desc` parameter to `map` so that it can be displayed in the tqdm progress bar, as suggested by @cccntu.
When there's no multiprocessing, the `desc` of the progress bar could be the `desc` passed by the user.
In multiprocessing, we were already using a `desc` equal to `"#" + str(rank)`.
We can change it to be `(desc or "") + "#" + str(rank)` instead.
In the end, since both `desc` and `rank` could be None, we can have:
```python
pbar_desc = (desc or "") + "#" + str(rank) if rank is not None else desc
```
Finally let's remember that if we add `desc` as a new parameter to `map`, we should add it to the `ignore_kwargs` list of the `@fingerprint_transform` decorator of `Dataset._map_single` since we don't want this parameter to affect the fingerprint of the resulting dataset. | It's normal to have many `map()` calls, and some of them can take a few minutes,
it would be nice to have a description on the progress bar.
Alternative solution:
Print the description before/after the `map()` call. | 145 | Allow passing `desc` to `tqdm` in `Dataset.map()`
It's normal to have many `map()` calls, and some of them can take a few minutes,
it would be nice to have a description on the progress bar.
Alternative solution:
Print the description before/after the `map()` call.
I think the user could pass the `desc` parameter to `map` so that it can be displayed in the tqdm progress bar, as suggested by @cccntu.
When there's no multiprocessing, the `desc` of the progress bar could be the `desc` passed by the user.
In multiprocessing, we were already using a `desc` equal to `"#" + str(rank)`.
We can change it to be `(desc or "") + "#" + str(rank)` instead.
In the end, since both `desc` and `rank` could be None, we can have:
```python
pbar_desc = (desc or "") + "#" + str(rank) if rank is not None else desc
```
Finally let's remember that if we add `desc` as a new parameter to `map`, we should add it to the `ignore_kwargs` list of the `@fingerprint_transform` decorator of `Dataset._map_single` since we don't want this parameter to affect the fingerprint of the resulting dataset. | [
-0.3543035686016083,
0.035919710993766785,
-0.0605333149433136,
-0.1690317541360855,
0.3744511604309082,
-0.16675731539726257,
0.2543696165084839,
0.2177436649799347,
-0.3104322850704193,
0.41625362634658813,
0.2674729526042938,
0.6729348301887512,
-0.018251493573188782,
0.08399830758571625,
-0.14000388979911804,
0.0010155439376831055,
-0.22454023361206055,
0.28803539276123047,
-0.15424752235412598,
0.1733601987361908,
-0.3427264392375946,
-0.012350941076874733,
-0.1521170735359192,
0.3334890604019165,
-0.13368679583072662,
-0.24900877475738525,
0.01890169270336628,
0.04145888611674309,
-0.006093842908740044,
-0.6088417172431946,
-0.23131506145000458,
0.4572477340698242,
-0.11924675107002258,
0.24234184622764587,
-0.00011326629464747384,
0.04491724073886871,
0.3025875389575958,
-0.009029760956764221,
0.03430740535259247,
-0.08769533038139343,
-0.23071962594985962,
-0.20860274136066437,
0.20544946193695068,
-0.5455300807952881,
0.08109700679779053,
0.008324938826262951,
0.07799424976110458,
-0.2727373242378235,
0.24674594402313232,
-0.28378984332084656,
0.22675326466560364,
0.3224823772907257,
-0.4963639974594116,
-0.1730310022830963,
0.005127541720867157,
-0.1487743854522705,
-0.23550395667552948,
-0.053882893174886703,
0.40616580843925476,
-0.07878856360912323,
-0.36057573556900024,
0.5466030240058899,
0.03312309831380844,
0.10487304627895355,
0.0424409881234169,
0.06840823590755463,
0.9416400194168091,
-0.3111877739429474,
0.21625974774360657,
0.5596244931221008,
-0.0025461986660957336,
-0.4033758044242859,
-0.293696790933609,
-0.1252213418483734,
0.1010691225528717,
-0.2364676594734192,
-0.19622638821601868,
-0.13182398676872253,
-0.46677660942077637,
0.057220377027988434,
-0.666119396686554,
0.20629632472991943,
0.06367515027523041,
-0.1756591796875,
-0.1616930067539215,
0.13248078525066376,
0.14726878702640533,
0.1753534972667694,
0.04844848811626434,
-0.0012472569942474365,
-0.04124587029218674,
0.01212697196751833,
0.13330848515033722,
0.04199196398258209,
-0.2462373822927475,
-0.21594619750976562,
0.2609502375125885,
-0.15061765909194946,
0.02857115864753723,
0.0838269591331482,
-0.16597114503383636,
0.2715795040130615,
-0.14305907487869263,
0.21271130442619324,
0.15330414474010468,
-0.019704051315784454,
0.2840500473976135,
-0.008547332137823105,
0.0391802042722702,
-0.32177773118019104,
-0.11404731869697571,
0.06315760314464569,
0.3379698693752289,
-0.24103951454162598,
0.520162045955658,
0.45613184571266174,
-0.007319644093513489,
0.057964857667684555,
-0.06259326636791229,
0.10707215219736099,
0.2622319757938385,
0.19723030924797058,
-0.050164129585027695,
0.5713623762130737,
0.275598406791687,
0.2373303771018982,
0.027060560882091522,
-0.13680171966552734,
0.06554646790027618,
-0.11946364492177963,
-0.1515820026397705,
-0.2082110047340393,
-0.3167417347431183,
0.12127085030078888,
-0.3725426197052002,
0.2893482446670532,
0.062270328402519226,
-0.013282056897878647,
0.39089441299438477,
0.08477751910686493,
-0.004632423631846905,
-0.14389042556285858,
0.39792320132255554,
0.3534494638442993,
-0.0868193656206131,
0.1720018833875656,
0.14294534921646118,
-0.0032618455588817596,
-0.294762521982193,
0.4820658564567566,
0.017782211303710938,
-0.02988671138882637,
-0.03258240222930908,
0.12809142470359802,
0.04577363282442093,
0.2533397674560547,
-0.1417144238948822,
0.14083784818649292,
0.03594594448804855,
0.02970532700419426,
0.2586112320423126,
-0.17775751650333405,
-0.4316972494125366,
-0.33066388964653015,
0.010627901181578636,
0.16769900918006897,
-0.18429020047187805,
-0.24010342359542847,
-0.17030829191207886,
-0.03736348822712898,
0.30538034439086914,
-0.025611143559217453,
-0.2176833599805832,
0.3224093019962311,
-0.02145148441195488,
0.3570393919944763,
0.6694247126579285,
-0.2494206428527832,
-0.12314613163471222,
0.4696352481842041,
-0.3237859606742859,
-0.10443110018968582,
0.11160322278738022,
0.0702889934182167,
0.3541651964187622,
0.004136804025620222,
-0.04402171075344086,
-0.09036967903375626,
-0.12121804058551788,
0.30559441447257996,
-0.09652675688266754,
-0.13119737803936005,
0.22521835565567017,
0.08084303140640259,
0.1800922155380249,
0.04322551190853119,
-0.10034755617380142,
-0.39445796608924866,
0.46905773878097534,
-0.06870046257972717,
0.14088578522205353,
0.10587877035140991,
0.03645888343453407,
-0.2742232084274292,
-0.27406561374664307,
-0.15929627418518066,
-0.13135048747062683,
0.3375793397426605,
-0.14883998036384583,
0.025742867961525917,
-0.2376045137643814,
-0.3887972831726074,
-0.19052276015281677,
0.23812399804592133,
-0.04001815244555473,
0.0005906559526920319,
0.1616581380367279,
-0.14339493215084076,
-0.2247551679611206,
-0.1466297060251236,
-0.010220501571893692,
-0.1418246030807495,
-0.011647343635559082,
-0.12842781841754913,
0.2948250472545624,
0.036310113966464996,
0.1882728785276413,
-0.1888585388660431,
-0.07422322034835815,
0.09350024908781052,
0.18960034847259521,
0.09577343612909317,
-0.15551799535751343,
0.41989776492118835,
0.01853359304368496,
0.16534727811813354,
0.040747400373220444,
0.12632715702056885,
-0.08865220099687576,
-0.14332003891468048,
-0.0579834058880806,
0.18850789964199066,
-0.061012331396341324,
-0.06293182075023651,
0.023791655898094177,
0.579456090927124,
0.06644409149885178,
0.3983500003814697,
-0.012299127876758575,
0.17487691342830658,
0.18805477023124695,
-0.18324685096740723,
-0.09059716761112213,
-0.1429743468761444,
-0.011572692543268204,
0.4477989375591278,
0.3834437131881714,
-0.1673358827829361,
-0.2730869650840759,
0.30417025089263916,
0.5253995060920715,
0.13874012231826782,
-0.006868444383144379,
-0.08144641667604446,
-0.1799040138721466,
0.2821109890937805,
0.14811676740646362,
0.018023964017629623,
0.17942872643470764,
0.33647242188453674,
0.10172045230865479,
0.10563526302576065,
-0.1593877524137497,
-0.023774340748786926,
0.07491811364889145,
0.030105050653219223,
-0.005521714221686125,
0.016417283564805984,
-0.05899569392204285,
-0.14413994550704956,
-0.08189275115728378,
-0.2558988630771637,
0.06439585983753204,
0.06886442750692368,
-0.2571946978569031,
-0.07244651764631271,
-0.050435297191143036,
-0.08118705451488495,
0.014779235236346722,
-0.19269807636737823,
-0.04329763725399971,
-0.4102098345756531,
0.1613355129957199,
0.03978312760591507,
-0.2512668967247009,
0.40825727581977844,
-0.059076741337776184,
-0.2016567438840866,
0.194589301943779,
-0.09014449268579483,
-0.08860331773757935,
-0.3783818185329437,
0.18009138107299805,
0.01634223759174347,
0.10178462415933609,
0.010112384334206581,
0.34692853689193726,
0.016899453476071358,
0.14990729093551636,
-0.21272295713424683,
0.019614584743976593,
0.05173258110880852,
-0.14767420291900635,
-0.03389040380716324,
0.07204753160476685,
0.22883528470993042,
-0.2756088376045227,
0.1529310941696167,
0.2452516108751297,
-0.2540293335914612,
-0.11786487698554993,
0.0562494620680809,
0.1432037353515625,
-0.03209257498383522,
-0.27217403054237366,
0.14907020330429077,
-0.14150899648666382,
-0.35240891575813293,
0.07915915548801422,
-0.39883050322532654,
0.3791468143463135,
-0.006455252878367901,
-0.13703635334968567,
0.03514949232339859,
0.022324854508042336,
-0.2152627855539322,
-0.0719895288348198,
-0.44460785388946533,
0.06346046179533005,
-0.10083218663930893,
-0.07322010397911072,
-0.018656756728887558,
0.02074272930622101,
0.1150234043598175,
0.015027925372123718,
-0.11339466273784637,
-0.5253040194511414,
-0.13968078792095184,
0.4327144920825958,
-0.201466366648674,
-0.13349038362503052,
0.5469979643821716,
0.1849718689918518,
-0.2685738503932953,
-0.015079762786626816,
-0.29842084646224976,
0.033832717686891556,
0.1508786976337433,
0.0023236796259880066,
-0.21573349833488464,
0.1579723060131073,
-0.017331622540950775,
0.7264466285705566,
0.29102209210395813,
-0.12672027945518494,
-0.11478395760059357,
-0.19624771177768707,
0.11064670979976654,
0.1317903995513916,
-0.029017101973295212,
-0.47551387548446655,
-0.037459179759025574,
-0.09405063837766647,
0.10276102274656296,
-0.27093401551246643,
-0.06407671421766281,
0.24854901432991028,
0.41602054238319397,
-0.4120846688747406,
-0.3575223684310913,
0.11757420748472214,
-0.336691290140152,
0.2249913513660431,
-0.30505800247192383,
0.29694315791130066,
-0.11494289338588715,
0.12094735354185104,
0.012109048664569855,
0.24404318630695343,
0.10888896137475967,
-0.2996542453765869,
0.06647637486457825,
0.014818178489804268,
-0.3753644824028015,
0.26001423597335815,
0.19357949495315552,
-0.01399956364184618,
-0.12858472764492035,
-0.05221004784107208,
0.23728002607822418,
0.08445222675800323,
0.30914783477783203,
-0.5974335670471191,
0.19051700830459595,
0.40916091203689575,
-0.2903331518173218,
-0.26866090297698975,
0.07443663477897644,
-0.09347188472747803,
0.2835865616798401,
0.1928519606590271,
0.23234045505523682,
-0.2917528748512268,
-0.08166255801916122,
-0.20491907000541687,
-0.24622800946235657,
-0.33184605836868286,
-0.2268570363521576,
-0.2825605571269989,
-0.06737510859966278,
-0.10567865520715714,
0.3289414942264557,
0.10572346299886703,
-0.09313913434743881,
-0.11216157674789429,
-0.1835068166255951,
0.08507982641458511,
-0.12896087765693665,
0.00890834629535675,
0.43990859389305115,
0.25816136598587036,
0.0957549661397934,
0.023137882351875305,
0.0018135979771614075,
0.029471226036548615,
-0.2969561219215393,
0.2772449254989624,
-0.07371562719345093,
-0.054808393120765686,
0.11601779609918594,
-0.10620495676994324,
0.37905851006507874,
0.4680795669555664,
0.02099090814590454,
0.4216800630092621,
-0.08770874887704849,
0.3533376455307007,
-0.25840649008750916,
0.25602564215660095,
0.07468276470899582,
-0.20128574967384338,
-0.1703719049692154,
-0.16264602541923523,
0.3817443549633026,
-0.029706180095672607,
-0.2717421352863312,
0.19867372512817383,
-0.20339693129062653,
-0.16849349439144135,
0.008961843326687813,
0.22840943932533264,
1.0989409685134888,
-0.6049191951751709,
-0.0631912499666214,
-0.3199731409549713,
-0.12959688901901245,
-0.19323769211769104,
0.16193488240242004,
-0.14547577500343323,
-0.37986406683921814,
-0.0958777666091919,
-0.04464373365044594,
-0.12037451565265656,
0.19031202793121338,
0.22284911572933197,
-0.4763142466545105,
0.045310720801353455,
0.08267682790756226,
-0.015816371887922287,
-0.053796567022800446,
0.08571916818618774,
0.22676891088485718,
-0.5300148129463196,
-0.26727598905563354,
0.08780382573604584,
-0.003131445497274399,
-0.40762993693351746,
-0.11083392053842545,
-0.1381046175956726,
0.10120689868927002,
0.0013533495366573334,
-0.20484817028045654,
-0.1415642499923706,
-0.5126559138298035,
-0.031058095395565033,
0.022397201508283615,
-0.28065329790115356,
-0.0010205358266830444,
-0.0021851323544979095,
0.001285851001739502,
0.13480795919895172,
-0.07371806353330612,
0.2051575928926468,
0.03283071145415306,
0.4995696544647217,
-0.03958235681056976,
-0.034612447023391724,
0.3274908661842346,
0.04305113106966019,
-0.15432915091514587,
0.46004098653793335,
-0.08859501034021378,
-0.3783000111579895,
-0.08805939555168152,
0.15057486295700073,
0.08951170742511749,
0.10454680025577545,
0.4316313564777374,
0.07056664675474167,
0.10727304220199585,
-0.17736591398715973,
0.10752546787261963,
0.32973456382751465,
-0.301353394985199,
0.46648603677749634,
0.15095117688179016,
-0.3971972167491913,
0.16852734982967377,
0.040090177208185196,
0.07155174016952515,
0.37898749113082886,
0.21309232711791992,
-0.3200156092643738,
-0.1801004707813263,
-0.30707329511642456,
0.0981554165482521,
-0.00512836966663599,
-0.0047615766525268555,
0.2817220687866211,
0.09221234917640686,
0.11120308935642242,
0.08242984861135483,
0.38291412591934204,
-0.16070599853992462,
0.12880130112171173,
-0.4710477590560913,
-0.08618436753749847,
-0.39926621317863464,
-0.002344280481338501,
-0.22320766746997833,
0.2558085024356842,
-0.16036251187324524,
0.7003141641616821,
0.08328112959861755,
0.2738608717918396,
-0.36637991666793823,
-0.2554730176925659,
-0.4581247866153717,
0.3975931704044342,
0.149473637342453,
0.17111948132514954,
0.04175272211432457,
-0.0895036906003952,
0.0275860708206892,
0.30017387866973877,
-0.5012279748916626,
-0.27969199419021606,
-0.14677807688713074,
0.14853671193122864,
0.07189413905143738,
0.32118502259254456,
0.010442672297358513,
0.1530555784702301,
0.10071808099746704,
-0.14857275784015656,
0.2995368540287018,
0.13715678453445435,
-0.12627723813056946,
0.24343587458133698,
0.16135703027248383,
0.25835344195365906,
-0.16146227717399597,
-0.0658646821975708,
0.048837706446647644,
0.3448455035686493,
-0.18578843772411346,
0.09289516508579254,
-0.017729036509990692,
0.08144974708557129,
0.4266799986362457,
0.016348008066415787,
0.27517420053482056,
0.0750817358493805,
0.024607867002487183,
0.20151783525943756,
0.12300501763820648,
-0.03353676199913025,
0.2313365638256073,
-0.09556373953819275,
-0.28031328320503235,
-0.2249707728624344,
0.21546784043312073,
0.21630486845970154,
-0.17000755667686462,
0.1758914291858673,
0.13570909202098846,
-0.10213084518909454,
0.35647252202033997,
0.38784947991371155,
0.022942963987588882,
0.20967787504196167,
0.2662777304649353,
-0.09071137011051178,
-0.12202627211809158,
-0.400773286819458,
-0.05654745548963547,
0.25150415301322937,
0.16861873865127563,
0.23339974880218506,
0.518853485584259,
0.2669462263584137,
0.06284855306148529,
0.3121739625930786,
0.09693282097578049,
0.7731795310974121,
0.03558552637696266,
-0.22807824611663818,
-0.1063077375292778,
0.07787910103797913,
0.17724131047725677,
0.002659052610397339,
-0.009082786738872528,
0.2526455223560333,
0.1282431185245514,
0.16096815466880798,
-0.2493722289800644,
-0.12113460153341293,
-0.19300901889801025,
0.1743641346693039,
-0.11438978463411331,
-0.24444134533405304,
0.20822910964488983,
0.07027610391378403,
-0.11699537932872772,
-0.11880703270435333,
0.1732621043920517,
0.020639188587665558,
0.7649600505828857,
-0.07204991579055786,
0.32394638657569885,
-0.014843251556158066,
-0.4393482208251953,
-0.052143797278404236,
0.2582204341888428,
-0.40024176239967346,
-0.1658608466386795,
-0.14965368807315826,
0.27739518880844116,
0.2187279760837555,
0.352668821811676,
0.10833868384361267,
0.14622117578983307,
-0.3900361955165863,
-0.05914755538105965,
-0.09798277914524078,
0.12339957058429718,
-0.005718856118619442,
-0.13465888798236847,
-0.018648140132427216,
-0.05860351398587227,
0.31466737389564514,
0.11233717203140259,
-0.16522368788719177,
0.02747168391942978,
0.14352798461914062,
0.36738911271095276,
-0.09190735220909119,
0.48699337244033813,
0.19410690665245056,
-0.1355675458908081,
0.0483948290348053,
-0.03338424116373062,
-0.2675364017486572,
-0.14289812743663788,
0.32065293192863464,
-0.4000180959701538,
0.058819934725761414,
-0.22630515694618225,
0.10199829190969467,
0.05968731641769409,
0.36212581396102905,
0.11743064224720001,
0.07237954437732697,
-0.47234395146369934,
-0.2349483221769333,
-0.6552354097366333,
0.011401697993278503,
-0.0769948959350586,
-0.29305291175842285,
0.16415411233901978,
0.2058352380990982,
0.005147859454154968,
0.36401206254959106,
0.44535768032073975,
-0.2434600293636322,
-0.1943771243095398,
0.24422071874141693,
-0.3748534619808197,
0.000677403062582016,
0.08349813520908356,
-0.2616186738014221,
0.11323967576026917,
-0.26401033997535706,
0.08541060239076614,
0.2979797124862671,
0.14508098363876343,
0.0914873257279396,
-0.024064891040325165,
0.19539661705493927,
0.3445817232131958,
0.456800252199173,
-0.13066838681697845,
0.30795446038246155,
-0.1257484257221222,
0.25293657183647156,
0.3577653765678406,
0.04576929658651352,
-0.07508400827646255,
0.05228641256690025,
0.14102067053318024,
0.34086039662361145,
0.027919376268982887,
-0.04523007944226265,
-0.1750471442937851,
-0.1457652747631073,
0.057587698101997375,
-0.18900421261787415,
-0.15554066002368927,
0.05480993539094925,
-0.019832435995340347,
0.1372140496969223,
-0.3962380588054657,
0.07756248116493225,
0.26722294092178345,
0.41949743032455444,
-0.18728314340114594,
-0.6303865313529968,
0.28558349609375,
-0.20997671782970428,
-0.6549609303474426,
0.006932421587407589,
0.2808077335357666,
-0.5046146512031555,
0.14856676757335663,
-0.7743091583251953,
-0.06546802073717117,
0.14630486071109772,
0.10206472873687744,
-0.1546315848827362,
0.18272575736045837,
-0.5004364252090454,
-0.09181317687034607,
-0.17534179985523224,
0.11034869402647018,
-0.011100713163614273,
0.009122667834162712,
-0.3428884744644165,
-0.33612895011901855
] |
https://github.com/huggingface/datasets/issues/2327 | A syntax error in example | cc @beurkinger but I think this has been fixed internally and will soon be updated right ? | 
Sorry to report with an image, I can't find the template source code of this snippet. | 17 | A syntax error in example

Sorry to report with an image, I can't find the template source code of this snippet.
cc @beurkinger but I think this has been fixed internally and will soon be updated right ? | [
0.0715630054473877,
-0.4951070249080658,
-0.17972812056541443,
-0.15409046411514282,
0.07747344672679901,
-0.2150442898273468,
0.19750086963176727,
0.28251951932907104,
-0.36412230134010315,
0.16879187524318695,
0.2558269500732422,
0.39970460534095764,
0.05293874070048332,
0.0039086248725652695,
0.012435799464583397,
-0.19997462630271912,
0.07288490235805511,
0.25670140981674194,
0.09480126947164536,
0.08978509902954102,
-0.14153075218200684,
0.4616270959377289,
-0.20606552064418793,
0.18989765644073486,
-0.1933685690164566,
-0.03796550631523132,
0.03171386569738388,
0.33735302090644836,
-0.22730131447315216,
-0.047002993524074554,
0.0010913033038377762,
0.06417793780565262,
-0.11150345206260681,
0.03193197399377823,
-0.00009336168295703828,
0.057327255606651306,
0.4510401487350464,
-0.04771782457828522,
-0.06177302077412605,
-0.09620144963264465,
-0.30832093954086304,
0.15017563104629517,
-0.09740376472473145,
-0.21141065657138824,
-0.2634442150592804,
-0.09325716644525528,
0.15757136046886444,
0.2251991331577301,
0.6356446743011475,
0.15181973576545715,
0.4007508158683777,
-0.08714955300092697,
0.03720642998814583,
-0.296317994594574,
0.19523286819458008,
0.12790386378765106,
-0.04930875077843666,
-0.0032211467623710632,
0.3966778516769409,
-0.05207798629999161,
0.30110111832618713,
0.7066949605941772,
0.14915715157985687,
-0.06173630431294441,
0.1567131131887436,
-0.06425697356462479,
0.09010569751262665,
-0.14628832042217255,
0.11064838618040085,
0.23885464668273926,
0.1958264410495758,
-0.004171106964349747,
-0.027360055595636368,
0.1946364939212799,
-0.23832730948925018,
0.058204419910907745,
0.10452033579349518,
0.11315090209245682,
-0.03256157413125038,
0.16287165880203247,
-0.17776253819465637,
-0.33886539936065674,
-0.43022096157073975,
0.07632152736186981,
0.12988190352916718,
0.12388288974761963,
-0.2709282636642456,
-0.08482291549444199,
-0.07504060864448547,
-0.07334136962890625,
0.06908012926578522,
-0.09479755908250809,
-0.17556564509868622,
0.03280622884631157,
0.3898114860057831,
0.03363839536905289,
0.2636397182941437,
-0.1664775311946869,
0.09072980284690857,
0.2093675136566162,
0.36453893780708313,
0.16178566217422485,
0.04456838592886925,
0.4841555058956146,
-0.05986301973462105,
-0.217720165848732,
0.10924220830202103,
0.0952872633934021,
0.21701985597610474,
0.24891437590122223,
0.19880373775959015,
-0.17229723930358887,
-0.20234735310077667,
-0.4475753903388977,
-0.1721688061952591,
-0.019573308527469635,
0.19497893750667572,
0.07560700178146362,
-0.021351806819438934,
-0.13400524854660034,
0.041685380041599274,
0.031129753217101097,
-0.05215761438012123,
0.2935717701911926,
0.28620266914367676,
-0.26189112663269043,
0.22293712198734283,
-0.07315491139888763,
-0.0839981734752655,
-0.23749157786369324,
-0.3668646812438965,
0.43445393443107605,
-0.30732113122940063,
-0.3818000555038452,
-0.20561477541923523,
-0.09994219243526459,
0.17979510128498077,
0.07940761744976044,
0.3844335079193115,
-0.19544760882854462,
0.26935943961143494,
0.1235048919916153,
0.18232131004333496,
0.04056315869092941,
-0.0613381564617157,
-0.03780307620763779,
0.1874403953552246,
-0.14077720046043396,
0.06339799612760544,
0.24036818742752075,
-0.35740384459495544,
0.019871409982442856,
-0.35016584396362305,
0.3257007300853729,
0.007103215903043747,
0.08712196350097656,
-0.0015991181135177612,
0.18736933171749115,
0.24958473443984985,
-0.017472339794039726,
0.0723605751991272,
-0.07973979413509369,
0.004985097795724869,
-0.1812773197889328,
0.0313531756401062,
0.14453750848770142,
-0.10010288655757904,
-0.028210800141096115,
0.0006583430804312229,
-0.14918476343154907,
0.12897492945194244,
0.1001664251089096,
-0.08553747832775116,
0.21905270218849182,
-0.3449908196926117,
0.3650206923484802,
0.18839767575263977,
-0.22180500626564026,
0.2569122016429901,
0.33054763078689575,
-0.0898410975933075,
-0.17623986303806305,
-0.13853061199188232,
-0.18381178379058838,
-0.0027714045718312263,
-0.042412884533405304,
-0.07613368332386017,
0.22999970614910126,
0.08003970980644226,
0.17932650446891785,
-0.21262292563915253,
0.09473079442977905,
-0.18675149977207184,
-0.07178778946399689,
-0.006120476871728897,
-0.07825496047735214,
0.11668220162391663,
0.3036966621875763,
0.16523264348506927,
-0.3182799220085144,
-0.0693618580698967,
0.14383310079574585,
0.41800373792648315,
-0.1671895682811737,
0.01006951555609703,
0.04098135232925415,
0.12672540545463562,
-0.1673320233821869,
-0.23092271387577057,
0.016777265816926956,
-0.02123241126537323,
0.1463429182767868,
-0.2395848035812378,
-0.0800209492444992,
-0.1342269331216812,
-0.31199148297309875,
0.40728870034217834,
0.01061202585697174,
-0.016910891979932785,
-0.18347163498401642,
0.0215904600918293,
0.013352332636713982,
-0.2049182802438736,
-0.03221758455038071,
0.025399234145879745,
0.0493336096405983,
-0.30715903639793396,
-0.0733257457613945,
0.03610941022634506,
-0.2548874318599701,
0.024567339569330215,
-0.1094735860824585,
-0.1592315435409546,
0.44420456886291504,
0.14132782816886902,
0.04145308956503868,
-0.01522061973810196,
0.010245785117149353,
-0.09014659374952316,
-0.5474354028701782,
-0.0892874076962471,
0.11338487267494202,
0.06389473378658295,
-0.03888675570487976,
-0.23138734698295593,
0.17928443849086761,
0.13700725138187408,
-0.08500850945711136,
0.10447728633880615,
0.062064602971076965,
0.04352601617574692,
0.04700717702507973,
-0.08100965619087219,
-0.15321886539459229,
-0.06859666109085083,
0.19449229538440704,
-0.06539396941661835,
-0.31095877289772034,
-0.33921879529953003,
-0.08844362944364548,
0.20352330803871155,
0.03683409467339516,
0.20948666334152222,
0.08640686422586441,
0.11188943684101105,
-0.04808711260557175,
0.13303545117378235,
-0.19289155304431915,
0.009098522365093231,
0.14277991652488708,
-0.09945571422576904,
-0.030784955248236656,
0.07927162945270538,
-0.3007695972919464,
0.32333308458328247,
0.11790390312671661,
0.13921807706356049,
-0.09681244939565659,
0.07717257738113403,
-0.18269242346286774,
-0.2567155063152313,
-0.15863505005836487,
-0.1180124431848526,
-0.09274132549762726,
-0.17038390040397644,
0.20976953208446503,
-0.19078482687473297,
-0.22858136892318726,
0.0054413024336099625,
0.12159407138824463,
-0.004311222583055496,
-0.24474874138832092,
0.3674565553665161,
-0.017961915582418442,
-0.17471849918365479,
0.27532297372817993,
0.18645717203617096,
0.12157042324542999,
0.05656737834215164,
0.2379211038351059,
-0.28049132227897644,
0.025878624990582466,
-0.13762161135673523,
0.32048648595809937,
0.06773735582828522,
-0.23995381593704224,
0.1588524430990219,
-0.178507998585701,
0.21509909629821777,
-0.19114118814468384,
-0.6027470231056213,
0.2668875455856323,
0.0793696716427803,
0.14506001770496368,
0.32211068272590637,
0.23251138627529144,
-0.09926021099090576,
0.12945786118507385,
0.34993574023246765,
-0.07398715615272522,
-0.22065424919128418,
0.009632403030991554,
0.03242305666208267,
-0.06437987834215164,
-0.4315521717071533,
0.22533023357391357,
0.16198529303073883,
-0.2519228160381317,
-0.1134442687034607,
0.20325374603271484,
0.20855160057544708,
0.49960219860076904,
0.5264031291007996,
0.12378339469432831,
-0.11645139753818512,
0.0399327278137207,
0.003389127552509308,
-0.31515365839004517,
0.1725255250930786,
-0.34556296467781067,
-0.2890869975090027,
-0.17125973105430603,
0.09847208112478256,
0.17686544358730316,
-0.14600272476673126,
0.052332937717437744,
-0.38940027356147766,
0.09248332679271698,
-0.055652916431427,
-0.0745253935456276,
-0.011493707075715065,
-0.0547318309545517,
-0.012913182377815247,
-0.4187718629837036,
-0.523993730545044,
0.1694459319114685,
0.1538664847612381,
-0.37898018956184387,
0.19895723462104797,
0.061108071357011795,
-0.08755763620138168,
0.24419060349464417,
0.4768974184989929,
0.04243220016360283,
-0.07118915021419525,
0.27908849716186523,
0.004155419766902924,
0.35239550471305847,
-0.023396559059619904,
0.11909067630767822,
0.20662830770015717,
0.36363497376441956,
-0.018283061683177948,
0.14486722648143768,
-0.02368137240409851,
-0.07881282269954681,
-0.04081402346491814,
-0.013890877366065979,
-0.1867884397506714,
0.07395704090595245,
-0.007071806117892265,
0.3263539671897888,
0.07986278831958771,
0.095648393034935,
0.02136429399251938,
0.12004294991493225,
0.21294748783111572,
0.18820935487747192,
0.387814998626709,
0.21184991300106049,
-0.02331116795539856,
-0.04695138707756996,
-0.1843382716178894,
0.09232863038778305,
0.16108909249305725,
0.10995157808065414,
-0.15533676743507385,
-0.11775645613670349,
-0.21472397446632385,
0.06111365184187889,
-0.3169389069080353,
0.40800315141677856,
-0.2792225480079651,
-0.163715660572052,
0.13213585317134857,
-0.09951011836528778,
0.06269463896751404,
-0.05837574228644371,
-0.29804208874702454,
0.3989473879337311,
0.173585906624794,
0.09620346128940582,
-0.15659788250923157,
-0.06326596438884735,
0.0652254968881607,
-0.5374459028244019,
-0.16477973759174347,
0.050179291516542435,
-0.004447508603334427,
-0.26462700963020325,
-0.37565311789512634,
-0.20797652006149292,
0.23887409269809723,
-0.010699130594730377,
0.23181290924549103,
-0.16140829026699066,
0.03565799444913864,
-0.06718727201223373,
-0.17581652104854584,
0.20799311995506287,
0.17051294445991516,
-0.2478564828634262,
-0.2505509853363037,
-0.1706192046403885,
-0.0673828274011612,
0.14987722039222717,
-0.04243369400501251,
-0.033712949603796005,
0.0404803566634655,
0.0624481737613678,
-0.08817672729492188,
0.13363116979599,
0.18851332366466522,
-0.31400948762893677,
-0.2016715705394745,
-0.044311657547950745,
0.1782083809375763,
0.16437974572181702,
0.021304231137037277,
0.13339921832084656,
0.12468328326940536,
0.03233790025115013,
-0.24602165818214417,
0.2191869616508484,
0.09459267556667328,
0.0395980179309845,
0.26054802536964417,
-0.03288155794143677,
-0.21001701056957245,
-0.016572900116443634,
0.2635544538497925,
0.858257532119751,
0.20749890804290771,
0.04278486222028732,
0.21828022599220276,
-0.20880217850208282,
0.18989644944667816,
-0.0901075154542923,
-0.0922127366065979,
-0.35570213198661804,
-0.09088797122240067,
0.0697552040219307,
-0.14544743299484253,
0.12784534692764282,
0.10651136934757233,
-0.096530482172966,
-0.1428261548280716,
-0.27039265632629395,
0.18383295834064484,
0.010438798926770687,
-0.02423294074833393,
0.15295162796974182,
0.0700930804014206,
0.02355431392788887,
0.3410841226577759,
0.06844758242368698,
0.02546924352645874,
-0.28679579496383667,
-0.3670864701271057,
-0.1807395964860916,
-0.3988816738128662,
-0.2417757660150528,
0.32321056723594666,
-0.11627234518527985,
0.19796128571033478,
0.3024294078350067,
-0.1681700050830841,
0.0923653393983841,
-0.14752429723739624,
0.023821689188480377,
0.0503205843269825,
-0.2876916527748108,
0.3686485290527344,
0.29295939207077026,
-0.15198853611946106,
-0.3081812262535095,
0.34800511598587036,
0.21040722727775574,
-0.3964601457118988,
0.14990189671516418,
0.10321076214313507,
0.07110762596130371,
0.05439651012420654,
-0.325702965259552,
-0.08797580003738403,
-0.0482918918132782,
0.04658333212137222,
-0.2456071823835373,
-0.03585375100374222,
-0.25665658712387085,
-0.31480538845062256,
0.35635772347450256,
0.13712093234062195,
-0.10070838034152985,
-0.17449861764907837,
0.31370073556900024,
0.018247999250888824,
0.18776866793632507,
-0.036082662642002106,
-0.04640474170446396,
-0.06684190034866333,
0.13938231766223907,
0.21386761963367462,
-0.25863876938819885,
-0.356746643781662,
-0.058091145008802414,
-0.14548741281032562,
-0.3680625557899475,
0.35556215047836304,
-0.12438376992940903,
-0.15833249688148499,
-0.17628377676010132,
0.3298708498477936,
0.004230763763189316,
0.18773463368415833,
0.030169103294610977,
-0.06215496361255646,
0.03451152890920639,
-0.03303660452365875,
-0.5213054418563843,
0.26177212595939636,
-0.1892850399017334,
0.15114189684391022,
0.3945092558860779,
-0.0811312347650528,
-0.557228684425354,
0.028561191633343697,
-0.09014595299959183,
-0.07462143152952194,
0.00811211671680212,
0.052740585058927536,
0.05045542120933533,
0.024989135563373566,
0.2616669833660126,
0.3452380895614624,
-0.2784823775291443,
-0.41862764954566956,
-0.1332169771194458,
0.08514900505542755,
0.05559913069009781,
-0.11651969701051712,
0.3011631369590759,
0.37882113456726074,
-0.21207332611083984,
0.05498019978404045,
-0.03225422650575638,
-0.2884771227836609,
0.09116876870393753,
0.1308811902999878,
0.02946396917104721,
-0.11450091749429703,
0.3699083924293518,
-0.24535882472991943,
0.2558157444000244,
0.39704829454421997,
-0.11663998663425446,
-0.085945725440979,
-0.01318769808858633,
-0.3108522295951843,
0.25062116980552673,
0.16985997557640076,
0.11494366824626923,
0.29617056250572205,
0.040193893015384674,
-0.14457687735557556,
0.11798663437366486,
-0.23785078525543213,
0.1796548068523407,
-0.07051335275173187,
-0.47757434844970703,
0.04999423027038574,
-0.1605377197265625,
0.37344473600387573,
-0.23969611525535583,
0.08755405247211456,
0.02595256268978119,
0.05507844313979149,
0.02773166075348854,
0.14271363615989685,
-0.10495129972696304,
0.05200186371803284,
-0.0014733374118804932,
0.17255371809005737,
0.07753436267375946,
-0.246599480509758,
-0.0430273674428463,
0.19769152998924255,
-0.2594717741012573,
0.1988370269536972,
0.01029258780181408,
0.12811468541622162,
0.16324742138385773,
0.35428380966186523,
-0.08410722762346268,
0.062463268637657166,
0.18407487869262695,
0.05116366595029831,
0.3145599961280823,
-0.0667688399553299,
-0.07322412729263306,
0.19281189143657684,
0.4372863471508026,
0.31215760111808777,
0.07450194656848907,
0.08638005703687668,
0.4601459205150604,
0.19161435961723328,
0.024632884189486504,
0.31687822937965393,
0.04095160588622093,
-0.15028560161590576,
-0.3962423503398895,
-0.053496845066547394,
-0.34507882595062256,
-0.24431100487709045,
0.03854009881615639,
0.06609831005334854,
0.20231863856315613,
-0.06111755967140198,
0.05339808762073517,
-0.032690681517124176,
-0.004979301244020462,
-0.033729590475559235,
0.08402520418167114,
-0.34945958852767944,
0.2607452869415283,
0.11908327788114548,
-0.02600875496864319,
0.12183618545532227,
0.21616588532924652,
0.5713267922401428,
0.25120529532432556,
0.17278629541397095,
-0.20737704634666443,
-0.16441582143306732,
-0.15530981123447418,
0.13152717053890228,
0.007102677598595619,
0.09518638998270035,
-0.09034423530101776,
0.24186737835407257,
0.3023292124271393,
-0.3576982021331787,
0.21530811488628387,
0.18498511612415314,
-0.008501928299665451,
0.009510844945907593,
-0.030511073768138885,
-0.19852091372013092,
-0.04816430062055588,
-0.3636627197265625,
0.019318923354148865,
-0.42573368549346924,
-0.10308874398469925,
0.0975455641746521,
0.11034200340509415,
-0.05504637956619263,
0.004437969531863928,
0.17912206053733826,
0.18310686945915222,
0.3706062436103821,
0.06240030750632286,
0.18794536590576172,
-0.061824724078178406,
-0.37388646602630615,
-0.11206591129302979,
0.22317899763584137,
-0.23633158206939697,
-0.1832210123538971,
0.07119939476251602,
0.21329176425933838,
0.043475911021232605,
-0.010412320494651794,
0.347526490688324,
0.2639900743961334,
-0.035209979861974716,
0.2855525016784668,
-0.2770669758319855,
0.12656691670417786,
0.1273535192012787,
-0.17645800113677979,
0.20802877843379974,
-0.1252673864364624,
0.02529754489660263,
-0.07868868857622147,
0.35849112272262573,
-0.15229740738868713,
-0.18297602236270905,
-0.1008874922990799,
-0.0752159059047699,
0.2810130715370178,
0.011712285690009594,
-0.20903298258781433,
-0.3099665939807892,
-0.27418097853660583,
0.14195162057876587,
-0.1518731564283371,
-0.2074362188577652,
0.43171584606170654,
0.18177950382232666,
0.11596859991550446,
0.08780355006456375,
-0.3782544434070587,
-0.2854496240615845,
0.026446683332324028,
-0.122492216527462,
-0.20014658570289612,
-0.2672692537307739,
0.17956483364105225,
-0.15533357858657837,
0.03331858292222023,
-0.16677825152873993,
-0.04312286525964737,
-0.16268929839134216,
-0.21069253981113434,
-0.4100950360298157,
-0.6633718609809875,
0.5129128098487854,
-0.3869132101535797,
-0.34914830327033997,
0.19150422513484955,
0.06138273701071739,
-0.05747132748365402,
-0.11366613954305649,
-0.22720298171043396,
0.1705518662929535,
0.19556604325771332,
0.058617740869522095,
-0.11758370697498322,
0.11581180989742279,
0.16816304624080658,
0.06100200489163399,
-0.017746416851878166,
0.08516019582748413,
0.27696871757507324,
-0.10205750167369843,
-0.13724887371063232,
-0.3400891423225403
] |
https://github.com/huggingface/datasets/issues/2323 | load_dataset("timit_asr") gives back duplicates of just one sample text | Thanks @ekeleshian for having reported.
I am closing this issue once that you updated `datasets`. Feel free to reopen it if the problem persists. | ## Describe the bug
When you look up on key ["train"] and then ['text'], you get back a list with just one sentence duplicated 4620 times. Namely, the sentence "Would such an act of refusal be useful?". Similarly when you look up ['test'] and then ['text'], the list is one sentence repeated "The bungalow was pleasantly situated near the shore." 1680 times.
I tried to work around the issue by downgrading to datasets version 1.3.0, inspired by [this post](https://www.gitmemory.com/issue/huggingface/datasets/2052/798904836) and removing the entire huggingface directory from ~/.cache, but I still get the same issue.
## Steps to reproduce the bug
```python
from datasets import load_dataset
timit = load_dataset("timit_asr")
print(timit['train']['text'])
print(timit['test']['text'])
```
## Expected Result
Rows of diverse text, like how it is shown in the [wav2vec2.0 tutorial](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_tuning_Wav2Vec2_for_English_ASR.ipynb)
<img width="485" alt="Screen Shot 2021-05-05 at 9 09 57 AM" src="https://user-images.githubusercontent.com/33647474/117146094-d9b77f00-ad81-11eb-8306-f281850c127a.png">
## Actual results
Rows of repeated text.
<img width="319" alt="Screen Shot 2021-05-05 at 9 11 53 AM" src="https://user-images.githubusercontent.com/33647474/117146231-f8b61100-ad81-11eb-834a-fc10410b0c9c.png">
## Versions
- Datasets: 1.3.0
- Python: 3.9.1
- Platform: macOS-11.2.1-x86_64-i386-64bit}
| 24 | load_dataset("timit_asr") gives back duplicates of just one sample text
## Describe the bug
When you look up on key ["train"] and then ['text'], you get back a list with just one sentence duplicated 4620 times. Namely, the sentence "Would such an act of refusal be useful?". Similarly when you look up ['test'] and then ['text'], the list is one sentence repeated "The bungalow was pleasantly situated near the shore." 1680 times.
I tried to work around the issue by downgrading to datasets version 1.3.0, inspired by [this post](https://www.gitmemory.com/issue/huggingface/datasets/2052/798904836) and removing the entire huggingface directory from ~/.cache, but I still get the same issue.
## Steps to reproduce the bug
```python
from datasets import load_dataset
timit = load_dataset("timit_asr")
print(timit['train']['text'])
print(timit['test']['text'])
```
## Expected Result
Rows of diverse text, like how it is shown in the [wav2vec2.0 tutorial](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_tuning_Wav2Vec2_for_English_ASR.ipynb)
<img width="485" alt="Screen Shot 2021-05-05 at 9 09 57 AM" src="https://user-images.githubusercontent.com/33647474/117146094-d9b77f00-ad81-11eb-8306-f281850c127a.png">
## Actual results
Rows of repeated text.
<img width="319" alt="Screen Shot 2021-05-05 at 9 11 53 AM" src="https://user-images.githubusercontent.com/33647474/117146231-f8b61100-ad81-11eb-834a-fc10410b0c9c.png">
## Versions
- Datasets: 1.3.0
- Python: 3.9.1
- Platform: macOS-11.2.1-x86_64-i386-64bit}
Thanks @ekeleshian for having reported.
I am closing this issue once that you updated `datasets`. Feel free to reopen it if the problem persists. | [
0.2821884751319885,
-0.48902955651283264,
0.06362953782081604,
0.383548378944397,
0.15507689118385315,
0.009322158992290497,
0.20255103707313538,
0.19717781245708466,
-0.19604328274726868,
0.02256375551223755,
-0.05378580093383789,
0.2588159143924713,
-0.060760803520679474,
-0.0019161403179168701,
0.18975770473480225,
0.03411010652780533,
0.13011328876018524,
-0.0039517804980278015,
-0.08558464050292969,
-0.21644273400306702,
-0.034972090274095535,
0.5018290877342224,
-0.1255064457654953,
0.039625003933906555,
-0.38643738627433777,
0.08966561406850815,
-0.2256181389093399,
0.09544003009796143,
0.02748935855925083,
-0.43888092041015625,
0.20159876346588135,
0.25627976655960083,
0.007661297917366028,
0.17433345317840576,
-0.00012940620945300907,
-0.12382113933563232,
0.10333569347858429,
0.196697399020195,
-0.2948188781738281,
-0.33761388063430786,
0.037145353853702545,
-0.008202162571251392,
0.47655045986175537,
0.05881572514772415,
-0.144631028175354,
-0.12299510091543198,
0.04613785445690155,
-0.09110251069068909,
0.5953747630119324,
0.053085099905729294,
0.05547584965825081,
-0.021304180845618248,
-0.2731775641441345,
-0.15022145211696625,
0.3001239597797394,
0.14087533950805664,
0.03618401288986206,
0.0638972669839859,
0.25743845105171204,
0.07400110363960266,
0.09370671212673187,
0.40736714005470276,
-0.26146355271339417,
0.0803648978471756,
0.020192258059978485,
0.2505539357662201,
-0.35216039419174194,
-0.2842358350753784,
0.15673613548278809,
0.38189205527305603,
0.41440775990486145,
-0.19498693943023682,
-0.24380499124526978,
-0.533214807510376,
0.16194286942481995,
0.05395226925611496,
0.1597350537776947,
-0.08273627609014511,
-0.2399921864271164,
0.13232843577861786,
-0.27216947078704834,
-0.027402596548199654,
-0.004449762403964996,
0.003848537802696228,
0.10316580533981323,
-0.2842707633972168,
-0.12851276993751526,
0.16184844076633453,
0.3656542897224426,
-0.03831171989440918,
-0.07538147270679474,
-0.020119700580835342,
-0.0413321815431118,
0.18145669996738434,
-0.49861401319503784,
0.03007131814956665,
0.027030695229768753,
-0.06123404949903488,
0.25116777420043945,
0.016117101535201073,
0.4327560365200043,
-0.05793619155883789,
-0.13018396496772766,
-0.07730121165513992,
0.41262778639793396,
0.37753021717071533,
0.07272414118051529,
-0.09546785801649094,
0.009243521839380264,
-0.1186075359582901,
-0.20985184609889984,
0.04033142700791359,
-0.011100806295871735,
0.1610851287841797,
0.09674350917339325,
-0.2585274279117584,
0.3425219655036926,
-0.3690468668937683,
-0.4510844945907593,
0.0706898495554924,
-0.5093212723731995,
-0.12097179144620895,
-0.16022485494613647,
0.09350868314504623,
0.1373853087425232,
0.38140034675598145,
0.1867181956768036,
0.14621132612228394,
-0.17279446125030518,
-0.2743344008922577,
-0.13430903851985931,
-0.1454475075006485,
-0.03073705919086933,
0.10828371345996857,
0.17380894720554352,
-0.5300571918487549,
0.2907096743583679,
0.3179664611816406,
0.3418075442314148,
-0.4182767868041992,
-0.12332870811223984,
-0.09303003549575806,
-0.1239287480711937,
0.029285453259944916,
-0.09267905354499817,
0.459190309047699,
0.08312059938907623,
-0.03519699349999428,
0.011206068098545074,
-0.012504220008850098,
-0.21343141794204712,
-0.11967635154724121,
0.29374369978904724,
-0.005847240798175335,
-0.22258971631526947,
-0.05081117898225784,
0.06543552875518799,
0.32921043038368225,
0.07487796247005463,
0.10934773087501526,
-0.1791655421257019,
-0.005952216684818268,
-0.42674121260643005,
-0.14108391106128693,
0.041411153972148895,
0.3480868935585022,
-0.27090883255004883,
-0.09089457243680954,
0.21068836748600006,
0.27352264523506165,
-0.05482504516839981,
0.5467898845672607,
-0.04279838129878044,
0.42762112617492676,
-0.264258474111557,
0.07968784868717194,
0.01823030412197113,
-0.4098273813724518,
-0.29369696974754333,
0.2606935203075409,
-0.1333964765071869,
0.357221782207489,
0.20871537923812866,
0.11097445338964462,
0.295829713344574,
0.14192649722099304,
0.17473042011260986,
0.011237474158406258,
0.33286064863204956,
-0.12698222696781158,
-0.29131990671157837,
-0.21657541394233704,
0.06976291537284851,
0.04623763635754585,
-0.3213197886943817,
0.21357163786888123,
0.07121463119983673,
0.0611044317483902,
0.45594993233680725,
0.04012566804885864,
-0.0278415959328413,
0.07619445025920868,
0.10838912427425385,
0.07143526524305344,
0.3267050087451935,
-0.05765987187623978,
-0.27633902430534363,
0.06276249140501022,
0.1535569727420807,
0.08994057774543762,
0.18927046656608582,
-0.06971833109855652,
-0.2410973608493805,
-0.08709044754505157,
-0.3644339144229889,
-0.13096389174461365,
-0.0653521865606308,
0.3186420798301697,
0.033682648092508316,
0.0968317836523056,
-0.07003341615200043,
0.487472265958786,
-0.13978658616542816,
0.08680640906095505,
-0.3534022569656372,
0.0399516224861145,
0.14232146739959717,
0.0782766193151474,
0.20957815647125244,
0.3197646141052246,
0.22629022598266602,
0.12407562136650085,
0.08341553807258606,
0.26348209381103516,
0.029739901423454285,
0.11414557695388794,
-0.15745487809181213,
-0.21261484920978546,
0.19843323528766632,
-0.22260059416294098,
-0.08337832242250443,
0.17854714393615723,
0.25926342606544495,
-0.1271863728761673,
-0.25562784075737,
0.195391446352005,
0.12413552403450012,
0.23355633020401,
-0.05858984962105751,
0.021533159539103508,
0.0859503448009491,
-0.06844440847635269,
-0.10826116055250168,
-0.28070223331451416,
0.5420557856559753,
-0.14989468455314636,
0.21801237761974335,
0.1538829207420349,
-0.3125823736190796,
0.23606222867965698,
0.22390061616897583,
-0.07175609469413757,
-0.055959343910217285,
0.3721969425678253,
-0.15741726756095886,
-0.06509195268154144,
-0.13544540107250214,
0.09647774696350098,
0.3051024079322815,
0.10979390144348145,
0.044740527868270874,
0.027225429192185402,
-0.13086587190628052,
0.04559742659330368,
0.24553576111793518,
-0.09214113652706146,
-0.08831637352705002,
0.3082365095615387,
0.3380037844181061,
-0.09456909447908401,
-0.598446249961853,
0.12924109399318695,
-0.04421708732843399,
0.2760111093521118,
-0.36400339007377625,
0.012894539162516594,
-0.36767885088920593,
0.03856157511472702,
-0.3294144868850708,
-0.026490330696105957,
-0.20051245391368866,
-0.11366244405508041,
0.188616544008255,
0.34738051891326904,
0.22703862190246582,
0.017540343105793,
0.22767126560211182,
0.3561973571777344,
-0.04893333837389946,
0.24103611707687378,
-0.08919746428728104,
0.12844236195087433,
-0.3455182909965515,
-0.042487841099500656,
-0.02307174727320671,
0.03739279508590698,
0.2573550045490265,
-0.13492482900619507,
-0.3074091076850891,
-0.40029284358024597,
-0.22278839349746704,
0.25313127040863037,
-0.26509326696395874,
0.41059279441833496,
0.3220897912979126,
-0.04366631805896759,
-0.4077951908111572,
-0.2074151486158371,
0.019340170547366142,
-0.029795583337545395,
-0.4018993079662323,
0.2117161899805069,
-0.03610433638095856,
0.058593183755874634,
-0.03962412476539612,
-0.540187656879425,
0.0536179319024086,
0.05011040344834328,
0.5322157144546509,
0.01526336744427681,
0.08343923091888428,
0.28943076729774475,
0.014745890162885189,
0.08218873292207718,
-0.18898512423038483,
0.14076825976371765,
-0.5706545114517212,
-0.26448842883110046,
0.11451991647481918,
0.15523049235343933,
-0.27800342440605164,
-0.2397744357585907,
0.012084729969501495,
-0.012342222034931183,
-0.15118594467639923,
-0.5954257249832153,
-0.26200613379478455,
-0.10776250064373016,
0.03248400613665581,
-0.15402117371559143,
0.31474554538726807,
0.22699688374996185,
0.12439466267824173,
0.020305121317505836,
-0.2161235213279724,
0.019108109176158905,
0.5199987292289734,
0.1948654055595398,
0.11954383552074432,
0.1072264313697815,
0.1179136335849762,
-0.022357633337378502,
0.3257385492324829,
0.8683472275733948,
0.17310522496700287,
0.23021458089351654,
-0.17268474400043488,
0.16530148684978485,
-0.2504994869232178,
-0.3475955128669739,
-0.21557721495628357,
-0.26883482933044434,
0.012717336416244507,
0.43129706382751465,
0.1373869776725769,
0.14087143540382385,
-0.16464519500732422,
0.15251460671424866,
-0.1869923174381256,
-0.2055777907371521,
-0.1615321934223175,
-0.13670408725738525,
0.11357621103525162,
0.14121660590171814,
-0.028997797518968582,
0.2722262740135193,
-0.2952244281768799,
-0.1493309587240219,
-0.09740133583545685,
0.13421282172203064,
-0.14167825877666473,
-0.31995150446891785,
-0.07444034516811371,
-0.6836327314376831,
0.06443289667367935,
0.24592435359954834,
0.29611924290657043,
-0.006278973072767258,
-0.01225154846906662,
0.4832978844642639,
0.2160005122423172,
1.0575671195983887,
-0.09567113220691681,
0.01870262809097767,
-0.22545474767684937,
-0.038458168506622314,
-0.26219528913497925,
0.09486518800258636,
-0.2956036925315857,
-0.16043737530708313,
-0.009120184928178787,
0.15000379085540771,
-0.1343819946050644,
0.07995910942554474,
0.053867634385824203,
0.43255287408828735,
-0.28533369302749634,
-0.19340476393699646,
-0.3532070219516754,
-0.26233384013175964,
-0.31002429127693176,
-0.02454894781112671,
-0.018167609348893166,
0.10228896886110306,
-0.23885051906108856,
-0.03085710108280182,
0.025836974382400513,
-0.12096137553453445,
0.4737134575843811,
0.13131041824817657,
0.6074250936508179,
-0.017129583284258842,
0.43289685249328613,
0.5953528881072998,
-0.1411609649658203,
-0.3634355366230011,
0.8624764680862427,
-0.12112216651439667,
-0.26126039028167725,
-0.1437159776687622,
-0.3327288329601288,
0.27747610211372375,
0.6624311208724976,
-0.21866583824157715,
0.3310772776603699,
-0.11240056157112122,
-0.02479500323534012,
-0.2145538330078125,
-0.10217215865850449,
0.37960106134414673,
0.20690962672233582,
0.0043726954609155655,
-0.39035147428512573,
0.3599165678024292,
-0.08258791267871857,
-0.25808990001678467,
0.14400511980056763,
0.07825563848018646,
-0.2731480598449707,
0.3259183168411255,
-0.20668134093284607,
1.1999924182891846,
-0.11446011066436768,
0.462769091129303,
0.07442471385002136,
0.18929250538349152,
0.4935740828514099,
0.0038523077964782715,
-0.04390904679894447,
-0.35142216086387634,
-0.07620850950479507,
-0.09383661299943924,
0.049418579787015915,
-0.19002637267112732,
0.09231282770633698,
-0.3971044719219208,
0.29271483421325684,
0.35651934146881104,
0.15518267452716827,
0.08801794797182083,
0.08528590202331543,
-0.041835933923721313,
-0.04425205662846565,
-0.10791745781898499,
-0.1045990139245987,
-0.06587100774049759,
0.18890681862831116,
0.2575896680355072,
0.1798461675643921,
0.2313098907470703,
-0.5975796580314636,
-0.4764404892921448,
0.00728457048535347,
-0.32159483432769775,
-0.010011596605181694,
0.10553017258644104,
-0.3966958522796631,
0.04789729788899422,
0.3964274823665619,
0.16674649715423584,
0.1279728263616562,
-0.12385456264019012,
-0.16488060355186462,
0.22428801655769348,
0.42867904901504517,
-0.13588325679302216,
-0.23015563189983368,
-0.01535332016646862,
0.07643567025661469,
-0.4419250190258026,
-0.02029120922088623,
0.2607077956199646,
-0.03771938383579254,
-0.2543271481990814,
0.17832210659980774,
-0.24975745379924774,
-0.3596184551715851,
0.004939895123243332,
0.269256055355072,
0.1709795445203781,
-0.34261924028396606,
-0.031065862625837326,
0.1471385657787323,
-0.31021547317504883,
0.08829458057880402,
0.020082248374819756,
-0.32497215270996094,
0.05883856862783432,
0.7058203220367432,
0.3741145133972168,
-0.11899611353874207,
0.5002727508544922,
0.2675577998161316,
0.011662103235721588,
-0.09574954211711884,
0.22603672742843628,
-0.03974396362900734,
-0.48153677582740784,
0.21513579785823822,
-0.0029084898997098207,
0.09179419279098511,
-0.2900528013706207,
0.4267719089984894,
-0.02172592282295227,
0.18302936851978302,
-0.13332410156726837,
-0.2961263060569763,
-0.042394980788230896,
0.2187686264514923,
0.1394966095685959,
0.16199378669261932,
-0.17247900366783142,
-0.1619066745042801,
0.009709479287266731,
0.11096671968698502,
-0.1637847125530243,
0.11570536345243454,
0.04435589909553528,
0.16904211044311523,
0.051750682294368744,
-0.030345939099788666,
0.2929795980453491,
0.0675780177116394,
0.0711345374584198,
0.26590657234191895,
0.06485355645418167,
-0.09327808767557144,
-0.29812148213386536,
0.22460049390792847,
-0.09662923961877823,
0.10791171342134476,
-0.06799916923046112,
-0.007508847862482071,
0.20138327777385712,
-0.19980274140834808,
0.23446422815322876,
0.35919860005378723,
0.1373313069343567,
0.12905961275100708,
-0.11391060054302216,
-0.17633458971977234,
0.11969462037086487,
-0.05800428241491318,
-0.3185042440891266,
-0.031824469566345215,
0.3222021162509918,
-0.00019077584147453308,
0.04478428512811661,
-0.01741403341293335,
0.11479619890451431,
0.15573255717754364,
0.14757616817951202,
-0.18783244490623474,
-0.21657860279083252,
-0.14406588673591614,
-0.1786867082118988,
0.053909868001937866,
0.34928998351097107,
0.33452215790748596,
-0.31164851784706116,
-0.12014540284872055,
0.07104934006929398,
0.024993836879730225,
-0.36299625039100647,
-0.3286016583442688,
-0.027624715119600296,
-0.06747068464756012,
-0.11072024703025818,
0.4090249240398407,
0.19636103510856628,
-0.38668879866600037,
0.2300874888896942,
-0.16663289070129395,
0.26788365840911865,
-0.25562185049057007,
0.11148934066295624,
0.4208325743675232,
0.11706571280956268,
-0.2309047132730484,
-0.05390167981386185,
-0.10277165472507477,
-0.0972769632935524,
0.578475296497345,
-0.36555030941963196,
0.06614066660404205,
-0.45563560724258423,
0.3279431164264679,
0.2335660755634308,
-0.16637155413627625,
0.34289827942848206,
0.2844081521034241,
-0.3349221646785736,
0.23298639059066772,
0.015257030725479126,
0.5815437436103821,
-0.02648385614156723,
-0.06383521109819412,
-0.2792890965938568,
0.13241423666477203,
-0.16624099016189575,
-0.34473150968551636,
-0.0006580837070941925,
-0.3484947979450226,
-0.3311080038547516,
0.2563076913356781,
-0.07747744023799896,
-0.2266082614660263,
0.5246615409851074,
0.16393232345581055,
-0.040904536843299866,
-0.7086570262908936,
-0.3736554682254791,
-0.004537526518106461,
0.2766524851322174,
-0.20276252925395966,
0.41823649406433105,
0.3229886293411255,
0.003953114151954651,
0.39441412687301636,
0.42523887753486633,
0.31701603531837463,
0.08837050944566727,
-0.051674049347639084,
0.31551072001457214,
-0.4504498541355133,
-0.005970783531665802,
0.03686528280377388,
0.30544131994247437,
-0.12425395846366882,
-0.10664607584476471,
0.09661975502967834,
-0.10281730443239212,
0.051590122282505035,
0.0424061045050621,
0.20626088976860046,
0.044342681765556335,
-0.5337706208229065,
0.2679799795150757,
-0.1764911413192749,
0.17406535148620605,
-0.06515640765428543,
0.1449667513370514,
-0.5101765990257263,
0.26128891110420227,
0.3920441269874573,
0.05839249864220619,
0.010552775114774704,
-0.08285962790250778,
0.0329216793179512,
-0.13836297392845154,
0.2497992217540741,
0.2675231993198395,
0.10210832208395004,
-0.26007407903671265,
-0.1450132429599762,
-0.5910231471061707,
0.0332324355840683,
-0.1908813863992691,
-0.005446188151836395,
0.14426402747631073,
-0.04139482229948044,
-0.03587070852518082,
0.27693086862564087,
-0.000499039888381958,
0.035480797290802,
-0.41291335225105286,
0.2628389596939087,
-0.2723475396633148,
-0.22963742911815643,
0.23928482830524445,
0.21646232903003693,
-0.10239408910274506,
-0.15034319460391998,
0.13336268067359924,
-0.09759709984064102,
-0.193017840385437,
-0.05288819223642349,
0.12031741440296173,
-0.2028675377368927,
-0.09920251369476318,
-0.02523604780435562,
0.247650146484375,
0.24050839245319366,
0.00456942617893219,
-0.17465250194072723,
-0.12474164366722107,
-0.25874876976013184,
-0.3179563879966736,
0.31914374232292175,
0.23176369071006775,
0.3002183139324188,
-0.19244401156902313,
-0.2965007424354553,
0.031455572694540024,
0.10419705510139465,
0.2828019857406616,
0.018973788246512413,
-0.44514429569244385,
0.11568380147218704,
-0.0879514291882515,
0.3841792941093445,
-0.13023175299167633,
0.4656863212585449,
-0.03698044270277023,
0.18306049704551697,
-0.18267759680747986,
-0.568195104598999,
0.44014671444892883,
-0.6994364261627197,
-0.14016759395599365,
-0.026372328400611877,
0.3481687903404236,
0.04378800466656685,
-0.23742038011550903,
-0.9038201570510864,
-0.1497897356748581,
0.36551275849342346,
0.08801160752773285,
-0.1035749763250351,
0.38611432909965515,
-0.04564802721142769,
-0.058504313230514526,
-0.148834228515625,
0.39353421330451965,
0.49652042984962463,
-0.16686931252479553,
0.3587186634540558,
-0.5926191210746765
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | I tried upgrading to `datasets==1.6.2` and downgrading to `1.6.0`. Both versions produce the same output.
Downgrading to `1.5.0` works and produces the following output for me:
```bash
Downloading: 9.20kB [00:00, 3.94MB/s]
Downloading: 5.99kB [00:00, 3.29MB/s]
No config specified, defaulting to: sst/default
Downloading and preparing dataset sst/default (download: 6.83 MiB, generated: 3.73 MiB, post-processed: Unknown size, total: 10.56 MiB) to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b...
Dataset sst downloaded and prepared to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b. Subsequent calls will reuse this data.
executed [0, 1]
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 94.83ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 92.75ba/s]
executed [0, 1]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 118.81ba/s]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 123.06ba/s]
executed [0, 1]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 119.42ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 123.33ba/s]
##############################
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-6079777aa097c8f8.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-2dc05c46f68eda6e.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-1ca347e7430b98f1.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-c0f1a73ce3ba40cd.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-832a1407bf1ac5b7.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-036316a259b773c4.arrow
- Datasets: 1.5.0
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
``` | ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 387 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
I tried upgrading to `datasets==1.6.2` and downgrading to `1.6.0`. Both versions produce the same output.
Downgrading to `1.5.0` works and produces the following output for me:
```bash
Downloading: 9.20kB [00:00, 3.94MB/s]
Downloading: 5.99kB [00:00, 3.29MB/s]
No config specified, defaulting to: sst/default
Downloading and preparing dataset sst/default (download: 6.83 MiB, generated: 3.73 MiB, post-processed: Unknown size, total: 10.56 MiB) to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b...
Dataset sst downloaded and prepared to /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b. Subsequent calls will reuse this data.
executed [0, 1]
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 94.83ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 92.75ba/s]
executed [0, 1]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 118.81ba/s]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 123.06ba/s]
executed [0, 1]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 119.42ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 123.33ba/s]
##############################
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-6079777aa097c8f8.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-2dc05c46f68eda6e.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-1ca347e7430b98f1.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-c0f1a73ce3ba40cd.arrow
executed [0, 1]
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-832a1407bf1ac5b7.arrow
Loading cached processed dataset at /home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/a16a45566b63b2c3179e6c1d0f8edadde56e45570ee8cf99394fbb738491d34b/cache-036316a259b773c4.arrow
- Datasets: 1.5.0
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
``` | [
-0.16529837250709534,
-0.3959714472293854,
-0.00884755328297615,
0.1456606239080429,
0.20624372363090515,
-0.10191776603460312,
0.30026790499687195,
0.12512890994548798,
0.3953084349632263,
0.020620591938495636,
-0.0369783416390419,
0.242855042219162,
0.16997182369232178,
-0.28493571281433105,
0.18808673322200775,
0.25960469245910645,
0.2713773250579834,
-0.03853346407413483,
-0.2219652533531189,
-0.17453426122665405,
-0.19188204407691956,
0.17236347496509552,
-0.3064853549003601,
-0.2573416233062744,
-0.2379021793603897,
0.11174200475215912,
-0.2603813111782074,
-0.12303150445222855,
0.4237755239009857,
-0.3212161958217621,
0.37847599387168884,
-0.05806620791554451,
0.014867329970002174,
0.6959592700004578,
-0.00011318777251290157,
-0.16052795946598053,
0.1358753740787506,
-0.1383192390203476,
-0.0015481328591704369,
0.21333149075508118,
-0.3389546275138855,
-0.31001603603363037,
-0.004519164562225342,
-0.2349565029144287,
-0.3307378590106964,
0.015123306773602962,
-0.0239326823502779,
-0.8197701573371887,
0.37284529209136963,
0.2541065216064453,
0.29510653018951416,
0.17261354625225067,
-0.019022371619939804,
0.07428581267595291,
0.08660299330949783,
-0.08379076421260834,
-0.27259498834609985,
-0.0186920166015625,
0.2995278239250183,
-0.19743919372558594,
-0.028207354247570038,
0.35948067903518677,
-0.13195188343524933,
0.07357290387153625,
0.3317606449127197,
0.32650190591812134,
0.21803900599479675,
-0.11859187483787537,
0.2567962110042572,
-0.22583869099617004,
0.3444477319717407,
-0.25056082010269165,
-0.34029722213745117,
-0.25219765305519104,
-0.4512901306152344,
-0.09359724819660187,
0.23053455352783203,
-0.18163523077964783,
-0.017511287704110146,
0.0523240901529789,
-0.3951413035392761,
0.14610987901687622,
0.27687376737594604,
0.023934178054332733,
0.03914815932512283,
0.25855886936187744,
-0.08576347678899765,
0.10614363849163055,
0.044075705111026764,
-0.15750786662101746,
0.018533162772655487,
-0.24768781661987305,
-0.023325730115175247,
0.38760077953338623,
-0.4578024744987488,
0.13098184764385223,
0.4648629128932953,
0.14319738745689392,
-0.11104454845190048,
-0.01294504851102829,
0.11935635656118393,
-0.006080877035856247,
0.18636205792427063,
0.0010308995842933655,
0.06157812848687172,
0.48902633786201477,
-0.010356210172176361,
0.3551562428474426,
-0.03754395246505737,
-0.07195495814085007,
-0.32302212715148926,
-0.13232794404029846,
0.26592856645584106,
-0.10086946934461594,
0.5175330638885498,
0.1616138517856598,
0.20059169828891754,
-0.13027755916118622,
0.18968333303928375,
-0.0005330601707100868,
-0.16335979104042053,
-0.1748705357313156,
0.16171760857105255,
0.34699440002441406,
0.08699977397918701,
-0.036532849073410034,
-0.07700525224208832,
-0.10873974859714508,
-0.22075380384922028,
-0.07633795589208603,
-0.3961368799209595,
-0.24385766685009003,
-0.3070540130138397,
0.14955861866474152,
0.19743825495243073,
-0.0326642245054245,
0.13559658825397491,
0.027335185557603836,
-0.10057377815246582,
-0.33551648259162903,
0.054623305797576904,
-0.18763485550880432,
0.6559557318687439,
0.15888020396232605,
-0.2145816534757614,
0.25336185097694397,
0.3517920970916748,
0.17983780801296234,
-0.3027566075325012,
0.28129979968070984,
-0.4556756615638733,
-0.08744300901889801,
0.4142133295536041,
0.1292608231306076,
-0.09991008043289185,
-0.07480070739984512,
-0.15049785375595093,
0.12536627054214478,
0.7231866121292114,
-0.15730221569538116,
0.26680245995521545,
-0.21290215849876404,
-0.4821091592311859,
-0.3187292814254761,
0.34948092699050903,
0.495372474193573,
-0.12810295820236206,
-0.14054052531719208,
0.10628524422645569,
0.3853791654109955,
0.36833739280700684,
0.2536807060241699,
-0.2394358068704605,
0.11122338473796844,
-0.2686230540275574,
0.18866266310214996,
0.2342701256275177,
-0.38494303822517395,
-0.679406464099884,
-0.025037892162799835,
-0.08278041332960129,
0.1595265120267868,
0.030716434121131897,
-0.034351978451013565,
0.30047979950904846,
-0.18704602122306824,
0.1719587743282318,
-0.05722451210021973,
-0.0018518995493650436,
0.3272251784801483,
-0.32061439752578735,
-0.10737400501966476,
0.09274758398532867,
-0.11547094583511353,
-0.0071225352585315704,
0.11172369867563248,
-0.030756257474422455,
-0.17187930643558502,
0.02209487557411194,
-0.08480128645896912,
0.0942297875881195,
0.2804446816444397,
0.18360388278961182,
0.07434505224227905,
0.1448790282011032,
0.02203955501317978,
-0.3660163879394531,
0.3349870443344116,
0.05314331501722336,
-0.36038798093795776,
0.060070447623729706,
-0.1577843427658081,
0.02083834633231163,
0.010106978937983513,
-0.09559975564479828,
-0.336312860250473,
0.10418882966041565,
0.37966448068618774,
0.4487678110599518,
-0.03692419454455376,
-0.025282230228185654,
0.17484711110591888,
0.4177247881889343,
-0.13553667068481445,
-0.18359927833080292,
-0.0341758131980896,
-0.013768425211310387,
-0.37605035305023193,
-0.24279265105724335,
0.08944112807512283,
0.27498504519462585,
-0.09275075793266296,
-0.24926406145095825,
0.28871291875839233,
0.07521793246269226,
0.27193379402160645,
-0.23038721084594727,
0.046538785099983215,
-0.14502932131290436,
0.05450085178017616,
0.11245480179786682,
0.2869504988193512,
0.09865198284387589,
-0.1674385666847229,
-0.0972822830080986,
0.14503610134124756,
0.1808006465435028,
0.21960677206516266,
-0.14668142795562744,
-0.21147426962852478,
-0.015951555222272873,
-0.0938483327627182,
0.0052855126559734344,
-0.11328441649675369,
0.1361347883939743,
-0.3531872034072876,
0.2921640872955322,
0.11155150830745697,
0.056829363107681274,
0.5075976848602295,
0.6477876901626587,
0.2599565088748932,
0.025358818471431732,
-0.16377651691436768,
-0.19480910897254944,
-0.18789339065551758,
0.2220141589641571,
0.06816485524177551,
0.34806424379348755,
0.1523018479347229,
0.26746776700019836,
-0.18972082436084747,
0.1817849725484848,
-0.1461721807718277,
0.17672421038150787,
-0.060124471783638,
-0.20661239326000214,
-0.0782414898276329,
0.4010898470878601,
-0.08567967265844345,
-0.11263492703437805,
0.28678399324417114,
0.055450402200222015,
0.014027472585439682,
-0.2849523723125458,
0.2493806630373001,
-0.22816883027553558,
-0.01992116868495941,
-0.015333320014178753,
-0.01188597735017538,
0.03603525459766388,
-0.2648231089115143,
-0.1972465068101883,
0.2164185494184494,
0.10731203854084015,
0.27961260080337524,
-0.22933413088321686,
0.08657069504261017,
0.14390680193901062,
-0.3094998002052307,
-0.20707955956459045,
-0.16222918033599854,
-0.2965812385082245,
-0.021249879151582718,
-0.0704679861664772,
-0.4137973189353943,
0.30883318185806274,
-0.10256537795066833,
-0.02443605661392212,
-0.1753554344177246,
-0.07709550112485886,
-0.10917381942272186,
-0.0907442569732666,
-0.1531943827867508,
-0.19489207863807678,
-0.024498917162418365,
-0.32437390089035034,
0.10803361237049103,
0.417331337928772,
-0.4949835538864136,
-0.10764862596988678,
-0.07875607907772064,
0.18748998641967773,
-0.043140705674886703,
-0.2904835343360901,
-0.0876898542046547,
-0.014073403552174568,
-0.1836276352405548,
0.1808851957321167,
-0.0643400177359581,
0.03903685137629509,
0.12682929635047913,
-0.05661935359239578,
0.023613151162862778,
-0.13719958066940308,
-0.12450887262821198,
-0.5041558742523193,
-0.290399432182312,
0.37633100152015686,
-0.0780995711684227,
-0.2742150127887726,
0.05922291800379753,
0.14517103135585785,
0.0341392457485199,
0.16567935049533844,
-0.5678582787513733,
-0.19537778198719025,
-0.2156902253627777,
0.3442632853984833,
0.033340007066726685,
0.18075358867645264,
0.550180196762085,
-0.07305239886045456,
-0.07682131230831146,
-0.2849735617637634,
-0.3120509088039398,
0.054858721792697906,
0.13226664066314697,
0.22666195034980774,
0.17392265796661377,
0.32409727573394775,
0.02041858807206154,
0.7732433676719666,
0.39368218183517456,
-0.0856744647026062,
0.290810227394104,
0.059786565601825714,
0.18085932731628418,
-0.3642297089099884,
-0.34031617641448975,
0.03500954806804657,
-0.18277433514595032,
-0.12850430607795715,
0.27055689692497253,
0.30328547954559326,
-0.022231316193938255,
-0.10943955183029175,
0.22120100259780884,
-0.19860109686851501,
-0.3431124687194824,
-0.03039676882326603,
-0.24290287494659424,
0.29050666093826294,
0.11858689785003662,
0.29512208700180054,
-0.5850369334220886,
-0.2202436923980713,
-0.00608494458720088,
-0.24780713021755219,
0.4443364441394806,
0.015835896134376526,
-0.27918174862861633,
0.07558020949363708,
-0.6623138189315796,
0.29934051632881165,
0.07127096503973007,
0.19142571091651917,
-0.23367485404014587,
-0.11590979993343353,
0.07142411172389984,
-0.026877734810113907,
0.6149193644523621,
-0.09803012758493423,
0.21528075635433197,
0.20692461729049683,
-0.07180124521255493,
-0.2621385157108307,
-0.13355371356010437,
0.12617403268814087,
0.4026210904121399,
0.2812720239162445,
0.27276813983917236,
-0.09175756573677063,
-0.059125013649463654,
-0.19140133261680603,
-0.000805938383564353,
0.0033788494765758514,
-0.17246964573860168,
-0.17902861535549164,
-0.008447565138339996,
0.025713780894875526,
-0.022419393062591553,
0.14632850885391235,
-0.17259687185287476,
-0.02033989317715168,
-0.012625372037291527,
0.06038055568933487,
-0.07830619066953659,
-0.10844911634922028,
-0.04587765038013458,
0.5428433418273926,
0.17471812665462494,
0.2683487832546234,
0.3154829740524292,
-0.039076656103134155,
0.023307055234909058,
0.5417567491531372,
-0.24278372526168823,
-0.22251403331756592,
0.11277636140584946,
-0.02760251611471176,
-0.08532903343439102,
0.21515676379203796,
-0.23479829728603363,
-0.041711293160915375,
0.10573040693998337,
0.03522484004497528,
-0.30954739451408386,
-0.28571248054504395,
0.18606288731098175,
0.311754047870636,
-0.04063519835472107,
-0.4116736650466919,
0.30239763855934143,
0.24737833440303802,
-0.13563531637191772,
0.28000694513320923,
-0.2344656139612198,
-0.3694334030151367,
0.15777729451656342,
-0.14955881237983704,
0.6636375784873962,
-0.0786997377872467,
0.15714186429977417,
-0.05205082148313522,
0.1835278570652008,
0.194663867354393,
0.14745475351810455,
0.2649952173233032,
-0.10447252541780472,
0.011988676153123379,
0.054190292954444885,
-0.2487533986568451,
-0.15913981199264526,
0.0749850869178772,
-0.3146076798439026,
0.2809503674507141,
-0.12367714941501617,
0.5698904395103455,
-0.006663542240858078,
-0.4552024006843567,
0.2900896370410919,
-0.26057711243629456,
-0.15752476453781128,
0.2971998453140259,
0.09734323620796204,
0.3726031184196472,
0.027376584708690643,
0.13371309638023376,
-0.3140106499195099,
-0.19547592103481293,
-0.05457358807325363,
0.036623723804950714,
-0.3555864095687866,
0.17640849947929382,
0.08296671509742737,
-0.14333072304725647,
-0.28577062487602234,
0.31725484132766724,
0.24782085418701172,
-0.12968559563159943,
-0.2597385346889496,
-0.05242069438099861,
0.3185185492038727,
0.42312222719192505,
-0.07715024054050446,
-0.2048157900571823,
0.09238090366125107,
0.13078230619430542,
-0.07348545640707016,
0.06940081715583801,
-0.07972990721464157,
-0.4370836615562439,
-0.29134082794189453,
0.30786100029945374,
0.0208338163793087,
-0.2143394500017166,
-0.024040861055254936,
0.0380597859621048,
0.1404801905155182,
-0.034371718764305115,
0.17638449370861053,
0.09266568720340729,
0.04637761414051056,
0.35221803188323975,
-0.30664414167404175,
-0.032921042293310165,
0.09630154073238373,
0.6910691857337952,
0.17683935165405273,
-0.10925396531820297,
0.38446906208992004,
0.06219295784831047,
-0.29082244634628296,
-0.1518290787935257,
-0.16822777688503265,
-0.23745359480381012,
-0.2049521803855896,
0.1135922223329544,
-0.3047887086868286,
0.05703809857368469,
0.1295434981584549,
0.08789204061031342,
-0.007159296423196793,
0.044557202607393265,
-0.09394565969705582,
-0.13129082322120667,
-0.38297006487846375,
-0.10608883202075958,
0.0017552077770233154,
0.052534036338329315,
0.19821465015411377,
-0.05025261268019676,
-0.09289451688528061,
0.1762564778327942,
-0.3340483605861664,
0.06188751012086868,
0.07732779532670975,
0.1574496477842331,
0.1283506602048874,
-0.13390392065048218,
0.2853277027606964,
-0.1930517852306366,
0.059411585330963135,
0.07281698286533356,
-0.41391220688819885,
-0.2782279849052429,
0.16704005002975464,
0.09416376054286957,
0.03299930691719055,
-0.12141726166009903,
-0.2470846176147461,
-0.222642719745636,
0.012962725944817066,
-0.5172250270843506,
0.056233566254377365,
0.3003097474575043,
-0.103316530585289,
-0.06199748069047928,
0.1269363909959793,
0.05898837372660637,
0.309878945350647,
0.190108984708786,
-0.11755165457725525,
-0.008697137236595154,
-0.22083783149719238,
0.2573595643043518,
0.047916993498802185,
0.1370416134595871,
-0.05627221614122391,
0.03996145725250244,
0.1067030131816864,
0.14733360707759857,
0.35385164618492126,
-0.34954744577407837,
-0.09590563923120499,
0.17948748171329498,
0.19771994650363922,
-0.06546185910701752,
-0.1790165901184082,
-0.09338332712650299,
-0.10487021505832672,
0.18333958089351654,
-0.09191024303436279,
-0.10308851301670074,
0.5036977529525757,
0.3170231282711029,
0.12332998216152191,
0.14068837463855743,
0.1180766224861145,
-0.2553684711456299,
0.18052323162555695,
0.22579717636108398,
0.5175104141235352,
-0.21569591760635376,
0.29682642221450806,
0.0140359066426754,
0.0883399099111557,
0.2030392736196518,
0.3545151352882385,
0.18068374693393707,
-0.08875780552625656,
0.3053056001663208,
0.13881558179855347,
0.2244511842727661,
0.2918464243412018,
0.0828302875161171,
-0.22979053854942322,
-0.33086904883384705,
0.08285072445869446,
0.03153356909751892,
-0.2458781599998474,
0.3778292238712311,
-0.103025883436203,
0.16485802829265594,
-0.2387319952249527,
-0.21164223551750183,
-0.2096371203660965,
0.18760009109973907,
-0.32543274760246277,
-0.18510694801807404,
0.25132760405540466,
0.014023713767528534,
0.2821989357471466,
-0.08856239169836044,
0.027309654280543327,
0.10227936506271362,
0.48712286353111267,
-0.08713477849960327,
0.15987864136695862,
-0.03885094076395035,
-0.41984984278678894,
-0.059173837304115295,
0.5264774560928345,
-0.23313237726688385,
0.3561898171901703,
-0.16943277418613434,
-0.05237748473882675,
-0.1272810995578766,
0.29462507367134094,
0.3648686110973358,
0.23364953696727753,
-0.05023340508341789,
0.2412073314189911,
0.18793201446533203,
-0.06433166563510895,
-0.2987421452999115,
0.40231016278266907,
-0.15406298637390137,
-0.42237043380737305,
0.1338624656200409,
0.11754409968852997,
-0.10458196699619293,
0.20911602675914764,
-0.06988078355789185,
0.30180835723876953,
-0.11350594460964203,
0.11945007741451263,
-0.39487141370773315,
-0.18191373348236084,
0.05045393109321594,
0.0856812596321106,
-0.09156163036823273,
-0.07973843067884445,
0.29386019706726074,
-0.10511621832847595,
0.28799116611480713,
-0.17609454691410065,
0.1067948043346405,
-0.1220279335975647,
0.2977887988090515,
0.18544822931289673,
0.043822553008794785,
-0.1389898657798767,
-0.032316066324710846,
-0.3474254012107849,
0.1619759500026703,
-0.31733623147010803,
0.15566326677799225,
-0.21746280789375305,
0.16787861287593842,
-0.11324774473905563,
-0.0024306252598762512,
0.28103870153427124,
-0.4437093138694763,
0.1354278177022934,
0.25279873609542847,
-0.22077935934066772,
-0.2300250381231308,
-0.21626092493534088,
0.06342749297618866,
0.22705277800559998,
-0.435083270072937,
0.34174615144729614,
-0.28040605783462524,
0.1463565230369568,
-0.16108892858028412,
0.04932772368192673,
0.05928517505526543,
0.20931504666805267,
0.4556954801082611,
0.3434942066669464,
0.11727644503116608,
0.22266408801078796,
0.04802923649549484,
-0.301628440618515,
-0.12587369978427887,
0.042611151933670044,
0.0033725351095199585,
-0.18866188824176788,
0.16462674736976624,
-0.5020896196365356,
-0.3603515326976776,
-0.2256869226694107,
0.011632457375526428,
0.2128080278635025,
-0.1014985591173172,
0.070227712392807,
-0.14753304421901703,
-0.13261181116104126,
-0.11002451926469803,
0.06859761476516724,
0.28125104308128357,
-0.2610151171684265,
0.33802109956741333,
-0.22172915935516357,
-0.21343271434307098,
0.44884660840034485,
-0.4780478775501251,
-0.34609663486480713,
-0.18685750663280487,
0.38116905093193054,
-0.13836818933486938,
-0.16568343341350555,
-0.36003193259239197,
-0.04661122336983681,
0.39328351616859436,
0.05717206373810768,
-0.19772067666053772,
0.24924910068511963,
-0.26450061798095703,
0.2071593552827835,
-0.03341618925333023,
0.2238563746213913,
0.09521385282278061,
0.0980488508939743,
0.21554166078567505,
-0.17455348372459412
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | Hi,
set `keep_in_memory` to False when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them):
https://github.com/huggingface/datasets/blob/241a0b4a3a868778ee91e767ad406f9da7610df2/src/datasets/arrow_dataset.py#L1718
@albertvillanova It seems like this behavior was overlooked in #2182.
| ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 46 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
Hi,
set `keep_in_memory` to False when loading a dataset (`sst = load_dataset("sst", keep_in_memory=False)`) to prevent it from loading in-memory. Currently, in-memory datasets fail to find cached files due to this check (always False for them):
https://github.com/huggingface/datasets/blob/241a0b4a3a868778ee91e767ad406f9da7610df2/src/datasets/arrow_dataset.py#L1718
@albertvillanova It seems like this behavior was overlooked in #2182.
| [
-0.16529837250709534,
-0.3959714472293854,
-0.00884755328297615,
0.1456606239080429,
0.20624372363090515,
-0.10191776603460312,
0.30026790499687195,
0.12512890994548798,
0.3953084349632263,
0.020620591938495636,
-0.0369783416390419,
0.242855042219162,
0.16997182369232178,
-0.28493571281433105,
0.18808673322200775,
0.25960469245910645,
0.2713773250579834,
-0.03853346407413483,
-0.2219652533531189,
-0.17453426122665405,
-0.19188204407691956,
0.17236347496509552,
-0.3064853549003601,
-0.2573416233062744,
-0.2379021793603897,
0.11174200475215912,
-0.2603813111782074,
-0.12303150445222855,
0.4237755239009857,
-0.3212161958217621,
0.37847599387168884,
-0.05806620791554451,
0.014867329970002174,
0.6959592700004578,
-0.00011318777251290157,
-0.16052795946598053,
0.1358753740787506,
-0.1383192390203476,
-0.0015481328591704369,
0.21333149075508118,
-0.3389546275138855,
-0.31001603603363037,
-0.004519164562225342,
-0.2349565029144287,
-0.3307378590106964,
0.015123306773602962,
-0.0239326823502779,
-0.8197701573371887,
0.37284529209136963,
0.2541065216064453,
0.29510653018951416,
0.17261354625225067,
-0.019022371619939804,
0.07428581267595291,
0.08660299330949783,
-0.08379076421260834,
-0.27259498834609985,
-0.0186920166015625,
0.2995278239250183,
-0.19743919372558594,
-0.028207354247570038,
0.35948067903518677,
-0.13195188343524933,
0.07357290387153625,
0.3317606449127197,
0.32650190591812134,
0.21803900599479675,
-0.11859187483787537,
0.2567962110042572,
-0.22583869099617004,
0.3444477319717407,
-0.25056082010269165,
-0.34029722213745117,
-0.25219765305519104,
-0.4512901306152344,
-0.09359724819660187,
0.23053455352783203,
-0.18163523077964783,
-0.017511287704110146,
0.0523240901529789,
-0.3951413035392761,
0.14610987901687622,
0.27687376737594604,
0.023934178054332733,
0.03914815932512283,
0.25855886936187744,
-0.08576347678899765,
0.10614363849163055,
0.044075705111026764,
-0.15750786662101746,
0.018533162772655487,
-0.24768781661987305,
-0.023325730115175247,
0.38760077953338623,
-0.4578024744987488,
0.13098184764385223,
0.4648629128932953,
0.14319738745689392,
-0.11104454845190048,
-0.01294504851102829,
0.11935635656118393,
-0.006080877035856247,
0.18636205792427063,
0.0010308995842933655,
0.06157812848687172,
0.48902633786201477,
-0.010356210172176361,
0.3551562428474426,
-0.03754395246505737,
-0.07195495814085007,
-0.32302212715148926,
-0.13232794404029846,
0.26592856645584106,
-0.10086946934461594,
0.5175330638885498,
0.1616138517856598,
0.20059169828891754,
-0.13027755916118622,
0.18968333303928375,
-0.0005330601707100868,
-0.16335979104042053,
-0.1748705357313156,
0.16171760857105255,
0.34699440002441406,
0.08699977397918701,
-0.036532849073410034,
-0.07700525224208832,
-0.10873974859714508,
-0.22075380384922028,
-0.07633795589208603,
-0.3961368799209595,
-0.24385766685009003,
-0.3070540130138397,
0.14955861866474152,
0.19743825495243073,
-0.0326642245054245,
0.13559658825397491,
0.027335185557603836,
-0.10057377815246582,
-0.33551648259162903,
0.054623305797576904,
-0.18763485550880432,
0.6559557318687439,
0.15888020396232605,
-0.2145816534757614,
0.25336185097694397,
0.3517920970916748,
0.17983780801296234,
-0.3027566075325012,
0.28129979968070984,
-0.4556756615638733,
-0.08744300901889801,
0.4142133295536041,
0.1292608231306076,
-0.09991008043289185,
-0.07480070739984512,
-0.15049785375595093,
0.12536627054214478,
0.7231866121292114,
-0.15730221569538116,
0.26680245995521545,
-0.21290215849876404,
-0.4821091592311859,
-0.3187292814254761,
0.34948092699050903,
0.495372474193573,
-0.12810295820236206,
-0.14054052531719208,
0.10628524422645569,
0.3853791654109955,
0.36833739280700684,
0.2536807060241699,
-0.2394358068704605,
0.11122338473796844,
-0.2686230540275574,
0.18866266310214996,
0.2342701256275177,
-0.38494303822517395,
-0.679406464099884,
-0.025037892162799835,
-0.08278041332960129,
0.1595265120267868,
0.030716434121131897,
-0.034351978451013565,
0.30047979950904846,
-0.18704602122306824,
0.1719587743282318,
-0.05722451210021973,
-0.0018518995493650436,
0.3272251784801483,
-0.32061439752578735,
-0.10737400501966476,
0.09274758398532867,
-0.11547094583511353,
-0.0071225352585315704,
0.11172369867563248,
-0.030756257474422455,
-0.17187930643558502,
0.02209487557411194,
-0.08480128645896912,
0.0942297875881195,
0.2804446816444397,
0.18360388278961182,
0.07434505224227905,
0.1448790282011032,
0.02203955501317978,
-0.3660163879394531,
0.3349870443344116,
0.05314331501722336,
-0.36038798093795776,
0.060070447623729706,
-0.1577843427658081,
0.02083834633231163,
0.010106978937983513,
-0.09559975564479828,
-0.336312860250473,
0.10418882966041565,
0.37966448068618774,
0.4487678110599518,
-0.03692419454455376,
-0.025282230228185654,
0.17484711110591888,
0.4177247881889343,
-0.13553667068481445,
-0.18359927833080292,
-0.0341758131980896,
-0.013768425211310387,
-0.37605035305023193,
-0.24279265105724335,
0.08944112807512283,
0.27498504519462585,
-0.09275075793266296,
-0.24926406145095825,
0.28871291875839233,
0.07521793246269226,
0.27193379402160645,
-0.23038721084594727,
0.046538785099983215,
-0.14502932131290436,
0.05450085178017616,
0.11245480179786682,
0.2869504988193512,
0.09865198284387589,
-0.1674385666847229,
-0.0972822830080986,
0.14503610134124756,
0.1808006465435028,
0.21960677206516266,
-0.14668142795562744,
-0.21147426962852478,
-0.015951555222272873,
-0.0938483327627182,
0.0052855126559734344,
-0.11328441649675369,
0.1361347883939743,
-0.3531872034072876,
0.2921640872955322,
0.11155150830745697,
0.056829363107681274,
0.5075976848602295,
0.6477876901626587,
0.2599565088748932,
0.025358818471431732,
-0.16377651691436768,
-0.19480910897254944,
-0.18789339065551758,
0.2220141589641571,
0.06816485524177551,
0.34806424379348755,
0.1523018479347229,
0.26746776700019836,
-0.18972082436084747,
0.1817849725484848,
-0.1461721807718277,
0.17672421038150787,
-0.060124471783638,
-0.20661239326000214,
-0.0782414898276329,
0.4010898470878601,
-0.08567967265844345,
-0.11263492703437805,
0.28678399324417114,
0.055450402200222015,
0.014027472585439682,
-0.2849523723125458,
0.2493806630373001,
-0.22816883027553558,
-0.01992116868495941,
-0.015333320014178753,
-0.01188597735017538,
0.03603525459766388,
-0.2648231089115143,
-0.1972465068101883,
0.2164185494184494,
0.10731203854084015,
0.27961260080337524,
-0.22933413088321686,
0.08657069504261017,
0.14390680193901062,
-0.3094998002052307,
-0.20707955956459045,
-0.16222918033599854,
-0.2965812385082245,
-0.021249879151582718,
-0.0704679861664772,
-0.4137973189353943,
0.30883318185806274,
-0.10256537795066833,
-0.02443605661392212,
-0.1753554344177246,
-0.07709550112485886,
-0.10917381942272186,
-0.0907442569732666,
-0.1531943827867508,
-0.19489207863807678,
-0.024498917162418365,
-0.32437390089035034,
0.10803361237049103,
0.417331337928772,
-0.4949835538864136,
-0.10764862596988678,
-0.07875607907772064,
0.18748998641967773,
-0.043140705674886703,
-0.2904835343360901,
-0.0876898542046547,
-0.014073403552174568,
-0.1836276352405548,
0.1808851957321167,
-0.0643400177359581,
0.03903685137629509,
0.12682929635047913,
-0.05661935359239578,
0.023613151162862778,
-0.13719958066940308,
-0.12450887262821198,
-0.5041558742523193,
-0.290399432182312,
0.37633100152015686,
-0.0780995711684227,
-0.2742150127887726,
0.05922291800379753,
0.14517103135585785,
0.0341392457485199,
0.16567935049533844,
-0.5678582787513733,
-0.19537778198719025,
-0.2156902253627777,
0.3442632853984833,
0.033340007066726685,
0.18075358867645264,
0.550180196762085,
-0.07305239886045456,
-0.07682131230831146,
-0.2849735617637634,
-0.3120509088039398,
0.054858721792697906,
0.13226664066314697,
0.22666195034980774,
0.17392265796661377,
0.32409727573394775,
0.02041858807206154,
0.7732433676719666,
0.39368218183517456,
-0.0856744647026062,
0.290810227394104,
0.059786565601825714,
0.18085932731628418,
-0.3642297089099884,
-0.34031617641448975,
0.03500954806804657,
-0.18277433514595032,
-0.12850430607795715,
0.27055689692497253,
0.30328547954559326,
-0.022231316193938255,
-0.10943955183029175,
0.22120100259780884,
-0.19860109686851501,
-0.3431124687194824,
-0.03039676882326603,
-0.24290287494659424,
0.29050666093826294,
0.11858689785003662,
0.29512208700180054,
-0.5850369334220886,
-0.2202436923980713,
-0.00608494458720088,
-0.24780713021755219,
0.4443364441394806,
0.015835896134376526,
-0.27918174862861633,
0.07558020949363708,
-0.6623138189315796,
0.29934051632881165,
0.07127096503973007,
0.19142571091651917,
-0.23367485404014587,
-0.11590979993343353,
0.07142411172389984,
-0.026877734810113907,
0.6149193644523621,
-0.09803012758493423,
0.21528075635433197,
0.20692461729049683,
-0.07180124521255493,
-0.2621385157108307,
-0.13355371356010437,
0.12617403268814087,
0.4026210904121399,
0.2812720239162445,
0.27276813983917236,
-0.09175756573677063,
-0.059125013649463654,
-0.19140133261680603,
-0.000805938383564353,
0.0033788494765758514,
-0.17246964573860168,
-0.17902861535549164,
-0.008447565138339996,
0.025713780894875526,
-0.022419393062591553,
0.14632850885391235,
-0.17259687185287476,
-0.02033989317715168,
-0.012625372037291527,
0.06038055568933487,
-0.07830619066953659,
-0.10844911634922028,
-0.04587765038013458,
0.5428433418273926,
0.17471812665462494,
0.2683487832546234,
0.3154829740524292,
-0.039076656103134155,
0.023307055234909058,
0.5417567491531372,
-0.24278372526168823,
-0.22251403331756592,
0.11277636140584946,
-0.02760251611471176,
-0.08532903343439102,
0.21515676379203796,
-0.23479829728603363,
-0.041711293160915375,
0.10573040693998337,
0.03522484004497528,
-0.30954739451408386,
-0.28571248054504395,
0.18606288731098175,
0.311754047870636,
-0.04063519835472107,
-0.4116736650466919,
0.30239763855934143,
0.24737833440303802,
-0.13563531637191772,
0.28000694513320923,
-0.2344656139612198,
-0.3694334030151367,
0.15777729451656342,
-0.14955881237983704,
0.6636375784873962,
-0.0786997377872467,
0.15714186429977417,
-0.05205082148313522,
0.1835278570652008,
0.194663867354393,
0.14745475351810455,
0.2649952173233032,
-0.10447252541780472,
0.011988676153123379,
0.054190292954444885,
-0.2487533986568451,
-0.15913981199264526,
0.0749850869178772,
-0.3146076798439026,
0.2809503674507141,
-0.12367714941501617,
0.5698904395103455,
-0.006663542240858078,
-0.4552024006843567,
0.2900896370410919,
-0.26057711243629456,
-0.15752476453781128,
0.2971998453140259,
0.09734323620796204,
0.3726031184196472,
0.027376584708690643,
0.13371309638023376,
-0.3140106499195099,
-0.19547592103481293,
-0.05457358807325363,
0.036623723804950714,
-0.3555864095687866,
0.17640849947929382,
0.08296671509742737,
-0.14333072304725647,
-0.28577062487602234,
0.31725484132766724,
0.24782085418701172,
-0.12968559563159943,
-0.2597385346889496,
-0.05242069438099861,
0.3185185492038727,
0.42312222719192505,
-0.07715024054050446,
-0.2048157900571823,
0.09238090366125107,
0.13078230619430542,
-0.07348545640707016,
0.06940081715583801,
-0.07972990721464157,
-0.4370836615562439,
-0.29134082794189453,
0.30786100029945374,
0.0208338163793087,
-0.2143394500017166,
-0.024040861055254936,
0.0380597859621048,
0.1404801905155182,
-0.034371718764305115,
0.17638449370861053,
0.09266568720340729,
0.04637761414051056,
0.35221803188323975,
-0.30664414167404175,
-0.032921042293310165,
0.09630154073238373,
0.6910691857337952,
0.17683935165405273,
-0.10925396531820297,
0.38446906208992004,
0.06219295784831047,
-0.29082244634628296,
-0.1518290787935257,
-0.16822777688503265,
-0.23745359480381012,
-0.2049521803855896,
0.1135922223329544,
-0.3047887086868286,
0.05703809857368469,
0.1295434981584549,
0.08789204061031342,
-0.007159296423196793,
0.044557202607393265,
-0.09394565969705582,
-0.13129082322120667,
-0.38297006487846375,
-0.10608883202075958,
0.0017552077770233154,
0.052534036338329315,
0.19821465015411377,
-0.05025261268019676,
-0.09289451688528061,
0.1762564778327942,
-0.3340483605861664,
0.06188751012086868,
0.07732779532670975,
0.1574496477842331,
0.1283506602048874,
-0.13390392065048218,
0.2853277027606964,
-0.1930517852306366,
0.059411585330963135,
0.07281698286533356,
-0.41391220688819885,
-0.2782279849052429,
0.16704005002975464,
0.09416376054286957,
0.03299930691719055,
-0.12141726166009903,
-0.2470846176147461,
-0.222642719745636,
0.012962725944817066,
-0.5172250270843506,
0.056233566254377365,
0.3003097474575043,
-0.103316530585289,
-0.06199748069047928,
0.1269363909959793,
0.05898837372660637,
0.309878945350647,
0.190108984708786,
-0.11755165457725525,
-0.008697137236595154,
-0.22083783149719238,
0.2573595643043518,
0.047916993498802185,
0.1370416134595871,
-0.05627221614122391,
0.03996145725250244,
0.1067030131816864,
0.14733360707759857,
0.35385164618492126,
-0.34954744577407837,
-0.09590563923120499,
0.17948748171329498,
0.19771994650363922,
-0.06546185910701752,
-0.1790165901184082,
-0.09338332712650299,
-0.10487021505832672,
0.18333958089351654,
-0.09191024303436279,
-0.10308851301670074,
0.5036977529525757,
0.3170231282711029,
0.12332998216152191,
0.14068837463855743,
0.1180766224861145,
-0.2553684711456299,
0.18052323162555695,
0.22579717636108398,
0.5175104141235352,
-0.21569591760635376,
0.29682642221450806,
0.0140359066426754,
0.0883399099111557,
0.2030392736196518,
0.3545151352882385,
0.18068374693393707,
-0.08875780552625656,
0.3053056001663208,
0.13881558179855347,
0.2244511842727661,
0.2918464243412018,
0.0828302875161171,
-0.22979053854942322,
-0.33086904883384705,
0.08285072445869446,
0.03153356909751892,
-0.2458781599998474,
0.3778292238712311,
-0.103025883436203,
0.16485802829265594,
-0.2387319952249527,
-0.21164223551750183,
-0.2096371203660965,
0.18760009109973907,
-0.32543274760246277,
-0.18510694801807404,
0.25132760405540466,
0.014023713767528534,
0.2821989357471466,
-0.08856239169836044,
0.027309654280543327,
0.10227936506271362,
0.48712286353111267,
-0.08713477849960327,
0.15987864136695862,
-0.03885094076395035,
-0.41984984278678894,
-0.059173837304115295,
0.5264774560928345,
-0.23313237726688385,
0.3561898171901703,
-0.16943277418613434,
-0.05237748473882675,
-0.1272810995578766,
0.29462507367134094,
0.3648686110973358,
0.23364953696727753,
-0.05023340508341789,
0.2412073314189911,
0.18793201446533203,
-0.06433166563510895,
-0.2987421452999115,
0.40231016278266907,
-0.15406298637390137,
-0.42237043380737305,
0.1338624656200409,
0.11754409968852997,
-0.10458196699619293,
0.20911602675914764,
-0.06988078355789185,
0.30180835723876953,
-0.11350594460964203,
0.11945007741451263,
-0.39487141370773315,
-0.18191373348236084,
0.05045393109321594,
0.0856812596321106,
-0.09156163036823273,
-0.07973843067884445,
0.29386019706726074,
-0.10511621832847595,
0.28799116611480713,
-0.17609454691410065,
0.1067948043346405,
-0.1220279335975647,
0.2977887988090515,
0.18544822931289673,
0.043822553008794785,
-0.1389898657798767,
-0.032316066324710846,
-0.3474254012107849,
0.1619759500026703,
-0.31733623147010803,
0.15566326677799225,
-0.21746280789375305,
0.16787861287593842,
-0.11324774473905563,
-0.0024306252598762512,
0.28103870153427124,
-0.4437093138694763,
0.1354278177022934,
0.25279873609542847,
-0.22077935934066772,
-0.2300250381231308,
-0.21626092493534088,
0.06342749297618866,
0.22705277800559998,
-0.435083270072937,
0.34174615144729614,
-0.28040605783462524,
0.1463565230369568,
-0.16108892858028412,
0.04932772368192673,
0.05928517505526543,
0.20931504666805267,
0.4556954801082611,
0.3434942066669464,
0.11727644503116608,
0.22266408801078796,
0.04802923649549484,
-0.301628440618515,
-0.12587369978427887,
0.042611151933670044,
0.0033725351095199585,
-0.18866188824176788,
0.16462674736976624,
-0.5020896196365356,
-0.3603515326976776,
-0.2256869226694107,
0.011632457375526428,
0.2128080278635025,
-0.1014985591173172,
0.070227712392807,
-0.14753304421901703,
-0.13261181116104126,
-0.11002451926469803,
0.06859761476516724,
0.28125104308128357,
-0.2610151171684265,
0.33802109956741333,
-0.22172915935516357,
-0.21343271434307098,
0.44884660840034485,
-0.4780478775501251,
-0.34609663486480713,
-0.18685750663280487,
0.38116905093193054,
-0.13836818933486938,
-0.16568343341350555,
-0.36003193259239197,
-0.04661122336983681,
0.39328351616859436,
0.05717206373810768,
-0.19772067666053772,
0.24924910068511963,
-0.26450061798095703,
0.2071593552827835,
-0.03341618925333023,
0.2238563746213913,
0.09521385282278061,
0.0980488508939743,
0.21554166078567505,
-0.17455348372459412
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | Hi @villmow, thanks for reporting.
As @mariosasko has pointed out, we did not consider this case when introducing the feature of automatic in-memory for small datasets. This needs to be fixed. | ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 31 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
Hi @villmow, thanks for reporting.
As @mariosasko has pointed out, we did not consider this case when introducing the feature of automatic in-memory for small datasets. This needs to be fixed. | [
-0.16529837250709534,
-0.3959714472293854,
-0.00884755328297615,
0.1456606239080429,
0.20624372363090515,
-0.10191776603460312,
0.30026790499687195,
0.12512890994548798,
0.3953084349632263,
0.020620591938495636,
-0.0369783416390419,
0.242855042219162,
0.16997182369232178,
-0.28493571281433105,
0.18808673322200775,
0.25960469245910645,
0.2713773250579834,
-0.03853346407413483,
-0.2219652533531189,
-0.17453426122665405,
-0.19188204407691956,
0.17236347496509552,
-0.3064853549003601,
-0.2573416233062744,
-0.2379021793603897,
0.11174200475215912,
-0.2603813111782074,
-0.12303150445222855,
0.4237755239009857,
-0.3212161958217621,
0.37847599387168884,
-0.05806620791554451,
0.014867329970002174,
0.6959592700004578,
-0.00011318777251290157,
-0.16052795946598053,
0.1358753740787506,
-0.1383192390203476,
-0.0015481328591704369,
0.21333149075508118,
-0.3389546275138855,
-0.31001603603363037,
-0.004519164562225342,
-0.2349565029144287,
-0.3307378590106964,
0.015123306773602962,
-0.0239326823502779,
-0.8197701573371887,
0.37284529209136963,
0.2541065216064453,
0.29510653018951416,
0.17261354625225067,
-0.019022371619939804,
0.07428581267595291,
0.08660299330949783,
-0.08379076421260834,
-0.27259498834609985,
-0.0186920166015625,
0.2995278239250183,
-0.19743919372558594,
-0.028207354247570038,
0.35948067903518677,
-0.13195188343524933,
0.07357290387153625,
0.3317606449127197,
0.32650190591812134,
0.21803900599479675,
-0.11859187483787537,
0.2567962110042572,
-0.22583869099617004,
0.3444477319717407,
-0.25056082010269165,
-0.34029722213745117,
-0.25219765305519104,
-0.4512901306152344,
-0.09359724819660187,
0.23053455352783203,
-0.18163523077964783,
-0.017511287704110146,
0.0523240901529789,
-0.3951413035392761,
0.14610987901687622,
0.27687376737594604,
0.023934178054332733,
0.03914815932512283,
0.25855886936187744,
-0.08576347678899765,
0.10614363849163055,
0.044075705111026764,
-0.15750786662101746,
0.018533162772655487,
-0.24768781661987305,
-0.023325730115175247,
0.38760077953338623,
-0.4578024744987488,
0.13098184764385223,
0.4648629128932953,
0.14319738745689392,
-0.11104454845190048,
-0.01294504851102829,
0.11935635656118393,
-0.006080877035856247,
0.18636205792427063,
0.0010308995842933655,
0.06157812848687172,
0.48902633786201477,
-0.010356210172176361,
0.3551562428474426,
-0.03754395246505737,
-0.07195495814085007,
-0.32302212715148926,
-0.13232794404029846,
0.26592856645584106,
-0.10086946934461594,
0.5175330638885498,
0.1616138517856598,
0.20059169828891754,
-0.13027755916118622,
0.18968333303928375,
-0.0005330601707100868,
-0.16335979104042053,
-0.1748705357313156,
0.16171760857105255,
0.34699440002441406,
0.08699977397918701,
-0.036532849073410034,
-0.07700525224208832,
-0.10873974859714508,
-0.22075380384922028,
-0.07633795589208603,
-0.3961368799209595,
-0.24385766685009003,
-0.3070540130138397,
0.14955861866474152,
0.19743825495243073,
-0.0326642245054245,
0.13559658825397491,
0.027335185557603836,
-0.10057377815246582,
-0.33551648259162903,
0.054623305797576904,
-0.18763485550880432,
0.6559557318687439,
0.15888020396232605,
-0.2145816534757614,
0.25336185097694397,
0.3517920970916748,
0.17983780801296234,
-0.3027566075325012,
0.28129979968070984,
-0.4556756615638733,
-0.08744300901889801,
0.4142133295536041,
0.1292608231306076,
-0.09991008043289185,
-0.07480070739984512,
-0.15049785375595093,
0.12536627054214478,
0.7231866121292114,
-0.15730221569538116,
0.26680245995521545,
-0.21290215849876404,
-0.4821091592311859,
-0.3187292814254761,
0.34948092699050903,
0.495372474193573,
-0.12810295820236206,
-0.14054052531719208,
0.10628524422645569,
0.3853791654109955,
0.36833739280700684,
0.2536807060241699,
-0.2394358068704605,
0.11122338473796844,
-0.2686230540275574,
0.18866266310214996,
0.2342701256275177,
-0.38494303822517395,
-0.679406464099884,
-0.025037892162799835,
-0.08278041332960129,
0.1595265120267868,
0.030716434121131897,
-0.034351978451013565,
0.30047979950904846,
-0.18704602122306824,
0.1719587743282318,
-0.05722451210021973,
-0.0018518995493650436,
0.3272251784801483,
-0.32061439752578735,
-0.10737400501966476,
0.09274758398532867,
-0.11547094583511353,
-0.0071225352585315704,
0.11172369867563248,
-0.030756257474422455,
-0.17187930643558502,
0.02209487557411194,
-0.08480128645896912,
0.0942297875881195,
0.2804446816444397,
0.18360388278961182,
0.07434505224227905,
0.1448790282011032,
0.02203955501317978,
-0.3660163879394531,
0.3349870443344116,
0.05314331501722336,
-0.36038798093795776,
0.060070447623729706,
-0.1577843427658081,
0.02083834633231163,
0.010106978937983513,
-0.09559975564479828,
-0.336312860250473,
0.10418882966041565,
0.37966448068618774,
0.4487678110599518,
-0.03692419454455376,
-0.025282230228185654,
0.17484711110591888,
0.4177247881889343,
-0.13553667068481445,
-0.18359927833080292,
-0.0341758131980896,
-0.013768425211310387,
-0.37605035305023193,
-0.24279265105724335,
0.08944112807512283,
0.27498504519462585,
-0.09275075793266296,
-0.24926406145095825,
0.28871291875839233,
0.07521793246269226,
0.27193379402160645,
-0.23038721084594727,
0.046538785099983215,
-0.14502932131290436,
0.05450085178017616,
0.11245480179786682,
0.2869504988193512,
0.09865198284387589,
-0.1674385666847229,
-0.0972822830080986,
0.14503610134124756,
0.1808006465435028,
0.21960677206516266,
-0.14668142795562744,
-0.21147426962852478,
-0.015951555222272873,
-0.0938483327627182,
0.0052855126559734344,
-0.11328441649675369,
0.1361347883939743,
-0.3531872034072876,
0.2921640872955322,
0.11155150830745697,
0.056829363107681274,
0.5075976848602295,
0.6477876901626587,
0.2599565088748932,
0.025358818471431732,
-0.16377651691436768,
-0.19480910897254944,
-0.18789339065551758,
0.2220141589641571,
0.06816485524177551,
0.34806424379348755,
0.1523018479347229,
0.26746776700019836,
-0.18972082436084747,
0.1817849725484848,
-0.1461721807718277,
0.17672421038150787,
-0.060124471783638,
-0.20661239326000214,
-0.0782414898276329,
0.4010898470878601,
-0.08567967265844345,
-0.11263492703437805,
0.28678399324417114,
0.055450402200222015,
0.014027472585439682,
-0.2849523723125458,
0.2493806630373001,
-0.22816883027553558,
-0.01992116868495941,
-0.015333320014178753,
-0.01188597735017538,
0.03603525459766388,
-0.2648231089115143,
-0.1972465068101883,
0.2164185494184494,
0.10731203854084015,
0.27961260080337524,
-0.22933413088321686,
0.08657069504261017,
0.14390680193901062,
-0.3094998002052307,
-0.20707955956459045,
-0.16222918033599854,
-0.2965812385082245,
-0.021249879151582718,
-0.0704679861664772,
-0.4137973189353943,
0.30883318185806274,
-0.10256537795066833,
-0.02443605661392212,
-0.1753554344177246,
-0.07709550112485886,
-0.10917381942272186,
-0.0907442569732666,
-0.1531943827867508,
-0.19489207863807678,
-0.024498917162418365,
-0.32437390089035034,
0.10803361237049103,
0.417331337928772,
-0.4949835538864136,
-0.10764862596988678,
-0.07875607907772064,
0.18748998641967773,
-0.043140705674886703,
-0.2904835343360901,
-0.0876898542046547,
-0.014073403552174568,
-0.1836276352405548,
0.1808851957321167,
-0.0643400177359581,
0.03903685137629509,
0.12682929635047913,
-0.05661935359239578,
0.023613151162862778,
-0.13719958066940308,
-0.12450887262821198,
-0.5041558742523193,
-0.290399432182312,
0.37633100152015686,
-0.0780995711684227,
-0.2742150127887726,
0.05922291800379753,
0.14517103135585785,
0.0341392457485199,
0.16567935049533844,
-0.5678582787513733,
-0.19537778198719025,
-0.2156902253627777,
0.3442632853984833,
0.033340007066726685,
0.18075358867645264,
0.550180196762085,
-0.07305239886045456,
-0.07682131230831146,
-0.2849735617637634,
-0.3120509088039398,
0.054858721792697906,
0.13226664066314697,
0.22666195034980774,
0.17392265796661377,
0.32409727573394775,
0.02041858807206154,
0.7732433676719666,
0.39368218183517456,
-0.0856744647026062,
0.290810227394104,
0.059786565601825714,
0.18085932731628418,
-0.3642297089099884,
-0.34031617641448975,
0.03500954806804657,
-0.18277433514595032,
-0.12850430607795715,
0.27055689692497253,
0.30328547954559326,
-0.022231316193938255,
-0.10943955183029175,
0.22120100259780884,
-0.19860109686851501,
-0.3431124687194824,
-0.03039676882326603,
-0.24290287494659424,
0.29050666093826294,
0.11858689785003662,
0.29512208700180054,
-0.5850369334220886,
-0.2202436923980713,
-0.00608494458720088,
-0.24780713021755219,
0.4443364441394806,
0.015835896134376526,
-0.27918174862861633,
0.07558020949363708,
-0.6623138189315796,
0.29934051632881165,
0.07127096503973007,
0.19142571091651917,
-0.23367485404014587,
-0.11590979993343353,
0.07142411172389984,
-0.026877734810113907,
0.6149193644523621,
-0.09803012758493423,
0.21528075635433197,
0.20692461729049683,
-0.07180124521255493,
-0.2621385157108307,
-0.13355371356010437,
0.12617403268814087,
0.4026210904121399,
0.2812720239162445,
0.27276813983917236,
-0.09175756573677063,
-0.059125013649463654,
-0.19140133261680603,
-0.000805938383564353,
0.0033788494765758514,
-0.17246964573860168,
-0.17902861535549164,
-0.008447565138339996,
0.025713780894875526,
-0.022419393062591553,
0.14632850885391235,
-0.17259687185287476,
-0.02033989317715168,
-0.012625372037291527,
0.06038055568933487,
-0.07830619066953659,
-0.10844911634922028,
-0.04587765038013458,
0.5428433418273926,
0.17471812665462494,
0.2683487832546234,
0.3154829740524292,
-0.039076656103134155,
0.023307055234909058,
0.5417567491531372,
-0.24278372526168823,
-0.22251403331756592,
0.11277636140584946,
-0.02760251611471176,
-0.08532903343439102,
0.21515676379203796,
-0.23479829728603363,
-0.041711293160915375,
0.10573040693998337,
0.03522484004497528,
-0.30954739451408386,
-0.28571248054504395,
0.18606288731098175,
0.311754047870636,
-0.04063519835472107,
-0.4116736650466919,
0.30239763855934143,
0.24737833440303802,
-0.13563531637191772,
0.28000694513320923,
-0.2344656139612198,
-0.3694334030151367,
0.15777729451656342,
-0.14955881237983704,
0.6636375784873962,
-0.0786997377872467,
0.15714186429977417,
-0.05205082148313522,
0.1835278570652008,
0.194663867354393,
0.14745475351810455,
0.2649952173233032,
-0.10447252541780472,
0.011988676153123379,
0.054190292954444885,
-0.2487533986568451,
-0.15913981199264526,
0.0749850869178772,
-0.3146076798439026,
0.2809503674507141,
-0.12367714941501617,
0.5698904395103455,
-0.006663542240858078,
-0.4552024006843567,
0.2900896370410919,
-0.26057711243629456,
-0.15752476453781128,
0.2971998453140259,
0.09734323620796204,
0.3726031184196472,
0.027376584708690643,
0.13371309638023376,
-0.3140106499195099,
-0.19547592103481293,
-0.05457358807325363,
0.036623723804950714,
-0.3555864095687866,
0.17640849947929382,
0.08296671509742737,
-0.14333072304725647,
-0.28577062487602234,
0.31725484132766724,
0.24782085418701172,
-0.12968559563159943,
-0.2597385346889496,
-0.05242069438099861,
0.3185185492038727,
0.42312222719192505,
-0.07715024054050446,
-0.2048157900571823,
0.09238090366125107,
0.13078230619430542,
-0.07348545640707016,
0.06940081715583801,
-0.07972990721464157,
-0.4370836615562439,
-0.29134082794189453,
0.30786100029945374,
0.0208338163793087,
-0.2143394500017166,
-0.024040861055254936,
0.0380597859621048,
0.1404801905155182,
-0.034371718764305115,
0.17638449370861053,
0.09266568720340729,
0.04637761414051056,
0.35221803188323975,
-0.30664414167404175,
-0.032921042293310165,
0.09630154073238373,
0.6910691857337952,
0.17683935165405273,
-0.10925396531820297,
0.38446906208992004,
0.06219295784831047,
-0.29082244634628296,
-0.1518290787935257,
-0.16822777688503265,
-0.23745359480381012,
-0.2049521803855896,
0.1135922223329544,
-0.3047887086868286,
0.05703809857368469,
0.1295434981584549,
0.08789204061031342,
-0.007159296423196793,
0.044557202607393265,
-0.09394565969705582,
-0.13129082322120667,
-0.38297006487846375,
-0.10608883202075958,
0.0017552077770233154,
0.052534036338329315,
0.19821465015411377,
-0.05025261268019676,
-0.09289451688528061,
0.1762564778327942,
-0.3340483605861664,
0.06188751012086868,
0.07732779532670975,
0.1574496477842331,
0.1283506602048874,
-0.13390392065048218,
0.2853277027606964,
-0.1930517852306366,
0.059411585330963135,
0.07281698286533356,
-0.41391220688819885,
-0.2782279849052429,
0.16704005002975464,
0.09416376054286957,
0.03299930691719055,
-0.12141726166009903,
-0.2470846176147461,
-0.222642719745636,
0.012962725944817066,
-0.5172250270843506,
0.056233566254377365,
0.3003097474575043,
-0.103316530585289,
-0.06199748069047928,
0.1269363909959793,
0.05898837372660637,
0.309878945350647,
0.190108984708786,
-0.11755165457725525,
-0.008697137236595154,
-0.22083783149719238,
0.2573595643043518,
0.047916993498802185,
0.1370416134595871,
-0.05627221614122391,
0.03996145725250244,
0.1067030131816864,
0.14733360707759857,
0.35385164618492126,
-0.34954744577407837,
-0.09590563923120499,
0.17948748171329498,
0.19771994650363922,
-0.06546185910701752,
-0.1790165901184082,
-0.09338332712650299,
-0.10487021505832672,
0.18333958089351654,
-0.09191024303436279,
-0.10308851301670074,
0.5036977529525757,
0.3170231282711029,
0.12332998216152191,
0.14068837463855743,
0.1180766224861145,
-0.2553684711456299,
0.18052323162555695,
0.22579717636108398,
0.5175104141235352,
-0.21569591760635376,
0.29682642221450806,
0.0140359066426754,
0.0883399099111557,
0.2030392736196518,
0.3545151352882385,
0.18068374693393707,
-0.08875780552625656,
0.3053056001663208,
0.13881558179855347,
0.2244511842727661,
0.2918464243412018,
0.0828302875161171,
-0.22979053854942322,
-0.33086904883384705,
0.08285072445869446,
0.03153356909751892,
-0.2458781599998474,
0.3778292238712311,
-0.103025883436203,
0.16485802829265594,
-0.2387319952249527,
-0.21164223551750183,
-0.2096371203660965,
0.18760009109973907,
-0.32543274760246277,
-0.18510694801807404,
0.25132760405540466,
0.014023713767528534,
0.2821989357471466,
-0.08856239169836044,
0.027309654280543327,
0.10227936506271362,
0.48712286353111267,
-0.08713477849960327,
0.15987864136695862,
-0.03885094076395035,
-0.41984984278678894,
-0.059173837304115295,
0.5264774560928345,
-0.23313237726688385,
0.3561898171901703,
-0.16943277418613434,
-0.05237748473882675,
-0.1272810995578766,
0.29462507367134094,
0.3648686110973358,
0.23364953696727753,
-0.05023340508341789,
0.2412073314189911,
0.18793201446533203,
-0.06433166563510895,
-0.2987421452999115,
0.40231016278266907,
-0.15406298637390137,
-0.42237043380737305,
0.1338624656200409,
0.11754409968852997,
-0.10458196699619293,
0.20911602675914764,
-0.06988078355789185,
0.30180835723876953,
-0.11350594460964203,
0.11945007741451263,
-0.39487141370773315,
-0.18191373348236084,
0.05045393109321594,
0.0856812596321106,
-0.09156163036823273,
-0.07973843067884445,
0.29386019706726074,
-0.10511621832847595,
0.28799116611480713,
-0.17609454691410065,
0.1067948043346405,
-0.1220279335975647,
0.2977887988090515,
0.18544822931289673,
0.043822553008794785,
-0.1389898657798767,
-0.032316066324710846,
-0.3474254012107849,
0.1619759500026703,
-0.31733623147010803,
0.15566326677799225,
-0.21746280789375305,
0.16787861287593842,
-0.11324774473905563,
-0.0024306252598762512,
0.28103870153427124,
-0.4437093138694763,
0.1354278177022934,
0.25279873609542847,
-0.22077935934066772,
-0.2300250381231308,
-0.21626092493534088,
0.06342749297618866,
0.22705277800559998,
-0.435083270072937,
0.34174615144729614,
-0.28040605783462524,
0.1463565230369568,
-0.16108892858028412,
0.04932772368192673,
0.05928517505526543,
0.20931504666805267,
0.4556954801082611,
0.3434942066669464,
0.11727644503116608,
0.22266408801078796,
0.04802923649549484,
-0.301628440618515,
-0.12587369978427887,
0.042611151933670044,
0.0033725351095199585,
-0.18866188824176788,
0.16462674736976624,
-0.5020896196365356,
-0.3603515326976776,
-0.2256869226694107,
0.011632457375526428,
0.2128080278635025,
-0.1014985591173172,
0.070227712392807,
-0.14753304421901703,
-0.13261181116104126,
-0.11002451926469803,
0.06859761476516724,
0.28125104308128357,
-0.2610151171684265,
0.33802109956741333,
-0.22172915935516357,
-0.21343271434307098,
0.44884660840034485,
-0.4780478775501251,
-0.34609663486480713,
-0.18685750663280487,
0.38116905093193054,
-0.13836818933486938,
-0.16568343341350555,
-0.36003193259239197,
-0.04661122336983681,
0.39328351616859436,
0.05717206373810768,
-0.19772067666053772,
0.24924910068511963,
-0.26450061798095703,
0.2071593552827835,
-0.03341618925333023,
0.2238563746213913,
0.09521385282278061,
0.0980488508939743,
0.21554166078567505,
-0.17455348372459412
] |
https://github.com/huggingface/datasets/issues/2322 | Calls to map are not cached. | Hi ! Currently a dataset that is in memory doesn't know doesn't know in which directory it has to read/write cache files.
On the other hand, a dataset that loaded from the disk (via memory mapping) uses the directory from which the dataset is located to read/write cache files.
Because of that, currently in-memory datasets simply don't use caching.
Maybe a Dataset object could have a `cache_dir` that is set to the directory where the arrow files are created during `load_dataset` ? | ## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
| 82 | Calls to map are not cached.
## Describe the bug
Somehow caching does not work for me anymore. Am I doing something wrong, or is there anything that I missed?
## Steps to reproduce the bug
```python
import datasets
datasets.set_caching_enabled(True)
sst = datasets.load_dataset("sst")
def foo(samples, i):
print("executed", i[:10])
return samples
# first call
x = sst.map(foo, batched=True, with_indices=True, num_proc=2)
print('\n'*3, "#" * 30, '\n'*3)
# second call
y = sst.map(foo, batched=True, with_indices=True, num_proc=2)
# print version
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
## Actual results
This code prints the following output for me:
```bash
No config specified, defaulting to: sst/default
Reusing dataset sst (/home/johannes/.cache/huggingface/datasets/sst/default/1.0.0/b8a7889ef01c5d3ae8c379b84cc4080f8aad3ac2bc538701cbe0ac6416fb76ff)
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 59.85ba/s]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 60.85ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 69.32ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 70.93ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 63.25ba/s]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 57.69ba/s]
##############################
#0: 0%| | 0/5 [00:00<?, ?ba/s]
#1: 0%| | 0/5 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281]
executed [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]
executed [6272, 6273, 6274, 6275, 6276, 6277, 6278, 6279, 6280, 6281]
executed [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009]
executed [4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009]
#0: 100%|ββββββββββ| 5/5 [00:00<00:00, 58.10ba/s]
executed [7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281]
executed [8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281]
#1: 100%|ββββββββββ| 5/5 [00:00<00:00, 57.19ba/s]
#0: 0%| | 0/1 [00:00<?, ?ba/s]
#1: 0%| | 0/1 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
#0: 100%|ββββββββββ| 1/1 [00:00<00:00, 60.10ba/s]
executed [551, 552, 553, 554, 555, 556, 557, 558, 559, 560]
#1: 100%|ββββββββββ| 1/1 [00:00<00:00, 53.82ba/s]
#0: 0%| | 0/2 [00:00<?, ?ba/s]
#1: 0%| | 0/2 [00:00<?, ?ba/s]
executed [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
executed [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]
executed [1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114]
#0: 100%|ββββββββββ| 2/2 [00:00<00:00, 72.76ba/s]
executed [2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114]
#1: 100%|ββββββββββ| 2/2 [00:00<00:00, 71.55ba/s]
- Datasets: 1.6.1
- Python: 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0]
- Platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.10
```
## Expected results
Caching should work.
Hi ! Currently a dataset that is in memory doesn't know doesn't know in which directory it has to read/write cache files.
On the other hand, a dataset that loaded from the disk (via memory mapping) uses the directory from which the dataset is located to read/write cache files.
Because of that, currently in-memory datasets simply don't use caching.
Maybe a Dataset object could have a `cache_dir` that is set to the directory where the arrow files are created during `load_dataset` ? | [
-0.16529837250709534,
-0.3959714472293854,
-0.00884755328297615,
0.1456606239080429,
0.20624372363090515,
-0.10191776603460312,
0.30026790499687195,
0.12512890994548798,
0.3953084349632263,
0.020620591938495636,
-0.0369783416390419,
0.242855042219162,
0.16997182369232178,
-0.28493571281433105,
0.18808673322200775,
0.25960469245910645,
0.2713773250579834,
-0.03853346407413483,
-0.2219652533531189,
-0.17453426122665405,
-0.19188204407691956,
0.17236347496509552,
-0.3064853549003601,
-0.2573416233062744,
-0.2379021793603897,
0.11174200475215912,
-0.2603813111782074,
-0.12303150445222855,
0.4237755239009857,
-0.3212161958217621,
0.37847599387168884,
-0.05806620791554451,
0.014867329970002174,
0.6959592700004578,
-0.00011318777251290157,
-0.16052795946598053,
0.1358753740787506,
-0.1383192390203476,
-0.0015481328591704369,
0.21333149075508118,
-0.3389546275138855,
-0.31001603603363037,
-0.004519164562225342,
-0.2349565029144287,
-0.3307378590106964,
0.015123306773602962,
-0.0239326823502779,
-0.8197701573371887,
0.37284529209136963,
0.2541065216064453,
0.29510653018951416,
0.17261354625225067,
-0.019022371619939804,
0.07428581267595291,
0.08660299330949783,
-0.08379076421260834,
-0.27259498834609985,
-0.0186920166015625,
0.2995278239250183,
-0.19743919372558594,
-0.028207354247570038,
0.35948067903518677,
-0.13195188343524933,
0.07357290387153625,
0.3317606449127197,
0.32650190591812134,
0.21803900599479675,
-0.11859187483787537,
0.2567962110042572,
-0.22583869099617004,
0.3444477319717407,
-0.25056082010269165,
-0.34029722213745117,
-0.25219765305519104,
-0.4512901306152344,
-0.09359724819660187,
0.23053455352783203,
-0.18163523077964783,
-0.017511287704110146,
0.0523240901529789,
-0.3951413035392761,
0.14610987901687622,
0.27687376737594604,
0.023934178054332733,
0.03914815932512283,
0.25855886936187744,
-0.08576347678899765,
0.10614363849163055,
0.044075705111026764,
-0.15750786662101746,
0.018533162772655487,
-0.24768781661987305,
-0.023325730115175247,
0.38760077953338623,
-0.4578024744987488,
0.13098184764385223,
0.4648629128932953,
0.14319738745689392,
-0.11104454845190048,
-0.01294504851102829,
0.11935635656118393,
-0.006080877035856247,
0.18636205792427063,
0.0010308995842933655,
0.06157812848687172,
0.48902633786201477,
-0.010356210172176361,
0.3551562428474426,
-0.03754395246505737,
-0.07195495814085007,
-0.32302212715148926,
-0.13232794404029846,
0.26592856645584106,
-0.10086946934461594,
0.5175330638885498,
0.1616138517856598,
0.20059169828891754,
-0.13027755916118622,
0.18968333303928375,
-0.0005330601707100868,
-0.16335979104042053,
-0.1748705357313156,
0.16171760857105255,
0.34699440002441406,
0.08699977397918701,
-0.036532849073410034,
-0.07700525224208832,
-0.10873974859714508,
-0.22075380384922028,
-0.07633795589208603,
-0.3961368799209595,
-0.24385766685009003,
-0.3070540130138397,
0.14955861866474152,
0.19743825495243073,
-0.0326642245054245,
0.13559658825397491,
0.027335185557603836,
-0.10057377815246582,
-0.33551648259162903,
0.054623305797576904,
-0.18763485550880432,
0.6559557318687439,
0.15888020396232605,
-0.2145816534757614,
0.25336185097694397,
0.3517920970916748,
0.17983780801296234,
-0.3027566075325012,
0.28129979968070984,
-0.4556756615638733,
-0.08744300901889801,
0.4142133295536041,
0.1292608231306076,
-0.09991008043289185,
-0.07480070739984512,
-0.15049785375595093,
0.12536627054214478,
0.7231866121292114,
-0.15730221569538116,
0.26680245995521545,
-0.21290215849876404,
-0.4821091592311859,
-0.3187292814254761,
0.34948092699050903,
0.495372474193573,
-0.12810295820236206,
-0.14054052531719208,
0.10628524422645569,
0.3853791654109955,
0.36833739280700684,
0.2536807060241699,
-0.2394358068704605,
0.11122338473796844,
-0.2686230540275574,
0.18866266310214996,
0.2342701256275177,
-0.38494303822517395,
-0.679406464099884,
-0.025037892162799835,
-0.08278041332960129,
0.1595265120267868,
0.030716434121131897,
-0.034351978451013565,
0.30047979950904846,
-0.18704602122306824,
0.1719587743282318,
-0.05722451210021973,
-0.0018518995493650436,
0.3272251784801483,
-0.32061439752578735,
-0.10737400501966476,
0.09274758398532867,
-0.11547094583511353,
-0.0071225352585315704,
0.11172369867563248,
-0.030756257474422455,
-0.17187930643558502,
0.02209487557411194,
-0.08480128645896912,
0.0942297875881195,
0.2804446816444397,
0.18360388278961182,
0.07434505224227905,
0.1448790282011032,
0.02203955501317978,
-0.3660163879394531,
0.3349870443344116,
0.05314331501722336,
-0.36038798093795776,
0.060070447623729706,
-0.1577843427658081,
0.02083834633231163,
0.010106978937983513,
-0.09559975564479828,
-0.336312860250473,
0.10418882966041565,
0.37966448068618774,
0.4487678110599518,
-0.03692419454455376,
-0.025282230228185654,
0.17484711110591888,
0.4177247881889343,
-0.13553667068481445,
-0.18359927833080292,
-0.0341758131980896,
-0.013768425211310387,
-0.37605035305023193,
-0.24279265105724335,
0.08944112807512283,
0.27498504519462585,
-0.09275075793266296,
-0.24926406145095825,
0.28871291875839233,
0.07521793246269226,
0.27193379402160645,
-0.23038721084594727,
0.046538785099983215,
-0.14502932131290436,
0.05450085178017616,
0.11245480179786682,
0.2869504988193512,
0.09865198284387589,
-0.1674385666847229,
-0.0972822830080986,
0.14503610134124756,
0.1808006465435028,
0.21960677206516266,
-0.14668142795562744,
-0.21147426962852478,
-0.015951555222272873,
-0.0938483327627182,
0.0052855126559734344,
-0.11328441649675369,
0.1361347883939743,
-0.3531872034072876,
0.2921640872955322,
0.11155150830745697,
0.056829363107681274,
0.5075976848602295,
0.6477876901626587,
0.2599565088748932,
0.025358818471431732,
-0.16377651691436768,
-0.19480910897254944,
-0.18789339065551758,
0.2220141589641571,
0.06816485524177551,
0.34806424379348755,
0.1523018479347229,
0.26746776700019836,
-0.18972082436084747,
0.1817849725484848,
-0.1461721807718277,
0.17672421038150787,
-0.060124471783638,
-0.20661239326000214,
-0.0782414898276329,
0.4010898470878601,
-0.08567967265844345,
-0.11263492703437805,
0.28678399324417114,
0.055450402200222015,
0.014027472585439682,
-0.2849523723125458,
0.2493806630373001,
-0.22816883027553558,
-0.01992116868495941,
-0.015333320014178753,
-0.01188597735017538,
0.03603525459766388,
-0.2648231089115143,
-0.1972465068101883,
0.2164185494184494,
0.10731203854084015,
0.27961260080337524,
-0.22933413088321686,
0.08657069504261017,
0.14390680193901062,
-0.3094998002052307,
-0.20707955956459045,
-0.16222918033599854,
-0.2965812385082245,
-0.021249879151582718,
-0.0704679861664772,
-0.4137973189353943,
0.30883318185806274,
-0.10256537795066833,
-0.02443605661392212,
-0.1753554344177246,
-0.07709550112485886,
-0.10917381942272186,
-0.0907442569732666,
-0.1531943827867508,
-0.19489207863807678,
-0.024498917162418365,
-0.32437390089035034,
0.10803361237049103,
0.417331337928772,
-0.4949835538864136,
-0.10764862596988678,
-0.07875607907772064,
0.18748998641967773,
-0.043140705674886703,
-0.2904835343360901,
-0.0876898542046547,
-0.014073403552174568,
-0.1836276352405548,
0.1808851957321167,
-0.0643400177359581,
0.03903685137629509,
0.12682929635047913,
-0.05661935359239578,
0.023613151162862778,
-0.13719958066940308,
-0.12450887262821198,
-0.5041558742523193,
-0.290399432182312,
0.37633100152015686,
-0.0780995711684227,
-0.2742150127887726,
0.05922291800379753,
0.14517103135585785,
0.0341392457485199,
0.16567935049533844,
-0.5678582787513733,
-0.19537778198719025,
-0.2156902253627777,
0.3442632853984833,
0.033340007066726685,
0.18075358867645264,
0.550180196762085,
-0.07305239886045456,
-0.07682131230831146,
-0.2849735617637634,
-0.3120509088039398,
0.054858721792697906,
0.13226664066314697,
0.22666195034980774,
0.17392265796661377,
0.32409727573394775,
0.02041858807206154,
0.7732433676719666,
0.39368218183517456,
-0.0856744647026062,
0.290810227394104,
0.059786565601825714,
0.18085932731628418,
-0.3642297089099884,
-0.34031617641448975,
0.03500954806804657,
-0.18277433514595032,
-0.12850430607795715,
0.27055689692497253,
0.30328547954559326,
-0.022231316193938255,
-0.10943955183029175,
0.22120100259780884,
-0.19860109686851501,
-0.3431124687194824,
-0.03039676882326603,
-0.24290287494659424,
0.29050666093826294,
0.11858689785003662,
0.29512208700180054,
-0.5850369334220886,
-0.2202436923980713,
-0.00608494458720088,
-0.24780713021755219,
0.4443364441394806,
0.015835896134376526,
-0.27918174862861633,
0.07558020949363708,
-0.6623138189315796,
0.29934051632881165,
0.07127096503973007,
0.19142571091651917,
-0.23367485404014587,
-0.11590979993343353,
0.07142411172389984,
-0.026877734810113907,
0.6149193644523621,
-0.09803012758493423,
0.21528075635433197,
0.20692461729049683,
-0.07180124521255493,
-0.2621385157108307,
-0.13355371356010437,
0.12617403268814087,
0.4026210904121399,
0.2812720239162445,
0.27276813983917236,
-0.09175756573677063,
-0.059125013649463654,
-0.19140133261680603,
-0.000805938383564353,
0.0033788494765758514,
-0.17246964573860168,
-0.17902861535549164,
-0.008447565138339996,
0.025713780894875526,
-0.022419393062591553,
0.14632850885391235,
-0.17259687185287476,
-0.02033989317715168,
-0.012625372037291527,
0.06038055568933487,
-0.07830619066953659,
-0.10844911634922028,
-0.04587765038013458,
0.5428433418273926,
0.17471812665462494,
0.2683487832546234,
0.3154829740524292,
-0.039076656103134155,
0.023307055234909058,
0.5417567491531372,
-0.24278372526168823,
-0.22251403331756592,
0.11277636140584946,
-0.02760251611471176,
-0.08532903343439102,
0.21515676379203796,
-0.23479829728603363,
-0.041711293160915375,
0.10573040693998337,
0.03522484004497528,
-0.30954739451408386,
-0.28571248054504395,
0.18606288731098175,
0.311754047870636,
-0.04063519835472107,
-0.4116736650466919,
0.30239763855934143,
0.24737833440303802,
-0.13563531637191772,
0.28000694513320923,
-0.2344656139612198,
-0.3694334030151367,
0.15777729451656342,
-0.14955881237983704,
0.6636375784873962,
-0.0786997377872467,
0.15714186429977417,
-0.05205082148313522,
0.1835278570652008,
0.194663867354393,
0.14745475351810455,
0.2649952173233032,
-0.10447252541780472,
0.011988676153123379,
0.054190292954444885,
-0.2487533986568451,
-0.15913981199264526,
0.0749850869178772,
-0.3146076798439026,
0.2809503674507141,
-0.12367714941501617,
0.5698904395103455,
-0.006663542240858078,
-0.4552024006843567,
0.2900896370410919,
-0.26057711243629456,
-0.15752476453781128,
0.2971998453140259,
0.09734323620796204,
0.3726031184196472,
0.027376584708690643,
0.13371309638023376,
-0.3140106499195099,
-0.19547592103481293,
-0.05457358807325363,
0.036623723804950714,
-0.3555864095687866,
0.17640849947929382,
0.08296671509742737,
-0.14333072304725647,
-0.28577062487602234,
0.31725484132766724,
0.24782085418701172,
-0.12968559563159943,
-0.2597385346889496,
-0.05242069438099861,
0.3185185492038727,
0.42312222719192505,
-0.07715024054050446,
-0.2048157900571823,
0.09238090366125107,
0.13078230619430542,
-0.07348545640707016,
0.06940081715583801,
-0.07972990721464157,
-0.4370836615562439,
-0.29134082794189453,
0.30786100029945374,
0.0208338163793087,
-0.2143394500017166,
-0.024040861055254936,
0.0380597859621048,
0.1404801905155182,
-0.034371718764305115,
0.17638449370861053,
0.09266568720340729,
0.04637761414051056,
0.35221803188323975,
-0.30664414167404175,
-0.032921042293310165,
0.09630154073238373,
0.6910691857337952,
0.17683935165405273,
-0.10925396531820297,
0.38446906208992004,
0.06219295784831047,
-0.29082244634628296,
-0.1518290787935257,
-0.16822777688503265,
-0.23745359480381012,
-0.2049521803855896,
0.1135922223329544,
-0.3047887086868286,
0.05703809857368469,
0.1295434981584549,
0.08789204061031342,
-0.007159296423196793,
0.044557202607393265,
-0.09394565969705582,
-0.13129082322120667,
-0.38297006487846375,
-0.10608883202075958,
0.0017552077770233154,
0.052534036338329315,
0.19821465015411377,
-0.05025261268019676,
-0.09289451688528061,
0.1762564778327942,
-0.3340483605861664,
0.06188751012086868,
0.07732779532670975,
0.1574496477842331,
0.1283506602048874,
-0.13390392065048218,
0.2853277027606964,
-0.1930517852306366,
0.059411585330963135,
0.07281698286533356,
-0.41391220688819885,
-0.2782279849052429,
0.16704005002975464,
0.09416376054286957,
0.03299930691719055,
-0.12141726166009903,
-0.2470846176147461,
-0.222642719745636,
0.012962725944817066,
-0.5172250270843506,
0.056233566254377365,
0.3003097474575043,
-0.103316530585289,
-0.06199748069047928,
0.1269363909959793,
0.05898837372660637,
0.309878945350647,
0.190108984708786,
-0.11755165457725525,
-0.008697137236595154,
-0.22083783149719238,
0.2573595643043518,
0.047916993498802185,
0.1370416134595871,
-0.05627221614122391,
0.03996145725250244,
0.1067030131816864,
0.14733360707759857,
0.35385164618492126,
-0.34954744577407837,
-0.09590563923120499,
0.17948748171329498,
0.19771994650363922,
-0.06546185910701752,
-0.1790165901184082,
-0.09338332712650299,
-0.10487021505832672,
0.18333958089351654,
-0.09191024303436279,
-0.10308851301670074,
0.5036977529525757,
0.3170231282711029,
0.12332998216152191,
0.14068837463855743,
0.1180766224861145,
-0.2553684711456299,
0.18052323162555695,
0.22579717636108398,
0.5175104141235352,
-0.21569591760635376,
0.29682642221450806,
0.0140359066426754,
0.0883399099111557,
0.2030392736196518,
0.3545151352882385,
0.18068374693393707,
-0.08875780552625656,
0.3053056001663208,
0.13881558179855347,
0.2244511842727661,
0.2918464243412018,
0.0828302875161171,
-0.22979053854942322,
-0.33086904883384705,
0.08285072445869446,
0.03153356909751892,
-0.2458781599998474,
0.3778292238712311,
-0.103025883436203,
0.16485802829265594,
-0.2387319952249527,
-0.21164223551750183,
-0.2096371203660965,
0.18760009109973907,
-0.32543274760246277,
-0.18510694801807404,
0.25132760405540466,
0.014023713767528534,
0.2821989357471466,
-0.08856239169836044,
0.027309654280543327,
0.10227936506271362,
0.48712286353111267,
-0.08713477849960327,
0.15987864136695862,
-0.03885094076395035,
-0.41984984278678894,
-0.059173837304115295,
0.5264774560928345,
-0.23313237726688385,
0.3561898171901703,
-0.16943277418613434,
-0.05237748473882675,
-0.1272810995578766,
0.29462507367134094,
0.3648686110973358,
0.23364953696727753,
-0.05023340508341789,
0.2412073314189911,
0.18793201446533203,
-0.06433166563510895,
-0.2987421452999115,
0.40231016278266907,
-0.15406298637390137,
-0.42237043380737305,
0.1338624656200409,
0.11754409968852997,
-0.10458196699619293,
0.20911602675914764,
-0.06988078355789185,
0.30180835723876953,
-0.11350594460964203,
0.11945007741451263,
-0.39487141370773315,
-0.18191373348236084,
0.05045393109321594,
0.0856812596321106,
-0.09156163036823273,
-0.07973843067884445,
0.29386019706726074,
-0.10511621832847595,
0.28799116611480713,
-0.17609454691410065,
0.1067948043346405,
-0.1220279335975647,
0.2977887988090515,
0.18544822931289673,
0.043822553008794785,
-0.1389898657798767,
-0.032316066324710846,
-0.3474254012107849,
0.1619759500026703,
-0.31733623147010803,
0.15566326677799225,
-0.21746280789375305,
0.16787861287593842,
-0.11324774473905563,
-0.0024306252598762512,
0.28103870153427124,
-0.4437093138694763,
0.1354278177022934,
0.25279873609542847,
-0.22077935934066772,
-0.2300250381231308,
-0.21626092493534088,
0.06342749297618866,
0.22705277800559998,
-0.435083270072937,
0.34174615144729614,
-0.28040605783462524,
0.1463565230369568,
-0.16108892858028412,
0.04932772368192673,
0.05928517505526543,
0.20931504666805267,
0.4556954801082611,
0.3434942066669464,
0.11727644503116608,
0.22266408801078796,
0.04802923649549484,
-0.301628440618515,
-0.12587369978427887,
0.042611151933670044,
0.0033725351095199585,
-0.18866188824176788,
0.16462674736976624,
-0.5020896196365356,
-0.3603515326976776,
-0.2256869226694107,
0.011632457375526428,
0.2128080278635025,
-0.1014985591173172,
0.070227712392807,
-0.14753304421901703,
-0.13261181116104126,
-0.11002451926469803,
0.06859761476516724,
0.28125104308128357,
-0.2610151171684265,
0.33802109956741333,
-0.22172915935516357,
-0.21343271434307098,
0.44884660840034485,
-0.4780478775501251,
-0.34609663486480713,
-0.18685750663280487,
0.38116905093193054,
-0.13836818933486938,
-0.16568343341350555,
-0.36003193259239197,
-0.04661122336983681,
0.39328351616859436,
0.05717206373810768,
-0.19772067666053772,
0.24924910068511963,
-0.26450061798095703,
0.2071593552827835,
-0.03341618925333023,
0.2238563746213913,
0.09521385282278061,
0.0980488508939743,
0.21554166078567505,
-0.17455348372459412
] |
https://github.com/huggingface/datasets/issues/2319 | UnicodeDecodeError for OSCAR (Afrikaans) | Thanks for reporting, @sgraaf.
I am going to have a look at it.
I guess the expected codec is "UTF-8". Normally, when no explicitly codec is passed, Python uses one which is platform-dependent. For Linux machines, the default codec is `utf_8`, which is OK. However for Windows machine, the default codec is `cp1252`, which causes the problem. | ## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0 | 57 | UnicodeDecodeError for OSCAR (Afrikaans)
## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0
Thanks for reporting, @sgraaf.
I am going to have a look at it.
I guess the expected codec is "UTF-8". Normally, when no explicitly codec is passed, Python uses one which is platform-dependent. For Linux machines, the default codec is `utf_8`, which is OK. However for Windows machine, the default codec is `cp1252`, which causes the problem. | [
-0.06944172829389572,
-0.06897546350955963,
-0.06865930557250977,
0.5462197661399841,
0.4998696446418762,
0.023580342531204224,
0.1604425460100174,
0.16006425023078918,
-0.25320765376091003,
0.26161646842956543,
0.10814131051301956,
0.07456547766923904,
-0.13298732042312622,
-0.16212663054466248,
0.06945578753948212,
-0.2411268949508667,
0.02387339621782303,
-0.00958869606256485,
0.14905887842178345,
-0.11387266963720322,
-0.30421891808509827,
0.3047536611557007,
-0.146704763174057,
0.14652559161186218,
-0.33820128440856934,
0.11707326024770737,
0.004726605489850044,
0.25750187039375305,
-0.14145870506763458,
-0.3523656129837036,
0.12809260189533234,
0.01631780155003071,
0.10694015771150589,
0.27422985434532166,
-0.00011850488954223692,
-0.054729439318180084,
0.4611510634422302,
-0.13152538239955902,
-0.3736705780029297,
0.04705239087343216,
-0.23162972927093506,
0.1640682965517044,
-0.10746549814939499,
-0.06719650328159332,
0.17756539583206177,
-0.28914037346839905,
-0.06511896848678589,
-0.5603586435317993,
0.018415652215480804,
0.3229224681854248,
0.17362414300441742,
0.11859716475009918,
0.18503794074058533,
0.05753215029835701,
-0.1859927475452423,
-0.10706549882888794,
-0.014230148866772652,
0.09946309030056,
0.24106714129447937,
0.16162975132465363,
-0.0901435986161232,
0.14632676541805267,
0.11504241824150085,
0.0891946405172348,
0.12996447086334229,
0.07787448912858963,
-0.18047747015953064,
-0.2484128475189209,
0.3013778030872345,
0.1579844057559967,
0.34605342149734497,
-0.4334866404533386,
-0.3860439360141754,
-0.3108896315097809,
0.19618630409240723,
-0.519354522228241,
0.540989875793457,
-0.0237488504499197,
-0.11590279638767242,
0.23562580347061157,
-0.0887802317738533,
0.07848446071147919,
-0.17907220125198364,
0.25311458110809326,
-0.20605166256427765,
0.04776732623577118,
-0.24399766325950623,
-0.006676100194454193,
-0.15676315128803253,
-0.10920776426792145,
0.07565756142139435,
-0.37066173553466797,
-0.05595632269978523,
0.3437897264957428,
-0.17979352176189423,
0.1441422998905182,
-0.06412404030561447,
0.16092835366725922,
0.28962165117263794,
0.20380181074142456,
0.1995999813079834,
-0.005847528576850891,
-0.3779219388961792,
-0.04368358105421066,
0.14448174834251404,
0.3555549383163452,
-0.057290978729724884,
-0.03326990455389023,
0.2502480745315552,
0.38962844014167786,
0.07518450915813446,
-0.0033729560673236847,
-0.13191470503807068,
-0.20461653172969818,
0.23168553411960602,
0.021027257665991783,
0.5934256911277771,
-0.2065749168395996,
-0.27364829182624817,
0.29630792140960693,
-0.10857124626636505,
-0.13338473439216614,
-0.1332821100950241,
0.10012096911668777,
-0.18075209856033325,
0.2083040475845337,
-0.14118455350399017,
0.26350846886634827,
-0.09206143021583557,
-0.3318833112716675,
-0.16413474082946777,
-0.22449925541877747,
-0.09474565088748932,
0.10428812354803085,
0.009269244968891144,
0.0026703383773565292,
0.186960831284523,
0.043253093957901,
0.30228352546691895,
-0.08851230889558792,
-0.07254622876644135,
-0.17053167521953583,
-0.01380351185798645,
0.010112687945365906,
0.05442138388752937,
0.24409271776676178,
0.044139184057712555,
-0.4594569206237793,
0.036398135125637054,
0.09502233564853668,
-0.03681228309869766,
-0.2857242822647095,
-0.1908058077096939,
0.14873887598514557,
-0.19620062410831451,
-0.05188123136758804,
-0.2405538260936737,
0.2764449715614319,
0.18005740642547607,
0.05411296710371971,
0.2551354169845581,
-0.016827095299959183,
-0.08344174921512604,
-0.13904431462287903,
0.2472234070301056,
0.5666906237602234,
-0.3448714017868042,
-0.048791736364364624,
-0.12401003390550613,
-0.20664602518081665,
0.3429836630821228,
0.22637182474136353,
0.05297072231769562,
-0.022064171731472015,
-0.36494630575180054,
0.11180958151817322,
0.12375114858150482,
-0.24636588990688324,
-0.5438914895057678,
0.1850884109735489,
-0.0684070885181427,
0.5069643259048462,
0.1817362904548645,
-0.15870296955108643,
0.24529317021369934,
-0.010692521929740906,
0.2900950014591217,
0.4672318696975708,
-0.25063416361808777,
-0.011269373819231987,
-0.2532825469970703,
-0.2451150119304657,
0.031422197818756104,
0.21761532127857208,
0.0890725702047348,
0.00023596733808517456,
0.13734674453735352,
0.2070341408252716,
0.3857540786266327,
-0.10422897338867188,
0.19445429742336273,
0.12475751340389252,
0.011800531297922134,
0.35765546560287476,
0.06796369701623917,
-0.22940745949745178,
-0.2820863723754883,
0.26406940817832947,
-0.002491859719157219,
0.11335789412260056,
-0.5008911490440369,
-0.1440783143043518,
-0.3841666877269745,
-0.13324876129627228,
-0.4603826105594635,
-0.407979816198349,
0.09587737917900085,
0.27841418981552124,
0.1699371635913849,
0.5170188546180725,
-0.35516035556793213,
0.5020518898963928,
-0.04257431626319885,
-0.0007122305687516928,
-0.5245199203491211,
0.2013833373785019,
0.12137286365032196,
-0.2475561499595642,
-0.13676461577415466,
0.26052340865135193,
-0.04194388538599014,
-0.0601239912211895,
-0.3732908368110657,
0.40056756138801575,
-0.07182801514863968,
0.2017916440963745,
0.029642824083566666,
-0.030606359243392944,
0.35686126351356506,
-0.27305659651756287,
-0.02639893628656864,
0.27862754464149475,
0.2903376817703247,
-0.04511773958802223,
0.16480985283851624,
0.22450192272663116,
0.07797164469957352,
0.14245997369289398,
0.06972191482782364,
-0.025678299367427826,
0.28910836577415466,
0.19158653914928436,
-0.00979168713092804,
-0.2168208658695221,
0.22168272733688354,
-0.2710437476634979,
0.5030978918075562,
0.03324296325445175,
-0.23356018960475922,
-0.026673905551433563,
0.6612028479576111,
-0.13731157779693604,
0.12679548561573029,
0.2621348202228546,
-0.18957138061523438,
0.1265210211277008,
-0.11438141763210297,
0.19966544210910797,
0.3831334710121155,
-0.002864708425477147,
-0.05375285819172859,
0.15426425635814667,
0.23308974504470825,
-0.1416674554347992,
0.16464267671108246,
-0.06298543512821198,
0.2722620964050293,
0.1404123306274414,
-0.10233047604560852,
0.09548458456993103,
-0.4391809105873108,
-0.25980713963508606,
-0.15118514001369476,
0.2690093219280243,
-0.30306553840637207,
0.06400343030691147,
-0.379664808511734,
-0.020693622529506683,
-0.1904434710741043,
0.015479439869523048,
-0.38862720131874084,
-0.18190525472164154,
-0.1342802792787552,
-0.021670129150152206,
0.031060274690389633,
0.11422697454690933,
-0.3544110059738159,
-0.007676571607589722,
0.04881128668785095,
-0.11996906250715256,
-0.20933635532855988,
-0.10156673938035965,
-0.3103097379207611,
0.04389733448624611,
0.3231024742126465,
-0.09265676140785217,
0.24626308679580688,
-0.27653563022613525,
-0.04185318201780319,
-0.10760433971881866,
-0.2213813066482544,
0.08392766863107681,
-0.048872798681259155,
0.04207119718194008,
0.00488126277923584,
-0.103753462433815,
-0.12384411692619324,
-0.21912068128585815,
0.24202701449394226,
-0.04461074247956276,
-0.2791254222393036,
-0.03226877748966217,
0.2220715433359146,
0.02873954549431801,
0.086641326546669,
-0.13613662123680115,
-0.28332969546318054,
-0.21096090972423553,
0.19484791159629822,
-0.07007919251918793,
0.006547074764966965,
-0.004164787940680981,
-0.13051368296146393,
0.2061852663755417,
0.059083301573991776,
0.037608131766319275,
-0.31746935844421387,
-0.15778106451034546,
0.40856048464775085,
-0.3109961152076721,
-0.35123729705810547,
-0.13553670048713684,
-0.08305488526821136,
-0.018494363874197006,
-0.05403963476419449,
-0.2928425371646881,
-0.09805212914943695,
-0.5101267099380493,
0.06375055015087128,
-0.12376046180725098,
-0.045739904046058655,
0.11907081305980682,
-0.15750694274902344,
0.05766807496547699,
-0.10939377546310425,
-0.10194788873195648,
-0.09936404973268509,
-0.23059165477752686,
0.2241043746471405,
0.062203969806432724,
0.4960552752017975,
0.012193333357572556,
0.2126581370830536,
0.3057521879673004,
0.21232159435749054,
0.526016891002655,
-0.07993292063474655,
0.18498598039150238,
-0.12880590558052063,
-0.18843187391757965,
0.2252400815486908,
-0.08422371745109558,
0.012758538126945496,
0.27013257145881653,
0.023423220962285995,
0.05158563703298569,
0.005242191255092621,
-0.049201708287000656,
-0.40674611926078796,
-0.26552340388298035,
0.022582169622182846,
-0.29998376965522766,
-0.031215772032737732,
0.030282173305749893,
-0.04318122938275337,
-0.04291500896215439,
-0.004857043735682964,
0.05553583428263664,
0.22755387425422668,
0.11703915894031525,
0.03953350707888603,
-0.013805273920297623,
0.4634622633457184,
-0.4846140146255493,
0.19047871232032776,
0.21646380424499512,
0.36882054805755615,
-0.1864621341228485,
0.10615629702806473,
0.16009162366390228,
-0.015238264575600624,
0.5245286226272583,
-0.2009752243757248,
0.045064933598041534,
-0.02423483319580555,
0.02157089114189148,
-0.15247201919555664,
0.0056638941168785095,
-0.19116434454917908,
0.08408649265766144,
0.07510311901569366,
-0.057334721088409424,
-0.32241010665893555,
0.12995921075344086,
0.2902526557445526,
0.12797698378562927,
-0.24663670361042023,
-0.058484192937612534,
-0.27679237723350525,
-0.648855447769165,
-0.4599289000034332,
0.0440940260887146,
0.17758342623710632,
0.6439505219459534,
0.03802268207073212,
0.03688151016831398,
-0.37108778953552246,
-0.11936511099338531,
0.21809282898902893,
0.22188541293144226,
0.20451638102531433,
0.05226337909698486,
0.1377336084842682,
-0.030910983681678772,
-0.1569291651248932,
0.13118280470371246,
0.7023575901985168,
0.15659956634044647,
-0.8256707191467285,
0.012018552049994469,
-0.3925682306289673,
0.2404542863368988,
0.303862988948822,
-0.3360862731933594,
-0.08394337445497513,
-0.08980704843997955,
0.04543435573577881,
-0.22870157659053802,
-0.047865450382232666,
0.3065973222255707,
0.16279427707195282,
-0.38908132910728455,
-0.35522323846817017,
0.30053409934043884,
0.1599295288324356,
0.11477437615394592,
0.32212644815444946,
0.6737332940101624,
-0.3928651213645935,
0.35987746715545654,
-0.14682182669639587,
0.8503286242485046,
-0.06608505547046661,
0.08335553854703903,
0.2286054491996765,
-0.11413370072841644,
0.13198095560073853,
0.07750898599624634,
-0.03396962955594063,
-0.26988929510116577,
-0.5620769262313843,
-0.057210326194763184,
0.09152127802371979,
0.3920045495033264,
0.1631709188222885,
0.09722748398780823,
0.20714713633060455,
0.007596589624881744,
-0.07478941977024078,
0.2738659977912903,
-0.0034670792520046234,
-0.6421937346458435,
-0.2249641865491867,
-0.7355557680130005,
0.09701786935329437,
-0.02247772365808487,
0.315126895904541,
-0.07143115997314453,
-0.14029350876808167,
-0.158140167593956,
-0.33514654636383057,
-0.38560205698013306,
-0.01543643232434988,
-0.3776571452617645,
-0.09709979593753815,
-0.1545858085155487,
-0.11171356588602066,
0.14733390510082245,
0.4229132831096649,
0.6014977097511292,
-0.06523017585277557,
0.09858419001102448,
0.19836950302124023,
0.002657279372215271,
0.044200871139764786,
0.08972201496362686,
-0.05281655117869377,
0.2270965427160263,
-0.1585267335176468,
-0.255014032125473,
0.11959537863731384,
0.10111857950687408,
-0.19822129607200623,
0.05999979376792908,
-0.00944741815328598,
-0.042921923100948334,
0.0028318744152784348,
-0.28403690457344055,
-0.3613978922367096,
0.08978153765201569,
-0.11924205720424652,
0.09485730528831482,
0.12467965483665466,
-0.19934050738811493,
-0.08947566896677017,
-0.0859319269657135,
-0.28907355666160583,
-0.11811597645282745,
0.30488321185112,
-0.021716512739658356,
-0.2639845311641693,
0.502818763256073,
0.11842980980873108,
-0.07168911397457123,
0.005620390176773071,
0.13342389464378357,
0.383113294839859,
-0.7260903120040894,
0.10977346450090408,
-0.12731021642684937,
0.1592685431241989,
-0.4053399860858917,
-0.07232603430747986,
0.15956681966781616,
-0.018026918172836304,
0.089445099234581,
-0.44881221652030945,
-0.4160526990890503,
0.07441588491201401,
0.2130594402551651,
0.12939229607582092,
0.0954488143324852,
-0.19234752655029297,
-0.025034187361598015,
-0.1422932893037796,
-0.20894967019557953,
0.15662603080272675,
-0.038291022181510925,
-0.02649581804871559,
0.1362144947052002,
0.021350836381316185,
0.34783124923706055,
-0.02496160753071308,
0.12408183515071869,
0.337799072265625,
0.14428192377090454,
-0.15475323796272278,
-0.24144530296325684,
0.17424848675727844,
0.003625188022851944,
-0.26909875869750977,
0.12399972230195999,
0.06352499127388,
0.05738561600446701,
-0.26466813683509827,
0.3544512689113617,
0.26162710785865784,
0.07475149631500244,
0.0032802224159240723,
0.42728766798973083,
0.271381139755249,
-0.20361100137233734,
0.10371885448694229,
-0.09778426587581635,
0.6526082158088684,
0.1991451531648636,
0.10957023501396179,
0.027504362165927887,
0.0897115021944046,
0.10373575240373611,
-0.12805750966072083,
-0.15351562201976776,
0.20418056845664978,
0.4038524627685547,
-0.49516361951828003,
0.12440519034862518,
0.15537302196025848,
0.15477843582630157,
0.36282598972320557,
-0.30158331990242004,
-0.18468526005744934,
0.029058417305350304,
0.11142195016145706,
-0.14724841713905334,
-0.025014197453856468,
0.19781605899333954,
-0.05064678564667702,
-0.13735553622245789,
0.3244965076446533,
0.013393882662057877,
0.046370819211006165,
-0.2731553912162781,
0.01278364285826683,
0.1547776162624359,
0.14349204301834106,
0.1568889170885086,
0.5182112455368042,
0.0003662519156932831,
0.16426824033260345,
-0.034431494772434235,
-0.014385510236024857,
0.09590533375740051,
0.6655558943748474,
-0.44882553815841675,
0.39691638946533203,
-0.35007092356681824,
0.174554243683815,
0.07678978890180588,
-0.4070473313331604,
0.08889863640069962,
0.10552014410495758,
-0.18305569887161255,
0.3550575077533722,
0.3304261565208435,
-0.04021652787923813,
0.03905847296118736,
-0.024165572598576546,
-0.17998330295085907,
-0.003923662006855011,
0.07317336648702621,
-0.06290270388126373,
0.24218708276748657,
-0.04896760731935501,
-0.499330997467041,
0.04693259671330452,
-0.22144559025764465,
-0.0606464147567749,
0.14703181385993958,
0.14221754670143127,
-0.20544885098934174,
-0.4592166841030121,
-0.06144167482852936,
0.09409897029399872,
0.31041088700294495,
-0.1470007598400116,
0.2697252631187439,
0.559775710105896,
-0.050930529832839966,
0.08350726962089539,
0.32726556062698364,
0.3617142140865326,
0.3501308560371399,
-0.0930439829826355,
0.21835222840309143,
-0.17051923274993896,
0.09227272868156433,
-0.041103772819042206,
0.3157978057861328,
0.033539850264787674,
0.29232117533683777,
0.17968744039535522,
0.11728700995445251,
-0.061009641736745834,
-0.11393234133720398,
0.18080762028694153,
0.06671860069036484,
-0.1626313477754593,
0.5590129494667053,
-0.24133199453353882,
0.3378431499004364,
-0.431212842464447,
0.11584841459989548,
-0.4262697398662567,
0.056970395147800446,
0.10628305375576019,
0.04361593723297119,
0.15222248435020447,
-0.10871496796607971,
0.024304594844579697,
0.058418676257133484,
0.3454764187335968,
0.4733147919178009,
-0.06093621999025345,
-0.06355449557304382,
-0.22807130217552185,
-0.8209505081176758,
0.28675439953804016,
0.07026257365942001,
-0.05072123557329178,
0.0075878300704061985,
0.06763118505477905,
-0.15757864713668823,
0.22005942463874817,
0.18387830257415771,
0.3849216401576996,
0.05570876598358154,
0.42157793045043945,
-0.21755766868591309,
-0.3669779598712921,
-0.034248754382133484,
0.0892866998910904,
-0.1560131311416626,
-0.23195898532867432,
0.19067411124706268,
-0.19020575284957886,
0.00891895592212677,
-0.13629858195781708,
0.01767376810312271,
-0.3930068016052246,
-0.30735284090042114,
0.2711995244026184,
0.4918367266654968,
0.3157917261123657,
-0.20062705874443054,
-0.10650629550218582,
-0.35678890347480774,
0.05114385858178139,
-0.05691660940647125,
0.7189388275146484,
0.07133030891418457,
0.3113725185394287,
-0.04862935096025467,
-0.3071861267089844,
-0.39099323749542236,
0.6503094434738159,
0.013748370110988617,
0.0019372827373445034,
-0.33545127511024475,
0.20867909491062164,
0.006966792047023773,
0.16074232757091522,
0.14577360451221466,
0.2864104211330414,
-0.18623434007167816,
0.34553641080856323,
-0.016578838229179382,
-0.5363333225250244,
0.44047877192497253,
-0.3810054063796997,
-0.29444420337677,
0.040283381938934326,
0.19343675673007965,
0.38284096121788025,
-0.31389695405960083,
-0.5248441100120544,
0.3539694845676422,
0.2991940975189209,
-0.125529944896698,
-0.10207593441009521,
0.13711167871952057,
-0.04902057349681854,
0.03382978215813637,
-0.14459198713302612,
0.3745250403881073,
-0.02078617364168167,
-0.08569566905498505,
0.5031972527503967,
-0.31080496311187744
] |
https://github.com/huggingface/datasets/issues/2319 | UnicodeDecodeError for OSCAR (Afrikaans) | @sgraaf, I have just merged the fix in the master branch.
You can either:
- install `datasets` from source code
- wait until we make the next release of `datasets`
- set the `utf-8` codec as your default instead of `cp1252`. This can be done by activating the Python [UTF-8 mode](https://www.python.org/dev/peps/pep-0540) either by passing the command-line option `-X utf8` or by setting the environment variable `PYTHONUTF8=1`. | ## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0 | 66 | UnicodeDecodeError for OSCAR (Afrikaans)
## Describe the bug
When loading the [OSCAR dataset](https://huggingface.co/datasets/oscar) (specifically `unshuffled_deduplicated_af`), I encounter a `UnicodeDecodeError`.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
```
## Expected results
Anything but an error, really.
## Actual results
```python
>>> from datasets import load_dataset
>>> dataset = load_dataset("oscar", "unshuffled_deduplicated_af")
Downloading: 14.7kB [00:00, 4.91MB/s]
Downloading: 3.07MB [00:00, 32.6MB/s]
Downloading and preparing dataset oscar/unshuffled_deduplicated_af (download: 62.93 MiB, generated: 163.38 MiB, post-processed: Unknown size, total: 226.32 MiB) to C:\Users\sgraaf\.cache\huggingface\datasets\oscar\unshuffled_deduplicated_af\1.0.0\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464...
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 81.0/81.0 [00:00<00:00, 40.5kB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 66.0M/66.0M [00:18<00:00, 3.50MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\load.py", line 745, in load_dataset
builder_instance.download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 574, in download_and_prepare
self._download_and_prepare(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 652, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\datasets\builder.py", line 979, in _prepare_split
for key, record in utils.tqdm(
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\site-packages\tqdm\std.py", line 1133, in __iter__
for obj in iterable:
File "C:\Users\sgraaf\.cache\huggingface\modules\datasets_modules\datasets\oscar\bd4f96df5b4512007ef9fd17bbc1ecde459fa53d2fc0049cf99392ba2efcc464\oscar.py", line 359, in _generate_examples
for line in f:
File "C:\Users\sgraaf\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7454: character maps to <undefined>
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
- Datasets: 1.6.2
- Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
- Platform: Windows-10-10.0.19041-SP0
@sgraaf, I have just merged the fix in the master branch.
You can either:
- install `datasets` from source code
- wait until we make the next release of `datasets`
- set the `utf-8` codec as your default instead of `cp1252`. This can be done by activating the Python [UTF-8 mode](https://www.python.org/dev/peps/pep-0540) either by passing the command-line option `-X utf8` or by setting the environment variable `PYTHONUTF8=1`. | [
-0.06944172829389572,
-0.06897546350955963,
-0.06865930557250977,
0.5462197661399841,
0.4998696446418762,
0.023580342531204224,
0.1604425460100174,
0.16006425023078918,
-0.25320765376091003,
0.26161646842956543,
0.10814131051301956,
0.07456547766923904,
-0.13298732042312622,
-0.16212663054466248,
0.06945578753948212,
-0.2411268949508667,
0.02387339621782303,
-0.00958869606256485,
0.14905887842178345,
-0.11387266963720322,
-0.30421891808509827,
0.3047536611557007,
-0.146704763174057,
0.14652559161186218,
-0.33820128440856934,
0.11707326024770737,
0.004726605489850044,
0.25750187039375305,
-0.14145870506763458,
-0.3523656129837036,
0.12809260189533234,
0.01631780155003071,
0.10694015771150589,
0.27422985434532166,
-0.00011850488954223692,
-0.054729439318180084,
0.4611510634422302,
-0.13152538239955902,
-0.3736705780029297,
0.04705239087343216,
-0.23162972927093506,
0.1640682965517044,
-0.10746549814939499,
-0.06719650328159332,
0.17756539583206177,
-0.28914037346839905,
-0.06511896848678589,
-0.5603586435317993,
0.018415652215480804,
0.3229224681854248,
0.17362414300441742,
0.11859716475009918,
0.18503794074058533,
0.05753215029835701,
-0.1859927475452423,
-0.10706549882888794,
-0.014230148866772652,
0.09946309030056,
0.24106714129447937,
0.16162975132465363,
-0.0901435986161232,
0.14632676541805267,
0.11504241824150085,
0.0891946405172348,
0.12996447086334229,
0.07787448912858963,
-0.18047747015953064,
-0.2484128475189209,
0.3013778030872345,
0.1579844057559967,
0.34605342149734497,
-0.4334866404533386,
-0.3860439360141754,
-0.3108896315097809,
0.19618630409240723,
-0.519354522228241,
0.540989875793457,
-0.0237488504499197,
-0.11590279638767242,
0.23562580347061157,
-0.0887802317738533,
0.07848446071147919,
-0.17907220125198364,
0.25311458110809326,
-0.20605166256427765,
0.04776732623577118,
-0.24399766325950623,
-0.006676100194454193,
-0.15676315128803253,
-0.10920776426792145,
0.07565756142139435,
-0.37066173553466797,
-0.05595632269978523,
0.3437897264957428,
-0.17979352176189423,
0.1441422998905182,
-0.06412404030561447,
0.16092835366725922,
0.28962165117263794,
0.20380181074142456,
0.1995999813079834,
-0.005847528576850891,
-0.3779219388961792,
-0.04368358105421066,
0.14448174834251404,
0.3555549383163452,
-0.057290978729724884,
-0.03326990455389023,
0.2502480745315552,
0.38962844014167786,
0.07518450915813446,
-0.0033729560673236847,
-0.13191470503807068,
-0.20461653172969818,
0.23168553411960602,
0.021027257665991783,
0.5934256911277771,
-0.2065749168395996,
-0.27364829182624817,
0.29630792140960693,
-0.10857124626636505,
-0.13338473439216614,
-0.1332821100950241,
0.10012096911668777,
-0.18075209856033325,
0.2083040475845337,
-0.14118455350399017,
0.26350846886634827,
-0.09206143021583557,
-0.3318833112716675,
-0.16413474082946777,
-0.22449925541877747,
-0.09474565088748932,
0.10428812354803085,
0.009269244968891144,
0.0026703383773565292,
0.186960831284523,
0.043253093957901,
0.30228352546691895,
-0.08851230889558792,
-0.07254622876644135,
-0.17053167521953583,
-0.01380351185798645,
0.010112687945365906,
0.05442138388752937,
0.24409271776676178,
0.044139184057712555,
-0.4594569206237793,
0.036398135125637054,
0.09502233564853668,
-0.03681228309869766,
-0.2857242822647095,
-0.1908058077096939,
0.14873887598514557,
-0.19620062410831451,
-0.05188123136758804,
-0.2405538260936737,
0.2764449715614319,
0.18005740642547607,
0.05411296710371971,
0.2551354169845581,
-0.016827095299959183,
-0.08344174921512604,
-0.13904431462287903,
0.2472234070301056,
0.5666906237602234,
-0.3448714017868042,
-0.048791736364364624,
-0.12401003390550613,
-0.20664602518081665,
0.3429836630821228,
0.22637182474136353,
0.05297072231769562,
-0.022064171731472015,
-0.36494630575180054,
0.11180958151817322,
0.12375114858150482,
-0.24636588990688324,
-0.5438914895057678,
0.1850884109735489,
-0.0684070885181427,
0.5069643259048462,
0.1817362904548645,
-0.15870296955108643,
0.24529317021369934,
-0.010692521929740906,
0.2900950014591217,
0.4672318696975708,
-0.25063416361808777,
-0.011269373819231987,
-0.2532825469970703,
-0.2451150119304657,
0.031422197818756104,
0.21761532127857208,
0.0890725702047348,
0.00023596733808517456,
0.13734674453735352,
0.2070341408252716,
0.3857540786266327,
-0.10422897338867188,
0.19445429742336273,
0.12475751340389252,
0.011800531297922134,
0.35765546560287476,
0.06796369701623917,
-0.22940745949745178,
-0.2820863723754883,
0.26406940817832947,
-0.002491859719157219,
0.11335789412260056,
-0.5008911490440369,
-0.1440783143043518,
-0.3841666877269745,
-0.13324876129627228,
-0.4603826105594635,
-0.407979816198349,
0.09587737917900085,
0.27841418981552124,
0.1699371635913849,
0.5170188546180725,
-0.35516035556793213,
0.5020518898963928,
-0.04257431626319885,
-0.0007122305687516928,
-0.5245199203491211,
0.2013833373785019,
0.12137286365032196,
-0.2475561499595642,
-0.13676461577415466,
0.26052340865135193,
-0.04194388538599014,
-0.0601239912211895,
-0.3732908368110657,
0.40056756138801575,
-0.07182801514863968,
0.2017916440963745,
0.029642824083566666,
-0.030606359243392944,
0.35686126351356506,
-0.27305659651756287,
-0.02639893628656864,
0.27862754464149475,
0.2903376817703247,
-0.04511773958802223,
0.16480985283851624,
0.22450192272663116,
0.07797164469957352,
0.14245997369289398,
0.06972191482782364,
-0.025678299367427826,
0.28910836577415466,
0.19158653914928436,
-0.00979168713092804,
-0.2168208658695221,
0.22168272733688354,
-0.2710437476634979,
0.5030978918075562,
0.03324296325445175,
-0.23356018960475922,
-0.026673905551433563,
0.6612028479576111,
-0.13731157779693604,
0.12679548561573029,
0.2621348202228546,
-0.18957138061523438,
0.1265210211277008,
-0.11438141763210297,
0.19966544210910797,
0.3831334710121155,
-0.002864708425477147,
-0.05375285819172859,
0.15426425635814667,
0.23308974504470825,
-0.1416674554347992,
0.16464267671108246,
-0.06298543512821198,
0.2722620964050293,
0.1404123306274414,
-0.10233047604560852,
0.09548458456993103,
-0.4391809105873108,
-0.25980713963508606,
-0.15118514001369476,
0.2690093219280243,
-0.30306553840637207,
0.06400343030691147,
-0.379664808511734,
-0.020693622529506683,
-0.1904434710741043,
0.015479439869523048,
-0.38862720131874084,
-0.18190525472164154,
-0.1342802792787552,
-0.021670129150152206,
0.031060274690389633,
0.11422697454690933,
-0.3544110059738159,
-0.007676571607589722,
0.04881128668785095,
-0.11996906250715256,
-0.20933635532855988,
-0.10156673938035965,
-0.3103097379207611,
0.04389733448624611,
0.3231024742126465,
-0.09265676140785217,
0.24626308679580688,
-0.27653563022613525,
-0.04185318201780319,
-0.10760433971881866,
-0.2213813066482544,
0.08392766863107681,
-0.048872798681259155,
0.04207119718194008,
0.00488126277923584,
-0.103753462433815,
-0.12384411692619324,
-0.21912068128585815,
0.24202701449394226,
-0.04461074247956276,
-0.2791254222393036,
-0.03226877748966217,
0.2220715433359146,
0.02873954549431801,
0.086641326546669,
-0.13613662123680115,
-0.28332969546318054,
-0.21096090972423553,
0.19484791159629822,
-0.07007919251918793,
0.006547074764966965,
-0.004164787940680981,
-0.13051368296146393,
0.2061852663755417,
0.059083301573991776,
0.037608131766319275,
-0.31746935844421387,
-0.15778106451034546,
0.40856048464775085,
-0.3109961152076721,
-0.35123729705810547,
-0.13553670048713684,
-0.08305488526821136,
-0.018494363874197006,
-0.05403963476419449,
-0.2928425371646881,
-0.09805212914943695,
-0.5101267099380493,
0.06375055015087128,
-0.12376046180725098,
-0.045739904046058655,
0.11907081305980682,
-0.15750694274902344,
0.05766807496547699,
-0.10939377546310425,
-0.10194788873195648,
-0.09936404973268509,
-0.23059165477752686,
0.2241043746471405,
0.062203969806432724,
0.4960552752017975,
0.012193333357572556,
0.2126581370830536,
0.3057521879673004,
0.21232159435749054,
0.526016891002655,
-0.07993292063474655,
0.18498598039150238,
-0.12880590558052063,
-0.18843187391757965,
0.2252400815486908,
-0.08422371745109558,
0.012758538126945496,
0.27013257145881653,
0.023423220962285995,
0.05158563703298569,
0.005242191255092621,
-0.049201708287000656,
-0.40674611926078796,
-0.26552340388298035,
0.022582169622182846,
-0.29998376965522766,
-0.031215772032737732,
0.030282173305749893,
-0.04318122938275337,
-0.04291500896215439,
-0.004857043735682964,
0.05553583428263664,
0.22755387425422668,
0.11703915894031525,
0.03953350707888603,
-0.013805273920297623,
0.4634622633457184,
-0.4846140146255493,
0.19047871232032776,
0.21646380424499512,
0.36882054805755615,
-0.1864621341228485,
0.10615629702806473,
0.16009162366390228,
-0.015238264575600624,
0.5245286226272583,
-0.2009752243757248,
0.045064933598041534,
-0.02423483319580555,
0.02157089114189148,
-0.15247201919555664,
0.0056638941168785095,
-0.19116434454917908,
0.08408649265766144,
0.07510311901569366,
-0.057334721088409424,
-0.32241010665893555,
0.12995921075344086,
0.2902526557445526,
0.12797698378562927,
-0.24663670361042023,
-0.058484192937612534,
-0.27679237723350525,
-0.648855447769165,
-0.4599289000034332,
0.0440940260887146,
0.17758342623710632,
0.6439505219459534,
0.03802268207073212,
0.03688151016831398,
-0.37108778953552246,
-0.11936511099338531,
0.21809282898902893,
0.22188541293144226,
0.20451638102531433,
0.05226337909698486,
0.1377336084842682,
-0.030910983681678772,
-0.1569291651248932,
0.13118280470371246,
0.7023575901985168,
0.15659956634044647,
-0.8256707191467285,
0.012018552049994469,
-0.3925682306289673,
0.2404542863368988,
0.303862988948822,
-0.3360862731933594,
-0.08394337445497513,
-0.08980704843997955,
0.04543435573577881,
-0.22870157659053802,
-0.047865450382232666,
0.3065973222255707,
0.16279427707195282,
-0.38908132910728455,
-0.35522323846817017,
0.30053409934043884,
0.1599295288324356,
0.11477437615394592,
0.32212644815444946,
0.6737332940101624,
-0.3928651213645935,
0.35987746715545654,
-0.14682182669639587,
0.8503286242485046,
-0.06608505547046661,
0.08335553854703903,
0.2286054491996765,
-0.11413370072841644,
0.13198095560073853,
0.07750898599624634,
-0.03396962955594063,
-0.26988929510116577,
-0.5620769262313843,
-0.057210326194763184,
0.09152127802371979,
0.3920045495033264,
0.1631709188222885,
0.09722748398780823,
0.20714713633060455,
0.007596589624881744,
-0.07478941977024078,
0.2738659977912903,
-0.0034670792520046234,
-0.6421937346458435,
-0.2249641865491867,
-0.7355557680130005,
0.09701786935329437,
-0.02247772365808487,
0.315126895904541,
-0.07143115997314453,
-0.14029350876808167,
-0.158140167593956,
-0.33514654636383057,
-0.38560205698013306,
-0.01543643232434988,
-0.3776571452617645,
-0.09709979593753815,
-0.1545858085155487,
-0.11171356588602066,
0.14733390510082245,
0.4229132831096649,
0.6014977097511292,
-0.06523017585277557,
0.09858419001102448,
0.19836950302124023,
0.002657279372215271,
0.044200871139764786,
0.08972201496362686,
-0.05281655117869377,
0.2270965427160263,
-0.1585267335176468,
-0.255014032125473,
0.11959537863731384,
0.10111857950687408,
-0.19822129607200623,
0.05999979376792908,
-0.00944741815328598,
-0.042921923100948334,
0.0028318744152784348,
-0.28403690457344055,
-0.3613978922367096,
0.08978153765201569,
-0.11924205720424652,
0.09485730528831482,
0.12467965483665466,
-0.19934050738811493,
-0.08947566896677017,
-0.0859319269657135,
-0.28907355666160583,
-0.11811597645282745,
0.30488321185112,
-0.021716512739658356,
-0.2639845311641693,
0.502818763256073,
0.11842980980873108,
-0.07168911397457123,
0.005620390176773071,
0.13342389464378357,
0.383113294839859,
-0.7260903120040894,
0.10977346450090408,
-0.12731021642684937,
0.1592685431241989,
-0.4053399860858917,
-0.07232603430747986,
0.15956681966781616,
-0.018026918172836304,
0.089445099234581,
-0.44881221652030945,
-0.4160526990890503,
0.07441588491201401,
0.2130594402551651,
0.12939229607582092,
0.0954488143324852,
-0.19234752655029297,
-0.025034187361598015,
-0.1422932893037796,
-0.20894967019557953,
0.15662603080272675,
-0.038291022181510925,
-0.02649581804871559,
0.1362144947052002,
0.021350836381316185,
0.34783124923706055,
-0.02496160753071308,
0.12408183515071869,
0.337799072265625,
0.14428192377090454,
-0.15475323796272278,
-0.24144530296325684,
0.17424848675727844,
0.003625188022851944,
-0.26909875869750977,
0.12399972230195999,
0.06352499127388,
0.05738561600446701,
-0.26466813683509827,
0.3544512689113617,
0.26162710785865784,
0.07475149631500244,
0.0032802224159240723,
0.42728766798973083,
0.271381139755249,
-0.20361100137233734,
0.10371885448694229,
-0.09778426587581635,
0.6526082158088684,
0.1991451531648636,
0.10957023501396179,
0.027504362165927887,
0.0897115021944046,
0.10373575240373611,
-0.12805750966072083,
-0.15351562201976776,
0.20418056845664978,
0.4038524627685547,
-0.49516361951828003,
0.12440519034862518,
0.15537302196025848,
0.15477843582630157,
0.36282598972320557,
-0.30158331990242004,
-0.18468526005744934,
0.029058417305350304,
0.11142195016145706,
-0.14724841713905334,
-0.025014197453856468,
0.19781605899333954,
-0.05064678564667702,
-0.13735553622245789,
0.3244965076446533,
0.013393882662057877,
0.046370819211006165,
-0.2731553912162781,
0.01278364285826683,
0.1547776162624359,
0.14349204301834106,
0.1568889170885086,
0.5182112455368042,
0.0003662519156932831,
0.16426824033260345,
-0.034431494772434235,
-0.014385510236024857,
0.09590533375740051,
0.6655558943748474,
-0.44882553815841675,
0.39691638946533203,
-0.35007092356681824,
0.174554243683815,
0.07678978890180588,
-0.4070473313331604,
0.08889863640069962,
0.10552014410495758,
-0.18305569887161255,
0.3550575077533722,
0.3304261565208435,
-0.04021652787923813,
0.03905847296118736,
-0.024165572598576546,
-0.17998330295085907,
-0.003923662006855011,
0.07317336648702621,
-0.06290270388126373,
0.24218708276748657,
-0.04896760731935501,
-0.499330997467041,
0.04693259671330452,
-0.22144559025764465,
-0.0606464147567749,
0.14703181385993958,
0.14221754670143127,
-0.20544885098934174,
-0.4592166841030121,
-0.06144167482852936,
0.09409897029399872,
0.31041088700294495,
-0.1470007598400116,
0.2697252631187439,
0.559775710105896,
-0.050930529832839966,
0.08350726962089539,
0.32726556062698364,
0.3617142140865326,
0.3501308560371399,
-0.0930439829826355,
0.21835222840309143,
-0.17051923274993896,
0.09227272868156433,
-0.041103772819042206,
0.3157978057861328,
0.033539850264787674,
0.29232117533683777,
0.17968744039535522,
0.11728700995445251,
-0.061009641736745834,
-0.11393234133720398,
0.18080762028694153,
0.06671860069036484,
-0.1626313477754593,
0.5590129494667053,
-0.24133199453353882,
0.3378431499004364,
-0.431212842464447,
0.11584841459989548,
-0.4262697398662567,
0.056970395147800446,
0.10628305375576019,
0.04361593723297119,
0.15222248435020447,
-0.10871496796607971,
0.024304594844579697,
0.058418676257133484,
0.3454764187335968,
0.4733147919178009,
-0.06093621999025345,
-0.06355449557304382,
-0.22807130217552185,
-0.8209505081176758,
0.28675439953804016,
0.07026257365942001,
-0.05072123557329178,
0.0075878300704061985,
0.06763118505477905,
-0.15757864713668823,
0.22005942463874817,
0.18387830257415771,
0.3849216401576996,
0.05570876598358154,
0.42157793045043945,
-0.21755766868591309,
-0.3669779598712921,
-0.034248754382133484,
0.0892866998910904,
-0.1560131311416626,
-0.23195898532867432,
0.19067411124706268,
-0.19020575284957886,
0.00891895592212677,
-0.13629858195781708,
0.01767376810312271,
-0.3930068016052246,
-0.30735284090042114,
0.2711995244026184,
0.4918367266654968,
0.3157917261123657,
-0.20062705874443054,
-0.10650629550218582,
-0.35678890347480774,
0.05114385858178139,
-0.05691660940647125,
0.7189388275146484,
0.07133030891418457,
0.3113725185394287,
-0.04862935096025467,
-0.3071861267089844,
-0.39099323749542236,
0.6503094434738159,
0.013748370110988617,
0.0019372827373445034,
-0.33545127511024475,
0.20867909491062164,
0.006966792047023773,
0.16074232757091522,
0.14577360451221466,
0.2864104211330414,
-0.18623434007167816,
0.34553641080856323,
-0.016578838229179382,
-0.5363333225250244,
0.44047877192497253,
-0.3810054063796997,
-0.29444420337677,
0.040283381938934326,
0.19343675673007965,
0.38284096121788025,
-0.31389695405960083,
-0.5248441100120544,
0.3539694845676422,
0.2991940975189209,
-0.125529944896698,
-0.10207593441009521,
0.13711167871952057,
-0.04902057349681854,
0.03382978215813637,
-0.14459198713302612,
0.3745250403881073,
-0.02078617364168167,
-0.08569566905498505,
0.5031972527503967,
-0.31080496311187744
] |
https://github.com/huggingface/datasets/issues/2318 | [api request] API to obtain "dataset_module" dynamic path? | Hi @richardliaw,
First, thanks for the compliments.
In relation with your request, currently, the dynamic modules path is obtained this way:
```python
from datasets.load import init_dynamic_modules, MODULE_NAME_FOR_DYNAMIC_MODULES
dynamic_modules_path = init_dynamic_modules(MODULE_NAME_FOR_DYNAMIC_MODULES)
```
Let me know if it is OK for you this way.
I could set `MODULE_NAME_FOR_DYNAMIC_MODULES` as default value, so that you could instead obtain the path with:
```
dynamic_modules_path = datasets.load.init_dynamic_modules()
``` | **Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
| 63 | [api request] API to obtain "dataset_module" dynamic path?
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
Hi @richardliaw,
First, thanks for the compliments.
In relation with your request, currently, the dynamic modules path is obtained this way:
```python
from datasets.load import init_dynamic_modules, MODULE_NAME_FOR_DYNAMIC_MODULES
dynamic_modules_path = init_dynamic_modules(MODULE_NAME_FOR_DYNAMIC_MODULES)
```
Let me know if it is OK for you this way.
I could set `MODULE_NAME_FOR_DYNAMIC_MODULES` as default value, so that you could instead obtain the path with:
```
dynamic_modules_path = datasets.load.init_dynamic_modules()
``` | [
-0.10380332171916962,
-0.2795984745025635,
-0.13102881610393524,
0.05274248868227005,
0.325447142124176,
-0.26348748803138733,
-0.06139573082327843,
0.15633611381053925,
-0.2127549797296524,
0.3393891751766205,
-0.07494530081748962,
0.7778304219245911,
-0.4725227355957031,
0.3166548013687134,
0.2836637794971466,
-0.4223526120185852,
-0.10750987380743027,
0.05030477046966553,
-0.26262038946151733,
0.003611113876104355,
-0.1428721845149994,
0.2316276580095291,
-0.08478288352489471,
0.2267729789018631,
0.0757531225681305,
-0.2109440118074417,
-0.0228330809623003,
0.017517831176519394,
-0.13803771138191223,
-0.37461382150650024,
0.2695261240005493,
0.1496998518705368,
0.25352588295936584,
0.21998189389705658,
-0.00010940770152956247,
0.06864200532436371,
0.09773280471563339,
-0.06219177693128586,
-0.38505563139915466,
-0.5734548568725586,
0.14863181114196777,
-0.13738982379436493,
0.19288386404514313,
-0.28993651270866394,
-0.06381635367870331,
-0.274437814950943,
-0.053628675639629364,
-0.7661018967628479,
0.29128724336624146,
0.06330639868974686,
0.2035725712776184,
0.3836928606033325,
-0.21158374845981598,
0.014115937054157257,
0.011168554425239563,
0.2845667898654938,
-0.1351318359375,
-0.1789129376411438,
0.17120446264743805,
0.14742568135261536,
-0.006958112120628357,
0.27183130383491516,
-0.08365967869758606,
0.11849357187747955,
0.5701002478599548,
0.09213420748710632,
-0.4181133508682251,
-0.06294708698987961,
0.11640780419111252,
0.3929317891597748,
0.43417397141456604,
-0.46057382225990295,
-0.33858954906463623,
-0.3974287211894989,
-0.23871594667434692,
-0.1298525482416153,
0.1684209555387497,
0.15412385761737823,
-0.294812947511673,
0.1381622701883316,
0.02806299366056919,
-0.1709858626127243,
-0.23884299397468567,
-0.03655887395143509,
0.1353723406791687,
0.07218474894762039,
0.03380943089723587,
0.04925829544663429,
0.21381478011608124,
-0.2562360167503357,
0.253048837184906,
0.00013538450002670288,
0.1630685031414032,
0.35018035769462585,
-0.13328519463539124,
0.043795354664325714,
0.2593631446361542,
0.008187219500541687,
0.0949195846915245,
0.15284129977226257,
0.08033429831266403,
0.07105737179517746,
-0.13075077533721924,
-0.0033432990312576294,
0.17435459792613983,
-0.06883204728364944,
0.16670620441436768,
0.26624596118927,
0.04227135330438614,
0.21005646884441376,
0.09439046680927277,
-0.01396598294377327,
-0.06579994410276413,
0.13380034267902374,
-0.04739505052566528,
-0.029537905007600784,
0.095387764275074,
0.15124252438545227,
-0.12863148748874664,
-0.2675000727176666,
-0.31991156935691833,
-0.20023362338542938,
0.38845962285995483,
0.513553261756897,
-0.08287262171506882,
0.0863126888871193,
0.21518535912036896,
-0.2800033688545227,
0.11290646344423294,
0.048618655651807785,
-0.12347183376550674,
0.19003166258335114,
-0.18802227079868317,
0.1826997995376587,
0.13368363678455353,
-0.15589578449726105,
0.3612343966960907,
-0.2448185533285141,
0.2501978874206543,
-0.03754153475165367,
0.10975679755210876,
0.21152181923389435,
0.29102542996406555,
0.08668491989374161,
-0.005806777626276016,
-0.014547687955200672,
-0.2215718775987625,
0.11930179595947266,
-0.48329418897628784,
0.04276464506983757,
-0.261391282081604,
-0.4978819191455841,
0.02840563654899597,
0.15068568289279938,
-0.17734114825725555,
-0.10171668231487274,
-0.2653217017650604,
0.15636186301708221,
-0.3528120517730713,
0.09600591659545898,
-0.05305110663175583,
0.04742204770445824,
-0.27007922530174255,
-0.1650850921869278,
0.2739582359790802,
0.3499602675437927,
-0.06292000412940979,
-0.25113892555236816,
0.03230598568916321,
0.020077461376786232,
-0.17056989669799805,
-0.050363343209028244,
-0.48098209500312805,
0.21720105409622192,
-0.19956405460834503,
0.11189082264900208,
0.42433470487594604,
-0.36627310514450073,
0.1924605667591095,
-0.045974165201187134,
-0.059217922389507294,
-0.28131645917892456,
0.09992091357707977,
-0.06422565877437592,
0.0895034596323967,
0.036624591797590256,
0.19061025977134705,
0.4679449200630188,
0.21075518429279327,
-0.05199354887008667,
0.062316928058862686,
-0.43837690353393555,
-0.13210521638393402,
0.05691375210881233,
0.05357276275753975,
-0.0980873629450798,
0.042050864547491074,
-0.049575433135032654,
0.500515878200531,
-0.09349748492240906,
-0.04792425036430359,
0.28005391359329224,
0.2826184630393982,
0.26249417662620544,
0.21902011334896088,
-0.46584972739219666,
-0.1698424220085144,
0.2003214955329895,
-0.18068285286426544,
0.004847012460231781,
-0.20051293075084686,
-0.18833060562610626,
0.010719146579504013,
0.23749904334545135,
0.04301592707633972,
0.23327921330928802,
0.1127445250749588,
-0.07299385964870453,
-0.006270378828048706,
-0.08526611328125,
-0.46070992946624756,
0.08592726290225983,
-0.29129019379615784,
0.10093192011117935,
-0.26878947019577026,
0.26661115884780884,
0.16655585169792175,
0.011388413608074188,
-0.09419242292642593,
0.3063886761665344,
0.08049709349870682,
-0.15951472520828247,
0.06631673872470856,
0.18532845377922058,
0.13832597434520721,
0.1945546567440033,
-0.05417872220277786,
0.4117591381072998,
0.13059651851654053,
-0.04979267716407776,
0.12477678805589676,
-0.1700550615787506,
0.06358271092176437,
0.33434128761291504,
0.26171228289604187,
0.4313475489616394,
-0.3116958439350128,
0.3364180326461792,
0.27462542057037354,
0.18481425940990448,
0.23390069603919983,
-0.002299729734659195,
-0.30905553698539734,
-0.06686143577098846,
0.1055624932050705,
0.17880268394947052,
0.023215051740407944,
-0.21779727935791016,
-0.2678337097167969,
0.1311539113521576,
0.26759493350982666,
0.03701518848538399,
-0.014341093599796295,
-0.08250082284212112,
-0.12225312739610672,
0.09929072111845016,
0.14312420785427094,
0.4640808403491974,
0.20166248083114624,
0.37236717343330383,
-0.03118494525551796,
0.10351434350013733,
-0.16544659435749054,
0.08274614065885544,
0.5085874795913696,
0.5266923904418945,
0.04208880290389061,
-0.35522663593292236,
-0.031502168625593185,
0.07654418796300888,
-0.19072812795639038,
-0.3646160066127777,
-0.15555983781814575,
-0.05878071486949921,
-0.3679344654083252,
0.2199699878692627,
-0.45467549562454224,
-0.04731854423880577,
-0.6218669414520264,
-0.5643888711929321,
0.017871567979454994,
0.13210301101207733,
-0.0603950172662735,
-0.3999858796596527,
-0.19628970324993134,
0.19784361124038696,
0.07725833356380463,
0.22252005338668823,
-0.21028299629688263,
-0.5583541393280029,
-0.0730556771159172,
-0.10398941487073898,
-0.11129599064588547,
-0.003900473937392235,
0.10099634528160095,
0.11626292765140533,
0.45895951986312866,
-0.06609679758548737,
0.15453673899173737,
-0.2830374538898468,
-0.22961273789405823,
0.42073842883110046,
0.046010781079530716,
0.07392243295907974,
0.38977816700935364,
0.009835362434387207,
0.21226097643375397,
-0.1580737829208374,
0.07670781761407852,
-0.054733775556087494,
-0.11321163922548294,
-0.399292528629303,
0.08760955929756165,
0.06435743719339371,
-0.08761410415172577,
-0.3364678919315338,
-0.2850172519683838,
-0.24045954644680023,
0.13169138133525848,
0.022005323320627213,
0.34126949310302734,
0.3866488039493561,
0.07746817171573639,
0.19769829511642456,
-0.39721378684043884,
0.3130909502506256,
-0.0743630975484848,
-0.025256074965000153,
0.16581910848617554,
-0.06371454894542694,
-0.2479177862405777,
0.18674223124980927,
-0.13976746797561646,
0.3825788199901581,
0.22263313829898834,
-0.17466701567173004,
-0.557778000831604,
0.0760994553565979,
0.37837305665016174,
-0.11571778357028961,
0.15714329481124878,
0.43527355790138245,
0.3465403914451599,
-0.06451062113046646,
-0.09385686367750168,
-0.6340906023979187,
0.37883806228637695,
-0.043133459985256195,
0.16735872626304626,
0.25104764103889465,
0.346707820892334,
0.17774400115013123,
0.7528577446937561,
-0.1817517876625061,
-0.4236454367637634,
0.031146902590990067,
-0.15045706927776337,
0.197370707988739,
0.28689655661582947,
-0.2159767746925354,
-0.3330319821834564,
-0.2381713092327118,
-0.08345043659210205,
0.024934083223342896,
0.1799410879611969,
-0.003555402159690857,
-0.25610339641571045,
-0.024258296936750412,
-0.02540692314505577,
-0.200969859957695,
-0.06101638823747635,
0.14947570860385895,
0.4692338705062866,
0.20796449482440948,
0.2638307809829712,
-0.4698413610458374,
0.057156041264534,
0.22765137255191803,
0.11292216181755066,
0.06714695692062378,
0.02898075245320797,
-0.06941971927881241,
-0.08377646654844284,
-0.0307622030377388,
0.21286067366600037,
0.23312270641326904,
0.0638221949338913,
0.07852420210838318,
-0.04747866839170456,
0.35797905921936035,
0.08619993925094604,
0.3167371153831482,
0.4252169132232666,
-0.15990237891674042,
-0.1514635980129242,
-0.2411317378282547,
-0.07016942650079727,
0.04450450465083122,
-0.026758253574371338,
0.03909340873360634,
0.1133594810962677,
0.33607104420661926,
-0.22086957097053528,
-0.44453462958335876,
0.08324787765741348,
0.1801423281431198,
-0.12731368839740753,
0.04329155758023262,
-0.1254708468914032,
-0.6150270104408264,
-0.10434386879205704,
-0.18169471621513367,
0.14103426039218903,
0.27520957589149475,
0.36973413825035095,
-0.13236267864704132,
0.010732223279774189,
-0.1800207495689392,
0.14552906155586243,
-0.09181542694568634,
0.4292844533920288,
0.046266306191682816,
0.2616247534751892,
0.33075761795043945,
0.42090997099876404,
-0.21784956753253937,
0.21637076139450073,
-0.35479864478111267,
-0.04975704848766327,
-0.14117690920829773,
0.2359575480222702,
0.0529504232108593,
0.4503341317176819,
-0.0923176109790802,
0.5791481733322144,
0.3868663012981415,
-0.08148348331451416,
-0.3159942924976349,
0.06038748845458031,
0.1594022959470749,
-0.08599692583084106,
0.11713635176420212,
-0.8254057168960571,
0.7735916972160339,
-0.05612686276435852,
-0.26546573638916016,
0.4140823185443878,
0.3090519309043884,
-0.4338613748550415,
0.0631646141409874,
0.5055973529815674,
0.8474001884460449,
0.07518494129180908,
-0.07531797885894775,
0.44539564847946167,
-0.467009961605072,
0.23780255019664764,
0.26439368724823,
0.17600136995315552,
-0.23170684278011322,
0.2607174813747406,
-0.1877785474061966,
-0.19118519127368927,
0.04613876715302467,
-0.2341165393590927,
0.21798154711723328,
0.14626678824424744,
0.45153599977493286,
0.14330224692821503,
0.10414235293865204,
0.2537238895893097,
-0.08491765707731247,
-0.3625350594520569,
-0.4506557285785675,
0.06464067846536636,
-0.19806106388568878,
0.08239632099866867,
0.07960201054811478,
-0.3622603416442871,
0.1989401876926422,
-0.2618859112262726,
-0.09112058579921722,
-0.38548505306243896,
-0.6159553527832031,
0.30892717838287354,
0.4366492033004761,
-0.2593918442726135,
0.23123985528945923,
0.030997389927506447,
-0.014427028596401215,
0.021780146285891533,
-0.34048300981521606,
0.33221790194511414,
-0.141349196434021,
-0.2605073153972626,
-0.10247541964054108,
0.059632621705532074,
0.27457648515701294,
-0.027484918013215065,
-0.031428612768650055,
0.09809747338294983,
-0.10363555699586868,
-0.16282129287719727,
-0.1983739286661148,
0.23523437976837158,
0.43401533365249634,
0.04718535393476486,
0.23359066247940063,
0.23979273438453674,
0.40198642015457153,
0.010730341076850891,
0.1145021915435791,
0.1893707811832428,
-0.18993693590164185,
0.22910910844802856,
0.2565890848636627,
0.04988028109073639,
-0.08177375793457031,
0.3258640468120575,
-0.036097727715969086,
-0.3304719030857086,
0.4503825306892395,
0.03441761061549187,
-0.1876460462808609,
-0.0733855664730072,
0.08446186035871506,
-0.1419009417295456,
-0.37229955196380615,
0.12869928777217865,
0.1330619752407074,
0.002737104892730713,
0.022772356867790222,
0.24055351316928864,
0.1204587072134018,
-0.20282456278800964,
-0.49595609307289124,
0.05002924054861069,
-0.09931128472089767,
0.26168209314346313,
-0.48729345202445984,
0.17828504741191864,
0.046684205532073975,
0.10944849252700806,
-0.14735080301761627,
-0.2423122525215149,
-0.3322329521179199,
0.1697491556406021,
0.07562820613384247,
-0.2347114086151123,
-0.009939420968294144,
-0.048351213335990906,
0.1035885140299797,
0.019610069692134857,
0.02066861279308796,
-0.16741855442523956,
-0.34170904755592346,
-0.10541761666536331,
-0.2636520266532898,
0.12907402217388153,
-0.29347631335258484,
0.2898748517036438,
-0.2584204375743866,
-0.44296014308929443,
-0.31155383586883545,
-0.09174108505249023,
-0.16577227413654327,
0.2544402480125427,
0.016519948840141296,
-0.2909931540489197,
-0.10057641565799713,
-0.18206825852394104,
-0.18975983560085297,
0.18602901697158813,
0.06411176919937134,
0.10852821171283722,
0.3473663330078125,
0.31740570068359375,
-0.1919299215078354,
-0.13949453830718994,
0.06713893264532089,
0.2283727526664734,
0.020500458776950836,
-0.24999397993087769,
0.25062665343284607,
-0.01825869083404541,
-0.2987321615219116,
0.11558660864830017,
0.25331398844718933,
0.06984233856201172,
-0.18621958792209625,
0.0248394925147295,
0.351809024810791,
0.14764928817749023,
-0.21638606488704681,
-0.13724307715892792,
-0.15965290367603302,
0.027729090303182602,
0.15893042087554932,
0.47510117292404175,
0.32946231961250305,
0.04468816518783569,
0.2192898392677307,
0.15908890962600708,
0.45757344365119934,
-0.08401797711849213,
-0.020297273993492126,
0.28671130537986755,
0.11166185140609741,
0.09877318143844604,
0.3216601610183716,
0.4595410227775574,
0.4684455692768097,
0.3703981041908264,
-0.4155924916267395,
0.6599215269088745,
0.09692177176475525,
-0.10937072336673737,
0.00211188942193985,
-0.24320851266384125,
0.09895457327365875,
-0.020933181047439575,
0.1255951076745987,
-0.03712636977434158,
-0.1475568562746048,
0.6019266247749329,
-0.3544941842556,
0.16710127890110016,
-0.26332512497901917,
0.1947573721408844,
0.033624015748500824,
-0.17142705619335175,
-0.010801427066326141,
-0.2624395787715912,
-0.3131428360939026,
-0.1437799483537674,
0.3506460189819336,
-0.22711338102817535,
0.03827347606420517,
-0.2672572135925293,
0.13633641600608826,
-0.009172085672616959,
-0.24296921491622925,
0.23161080479621887,
0.007791511714458466,
-0.2223392277956009,
-0.03140675276517868,
0.02866503596305847,
-0.18289420008659363,
0.010714903473854065,
-0.03490561246871948,
0.04109088331460953,
0.13118264079093933,
-0.15104477107524872,
-0.07083052396774292,
0.014131738804280758,
0.054567575454711914,
0.019732240587472916,
-0.027892690151929855,
-0.1538018435239792,
0.35287630558013916,
0.3085986375808716,
0.09753404557704926,
-0.11884773522615433,
-0.07746957242488861,
0.033226270228624344,
0.3475905954837799,
-0.30833184719085693,
0.6529896259307861,
0.06172680854797363,
0.13792666792869568,
-0.1629931479692459,
0.01133517175912857,
-0.3320842981338501,
0.06550846993923187,
0.241477370262146,
-0.16518032550811768,
-0.09607046097517014,
0.07346806675195694,
0.06962120532989502,
-0.01730216294527054,
0.23458771407604218,
0.1316283941268921,
0.29447415471076965,
0.016361016780138016,
-0.09264408051967621,
-0.42934805154800415,
-0.25350499153137207,
0.2615557909011841,
-0.16904667019844055,
0.1274641454219818,
0.053307898342609406,
0.2237376868724823,
0.0018435195088386536,
0.15082237124443054,
-0.22550372779369354,
0.14243318140506744,
-0.015666134655475616,
-0.25730037689208984,
-0.19178815186023712,
0.0597270168364048,
0.08317358046770096,
0.04799851030111313,
-0.05254048854112625,
-0.2635934352874756,
-0.2478509098291397,
-0.09970647841691971,
-0.32850372791290283,
0.12655244767665863,
0.10371969640254974,
-0.3290542960166931,
0.25022804737091064,
-0.14273031055927277,
-0.007658481597900391,
0.08105442672967911,
0.1488339602947235,
-0.24457025527954102,
-0.047097742557525635,
0.052399892359972,
-0.298712819814682,
0.12479691207408905,
0.16304056346416473,
-0.12118484079837799,
-0.22238324582576752,
-0.44878169894218445,
0.05808451399207115,
0.2074417918920517,
0.027048220857977867,
-0.11674968153238297,
0.14393362402915955,
-0.40633442997932434,
0.028887197375297546,
0.152133971452713,
0.18413245677947998,
0.018177706748247147,
0.12982672452926636,
-0.27009233832359314,
-0.21299795806407928,
0.7706223726272583,
-0.6101864576339722,
-0.1864347904920578,
-0.029161352664232254,
0.33870917558670044,
0.13100184500217438,
-0.08951558917760849,
-0.6234186291694641,
-0.07834359258413315,
0.24261243641376495,
-0.1379646360874176,
0.0024242810904979706,
0.12771713733673096,
-0.11171962320804596,
0.17596860229969025,
-0.08842557668685913,
-0.22517240047454834,
0.0719398781657219,
-0.07472331076860428,
-0.10609133541584015,
-0.15183867514133453
] |
https://github.com/huggingface/datasets/issues/2318 | [api request] API to obtain "dataset_module" dynamic path? | Hi @richardliaw, the feature is on the master branch and will be included in the next release in a couple of weeks. | **Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
| 22 | [api request] API to obtain "dataset_module" dynamic path?
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
This is an awesome library.
It seems like the dynamic module path in this library has broken some of hyperparameter tuning functionality: https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
This is because Ray will spawn new processes, and each process will load modules by path. However, we need to explicitly inform Ray to load the right modules, or else it will error upon import.
I'd like an API to obtain the dynamic paths. This will allow us to support this functionality in this awesome library while being future proof.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
`datasets.get_dynamic_paths -> List[str]` will be sufficient for my use case.
By offering this API, we will be able to address the following issues (by patching the ray integration sufficiently):
https://github.com/huggingface/blog/issues/106
https://github.com/huggingface/transformers/issues/11565
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/34
https://discuss.huggingface.co/t/using-hyperparameter-search-in-trainer/785/35
Hi @richardliaw, the feature is on the master branch and will be included in the next release in a couple of weeks. | [
-0.12703993916511536,
-0.22530508041381836,
-0.13680385053157806,
0.12058553099632263,
0.2940101623535156,
-0.3005485236644745,
-0.08337704837322235,
0.17475005984306335,
-0.2136734575033188,
0.36759382486343384,
-0.0689019113779068,
0.776881754398346,
-0.4621843993663788,
0.3776909410953522,
0.29991284012794495,
-0.4458760917186737,
-0.09753585606813431,
0.0067400336265563965,
-0.3226870894432068,
0.017640821635723114,
-0.10135924816131592,
0.2357005625963211,
-0.04948046803474426,
0.21503831446170807,
-0.033128347247838974,
-0.2271062731742859,
-0.02159898169338703,
-0.03240783512592316,
-0.2154180109500885,
-0.30632179975509644,
0.29382529854774475,
0.0977497398853302,
0.24194633960723877,
0.25494855642318726,
-0.00010971690790029243,
0.039927348494529724,
0.08699227124452591,
-0.02532660961151123,
-0.38921305537223816,
-0.5852144956588745,
0.0869910940527916,
-0.05274397134780884,
0.22320424020290375,
-0.21141794323921204,
-0.05715503171086311,
-0.22863616049289703,
-0.03880102187395096,
-0.7245182991027832,
0.312793493270874,
0.09709702432155609,
0.18637852370738983,
0.35255101323127747,
-0.24612747132778168,
-0.06086905300617218,
0.02631954476237297,
0.36601758003234863,
-0.17906172573566437,
-0.22310598194599152,
0.24396908283233643,
0.17580685019493103,
-0.09021598845720291,
0.2793933153152466,
-0.014710068702697754,
0.08540945500135422,
0.5754789113998413,
0.08735299110412598,
-0.5218420624732971,
-0.007881924510002136,
0.13982218503952026,
0.4570404291152954,
0.4978514313697815,
-0.4548657238483429,
-0.31249526143074036,
-0.34358516335487366,
-0.21025823056697845,
-0.06119493395090103,
0.24329882860183716,
0.16186629235744476,
-0.31920915842056274,
0.17481063306331635,
0.00644140038639307,
-0.2058243304491043,
-0.2967870831489563,
-0.047767892479896545,
0.1724843680858612,
0.04523598775267601,
0.01284542866051197,
0.010139819234609604,
0.23765148222446442,
-0.233511820435524,
0.2568751573562622,
-0.008772023022174835,
0.13294072449207306,
0.3248981237411499,
-0.1687447726726532,
-0.05096505954861641,
0.2447005808353424,
0.034774310886859894,
0.12263736873865128,
0.18367798626422882,
0.10958105325698853,
0.10452622920274734,
-0.20027512311935425,
0.00513230636715889,
0.21680167317390442,
-0.054263319820165634,
0.1683606207370758,
0.16423332691192627,
0.0437154695391655,
0.15696701407432556,
0.07528351247310638,
0.0036232098937034607,
-0.02629827708005905,
0.24856382608413696,
-0.16839881241321564,
-0.06846030056476593,
-0.0536363422870636,
0.09303215146064758,
-0.09802643954753876,
-0.2727898955345154,
-0.22848129272460938,
-0.2464372217655182,
0.4020056426525116,
0.5189792513847351,
-0.010353276506066322,
0.003272188827395439,
0.13467489182949066,
-0.30617833137512207,
0.154081329703331,
0.03425133600831032,
-0.13287882506847382,
0.17006857693195343,
-0.19645924866199493,
0.21727479994297028,
0.1251198947429657,
-0.1617833822965622,
0.37573862075805664,
-0.21474657952785492,
0.20801253616809845,
-0.014688435941934586,
0.1403800994157791,
0.22581538558006287,
0.3021261394023895,
0.05619611218571663,
0.0005969405174255371,
-0.07953047752380371,
-0.19606143236160278,
0.1319362223148346,
-0.47904011607170105,
0.05728050693869591,
-0.27560335397720337,
-0.5086497068405151,
-0.05313437432050705,
0.12330903112888336,
-0.15178954601287842,
-0.16024461388587952,
-0.22752410173416138,
0.2502956688404083,
-0.4091598093509674,
0.06682242453098297,
-0.04626522213220596,
0.12058022618293762,
-0.25156664848327637,
-0.1417645961046219,
0.16248910129070282,
0.31916308403015137,
-0.057372502982616425,
-0.26679742336273193,
0.010613435879349709,
0.020545324310660362,
-0.21427947282791138,
0.014970235526561737,
-0.49762606620788574,
0.1595587432384491,
-0.25142061710357666,
0.2069934457540512,
0.46552249789237976,
-0.34968969225883484,
0.19791239500045776,
-0.049631569534540176,
-0.12055955082178116,
-0.3511762320995331,
0.14231540262699127,
-0.017861908301711082,
0.05054600164294243,
0.02211153693497181,
0.19192412495613098,
0.4152480959892273,
0.1833772510290146,
-0.0652410015463829,
0.10884900391101837,
-0.504827618598938,
-0.1916041076183319,
0.03474302962422371,
-0.028198283165693283,
-0.11104843765497208,
0.1313597410917282,
-0.07483450323343277,
0.47192421555519104,
-0.12862972915172577,
-0.06478870660066605,
0.2573930025100708,
0.2756943106651306,
0.2501276135444641,
0.16383513808250427,
-0.5089280009269714,
-0.18323728442192078,
0.13451114296913147,
-0.22348226606845856,
0.020761389285326004,
-0.12531891465187073,
-0.2170521467924118,
0.054678283631801605,
0.2268896847963333,
0.10634470731019974,
0.21437983214855194,
0.08871983736753464,
-0.05322811007499695,
-0.01984648033976555,
-0.09948809444904327,
-0.5061232447624207,
-0.00658981129527092,
-0.3069566786289215,
0.12981565296649933,
-0.2599499821662903,
0.26358962059020996,
0.19461077451705933,
0.04408656060695648,
-0.04457297548651695,
0.2768557667732239,
0.032631777226924896,
-0.15020816028118134,
0.06560572236776352,
0.13140179216861725,
0.1356818526983261,
0.17554208636283875,
0.08025171607732773,
0.49778538942337036,
0.1447058618068695,
-0.05005268007516861,
0.16893555223941803,
-0.2226332277059555,
0.016557134687900543,
0.29894083738327026,
0.16988757252693176,
0.39695894718170166,
-0.29937389492988586,
0.308268666267395,
0.27439260482788086,
0.17109473049640656,
0.23893964290618896,
0.02417202666401863,
-0.2681673765182495,
-0.06899715214967728,
0.1494842767715454,
0.14697232842445374,
0.020416613668203354,
-0.18658214807510376,
-0.23666326701641083,
0.15106995403766632,
0.3428979218006134,
0.07969772815704346,
0.022950880229473114,
-0.015531495213508606,
-0.1506817638874054,
0.06352631002664566,
0.17809827625751495,
0.44275596737861633,
0.20155471563339233,
0.3840312361717224,
-0.034234870225191116,
0.06578805297613144,
-0.14357492327690125,
0.04261576384305954,
0.4801454544067383,
0.48440223932266235,
0.04770248755812645,
-0.3410336673259735,
-0.06740368902683258,
0.0669587180018425,
-0.3018418252468109,
-0.3176437020301819,
-0.1428513377904892,
-0.051854535937309265,
-0.28323686122894287,
0.1495361179113388,
-0.46630197763442993,
-0.0819147378206253,
-0.6571810245513916,
-0.47938838601112366,
-0.009638786315917969,
0.143877774477005,
-0.007633473724126816,
-0.40433186292648315,
-0.23071666061878204,
0.17389069497585297,
0.07144266366958618,
0.32889336347579956,
-0.2518243193626404,
-0.52647465467453,
-0.11426596343517303,
-0.08893262594938278,
-0.14209038019180298,
0.008149225264787674,
0.17665673792362213,
0.11476574838161469,
0.4805978238582611,
0.013150138780474663,
0.24696476757526398,
-0.36170491576194763,
-0.32568737864494324,
0.4542030096054077,
0.07819879055023193,
0.09404686093330383,
0.3639712333679199,
-0.013456910848617554,
0.15102742612361908,
-0.14865551888942719,
0.07467582076787949,
-0.04549349471926689,
-0.12301205098628998,
-0.406135231256485,
0.1090996265411377,
0.08520305901765823,
-0.05791760981082916,
-0.3914549648761749,
-0.2709723711013794,
-0.20694804191589355,
0.19162708520889282,
-0.028917346149683,
0.3386309742927551,
0.3339798152446747,
0.0931621864438057,
0.2643855810165405,
-0.49498429894447327,
0.25379762053489685,
-0.10228919237852097,
-0.04781735688447952,
0.10193133354187012,
-0.06081806495785713,
-0.25433826446533203,
0.1836874783039093,
-0.11268703639507294,
0.36603766679763794,
0.17418093979358673,
-0.24804264307022095,
-0.5372396111488342,
0.09461341798305511,
0.412111759185791,
-0.058660946786403656,
0.1167093887925148,
0.49186617136001587,
0.3178737461566925,
-0.06984647363424301,
-0.0744871124625206,
-0.6162253618240356,
0.397955983877182,
-0.08524210751056671,
0.20723764598369598,
0.22337844967842102,
0.31122857332229614,
0.19015078246593475,
0.7600676417350769,
-0.1596224457025528,
-0.4256862699985504,
0.06012199446558952,
-0.17407330870628357,
0.22076746821403503,
0.2339051067829132,
-0.21579065918922424,
-0.26298287510871887,
-0.27099424600601196,
-0.0954694151878357,
0.08145168423652649,
0.2104848325252533,
0.00395241379737854,
-0.249709352850914,
-0.023825248703360558,
0.026483848690986633,
-0.168685182929039,
-0.003142770379781723,
0.19825923442840576,
0.40250617265701294,
0.22803154587745667,
0.25617700815200806,
-0.4469822347164154,
0.055905528366565704,
0.23703308403491974,
0.11119338124990463,
0.12085062265396118,
0.019922642037272453,
-0.1564546376466751,
-0.14821740984916687,
-0.005031898617744446,
0.2213250696659088,
0.23441801965236664,
0.047856349498033524,
-0.00842057541012764,
-0.004033345729112625,
0.35663890838623047,
0.1168895736336708,
0.35502755641937256,
0.3904073238372803,
-0.2318369299173355,
-0.22770993411540985,
-0.27496105432510376,
-0.011279388330876827,
0.1291375458240509,
-0.01726388931274414,
0.06350506842136383,
0.08766534924507141,
0.419437438249588,
-0.1899559497833252,
-0.44520407915115356,
0.11059294641017914,
0.09969867765903473,
-0.08707772195339203,
0.03658795729279518,
-0.043614089488983154,
-0.5624929666519165,
-0.05764181911945343,
-0.15273556113243103,
0.12153159826993942,
0.217629075050354,
0.35443076491355896,
-0.19247376918792725,
0.03192614018917084,
-0.15000605583190918,
0.10502849519252777,
-0.1843222975730896,
0.402580589056015,
0.05085206404328346,
0.22763881087303162,
0.31493544578552246,
0.4919922649860382,
-0.1902744174003601,
0.1715232878923416,
-0.3597536087036133,
0.006576232612133026,
-0.09657905250787735,
0.20528827607631683,
0.10156969726085663,
0.48063886165618896,
-0.032595593482255936,
0.5874007344245911,
0.4865577518939972,
-0.09475502371788025,
-0.27698349952697754,
0.032353632152080536,
0.15814702212810516,
-0.07755817472934723,
0.11043856292963028,
-0.7509757280349731,
0.852429211139679,
-0.01808200404047966,
-0.23129524290561676,
0.4544401466846466,
0.285415381193161,
-0.39819955825805664,
0.030144397169351578,
0.5078802108764648,
0.8721258640289307,
0.12425106018781662,
-0.037691179662942886,
0.4104700982570648,
-0.4999958872795105,
0.3050888776779175,
0.17630107700824738,
0.1813928335905075,
-0.25259408354759216,
0.2059394270181656,
-0.22533124685287476,
-0.2310686856508255,
0.05540657043457031,
-0.21092118322849274,
0.22301903367042542,
0.06265917420387268,
0.45593857765197754,
0.2968810200691223,
0.11577722430229187,
0.25676706433296204,
-0.14934207499027252,
-0.362457811832428,
-0.4080199897289276,
0.06960391998291016,
-0.16385908424854279,
0.01163945160806179,
0.06956478953361511,
-0.40294891595840454,
0.18441855907440186,
-0.22178052365779877,
-0.12941458821296692,
-0.41367119550704956,
-0.6379283666610718,
0.27436697483062744,
0.4318452477455139,
-0.2715861201286316,
0.22600942850112915,
0.04338914901018143,
-0.02863994985818863,
0.01239451952278614,
-0.39787665009498596,
0.372023344039917,
-0.20664077997207642,
-0.20873838663101196,
-0.08218389004468918,
0.02235480025410652,
0.3002606928348541,
-0.07878002524375916,
-0.04084024578332901,
0.09906331449747086,
-0.12577171623706818,
-0.2412288635969162,
-0.2255227267742157,
0.22241923213005066,
0.39010775089263916,
0.03318563103675842,
0.22927017509937286,
0.2431899607181549,
0.3690357506275177,
-0.009919866919517517,
0.10202701389789581,
0.191451758146286,
-0.15806548297405243,
0.24236369132995605,
0.33570683002471924,
0.07272264361381531,
-0.13128595054149628,
0.3530755937099457,
-0.03325306624174118,
-0.36520013213157654,
0.4034727215766907,
0.05713794752955437,
-0.17800767719745636,
-0.1003580391407013,
0.07972950488328934,
-0.07826314121484756,
-0.37991008162498474,
0.12693849205970764,
0.08234535157680511,
-0.09519094973802567,
0.03669053316116333,
0.21734648942947388,
0.1455177366733551,
-0.17808091640472412,
-0.5291557312011719,
0.044687286019325256,
-0.10420747101306915,
0.2746506929397583,
-0.522953987121582,
0.20435623824596405,
0.03940815478563309,
0.03693053871393204,
-0.13753020763397217,
-0.1906045377254486,
-0.32175448536872864,
0.13105659186840057,
0.10746545344591141,
-0.23148414492607117,
0.0065799131989479065,
0.014917269349098206,
0.12725980579853058,
0.05098145827651024,
-0.020002715289592743,
-0.07905641198158264,
-0.35632237792015076,
-0.09988949447870255,
-0.2363279014825821,
0.1352294385433197,
-0.27059563994407654,
0.3342074453830719,
-0.2743692696094513,
-0.3926008939743042,
-0.3475574851036072,
-0.08009237051010132,
-0.19275738298892975,
0.18030846118927002,
0.011198244988918304,
-0.31189438700675964,
-0.11916472017765045,
-0.2543964385986328,
-0.1364375352859497,
0.20739617943763733,
0.14172598719596863,
0.11690212786197662,
0.3541046380996704,
0.2619066834449768,
-0.21868038177490234,
-0.1539202332496643,
0.10652830451726913,
0.2579854130744934,
0.01857682317495346,
-0.2296200394630432,
0.2262382209300995,
-0.018071375787258148,
-0.3451120853424072,
0.13368980586528778,
0.2566280663013458,
0.024058472365140915,
-0.1453648805618286,
0.0515604093670845,
0.39529675245285034,
0.13138318061828613,
-0.1798524558544159,
-0.15976673364639282,
-0.11332961916923523,
0.04902557656168938,
0.11015793681144714,
0.40353822708129883,
0.3108295798301697,
0.08159835636615753,
0.2650834918022156,
0.14284974336624146,
0.41746020317077637,
-0.08787976950407028,
0.032530948519706726,
0.2982442080974579,
0.08013175427913666,
0.08134335279464722,
0.33021780848503113,
0.41919180750846863,
0.47346124053001404,
0.4140082597732544,
-0.4155043959617615,
0.6876770257949829,
0.08329323679208755,
-0.12164521217346191,
0.0012814775109291077,
-0.21789945662021637,
0.08989417552947998,
0.008271276950836182,
0.1344253420829773,
-0.04019795358181,
-0.1357736885547638,
0.6071433424949646,
-0.31770622730255127,
0.10879076272249222,
-0.3577253222465515,
0.20708009600639343,
-0.020385250449180603,
-0.10852226614952087,
-0.0752277821302414,
-0.3105895519256592,
-0.21123813092708588,
-0.07544967532157898,
0.3396892249584198,
-0.1315983682870865,
0.06079409644007683,
-0.2724493145942688,
0.1377934068441391,
-0.006500612944364548,
-0.1932077705860138,
0.27006974816322327,
-0.04575977474451065,
-0.13841767609119415,
0.020291797816753387,
0.00219745934009552,
-0.15437300503253937,
0.07380371540784836,
-0.009105758741497993,
-0.011282738298177719,
0.1025681272149086,
-0.06276266276836395,
-0.08283834904432297,
-0.051735248416662216,
0.03692765533924103,
0.018166400492191315,
0.012251930311322212,
-0.11113107204437256,
0.279680073261261,
0.34246841073036194,
0.07431210577487946,
-0.08947805315256119,
-0.024107199162244797,
-0.0020486488938331604,
0.3875111937522888,
-0.36231130361557007,
0.539093554019928,
0.056511253118515015,
0.09312068670988083,
-0.13401588797569275,
-0.04658203572034836,
-0.2787454128265381,
0.07644662261009216,
0.21304243803024292,
-0.20689578354358673,
-0.12638486921787262,
0.054392486810684204,
0.06939875334501266,
-0.037272389978170395,
0.31931737065315247,
0.12115053832530975,
0.20749735832214355,
0.0297432541847229,
-0.13580116629600525,
-0.42706236243247986,
-0.27812063694000244,
0.33043143153190613,
-0.14026318490505219,
0.09626343101263046,
-0.010287175886332989,
0.21113917231559753,
0.017373215407133102,
0.1982535868883133,
-0.2382507473230362,
0.28668445348739624,
-0.014027178287506104,
-0.30816078186035156,
-0.16605746746063232,
0.0965937077999115,
0.0895443707704544,
0.05522145330905914,
-0.03576704487204552,
-0.22048385441303253,
-0.10869953781366348,
-0.12439854443073273,
-0.3356556296348572,
0.10460688173770905,
0.02727237343788147,
-0.3417007625102997,
0.3023066520690918,
-0.09261348843574524,
-0.004826642572879791,
0.07842680811882019,
0.20785540342330933,
-0.23673906922340393,
-0.04399373009800911,
0.03920922428369522,
-0.30178898572921753,
0.12406840920448303,
0.19888052344322205,
-0.14572715759277344,
-0.20621660351753235,
-0.42804238200187683,
0.06719900667667389,
0.1955479085445404,
0.04221833497285843,
-0.11687739193439484,
0.1359470784664154,
-0.4302162528038025,
-0.01379397977143526,
0.22427386045455933,
0.19275128841400146,
0.06873355060815811,
0.11441618204116821,
-0.22286002337932587,
-0.14580364525318146,
0.7569941878318787,
-0.6280469298362732,
-0.1650453507900238,
-0.015698237344622612,
0.29152190685272217,
0.16426730155944824,
-0.16854704916477203,
-0.6236019134521484,
-0.11617178469896317,
0.19956828653812408,
-0.10707104951143265,
0.07816512882709503,
0.16281205415725708,
-0.15342535078525543,
0.1962367594242096,
-0.08695968985557556,
-0.17587962746620178,
0.1021914854645729,
-0.10389067977666855,
-0.06328855454921722,
-0.13146761059761047
] |
https://github.com/huggingface/datasets/issues/2301 | Unable to setup dev env on Windows | Hi @gchhablani,
There are some 3rd-party dependencies that require to build code in C. In this case, it is the library `python-Levenshtein`.
On Windows, in order to be able to build C code, you need to install at least `Microsoft C++ Build Tools` version 14. You can find more info here: https://visualstudio.microsoft.com/visual-cpp-build-tools/ | Hi
I tried installing the `".[dev]"` version on Windows 10 after cloning.
Here is the error I'm facing:
```bat
(env) C:\testing\datasets>pip install -e ".[dev]"
Obtaining file:///C:/testing/datasets
Requirement already satisfied: numpy>=1.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.5)
Collecting pyarrow>=0.17.1
Using cached pyarrow-4.0.0-cp37-cp37m-win_amd64.whl (13.3 MB)
Requirement already satisfied: dill in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.3.1.1)
Collecting pandas
Using cached pandas-1.2.4-cp37-cp37m-win_amd64.whl (9.1 MB)
Requirement already satisfied: requests>=2.19.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.25.1)
Requirement already satisfied: tqdm<4.50.0,>=4.27 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.49.0)
Requirement already satisfied: xxhash in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.0.2)
Collecting multiprocess
Using cached multiprocess-0.70.11.1-py37-none-any.whl (108 kB)
Requirement already satisfied: fsspec in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2021.4.0)
Collecting huggingface_hub<0.1.0
Using cached huggingface_hub-0.0.8-py3-none-any.whl (34 kB)
Requirement already satisfied: importlib_metadata in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.0.1)
Requirement already satisfied: absl-py in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: pytest in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (6.2.3)
Collecting pytest-xdist
Using cached pytest_xdist-2.2.1-py3-none-any.whl (37 kB)
Collecting apache-beam>=2.24.0
Using cached apache_beam-2.29.0-cp37-cp37m-win_amd64.whl (3.7 MB)
Collecting elasticsearch
Using cached elasticsearch-7.12.1-py2.py3-none-any.whl (339 kB)
Requirement already satisfied: boto3==1.16.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.16.43)
Requirement already satisfied: botocore==1.19.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.43)
Collecting moto[s3]==1.3.16
Using cached moto-1.3.16-py2.py3-none-any.whl (879 kB)
Collecting rarfile>=4.0
Using cached rarfile-4.0-py3-none-any.whl (28 kB)
Collecting tensorflow>=2.3
Using cached tensorflow-2.4.1-cp37-cp37m-win_amd64.whl (370.7 MB)
Requirement already satisfied: torch in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.8.1)
Requirement already satisfied: transformers in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.5.1)
Collecting bs4
Using cached bs4-0.0.1-py3-none-any.whl
Collecting conllu
Using cached conllu-4.4-py2.py3-none-any.whl (15 kB)
Collecting langdetect
Using cached langdetect-1.0.8-py3-none-any.whl
Collecting lxml
Using cached lxml-4.6.3-cp37-cp37m-win_amd64.whl (3.5 MB)
Collecting mwparserfromhell
Using cached mwparserfromhell-0.6-cp37-cp37m-win_amd64.whl (101 kB)
Collecting nltk
Using cached nltk-3.6.2-py3-none-any.whl (1.5 MB)
Collecting openpyxl
Using cached openpyxl-3.0.7-py2.py3-none-any.whl (243 kB)
Collecting py7zr
Using cached py7zr-0.15.2-py3-none-any.whl (66 kB)
Collecting tldextract
Using cached tldextract-3.1.0-py2.py3-none-any.whl (87 kB)
Collecting zstandard
Using cached zstandard-0.15.2-cp37-cp37m-win_amd64.whl (582 kB)
Collecting bert_score>=0.3.6
Using cached bert_score-0.3.9-py3-none-any.whl (59 kB)
Collecting rouge_score
Using cached rouge_score-0.0.4-py2.py3-none-any.whl (22 kB)
Collecting sacrebleu
Using cached sacrebleu-1.5.1-py3-none-any.whl (54 kB)
Requirement already satisfied: scipy in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Collecting seqeval
Using cached seqeval-1.2.2-py3-none-any.whl
Collecting sklearn
Using cached sklearn-0.0-py2.py3-none-any.whl
Collecting jiwer
Using cached jiwer-2.2.0-py3-none-any.whl (13 kB)
Requirement already satisfied: toml>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: requests_file>=1.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.5.1)
Requirement already satisfied: texttable>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Requirement already satisfied: s3fs>=0.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.4.2)
Requirement already satisfied: Werkzeug>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.0.1)
Collecting black
Using cached black-21.4b2-py3-none-any.whl (130 kB)
Collecting isort
Using cached isort-5.8.0-py3-none-any.whl (103 kB)
Collecting flake8==3.7.9
Using cached flake8-3.7.9-py2.py3-none-any.whl (69 kB)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.3.7)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (1.26.4)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (2.8.1)
Collecting entrypoints<0.4.0,>=0.3.0
Using cached entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting pyflakes<2.2.0,>=2.1.0
Using cached pyflakes-2.1.1-py2.py3-none-any.whl (59 kB)
Collecting pycodestyle<2.6.0,>=2.5.0
Using cached pycodestyle-2.5.0-py2.py3-none-any.whl (51 kB)
Collecting mccabe<0.7.0,>=0.6.0
Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Requirement already satisfied: jsondiff>=1.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: pytz in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2021.1)
Requirement already satisfied: mock in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.0.3)
Requirement already satisfied: MarkupSafe<2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: python-jose[cryptography]<4.0.0,>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: aws-xray-sdk!=0.96,>=0.93 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.8.0)
Requirement already satisfied: cryptography>=2.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.7)
Requirement already satisfied: more-itertools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (8.7.0)
Requirement already satisfied: PyYAML>=5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.4.1)
Requirement already satisfied: boto>=2.36.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.49.0)
Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.10)
Requirement already satisfied: sshpubkeys>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.3.1)
Requirement already satisfied: responses>=0.9.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.13.3)
Requirement already satisfied: xmltodict in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (52.0.0.post20210125)
Requirement already satisfied: Jinja2>=2.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.11.3)
Requirement already satisfied: zipp in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.1)
Requirement already satisfied: six>1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.15.0)
Requirement already satisfied: ecdsa<0.15 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.14.1)
Requirement already satisfied: docker>=2.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.0.0)
Requirement already satisfied: cfn-lint>=0.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.49.0)
Requirement already satisfied: grpcio<2,>=1.29.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (1.32.0)
Collecting hdfs<3.0.0,>=2.1.0
Using cached hdfs-2.6.0-py3-none-any.whl (33 kB)
Collecting pyarrow>=0.17.1
Using cached pyarrow-3.0.0-cp37-cp37m-win_amd64.whl (12.6 MB)
Collecting fastavro<2,>=0.21.4
Using cached fastavro-1.4.0-cp37-cp37m-win_amd64.whl (394 kB)
Requirement already satisfied: httplib2<0.18.0,>=0.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.17.4)
Collecting pymongo<4.0.0,>=3.8.0
Using cached pymongo-3.11.3-cp37-cp37m-win_amd64.whl (382 kB)
Collecting crcmod<2.0,>=1.7
Using cached crcmod-1.7-py3-none-any.whl
Collecting avro-python3!=1.9.2,<1.10.0,>=1.8.1
Using cached avro_python3-1.9.2.1-py3-none-any.whl
Requirement already satisfied: typing-extensions<3.8.0,>=3.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.7.4.3)
Requirement already satisfied: future<1.0.0,>=0.18.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.18.2)
Collecting oauth2client<5,>=2.0.1
Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Collecting pydot<2,>=1.2.0
Using cached pydot-1.4.2-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: protobuf<4,>=3.12.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.15.8)
Requirement already satisfied: wrapt in c:\programdata\anaconda3\envs\env\lib\site-packages (from aws-xray-sdk!=0.96,>=0.93->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.12.1)
Collecting matplotlib
Using cached matplotlib-3.4.1-cp37-cp37m-win_amd64.whl (7.1 MB)
Requirement already satisfied: junit-xml~=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.9)
Requirement already satisfied: jsonpatch in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.32)
Requirement already satisfied: jsonschema~=3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: networkx~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.5.1)
Requirement already satisfied: aws-sam-translator>=1.35.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.35.0)
Requirement already satisfied: cffi>=1.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.14.5)
Requirement already satisfied: pycparser in c:\programdata\anaconda3\envs\env\lib\site-packages (from cffi>=1.12->cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.20)
Requirement already satisfied: pywin32==227 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (227)
Requirement already satisfied: websocket-client>=0.32.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.58.0)
Requirement already satisfied: docopt in c:\programdata\anaconda3\envs\env\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.6.2)
Requirement already satisfied: filelock in c:\programdata\anaconda3\envs\env\lib\site-packages (from huggingface_hub<0.1.0->datasets==1.5.0.dev0) (3.0.12)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (20.3.0)
Requirement already satisfied: decorator<5,>=4.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from networkx~=2.4->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.4.2)
Requirement already satisfied: rsa>=3.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (4.7.2)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.2.8)
Requirement already satisfied: pyasn1>=0.1.7 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.4.8)
Requirement already satisfied: pyparsing>=2.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pydot<2,>=1.2.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (2.4.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (4.0.0)
Collecting keras-preprocessing~=1.1.2
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: termcolor~=1.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (1.1.0)
Requirement already satisfied: tensorboard~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.5.0)
Requirement already satisfied: wheel~=0.35 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (0.36.2)
Collecting opt-einsum~=3.3.0
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting google-pasta~=0.2
Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Requirement already satisfied: tensorflow-estimator<2.5.0,>=2.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.4.0)
Collecting astunparse~=1.6.3
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting flatbuffers~=1.12.0
Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting h5py~=2.10.0
Using cached h5py-2.10.0-cp37-cp37m-win_amd64.whl (2.5 MB)
Requirement already satisfied: markdown>=2.6.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.3.4)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.8.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.4.4)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.6.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.30.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (4.2.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: oauthlib>=3.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.1.0)
Requirement already satisfied: regex!=2019.12.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (2021.4.4)
Requirement already satisfied: tokenizers<0.11,>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: sacremoses in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.0.45)
Requirement already satisfied: packaging in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (20.9)
Collecting pathspec<1,>=0.8.1
Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB)
Requirement already satisfied: click>=7.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (7.1.2)
Collecting appdirs
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting mypy-extensions>=0.4.3
Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Requirement already satisfied: typed-ast>=1.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (1.4.3)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
Requirement already satisfied: soupsieve>1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from beautifulsoup4->bs4->datasets==1.5.0.dev0) (2.2.1)
Collecting python-Levenshtein
Using cached python-Levenshtein-0.12.2.tar.gz (50 kB)
Requirement already satisfied: jsonpointer>=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonpatch->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.1)
Requirement already satisfied: pillow>=6.2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (8.2.0)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (1.3.1)
Collecting multiprocess
Using cached multiprocess-0.70.11-py3-none-any.whl (98 kB)
Using cached multiprocess-0.70.10.zip (2.4 MB)
Using cached multiprocess-0.70.9-py3-none-any.whl
Requirement already satisfied: joblib in c:\programdata\anaconda3\envs\env\lib\site-packages (from nltk->datasets==1.5.0.dev0) (1.0.1)
Collecting et-xmlfile
Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Requirement already satisfied: pyzstd<0.15.0,>=0.14.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from py7zr->datasets==1.5.0.dev0) (0.14.4)
Collecting pyppmd<0.13.0,>=0.12.1
Using cached pyppmd-0.12.1-cp37-cp37m-win_amd64.whl (32 kB)
Collecting pycryptodome>=3.6.6
Using cached pycryptodome-3.10.1-cp35-abi3-win_amd64.whl (1.6 MB)
Collecting bcj-cffi<0.6.0,>=0.5.1
Using cached bcj_cffi-0.5.1-cp37-cp37m-win_amd64.whl (21 kB)
Collecting multivolumefile<0.3.0,>=0.2.0
Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Requirement already satisfied: iniconfig in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: py>=1.8.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.10.0)
Requirement already satisfied: pluggy<1.0.0a1,>=0.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.13.1)
Requirement already satisfied: atomicwrites>=1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.4.0)
Requirement already satisfied: colorama in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.4.4)
Collecting pytest-forked
Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB)
Collecting execnet>=1.1
Using cached execnet-1.8.0-py2.py3-none-any.whl (39 kB)
Requirement already satisfied: apipkg>=1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from execnet>=1.1->pytest-xdist->datasets==1.5.0.dev0) (1.5)
Collecting portalocker==2.0.0
Using cached portalocker-2.0.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: scikit-learn>=0.21.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from seqeval->datasets==1.5.0.dev0) (0.24.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->datasets==1.5.0.dev0) (2.1.0)
Building wheels for collected packages: python-Levenshtein
Building wheel for python-Levenshtein (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\VKC~1\AppData\Local\Temp\pip-wheel-8jh7fm18'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for python-Levenshtein
Running setup.py clean for python-Levenshtein
Failed to build python-Levenshtein
Installing collected packages: python-Levenshtein, pytest-forked, pyppmd, pymongo, pyflakes, pydot, pycryptodome, pycodestyle, pyarrow, portalocker, pathspec, pandas, opt-einsum, oauth2client, nltk, mypy-extensions, multivolumefile, multiprocess, moto, mccabe, matplotlib, keras-preprocessing, huggingface-hub, hdfs, h5py, google-pasta, gast, flatbuffers, fastavro, execnet, et-xmlfile, entrypoints, crcmod, beautifulsoup4, bcj-cffi, avro-python3, astunparse, appdirs, zstandard, tldextract, tensorflow, sklearn, seqeval, sacrebleu, rouge-score, rarfile, pytest-xdist, py7zr, openpyxl, mwparserfromhell, lxml, langdetect, jiwer, isort, flake8, elasticsearch, datasets, conllu, bs4, black, bert-score, apache-beam
Running setup.py install for python-Levenshtein ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein' Check the logs for full command output.
```
Here are conda and python versions:
```bat
(env) C:\testing\datasets>conda --version
conda 4.9.2
(env) C:\testing\datasets>python --version
Python 3.7.10
```
Please help me out. Thanks. | 52 | Unable to setup dev env on Windows
Hi
I tried installing the `".[dev]"` version on Windows 10 after cloning.
Here is the error I'm facing:
```bat
(env) C:\testing\datasets>pip install -e ".[dev]"
Obtaining file:///C:/testing/datasets
Requirement already satisfied: numpy>=1.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.5)
Collecting pyarrow>=0.17.1
Using cached pyarrow-4.0.0-cp37-cp37m-win_amd64.whl (13.3 MB)
Requirement already satisfied: dill in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.3.1.1)
Collecting pandas
Using cached pandas-1.2.4-cp37-cp37m-win_amd64.whl (9.1 MB)
Requirement already satisfied: requests>=2.19.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.25.1)
Requirement already satisfied: tqdm<4.50.0,>=4.27 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.49.0)
Requirement already satisfied: xxhash in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2.0.2)
Collecting multiprocess
Using cached multiprocess-0.70.11.1-py37-none-any.whl (108 kB)
Requirement already satisfied: fsspec in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (2021.4.0)
Collecting huggingface_hub<0.1.0
Using cached huggingface_hub-0.0.8-py3-none-any.whl (34 kB)
Requirement already satisfied: importlib_metadata in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.0.1)
Requirement already satisfied: absl-py in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: pytest in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (6.2.3)
Collecting pytest-xdist
Using cached pytest_xdist-2.2.1-py3-none-any.whl (37 kB)
Collecting apache-beam>=2.24.0
Using cached apache_beam-2.29.0-cp37-cp37m-win_amd64.whl (3.7 MB)
Collecting elasticsearch
Using cached elasticsearch-7.12.1-py2.py3-none-any.whl (339 kB)
Requirement already satisfied: boto3==1.16.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.16.43)
Requirement already satisfied: botocore==1.19.43 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.19.43)
Collecting moto[s3]==1.3.16
Using cached moto-1.3.16-py2.py3-none-any.whl (879 kB)
Collecting rarfile>=4.0
Using cached rarfile-4.0-py3-none-any.whl (28 kB)
Collecting tensorflow>=2.3
Using cached tensorflow-2.4.1-cp37-cp37m-win_amd64.whl (370.7 MB)
Requirement already satisfied: torch in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.8.1)
Requirement already satisfied: transformers in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (4.5.1)
Collecting bs4
Using cached bs4-0.0.1-py3-none-any.whl
Collecting conllu
Using cached conllu-4.4-py2.py3-none-any.whl (15 kB)
Collecting langdetect
Using cached langdetect-1.0.8-py3-none-any.whl
Collecting lxml
Using cached lxml-4.6.3-cp37-cp37m-win_amd64.whl (3.5 MB)
Collecting mwparserfromhell
Using cached mwparserfromhell-0.6-cp37-cp37m-win_amd64.whl (101 kB)
Collecting nltk
Using cached nltk-3.6.2-py3-none-any.whl (1.5 MB)
Collecting openpyxl
Using cached openpyxl-3.0.7-py2.py3-none-any.whl (243 kB)
Collecting py7zr
Using cached py7zr-0.15.2-py3-none-any.whl (66 kB)
Collecting tldextract
Using cached tldextract-3.1.0-py2.py3-none-any.whl (87 kB)
Collecting zstandard
Using cached zstandard-0.15.2-cp37-cp37m-win_amd64.whl (582 kB)
Collecting bert_score>=0.3.6
Using cached bert_score-0.3.9-py3-none-any.whl (59 kB)
Collecting rouge_score
Using cached rouge_score-0.0.4-py2.py3-none-any.whl (22 kB)
Collecting sacrebleu
Using cached sacrebleu-1.5.1-py3-none-any.whl (54 kB)
Requirement already satisfied: scipy in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Collecting seqeval
Using cached seqeval-1.2.2-py3-none-any.whl
Collecting sklearn
Using cached sklearn-0.0-py2.py3-none-any.whl
Collecting jiwer
Using cached jiwer-2.2.0-py3-none-any.whl (13 kB)
Requirement already satisfied: toml>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: requests_file>=1.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.5.1)
Requirement already satisfied: texttable>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.6.3)
Requirement already satisfied: s3fs>=0.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (0.4.2)
Requirement already satisfied: Werkzeug>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from datasets==1.5.0.dev0) (1.0.1)
Collecting black
Using cached black-21.4b2-py3-none-any.whl (130 kB)
Collecting isort
Using cached isort-5.8.0-py3-none-any.whl (103 kB)
Collecting flake8==3.7.9
Using cached flake8-3.7.9-py2.py3-none-any.whl (69 kB)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from boto3==1.16.43->datasets==1.5.0.dev0) (0.3.7)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (1.26.4)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from botocore==1.19.43->datasets==1.5.0.dev0) (2.8.1)
Collecting entrypoints<0.4.0,>=0.3.0
Using cached entrypoints-0.3-py2.py3-none-any.whl (11 kB)
Collecting pyflakes<2.2.0,>=2.1.0
Using cached pyflakes-2.1.1-py2.py3-none-any.whl (59 kB)
Collecting pycodestyle<2.6.0,>=2.5.0
Using cached pycodestyle-2.5.0-py2.py3-none-any.whl (51 kB)
Collecting mccabe<0.7.0,>=0.6.0
Using cached mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Requirement already satisfied: jsondiff>=1.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: pytz in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2021.1)
Requirement already satisfied: mock in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.0.3)
Requirement already satisfied: MarkupSafe<2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: python-jose[cryptography]<4.0.0,>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: aws-xray-sdk!=0.96,>=0.93 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.8.0)
Requirement already satisfied: cryptography>=2.3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.7)
Requirement already satisfied: more-itertools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (8.7.0)
Requirement already satisfied: PyYAML>=5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.4.1)
Requirement already satisfied: boto>=2.36.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.49.0)
Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.10)
Requirement already satisfied: sshpubkeys>=3.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.3.1)
Requirement already satisfied: responses>=0.9.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.13.3)
Requirement already satisfied: xmltodict in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.12.0)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (52.0.0.post20210125)
Requirement already satisfied: Jinja2>=2.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.11.3)
Requirement already satisfied: zipp in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.4.1)
Requirement already satisfied: six>1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.15.0)
Requirement already satisfied: ecdsa<0.15 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.14.1)
Requirement already satisfied: docker>=2.5.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (5.0.0)
Requirement already satisfied: cfn-lint>=0.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.49.0)
Requirement already satisfied: grpcio<2,>=1.29.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (1.32.0)
Collecting hdfs<3.0.0,>=2.1.0
Using cached hdfs-2.6.0-py3-none-any.whl (33 kB)
Collecting pyarrow>=0.17.1
Using cached pyarrow-3.0.0-cp37-cp37m-win_amd64.whl (12.6 MB)
Collecting fastavro<2,>=0.21.4
Using cached fastavro-1.4.0-cp37-cp37m-win_amd64.whl (394 kB)
Requirement already satisfied: httplib2<0.18.0,>=0.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.17.4)
Collecting pymongo<4.0.0,>=3.8.0
Using cached pymongo-3.11.3-cp37-cp37m-win_amd64.whl (382 kB)
Collecting crcmod<2.0,>=1.7
Using cached crcmod-1.7-py3-none-any.whl
Collecting avro-python3!=1.9.2,<1.10.0,>=1.8.1
Using cached avro_python3-1.9.2.1-py3-none-any.whl
Requirement already satisfied: typing-extensions<3.8.0,>=3.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.7.4.3)
Requirement already satisfied: future<1.0.0,>=0.18.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.18.2)
Collecting oauth2client<5,>=2.0.1
Using cached oauth2client-4.1.3-py2.py3-none-any.whl (98 kB)
Collecting pydot<2,>=1.2.0
Using cached pydot-1.4.2-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: protobuf<4,>=3.12.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from apache-beam>=2.24.0->datasets==1.5.0.dev0) (3.15.8)
Requirement already satisfied: wrapt in c:\programdata\anaconda3\envs\env\lib\site-packages (from aws-xray-sdk!=0.96,>=0.93->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.12.1)
Collecting matplotlib
Using cached matplotlib-3.4.1-cp37-cp37m-win_amd64.whl (7.1 MB)
Requirement already satisfied: junit-xml~=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.9)
Requirement already satisfied: jsonpatch in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.32)
Requirement already satisfied: jsonschema~=3.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (3.2.0)
Requirement already satisfied: networkx~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.5.1)
Requirement already satisfied: aws-sam-translator>=1.35.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.35.0)
Requirement already satisfied: cffi>=1.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (1.14.5)
Requirement already satisfied: pycparser in c:\programdata\anaconda3\envs\env\lib\site-packages (from cffi>=1.12->cryptography>=2.3.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.20)
Requirement already satisfied: pywin32==227 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (227)
Requirement already satisfied: websocket-client>=0.32.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from docker>=2.5.1->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.58.0)
Requirement already satisfied: docopt in c:\programdata\anaconda3\envs\env\lib\site-packages (from hdfs<3.0.0,>=2.1.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.6.2)
Requirement already satisfied: filelock in c:\programdata\anaconda3\envs\env\lib\site-packages (from huggingface_hub<0.1.0->datasets==1.5.0.dev0) (3.0.12)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (0.17.3)
Requirement already satisfied: attrs>=17.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonschema~=3.0->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (20.3.0)
Requirement already satisfied: decorator<5,>=4.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from networkx~=2.4->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (4.4.2)
Requirement already satisfied: rsa>=3.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (4.7.2)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.2.8)
Requirement already satisfied: pyasn1>=0.1.7 in c:\programdata\anaconda3\envs\env\lib\site-packages (from oauth2client<5,>=2.0.1->apache-beam>=2.24.0->datasets==1.5.0.dev0) (0.4.8)
Requirement already satisfied: pyparsing>=2.1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pydot<2,>=1.2.0->apache-beam>=2.24.0->datasets==1.5.0.dev0) (2.4.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (2020.12.5)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests>=2.19.0->datasets==1.5.0.dev0) (4.0.0)
Collecting keras-preprocessing~=1.1.2
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: termcolor~=1.1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (1.1.0)
Requirement already satisfied: tensorboard~=2.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.5.0)
Requirement already satisfied: wheel~=0.35 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (0.36.2)
Collecting opt-einsum~=3.3.0
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting google-pasta~=0.2
Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Requirement already satisfied: tensorflow-estimator<2.5.0,>=2.4.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorflow>=2.3->datasets==1.5.0.dev0) (2.4.0)
Collecting astunparse~=1.6.3
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting flatbuffers~=1.12.0
Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting h5py~=2.10.0
Using cached h5py-2.10.0-cp37-cp37m-win_amd64.whl (2.5 MB)
Requirement already satisfied: markdown>=2.6.8 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.3.4)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.8.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.4.4)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (0.6.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.30.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (4.2.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (1.3.0)
Requirement already satisfied: oauthlib>=3.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.4->tensorflow>=2.3->datasets==1.5.0.dev0) (3.1.0)
Requirement already satisfied: regex!=2019.12.17 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (2021.4.4)
Requirement already satisfied: tokenizers<0.11,>=0.10.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.10.2)
Requirement already satisfied: sacremoses in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (0.0.45)
Requirement already satisfied: packaging in c:\programdata\anaconda3\envs\env\lib\site-packages (from transformers->datasets==1.5.0.dev0) (20.9)
Collecting pathspec<1,>=0.8.1
Using cached pathspec-0.8.1-py2.py3-none-any.whl (28 kB)
Requirement already satisfied: click>=7.1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (7.1.2)
Collecting appdirs
Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting mypy-extensions>=0.4.3
Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Requirement already satisfied: typed-ast>=1.4.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from black->datasets==1.5.0.dev0) (1.4.3)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
Requirement already satisfied: soupsieve>1.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from beautifulsoup4->bs4->datasets==1.5.0.dev0) (2.2.1)
Collecting python-Levenshtein
Using cached python-Levenshtein-0.12.2.tar.gz (50 kB)
Requirement already satisfied: jsonpointer>=1.9 in c:\programdata\anaconda3\envs\env\lib\site-packages (from jsonpatch->cfn-lint>=0.4.0->moto[s3]==1.3.16->datasets==1.5.0.dev0) (2.1)
Requirement already satisfied: pillow>=6.2.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (8.2.0)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\envs\env\lib\site-packages (from matplotlib->bert_score>=0.3.6->datasets==1.5.0.dev0) (1.3.1)
Collecting multiprocess
Using cached multiprocess-0.70.11-py3-none-any.whl (98 kB)
Using cached multiprocess-0.70.10.zip (2.4 MB)
Using cached multiprocess-0.70.9-py3-none-any.whl
Requirement already satisfied: joblib in c:\programdata\anaconda3\envs\env\lib\site-packages (from nltk->datasets==1.5.0.dev0) (1.0.1)
Collecting et-xmlfile
Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Requirement already satisfied: pyzstd<0.15.0,>=0.14.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from py7zr->datasets==1.5.0.dev0) (0.14.4)
Collecting pyppmd<0.13.0,>=0.12.1
Using cached pyppmd-0.12.1-cp37-cp37m-win_amd64.whl (32 kB)
Collecting pycryptodome>=3.6.6
Using cached pycryptodome-3.10.1-cp35-abi3-win_amd64.whl (1.6 MB)
Collecting bcj-cffi<0.6.0,>=0.5.1
Using cached bcj_cffi-0.5.1-cp37-cp37m-win_amd64.whl (21 kB)
Collecting multivolumefile<0.3.0,>=0.2.0
Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Requirement already satisfied: iniconfig in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.1.1)
Requirement already satisfied: py>=1.8.2 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.10.0)
Requirement already satisfied: pluggy<1.0.0a1,>=0.12 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.13.1)
Requirement already satisfied: atomicwrites>=1.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (1.4.0)
Requirement already satisfied: colorama in c:\programdata\anaconda3\envs\env\lib\site-packages (from pytest->datasets==1.5.0.dev0) (0.4.4)
Collecting pytest-forked
Using cached pytest_forked-1.3.0-py2.py3-none-any.whl (4.7 kB)
Collecting execnet>=1.1
Using cached execnet-1.8.0-py2.py3-none-any.whl (39 kB)
Requirement already satisfied: apipkg>=1.4 in c:\programdata\anaconda3\envs\env\lib\site-packages (from execnet>=1.1->pytest-xdist->datasets==1.5.0.dev0) (1.5)
Collecting portalocker==2.0.0
Using cached portalocker-2.0.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: scikit-learn>=0.21.3 in c:\programdata\anaconda3\envs\env\lib\site-packages (from seqeval->datasets==1.5.0.dev0) (0.24.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\programdata\anaconda3\envs\env\lib\site-packages (from scikit-learn>=0.21.3->seqeval->datasets==1.5.0.dev0) (2.1.0)
Building wheels for collected packages: python-Levenshtein
Building wheel for python-Levenshtein (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\VKC~1\AppData\Local\Temp\pip-wheel-8jh7fm18'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for python-Levenshtein
Running setup.py clean for python-Levenshtein
Failed to build python-Levenshtein
Installing collected packages: python-Levenshtein, pytest-forked, pyppmd, pymongo, pyflakes, pydot, pycryptodome, pycodestyle, pyarrow, portalocker, pathspec, pandas, opt-einsum, oauth2client, nltk, mypy-extensions, multivolumefile, multiprocess, moto, mccabe, matplotlib, keras-preprocessing, huggingface-hub, hdfs, h5py, google-pasta, gast, flatbuffers, fastavro, execnet, et-xmlfile, entrypoints, crcmod, beautifulsoup4, bcj-cffi, avro-python3, astunparse, appdirs, zstandard, tldextract, tensorflow, sklearn, seqeval, sacrebleu, rouge-score, rarfile, pytest-xdist, py7zr, openpyxl, mwparserfromhell, lxml, langdetect, jiwer, isort, flake8, elasticsearch, datasets, conllu, bs4, black, bert-score, apache-beam
Running setup.py install for python-Levenshtein ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein'
cwd: C:\Users\VKC~1\AppData\Local\Temp\pip-install-ynt_dbm4\python-levenshtein_c02e7e6f9def4629a475349654670ae9\
Complete output (27 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\StringMatcher.py -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\__init__.py -> build\lib.win-amd64-3.7\Levenshtein
running egg_info
writing python_Levenshtein.egg-info\PKG-INFO
writing dependency_links to python_Levenshtein.egg-info\dependency_links.txt
writing entry points to python_Levenshtein.egg-info\entry_points.txt
writing namespace_packages to python_Levenshtein.egg-info\namespace_packages.txt
writing requirements to python_Levenshtein.egg-info\requires.txt
writing top-level names to python_Levenshtein.egg-info\top_level.txt
reading manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files matching '*so' found anywhere in distribution
warning: no previously-included files matching '.project' found anywhere in distribution
warning: no previously-included files matching '.pydevproject' found anywhere in distribution
writing manifest file 'python_Levenshtein.egg-info\SOURCES.txt'
copying Levenshtein\_levenshtein.c -> build\lib.win-amd64-3.7\Levenshtein
copying Levenshtein\_levenshtein.h -> build\lib.win-amd64-3.7\Levenshtein
running build_ext
building 'Levenshtein._levenshtein' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\envs\env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"'; __file__='"'"'C:\\Users\\VKC~1\\AppData\\Local\\Temp\\pip-install-ynt_dbm4\\python-levenshtein_c02e7e6f9def4629a475349654670ae9\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\VKC~1\AppData\Local\Temp\pip-record-v7l7zitb\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\envs\env\Include\python-Levenshtein' Check the logs for full command output.
```
Here are conda and python versions:
```bat
(env) C:\testing\datasets>conda --version
conda 4.9.2
(env) C:\testing\datasets>python --version
Python 3.7.10
```
Please help me out. Thanks.
Hi @gchhablani,
There are some 3rd-party dependencies that require to build code in C. In this case, it is the library `python-Levenshtein`.
On Windows, in order to be able to build C code, you need to install at least `Microsoft C++ Build Tools` version 14. You can find more info here: https://visualstudio.microsoft.com/visual-cpp-build-tools/ | [
-0.41213393211364746,
-0.08557842671871185,
-0.09772755205631256,
-0.13878096640110016,
0.3114476203918457,
0.06837529689073563,
0.34485089778900146,
0.04658693075180054,
-0.10013063251972198,
0.1562349498271942,
0.04337969422340393,
0.24242688715457916,
0.15818381309509277,
0.21629729866981506,
0.054578304290771484,
0.023214001208543777,
0.13606767356395721,
0.4390757381916046,
-0.21859648823738098,
0.037439100444316864,
-0.06599561870098114,
-0.02088615484535694,
-0.1535535454750061,
-0.04361125826835632,
0.3134842813014984,
-0.026473937556147575,
-0.2292299121618271,
0.17532256245613098,
-0.3534283936023712,
-0.32255879044532776,
0.4030124247074127,
-0.10645872354507446,
0.43290403485298157,
0.13276296854019165,
-0.00011717670713551342,
0.20160998404026031,
0.32230252027511597,
-0.15532401204109192,
-0.09093651175498962,
0.01661963015794754,
-0.07410453259944916,
-0.41878825426101685,
-0.05707543343305588,
-0.11522016674280167,
0.0013725794851779938,
-0.31531068682670593,
0.1467730849981308,
-0.30422163009643555,
0.09352745860815048,
0.17656053602695465,
0.1489831507205963,
0.015820950269699097,
0.3976292610168457,
-0.059944186359643936,
-0.08972618728876114,
0.22289371490478516,
-0.10478412359952927,
0.2224467545747757,
0.38086816668510437,
-0.07679323107004166,
0.2623264193534851,
-0.01506325975060463,
0.21225643157958984,
0.08881369233131409,
0.16051137447357178,
0.09113956242799759,
0.8259809017181396,
-0.33345338702201843,
-0.012498825788497925,
-0.05832502245903015,
0.44556498527526855,
-0.12565407156944275,
-0.25525572896003723,
0.24728178977966309,
0.14140157401561737,
-0.3256051242351532,
0.26148828864097595,
0.3790610432624817,
-0.3644769787788391,
0.043596938252449036,
-0.3627217710018158,
-0.2574133276939392,
-0.4395216405391693,
0.014961149543523788,
0.11800630390644073,
0.08262907713651657,
0.1625451147556305,
0.14495748281478882,
-0.06603097915649414,
0.08149723708629608,
0.4332491159439087,
0.07809393107891083,
-0.1706448346376419,
0.019413935020565987,
-0.13337095081806183,
-0.1515955775976181,
-0.28764286637306213,
0.3090682327747345,
-0.011988133192062378,
0.012072166427969933,
-0.3012442886829376,
-0.20721325278282166,
0.2847517430782318,
0.07405604422092438,
-0.02110949158668518,
0.3143171966075897,
0.06712590903043747,
-0.07949639111757278,
0.10013765096664429,
-0.10349270701408386,
0.4024326801300049,
0.09542611241340637,
-0.22041009366512299,
-0.484109491109848,
-0.19152197241783142,
0.5020327568054199,
0.08108994364738464,
-0.1381358951330185,
-0.22528475522994995,
-0.05528254806995392,
-0.2780647575855255,
0.14334866404533386,
0.22622735798358917,
0.24791505932807922,
-0.09058675169944763,
-0.09759392589330673,
0.02456362545490265,
0.2494821697473526,
-0.20538155734539032,
0.11131899058818817,
0.12608583271503448,
0.15315891802310944,
-0.4578867554664612,
-0.362882524728775,
0.25663575530052185,
-0.2950878441333771,
0.3838176727294922,
0.2732482850551605,
-0.07953336834907532,
0.2728428244590759,
-0.09126444160938263,
0.1905030608177185,
0.1253395825624466,
0.2146688997745514,
0.19241222739219666,
0.18685570359230042,
-0.00179363414645195,
-0.2911956310272217,
-0.041869595646858215,
0.2853320837020874,
0.01682821661233902,
-0.22463776171207428,
-0.34715643525123596,
0.10825414955615997,
-0.11177034676074982,
0.017555050551891327,
0.0353536382317543,
-0.06905964016914368,
0.08877582103013992,
0.12037549912929535,
-0.05264029651880264,
-0.19250552356243134,
0.019580040127038956,
-0.1289803832769394,
0.3793908655643463,
0.06874502450227737,
-0.406345933675766,
0.2841973900794983,
0.07734139263629913,
-0.1427750289440155,
0.16882821917533875,
0.03243360295891762,
-0.0016665906878188252,
0.1482703983783722,
-0.24153538048267365,
-0.20943816006183624,
-0.10050147026777267,
-0.4556679129600525,
-0.17197442054748535,
0.3552173674106598,
-0.0028999820351600647,
-0.45980724692344666,
0.2365483045578003,
-0.12012168020009995,
0.0676400363445282,
-0.16521206498146057,
-0.08831049501895905,
0.22769635915756226,
-0.03513636440038681,
-0.21453014016151428,
-0.1688685417175293,
-0.26386743783950806,
0.1783899962902069,
-0.022046338766813278,
-0.010109655559062958,
-0.2324419617652893,
-0.019816160202026367,
-0.18453560769557953,
-0.03889837861061096,
-0.15673203766345978,
0.20392075181007385,
0.3812168836593628,
0.5579847097396851,
-0.08165596425533295,
-0.06846017390489578,
0.048234157264232635,
-0.1448994278907776,
0.15902206301689148,
-0.43441104888916016,
0.10754388570785522,
-0.021733358502388,
0.14932841062545776,
-0.04667552188038826,
0.08531027287244797,
-0.44966790080070496,
-0.37118053436279297,
0.11678832769393921,
0.007945649325847626,
0.3306218087673187,
-0.07434730976819992,
0.17988760769367218,
0.06930513679981232,
0.03243640810251236,
0.10599762946367264,
-0.1664109230041504,
0.13431985676288605,
-0.7459346055984497,
-0.01682037115097046,
-0.10435710847377777,
0.10431461781263351,
0.035591334104537964,
-0.07695186138153076,
0.03828340768814087,
0.15906260907649994,
-0.15849606692790985,
-0.3072968125343323,
-0.041363514959812164,
-0.3169019818305969,
0.21252304315567017,
-0.5566607713699341,
0.2742677628993988,
0.1649560183286667,
0.027389463037252426,
0.17218360304832458,
-0.08107572048902512,
-0.12467184662818909,
-0.28036996722221375,
-0.03416215628385544,
-0.07679498195648193,
0.29716798663139343,
0.30423685908317566,
0.04945242032408714,
0.02072184346616268,
-0.19337770342826843,
0.4338947832584381,
0.5759022235870361,
0.03132123127579689,
-0.3306668996810913,
0.21044299006462097,
0.04144095256924629,
-0.19869115948677063,
-0.019655689597129822,
-0.14210698008537292,
-0.06585938483476639,
-0.0807880088686943,
0.03479126840829849,
0.15871122479438782,
-0.04065781831741333,
0.5600032806396484,
0.13665950298309326,
-0.012820642441511154,
0.22361509501934052,
-0.2414540946483612,
-0.029023004695773125,
0.4613453149795532,
-0.0718427300453186,
-0.04329454526305199,
0.116050124168396,
-0.3231313228607178,
-0.10074550658464432,
-0.015039199963212013,
-0.20765875279903412,
0.4360065460205078,
0.36661311984062195,
-0.41454029083251953,
-0.08729811757802963,
-0.42510703206062317,
0.017941679805517197,
-0.38456395268440247,
-0.5058634877204895,
-0.14852836728096008,
0.07296906411647797,
0.20870745182037354,
-0.11593262851238251,
0.2937578558921814,
0.3787652552127838,
0.17094489932060242,
-0.18176348507404327,
-0.048366326838731766,
-0.011140437796711922,
-0.0018848292529582977,
-0.012381328269839287,
-0.29884210228919983,
0.07345342636108398,
0.3527615964412689,
0.13229484856128693,
0.43423813581466675,
0.026631439104676247,
0.044259361922740936,
-0.17473725974559784,
-0.38756483793258667,
-0.014454051852226257,
-0.15963560342788696,
0.791533350944519,
0.18936747312545776,
0.1281995177268982,
-0.021901382133364677,
-0.23730748891830444,
0.26685330271720886,
0.046285711228847504,
-0.2804476320743561,
0.004787540063261986,
-0.22739633917808533,
-0.4810549020767212,
-0.18021933734416962,
-0.3516545295715332,
-0.12466027587652206,
-0.08937522768974304,
-0.10718083381652832,
-0.1341092884540558,
-0.07145996391773224,
0.41293424367904663,
-0.013781937770545483,
-0.03480178490281105,
0.247074693441391,
-0.007523665204644203,
-0.06354104727506638,
0.11118796467781067,
0.234567791223526,
-0.49321556091308594,
-0.4311944246292114,
0.2324143350124359,
0.009982839226722717,
0.11288779973983765,
0.1875331997871399,
-0.2512133717536926,
-0.11480401456356049,
-0.10313521325588226,
0.008419767022132874,
-0.06456495821475983,
0.23794475197792053,
0.4715805947780609,
0.2665569484233856,
0.03520405292510986,
-0.04259603098034859,
-0.23225237429141998,
0.10939859598875046,
-0.07917455583810806,
0.42472440004348755,
0.2350764274597168,
0.5771480202674866,
0.013558901846408844,
0.4463896155357361,
0.7228884100914001,
0.09141025692224503,
0.2535390257835388,
-0.04137060046195984,
0.3796829581260681,
0.09052678197622299,
-0.34510454535484314,
0.26905831694602966,
0.06302077323198318,
-0.0072037652134895325,
0.18090969324111938,
-0.032106734812259674,
-0.17785443365573883,
-0.22006432712078094,
0.04657699540257454,
-0.059649646282196045,
0.029871080070734024,
-0.11742769181728363,
-0.3436398208141327,
0.30091792345046997,
-0.21631115674972534,
0.16644585132598877,
0.13273361325263977,
-0.04765641316771507,
0.05491248145699501,
0.4625675678253174,
-0.20576179027557373,
0.23801760375499725,
-0.4431186020374298,
-0.5577776432037354,
-0.3410705626010895,
0.21606633067131042,
-0.017375830560922623,
0.6229296922683716,
-0.2246488779783249,
0.4463388919830322,
0.13816994428634644,
-0.2857896089553833,
0.46938490867614746,
-0.474642276763916,
0.05248541012406349,
-0.07333333790302277,
0.08207627385854721,
-0.32103848457336426,
-0.2203686386346817,
0.042708586901426315,
0.17183838784694672,
-0.03506375476717949,
-0.15150436758995056,
-0.19229348003864288,
0.23732899129390717,
0.2754107415676117,
0.05343596637248993,
-0.16142447292804718,
-0.09363891184329987,
-0.2664468288421631,
-0.4962078630924225,
-0.050532661378383636,
-0.07296688109636307,
0.06562739610671997,
0.050422992557287216,
0.21582691371440887,
0.21253962814807892,
-0.06274129450321198,
0.04993986338376999,
0.1299736499786377,
-0.002951723523437977,
0.012745944783091545,
-0.03932930529117584,
0.27792617678642273,
-0.089732825756073,
0.24206964671611786,
0.08916383981704712,
0.26648029685020447,
-0.2147502601146698,
-0.18881604075431824,
-0.041136592626571655,
-0.18248768150806427,
0.40897005796432495,
0.0675264298915863,
-0.1009933277964592,
-0.39960941672325134,
-0.02617553249001503,
-0.10579928755760193,
-0.22917506098747253,
-0.1686868518590927,
0.24762582778930664,
0.022055629640817642,
-0.31253740191459656,
-0.10657543689012527,
0.09468761086463928,
-0.08726814389228821,
0.12685029208660126,
0.35810983180999756,
0.24888251721858978,
-0.21127107739448547,
-0.06336689740419388,
0.36722782254219055,
0.6484239101409912,
0.03186969459056854,
-0.18370574712753296,
0.06394824385643005,
-0.502515971660614,
0.12710976600646973,
0.06386885792016983,
0.13155147433280945,
-0.16988977789878845,
-0.18721923232078552,
0.024939486756920815,
-0.1965131312608719,
0.32485532760620117,
0.05386682599782944,
-0.48498648405075073,
0.14316797256469727,
0.43213552236557007,
0.12352307140827179,
0.12989692389965057,
0.1036316454410553,
0.059383392333984375,
-0.1762973964214325,
0.13465508818626404,
0.14091412723064423,
0.07253876328468323,
0.15242697298526764,
-0.16167166829109192,
0.06886939704418182,
-0.14322413504123688,
-0.24243034422397614,
-0.6267004609107971,
0.1124727800488472,
-0.22965432703495026,
0.27725106477737427,
-0.20133957266807556,
-0.6081691384315491,
0.4104800224304199,
0.38859280943870544,
0.5692141652107239,
0.2539716064929962,
-0.26261159777641296,
0.08756546676158905,
-0.0031409189105033875,
-0.30314400792121887,
0.14249630272388458,
-0.09682870656251907,
0.08215540647506714,
-0.2844580113887787,
-0.3339809477329254,
-0.15507876873016357,
-0.06838232278823853,
0.043342724442481995,
-0.34564512968063354,
-0.03714741766452789,
-0.10098884999752045,
0.05933130532503128,
0.21515488624572754,
-0.1247696578502655,
0.2778620719909668,
0.00043346360325813293,
0.07186545431613922,
-0.031086914241313934,
-0.037636518478393555,
0.399312287569046,
-0.29851171374320984,
-0.15724198520183563,
-0.06285952031612396,
0.08926790952682495,
-0.14163413643836975,
-0.09785006195306778,
0.31264495849609375,
0.0009066499769687653,
-0.17073102295398712,
-0.14745944738388062,
0.05766165256500244,
-0.2658415734767914,
-0.2694557309150696,
-0.42311418056488037,
0.1549922227859497,
0.010609626770019531,
0.1373024731874466,
-0.1414521336555481,
0.16427019238471985,
-0.24751436710357666,
-0.029116710647940636,
-0.3162649869918823,
-0.18588371574878693,
-0.09115663170814514,
-0.2300189882516861,
0.28588739037513733,
0.14245229959487915,
0.23120947182178497,
0.25922954082489014,
-0.032609082758426666,
-0.21885812282562256,
0.0014805078972131014,
0.2834208011627197,
0.19792203605175018,
-0.08435171097517014,
-0.3264659345149994,
-0.03428580239415169,
-0.04058820381760597,
0.08296798914670944,
-0.2389824539422989,
-0.15089581906795502,
-0.12016201764345169,
0.10441286861896515,
0.1108315959572792,
0.03166613727807999,
-0.21585308015346527,
0.17585624754428864,
-0.3454000949859619,
-0.38309168815612793,
0.03885836899280548,
-0.0019295085221529007,
0.15297994017601013,
-0.18480978906154633,
0.39308369159698486,
0.04583675414323807,
-0.057916395366191864,
-0.26614290475845337,
0.08735702186822891,
-0.21041572093963623,
0.5279400944709778,
0.08702636510133743,
0.24259121716022491,
0.09170476347208023,
-0.03508392348885536,
-0.6708036065101624,
0.2103811800479889,
0.0831119641661644,
0.07421530038118362,
-0.0349077507853508,
-0.15803799033164978,
0.1837059110403061,
-0.22133685648441315,
0.29761821031570435,
0.32652097940444946,
-0.0052294484339654446,
0.18804827332496643,
0.5457711815834045,
0.12861308455467224,
-0.2370147407054901,
0.16963671147823334,
0.12506426870822906,
-0.07864869385957718,
-0.11108836531639099,
0.11263997852802277,
0.23688393831253052,
-0.20548200607299805,
0.37997543811798096,
-0.09418307989835739,
0.4906446933746338,
-0.20797672867774963,
0.004008112475275993,
0.5395570397377014,
0.0277874656021595,
0.03937250375747681,
-0.04218834638595581,
0.03188065066933632,
0.17924129962921143,
0.5831445455551147,
0.003154650330543518,
0.029806384816765785,
0.14063817262649536,
0.30136388540267944,
-0.16795644164085388,
-0.024341829121112823,
-0.18069250881671906,
-0.20111039280891418,
0.2749941349029541,
0.018362991511821747,
0.25087881088256836,
0.6245889663696289,
-0.40902918577194214,
-0.061806101351976395,
-0.5428102612495422,
0.20521461963653564,
-0.25723889470100403,
-0.07932835817337036,
-0.2710336446762085,
0.20987805724143982,
0.05810420215129852,
0.06311477720737457,
0.11231134831905365,
-0.18528954684734344,
0.05158234387636185,
0.2637987732887268,
-0.44747138023376465,
-0.2216474711894989,
0.34233173727989197,
0.3455912172794342,
-0.18748626112937927,
0.0017540156841278076,
0.28710877895355225,
0.24402236938476562,
-0.10569144785404205,
-0.01941395178437233,
0.47464871406555176,
0.6444395184516907,
0.40551039576530457,
-0.39228230714797974,
-0.03292359784245491,
0.06364446133375168,
0.036632344126701355,
-0.17345581948757172,
0.2106987088918686,
0.030855972319841385,
0.1918325424194336,
0.14064346253871918,
0.09723260253667831,
0.037446990609169006,
-0.07638990879058838,
0.21839767694473267,
-0.1176237016916275,
0.261466383934021,
0.08457974344491959,
0.12634781002998352,
0.18812713027000427,
0.1792556345462799,
-0.0836741104722023,
-0.34254202246665955,
-0.06966780871152878,
0.12196849286556244,
-0.004862216301262379,
-0.11595474928617477,
-0.11057624220848083,
0.040333982557058334,
-0.2090076506137848,
0.32437077164649963,
0.29866236448287964,
0.032984841614961624,
-0.33273229002952576,
-0.16453514993190765,
-0.39898067712783813,
-0.17213085293769836,
-0.09340530633926392,
-0.3542160987854004,
-0.03878120332956314,
-0.10404027253389359,
0.004802487790584564,
0.07929688692092896,
0.029313720762729645,
0.026695502921938896,
0.14615502953529358,
0.68659508228302,
-0.28407344222068787,
0.026549482718110085,
0.3582301139831543,
0.13595011830329895,
0.04204641282558441,
-0.3306712508201599,
0.02539696916937828,
0.35072609782218933,
-0.08390700817108154,
-0.19683021306991577,
0.2640080451965332,
0.18671230971813202,
-0.14847463369369507,
0.34115371108055115,
0.2205909639596939,
0.724216103553772,
0.12103397399187088,
-0.08297014236450195,
-0.31070801615715027,
0.04631030187010765,
-0.18745991587638855,
0.3284565210342407,
0.4097311794757843,
-0.22445572912693024,
-0.3802424371242523,
-0.40797924995422363,
-0.19773618876934052,
0.10208281129598618,
0.09089501202106476,
0.428852915763855,
-0.3884786069393158,
0.32728269696235657,
-0.07422768324613571,
0.18969857692718506,
0.10407540202140808,
0.026520727202296257,
-0.05682802200317383,
0.26927635073661804,
-0.4651792645454407,
-0.2999320328235626,
0.0334034264087677,
-0.0166974738240242,
-0.027149789035320282,
-0.009061887860298157,
-0.06951549649238586,
-0.34489715099334717,
0.3211410939693451,
-0.34205010533332825,
0.04726371914148331,
0.20589637756347656,
0.02687671221792698,
-0.3330899477005005,
0.23164664208889008,
0.17487549781799316,
-0.1278863102197647,
-0.06969225406646729,
0.4330182373523712,
-0.10662966221570969,
-0.1177692785859108,
-0.01490158960223198,
-0.10216710716485977
] |
https://github.com/huggingface/datasets/issues/2300 | Add VoxPopuli | I'm happy to take this on:) One question: The original unlabelled data is stored unsegmented (see e.g. https://github.com/facebookresearch/voxpopuli/blob/main/voxpopuli/get_unlabelled_data.py#L30), but segmenting the audio in the dataset would require a dependency on something like soundfile or torchaudio. An alternative could be to provide the segments start and end times as a Sequence and then it's up to the user to perform the segmentation on-the-fly if they wish? | ## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 65 | Add VoxPopuli
## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
I'm happy to take this on:) One question: The original unlabelled data is stored unsegmented (see e.g. https://github.com/facebookresearch/voxpopuli/blob/main/voxpopuli/get_unlabelled_data.py#L30), but segmenting the audio in the dataset would require a dependency on something like soundfile or torchaudio. An alternative could be to provide the segments start and end times as a Sequence and then it's up to the user to perform the segmentation on-the-fly if they wish? | [
-0.2925266921520233,
0.2328720986843109,
-0.04869351536035538,
-0.07535198330879211,
-0.1558787077665329,
-0.18521833419799805,
0.3809302747249603,
0.21007348597049713,
-0.02608441561460495,
0.25481826066970825,
-0.29555580019950867,
0.09394480288028717,
-0.5140134692192078,
0.22828222811222076,
-0.012559941969811916,
-0.3366336524486542,
0.03524911403656006,
0.159286230802536,
0.13799694180488586,
-0.16406327486038208,
-0.16928847134113312,
-0.179216668009758,
-0.36676472425460815,
-0.31992870569229126,
-0.28155517578125,
-0.043795712292194366,
-0.1714102327823639,
-0.20027676224708557,
-0.24722535908222198,
-0.4485914409160614,
-0.25184929370880127,
0.014416752383112907,
0.2051720917224884,
0.7153629064559937,
-0.00010533680324442685,
-0.24159717559814453,
-0.032599061727523804,
-0.24135920405387878,
-0.11853134632110596,
0.1629430055618286,
-0.14939358830451965,
-0.00040981732308864594,
-0.5305421948432922,
-0.16699597239494324,
-0.23648622632026672,
-0.19632379710674286,
-0.025772912427783012,
-0.321132630109787,
0.29540523886680603,
0.1716523915529251,
0.20481672883033752,
-0.2917950749397278,
-0.062555693089962,
-0.06948621571063995,
0.2304438352584839,
0.06519938260316849,
-0.0031292010098695755,
-0.09245498478412628,
0.08193197846412659,
0.1289018988609314,
0.06325666606426239,
0.456722229719162,
0.04803534597158432,
-0.20203284919261932,
0.1953827142715454,
-0.23083829879760742,
-0.36718544363975525,
-0.4931637942790985,
-0.12875407934188843,
0.5815057754516602,
0.6085773706436157,
-0.27040207386016846,
-0.31559833884239197,
-0.18871378898620605,
0.017296141013503075,
-0.3431019186973572,
-0.3455105423927307,
0.3020211458206177,
-0.1481226086616516,
0.13794028759002686,
-0.013923829421401024,
-0.34037545323371887,
-0.13980576395988464,
0.09456095844507217,
0.06109577417373657,
0.35235878825187683,
0.0075401128269732,
-0.027066878974437714,
-0.00551508367061615,
-0.28721094131469727,
-0.48088908195495605,
0.03721093758940697,
0.23884153366088867,
0.4193490147590637,
-0.09557166695594788,
-0.3250355124473572,
-0.1058608666062355,
-0.14119914174079895,
0.19880449771881104,
0.07499010860919952,
-0.042845096439123154,
0.05207890272140503,
0.12169396877288818,
-0.053386710584163666,
0.28288647532463074,
0.0018169805407524109,
-0.07963217049837112,
0.06189654767513275,
0.10663731396198273,
-0.3097323775291443,
0.07927365601062775,
0.07797905802726746,
-0.2079358547925949,
0.08819806575775146,
-0.20412684977054596,
0.07172024250030518,
-0.0003145430237054825,
-0.022275615483522415,
-0.03674676641821861,
0.03046903759241104,
-0.3467603921890259,
-0.000888412818312645,
-0.023071013391017914,
0.05547677353024483,
-0.21687127649784088,
-0.0929950550198555,
-0.16844117641448975,
0.25918757915496826,
-0.04068002477288246,
-0.055970124900341034,
0.03519654646515846,
0.10091637074947357,
-0.15065425634384155,
0.28152287006378174,
0.22229011356830597,
-0.02280101180076599,
-0.05495361238718033,
0.1347343921661377,
0.2096424102783203,
0.004160076379776001,
-0.165016308426857,
-0.0868012011051178,
0.2816716134548187,
-0.18800392746925354,
-0.020657923072576523,
0.013697827234864235,
-0.40794411301612854,
0.22302402555942535,
-0.23691192269325256,
-0.07928099483251572,
0.22605502605438232,
-0.24753636121749878,
-0.33681535720825195,
0.26815396547317505,
-0.21521978080272675,
0.07658416032791138,
0.38303694128990173,
0.48390910029411316,
0.08214247226715088,
-0.46565163135528564,
0.14551222324371338,
0.10299203544855118,
-0.06683994084596634,
-0.05826658755540848,
0.24349427223205566,
0.17469705641269684,
-0.41368332505226135,
-0.12196490168571472,
0.19215664267539978,
0.19911924004554749,
0.09063491225242615,
0.20327597856521606,
-0.001041291980072856,
0.12118476629257202,
0.03358917683362961,
0.33943676948547363,
-0.014469422399997711,
-0.2765722870826721,
-0.20517314970493317,
-0.003992646466940641,
-0.0700618177652359,
0.041231222450733185,
0.03071802854537964,
0.10753396153450012,
0.729625940322876,
-0.28908678889274597,
0.2939642667770386,
0.35560673475265503,
-0.06690975278615952,
-0.029785187914967537,
-0.1350754350423813,
-0.345704048871994,
0.17452888190746307,
0.23761425912380219,
-0.009314518421888351,
-0.09107445925474167,
-0.22596383094787598,
0.4240354895591736,
0.27998194098472595,
-0.14625826478004456,
0.24929581582546234,
0.08667082339525223,
0.4744332730770111,
0.02596459537744522,
0.04159099608659744,
-0.5515686273574829,
-0.03423374146223068,
-0.04775555804371834,
-0.0555824339389801,
0.3149369955062866,
0.04765539616346359,
-0.4406021237373352,
-0.036443863064050674,
-0.3342244327068329,
0.0223345048725605,
-0.0017871186137199402,
0.16800978779792786,
0.054368745535612106,
0.1334090232849121,
0.04493315890431404,
-0.5313392877578735,
-0.3334079086780548,
0.30889204144477844,
-0.039637982845306396,
-0.09415492415428162,
0.005667451769113541,
0.04761292785406113,
-0.010382884182035923,
0.1713317483663559,
0.4110596776008606,
0.2039596438407898,
-0.12034399807453156,
0.3768961727619171,
0.3011947274208069,
0.0983215942978859,
-0.010477475821971893,
-0.3251625597476959,
0.18537557125091553,
0.2171081155538559,
-0.3233451247215271,
0.1568768173456192,
0.3292602002620697,
0.10907332599163055,
-0.2232830822467804,
-0.08518316596746445,
0.2577807307243347,
0.4536961019039154,
0.19151586294174194,
0.03353612869977951,
-0.17536747455596924,
-0.10855187475681305,
-0.06547898054122925,
-0.2391388863325119,
-0.17599496245384216,
-0.06694544851779938,
0.010697126388549805,
0.13577190041542053,
0.1745660901069641,
-0.3150489926338196,
0.15417490899562836,
0.46283596754074097,
-0.2876066565513611,
0.12858843803405762,
-0.002603936940431595,
-0.3632546663284302,
-0.20406076312065125,
-0.016407927498221397,
-0.45022428035736084,
0.054633453488349915,
0.20872867107391357,
0.2128758281469345,
0.08121432363986969,
0.34394511580467224,
-0.09119059145450592,
0.017957061529159546,
0.1442548632621765,
-0.0896611362695694,
0.3438567817211151,
-0.07156498730182648,
0.012366756796836853,
-0.03525257110595703,
-0.3124837279319763,
-0.0005496935918927193,
-0.04570160061120987,
0.04064358398318291,
-0.19531576335430145,
0.0758679211139679,
-0.21811234951019287,
0.07009375095367432,
-0.698420524597168,
-0.11433181166648865,
0.14148138463497162,
0.38732677698135376,
-0.13725091516971588,
-0.11645133793354034,
0.38727864623069763,
-0.012424412183463573,
0.6995111107826233,
-0.022074835374951363,
-0.12699666619300842,
0.045153625309467316,
-0.0926731675863266,
0.15921244025230408,
0.18026000261306763,
-0.027161549776792526,
0.25765329599380493,
-0.018791766837239265,
0.17470277845859528,
0.08329395204782486,
0.24509449303150177,
-0.0755416676402092,
0.28070926666259766,
-0.0216200090944767,
0.1031169593334198,
0.006036229431629181,
-0.034200891852378845,
0.20874588191509247,
-0.3511870205402374,
-0.17739424109458923,
-0.010718870908021927,
0.061308614909648895,
-0.14474689960479736,
-0.28616276383399963,
0.2674386203289032,
-0.0853765606880188,
-0.23395419120788574,
-0.662813127040863,
-0.4774102568626404,
0.3154149651527405,
0.34369543194770813,
0.10621319711208344,
0.02691957727074623,
-0.18175040185451508,
0.000449285376816988,
-0.09139581769704819,
0.11751222610473633,
-0.19419297575950623,
-0.08507444709539413,
0.30675408244132996,
-0.3033914566040039,
-0.10110470652580261,
-0.2366938292980194,
-0.11382900178432465,
0.002907838672399521,
0.025774791836738586,
-0.06728289276361465,
0.35240617394447327,
0.033818550407886505,
-0.012495851144194603,
-0.029336966574192047,
-0.11994072794914246,
0.1766287386417389,
-0.032802894711494446,
-0.09757787734270096,
-0.02023058757185936,
0.16871607303619385,
-0.11062166839838028,
0.16852450370788574,
0.020970523357391357,
-0.0062211304903030396,
-0.1654159426689148,
0.15921421349048615,
0.9956918358802795,
0.4840337038040161,
0.017514578998088837,
-0.08463616669178009,
-0.00975172407925129,
0.07263427972793579,
-0.17961809039115906,
-0.0587085485458374,
0.5532766580581665,
-0.05303753912448883,
-0.13934099674224854,
0.3943899869918823,
0.09361650794744492,
-0.3328879177570343,
-0.04020282253623009,
0.14305032789707184,
-0.18203195929527283,
-0.21350079774856567,
0.12233133614063263,
0.04598177224397659,
0.1855957806110382,
-0.06580743193626404,
0.11675547808408737,
-0.24067212641239166,
-0.09072968363761902,
0.0895983874797821,
-0.09655942022800446,
0.2592720091342926,
0.08465030044317245,
-0.35792964696884155,
0.02997426874935627,
-0.43661826848983765,
-0.08924099802970886,
0.1967765837907791,
-0.09651849418878555,
-0.09277810156345367,
-0.3198329508304596,
-0.15608365833759308,
0.16968686878681183,
-0.1161273717880249,
-0.08066848665475845,
-0.06412572413682938,
0.2182725965976715,
0.6738340258598328,
0.034083202481269836,
0.4116017520427704,
-0.1827399581670761,
-0.03593270853161812,
0.48983123898506165,
0.24199673533439636,
-0.3840944766998291,
0.21024009585380554,
0.2967366576194763,
0.5018631219863892,
0.024196449667215347,
-0.04713945463299751,
0.03320825472474098,
0.0032868869602680206,
-0.12923286855220795,
0.21432054042816162,
0.2693783938884735,
0.21619680523872375,
0.11710365116596222,
0.06961576640605927,
0.18791207671165466,
0.10669862478971481,
0.20103751122951508,
0.04104737564921379,
0.10916352272033691,
-0.050843819975852966,
0.1418716162443161,
0.13689252734184265,
-0.3504534959793091,
0.4271061420440674,
0.31464266777038574,
0.14032039046287537,
-0.05515696108341217,
0.16504257917404175,
-0.009435022249817848,
0.26534682512283325,
0.2739957571029663,
0.24583154916763306,
0.17125752568244934,
-0.0407838374376297,
0.32964587211608887,
-0.3226228952407837,
-0.05002177134156227,
0.006140286102890968,
-0.08956184983253479,
-0.7040660381317139,
-0.47992709279060364,
0.20871317386627197,
0.00705387257039547,
-0.1786898970603943,
0.1951512098312378,
0.05045357346534729,
-0.18072040379047394,
0.6409841775894165,
-0.12425578385591507,
1.1574864387512207,
0.4827517867088318,
0.1591489613056183,
0.11252107471227646,
0.2006056159734726,
0.2373843640089035,
-0.3035924434661865,
0.0677880197763443,
-0.07839295268058777,
0.19877853989601135,
-0.04985366016626358,
0.06477425992488861,
-0.15850794315338135,
0.06228484585881233,
-0.43244993686676025,
-0.12285120040178299,
-0.08425164967775345,
0.05841099098324776,
-0.05906383693218231,
0.3170298635959625,
-0.023189036175608635,
-0.4224410653114319,
-0.06285324692726135,
0.21795561909675598,
0.007026132196187973,
0.13436703383922577,
0.0345466248691082,
-0.155611053109169,
0.24413463473320007,
0.05447889119386673,
-0.30055099725723267,
0.06942608207464218,
-0.12151729315519333,
-0.26695120334625244,
-0.23696136474609375,
-0.13268716633319855,
0.06262262165546417,
0.19479839503765106,
0.01107075810432434,
0.25051742792129517,
-0.00935647077858448,
0.1420043557882309,
0.21049067378044128,
0.03711860254406929,
0.20021772384643555,
-0.04001619666814804,
0.38767147064208984,
-0.10267666727304459,
-0.21335792541503906,
0.20875391364097595,
0.08458711206912994,
-0.2225949466228485,
-0.208950474858284,
-0.1261920928955078,
0.22380587458610535,
-0.2065972089767456,
0.13387548923492432,
0.24416811764240265,
0.045111868530511856,
-0.16167618334293365,
0.1447421908378601,
0.030818454921245575,
-0.3660277724266052,
0.23787903785705566,
-0.10210369527339935,
-0.08973787724971771,
-0.2988923192024231,
0.29917705059051514,
0.19919463992118835,
-0.06608609110116959,
0.2654157280921936,
0.1631919890642166,
-0.24428363144397736,
-0.33637458086013794,
0.35606423020362854,
0.027233514934778214,
-0.23571866750717163,
-0.08974677324295044,
0.011266635730862617,
0.0744599997997284,
0.058465927839279175,
0.31968528032302856,
0.10034726560115814,
-0.15235313773155212,
-0.22798466682434082,
-0.1858517825603485,
-0.4159488081932068,
0.10652228444814682,
0.19219714403152466,
0.14330270886421204,
0.010450944304466248,
0.05162319913506508,
-0.11516144871711731,
0.0882367491722107,
-0.45009294152259827,
0.03853502869606018,
-0.13238242268562317,
0.19209569692611694,
-0.15283244848251343,
-0.3040906488895416,
-0.00522931944578886,
-0.004889241419732571,
0.17301782965660095,
0.2098676562309265,
-0.1454312950372696,
-0.24956992268562317,
-0.33906280994415283,
0.14574173092842102,
0.29246288537979126,
-0.14025942981243134,
-0.1638764888048172,
0.08368442952632904,
-0.24184831976890564,
-0.10684362053871155,
0.3897121250629425,
0.34224921464920044,
0.08885756880044937,
-0.20396603643894196,
-0.07242658734321594,
-0.03836268186569214,
-0.04809563606977463,
0.008666271343827248,
0.23143576085567474,
0.19364474713802338,
0.2700585126876831,
0.27926838397979736,
-0.10343335568904877,
-0.11983923614025116,
0.11072082817554474,
0.4209374785423279,
0.4609628915786743,
0.01649319939315319,
0.2232060730457306,
-0.2835407257080078,
0.31925785541534424,
0.10528255254030228,
0.4450280964374542,
0.2600051760673523,
-0.20567671954631805,
-0.004946388304233551,
0.3935939371585846,
0.3718564212322235,
-0.17735905945301056,
0.019323423504829407,
0.08107161521911621,
-0.24129663407802582,
0.31037434935569763,
0.20309583842754364,
0.1488630175590515,
0.12007024884223938,
0.06768138706684113,
-0.024229910224676132,
0.03286084532737732,
-0.08446983993053436,
0.28744035959243774,
0.36287516355514526,
-0.16325132548809052,
-0.07398034632205963,
0.1752859652042389,
0.35437437891960144,
0.3791213929653168,
0.5762960910797119,
-0.16558295488357544,
0.46507641673088074,
0.30727142095565796,
-0.33167314529418945,
0.21911174058914185,
-0.15686701238155365,
-0.16098064184188843,
0.2824746370315552,
0.07210700958967209,
0.3706008493900299,
-0.07951565086841583,
0.3249424993991852,
-0.6310240626335144,
-0.351826012134552,
0.08031562715768814,
0.11618836224079132,
0.1487322747707367,
-0.10809116065502167,
-0.2929435670375824,
-0.04182606562972069,
-0.018967725336551666,
-0.18371348083019257,
0.08201545476913452,
-0.1899731606245041,
-0.12835897505283356,
-0.06967651844024658,
0.031835395842790604,
-0.03948649764060974,
-0.32243070006370544,
-0.19008007645606995,
0.420560747385025,
-0.20988158881664276,
0.034390468150377274,
-0.07539854943752289,
0.015079449862241745,
0.15950417518615723,
0.24524319171905518,
0.12177971005439758,
-0.054057247936725616,
-0.41471531987190247,
0.26640841364860535,
-0.20526403188705444,
-0.07966344803571701,
0.01552477478981018,
0.14060011506080627,
0.2044270634651184,
0.27872994542121887,
0.35166892409324646,
0.18024392426013947,
-0.2170608788728714,
0.07120336592197418,
0.17862656712532043,
0.028510045260190964,
-0.10798974335193634,
0.02103554457426071,
-0.1912669539451599,
-0.08785299211740494,
-0.27858367562294006,
-0.2812316119670868,
-0.3557814061641693,
-0.14398343861103058,
0.1353621780872345,
-0.1966174989938736,
0.16737589240074158,
-0.03326020762324333,
0.12747657299041748,
-0.13952571153640747,
0.08313168585300446,
0.11591772735118866,
0.08554434776306152,
0.0874626412987709,
-0.061502013355493546,
-0.21600328385829926,
-0.008867956697940826,
-0.15583208203315735,
-0.012177763506770134,
-0.23571720719337463,
0.13403022289276123,
0.26583778858184814,
0.39444154500961304,
-0.32731330394744873,
0.12163091450929642,
-0.41679540276527405,
0.28040647506713867,
-0.3058731257915497,
0.4049426317214966,
-0.3673975467681885,
0.5024871230125427,
0.05457451939582825,
-0.30516427755355835,
-0.08070069551467896,
0.008889912627637386,
0.14847782254219055,
0.09895672649145126,
-0.28115665912628174,
-0.0034876633435487747,
-0.37026187777519226,
0.4069080352783203,
-0.20776310563087463,
0.26023179292678833,
-0.25461888313293457,
-0.16449834406375885,
-0.06122395023703575,
0.15380127727985382,
-0.17389100790023804,
-0.19065135717391968,
0.12299682199954987,
0.4134189784526825,
-0.13503357768058777,
0.20487606525421143,
-0.035404376685619354,
0.1267118602991104,
-0.0008092634379863739,
0.05611177533864975,
-0.10755623877048492,
0.17827515304088593,
-0.16086307168006897,
0.23601792752742767,
0.180075004696846,
0.19751882553100586,
-0.25192680954933167,
0.0901322066783905,
-0.15397915244102478,
-0.24827194213867188,
0.5132050514221191,
-0.24548040330410004,
-0.3263625502586365,
-0.27049997448921204,
0.20249521732330322,
0.3115452826023102,
0.086882583796978,
-0.5332133769989014,
0.14677542448043823,
0.20748791098594666,
-0.09567145258188248,
-0.031199513003230095,
-0.07537961006164551,
-0.3398635685443878,
-0.3039982318878174,
-0.2820354402065277,
0.21174941956996918,
0.054130930453538895,
-0.16051845252513885,
-0.039139457046985626,
-0.28435003757476807
] |
https://github.com/huggingface/datasets/issues/2300 | Add VoxPopuli | Hey @jfainberg,
This sounds great! I think adding a dependency would not be a big problem, however automatically segmenting the data probably means that it would take a very long time to do:
```python
dataset = load_dataset("voxpopuli", "french")
```
=> so as a start I think your option 2 is the way to go! | ## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
| 54 | Add VoxPopuli
## Adding a Dataset
- **Name:** Voxpopuli
- **Description:** VoxPopuli is raw data is collected from 2009-2020 European Parliament event recordings
- **Paper:** https://arxiv.org/abs/2101.00390
- **Data:** https://github.com/facebookresearch/voxpopuli
- **Motivation:** biggest unlabeled speech dataset
**Note**: Since the dataset is so huge, we should only add the config `10k` in the beginning.
Instructions to add a new dataset can be found [here](https://github.com/huggingface/datasets/blob/master/ADD_NEW_DATASET.md).
Hey @jfainberg,
This sounds great! I think adding a dependency would not be a big problem, however automatically segmenting the data probably means that it would take a very long time to do:
```python
dataset = load_dataset("voxpopuli", "french")
```
=> so as a start I think your option 2 is the way to go! | [
-0.36220476031303406,
0.20605126023292542,
-0.03822985291481018,
0.0014162883162498474,
-0.12140674889087677,
-0.12960627675056458,
0.2858930826187134,
0.34885531663894653,
0.18100427091121674,
0.267317533493042,
-0.12204393744468689,
0.1734333336353302,
-0.5791193246841431,
0.2486564666032791,
0.10300649702548981,
-0.16102582216262817,
0.16287338733673096,
0.2866104543209076,
0.09568636119365692,
-0.18800069391727448,
-0.12906517088413239,
-0.0335458368062973,
-0.22706197202205658,
-0.2975459694862366,
-0.35311511158943176,
0.07267148047685623,
-0.1824730485677719,
-0.20841297507286072,
-0.16388937830924988,
-0.29258474707603455,
-0.2777968645095825,
0.0334552600979805,
0.22365441918373108,
0.5653857588768005,
-0.00010632937483023852,
-0.144919753074646,
-0.08847329020500183,
-0.304451048374176,
0.06547704339027405,
-0.07464936375617981,
-0.08370042592287064,
-0.1278287172317505,
-0.40649041533470154,
-0.09302537888288498,
-0.2304190695285797,
-0.14254309237003326,
-0.009947726503014565,
-0.2797590494155884,
0.21908050775527954,
0.29482483863830566,
0.24104838073253632,
-0.015466522425413132,
-0.05571575090289116,
-0.1818622201681137,
0.19197902083396912,
0.005365841090679169,
-0.016708336770534515,
-0.12351800501346588,
0.03668281063437462,
0.019305579364299774,
0.09534497559070587,
0.5634722113609314,
-0.02034485898911953,
-0.2623254656791687,
-0.006659068167209625,
-0.08954109251499176,
-0.12987127900123596,
-0.41098541021347046,
-0.024105168879032135,
0.4772326946258545,
0.4497814476490021,
-0.2047099471092224,
-0.21801875531673431,
-0.13895609974861145,
0.08229581266641617,
-0.29678893089294434,
-0.17260801792144775,
0.20623169839382172,
-0.0013448307290673256,
0.15599532425403595,
0.12476114928722382,
-0.30470114946365356,
-0.04454992711544037,
0.2275998294353485,
-0.06493595987558365,
0.41148269176483154,
-0.01073926966637373,
-0.13216617703437805,
0.014494914561510086,
-0.2984534502029419,
-0.3767269253730774,
0.2829956114292145,
0.20456236600875854,
0.23231832683086395,
-0.10005137324333191,
-0.30262383818626404,
0.10042741894721985,
-0.04963972419500351,
0.18477872014045715,
-0.01048271358013153,
-0.13646931946277618,
0.11104580760002136,
0.09764531999826431,
0.09040462970733643,
0.2405511438846588,
-0.06511479616165161,
-0.007965736091136932,
-0.10328856110572815,
0.19622702896595,
-0.2124025672674179,
-0.15701138973236084,
0.1893925964832306,
-0.2619789242744446,
0.11558085680007935,
-0.017720293253660202,
0.02665923349559307,
0.09665093570947647,
-0.1736467480659485,
0.017109522596001625,
0.21021196246147156,
-0.13206174969673157,
0.04347572475671768,
-0.08222128450870514,
0.34746792912483215,
-0.11712069064378738,
0.2644560635089874,
-0.059400513768196106,
0.38891732692718506,
-0.13118375837802887,
-0.20854654908180237,
-0.03389175608754158,
0.15065684914588928,
-0.040968384593725204,
0.25048017501831055,
0.1820811629295349,
0.18340347707271576,
0.08143366873264313,
0.08019115775823593,
0.4036094546318054,
0.04620341956615448,
0.0749736800789833,
-0.038666412234306335,
0.1496945172548294,
-0.24426229298114777,
0.09920617938041687,
-0.047750797122716904,
-0.07768711447715759,
-0.04663216695189476,
-0.2552618980407715,
-0.07843012362718582,
0.24348217248916626,
-0.25358545780181885,
-0.2981426417827606,
0.29904624819755554,
-0.11311094462871552,
-0.11763182282447815,
0.21058514714241028,
0.6592450141906738,
-0.026502065360546112,
-0.34246206283569336,
-0.06318721920251846,
0.05262524634599686,
-0.17182402312755585,
-0.015096715651452541,
0.14999617636203766,
0.29836881160736084,
-0.3179386258125305,
-0.19840209186077118,
0.09461565315723419,
0.2202678769826889,
0.05143262445926666,
0.293613076210022,
-0.0016879106406122446,
0.0959734246134758,
-0.008559171110391617,
0.22313819825649261,
0.08672251552343369,
-0.3522506058216095,
-0.3762063980102539,
0.08575788885354996,
-0.09440887719392776,
0.03744525462388992,
0.16894575953483582,
0.2056659460067749,
0.5524085760116577,
-0.20330046117305756,
0.34266382455825806,
0.41882652044296265,
-0.01989237405359745,
-0.012001842260360718,
-0.09375390410423279,
-0.31286025047302246,
0.2254302054643631,
0.3783739507198334,
0.00437551736831665,
0.01883029192686081,
-0.26659706234931946,
0.32798928022384644,
0.3670639991760254,
-0.2761886715888977,
0.11078153550624847,
0.14148886501789093,
0.426205575466156,
0.06832525879144669,
-0.09932565689086914,
-0.4540152847766876,
-0.016598619520664215,
-0.025725556537508965,
-0.09565063565969467,
0.3194212317466736,
-0.0702558308839798,
-0.53923499584198,
0.025034289807081223,
-0.31083813309669495,
0.004870999604463577,
0.0713823139667511,
0.24807488918304443,
0.10395791381597519,
0.11685098707675934,
0.026064880192279816,
-0.43037164211273193,
-0.03166025131940842,
0.15605412423610687,
-0.11503347009420395,
-0.12556982040405273,
0.11698296666145325,
-0.019477510824799538,
-0.16446234285831451,
0.20819520950317383,
0.2909441888332367,
0.07555170357227325,
0.05287503823637962,
0.26688602566719055,
0.07092688977718353,
0.13574941456317902,
-0.1132398247718811,
-0.04623136669397354,
0.05300953984260559,
-0.008594661951065063,
-0.384639173746109,
0.06348726898431778,
0.39218056201934814,
-0.062120962888002396,
-0.05362185463309288,
0.08951745927333832,
0.21359822154045105,
0.4971485137939453,
0.06076718121767044,
-0.024805668741464615,
-0.06185367703437805,
0.09494896233081818,
-0.025003617629408836,
-0.10854925960302353,
-0.28275394439697266,
0.12360654771327972,
0.11794613301753998,
0.11390392482280731,
0.1439708024263382,
-0.433542400598526,
0.09846751391887665,
0.45232969522476196,
-0.1298229992389679,
0.38529253005981445,
0.04811820387840271,
-0.308479905128479,
-0.01942131109535694,
-0.05518489331007004,
-0.32540571689605713,
0.1220446452498436,
0.3093284070491791,
0.06213977560400963,
-0.015272023156285286,
0.24436180293560028,
-0.032731447368860245,
0.046960704028606415,
0.017056498676538467,
-0.19839192926883698,
0.20994296669960022,
0.06016595661640167,
-0.15226608514785767,
-0.2575824558734894,
-0.3199756443500519,
-0.06627918034791946,
-0.018555773422122,
0.0975538045167923,
-0.2175050526857376,
0.011729946359992027,
-0.07060989737510681,
0.04894590377807617,
-0.38542893528938293,
-0.19495193660259247,
0.1977466642856598,
0.38000601530075073,
-0.08339369297027588,
-0.11356154084205627,
0.26480844616889954,
-0.05190875008702278,
0.44582945108413696,
-0.08336091786623001,
-0.31909888982772827,
0.16898120939731598,
-0.15562693774700165,
0.06746822595596313,
0.18988823890686035,
0.0032770875841379166,
0.22061890363693237,
0.09391695261001587,
-0.038563866168260574,
0.03127049282193184,
0.10092032700777054,
-0.19143247604370117,
0.17851559817790985,
-0.13730943202972412,
0.05312533676624298,
0.02086491882801056,
0.0789516344666481,
0.041987501084804535,
-0.2782665491104126,
-0.05377628654241562,
-0.10469783842563629,
0.13590563833713531,
-0.008570964448153973,
-0.2253914624452591,
0.16610495746135712,
0.029424797743558884,
-0.32849782705307007,
-0.7819321751594543,
-0.564749002456665,
0.24305476248264313,
0.31362712383270264,
0.10249210894107819,
-0.06839876621961594,
-0.14097270369529724,
-0.05636662244796753,
-0.17195846140384674,
0.24705803394317627,
-0.20320750772953033,
0.03246290609240532,
0.4612773060798645,
-0.2707376480102539,
-0.18650205433368683,
-0.2920602262020111,
-0.2375633865594864,
0.09574386477470398,
-0.15534889698028564,
-0.26038849353790283,
0.200310617685318,
-0.16325359046459198,
0.09654828906059265,
-0.005264077335596085,
-0.026226816698908806,
0.326314777135849,
0.13206951320171356,
-0.13169647753238678,
-0.09940096735954285,
0.11530947685241699,
-0.07041416317224503,
0.13906091451644897,
-0.08163095265626907,
0.013475103303790092,
-0.17460766434669495,
0.0314379520714283,
0.664347767829895,
0.33445438742637634,
0.012574121356010437,
0.1750953495502472,
-0.001384163275361061,
0.1119309514760971,
-0.12275519222021103,
-0.1437574177980423,
0.16389808058738708,
-0.05610963702201843,
-0.11873874068260193,
0.549095630645752,
0.018446700647473335,
-0.46542149782180786,
-0.1587921679019928,
0.10386981070041656,
-0.21344968676567078,
-0.2118079662322998,
0.21139651536941528,
0.038838695734739304,
0.17430049180984497,
-0.11602744460105896,
-0.055565521121025085,
-0.20882254838943481,
-0.01202392578125,
0.1845560222864151,
-0.010793812572956085,
0.14489984512329102,
-0.11798179894685745,
-0.23994944989681244,
0.010375370271503925,
-0.46697139739990234,
0.12906163930892944,
0.09552081674337387,
-0.13451507687568665,
-0.1190466433763504,
-0.29671671986579895,
-0.2244536131620407,
0.08419936150312424,
-0.09499169886112213,
-0.26291126012802124,
-0.1887694001197815,
0.18080975115299225,
0.36110761761665344,
-0.17313054203987122,
0.42139962315559387,
-0.33771970868110657,
-0.12288258969783783,
0.3760773837566376,
0.25070327520370483,
-0.44338372349739075,
0.33510899543762207,
0.1823348104953766,
0.5083807706832886,
0.001138739287853241,
-0.07212497293949127,
-0.21821457147598267,
0.02664293348789215,
-0.20391635596752167,
0.4047907292842865,
0.17984764277935028,
0.08707579970359802,
0.22082053124904633,
0.0615781731903553,
0.07036890834569931,
0.10285436362028122,
0.37892210483551025,
0.0770464688539505,
0.2333378791809082,
0.028920380398631096,
0.13459788262844086,
0.11212243139743805,
-0.18812163174152374,
-0.02953658066689968,
0.4321112334728241,
0.0630020797252655,
-0.2604462504386902,
0.024934537708759308,
0.003414064645767212,
0.357607901096344,
0.3181082010269165,
0.21503567695617676,
0.40565845370292664,
0.03340194374322891,
0.18801149725914001,
-0.2066316455602646,
0.06953267753124237,
0.20232325792312622,
-0.12566980719566345,
-0.4516109526157379,
-0.5478143095970154,
0.18005311489105225,
0.14557303488254547,
-0.13728083670139313,
0.08613672852516174,
0.02288103848695755,
-0.11877980828285217,
0.6165673136711121,
-0.34238502383232117,
1.1753389835357666,
0.3344910144805908,
0.20766037702560425,
0.048014067113399506,
0.1837862730026245,
0.3083378076553345,
-0.30095452070236206,
0.010377917438745499,
0.06840738654136658,
-0.08853911608457565,
-0.019161328673362732,
0.07074077427387238,
-0.14476695656776428,
0.17766770720481873,
-0.7377360463142395,
0.06613676995038986,
-0.18449720740318298,
-0.021142911165952682,
-0.13581977784633636,
0.2500278055667877,
-0.125187948346138,
-0.5233939290046692,
-0.4447706639766693,
0.24719586968421936,
-0.013094209134578705,
0.13762742280960083,
-0.0007746666669845581,
-0.05716479569673538,
0.08979757130146027,
-0.09598790109157562,
-0.20572921633720398,
0.06940986961126328,
-0.1310456395149231,
-0.1545063853263855,
-0.33604755997657776,
-0.04615308344364166,
0.03292986750602722,
0.28752708435058594,
0.11909635365009308,
0.4786849617958069,
-0.12385545670986176,
0.08549626916646957,
0.3140232264995575,
0.11911137402057648,
0.1748800426721573,
-0.055802732706069946,
0.24913041293621063,
-0.038948383182287216,
-0.3561418950557709,
0.2521936893463135,
0.14914686977863312,
-0.27746206521987915,
-0.2780539393424988,
-0.11710885167121887,
0.18063554167747498,
-0.045768629759550095,
-0.00047422386705875397,
0.30753666162490845,
0.003132157027721405,
-0.2630974054336548,
0.20511358976364136,
0.07702504843473434,
-0.43490713834762573,
0.08789794892072678,
0.00022525712847709656,
-0.08861805498600006,
-0.14648817479610443,
0.2452908456325531,
0.307666540145874,
-0.07398302853107452,
0.10293789952993393,
0.3325703740119934,
-0.12944136559963226,
-0.38218244910240173,
0.11882790178060532,
0.06273144483566284,
-0.2772652506828308,
-0.13313762843608856,
0.08905820548534393,
-0.14847706258296967,
-0.11349627375602722,
0.2436070442199707,
0.1177874282002449,
-0.2202751636505127,
-0.11205342411994934,
0.020917579531669617,
-0.611511766910553,
0.29554030299186707,
0.36338338255882263,
0.10409949719905853,
0.23159107565879822,
-0.13093864917755127,
-0.27840855717658997,
0.19343668222427368,
-0.4642869234085083,
-0.0632442981004715,
-0.09651312977075577,
0.16089050471782684,
0.007428932934999466,
-0.24595513939857483,
0.11587599664926529,
-0.04056571051478386,
0.22413094341754913,
0.1675933301448822,
-0.01768595725297928,
-0.3255051374435425,
-0.22241011261940002,
0.08688905835151672,
0.2366504967212677,
0.14571133255958557,
-0.015293595381081104,
0.03680342435836792,
-0.11007200181484222,
-0.1060401052236557,
0.445915162563324,
0.23924851417541504,
0.05252783000469208,
-0.08804737776517868,
-0.15139837563037872,
-0.21605053544044495,
-0.12531259655952454,
-0.06631549447774887,
0.14946505427360535,
0.17493025958538055,
0.23047387599945068,
0.0673188790678978,
0.011689946055412292,
-0.16541630029678345,
0.07947268337011337,
0.3628196120262146,
0.3833221197128296,
0.1561150848865509,
0.04362327605485916,
-0.2703096866607666,
0.22274982929229736,
0.16882237792015076,
0.45127812027931213,
0.11044084280729294,
-0.12095680087804794,
0.09415972977876663,
0.4990379512310028,
0.4179677963256836,
-0.4108498692512512,
-0.0577697679400444,
0.23284615576267242,
-0.3552442193031311,
0.3839775323867798,
0.37401261925697327,
0.0952962189912796,
0.1067197322845459,
0.04655048996210098,
0.03717196732759476,
-0.11510150879621506,
-0.03771800547838211,
0.2571500241756439,
0.1460976004600525,
0.10247790813446045,
-0.07481043040752411,
-0.0013250727206468582,
0.3439783453941345,
0.32662275433540344,
0.5300846099853516,
-0.28258901834487915,
0.38865137100219727,
0.09565261751413345,
-0.25976264476776123,
0.2736116051673889,
0.06420551240444183,
0.1377783864736557,
0.23064544796943665,
0.1587526500225067,
0.26910701394081116,
-0.051561981439590454,
0.4701896905899048,
-0.5321555137634277,
-0.2839856445789337,
-0.07025068998336792,
0.09829479455947876,
0.06574788689613342,
-0.10432371497154236,
-0.035462651401758194,
0.026112906634807587,
-0.22928740084171295,
-0.17083106935024261,
0.23014451563358307,
-0.1359270066022873,
-0.2682335078716278,
0.29881948232650757,
0.17053072154521942,
-0.24018196761608124,
-0.149021178483963,
-0.14703404903411865,
0.3594737946987152,
-0.2478773444890976,
0.16718396544456482,
-0.11944274604320526,
0.05281016230583191,
0.2467084676027298,
0.2892064154148102,
0.14650453627109528,
-0.09643170237541199,
-0.3751779794692993,
0.32986757159233093,
-0.28609466552734375,
-0.044745028018951416,
-0.14601567387580872,
0.07833313196897507,
0.15085545182228088,
0.42219793796539307,
0.27613237500190735,
0.20860189199447632,
-0.30798763036727905,
-0.13336984813213348,
0.1586047112941742,
0.042318034917116165,
-0.1505168378353119,
0.06431473791599274,
-0.15241441130638123,
0.044222526252269745,
-0.409597784280777,
-0.25102871656417847,
-0.6997446417808533,
-0.1190195232629776,
0.1614106446504593,
-0.05248342454433441,
0.07191306352615356,
-0.08391842246055603,
0.14172841608524323,
-0.03683177009224892,
-0.012522313743829727,
0.06633125245571136,
0.2649345397949219,
-0.007570312358438969,
-0.08112489432096481,
-0.35814136266708374,
0.2474454939365387,
-0.21620431542396545,
-0.08414442837238312,
-0.2664988934993744,
0.08122758567333221,
0.3445623219013214,
0.4079991579055786,
-0.2888795733451843,
0.020822789520025253,
-0.38419851660728455,
0.17480236291885376,
-0.29638591408729553,
0.2929530739784241,
-0.25033891201019287,
0.4722781777381897,
0.14808940887451172,
-0.3501276671886444,
-0.3310796618461609,
0.04099404439330101,
0.1730996072292328,
0.003162909299135208,
-0.4065481424331665,
-0.09376448392868042,
-0.3867291212081909,
0.405582994222641,
-0.14373734593391418,
0.5092095136642456,
-0.3020283281803131,
-0.2368839532136917,
0.033028073608875275,
-0.07990957796573639,
-0.24825292825698853,
-0.15390300750732422,
0.03224169835448265,
0.45961880683898926,
-0.19011883437633514,
0.22160078585147858,
-0.07050713151693344,
0.1909003108739853,
0.0626068264245987,
-0.06794975697994232,
-0.15367217361927032,
0.24556368589401245,
-0.005761440843343735,
0.16259020566940308,
-0.09416357427835464,
0.2533111274242401,
-0.2927539050579071,
0.10108128190040588,
-0.12628309428691864,
-0.25693780183792114,
0.3687208294868469,
-0.34026992321014404,
-0.2988114058971405,
-0.21967217326164246,
0.3579614460468292,
0.16416819393634796,
0.08455423265695572,
-0.2945985198020935,
0.18342822790145874,
0.04272286593914032,
0.10985339432954788,
-0.009626034647226334,
0.07067005336284637,
-0.13558855652809143,
-0.2739540934562683,
-0.27985328435897827,
0.16737082600593567,
0.05844905972480774,
-0.08789470791816711,
-0.11465169489383698,
-0.3189826011657715
] |
https://github.com/huggingface/datasets/issues/2294 | Slow #0 when using map to tokenize. | Hi ! Have you tried other values for `preprocessing_num_workers` ? Is it always process 0 that is slower ?
There are no difference between process 0 and the others except that it processes the first shard of the dataset. | Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1οΌthe process _#0_ is much slower than others.
It looks like this:

It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
| 39 | Slow #0 when using map to tokenize.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1οΌthe process _#0_ is much slower than others.
It looks like this:

It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
Hi ! Have you tried other values for `preprocessing_num_workers` ? Is it always process 0 that is slower ?
There are no difference between process 0 and the others except that it processes the first shard of the dataset. | [
-0.43608662486076355,
-0.3340420126914978,
-0.03318118304014206,
-0.055587202310562134,
0.06970155239105225,
-0.1944788098335266,
0.3812372088432312,
0.20731580257415771,
-0.27480000257492065,
0.05177745968103409,
0.31575727462768555,
0.3878787159919739,
-0.23858918249607086,
-0.008171111345291138,
-0.22205142676830292,
0.11658500880002975,
0.17172151803970337,
0.13508597016334534,
0.3698122799396515,
-0.13615888357162476,
-0.2459045648574829,
-0.028952280059456825,
-0.45379501581192017,
0.18614615499973297,
-0.551593005657196,
-0.09392058849334717,
0.016848431900143623,
0.02392299473285675,
-0.15788860619068146,
-0.3320666551589966,
-0.2777600586414337,
0.038163986057043076,
0.00043303705751895905,
0.34520068764686584,
-0.00012910913210362196,
-0.20287366211414337,
0.33431124687194824,
0.3039596676826477,
0.0683973878622055,
-0.011346682906150818,
0.10075133293867111,
-0.42011070251464844,
-0.09340713173151016,
-0.05185740441083908,
0.011379607021808624,
0.009042910300195217,
0.21065707504749298,
-0.0802215188741684,
0.1935954988002777,
0.033615805208683014,
0.05787743628025055,
0.33551982045173645,
-0.411883682012558,
0.30020076036453247,
-0.028542913496494293,
0.19994626939296722,
-0.09422233700752258,
-0.02678743377327919,
0.10649619251489639,
-0.16931475698947906,
0.16277575492858887,
0.12884168326854706,
-0.2492692470550537,
-0.01053640991449356,
0.21926772594451904,
0.13794763386249542,
0.5077483057975769,
-0.47186169028282166,
0.3414836823940277,
0.24209490418434143,
-0.1116655245423317,
0.1791996955871582,
-0.30604109168052673,
-0.3064306378364563,
0.019043274223804474,
-0.41152456402778625,
-0.0026199445128440857,
0.004556737374514341,
0.04726668819785118,
-0.02085137739777565,
-0.4781556725502014,
0.1738859862089157,
0.14230550825595856,
0.023727774620056152,
-0.2842411994934082,
0.6366428136825562,
0.08355303108692169,
0.12098114937543869,
0.1686219573020935,
-0.1988869160413742,
-0.21496456861495972,
-0.2544279396533966,
0.15417295694351196,
0.5229039788246155,
-0.18931661546230316,
-0.1005733460187912,
-0.11337440460920334,
-0.024334736168384552,
-0.23574066162109375,
-0.30048447847366333,
-0.39138421416282654,
0.3871784210205078,
0.03656366840004921,
0.12139963358640671,
0.0062340740114450455,
-0.0791991800069809,
0.043926920741796494,
0.2379094511270523,
0.2816818356513977,
-0.4815146028995514,
-0.2453262209892273,
0.06165323033928871,
-0.29306551814079285,
-0.1480608433485031,
-0.017421046271920204,
0.11587614566087723,
-0.21604610979557037,
-0.01805843785405159,
-0.06785493344068527,
0.06425375491380692,
-0.3971650302410126,
0.032090216875076294,
0.3310684561729431,
0.1310616433620453,
-0.05510091409087181,
0.5344244837760925,
-0.35351359844207764,
-0.054310768842697144,
-0.5124526619911194,
0.059456828981637955,
-0.03845793008804321,
-0.18788516521453857,
-0.20031361281871796,
0.14688830077648163,
-0.03438076376914978,
0.19412899017333984,
0.13124574720859528,
0.09136668592691422,
0.17583182454109192,
0.07644136995077133,
0.5533528327941895,
-0.27334460616111755,
0.22025129199028015,
0.28968125581741333,
-0.2941051721572876,
0.47354015707969666,
-0.05680030211806297,
0.2583467364311218,
-0.21328523755073547,
0.46844595670700073,
-0.5137670636177063,
-0.445568710565567,
0.10400662571191788,
-0.0502089187502861,
-0.03491929545998573,
0.23659226298332214,
-0.2229653298854828,
0.30192339420318604,
0.3209953308105469,
-0.0065402984619140625,
-0.1902330219745636,
-0.25813406705856323,
-0.5693914890289307,
-0.09316278249025345,
0.24144941568374634,
0.2863369584083557,
-0.12843281030654907,
0.028802692890167236,
0.12923508882522583,
0.29650819301605225,
0.7083098888397217,
0.3495642840862274,
-0.1610262095928192,
0.19753581285476685,
-0.11216670274734497,
0.5817082524299622,
-0.05730853229761124,
-0.00249486044049263,
-0.12219689786434174,
0.3314131796360016,
-0.3430330753326416,
-0.1398526430130005,
-0.019154489040374756,
0.07025682926177979,
0.21191103756427765,
-0.13986480236053467,
0.2076440006494522,
0.008496680296957493,
-0.026346905156970024,
0.301217645406723,
-0.44608166813850403,
0.08367402106523514,
0.25699830055236816,
-0.05780501291155815,
-0.19637708365917206,
-0.14048701524734497,
-0.31745201349258423,
0.030050866305828094,
0.02543262019753456,
-0.09758996963500977,
0.12095540761947632,
0.0960756242275238,
0.1515376716852188,
-0.14940106868743896,
0.007411420810967684,
0.07935702800750732,
0.04486984759569168,
0.16375437378883362,
-0.17772026360034943,
0.057131558656692505,
0.022835493087768555,
-0.08049045503139496,
0.1946887969970703,
-0.007332246750593185,
-0.07773150503635406,
0.0006754063069820404,
-0.10422912240028381,
-0.13303746283054352,
-0.17139223217964172,
-0.024113740772008896,
-0.05275753140449524,
0.025619611144065857,
0.02859613113105297,
-0.009810044430196285,
0.17172089219093323,
-0.12697318196296692,
0.08561339974403381,
-0.19915840029716492,
-0.3183273375034332,
0.17669612169265747,
0.2936829924583435,
-0.12608474493026733,
0.02391902357339859,
0.34933897852897644,
0.3390118479728699,
0.06824380159378052,
-0.09696901589632034,
0.2577647268772125,
0.3222963809967041,
0.22592312097549438,
0.2996600568294525,
-0.20686660706996918,
-0.09243398904800415,
-0.23356062173843384,
0.21503600478172302,
0.8690191507339478,
0.37586987018585205,
0.2990356981754303,
-0.02441377379000187,
-0.2960141897201538,
-0.012867873534560204,
0.28249654173851013,
-0.002305198460817337,
-0.039700865745544434,
0.23677751421928406,
0.3676820695400238,
0.34669721126556396,
0.2306516170501709,
-0.014993354678153992,
0.19681207835674286,
0.13635261356830597,
-0.2129918783903122,
-0.18814945220947266,
0.03766226768493652,
-0.03436030447483063,
-0.19880974292755127,
0.10226528346538544,
-0.585914671421051,
0.24423328042030334,
-0.03522733971476555,
0.17115913331508636,
-0.006375176832079887,
-0.18223696947097778,
-0.0630132406949997,
0.14678418636322021,
0.15396234393119812,
0.04128149524331093,
-0.02722299098968506,
0.12797431647777557,
0.07009481638669968,
-0.09168410301208496,
-0.11230303347110748,
0.22079849243164062,
0.5185968279838562,
-0.2242206335067749,
0.1264091283082962,
-0.18155185878276825,
0.34845811128616333,
-0.009257896803319454,
-0.11816640943288803,
-0.11356541514396667,
-0.28556519746780396,
-0.023304510861635208,
0.08059684187173843,
0.1668618768453598,
0.10961395502090454,
-0.014417813159525394,
-0.07330082356929779,
-0.10039824992418289,
0.2277221828699112,
-0.0665106549859047,
-0.025416335090994835,
-0.2751340866088867,
-0.15016810595989227,
0.34992751479148865,
0.07543935626745224,
0.042004019021987915,
-0.010030233301222324,
-0.3488823175430298,
0.0729173794388771,
-0.5219569802284241,
-0.03303463011980057,
0.06337423622608185,
-0.03318654000759125,
0.01790820062160492,
0.021705307066440582,
-0.5248932838439941,
0.15168620645999908,
0.15394800901412964,
-0.13308443129062653,
-0.2944364845752716,
-0.011410007253289223,
-0.2839922606945038,
-0.2393367737531662,
-0.0805283859372139,
0.15747463703155518,
-0.0880604088306427,
0.303366094827652,
0.12422962486743927,
-0.14324957132339478,
0.1995019167661667,
-0.17562752962112427,
-0.10011989623308182,
0.15434320271015167,
-0.04619309678673744,
-0.3905458152294159,
-0.055069394409656525,
-0.28512686491012573,
0.3271588087081909,
-0.10269133001565933,
0.08981381356716156,
0.03174937143921852,
-0.04199744760990143,
-0.08727672696113586,
0.1167670413851738,
0.08024047315120697,
0.010884149931371212,
-0.0897267684340477,
0.027496282011270523,
-0.05800176411867142,
-0.06222395598888397,
0.3971165120601654,
0.15351128578186035,
0.0334780216217041,
0.11515942960977554,
-0.387647420167923,
-0.15995261073112488,
0.0064628757536411285,
-0.04981742054224014,
0.0998838022351265,
0.3346399664878845,
0.08743588626384735,
0.9783519506454468,
0.10623735189437866,
-0.2804867923259735,
-0.13369588553905487,
-0.18366867303848267,
-0.27380499243736267,
0.0565309152007103,
0.01108679361641407,
0.2926234304904938,
0.34815824031829834,
-0.10604918748140335,
0.3516160249710083,
0.036031924188137054,
-0.4280942976474762,
0.15207351744174957,
0.010627549141645432,
-0.23304149508476257,
-0.1345243752002716,
0.15944653749465942,
-0.2357105314731598,
0.2996194660663605,
-0.005007565021514893,
0.23052918910980225,
-0.42751574516296387,
-0.35960668325424194,
-0.14575989544391632,
0.026566244661808014,
0.050689417868852615,
-0.33763664960861206,
-0.6599960327148438,
-0.12410730868577957,
-0.8557754755020142,
0.39288437366485596,
0.06686916202306747,
0.40006566047668457,
0.35541611909866333,
-0.0419251024723053,
0.2548027038574219,
-0.17056526243686676,
0.926128625869751,
-0.3752496838569641,
-0.0479908362030983,
0.0609387569129467,
-0.3622167110443115,
-0.18249495327472687,
-0.20558753609657288,
-0.06739325821399689,
0.5040720105171204,
0.47711339592933655,
0.6695144176483154,
-0.08400262892246246,
-0.3767009377479553,
0.05166050046682358,
-0.1607218235731125,
0.15727947652339935,
-0.10005979984998703,
-0.32020998001098633,
0.009181313216686249,
0.17804990708827972,
0.3636064827442169,
-0.13268928229808807,
0.1217941865324974,
-0.11575271189212799,
-0.18652673065662384,
-0.09268063306808472,
-0.03155317157506943,
0.34767693281173706,
0.04032110422849655,
0.19687706232070923,
0.2026282101869583,
0.21273206174373627,
0.35796603560447693,
0.292323499917984,
0.3474162220954895,
-0.3887327015399933,
-0.0742839127779007,
0.09219560772180557,
0.17492318153381348,
-0.10783877223730087,
0.4646160304546356,
0.5473313331604004,
0.10762969404459,
0.18178990483283997,
0.09660745412111282,
0.3447222113609314,
-0.10603323578834534,
0.2503790259361267,
0.5614131093025208,
0.24373292922973633,
-0.5444434285163879,
-0.22885888814926147,
0.07442107796669006,
0.547826886177063,
-0.07305995374917984,
-0.01377817988395691,
-0.4667115807533264,
-0.054907530546188354,
0.11544017493724823,
0.35338547825813293,
1.1370750665664673,
-0.457267165184021,
0.22359883785247803,
-0.3345712721347809,
0.1865452229976654,
0.13915596902370453,
-0.3053279519081116,
0.1694035530090332,
-0.3431829810142517,
0.126192107796669,
-0.05196421593427658,
-0.06980392336845398,
0.25647860765457153,
0.4701363444328308,
0.14895598590373993,
0.18981806933879852,
-0.028373468667268753,
0.29571425914764404,
-0.170543372631073,
0.09332281351089478,
0.5417779088020325,
-0.33417803049087524,
0.1757441759109497,
-0.057511523365974426,
0.20419569313526154,
0.014702100306749344,
-0.011662532575428486,
0.02751753106713295,
-0.02994864247739315,
-0.10835963487625122,
-0.1351933479309082,
-0.33475005626678467,
-0.26404663920402527,
-0.10444065183401108,
0.23980793356895447,
-0.044311895966529846,
-0.02810969017446041,
0.06863163411617279,
0.2051471322774887,
0.29105496406555176,
-0.06697658449411392,
0.08097667992115021,
0.09745670109987259,
0.13817496597766876,
0.12661325931549072,
-0.37453845143318176,
-0.13690553605556488,
-0.04913552105426788,
0.03544776886701584,
-0.16503021121025085,
-0.1853073090314865,
0.0037484504282474518,
-0.25610053539276123,
0.07921888679265976,
0.6586584448814392,
0.33351078629493713,
-0.10974667966365814,
0.17904633283615112,
-0.12392520904541016,
-0.12108577787876129,
-0.014887537807226181,
-0.0461563840508461,
-0.19621984660625458,
0.4305235743522644,
-0.19158616662025452,
-0.4917837083339691,
-0.01590234413743019,
0.4187040627002716,
0.10132560133934021,
-0.1454496681690216,
0.5520439147949219,
-0.27038607001304626,
-0.215264230966568,
-0.06523428112268448,
0.41158151626586914,
0.11036351323127747,
0.15790686011314392,
0.048367906361818314,
0.3706419765949249,
-0.025278232991695404,
0.3468017876148224,
-0.0522843562066555,
-0.2708885669708252,
0.06320029497146606,
-0.19352154433727264,
-0.1205906793475151,
-0.3543396294116974,
-0.3424692749977112,
-0.1876293122768402,
-0.09332937002182007,
0.010733354836702347,
0.22033123672008514,
-0.22723570466041565,
-0.1343098133802414,
-0.1209256500005722,
0.07825217396020889,
-0.08590433746576309,
0.27702128887176514,
-0.20594355463981628,
-0.032888732850551605,
-0.05245454981923103,
-0.0511377714574337,
0.018496496602892876,
0.22472847998142242,
-0.20351213216781616,
-0.07939274609088898,
-0.09618651866912842,
0.2424830198287964,
0.06960556656122208,
-0.44965291023254395,
0.3252120316028595,
0.1513260155916214,
-0.3381514847278595,
-0.2613518536090851,
-0.14117980003356934,
0.29948902130126953,
-0.044470325112342834,
-0.12298835813999176,
0.46392104029655457,
0.1736132800579071,
-0.12115305662155151,
0.17228934168815613,
-0.0991256833076477,
0.1508995145559311,
-0.05242659151554108,
0.3517231047153473,
0.3136865794658661,
-0.08892937749624252,
0.2567594051361084,
-0.09257704764604568,
0.14401297271251678,
0.11102460324764252,
0.05402644723653793,
-0.08571508526802063,
0.034170519560575485,
0.19236083328723907,
-0.041482679545879364,
0.1802285611629486,
0.033895090222358704,
-0.39461010694503784,
0.6167110204696655,
0.00012555532157421112,
0.013185232877731323,
-0.1981576383113861,
0.3172851502895355,
0.07909351587295532,
-0.00490773469209671,
0.1999773234128952,
0.3037671446800232,
0.35840824246406555,
-0.20441605150699615,
0.010377084836363792,
-0.14363591372966766,
-0.2623724937438965,
0.012043849565088749,
0.12287735939025879,
0.11616334319114685,
0.16274113953113556,
0.4875863790512085,
0.019633721560239792,
-0.06769970804452896,
0.4756556749343872,
0.35892510414123535,
0.5300144553184509,
0.3057103455066681,
0.4101432263851166,
-0.45832350850105286,
-0.3641141355037689,
-0.27647674083709717,
0.6516804695129395,
0.023685500025749207,
0.2694936692714691,
-0.06205299496650696,
0.254219651222229,
-0.12296313792467117,
-0.4720274806022644,
0.11580576747655869,
0.3828215003013611,
-0.34189480543136597,
-0.5146675705909729,
-0.25812405347824097,
-0.08286702632904053,
-0.08892245590686798,
0.1356116235256195,
-0.2706579267978668,
0.11889214813709259,
0.35471582412719727,
0.08941930532455444,
0.09137912839651108,
0.006107332184910774,
-0.1751972734928131,
-0.14630883932113647,
0.31465286016464233,
-0.029330043122172356,
0.18193894624710083,
-0.6590738892555237,
0.12167564779520035,
0.1522233486175537,
-0.09280695021152496,
0.39533987641334534,
0.6274181008338928,
-0.4116167426109314,
-0.030941952019929886,
0.017312612384557724,
0.07394653558731079,
0.19642560184001923,
0.2626112401485443,
0.027368348091840744,
-0.11657410860061646,
-0.06307802349328995,
-0.23297624289989471,
-0.14383623003959656,
-0.32508447766304016,
0.04159941524267197,
0.032275885343551636,
0.16601410508155823,
0.291897714138031,
-0.05132322758436203,
-0.22183039784431458,
-0.06752240657806396,
0.21381917595863342,
-0.11940828710794449,
0.006276750471442938,
0.10029967129230499,
-0.1701916754245758,
0.10461535304784775,
0.10895177721977234,
-0.008592977188527584,
-0.231593519449234,
0.40622764825820923,
0.20745258033275604,
-0.08140378445386887,
-0.44388318061828613,
-0.1291896402835846,
-0.47208371758461,
0.14140425622463226,
-0.3913087844848633,
0.13256268203258514,
-0.1618444174528122,
0.018649859353899956,
-0.029739513993263245,
-0.017582517117261887,
0.11554951965808868,
-0.09198883175849915,
-0.08794176578521729,
0.28403958678245544,
-0.20839852094650269,
0.488794207572937,
-0.3455665111541748,
-0.20101581513881683,
-0.017706546932458878,
-0.3488199710845947,
0.4559251666069031,
-0.03280854970216751,
-0.17777597904205322,
-0.07113572210073471,
0.18705174326896667,
-0.17032673954963684,
0.3382769227027893,
0.31568336486816406,
0.12693186104297638,
0.20962101221084595,
0.09294239431619644,
0.13427722454071045,
0.006138026714324951,
0.36944857239723206,
-0.23780861496925354,
0.21623778343200684,
-0.08952072262763977,
-0.0584542416036129,
-0.08209779858589172,
0.06437644362449646,
-0.0697735846042633,
-0.06845774501562119,
0.19577458500862122,
-0.08025523275136948,
-0.17685352265834808,
0.22318975627422333,
0.0027977153658866882,
0.0258171446621418,
-0.1533598005771637,
0.16236692667007446,
0.22840279340744019,
-0.07513407617807388,
-0.3145270347595215,
0.1471104621887207,
0.29703494906425476,
-0.5313220024108887,
-0.12634335458278656,
-0.7054094076156616,
0.09140776097774506,
0.09932161867618561,
0.17809180915355682,
-0.14926744997501373,
-0.24740970134735107,
0.4167240560054779,
-0.1845206320285797,
-0.36370784044265747,
0.2536585330963135,
-0.06230395659804344,
-0.20889024436473846,
-0.37100517749786377,
0.05346085876226425,
-0.13625824451446533,
-0.08122895658016205,
0.047062333673238754,
-0.09135738760232925
] |
https://github.com/huggingface/datasets/issues/2294 | Slow #0 when using map to tokenize. | Hi, I have found the reason of it. Before using the map function to tokenize the data, I concatenate the wikipedia and bookcorpus first, like this:
```if args.dataset_name1 is not None:
dataset1 = load_dataset(args.dataset_name1, args.dataset_config_name1, split="train")
dataset1 = dataset1.remove_columns('title')
if args.dataset_name2 is not None:
dataset2 = load_dataset(args.dataset_name2, args.dataset_config_name2,split="train")
assert dataset1.features.type == dataset2.features.type, str(dataset1.features.type)+';'+str(dataset2.features.type)
datasets12 = concatenate_datasets([dataset1, dataset2], split='train')
```
When I just use one datasets, e.g. wikipedia, the problem seems no longer exist:

Bookcorpus has more row numbers than Wikipedia, however, it takes much more time to process each batch of wiki than that of bookcorpus. When we first concatenate two datasets and then use _map_ to process the concatenated datasets, e.g. `num_proc=5`, process 0 has to process all of the wikipedia data, causing the problem that #0 takes a longer time to finish the job.
The problem is caused by the different characteristic of different datasets. One solution might be using _map_ first to process two datasets seperately, then concatenate the tokenized and processed datasets before input to the `Dataloader`.
| Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1οΌthe process _#0_ is much slower than others.
It looks like this:

It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
| 172 | Slow #0 when using map to tokenize.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1οΌthe process _#0_ is much slower than others.
It looks like this:

It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
Hi, I have found the reason of it. Before using the map function to tokenize the data, I concatenate the wikipedia and bookcorpus first, like this:
```if args.dataset_name1 is not None:
dataset1 = load_dataset(args.dataset_name1, args.dataset_config_name1, split="train")
dataset1 = dataset1.remove_columns('title')
if args.dataset_name2 is not None:
dataset2 = load_dataset(args.dataset_name2, args.dataset_config_name2,split="train")
assert dataset1.features.type == dataset2.features.type, str(dataset1.features.type)+';'+str(dataset2.features.type)
datasets12 = concatenate_datasets([dataset1, dataset2], split='train')
```
When I just use one datasets, e.g. wikipedia, the problem seems no longer exist:

Bookcorpus has more row numbers than Wikipedia, however, it takes much more time to process each batch of wiki than that of bookcorpus. When we first concatenate two datasets and then use _map_ to process the concatenated datasets, e.g. `num_proc=5`, process 0 has to process all of the wikipedia data, causing the problem that #0 takes a longer time to finish the job.
The problem is caused by the different characteristic of different datasets. One solution might be using _map_ first to process two datasets seperately, then concatenate the tokenized and processed datasets before input to the `Dataloader`.
| [
-0.42167845368385315,
-0.24637693166732788,
-0.00015565194189548492,
0.06709451228380203,
0.030975522473454475,
-0.2085663378238678,
0.43102583289146423,
0.22374969720840454,
-0.25451645255088806,
0.045073047280311584,
0.23347431421279907,
0.3255724310874939,
-0.14147108793258667,
0.017606055364012718,
-0.297590047121048,
0.09440266340970993,
0.17002199590206146,
0.19785039126873016,
0.318006306886673,
-0.1069222241640091,
-0.11429566890001297,
-0.03254782408475876,
-0.5134145021438599,
0.09378033131361008,
-0.5169956088066101,
-0.09423456341028214,
-0.052354827523231506,
-0.008509516716003418,
-0.08783933520317078,
-0.3727579116821289,
-0.17961016297340393,
0.05333864316344261,
0.020905740559101105,
0.32290753722190857,
-0.00013123246026225388,
-0.21676047146320343,
0.32198071479797363,
0.25103747844696045,
-0.07772329449653625,
0.019832856953144073,
0.03181175887584686,
-0.330893337726593,
-0.07788746058940887,
-0.12342357635498047,
0.017531752586364746,
0.02374173328280449,
0.07496760040521622,
-0.20540288090705872,
0.09135495871305466,
0.014180569909512997,
0.03649245575070381,
0.349934846162796,
-0.35048985481262207,
0.2594856321811676,
-0.0748000219464302,
0.2026159018278122,
-0.06262579560279846,
-0.0495988093316555,
0.10120181739330292,
-0.1707480251789093,
0.1734016090631485,
0.28134885430336,
-0.24066780507564545,
-0.049562837928533554,
0.13569462299346924,
0.16033326089382172,
0.43770918250083923,
-0.42107731103897095,
0.31775468587875366,
0.24657976627349854,
-0.04226280003786087,
0.09783375263214111,
-0.31103837490081787,
-0.29174861311912537,
0.08049698173999786,
-0.27557307481765747,
-0.026098571717739105,
0.05040737986564636,
0.02430269867181778,
-0.006456207484006882,
-0.42796459794044495,
0.10108736902475357,
0.11111155152320862,
0.14552843570709229,
-0.27558743953704834,
0.5521756410598755,
0.10676784813404083,
0.20406848192214966,
0.16890361905097961,
-0.2546336054801941,
-0.33348941802978516,
-0.4314097762107849,
0.18362151086330414,
0.4776843786239624,
-0.28742802143096924,
-0.11895205825567245,
-0.15537527203559875,
-0.24077847599983215,
-0.13580480217933655,
-0.32564985752105713,
-0.4295947551727295,
0.35856884717941284,
0.03149789944291115,
0.03672151640057564,
0.11392918229103088,
0.011199640110135078,
0.14159753918647766,
0.3352191150188446,
0.2813810110092163,
-0.3873302638530731,
-0.23290005326271057,
0.09478974342346191,
-0.31947192549705505,
0.0019108988344669342,
-0.1017473042011261,
0.05734924599528313,
-0.13844770193099976,
-0.06245207041501999,
-0.0863148495554924,
0.029960226267576218,
-0.4705270528793335,
0.03241971135139465,
0.3583802878856659,
0.1112598329782486,
-0.08910909295082092,
0.5567100048065186,
-0.3564700484275818,
-0.05587795376777649,
-0.47425854206085205,
0.10342720150947571,
-0.010232636705040932,
-0.16933758556842804,
-0.21804584562778473,
0.1857893019914627,
0.02463449165225029,
0.09988516569137573,
0.06037427484989166,
0.1137022003531456,
0.12274521589279175,
0.02882973849773407,
0.5027250051498413,
-0.3931916058063507,
0.22995439171791077,
0.2137603908777237,
-0.24163179099559784,
0.5415734052658081,
-0.08039553463459015,
0.0517808273434639,
-0.2654263973236084,
0.4353519082069397,
-0.5407431125640869,
-0.40552034974098206,
-0.03780093044042587,
-0.03620113059878349,
-0.021370602771639824,
0.288274347782135,
-0.289829820394516,
0.36462488770484924,
0.3560541868209839,
-0.05927460640668869,
-0.21940454840660095,
-0.10982203483581543,
-0.42981472611427307,
-0.06623100489377975,
0.19202694296836853,
0.382096529006958,
-0.08586779981851578,
-0.025105439126491547,
0.2118615359067917,
0.36471062898635864,
0.7044426798820496,
0.47222843766212463,
-0.2808418869972229,
0.18102872371673584,
-0.14222204685211182,
0.6345635056495667,
0.10090390592813492,
-0.266166627407074,
-0.17178627848625183,
0.4077458381652832,
-0.3184235095977783,
-0.0377776101231575,
0.08768276870250702,
0.055564772337675095,
0.187447190284729,
-0.11307746917009354,
0.24419884383678436,
0.10691063851118088,
0.0766587108373642,
0.3537716269493103,
-0.4231742322444916,
0.023316076025366783,
0.3323548436164856,
-0.04671397805213928,
-0.2578984797000885,
-0.1601983606815338,
-0.27069658041000366,
0.09337923675775528,
0.07372359931468964,
-0.19346746802330017,
0.1603424996137619,
0.2436690479516983,
0.14880028367042542,
-0.19710423052310944,
0.014564575627446175,
0.13077330589294434,
-0.14738863706588745,
0.16254597902297974,
-0.09614962339401245,
0.12925252318382263,
-0.046913981437683105,
-0.20020806789398193,
0.1997576355934143,
-0.12304528802633286,
-0.10882674157619476,
-0.03660910204052925,
-0.12148464471101761,
-0.10476914048194885,
-0.11755223572254181,
0.00853521004319191,
0.004581291228532791,
0.08541154116392136,
0.025008438155055046,
-0.004468071274459362,
0.03857402503490448,
-0.038714125752449036,
0.1060212031006813,
-0.09753631055355072,
-0.29426634311676025,
0.239121675491333,
0.2922898828983307,
-0.16702069342136383,
0.04660962522029877,
0.37520694732666016,
0.27247634530067444,
0.04395212233066559,
-0.011886291205883026,
0.18840204179286957,
0.3430140018463135,
0.19582247734069824,
0.22165417671203613,
-0.19403742253780365,
0.005526688881218433,
-0.2589847147464752,
0.06280260533094406,
0.8033881783485413,
0.4351346790790558,
0.37876051664352417,
0.05902274698019028,
-0.310072660446167,
0.0016226191073656082,
0.16338390111923218,
-0.08737669885158539,
-0.12062899768352509,
0.19154022634029388,
0.37264326214790344,
0.38534411787986755,
0.34815481305122375,
-0.04250849783420563,
0.20322135090827942,
0.27625128626823425,
-0.12385816872119904,
-0.19095522165298462,
0.03399086371064186,
-0.10105227679014206,
-0.22114846110343933,
0.1905425637960434,
-0.5782691240310669,
0.33711448311805725,
0.0041397144086658955,
0.18185317516326904,
-0.019605474546551704,
-0.13976198434829712,
-0.029380980879068375,
0.20845162868499756,
0.10590310394763947,
-0.017411140725016594,
-0.005594015121459961,
0.2592741847038269,
0.07065405696630478,
-0.0856020450592041,
-0.2151547521352768,
0.27202051877975464,
0.4728948473930359,
-0.17353878915309906,
0.14425136148929596,
-0.15284860134124756,
0.25186070799827576,
-0.004739225842058659,
-0.22065198421478271,
-0.08354470133781433,
-0.23567107319831848,
-0.08557075262069702,
0.14910189807415009,
0.19205908477306366,
0.17634820938110352,
0.07803165912628174,
-0.03445945680141449,
-0.04810497909784317,
0.07938231527805328,
-0.04259008541703224,
-0.03538225591182709,
-0.2902141511440277,
-0.17740631103515625,
0.3210523724555969,
0.06197864189743996,
0.011938702315092087,
0.03964737057685852,
-0.3111138939857483,
-0.05456027388572693,
-0.5426451563835144,
-0.0045082420110702515,
0.018583308905363083,
-0.1482398808002472,
-0.0001314803957939148,
-0.08611138164997101,
-0.5322771072387695,
0.013214140199124813,
0.13098756968975067,
0.1258891373872757,
-0.3133978247642517,
0.11242775619029999,
-0.25384464859962463,
-0.30514663457870483,
-0.1234661191701889,
0.10489535331726074,
-0.05658479034900665,
0.2436973750591278,
0.1446893811225891,
-0.18812152743339539,
0.19457805156707764,
-0.05906463414430618,
-0.09023500978946686,
0.14190956950187683,
-0.022459235042333603,
-0.3483140468597412,
-0.09313447028398514,
-0.21285223960876465,
0.2848573327064514,
-0.07473091036081314,
0.09340477734804153,
-0.09792374074459076,
-0.038397930562496185,
-0.0665082335472107,
0.21679046750068665,
-0.005020372569561005,
-0.010864379815757275,
-0.1919536143541336,
0.11025643348693848,
-0.1700984686613083,
-0.028851961717009544,
0.3901929259300232,
0.22086969017982483,
0.008933575823903084,
0.1864255666732788,
-0.2493094652891159,
-0.10366139560937881,
-0.03694303333759308,
-0.04513349384069443,
0.026736536994576454,
0.2068386673927307,
0.13867463171482086,
0.898677408695221,
0.26496636867523193,
-0.34780314564704895,
-0.14073674380779266,
-0.16922342777252197,
-0.1681494414806366,
0.033997438848018646,
-0.07027363777160645,
0.1933210790157318,
0.28786590695381165,
0.06534343212842941,
0.33377617597579956,
0.047731075435876846,
-0.42551103234291077,
0.0757417157292366,
0.06794261932373047,
-0.2009892463684082,
-0.18830610811710358,
0.1098383218050003,
-0.3344596326351166,
0.350389301776886,
0.036955054849386215,
0.1809234321117401,
-0.3938423693180084,
-0.3281775116920471,
-0.17034600675106049,
-0.01272118091583252,
-0.07054644078016281,
-0.4317486882209778,
-0.7411485910415649,
-0.1603211909532547,
-0.8604407906532288,
0.3774617910385132,
0.11389423906803131,
0.42732059955596924,
0.4424974024295807,
-0.04967212304472923,
0.20070290565490723,
-0.14439544081687927,
0.9118043184280396,
-0.23548243939876556,
-0.13204216957092285,
0.06513026356697083,
-0.2948299050331116,
-0.28250324726104736,
-0.18488416075706482,
-0.13500621914863586,
0.5606468915939331,
0.41322851181030273,
0.8910483121871948,
-0.28818565607070923,
-0.3910263776779175,
0.09182866662740707,
-0.05423374101519585,
0.23685795068740845,
-0.01176178827881813,
-0.2989795506000519,
0.021760009229183197,
0.05377904325723648,
0.3063645660877228,
-0.12716612219810486,
0.21478314697742462,
-0.12567061185836792,
-0.22436942160129547,
-0.10458685457706451,
-0.057967670261859894,
0.3222067654132843,
0.01604941114783287,
0.2576272785663605,
0.27048149704933167,
0.2573385238647461,
0.25260069966316223,
0.22246165573596954,
0.4124114513397217,
-0.3274652659893036,
-0.04577009007334709,
-0.07604862749576569,
0.0832429900765419,
-0.09737298637628555,
0.43502211570739746,
0.5226224660873413,
0.08721296489238739,
0.27333521842956543,
0.05533755198121071,
0.4113697409629822,
-0.08916182070970535,
0.30404141545295715,
0.5810798406600952,
0.2233852744102478,
-0.674513041973114,
-0.13655833899974823,
0.05481284111738205,
0.4843257665634155,
-0.11718446016311646,
0.10271140933036804,
-0.4373598098754883,
-0.14254383742809296,
0.05416548624634743,
0.09164847433567047,
1.134427785873413,
-0.3912650942802429,
0.29872220754623413,
-0.3353005051612854,
0.20504985749721527,
0.2643357515335083,
-0.2932564616203308,
0.14595948159694672,
-0.26960131525993347,
0.08868017047643661,
-0.022332724183797836,
-0.07194402813911438,
0.2274925708770752,
0.4449828863143921,
-0.016142889857292175,
0.2005709409713745,
-0.09613733738660812,
0.384724885225296,
-0.19489625096321106,
0.2793482840061188,
0.5195395946502686,
-0.36067038774490356,
0.09771940112113953,
-0.09629567712545395,
0.10686507821083069,
-0.00455460324883461,
0.04020712152123451,
0.0704549252986908,
-0.1235213577747345,
-0.21523259580135345,
-0.13782329857349396,
-0.21957743167877197,
-0.2363106608390808,
0.1335582733154297,
0.14386676251888275,
-0.08207087963819504,
-0.060090187937021255,
0.1567382514476776,
0.1476810872554779,
0.3711024522781372,
-0.073887899518013,
0.03735831379890442,
0.06240278109908104,
0.14008702337741852,
0.116923026740551,
-0.4759299159049988,
-0.14206042885780334,
0.016600042581558228,
0.02168133109807968,
-0.05113457143306732,
-0.2104135900735855,
0.004490472376346588,
-0.25950685143470764,
0.12671568989753723,
0.6846944093704224,
0.20584478974342346,
-0.07738621532917023,
0.28717899322509766,
-0.15542727708816528,
-0.12912335991859436,
-0.06032403185963631,
-0.026162169873714447,
-0.18967513740062714,
0.43738821148872375,
-0.03921080008149147,
-0.5450550317764282,
-0.01158689334988594,
0.5462255477905273,
0.17664140462875366,
-0.13051609694957733,
0.5346001386642456,
-0.3273347318172455,
-0.2365206629037857,
-0.06767253577709198,
0.36296772956848145,
0.006480595096945763,
0.03684481233358383,
0.009267629124224186,
0.3748600482940674,
-0.0010216683149337769,
0.3156610131263733,
0.057990506291389465,
-0.3333628177642822,
0.11514084041118622,
-0.13355904817581177,
-0.136902317404747,
-0.29693603515625,
-0.23053093254566193,
-0.15616172552108765,
-0.03371596708893776,
0.07893896847963333,
0.2386428713798523,
-0.359706848859787,
-0.11171521246433258,
-0.10312382131814957,
0.17227761447429657,
-0.17168353497982025,
0.34740808606147766,
-0.14703135192394257,
-0.009896710515022278,
-0.03673100098967552,
-0.07107879221439362,
0.05762927234172821,
0.12061527371406555,
-0.09152223914861679,
-0.0774664506316185,
-0.141189306974411,
0.24971386790275574,
0.005295809358358383,
-0.396646648645401,
0.2849988341331482,
0.06300892680883408,
-0.3061588406562805,
-0.3085697591304779,
-0.03629327937960625,
0.31323227286338806,
-0.011405959725379944,
-0.13231606781482697,
0.3741411566734314,
0.17122745513916016,
-0.1985107809305191,
0.2360491007566452,
-0.14978240430355072,
0.04875880852341652,
-0.017127975821495056,
0.3821559250354767,
0.29013165831565857,
-0.07765336334705353,
0.12342339009046555,
-0.06678032130002975,
0.28998488187789917,
0.16014230251312256,
-0.012937843799591064,
-0.03843626379966736,
-0.029101131483912468,
0.170157328248024,
-0.038660887628793716,
0.21330702304840088,
0.0034067986998707056,
-0.43370363116264343,
0.5494689345359802,
-0.0024501215666532516,
-0.00126626156270504,
-0.29426926374435425,
0.24262307584285736,
-0.04352523013949394,
0.02068616822361946,
0.17211240530014038,
0.2906186878681183,
0.3161355257034302,
-0.11334851384162903,
-0.06372569501399994,
-0.012846273370087147,
-0.02096814662218094,
0.0833916962146759,
0.1557512730360031,
0.15716731548309326,
0.07762573659420013,
0.3752673268318176,
0.0021043047308921814,
-0.030233927071094513,
0.3816515803337097,
0.26340699195861816,
0.5298106074333191,
0.4195977747440338,
0.4187684655189514,
-0.4285307228565216,
-0.2606983184814453,
-0.17196045815944672,
0.5843438506126404,
-0.04573799669742584,
0.1622937023639679,
-0.10147355496883392,
0.2947356402873993,
-0.19843803346157074,
-0.4319774806499481,
0.1838296502828598,
0.38172897696495056,
-0.29960981011390686,
-0.4777975380420685,
-0.17484749853610992,
-0.08746948838233948,
-0.06911733746528625,
0.09740805625915527,
-0.22529336810112,
0.1270914077758789,
0.3971894383430481,
0.10532009601593018,
0.09546933323144913,
-0.11672188341617584,
-0.05126481503248215,
-0.05140881985425949,
0.35682615637779236,
-0.08923271298408508,
0.2188120037317276,
-0.5762062072753906,
0.16820567846298218,
0.08205191791057587,
0.00751890242099762,
0.4137622117996216,
0.6114664077758789,
-0.3368604779243469,
-0.05945153161883354,
0.08099286258220673,
0.056121379137039185,
0.22540532052516937,
0.2264373004436493,
0.13199062645435333,
-0.3040258586406708,
-0.010780831798911095,
-0.2309984266757965,
-0.1472589075565338,
-0.3216593563556671,
0.07356960326433182,
-0.11813138425350189,
-0.011339429765939713,
0.15413731336593628,
-0.09633870422840118,
-0.2762734293937683,
-0.03619392216205597,
0.17714320123195648,
-0.16272106766700745,
-0.0665559321641922,
0.222011536359787,
-0.20433813333511353,
0.0730709657073021,
0.04406506568193436,
-0.016161641106009483,
-0.20554547011852264,
0.4363066554069519,
0.19314676523208618,
0.00880003347992897,
-0.5149209499359131,
-0.20202025771141052,
-0.4283938407897949,
0.1290433704853058,
-0.3554840683937073,
0.12117722630500793,
-0.2088877260684967,
0.10357853770256042,
-0.0451580211520195,
0.04535584896802902,
0.0580851286649704,
-0.06809227913618088,
-0.12395837157964706,
0.2289159595966339,
-0.30949825048446655,
0.5009472370147705,
-0.2956533432006836,
-0.23765456676483154,
-0.01270137820392847,
-0.49918660521507263,
0.46235391497612,
0.08462249487638474,
-0.1847006380558014,
-0.08112623542547226,
0.18745368719100952,
-0.08022277057170868,
0.293230801820755,
0.34985992312431335,
0.11591572314500809,
0.30475082993507385,
0.08784636855125427,
0.07699566334486008,
0.0760035514831543,
0.3194643557071686,
-0.1371796429157257,
0.2736656367778778,
-0.018378563225269318,
-0.08928611129522324,
-0.14532679319381714,
0.0888003557920456,
0.01611756905913353,
0.009906197898089886,
0.2922937273979187,
-0.0905245691537857,
-0.14105767011642456,
0.23350326716899872,
-0.023172613233327866,
0.024936005473136902,
-0.16791507601737976,
0.2333766520023346,
0.21413584053516388,
-0.04573643207550049,
-0.26838624477386475,
0.04451750963926315,
0.33432474732398987,
-0.4197915196418762,
-0.15260004997253418,
-0.6207870244979858,
0.15476197004318237,
0.16830909252166748,
0.16888795793056488,
-0.1889674961566925,
-0.2531670033931732,
0.5244735479354858,
-0.140854150056839,
-0.4507494568824768,
0.29821717739105225,
-0.0810268223285675,
-0.23736213147640228,
-0.38065728545188904,
0.0727001503109932,
-0.1702394187450409,
-0.13346827030181885,
0.009952336549758911,
-0.18789663910865784
] |
https://github.com/huggingface/datasets/issues/2294 | Slow #0 when using map to tokenize. | That makes sense ! You can indeed use `map` on both datasets separately and then concatenate.
Another option is to concatenate, then shuffle, and then `map`. | Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1οΌthe process _#0_ is much slower than others.
It looks like this:

It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
| 26 | Slow #0 when using map to tokenize.
Hi, _datasets_ is really amazing! I am following [run_mlm_no_trainer.py](url) to pre-train BERT, and it uses `tokenized_datasets = raw_datasets.map(
tokenize_function,
batched=True,
num_proc=args.preprocessing_num_workers,
remove_columns=column_names,
load_from_cache_file=not args.overwrite_cache,
)` to tokenize by multiprocessing. However, I have found that when `num_proc`>1οΌthe process _#0_ is much slower than others.
It looks like this:

It takes more than 12 hours for #0, while others just about half an hour. Could anyone tell me it is normal or not, and is there any methods to speed up it?
That makes sense ! You can indeed use `map` on both datasets separately and then concatenate.
Another option is to concatenate, then shuffle, and then `map`. | [
-0.4388079345226288,
-0.2752537131309509,
-0.0035827066749334335,
-0.019504927098751068,
0.037655316293239594,
-0.16884666681289673,
0.3846195936203003,
0.2470967173576355,
-0.2695712745189667,
0.07264755666255951,
0.1870829463005066,
0.34464719891548157,
-0.19860230386257172,
0.0340103805065155,
-0.306135356426239,
0.08785726130008698,
0.11655233055353165,
0.18946292996406555,
0.25975853204727173,
-0.09766264259815216,
-0.1504403054714203,
-0.08729661256074905,
-0.44161176681518555,
0.09104107320308685,
-0.4734841585159302,
-0.08449720591306686,
-0.081472247838974,
0.045618828386068344,
-0.14393630623817444,
-0.2998282313346863,
-0.22646310925483704,
0.10872681438922882,
-0.03661516308784485,
0.33862483501434326,
-0.0001279823190998286,
-0.2329738587141037,
0.21268732845783234,
0.2498806118965149,
0.04579929634928703,
-0.06893527507781982,
0.04123549163341522,
-0.3254992365837097,
-0.1309286206960678,
-0.018702730536460876,
-0.03098028339445591,
-0.017925791442394257,
0.16735957562923431,
-0.11525540053844452,
0.19052499532699585,
-0.04007462412118912,
0.04469265043735504,
0.3407957851886749,
-0.3702792525291443,
0.23145470023155212,
-0.059144146740436554,
0.18320521712303162,
-0.07112859189510345,
-0.06579230725765228,
0.15325486660003662,
-0.22684557735919952,
0.14554594457149506,
0.1906767040491104,
-0.22395484149456024,
-0.03935809060931206,
0.18517020344734192,
0.1328698694705963,
0.4181729853153229,
-0.42736950516700745,
0.28140395879745483,
0.26991990208625793,
-0.17359665036201477,
0.15142884850502014,
-0.33627864718437195,
-0.3355288803577423,
0.04191611707210541,
-0.3565233051776886,
-0.018818773329257965,
-0.03463294357061386,
0.06672845780849457,
-0.0074801817536354065,
-0.5250095725059509,
0.11704239249229431,
0.16615037620067596,
0.0660809800028801,
-0.3220512568950653,
0.6341158151626587,
0.18334606289863586,
0.18640762567520142,
0.19824223220348358,
-0.2674391269683838,
-0.32579657435417175,
-0.3126782178878784,
0.14647090435028076,
0.4829998016357422,
-0.2674064636230469,
-0.11942612379789352,
-0.026169054210186005,
-0.20115545392036438,
-0.1995178461074829,
-0.3869152069091797,
-0.406080424785614,
0.34777870774269104,
0.007418450899422169,
0.07920265197753906,
0.1178823709487915,
0.006118547171354294,
0.08676602691411972,
0.37408310174942017,
0.25618571043014526,
-0.4760048985481262,
-0.24960149824619293,
0.10575873404741287,
-0.32218265533447266,
-0.057648271322250366,
-0.1828148365020752,
0.061621226370334625,
-0.2615203559398651,
-0.044168293476104736,
-0.10433722287416458,
-0.0334300734102726,
-0.41937318444252014,
0.04771079495549202,
0.39618542790412903,
0.08003479242324829,
0.0011543724685907364,
0.5042102932929993,
-0.35018908977508545,
0.010896127671003342,
-0.41825345158576965,
0.128147155046463,
-0.008488444611430168,
-0.18509231507778168,
-0.2621055543422699,
0.11988924443721771,
-0.0490979328751564,
0.20268447697162628,
0.005138729698956013,
0.13343128561973572,
0.19580227136611938,
0.22250545024871826,
0.4963682293891907,
-0.2874108552932739,
0.23971208930015564,
0.22872112691402435,
-0.18486446142196655,
0.4846336543560028,
-0.06758512556552887,
0.1625758707523346,
-0.23178866505622864,
0.44966375827789307,
-0.4836656451225281,
-0.35815373063087463,
0.08868977427482605,
-0.050315458327531815,
-0.029091868549585342,
0.27503520250320435,
-0.20456543564796448,
0.4464251399040222,
0.369326651096344,
-0.09937114268541336,
-0.2557809054851532,
-0.15257397294044495,
-0.5478852987289429,
-0.0989278182387352,
0.24109363555908203,
0.25218889117240906,
-0.158403217792511,
-0.011020522564649582,
0.18653661012649536,
0.36947426199913025,
0.6669709086418152,
0.506736159324646,
-0.28787052631378174,
0.1310133934020996,
-0.1607697606086731,
0.6380208730697632,
0.04072171449661255,
-0.10919305682182312,
-0.1088482216000557,
0.30644819140434265,
-0.4410439133644104,
-0.07145030051469803,
0.012897782027721405,
-0.02921804040670395,
0.1942559778690338,
-0.17179737985134125,
0.3794989287853241,
0.08607492595911026,
-0.12422347068786621,
0.28827404975891113,
-0.42054620385169983,
0.04420527070760727,
0.35064226388931274,
-0.08374135196208954,
-0.21949215233325958,
-0.16221076250076294,
-0.2516686022281647,
-0.02668590098619461,
0.040564920753240585,
-0.19921264052391052,
0.1669297069311142,
0.09592893719673157,
0.16504468023777008,
-0.18165923655033112,
-0.043974317610263824,
0.15509256720542908,
-0.014342091977596283,
0.18942514061927795,
-0.10780394077301025,
0.11658642441034317,
-0.01580815017223358,
-0.11889525502920151,
0.282236784696579,
-0.1358151137828827,
-0.023143712431192398,
0.02862401120364666,
-0.11871293932199478,
-0.1488012671470642,
-0.13671955466270447,
-0.034471794962882996,
-0.04758354276418686,
0.004501317627727985,
0.09343049675226212,
-0.05880584567785263,
0.14931853115558624,
-0.06221906095743179,
0.11666250228881836,
-0.16375809907913208,
-0.295439749956131,
0.24891075491905212,
0.2838457524776459,
-0.14204056560993195,
0.10784560441970825,
0.39625293016433716,
0.2024591714143753,
0.05293906852602959,
-0.018613286316394806,
0.19462671875953674,
0.35677438974380493,
0.29955241084098816,
0.2858375608921051,
-0.3156944215297699,
-0.08971840888261795,
-0.2797778248786926,
0.1507815718650818,
0.8951526880264282,
0.37806856632232666,
0.3151245713233948,
0.05681489408016205,
-0.2766113579273224,
-0.004333294928073883,
0.22136464715003967,
-0.03417942300438881,
-0.028355445712804794,
0.20339271426200867,
0.33419644832611084,
0.3051333725452423,
0.2553851008415222,
-0.04301539063453674,
0.2804567813873291,
0.21648482978343964,
-0.09988871216773987,
-0.19587364792823792,
0.0009236820042133331,
-0.09145361930131912,
-0.15560761094093323,
0.11864419281482697,
-0.4987289011478424,
0.31163597106933594,
0.0389193519949913,
0.24976809322834015,
0.0012793038040399551,
-0.17239594459533691,
-0.013727154582738876,
0.1406298130750656,
0.12620963156223297,
-0.023750582709908485,
-0.034800849854946136,
0.22347374260425568,
0.03360961377620697,
-0.04841475188732147,
-0.11241850256919861,
0.303572416305542,
0.429585337638855,
-0.20281246304512024,
0.0842251256108284,
-0.16354425251483917,
0.2961604595184326,
-0.03750742971897125,
-0.20373685657978058,
-0.09704974293708801,
-0.2546185255050659,
0.039823852479457855,
0.16813452541828156,
0.08352124691009521,
0.18863235414028168,
0.0789041519165039,
-0.1020117849111557,
-0.10184246301651001,
0.17302531003952026,
0.036454543471336365,
-0.030704431235790253,
-0.2684115767478943,
-0.12264527380466461,
0.37417688965797424,
0.02976462058722973,
0.0512428805232048,
0.060865163803100586,
-0.334994375705719,
0.08145813643932343,
-0.5531005859375,
-0.026276685297489166,
-0.021586786955595016,
-0.1566881388425827,
0.05608965829014778,
-0.0829024463891983,
-0.6097152233123779,
0.03795155510306358,
0.19155913591384888,
0.010036779567599297,
-0.3099002242088318,
0.02931864932179451,
-0.21655185520648956,
-0.3161247670650482,
-0.1767944097518921,
0.12414389848709106,
-0.07437778264284134,
0.24547773599624634,
0.17087334394454956,
-0.2345413714647293,
0.21019381284713745,
-0.12120663374662399,
-0.09499912708997726,
0.12857156991958618,
-0.11884710192680359,
-0.4825817048549652,
-0.07873405516147614,
-0.22403328120708466,
0.34549257159233093,
-0.08265963941812515,
0.08134002238512039,
-0.006722979247570038,
-0.05249352380633354,
-0.1030183881521225,
0.25124531984329224,
0.1546485722064972,
0.012543986551463604,
-0.09156279265880585,
0.095888152718544,
-0.0917695164680481,
0.01416576374322176,
0.41374459862709045,
0.1844601333141327,
0.028602024540305138,
0.11821547895669937,
-0.30193662643432617,
-0.0392448827624321,
0.03951646387577057,
0.017578095197677612,
0.02233237959444523,
0.2818383574485779,
0.19949111342430115,
0.9364293813705444,
0.17693346738815308,
-0.24716155230998993,
-0.14667491614818573,
-0.13112759590148926,
-0.18645241856575012,
0.03558603674173355,
-0.028027888387441635,
0.275445818901062,
0.33196237683296204,
-0.06544876843690872,
0.3055552840232849,
0.0692322701215744,
-0.4447915256023407,
0.06832873821258545,
0.06552635133266449,
-0.14847098290920258,
-0.17480017244815826,
0.1976066529750824,
-0.2921210825443268,
0.22220385074615479,
0.06390373408794403,
0.21134823560714722,
-0.41976678371429443,
-0.27511462569236755,
-0.1789604276418686,
-0.08497112989425659,
-0.03479469567537308,
-0.38620081543922424,
-0.7608808875083923,
-0.18515078723430634,
-0.8920629620552063,
0.40317225456237793,
0.12859854102134705,
0.4056977331638336,
0.4040030241012573,
-0.14732302725315094,
0.18099164962768555,
-0.14620722830295563,
0.951553225517273,
-0.31486210227012634,
-0.10181963443756104,
0.09428760409355164,
-0.29071635007858276,
-0.21649886667728424,
-0.19620901346206665,
-0.05441641807556152,
0.4924851357936859,
0.47743043303489685,
0.7733253240585327,
-0.19627854228019714,
-0.3250952363014221,
0.009371811524033546,
-0.1400546282529831,
0.21997293829917908,
-0.006769273430109024,
-0.2870979905128479,
0.08981122821569443,
0.10915409028530121,
0.25447702407836914,
-0.044563740491867065,
0.1162586435675621,
-0.13897143304347992,
-0.18029159307479858,
-0.01563814841210842,
-0.037898335605859756,
0.32633090019226074,
0.045206718146800995,
0.24205854535102844,
0.25471261143684387,
0.270908385515213,
0.4144827723503113,
0.22336815297603607,
0.3825790286064148,
-0.31189244985580444,
-0.0680493414402008,
0.03418200835585594,
0.13534428179264069,
-0.09294218569993973,
0.45393234491348267,
0.549808144569397,
0.12770311534404755,
0.18946848809719086,
0.0446930006146431,
0.3629502058029175,
-0.09704679250717163,
0.2474793642759323,
0.5302976369857788,
0.22298972308635712,
-0.6152861714363098,
-0.1870719939470291,
-0.041868314146995544,
0.5004029870033264,
-0.09773650020360947,
0.1358557641506195,
-0.48477399349212646,
-0.11824710667133331,
0.08493215590715408,
0.07734870910644531,
1.0334539413452148,
-0.5148515105247498,
0.2964819371700287,
-0.32190972566604614,
0.17574603855609894,
0.21001316606998444,
-0.26878952980041504,
0.19712546467781067,
-0.24293014407157898,
0.07110098004341125,
-0.01878623105585575,
-0.06141915172338486,
0.25672900676727295,
0.4876922369003296,
0.04858997091650963,
0.1938776820898056,
-0.027601487934589386,
0.3981175124645233,
-0.22743037343025208,
0.06280694156885147,
0.545023500919342,
-0.33924657106399536,
0.07791347801685333,
-0.05798777565360069,
0.22451196610927582,
-0.06438761949539185,
0.013737786561250687,
0.0008118636906147003,
-0.1434347778558731,
-0.1669958084821701,
-0.11030834913253784,
-0.23058488965034485,
-0.2144283503293991,
0.016393739730119705,
0.15339139103889465,
0.004001840949058533,
-0.06366720795631409,
0.040546122938394547,
0.1298915445804596,
0.2966970205307007,
-0.07089431583881378,
0.08276885002851486,
0.13525763154029846,
0.15436136722564697,
0.12898273766040802,
-0.47022753953933716,
-0.15667104721069336,
0.04676218330860138,
0.05512205511331558,
-0.1249580904841423,
-0.1654788851737976,
-0.0354788601398468,
-0.337619423866272,
0.11710262298583984,
0.6711370348930359,
0.2838168144226074,
-0.05469520390033722,
0.3056977391242981,
-0.0777946412563324,
-0.15773072838783264,
-0.0371345691382885,
-0.048675984144210815,
-0.19086779654026031,
0.4021507501602173,
-0.21502156555652618,
-0.43649548292160034,
0.007203737273812294,
0.5445732474327087,
0.1661616861820221,
-0.1699456125497818,
0.486575722694397,
-0.25012168288230896,
-0.17973452806472778,
-0.031951162964105606,
0.375232070684433,
0.17167742550373077,
0.13715267181396484,
0.02030518278479576,
0.3294663429260254,
-0.07055641710758209,
0.33925825357437134,
0.026839330792427063,
-0.25366121530532837,
0.07971254736185074,
-0.1415092796087265,
-0.10768982023000717,
-0.34828266501426697,
-0.25238364934921265,
-0.15262627601623535,
-0.09758076071739197,
0.016270674765110016,
0.29621168971061707,
-0.27226635813713074,
-0.07628698647022247,
-0.1294940710067749,
0.07392318546772003,
-0.07072107493877411,
0.3378511071205139,
-0.19557704031467438,
-0.015683352947235107,
-0.015311847440898418,
-0.11947692930698395,
0.06329140812158585,
0.195832759141922,
-0.18116997182369232,
-0.0880894735455513,
-0.04864779859781265,
0.23280540108680725,
0.0942503809928894,
-0.4132826626300812,
0.32649216055870056,
0.07424469292163849,
-0.32953232526779175,
-0.29576340317726135,
-0.0713585764169693,
0.3769732415676117,
-0.0888151228427887,
-0.21042577922344208,
0.40651723742485046,
0.13127169013023376,
-0.023106297478079796,
0.17555132508277893,
-0.13449162244796753,
0.030751846730709076,
-0.06407144665718079,
0.35337135195732117,
0.2714119851589203,
-0.08068837970495224,
0.2277090847492218,
-0.1471526026725769,
0.21028366684913635,
0.14381957054138184,
-0.04489855468273163,
-0.04487720876932144,
-0.06200442090630531,
0.16281309723854065,
0.08598954230546951,
0.22964993119239807,
0.03159935027360916,
-0.39684703946113586,
0.6052674651145935,
0.0025991667062044144,
-0.025398138910531998,
-0.20755904912948608,
0.3047802150249481,
0.10900135338306427,
0.04412383213639259,
0.15567825734615326,
0.2953766882419586,
0.2974739074707031,
-0.22372876107692719,
-0.034969400614500046,
-0.12362586706876755,
-0.13647855818271637,
0.08513204753398895,
0.20145094394683838,
0.09317027032375336,
0.09038588404655457,
0.36204439401626587,
-0.02523123100399971,
-0.04732163995504379,
0.42220473289489746,
0.2469167411327362,
0.5134433507919312,
0.34624096751213074,
0.3657304644584656,
-0.3900960683822632,
-0.34006425738334656,
-0.20019948482513428,
0.633074164390564,
0.07761920243501663,
0.2425193190574646,
-0.01935211569070816,
0.277751624584198,
-0.19245433807373047,
-0.49986720085144043,
0.17872254550457,
0.41191038489341736,
-0.35524702072143555,
-0.4772711396217346,
-0.1415461301803589,
-0.13619756698608398,
-0.09160144627094269,
0.12250517308712006,
-0.2288355529308319,
0.15003043413162231,
0.47935211658477783,
0.03318752720952034,
0.18328720331192017,
-0.06713918596506119,
-0.18050137162208557,
-0.10065119713544846,
0.30395519733428955,
-0.07218679785728455,
0.16376839578151703,
-0.54215008020401,
0.08230647444725037,
0.22567935287952423,
-0.05295533686876297,
0.35140547156333923,
0.6039910912513733,
-0.3567195534706116,
0.007533121854066849,
0.01747608743607998,
0.07158594578504562,
0.1786416471004486,
0.22156989574432373,
0.09402868896722794,
-0.2806367874145508,
-0.018380900844931602,
-0.20687054097652435,
-0.16421732306480408,
-0.28429022431373596,
0.009265188127756119,
0.0029799705371260643,
0.12426808476448059,
0.14809903502464294,
-0.09667634963989258,
-0.2055518925189972,
-0.003535997122526169,
0.1343885064125061,
-0.1567651331424713,
-0.04549677297472954,
0.09520785510540009,
-0.2115180492401123,
0.08953718096017838,
0.07344970852136612,
-0.002437084913253784,
-0.13211673498153687,
0.34983760118484497,
0.22098933160305023,
-0.12308552116155624,
-0.45960578322410583,
-0.18004637956619263,
-0.5000239014625549,
0.1425480842590332,
-0.41913387179374695,
0.14261090755462646,
-0.27120277285575867,
0.13263602554798126,
0.04770021513104439,
0.018383091315627098,
0.1398371160030365,
-0.02917907014489174,
-0.07833631336688995,
0.2604595422744751,
-0.2813762426376343,
0.5002378821372986,
-0.28531497716903687,
-0.242232084274292,
-0.013834957033395767,
-0.4122864007949829,
0.47061288356781006,
0.06310278177261353,
-0.15943947434425354,
-0.07844237983226776,
0.23283949494361877,
-0.1661156266927719,
0.29071611166000366,
0.2665555477142334,
0.15409941971302032,
0.30746129155158997,
0.08960957080125809,
0.12296538800001144,
0.020349979400634766,
0.3362581729888916,
-0.24400094151496887,
0.20806297659873962,
-0.05243152752518654,
-0.03980282321572304,
-0.20570781826972961,
0.0260170865803957,
-0.012132721953094006,
-0.10822836309671402,
0.25416988134384155,
-0.0816439539194107,
-0.20349307358264923,
0.286399245262146,
0.014094479382038116,
0.06337831914424896,
-0.21839484572410583,
0.22918134927749634,
0.264409601688385,
-0.07830232381820679,
-0.25230202078819275,
0.14037522673606873,
0.32059329748153687,
-0.5568316578865051,
-0.20296426117420197,
-0.6513800621032715,
0.03444158285856247,
0.1288052797317505,
0.1286984384059906,
-0.22697201371192932,
-0.29315388202667236,
0.3912016749382019,
-0.1233501061797142,
-0.32940956950187683,
0.23699161410331726,
-0.12505142390727997,
-0.2932348847389221,
-0.3721490204334259,
0.08137025684118271,
-0.1436476707458496,
-0.19497954845428467,
0.05967257544398308,
-0.1216476708650589
] |
https://github.com/huggingface/datasets/issues/2288 | Load_dataset for local CSV files | Hi,
this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data):
```python
import ast
# load the dataset and copy the features
def process(ex):
return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])}
dataset = dataset.map(process, features=new_features)
```
| The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ? | 72 | Load_dataset for local CSV files
The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ?
Hi,
this is not a standard CSV file (requires additional preprocessing) so I wouldn't label this as s bug. You could parse the examples with the regex module or the string API to extract the data, but the following approach is probably the easiest (once you load the data):
```python
import ast
# load the dataset and copy the features
def process(ex):
return {"tokens": ast.literal_eval(ex["tokens"]), "labels": ast.literal_eval(ex["labels"])}
dataset = dataset.map(process, features=new_features)
```
| [
-0.1104322075843811,
-0.046099722385406494,
0.0017930977046489716,
0.0747472420334816,
0.44804686307907104,
0.06277703493833542,
0.45521366596221924,
0.21968227624893188,
0.29949048161506653,
-0.13296644389629364,
0.2060752809047699,
0.4624338150024414,
-0.07284647971391678,
0.07971752434968948,
-0.054683879017829895,
-0.22586286067962646,
0.14639778435230255,
0.12165826559066772,
-0.0681670606136322,
-0.0514058843255043,
-0.22141309082508087,
0.11724898219108582,
-0.24573543667793274,
0.0626450926065445,
0.14734947681427002,
0.06749998778104782,
0.044480592012405396,
0.11947138607501984,
0.1582898646593094,
-0.4119056165218353,
0.15970447659492493,
-0.148555725812912,
0.3543727695941925,
0.21779340505599976,
-0.00012259744107723236,
-0.03087332844734192,
0.20009423792362213,
-0.04552612826228142,
-0.13432957231998444,
-0.42998313903808594,
-0.36866238713264465,
-0.4428126811981201,
0.6035314798355103,
-0.23372024297714233,
0.06797218322753906,
0.005874801427125931,
-0.1318274289369583,
-0.4414082169532776,
0.3704528212547302,
0.49174395203590393,
0.10284627974033356,
0.26049697399139404,
-0.21289734542369843,
0.06837121397256851,
0.2531419098377228,
0.1729603111743927,
-0.26834648847579956,
0.011508159339427948,
0.24138304591178894,
0.28311365842819214,
0.02025875449180603,
-0.25140440464019775,
-0.3278878331184387,
-0.10903044044971466,
0.4502304196357727,
0.10043331980705261,
-0.1728936731815338,
-0.21520239114761353,
-0.018569156527519226,
0.09673915803432465,
0.6940969824790955,
-0.04390178620815277,
-0.3437822759151459,
-0.13455629348754883,
0.10296372324228287,
-0.32655683159828186,
0.07190987467765808,
0.03947889804840088,
-0.09367251396179199,
0.2009945660829544,
-0.22883668541908264,
0.01798582449555397,
-0.02105090394616127,
0.23873481154441833,
0.0580500066280365,
-0.06847570836544037,
-0.18306702375411987,
0.2108049988746643,
-0.04794222488999367,
-0.20824503898620605,
0.15867707133293152,
-0.22531911730766296,
0.14180399477481842,
0.3070482015609741,
-0.49544548988342285,
0.14845958352088928,
0.12507784366607666,
-0.10211364179849625,
-0.08219170570373535,
0.202768474817276,
0.3144248425960541,
0.10134323686361313,
-0.08618588745594025,
0.20515990257263184,
0.27295640110969543,
0.2770814597606659,
0.2978347837924957,
0.08101604133844376,
-0.06350520998239517,
-0.09461424499750137,
-0.16638103127479553,
0.03630443662405014,
-0.3185821771621704,
-0.1923479586839676,
0.3789397180080414,
0.15878024697303772,
0.13753843307495117,
-0.3657592236995697,
-0.36269912123680115,
0.23516544699668884,
-0.2413615882396698,
-0.08896832168102264,
0.07607666403055191,
0.28363433480262756,
-0.12978772819042206,
0.4884747862815857,
0.1027974784374237,
0.3484078645706177,
0.11010134965181351,
-0.14061686396598816,
-0.16183452308177948,
-0.10797061026096344,
-0.08911241590976715,
-0.060272857546806335,
0.09653723239898682,
-0.36314213275909424,
0.1043662577867508,
-0.03515452891588211,
0.0497358962893486,
-0.15865275263786316,
-0.23562303185462952,
-0.03062470443546772,
0.0038657858967781067,
0.26801761984825134,
0.014013674110174179,
0.09563318639993668,
0.35627850890159607,
-0.04595417529344559,
-0.21842816472053528,
0.3119083344936371,
-0.46207720041275024,
-0.21536794304847717,
0.004583815112709999,
-0.0065717147663235664,
-0.22781957685947418,
-0.03317364305257797,
-0.4317629039287567,
0.06904946267604828,
0.19684156775474548,
0.15404896438121796,
-0.17599698901176453,
-0.4027114510536194,
-0.2068364918231964,
-0.41807979345321655,
0.17794238030910492,
0.39963364601135254,
-0.5163904428482056,
0.07513542473316193,
0.011556744575500488,
0.024553604423999786,
0.12866279482841492,
0.4650031626224518,
-0.1831561177968979,
0.296322762966156,
-0.15016718208789825,
0.3829423785209656,
0.5047296285629272,
0.09988431632518768,
-0.053518444299697876,
0.5566632151603699,
0.0630638599395752,
0.06408824771642685,
0.10533162951469421,
-0.0127034243196249,
0.3253759443759918,
-0.17007847130298615,
0.02698541060090065,
0.4483288526535034,
-0.16351032257080078,
-0.015068430453538895,
-0.105195552110672,
-0.15591567754745483,
0.24755561351776123,
0.1033509224653244,
-0.11843587458133698,
0.34260955452919006,
0.1636873185634613,
-0.0604916512966156,
0.041921526193618774,
-0.3142811357975006,
0.15420305728912354,
0.2057691216468811,
-0.011586051434278488,
0.15840330719947815,
-0.0495416559278965,
-0.05316760390996933,
-0.6366575360298157,
-0.03796771913766861,
0.22136268019676208,
-0.10109473764896393,
-0.39965319633483887,
-0.054102882742881775,
-0.33539241552352905,
0.2223338931798935,
-0.08790166676044464,
0.5470008850097656,
-0.10080930590629578,
0.13921178877353668,
-0.0799393355846405,
0.028099436312913895,
-0.09978564083576202,
0.07003391534090042,
-0.29764556884765625,
0.03924741595983505,
-0.20932990312576294,
0.06704260408878326,
0.2348162978887558,
-0.12787358462810516,
-0.09869632869958878,
0.09192870557308197,
0.3017793893814087,
-0.0927235558629036,
-0.28053560853004456,
0.32377132773399353,
0.0724095031619072,
-0.1806602030992508,
-0.40577274560928345,
0.07071060687303543,
0.12256670743227005,
-0.4118909537792206,
-0.0960497334599495,
0.3675082325935364,
0.29829141497612,
-0.12176679074764252,
-0.1948544979095459,
0.5355858206748962,
-0.16390369832515717,
0.3591679334640503,
-0.10035344958305359,
0.016615981236100197,
0.4018518626689911,
0.09900350868701935,
-0.22149305045604706,
-0.07353687286376953,
0.11874823272228241,
0.11991088092327118,
0.2753312289714813,
0.08329913020133972,
-0.48436158895492554,
-0.10740982741117477,
0.201063334941864,
-0.13970261812210083,
0.14249111711978912,
0.3510165512561798,
-0.03686010092496872,
0.10230418294668198,
0.023688247427344322,
-0.25911927223205566,
0.3383776545524597,
-0.0355224609375,
-0.043935488909482956,
-0.09707877784967422,
-0.09855476766824722,
-0.057827387005090714,
0.1779477894306183,
-0.03336165100336075,
0.114008828997612,
0.23760876059532166,
0.05083117261528969,
-0.04020410031080246,
-0.2066468894481659,
-0.17791952192783356,
0.13718996942043304,
0.14961019158363342,
-0.6657981872558594,
0.15703889727592468,
-0.4116668701171875,
0.25939634442329407,
-0.2830720543861389,
-0.08526285737752914,
0.13556097447872162,
-0.18460725247859955,
-0.2917081117630005,
0.26673316955566406,
-0.16413575410842896,
0.1261747181415558,
-0.5663657188415527,
-0.017840534448623657,
0.21301360428333282,
-0.6803793907165527,
0.181101992726326,
0.06298123300075531,
-0.17827865481376648,
-0.07644466310739517,
0.39911171793937683,
0.22972027957439423,
0.019913773983716965,
-0.041858308017253876,
0.028544560074806213,
-0.1528593748807907,
-0.18762026727199554,
0.11199183017015457,
-0.1340639591217041,
0.18834450840950012,
0.10346630960702896,
0.060844287276268005,
-0.2700413763523102,
-0.503322958946228,
0.2780168950557709,
-0.12256308645009995,
-0.12269552052021027,
0.41488027572631836,
-0.034141212701797485,
-0.3602370619773865,
-0.20415867865085602,
-0.4714081585407257,
-0.1735006719827652,
-0.3078489601612091,
0.18050619959831238,
0.10363607108592987,
-0.017893850803375244,
0.09352698922157288,
0.2594176232814789,
0.0780489519238472,
0.2604347765445709,
0.04362434148788452,
-0.03248768672347069,
0.05363191291689873,
0.5690492987632751,
-0.11567254364490509,
-0.40923839807510376,
0.024368029087781906,
-0.20216040313243866,
-0.19553767144680023,
0.37140953540802,
-0.14279377460479736,
0.11184179037809372,
-0.08267971128225327,
0.23524484038352966,
0.021576138213276863,
-0.028071081265807152,
0.3271401822566986,
-0.030869590118527412,
0.09535690397024155,
-0.17977020144462585,
-0.26467177271842957,
0.16539743542671204,
0.267655611038208,
0.08485303819179535,
0.49999991059303284,
0.6963590383529663,
-0.23813845217227936,
0.4044567346572876,
-0.02740548551082611,
-0.121599480509758,
0.4540215730667114,
-0.17484118044376373,
0.07724787294864655,
-0.16713622212409973,
-0.23049454391002655,
-0.20672260224819183,
-0.23613223433494568,
-0.32533806562423706,
0.32072657346725464,
-0.10029240697622299,
-0.3117113709449768,
-0.10346198827028275,
0.36745738983154297,
-0.31266871094703674,
-0.20347103476524353,
0.3986501395702362,
-0.22908979654312134,
0.32043957710266113,
-0.02592392824590206,
0.1603926420211792,
-0.07331936061382294,
-0.14926430583000183,
-0.005499611608684063,
0.1686309278011322,
0.11233486235141754,
-0.11631342023611069,
-0.4571549892425537,
-0.034242626279592514,
-0.30567023158073425,
0.17757126688957214,
0.331233412027359,
0.5592122077941895,
-0.03584226220846176,
-0.1711428463459015,
0.10635201632976532,
0.1083458662033081,
0.390116810798645,
-0.2086942195892334,
-0.001161925494670868,
0.25235721468925476,
0.03977849334478378,
-0.09064871817827225,
0.009187117218971252,
-0.1796158403158188,
-0.03827761858701706,
-0.08176115155220032,
0.13397587835788727,
-0.23665675520896912,
-0.13575676083564758,
-0.19485393166542053,
0.3967042863368988,
-0.21974165737628937,
-0.07852126657962799,
-0.13004939258098602,
-0.3525591194629669,
-0.22333930432796478,
-0.007714264094829559,
0.20622283220291138,
0.4148728549480438,
-0.011116021312773228,
0.13920971751213074,
-0.4173450171947479,
-0.08308061957359314,
0.33579742908477783,
0.01643667183816433,
0.3778499364852905,
0.07309752702713013,
0.23801761865615845,
-0.28533241152763367,
0.09511692076921463,
-0.054742634296417236,
0.7008429765701294,
0.018754620105028152,
-0.8055832386016846,
0.11553917080163956,
-0.23472382128238678,
0.6101192831993103,
0.119700126349926,
-0.3118106424808502,
0.08970048278570175,
0.06166220083832741,
-0.02842007577419281,
0.023918556049466133,
0.03246641904115677,
0.1782878041267395,
-0.11299243569374084,
-0.07357901334762573,
-0.5334360003471375,
0.2675796449184418,
-0.017927931621670723,
-0.07000243663787842,
-0.15526041388511658,
-0.09059610962867737,
-0.3439863622188568,
0.5822553038597107,
0.11164385825395584,
0.8149861097335815,
-0.15860897302627563,
0.022372473031282425,
0.15126687288284302,
0.10944311320781708,
0.3992289900779724,
0.4279822111129761,
-0.08870407193899155,
-0.3721040189266205,
-0.13221295177936554,
-0.1304241418838501,
-0.0532289519906044,
0.2831766903400421,
0.3073972463607788,
-0.18273118138313293,
0.3941600024700165,
-0.26252317428588867,
0.47880223393440247,
0.15790516138076782,
0.013617388904094696,
0.3976046144962311,
-0.5610573291778564,
-0.43612390756607056,
0.05660893768072128,
-0.07953652739524841,
-0.05004054680466652,
0.17936056852340698,
-0.10252806544303894,
-0.014774523675441742,
-0.06907016783952713,
-0.1671576201915741,
0.20232102274894714,
-0.024517273530364037,
0.03331803157925606,
0.02255154214799404,
-0.391160249710083,
0.33214983344078064,
0.38738054037094116,
0.21401077508926392,
-0.12361189723014832,
0.05307509005069733,
-0.1053180992603302,
0.06531359255313873,
0.1610911786556244,
-0.10942079871892929,
-0.17276577651500702,
0.3233717679977417,
0.28148502111434937,
0.06339197605848312,
0.1883973479270935,
-0.18770581483840942,
-0.45632922649383545,
0.27727505564689636,
0.02007579430937767,
0.24577242136001587,
-0.6801096796989441,
-0.6067524552345276,
-0.16206057369709015,
0.18217872083187103,
-0.08545449376106262,
-0.0015260297805070877,
0.06921547651290894,
-0.013624622486531734,
0.1043778732419014,
0.040480103343725204,
-0.12761765718460083,
0.09086637198925018,
0.1430969387292862,
0.05892782658338547,
-0.11278179287910461,
0.448177695274353,
0.3223387897014618,
-0.08444906771183014,
-0.07171086221933365,
0.16277942061424255,
0.2564379870891571,
-0.5918010473251343,
0.05480766296386719,
-0.13955603539943695,
-0.1452333778142929,
0.04834948480129242,
0.6411297917366028,
0.05094118416309357,
0.13888166844844818,
-0.07500272989273071,
-0.47600868344306946,
-0.3894127905368805,
0.17719179391860962,
0.19756411015987396,
0.03762021288275719,
-0.05318094417452812,
-0.023683510720729828,
-0.14595533907413483,
-0.2336329221725464,
-0.14921897649765015,
-0.21122996509075165,
-0.09475553035736084,
0.16273024678230286,
0.0821605920791626,
0.2315102517604828,
0.16505086421966553,
0.05718233063817024,
0.04960421472787857,
0.07284413278102875,
0.021693922579288483,
-0.10480548441410065,
-0.08012892305850983,
0.24563243985176086,
0.1700916588306427,
-0.013330074027180672,
-0.24097195267677307,
-0.28880423307418823,
-0.16719810664653778,
-0.34314608573913574,
-0.13111020624637604,
0.15299183130264282,
-0.11770673096179962,
0.06116866692900658,
0.12325471639633179,
0.1416042447090149,
-0.29515695571899414,
0.20830102264881134,
-0.22079789638519287,
0.3090308904647827,
-0.06851687282323837,
0.20359595119953156,
0.07235708087682724,
0.08677200973033905,
-0.1694904863834381,
0.14117512106895447,
0.2775620222091675,
0.017208673059940338,
0.26585760712623596,
-0.30380505323410034,
0.10086341202259064,
0.1427963376045227,
0.296877384185791,
0.41855373978614807,
-0.08527819812297821,
0.039153896272182465,
0.3072125315666199,
0.03331895172595978,
-0.1571904867887497,
-0.18191532790660858,
0.18601927161216736,
-0.04476405680179596,
-0.0816643238067627,
0.3542855978012085,
0.17737022042274475,
-0.10221821069717407,
0.12338084727525711,
-0.02868315950036049,
0.5112876892089844,
-0.19494065642356873,
-0.07042227685451508,
0.6916542649269104,
0.2913292348384857,
0.16119197010993958,
0.16036811470985413,
-0.013247884809970856,
0.19947683811187744,
0.3682752847671509,
-0.1253434419631958,
-0.09638385474681854,
0.29463857412338257,
0.4194571077823639,
0.01658402383327484,
-0.40544867515563965,
0.24803397059440613,
0.2353256791830063,
-0.02192874252796173,
0.21395573019981384,
0.13031597435474396,
0.26968613266944885,
-0.10141252726316452,
-0.22340641915798187,
-0.14274725317955017,
0.3004920482635498,
-0.1382133662700653,
-0.3201162815093994,
-0.32725366950035095,
-0.1077626496553421,
-0.22571970522403717,
-0.04029049351811409,
-0.11287923157215118,
-0.12304067611694336,
0.390745609998703,
0.12840932607650757,
0.2790488302707672,
-0.3674774467945099,
-0.30759257078170776,
0.05437822639942169,
0.020176485180854797,
-0.23984351754188538,
0.3100331723690033,
-0.12823228538036346,
0.006027668714523315,
0.32049623131752014,
-0.08673805743455887,
0.31562185287475586,
0.5036234855651855,
0.07947579026222229,
-0.06719550490379333,
-0.045018646866083145,
-0.14105723798274994,
-0.06179429218173027,
0.2614480257034302,
-0.18359822034835815,
0.3418869078159332,
0.23865695297718048,
0.020603427663445473,
-0.051791492849588394,
0.49054664373397827,
-0.18719951808452606,
0.021482201293110847,
-0.13751354813575745,
0.3965113162994385,
0.24066199362277985,
-0.13961079716682434,
-0.09169133752584457,
-0.14290302991867065,
-0.043506354093551636,
-0.08674541860818863,
0.44191399216651917,
0.03408433869481087,
0.25520598888397217,
0.22119635343551636,
0.0060107167810201645,
-0.08082881569862366,
0.16331642866134644,
0.24845454096794128,
0.1098901629447937,
-0.21912458539009094,
0.1393922120332718,
-0.7467548251152039,
0.05268522724509239,
0.1535261571407318,
-0.2677983045578003,
0.44788694381713867,
0.2577356696128845,
0.24340400099754333,
0.27366095781326294,
-0.4172680377960205,
-0.10675394535064697,
0.18987470865249634,
0.28644707798957825,
0.07446436583995819,
-0.2029295563697815,
0.1791161149740219,
0.20653559267520905,
-0.2200174480676651,
-0.541321337223053,
0.019044063985347748,
-0.11671369522809982,
-0.026145970448851585,
-0.15224112570285797,
-0.2528541088104248,
-0.012234088033437729,
-0.09946300089359283,
0.2671571969985962,
-0.022884873673319817,
0.5270901918411255,
-0.0979372188448906,
0.02929593436419964,
-0.020206648856401443,
-0.39004331827163696,
-0.2294011414051056,
0.43231189250946045,
-0.22079628705978394,
0.4948227107524872,
-0.2900177836418152,
0.4376686215400696,
-0.26347073912620544,
-0.029254449531435966,
0.15283115208148956,
-0.17538990080356598,
-0.45865365862846375,
0.40435662865638733,
-0.5012465119361877,
0.18350578844547272,
0.07708343863487244,
0.10953254997730255,
0.0006310716271400452,
0.28726667165756226,
0.02536720782518387,
-0.3708910644054413,
0.3762867748737335,
-0.5570360422134399,
-0.30536919832229614,
-0.01743452623486519,
-0.07267001271247864,
0.054047927260398865,
-0.06714162230491638,
-0.41905978322029114,
-0.12932364642620087,
0.22758425772190094,
-0.1773214042186737,
-0.26624545454978943,
0.09237398207187653,
-0.0665549635887146,
0.006687518209218979,
-0.23970602452754974,
0.22924405336380005,
0.1236816793680191,
-0.19787845015525818,
-0.16415436565876007,
-0.465831995010376
] |
https://github.com/huggingface/datasets/issues/2288 | Load_dataset for local CSV files | Hi,
Thanks for the reply.
I have already used ```ast.literal_eval``` to evaluate the string into list, but I was getting another error:
```
ArrowInvalid: Could not convert X with type str: tried to convert to int
```
Why this happens ? Should labels be mapped to their ids and use int instead of str ? | The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ? | 55 | Load_dataset for local CSV files
The method load_dataset fails to correctly load a dataset from csv.
Moreover, I am working on a token-classification task ( POS tagging) , where each row in my CSV contains two columns each of them having a list of strings.
row example:
```tokens | labels
['I' , 'am', 'John'] | ['PRON', 'AUX', 'PROPN' ]
```
The method, loads each list as a string: (i.g "['I' , 'am', 'John']").
To solve this issue, I copied the Datasets.Features, created Sequence types ( instead of Value) and tried to cast the features type
```
new_features['tokens'] = Sequence(feature=Value(dtype='string', id=None))
new_features['labels'] = Sequence(feature=ClassLabel(num_classes=len(tag2idx), names=list(unique_tags)))
dataset = dataset.cast(new_features)
```
but I got the following error
```
ArrowNotImplementedError: Unsupported cast from string to list using function cast_list
```
Moreover, I tried to set feature parameter in load_dataset method, to my new_features, but this fails as well.
How can this be solved ?
Hi,
Thanks for the reply.
I have already used ```ast.literal_eval``` to evaluate the string into list, but I was getting another error:
```
ArrowInvalid: Could not convert X with type str: tried to convert to int
```
Why this happens ? Should labels be mapped to their ids and use int instead of str ? | [
-0.17451216280460358,
-0.10917861759662628,
-0.023106815293431282,
0.09802313894033432,
0.48854607343673706,
0.021457791328430176,
0.4982638657093048,
0.22232051193714142,
0.36614230275154114,
-0.057906121015548706,
0.022860044613480568,
0.5268842577934265,
-0.04110339656472206,
0.1786162257194519,
-0.08710435032844543,
-0.1635924130678177,
0.15041814744472504,
0.12155648320913315,
-0.09546865522861481,
-0.054811637848615646,
-0.28220683336257935,
0.11535719782114029,
-0.23278044164180756,
0.10289038717746735,
0.07581106573343277,
-0.021244121715426445,
0.1522943377494812,
0.05896848440170288,
0.15511532127857208,
-0.46901679039001465,
0.04271174222230911,
-0.1593901664018631,
0.4239127039909363,
0.16038157045841217,
-0.0001222864375449717,
-0.07239513099193573,
0.20140407979488373,
-0.00178532674908638,
-0.1700446456670761,
-0.2721412777900696,
-0.33345329761505127,
-0.33126184344291687,
0.5561587810516357,
-0.24705901741981506,
0.13097107410430908,
-0.07500596344470978,
-0.09995701909065247,
-0.40447551012039185,
0.2009781301021576,
0.49606600403785706,
0.10881480574607849,
0.15566623210906982,
-0.06420513242483139,
0.07433250546455383,
0.30117911100387573,
0.158249169588089,
-0.24534492194652557,
0.007298711687326431,
0.2836194634437561,
0.40589433908462524,
-0.017299622297286987,
-0.15835216641426086,
-0.23490890860557556,
-0.1760408878326416,
0.5206283330917358,
0.021350275725126266,
-0.11038721352815628,
-0.23372897505760193,
-0.02916548401117325,
-0.027052707970142365,
0.8242398500442505,
-0.03379332274198532,
-0.33137401938438416,
0.028470724821090698,
0.008475398644804955,
-0.4012274742126465,
-0.009196579456329346,
-0.04442539066076279,
-0.07062047719955444,
0.19642002880573273,
-0.23074659705162048,
-0.020231569185853004,
-0.10656669735908508,
0.20949746668338776,
0.12647871673107147,
0.0024114474654197693,
-0.16042183339595795,
0.25259929895401,
-0.02319316938519478,
-0.34243452548980713,
0.12722370028495789,
-0.11399063467979431,
0.06177370995283127,
0.20018735527992249,
-0.5123823881149292,
0.0699717104434967,
-0.047585971653461456,
-0.042683348059654236,
-0.05114026367664337,
0.1655864417552948,
0.21307390928268433,
0.1673608422279358,
-0.05337831750512123,
0.16951143741607666,
0.2711188495159149,
0.43934404850006104,
0.38455167412757874,
0.14596325159072876,
-0.07728289067745209,
-0.21626971662044525,
-0.18599548935890198,
0.0367971695959568,
-0.3532293736934662,
-0.1677093803882599,
0.45038095116615295,
0.12060768902301788,
0.04539496451616287,
-0.47218430042266846,
-0.3626647889614105,
0.15494254231452942,
-0.2265355885028839,
-0.037220265716314316,
0.11717061698436737,
0.3768065869808197,
-0.125184565782547,
0.5413234233856201,
0.12000243365764618,
0.277110755443573,
0.18041153252124786,
-0.18388962745666504,
-0.10717280209064484,
-0.09546124935150146,
-0.14571328461170197,
-0.09577041119337082,
0.0384717620909214,
-0.3362179100513458,
0.11439242959022522,
-0.07164151966571808,
0.03942221403121948,
-0.16668595373630524,
-0.2015027403831482,
-0.10032832622528076,
0.10083616524934769,
0.20007900893688202,
-0.07279572635889053,
0.11010155826807022,
0.2909412682056427,
-0.05410238355398178,
-0.17015640437602997,
0.33162134885787964,
-0.5061308741569519,
-0.27916640043258667,
-0.009653838351368904,
0.003962527494877577,
-0.027972334995865822,
-0.040344156324863434,
-0.34377941489219666,
0.1190858781337738,
0.1428307294845581,
0.08640487492084503,
-0.20075467228889465,
-0.4404557943344116,
-0.10767219960689545,
-0.3787831962108612,
0.09645560383796692,
0.24991171061992645,
-0.5306063890457153,
0.12161052227020264,
0.07570730149745941,
0.014158859848976135,
0.25101473927497864,
0.5593862533569336,
-0.14698776602745056,
0.2511621415615082,
-0.1406390219926834,
0.3639689087867737,
0.5061860680580139,
-0.07524220645427704,
-0.06873433291912079,
0.5408251881599426,
0.1516234129667282,
-0.1511901468038559,
0.09478229284286499,
0.10085541009902954,
0.34509944915771484,
-0.1787748634815216,
0.025927312672138214,
0.3236462473869324,
-0.10997942090034485,
-0.05358417332172394,
-0.23698663711547852,
-0.08903098106384277,
0.2300913780927658,
0.13596361875534058,
-0.13650023937225342,
0.32746532559394836,
0.18667536973953247,
0.038479357957839966,
-0.08296037465333939,
-0.30188220739364624,
0.17666606605052948,
0.1386435478925705,
-0.10123585164546967,
0.12336991727352142,
-0.01992986910045147,
0.014777731150388718,
-0.6875214576721191,
-0.1371830701828003,
0.10242162644863129,
-0.0769350677728653,
-0.23034371435642242,
-0.07673715054988861,
-0.37740054726600647,
0.23237551748752594,
-0.06199872866272926,
0.5937702655792236,
-0.10519862920045853,
0.18901529908180237,
-0.09051189571619034,
-0.056834347546100616,
-0.14813518524169922,
-0.023611409589648247,
-0.30302926898002625,
0.008798935450613499,
-0.1092749834060669,
-0.13421671092510223,
0.1625543236732483,
-0.14773425459861755,
-0.13534507155418396,
0.07165344059467316,
0.31938186287879944,
-0.058782175183296204,
-0.33084872364997864,
0.3488807678222656,
0.09699271619319916,
-0.27803558111190796,
-0.30085664987564087,
0.10708273947238922,
0.08930996060371399,
-0.5350095629692078,
-0.09935662895441055,
0.2644624412059784,
0.34474700689315796,
-0.15652680397033691,
-0.1530912220478058,
0.42969274520874023,
-0.24204735457897186,
0.4259825050830841,
-0.11414047330617905,
-0.00878007709980011,
0.3594488203525543,
0.13182976841926575,
-0.2028188854455948,
-0.09558000415563583,
0.04160495102405548,
0.09827643632888794,
0.30942732095718384,
0.10735379904508591,
-0.5325560569763184,
-0.0246952623128891,
0.24613311886787415,
-0.13553279638290405,
0.14854085445404053,
0.3439357578754425,
0.02645610272884369,
0.058364614844322205,
0.1440449208021164,
-0.3772357404232025,
0.31473779678344727,
0.016854416579008102,
0.0069146715104579926,
-0.13439898192882538,
-0.12182315438985825,
-0.03919219225645065,
0.24470874667167664,
-0.0561150461435318,
0.0706910490989685,
0.21429011225700378,
0.03302503004670143,
-0.1653953194618225,
-0.18042024970054626,
-0.2334328293800354,
0.07900913804769516,
0.17297802865505219,
-0.6239633560180664,
0.09423059225082397,
-0.32967308163642883,
0.17431935667991638,
-0.23708802461624146,
-0.26766180992126465,
0.11350466310977936,
-0.2016698271036148,
-0.20890292525291443,
0.24206644296646118,
-0.12012793123722076,
0.13853637874126434,
-0.40331435203552246,
0.0975714921951294,
0.1901007443666458,
-0.5237895846366882,
-0.01004081591963768,
0.002012615790590644,
-0.2710900902748108,
-0.08187730610370636,
0.37926530838012695,
0.27984458208084106,
0.06195555627346039,
-0.1255291998386383,
0.15232528746128082,
-0.1678496152162552,
-0.2552993595600128,
0.06802655756473541,
-0.07391123473644257,
0.11824070662260056,
0.06219217926263809,
0.07085154950618744,
-0.3248399496078491,
-0.39719119668006897,
0.22964081168174744,
-0.10517270863056183,
-0.15222889184951782,
0.3554171919822693,
-0.10443555563688278,
-0.35735324025154114,
-0.17480838298797607,
-0.516135573387146,
-0.21360629796981812,
-0.41519275307655334,
0.19336237013339996,
0.13930459320545197,
0.046927522867918015,
0.04357552528381348,
0.2623165249824524,
0.1231549084186554,
0.33125823736190796,
0.11546991765499115,
-0.07406987994909286,
0.005371894687414169,
0.527859628200531,
-0.12681002914905548,
-0.3519243001937866,
0.03307000920176506,
-0.11326605081558228,
-0.061216603964567184,
0.31093716621398926,
-0.04183710366487503,
0.19122649729251862,
-0.02786005102097988,
0.2648980915546417,
-0.0023114755749702454,
0.08129773288965225,
0.22234104573726654,
0.031156474724411964,
0.07619060575962067,
-0.14255833625793457,
-0.2828030586242676,
0.3175475299358368,
0.12323164194822311,
0.11570688337087631,
0.5898651480674744,
0.6031093001365662,
-0.32572734355926514,
0.3851868510246277,
-0.049263790249824524,
-0.19646912813186646,
0.4677954614162445,
-0.1519373506307602,
0.10136048495769501,
-0.23194736242294312,
-0.17965617775917053,
-0.12223215401172638,
-0.1774989664554596,
-0.2684708535671234,
0.3070850670337677,
-0.12306740134954453,
-0.3154537081718445,
-0.12939494848251343,
0.3553231656551361,
-0.29676932096481323,
-0.09699471294879913,
0.3734414875507355,
-0.21368473768234253,
0.24470889568328857,
-0.11902046203613281,
0.08425412327051163,
-0.07643890380859375,
-0.10872580111026764,
0.09132304787635803,
0.13155944645404816,
0.1068795844912529,
-0.08738633245229721,
-0.5244100093841553,
-0.10388991981744766,
-0.2857055962085724,
0.2556536793708801,
0.32925939559936523,
0.6557885408401489,
-0.14322756230831146,
-0.12536048889160156,
0.0668187141418457,
0.1294063776731491,
0.3343355357646942,
-0.2652456760406494,
-0.08572813868522644,
0.21838323771953583,
0.09558871388435364,
0.021263176575303078,
0.09114563465118408,
-0.2352447509765625,
-0.12206847220659256,
-0.09329494833946228,
0.17237448692321777,
-0.3121426999568939,
-0.18918053805828094,
-0.19284626841545105,
0.3368746042251587,
-0.17556995153427124,
-0.035414811223745346,
-0.13573552668094635,
-0.3079075217247009,
-0.2543925642967224,
0.05014254152774811,
0.26336854696273804,
0.38736972212791443,
0.0648978054523468,
0.06525829434394836,
-0.4860834777355194,
-0.053955405950546265,
0.3168371021747589,
0.04688635841012001,
0.39016246795654297,
0.04903310537338257,
0.11192277073860168,
-0.3145260810852051,
0.18466509878635406,
0.03576791286468506,
0.6665099263191223,
-0.07313227653503418,
-0.811826765537262,
0.1926192343235016,
-0.22844654321670532,
0.6646202802658081,
0.06391599774360657,
-0.26227232813835144,
0.03214896097779274,
-0.08084796369075775,
-0.039232365787029266,
0.05163191631436348,
0.11573153734207153,
0.11974749714136124,
-0.025761056691408157,
-0.11891520768404007,
-0.4395478367805481,
0.2684921622276306,
-0.03072633408010006,
-0.0509762279689312,
-0.022333182394504547,
-0.04367905855178833,
-0.34656018018722534,
0.5494556427001953,
0.29922178387641907,
0.960173487663269,
-0.16654251515865326,
-0.07547828555107117,
0.10748497396707535,
0.06002727150917053,
0.4184289872646332,
0.451052188873291,
-0.11044277250766754,
-0.4783465564250946,
-0.08147737383842468,
-0.09652842581272125,
-0.10914040356874466,
0.1392844021320343,
0.3080069422721863,
-0.2980450689792633,
0.4427349865436554,
-0.19567787647247314,
0.3273774981498718,
0.15474340319633484,
0.13080425560474396,
0.4216516315937042,
-0.6057389378547668,
-0.3888360857963562,
0.04944407194852829,
-0.20018862187862396,
-0.05580266937613487,
0.12210946530103683,
-0.11078977584838867,
0.004869256168603897,
-0.019498813897371292,
-0.00540519505739212,
0.1903209686279297,
0.02895142138004303,
0.01673758402466774,
0.0370972640812397,
-0.2289072573184967,
0.29319700598716736,
0.4237113296985626,
0.3239547610282898,
-0.1413271725177765,
0.04192720353603363,
-0.17546388506889343,
0.056761544197797775,
0.21144533157348633,
-0.11537664383649826,
-0.11045815795660019,
0.3753100037574768,
0.20461657643318176,
0.11861544102430344,
0.2687426805496216,
-0.2008623480796814,
-0.4143679141998291,
0.1782292127609253,
-0.07606856524944305,
0.3111489415168762,
-0.7221403121948242,
-0.46025606989860535,
-0.12858285009860992,
0.03339726850390434,
-0.06945839524269104,
-0.0068866293877363205,
0.0017648190259933472,
0.025065431371331215,
0.17482894659042358,
0.1566281020641327,
-0.1613202542066574,
0.11771038174629211,
0.09448147565126419,
0.05668371915817261,
-0.06835465133190155,
0.3383950889110565,
0.21266521513462067,
-0.1351851522922516,
-0.08642355352640152,
0.21369659900665283,
0.2606026232242584,
-0.6703623533248901,
0.10740923881530762,
-0.18670140206813812,
-0.2304183542728424,
0.05685959756374359,
0.6951978206634521,
0.08936147391796112,
0.23681774735450745,
-0.12005715072154999,
-0.32245051860809326,
-0.5295472741127014,
0.2325189858675003,
0.07712507247924805,
0.12451283633708954,
-0.025527533143758774,
-0.09559975564479828,
-0.16723544895648956,
-0.25121262669563293,
-0.17906799912452698,
-0.2260366678237915,
-0.2031995952129364,
0.1978922337293625,
-0.02683655545115471,
0.17492729425430298,
0.07355690002441406,
0.19849435985088348,
0.02867354266345501,
0.12211082875728607,
-0.010430922731757164,
-0.06687483191490173,
-0.0072935521602630615,
0.2638358771800995,
0.22192519903182983,
0.04529367387294769,
-0.3669620156288147,
-0.2743260860443115,
-0.1671469807624817,
-0.3020283579826355,
-0.15953293442726135,
0.09315169602632523,
-0.1908310502767563,
0.06940674036741257,
0.12217699736356735,
0.16188031435012817,
-0.2803739309310913,
0.2299582064151764,
-0.07455447316169739,
0.28963834047317505,
-0.12534406781196594,
0.18301649391651154,
0.014831203036010265,
-0.034296780824661255,
-0.19723805785179138,
0.20302315056324005,
0.4118269681930542,
-0.07623884826898575,
0.2323227822780609,
-0.29462069272994995,
0.16387724876403809,
0.1537054032087326,
0.21691426634788513,
0.3342399001121521,
-0.09890203922986984,
-0.022550882771611214,
0.3155776560306549,
0.029014265164732933,
-0.07496491819620132,
-0.2232450395822525,
0.01449359580874443,
-0.09437191486358643,
-0.11421042680740356,
0.40573233366012573,
0.21344274282455444,
-0.13415035605430603,
0.1725124716758728,
-0.13647431135177612,
0.419977068901062,
-0.20527848601341248,
-0.2592465579509735,
0.6168781518936157,
0.17444263398647308,
0.17327816784381866,
0.3604377210140228,
0.02635573223233223,
0.17169663310050964,
0.3486078977584839,
-0.19049817323684692,
0.03586381673812866,
0.29332348704338074,
0.5195005536079407,
0.0373276025056839,
-0.2363220900297165,
0.2139703929424286,
0.3423804044723511,
0.016566909849643707,
0.19764944911003113,
0.15679030120372772,
0.24837049841880798,
-0.16591039299964905,
-0.3684500455856323,
-0.053171299397945404,
0.26833266019821167,
-0.21231475472450256,
-0.26609596610069275,
-0.4559815526008606,
-0.1595575213432312,
-0.2920830249786377,
-0.07557165622711182,
-0.23189854621887207,
-0.06104348599910736,
0.42629337310791016,
0.1574835479259491,
0.330253005027771,
-0.37879541516304016,
-0.4230475425720215,
0.14846788346767426,
0.08602120727300644,
-0.21655741333961487,
0.43231794238090515,
-0.12133526802062988,
0.017309464514255524,
0.33135277032852173,
0.011893661692738533,
0.3481975197792053,
0.5415483117103577,
0.17847898602485657,
-0.1693004071712494,
0.05551464483141899,
-0.14643193781375885,
-0.010035568848252296,
0.28316783905029297,
-0.1197291910648346,
0.20428147912025452,
0.2606140971183777,
0.01988806389272213,
-0.028793521225452423,
0.47444087266921997,
-0.27283811569213867,
0.0609479583799839,
0.032822463661432266,
0.3194427192211151,
0.28364622592926025,
-0.207118421792984,
-0.10139705240726471,
-0.14262297749519348,
-0.1514362096786499,
-0.07815374433994293,
0.35652559995651245,
-0.059249620884656906,
0.22341391444206238,
0.1519930213689804,
0.019699588418006897,
-0.05286877229809761,
0.23574991524219513,
0.19523687660694122,
0.08180129528045654,
-0.2347947359085083,
0.07961556315422058,
-0.6122211217880249,
0.12978127598762512,
0.3405698835849762,
-0.19231580197811127,
0.47701704502105713,
0.20077931880950928,
0.2242659032344818,
0.31856536865234375,
-0.34865301847457886,
-0.1267262101173401,
0.2773858606815338,
0.33796054124832153,
0.06953606009483337,
-0.009736455976963043,
0.2614307403564453,
0.26724129915237427,
-0.2102862149477005,
-0.5415987968444824,
0.08502861857414246,
-0.07475105673074722,
-0.0380544438958168,
-0.17278610169887543,
-0.14434421062469482,
-0.0024618804454803467,
-0.038954637944698334,
0.25499916076660156,
0.0003755968064069748,
0.5277966260910034,
-0.08009399473667145,
0.02477102167904377,
0.174086332321167,
-0.49025800824165344,
-0.15502284467220306,
0.375700980424881,
-0.16015779972076416,
0.442573219537735,
-0.1881638914346695,
0.5270156860351562,
-0.2822113037109375,
-0.12010068446397781,
0.14123620092868805,
-0.01034692581743002,
-0.42383450269699097,
0.3756210207939148,
-0.5192405581474304,
0.06534826755523682,
0.15641789138317108,
0.15851269662380219,
0.1654798984527588,
0.19136787950992584,
-0.12958109378814697,
-0.3327222764492035,
0.44833511114120483,
-0.3660873770713806,
-0.37232574820518494,
0.1123899295926094,
-0.06957200169563293,
0.1881100833415985,
-0.10343001782894135,
-0.5125928521156311,
-0.15753063559532166,
0.21343934535980225,
-0.16842606663703918,
-0.35302868485450745,
0.04001323878765106,
-0.10291700065135956,
0.10376773774623871,
-0.2346632033586502,
0.18783673644065857,
0.17104381322860718,
-0.04565035551786423,
-0.17931339144706726,
-0.45356816053390503
] |
https://github.com/huggingface/datasets/issues/2285 | Help understanding how to build a dataset for language modeling as with the old TextDataset |
I received an answer for this question on the HuggingFace Datasets forum by @lhoestq
Hi !
If you want to tokenize line by line, you can use this:
```
max_seq_length = 512
num_proc = 4
def tokenize_function(examples):
# Remove empty lines
examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()]
return tokenizer(
examples["text"],
truncation=True,
max_length=max_seq_length,
)
tokenized_dataset = dataset.map(
tokenize_function,
batched=True,
num_proc=num_proc,
remove_columns=["text"],
)
```
Though the TextDataset was doing a different processing by concatenating all the texts and building blocks of size 512. If you need this behavior, then you must apply an additional map function after the tokenization:
```
# Main data processing function that will concatenate all texts from
# our dataset and generate chunks of max_seq_length.
def group_texts(examples):
# Concatenate all texts.
concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
total_length = len(concatenated_examples[list(examples.keys())[0]])
# We drop the small remainder, we could add padding if the model supported it instead of this drop,
# you can customize this part to your needs.
total_length = (total_length // max_seq_length) * max_seq_length
# Split by chunks of max_len.
result = {
k: [t[i : i + max_seq_length] for i in range(0, total_length, max_seq_length)]
for k, t in concatenated_examples.items()
}
return result
# Note that with `batched=True`, this map processes 1,000 texts together,
# so group_texts throws away a remainder for each of those groups of 1,000 texts.
# You can adjust that batch_size here but a higher value might be slower to preprocess.
tokenized_dataset = tokenized_dataset.map(
group_texts,
batched=True,
num_proc=num_proc,
)
```
This code comes from the processing of the run_mlm.py example script of transformers
| Hello,
I am trying to load a custom dataset that I will then use for language modeling. The dataset consists of a text file that has a whole document in each line, meaning that each line overpasses the normal 512 tokens limit of most tokenizers.
I would like to understand what is the process to build a text dataset that tokenizes each line, having previously split the documents in the dataset into lines of a "tokenizable" size, as the old TextDataset class would do, where you only had to do the following, and a tokenized dataset without text loss would be available to pass to a DataCollator:
```
model_checkpoint = 'distilbert-base-uncased'
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
from transformers import TextDataset
dataset = TextDataset(
tokenizer=tokenizer,
file_path="path/to/text_file.txt",
block_size=512,
)
```
For now, what I have is the following, which, of course, throws an error because each line is longer than the maximum block size in the tokenizer:
```
import datasets
dataset = datasets.load_dataset('path/to/text_file.txt')
model_checkpoint = 'distilbert-base-uncased'
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
def tokenize_function(examples):
return tokenizer(examples["text"])
tokenized_datasets = dataset.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"])
tokenized_datasets
```
So what would be the "standard" way of creating a dataset in the way it was done before?
Thank you very much for the help :)) | 270 | Help understanding how to build a dataset for language modeling as with the old TextDataset
Hello,
I am trying to load a custom dataset that I will then use for language modeling. The dataset consists of a text file that has a whole document in each line, meaning that each line overpasses the normal 512 tokens limit of most tokenizers.
I would like to understand what is the process to build a text dataset that tokenizes each line, having previously split the documents in the dataset into lines of a "tokenizable" size, as the old TextDataset class would do, where you only had to do the following, and a tokenized dataset without text loss would be available to pass to a DataCollator:
```
model_checkpoint = 'distilbert-base-uncased'
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
from transformers import TextDataset
dataset = TextDataset(
tokenizer=tokenizer,
file_path="path/to/text_file.txt",
block_size=512,
)
```
For now, what I have is the following, which, of course, throws an error because each line is longer than the maximum block size in the tokenizer:
```
import datasets
dataset = datasets.load_dataset('path/to/text_file.txt')
model_checkpoint = 'distilbert-base-uncased'
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
def tokenize_function(examples):
return tokenizer(examples["text"])
tokenized_datasets = dataset.map(tokenize_function, batched=True, num_proc=4, remove_columns=["text"])
tokenized_datasets
```
So what would be the "standard" way of creating a dataset in the way it was done before?
Thank you very much for the help :))
I received an answer for this question on the HuggingFace Datasets forum by @lhoestq
Hi !
If you want to tokenize line by line, you can use this:
```
max_seq_length = 512
num_proc = 4
def tokenize_function(examples):
# Remove empty lines
examples["text"] = [line for line in examples["text"] if len(line) > 0 and not line.isspace()]
return tokenizer(
examples["text"],
truncation=True,
max_length=max_seq_length,
)
tokenized_dataset = dataset.map(
tokenize_function,
batched=True,
num_proc=num_proc,
remove_columns=["text"],
)
```
Though the TextDataset was doing a different processing by concatenating all the texts and building blocks of size 512. If you need this behavior, then you must apply an additional map function after the tokenization:
```
# Main data processing function that will concatenate all texts from
# our dataset and generate chunks of max_seq_length.
def group_texts(examples):
# Concatenate all texts.
concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
total_length = len(concatenated_examples[list(examples.keys())[0]])
# We drop the small remainder, we could add padding if the model supported it instead of this drop,
# you can customize this part to your needs.
total_length = (total_length // max_seq_length) * max_seq_length
# Split by chunks of max_len.
result = {
k: [t[i : i + max_seq_length] for i in range(0, total_length, max_seq_length)]
for k, t in concatenated_examples.items()
}
return result
# Note that with `batched=True`, this map processes 1,000 texts together,
# so group_texts throws away a remainder for each of those groups of 1,000 texts.
# You can adjust that batch_size here but a higher value might be slower to preprocess.
tokenized_dataset = tokenized_dataset.map(
group_texts,
batched=True,
num_proc=num_proc,
)
```
This code comes from the processing of the run_mlm.py example script of transformers
| [
-0.23920311033725739,
-0.00018575787544250488,
0.017592549324035645,
0.1512313187122345,
0.13693834841251373,
-0.16728411614894867,
0.5160786509513855,
0.0982799082994461,
-0.05547754094004631,
-0.1596171110868454,
0.18944410979747772,
-0.1941065639257431,
-0.16465231776237488,
0.1340247094631195,
0.14351700246334076,
-0.08411101996898651,
0.13398580253124237,
0.056288618594408035,
0.1950116902589798,
0.023583389818668365,
0.07564166188240051,
0.05612006038427353,
-0.0015378668904304504,
-0.08214041590690613,
-0.5577689409255981,
-0.10910723358392715,
-0.18319392204284668,
-0.12270986288785934,
-0.32844486832618713,
-0.42127397656440735,
0.015329023823142052,
0.3389093577861786,
0.4065941274166107,
0.49584585428237915,
-0.00012380813132040203,
-0.21224887669086456,
-0.17743359506130219,
-0.2544006109237671,
-0.05254117026925087,
-0.2375398427248001,
0.37448737025260925,
-0.4061254560947418,
0.10746871680021286,
-0.132639080286026,
0.07959896326065063,
-0.20967192947864532,
-0.031812168657779694,
-0.23180241882801056,
0.5191581845283508,
0.47870129346847534,
0.00877879187464714,
0.025919929146766663,
0.0743120014667511,
0.11304699629545212,
-0.34288883209228516,
0.1746680736541748,
-0.12140677869319916,
0.12985290586948395,
0.3205682337284088,
-0.05650275945663452,
-0.040282003581523895,
-0.0930837094783783,
0.016685018315911293,
-0.31082168221473694,
0.33160147070884705,
0.11529716104269028,
-0.14157283306121826,
-0.4516032636165619,
0.0755915716290474,
0.25383564829826355,
0.6707499027252197,
-0.34577226638793945,
-0.38932910561561584,
-0.4439041316509247,
-0.16823281347751617,
0.03746347874403,
-0.029642000794410706,
0.07301681488752365,
-0.25418776273727417,
0.10226717591285706,
-0.12406062334775925,
-0.2946547567844391,
-0.22165653109550476,
0.05442459136247635,
-0.32072713971138,
0.3257491886615753,
-0.03361193835735321,
0.03570479154586792,
-0.11942604184150696,
-0.2430412918329239,
-0.05990617349743843,
-0.22049252688884735,
0.22104546427726746,
0.48839274048805237,
-0.08377030491828918,
-0.3066204786300659,
-0.22972896695137024,
-0.33956748247146606,
0.558388352394104,
0.08683648705482483,
-0.09901552647352219,
0.034928999841213226,
-0.22184324264526367,
-0.08059678226709366,
0.03503118082880974,
0.3476090133190155,
0.5046225190162659,
-0.17443859577178955,
0.010841615498065948,
-0.16929583251476288,
-0.1438458412885666,
-0.2762909531593323,
-0.6274003386497498,
0.11727551370859146,
-0.059924595057964325,
-0.05707785487174988,
0.03924361616373062,
-0.052031710743904114,
0.23077687621116638,
-0.006992594338953495,
-0.23503929376602173,
-0.004479709547013044,
0.04525895044207573,
0.03564942628145218,
-0.06750205159187317,
-0.0861181914806366,
-0.2376568466424942,
0.42127758264541626,
-0.27591580152511597,
-0.2418379783630371,
0.07034317404031754,
-0.18639478087425232,
-0.186532124876976,
0.19398453831672668,
0.17963136732578278,
0.01798788085579872,
0.37786510586738586,
0.10874459892511368,
-0.11770957708358765,
-0.23759964108467102,
0.17899470031261444,
-0.2524816691875458,
-0.052434615790843964,
-0.07489050924777985,
0.1091085821390152,
0.21683087944984436,
0.10970212519168854,
-0.41773003339767456,
-0.2348015308380127,
0.0331999734044075,
-0.024929113686084747,
-0.3025584816932678,
-0.03338398039340973,
0.02849355712532997,
-0.19204872846603394,
-0.1472056657075882,
-0.24053716659545898,
0.6766547560691833,
0.47986671328544617,
0.012645885348320007,
-0.0017273277044296265,
-0.03224935382604599,
-0.13813848793506622,
-0.09996850043535233,
0.23624566197395325,
0.474739670753479,
-0.7666453719139099,
0.00633702427148819,
0.0026421062648296356,
-0.03652137890458107,
0.09651504456996918,
0.34933343529701233,
-0.1648329645395279,
0.6068557500839233,
-0.06135037541389465,
0.5180051326751709,
0.35030514001846313,
0.1305190473794937,
-0.20494945347309113,
0.13723768293857574,
0.02921045571565628,
0.18676385283470154,
-0.10731180757284164,
-0.1562439352273941,
0.5612368583679199,
-0.21290700137615204,
-0.036198168992996216,
0.11829110234975815,
-0.14764909446239471,
-0.06695771962404251,
0.03262561932206154,
0.08576769381761551,
0.275334894657135,
-0.13959957659244537,
0.0697685033082962,
-0.03987238556146622,
-0.04441045969724655,
0.3139219880104065,
0.19662359356880188,
-0.15940231084823608,
0.2759898602962494,
0.03621494397521019,
0.23241640627384186,
0.40732622146606445,
-0.015367068350315094,
-0.2693255841732025,
-0.07597596198320389,
0.05676394701004028,
0.20490387082099915,
0.2655690312385559,
-0.05701364576816559,
-0.19162964820861816,
-0.24747371673583984,
-0.15113040804862976,
0.02076764777302742,
-0.19779697060585022,
-0.018116828054189682,
0.0179733969271183,
-0.13534805178642273,
0.023472938686609268,
-0.31333139538764954,
0.18764521181583405,
-0.2843899726867676,
0.3427189588546753,
-0.23256619274616241,
-0.0005958098918199539,
0.24439914524555206,
-0.10138406604528427,
-0.16252875328063965,
0.38302111625671387,
-0.027351245284080505,
-0.13131199777126312,
0.027948006987571716,
0.23669427633285522,
0.3679017722606659,
-0.14080046117305756,
-0.22755646705627441,
0.4600909352302551,
0.37846994400024414,
0.030969206243753433,
0.45783787965774536,
-0.20164962112903595,
0.01938020810484886,
-0.1889171004295349,
0.03468133509159088,
0.35994765162467957,
0.20906385779380798,
0.22745877504348755,
-0.011237908154726028,
-0.0714983195066452,
0.31281501054763794,
0.004035517573356628,
-0.04275393858551979,
-0.013918045908212662,
-0.015475708991289139,
0.19520890712738037,
0.3493805229663849,
0.010770810768008232,
0.04656968265771866,
0.3449264168739319,
0.24321022629737854,
-0.1532549113035202,
0.1287161409854889,
0.2910187840461731,
-0.2863340973854065,
-0.2052994668483734,
-0.19082358479499817,
0.004636216908693314,
0.055672787129879,
0.04769900068640709,
0.3897702097892761,
0.0664352998137474,
-0.1433897465467453,
-0.12999427318572998,
0.26564162969589233,
0.06058669090270996,
-0.06307604163885117,
0.3100692927837372,
-0.15492558479309082,
0.11541717499494553,
-0.233149915933609,
-0.47402018308639526,
-0.12580136954784393,
0.20363439619541168,
-0.18538279831409454,
0.13384605944156647,
0.04872474819421768,
-0.06610964983701706,
-0.3965557813644409,
-0.1830107569694519,
-0.37187185883522034,
0.05662297457456589,
-0.0349513441324234,
-0.115875244140625,
0.14937932789325714,
0.033576205372810364,
0.24998322129249573,
0.5063267350196838,
0.009572954848408699,
0.05839531123638153,
0.20632299780845642,
-0.28118303418159485,
-0.25026261806488037,
-0.03464129567146301,
0.09331748634576797,
0.24165412783622742,
0.1541728526353836,
-0.08704719692468643,
0.08652520924806595,
-0.016185669228434563,
-0.5051582455635071,
0.15155762434005737,
-0.16921676695346832,
0.4367191195487976,
0.055425290018320084,
0.17444302141666412,
0.014478594064712524,
-0.08338040113449097,
-0.269835501909256,
0.0895952358841896,
-0.20772437751293182,
-0.22911328077316284,
-0.11113923043012619,
-0.004548291210085154,
0.07186944782733917,
-0.1308138072490692,
-0.37281933426856995,
-0.050407957285642624,
0.27225473523139954,
0.17824016511440277,
0.1835106611251831,
-0.07985217869281769,
-0.029903341084718704,
0.23549452424049377,
0.10326585173606873,
0.03734076768159866,
0.04352334141731262,
-0.051259659230709076,
0.27874118089675903,
-0.2501344680786133,
-0.2366037219762802,
-0.047412753105163574,
-0.12611255049705505,
0.2636547386646271,
0.14332209527492523,
-0.22319233417510986,
0.21402409672737122,
-0.15266595780849457,
0.009320054203271866,
0.015449052676558495,
-0.023818200454115868,
0.40516987442970276,
-0.052256032824516296,
0.27883657813072205,
-0.12144652754068375,
0.018085043877363205,
0.09842478483915329,
-0.27618345618247986,
0.19694747030735016,
-0.006032656878232956,
0.6503129005432129,
0.036909069865942,
0.6386394500732422,
0.36840686202049255,
-0.13251499831676483,
0.07524318993091583,
-0.04773212969303131,
0.04222729802131653,
-0.3112989664077759,
-0.22771286964416504,
0.0006070223171263933,
0.00903521478176117,
-0.030107274651527405,
0.395671010017395,
0.24230796098709106,
0.11436925828456879,
0.20219804346561432,
-0.11810119450092316,
-0.13948531448841095,
-0.2757112681865692,
0.2836950719356537,
-0.4695579409599304,
0.46719685196876526,
-0.07218429446220398,
0.011669330298900604,
-0.33172833919525146,
-0.11697253584861755,
-0.22230710089206696,
0.3786238431930542,
-0.02821274846792221,
0.059883713722229004,
-0.5507214665412903,
0.3868110477924347,
-0.6631571054458618,
0.02915053814649582,
0.22068479657173157,
0.3547830283641815,
0.11038705706596375,
0.1463712751865387,
-0.0709168016910553,
-0.02037225477397442,
0.4026367664337158,
-0.02274889312684536,
-0.2894222140312195,
-0.10822437703609467,
-0.1320895552635193,
-0.2538168132305145,
0.2933551073074341,
-0.03958088159561157,
0.1975642293691635,
0.531174898147583,
0.6587129831314087,
-0.33028465509414673,
-0.23197275400161743,
-0.37828776240348816,
0.5049984455108643,
-0.15090274810791016,
-0.013116421177983284,
0.19965879619121552,
-0.018058734014630318,
-0.2463340312242508,
0.044116128236055374,
0.12799441814422607,
0.1873219907283783,
0.09927340596914291,
0.04263094440102577,
-0.1333945095539093,
-0.2861354351043701,
0.2563576102256775,
0.05943949893116951,
0.1277618259191513,
-0.2765383720397949,
0.08739537000656128,
0.26565492153167725,
-0.13504168391227722,
-0.049532659351825714,
0.10731072723865509,
0.17591658234596252,
-0.4010821580886841,
-0.012960445135831833,
-0.10646424442529678,
0.49826741218566895,
0.007294312119483948,
0.1161932423710823,
0.17599722743034363,
-0.07174116373062134,
-0.1283392608165741,
-0.2516776919364929,
0.49904075264930725,
-0.00043237488716840744,
0.10721194744110107,
-0.4950768053531647,
-0.5806424617767334,
0.12878470122814178,
0.002229282632470131,
-0.0955413356423378,
0.35800790786743164,
-0.011204585433006287,
-0.5861916542053223,
0.5469620227813721,
0.23399382829666138,
1.0034713745117188,
0.03642474114894867,
0.1965811550617218,
-0.06924320757389069,
0.23330427706241608,
0.35260313749313354,
-0.546370267868042,
-0.22509673237800598,
-0.40493205189704895,
0.23983407020568848,
-0.10358265042304993,
0.053146664053201675,
0.20311054587364197,
0.41966718435287476,
-0.0978059470653534,
0.043421559035778046,
0.19823376834392548,
-0.027317021042108536,
0.10323817282915115,
0.4068478047847748,
-0.3265761137008667,
-0.27557623386383057,
0.051728636026382446,
0.003375161439180374,
-0.017809920012950897,
-0.20658555626869202,
-0.11737488210201263,
0.184115931391716,
0.03304920718073845,
-0.06799700111150742,
-0.4975014328956604,
-0.38057905435562134,
-0.36085283756256104,
-0.013337358832359314,
0.11296480894088745,
-0.20782633125782013,
0.4366980791091919,
0.28265711665153503,
0.6320571303367615,
0.39125099778175354,
-0.22553282976150513,
0.029578417539596558,
-0.27689820528030396,
-0.1763712614774704,
0.04985261708498001,
-0.20721492171287537,
0.33009421825408936,
0.05138343572616577,
-0.14693017303943634,
-0.3165060877799988,
0.0341586172580719,
0.024863801896572113,
-0.3118892312049866,
-0.39187514781951904,
0.29771703481674194,
-0.5495626926422119,
0.06933259963989258,
0.14101630449295044,
0.17422685027122498,
-0.16227509081363678,
-0.03208158537745476,
0.2196674793958664,
-0.05089878290891647,
-0.025932885706424713,
-0.16207437217235565,
-0.05926341935992241,
-0.10339748859405518,
0.07475712150335312,
-0.011869512498378754,
-0.2910362780094147,
0.5136493444442749,
0.23923446238040924,
-0.10669693350791931,
-0.13580967485904694,
0.3822304904460907,
0.2690790295600891,
-0.43119490146636963,
0.03186163306236267,
-0.2794512212276459,
-0.1974165141582489,
0.038537707179784775,
0.36075666546821594,
0.2582130432128906,
-0.16420072317123413,
-0.054567694664001465,
-0.49932196736335754,
-0.40862205624580383,
0.004934929311275482,
-0.025885630398988724,
0.2762124240398407,
-0.13275036215782166,
0.3132950961589813,
-0.13860060274600983,
0.18039697408676147,
-0.11854752153158188,
0.2509555518627167,
0.23831388354301453,
0.2692073881626129,
-0.03819361329078674,
-0.13122808933258057,
-0.18760645389556885,
0.022061416879296303,
-0.1256459504365921,
0.30327868461608887,
-0.10722531378269196,
-0.050450168550014496,
-0.48106658458709717,
0.2701502740383148,
0.2685159146785736,
-0.3452085554599762,
0.14354847371578217,
0.07696276158094406,
-0.20805005729198456,
-0.34012147784233093,
0.16660870611667633,
0.06525703519582748,
0.04990081489086151,
0.13586264848709106,
0.44291508197784424,
0.3076675534248352,
-0.3088444471359253,
-0.18870599567890167,
0.11232105642557144,
0.21021270751953125,
0.42636069655418396,
0.14004403352737427,
-0.12211055308580399,
-0.03863263875246048,
-0.20167142152786255,
0.5881648063659668,
0.5096355080604553,
-0.08351714164018631,
0.04317755997180939,
0.08239042013883591,
0.14065028727054596,
0.15425153076648712,
0.10593818873167038,
0.4155411720275879,
0.02511652186512947,
-0.2322399914264679,
0.6475023031234741,
0.0915132611989975,
0.03035871312022209,
0.10659114271402359,
0.1562037467956543,
-0.17447125911712646,
0.0069195665419101715,
0.3582225441932678,
0.06353425979614258,
0.18943703174591064,
-0.24720324575901031,
-0.2593581974506378,
0.5303357839584351,
0.08929756283760071,
0.05789155513048172,
0.1401207000017166,
-0.18714118003845215,
0.04931926354765892,
0.21930156648159027,
0.17166942358016968,
0.3259338438510895,
0.5564159750938416,
-0.069860078394413,
0.32145261764526367,
0.053129084408283234,
0.004704587161540985,
0.04719029366970062,
-0.3095894455909729,
-0.08002427220344543,
0.048023439943790436,
0.16566641628742218,
-0.1105845645070076,
-0.19473865628242493,
0.19783690571784973,
0.036303140223026276,
-0.1083432212471962,
0.12805412709712982,
0.27725091576576233,
-0.17085498571395874,
-0.47370752692222595,
-0.348168283700943,
-0.2068166732788086,
0.016412891447544098,
-0.11151053011417389,
0.013460122048854828,
-0.3089476227760315,
-0.3214220702648163,
-0.1910710483789444,
0.09301115572452545,
-0.4402131140232086,
0.22645223140716553,
-0.15021446347236633,
-0.05908869951963425,
-0.09506873786449432,
0.40517696738243103,
0.041004881262779236,
0.07087699323892593,
-0.11571468412876129,
0.20225246250629425,
0.1273886263370514,
0.19058330357074738,
-0.17004236578941345,
0.19624777138233185,
-0.41563549637794495,
0.005244584754109383,
-0.005585242062807083,
0.37479448318481445,
-0.01775648444890976,
0.342349648475647,
0.16628779470920563,
-0.08153590559959412,
0.00931683648377657,
-0.07293029129505157,
0.3396167457103729,
-0.44783949851989746,
-0.1336386799812317,
0.4081297516822815,
0.11756489425897598,
-0.07464069873094559,
-0.026199083775281906,
0.059985797852277756,
-0.27375707030296326,
-0.040893252938985825,
0.5035931468009949,
-0.09961190074682236,
0.1589266061782837,
-0.16053327918052673,
-0.004913843236863613,
-0.053294431418180466,
0.37548327445983887,
0.4513396918773651,
0.22044801712036133,
-0.17429590225219727,
-0.28682929277420044,
-0.4054223597049713,
-0.03756914287805557,
0.011262796819210052,
-0.07951897382736206,
-0.08702964335680008,
0.02100793458521366,
0.1426895707845688,
0.16830310225486755,
-0.3433712124824524,
0.32830920815467834,
-0.2516363859176636,
-0.07043290138244629,
-0.04274189472198486,
-0.035730842500925064,
-0.03389696776866913,
0.4775058925151825,
-0.13428550958633423,
-0.10312429070472717,
-0.018535811454057693,
-0.034754443913698196,
-0.1216445192694664,
0.0555415004491806,
-0.006459895521402359,
0.2513418197631836,
-0.22585785388946533,
0.11859819293022156,
0.20962537825107574,
0.35376566648483276,
0.045167967677116394,
0.24068379402160645,
-0.2795902192592621,
0.14643575251102448,
-0.260593444108963,
0.3197110593318939,
0.16157454252243042,
0.3715631365776062,
-0.3493005335330963,
0.05807075649499893,
-0.04442141205072403,
0.10081220418214798,
0.19729508459568024,
-0.27613717317581177,
-0.3211236894130707,
0.1628667563199997,
-0.27997779846191406,
-0.2471337765455246,
0.12707121670246124,
0.6248330473899841,
-0.12317654490470886,
0.36067086458206177,
0.07933446764945984,
0.04213327914476395,
0.16117943823337555,
-0.41228586435317993,
-0.46798449754714966,
-0.07654192298650742,
-0.03956961631774902,
0.6494612693786621,
-0.20722301304340363,
-0.6433725357055664,
-0.022690072655677795,
0.5512030124664307,
0.008575569838285446,
-0.2864915728569031,
0.26375654339790344,
0.23952209949493408,
-0.28322380781173706,
-0.2148468941450119,
0.5683006048202515,
-0.11352115124464035,
-0.03415428847074509,
0.007985454052686691,
-0.3772538900375366
] |
https://github.com/huggingface/datasets/issues/2279 | Compatibility with Ubuntu 18 and GLIBC 2.27? | From the trace this seems like an error in the tokenizer library instead.
Do you mind opening an issue at https://github.com/huggingface/tokenizers instead? | ## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
| 22 | Compatibility with Ubuntu 18 and GLIBC 2.27?
## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
From the trace this seems like an error in the tokenizer library instead.
Do you mind opening an issue at https://github.com/huggingface/tokenizers instead? | [
-0.14281189441680908,
-0.17239245772361755,
0.10753287374973297,
0.1302342414855957,
0.05963827669620514,
-0.0772043913602829,
0.29086166620254517,
0.2598787248134613,
0.22593893110752106,
0.011138036847114563,
0.17404599487781525,
0.22678975760936737,
-0.20159262418746948,
0.020794743672013283,
0.059123240411281586,
-0.23972269892692566,
0.40024158358573914,
0.13422489166259766,
-0.3602031469345093,
-0.04503622651100159,
-0.15546119213104248,
0.5982701778411865,
-0.3146860599517822,
-0.010957702994346619,
-0.4952143430709839,
0.03921440243721008,
-0.05191013216972351,
0.14667657017707825,
0.13439184427261353,
-0.13093824684619904,
0.40626826882362366,
-0.12497144937515259,
-0.09097547829151154,
0.7543860673904419,
-0.00012243953824508935,
0.049388617277145386,
0.28036701679229736,
-0.03565230965614319,
-0.30916664004325867,
-0.3431195616722107,
0.46033433079719543,
-0.20342251658439636,
0.19845277070999146,
0.021075986325740814,
-0.1604524850845337,
-0.031238608062267303,
0.04316907376050949,
-0.1770751178264618,
0.30626535415649414,
0.22927282750606537,
0.16357195377349854,
0.6086137294769287,
0.28723832964897156,
-0.2450602799654007,
0.13273000717163086,
0.06710457801818848,
-0.3019823431968689,
0.17751836776733398,
0.39177945256233215,
0.08258650451898575,
0.10148921608924866,
0.33501461148262024,
0.10523824393749237,
-0.20169813930988312,
0.4753358066082001,
-0.09232579916715622,
-0.25592148303985596,
-0.2584758996963501,
0.09236481785774231,
0.11903756856918335,
0.11317332088947296,
-0.3634868562221527,
-0.40583038330078125,
-0.5498497486114502,
-0.23886387050151825,
0.20909807085990906,
0.3674345016479492,
-0.22925983369350433,
-0.05801061913371086,
0.13786205649375916,
-0.33310961723327637,
-0.3827240765094757,
-0.11972236633300781,
-0.033187344670295715,
-0.012718219310045242,
0.8859989643096924,
-0.01735854521393776,
0.16761618852615356,
0.061081983149051666,
0.0065576061606407166,
0.00012061558663845062,
-0.1602579653263092,
0.008546356111764908,
0.16476042568683624,
-0.13252775371074677,
-0.08885300159454346,
0.05308196693658829,
-0.12336742132902145,
0.00660320371389389,
-0.170561745762825,
-0.2632811963558197,
-0.1685597002506256,
-0.10617931932210922,
0.13604027032852173,
0.03998635709285736,
0.27831077575683594,
-0.15790528059005737,
0.473906010389328,
0.21863329410552979,
0.24734874069690704,
0.3216749429702759,
-0.10703907161951065,
0.10265043377876282,
-0.26378318667411804,
-0.1310984045267105,
0.1177573874592781,
0.20922978222370148,
-0.2898232042789459,
-0.017997898161411285,
-0.056671060621738434,
-0.01086486503481865,
0.22264714539051056,
0.06817477196455002,
0.16601663827896118,
-0.03284015879034996,
0.3804474472999573,
0.09281167387962341,
0.2229459285736084,
-0.1679704189300537,
0.23829403519630432,
-0.11647889763116837,
-0.09742102026939392,
-0.014435973018407822,
-0.07163065671920776,
0.1691596657037735,
-0.03916063532233238,
0.25383755564689636,
0.20590084791183472,
0.420324444770813,
0.08741624653339386,
-0.1992437243461609,
0.04575006663799286,
0.05189402773976326,
0.3462997376918793,
-0.4304388463497162,
0.3338392674922943,
0.16842037439346313,
-0.3088170886039734,
-0.3119700849056244,
-0.009893126785755157,
-0.06385979801416397,
-0.09149263799190521,
-0.04691871255636215,
0.06326562911272049,
-0.24924670159816742,
0.013064300641417503,
0.01249697059392929,
0.11445800960063934,
0.172650545835495,
-0.49468907713890076,
0.2769924998283386,
-0.23378323018550873,
-0.21197320520877838,
-0.024152018129825592,
0.10761398822069168,
0.035638563334941864,
-0.2591191530227661,
-0.44248488545417786,
0.3240973949432373,
-0.08399121463298798,
-0.03126729279756546,
0.24397039413452148,
-0.11428706347942352,
-0.3914649784564972,
-0.19420769810676575,
-0.03586766496300697,
-0.2203388810157776,
-0.152667835354805,
-0.5307198166847229,
0.020709773525595665,
0.08599711954593658,
0.23946909606456757,
-0.0067255571484565735,
-0.02624683454632759,
0.06152623891830444,
-0.26937127113342285,
-0.12758193910121918,
0.34959936141967773,
0.11978531628847122,
0.0980069562792778,
-0.40858814120292664,
-0.3331644833087921,
-0.014903947710990906,
-0.0940912514925003,
0.19425024092197418,
-0.1640089452266693,
-0.1923215091228485,
0.11747998744249344,
0.4155254065990448,
-0.2786253094673157,
-0.029060473665595055,
0.1464768946170807,
0.5196976661682129,
0.0005210787057876587,
0.06181704252958298,
-0.11145740747451782,
-0.6179242730140686,
0.4469008147716522,
-0.2873839735984802,
0.1566895842552185,
-0.31385380029678345,
-0.17213720083236694,
-0.0007825884968042374,
0.12778431177139282,
0.08361978828907013,
-0.3957599401473999,
-0.03205107897520065,
0.054722510278224945,
0.18710656464099884,
0.05262661352753639,
-0.142720565199852,
0.2477562576532364,
0.027451666072010994,
0.007892333902418613,
-0.43963801860809326,
0.315277636051178,
-0.08247487246990204,
-0.17373612523078918,
0.10703469812870026,
0.21134799718856812,
0.051297783851623535,
-0.3297808766365051,
-0.1780620813369751,
0.3240364193916321,
-0.12708187103271484,
0.19002190232276917,
-0.31055575609207153,
0.07142435759305954,
0.2983861565589905,
-0.041949979960918427,
-0.07588597387075424,
0.3169102966785431,
-0.007165498100221157,
0.06733832508325577,
0.08639967441558838,
0.18117770552635193,
0.01454244740307331,
0.15950842201709747,
0.26736849546432495,
0.07999536395072937,
0.01341891847550869,
-0.028026830404996872,
-0.055177830159664154,
-0.2057688683271408,
0.053303275257349014,
-0.05454324558377266,
-0.07221397012472153,
0.1719163954257965,
-0.14596304297447205,
-0.019642964005470276,
0.6664273142814636,
0.04518955573439598,
0.006748568266630173,
0.1859145164489746,
-0.12849780917167664,
-0.10420993715524673,
0.1641649752855301,
0.3101862370967865,
0.29091548919677734,
0.11027258634567261,
-0.039655376225709915,
0.2677048444747925,
-0.07508323341608047,
-0.14318282902240753,
0.2155100256204605,
0.0968804731965065,
0.41943851113319397,
0.019184522330760956,
0.038532815873622894,
0.30566611886024475,
0.06143121421337128,
-0.060386043041944504,
-0.26371824741363525,
0.09143539518117905,
-0.3121882379055023,
0.45076802372932434,
-0.03680340573191643,
0.07846802473068237,
-0.15868479013442993,
-0.15773212909698486,
-0.7852619290351868,
-0.18836042284965515,
0.0067409854382276535,
0.039959318935871124,
-0.1980152726173401,
0.3214106261730194,
-0.04448871314525604,
0.19159315526485443,
-0.29497766494750977,
-0.26381686329841614,
-0.2137814462184906,
0.03149225190281868,
-0.5112404823303223,
-0.023134976625442505,
0.27851057052612305,
0.1089705154299736,
0.03575441613793373,
-0.07281719893217087,
-0.10635840147733688,
0.03941771388053894,
-0.5937508344650269,
0.2073415219783783,
-0.09667174518108368,
0.3363630771636963,
0.09311359375715256,
-0.16054387390613556,
-0.15741528570652008,
-0.20984181761741638,
0.22310252487659454,
-0.8244650959968567,
-0.033241596072912216,
-0.06706051528453827,
-0.03306080773472786,
-0.21298673748970032,
-0.31090664863586426,
0.042558565735816956,
-0.19373515248298645,
-0.22459225356578827,
0.06415814161300659,
0.026793405413627625,
0.150438129901886,
0.6384629011154175,
0.06323624402284622,
0.06684223562479019,
-0.3688482642173767,
-0.019297031685709953,
0.0950939804315567,
0.10944943130016327,
0.26444438099861145,
0.02371426858007908,
-0.4643276631832123,
-0.12101514637470245,
-0.04892338812351227,
0.17500311136245728,
0.14105986058712006,
-0.30636999011039734,
-0.24724313616752625,
-0.4217749834060669,
0.08008687198162079,
0.19320595264434814,
-0.02379441075026989,
0.4895000755786896,
-0.21252022683620453,
0.11902537941932678,
-0.2503901422023773,
-0.1644296795129776,
0.1279211938381195,
-0.08800827711820602,
0.14652082324028015,
0.06953564286231995,
0.10012354701757431,
0.12340593338012695,
0.7045319080352783,
0.4875890612602234,
-0.088471919298172,
0.16422320902347565,
0.15329420566558838,
0.41748735308647156,
-0.24233421683311462,
-0.3420740067958832,
-0.009438799694180489,
0.014886483550071716,
-0.10922061651945114,
0.1582185924053192,
-0.01866675540804863,
-0.1451958566904068,
-0.3119719326496124,
-0.09974956512451172,
-0.03153292089700699,
-0.38644447922706604,
0.16106270253658295,
0.38493284583091736,
0.44696465134620667,
0.131515234708786,
0.07024095207452774,
-0.026265844702720642,
-0.006187034770846367,
0.265117347240448,
0.22889676690101624,
0.10057095438241959,
0.15924695134162903,
0.010611090809106827,
0.05637913942337036,
-0.4902713894844055,
0.15027666091918945,
0.12079854309558868,
0.27448806166648865,
-0.0123043954372406,
-0.259834349155426,
-0.09269733726978302,
-0.04161614552140236,
0.3547394275665283,
0.2080986350774765,
-0.13588078320026398,
0.003781720995903015,
-0.02524016983807087,
-0.5615040063858032,
-0.08453632146120071,
-0.19228966534137726,
0.029599424451589584,
0.6906399130821228,
0.7015839219093323,
-0.25748804211616516,
-0.22357726097106934,
-0.0012590494006872177,
0.19862209260463715,
-0.08590616285800934,
-0.1249648705124855,
-0.4714791178703308,
0.018077142536640167,
-0.242776557803154,
-0.07612457126379013,
0.20812977850437164,
0.09376216679811478,
-0.012371453456580639,
0.1114058643579483,
-0.0792526975274086,
-0.3343798816204071,
-0.115732342004776,
0.23854662477970123,
0.23723885416984558,
-0.08537501841783524,
0.16376057267189026,
0.14268968999385834,
-0.04729907214641571,
-0.09374912828207016,
0.5736647248268127,
0.08682022243738174,
-0.1973433792591095,
-0.014071941375732422,
0.25289568305015564,
0.38237613439559937,
0.3725438714027405,
-0.3145153224468231,
-0.05232872813940048,
0.05764809250831604,
0.18693020939826965,
0.07170818001031876,
-0.2260337918996811,
0.18477767705917358,
0.19694706797599792,
-0.34727680683135986,
-0.27140891551971436,
0.31546056270599365,
0.2166333794593811,
-0.04382297769188881,
-0.07232298702001572,
0.35056954622268677,
-0.20921631157398224,
0.2476395219564438,
0.026469267904758453,
0.8544820547103882,
0.1244775727391243,
0.23278599977493286,
0.29732662439346313,
-0.025873662903904915,
0.7188069820404053,
0.39946645498275757,
0.19411692023277283,
-0.4109278619289398,
-0.34186819195747375,
-0.014061489142477512,
-0.08089404553174973,
0.4022878110408783,
-0.29506564140319824,
-0.3223608732223511,
0.3390086889266968,
0.23393596708774567,
0.1027216762304306,
0.07957687973976135,
0.05889039486646652,
-0.19811442494392395,
-0.15593110024929047,
-0.29196709394454956,
0.03321921080350876,
0.05402795225381851,
0.3022697865962982,
-0.05524584650993347,
-0.1685112863779068,
-0.3493579030036926,
-0.44621050357818604,
-0.2820330858230591,
0.28051406145095825,
-0.3277347981929779,
-0.01416432112455368,
0.5910345911979675,
-0.2505151033401489,
0.48737165331840515,
-0.03316256031394005,
0.1778804510831833,
0.2963130474090576,
-0.27131110429763794,
0.2396019548177719,
-0.28516966104507446,
0.001954495906829834,
0.12239579111337662,
0.0028119543567299843,
0.31398749351501465,
-0.17768174409866333,
-0.118138886988163,
-0.24228334426879883,
-0.1403474658727646,
-0.11159229278564453,
0.0921529233455658,
-0.1329474151134491,
-0.08481639623641968,
-0.05315880849957466,
-0.11130617558956146,
0.006542280316352844,
0.18089930713176727,
-0.28633397817611694,
0.10431590676307678,
-0.03310215473175049,
-0.11114520579576492,
-0.14627644419670105,
-0.0809006541967392,
-0.2520558536052704,
-0.06803283095359802,
0.12737341225147247,
-0.17106673121452332,
0.08800262212753296,
0.42181432247161865,
0.4625125527381897,
-0.19629517197608948,
0.004767317324876785,
-0.29270046949386597,
0.17061778903007507,
-1.056074619293213,
0.04347006976604462,
0.11840388923883438,
-0.05906631797552109,
-0.23217210173606873,
0.4432278275489807,
0.38574427366256714,
-0.2091692090034485,
-0.19349591434001923,
-0.1018265038728714,
-0.26864054799079895,
0.002545654773712158,
-0.08183132112026215,
0.16684074699878693,
-0.10920504480600357,
-0.11315660178661346,
0.06596257537603378,
0.20047175884246826,
-0.2183968871831894,
-0.08782193809747696,
0.025513963773846626,
-0.10717406868934631,
-0.09511762112379074,
-0.3705214262008667,
0.2673196494579315,
-0.2820158302783966,
-0.029769577085971832,
0.17411865293979645,
-0.10127713531255722,
-0.07190662622451782,
-0.2767719328403473,
0.11092157661914825,
0.3009898066520691,
-0.1892261952161789,
-0.15926499664783478,
0.09716706722974777,
-0.04459202662110329,
-0.25125518441200256,
0.32044196128845215,
0.3702950179576874,
-0.005415149033069611,
0.1673935353755951,
0.16355052590370178,
0.07428891956806183,
0.005183137953281403,
0.13718843460083008,
0.0004128590226173401,
0.16377666592597961,
0.2630918025970459,
0.26551300287246704,
0.00878220982849598,
0.12762631475925446,
0.073577381670475,
0.24058213829994202,
-0.08426415920257568,
0.13573002815246582,
0.03598704934120178,
-0.17643846571445465,
0.0797155499458313,
0.2588964104652405,
0.37126976251602173,
0.2570677399635315,
-0.0932641550898552,
-0.10377775132656097,
0.286411851644516,
0.09471031278371811,
-0.2520168721675873,
-0.08105392009019852,
0.14294177293777466,
0.225741907954216,
0.006207611411809921,
0.29391536116600037,
0.36558976769447327,
-0.09214659780263901,
0.29260730743408203,
0.2397046983242035,
0.20224127173423767,
0.3121078610420227,
0.490681529045105,
0.3819252550601959,
0.2148485630750656,
0.17309609055519104,
0.3125346302986145,
0.08821696043014526,
0.17646250128746033,
-0.06803253293037415,
-0.22546419501304626,
0.09270549565553665,
-0.3624395728111267,
0.06122816726565361,
0.2626802623271942,
-0.3448006808757782,
-0.10633628070354462,
-0.27717089653015137,
0.15978053212165833,
0.1789626181125641,
0.06197807192802429,
0.3423141539096832,
-0.1999444216489792,
-0.10189715772867203,
-0.21472039818763733,
0.16535942256450653,
-0.15579739212989807,
-0.12437908351421356,
0.36253196001052856,
-0.05758059024810791,
-0.28773561120033264,
0.014200780540704727,
-0.13816656172275543,
-0.18851236999034882,
0.002384394407272339,
0.08629366755485535,
-0.14875079691410065,
-0.17965491116046906,
0.030943825840950012,
0.11078262329101562,
0.20172175765037537,
0.06741422414779663,
0.2881189286708832,
0.2268686294555664,
-0.10050535202026367,
-0.24745222926139832,
0.24195538461208344,
0.4578119218349457,
-0.008783657103776932,
0.08425280451774597,
0.12606577575206757,
-0.1481117159128189,
0.15413983166217804,
0.05215553194284439,
0.3505437970161438,
-0.03201910853385925,
0.13834720849990845,
0.13489851355552673,
0.04517391324043274,
-0.09821467846632004,
-0.03449723497033119,
-0.3612902760505676,
0.34557420015335083,
-0.29122528433799744,
0.7918099164962769,
-0.4724257290363312,
-0.06235944852232933,
-0.1419646441936493,
0.2556200623512268,
-0.42871445417404175,
-0.13022959232330322,
0.37875643372535706,
-0.022748533636331558,
0.14562249183654785,
-0.2917764186859131,
0.03625861555337906,
0.09797252714633942,
0.3941861689090729,
0.305956095457077,
0.21579885482788086,
0.09306028485298157,
-0.08107065409421921,
-0.48419857025146484,
0.23805510997772217,
0.020612778142094612,
0.34270960092544556,
0.21492034196853638,
-0.22248141467571259,
0.0794466957449913,
0.06941212713718414,
0.21201948821544647,
0.42792969942092896,
-0.23168104887008667,
-0.2786816358566284,
-0.12079247832298279,
0.012887680903077126,
-0.41455066204071045,
-0.3672768473625183,
0.18296873569488525,
-0.18347221612930298,
-0.06523370742797852,
-0.3103601932525635,
-0.037536490708589554,
-0.2787759304046631,
0.03377539664506912,
-0.1651550680398941,
-0.31910440325737,
0.29878097772598267,
0.34856370091438293,
0.21408773958683014,
-0.09224308282136917,
-0.3349895477294922,
-0.2125597894191742,
-0.06050167605280876,
-0.17889925837516785,
0.28376469016075134,
-0.27002716064453125,
0.31328681111335754,
-0.2699928879737854,
-0.18736818432807922,
-0.17838090658187866,
0.009153991937637329,
0.03171651065349579,
-0.16728650033473969,
-0.07905953377485275,
0.02376207523047924,
-0.298511266708374,
0.09843085706233978,
0.31867867708206177,
0.35916078090667725,
0.053078144788742065,
-0.05914203077554703,
-0.3668981194496155,
-0.23860371112823486,
0.6176965236663818,
-0.346036821603775,
-0.1892908364534378,
-0.17984707653522491,
0.12150056660175323,
0.14564940333366394,
-0.4370313286781311,
-0.6966894865036011,
-0.09743952751159668,
0.09742504358291626,
0.04749886319041252,
0.07412554323673248,
0.05903474614024162,
-0.0778413861989975,
-0.05061301589012146,
-0.06909100711345673,
0.6845300197601318,
0.015964385122060776,
-0.276054322719574,
0.23557505011558533,
-0.10130732506513596
] |
https://github.com/huggingface/datasets/issues/2279 | Compatibility with Ubuntu 18 and GLIBC 2.27? | Hi @tginart, thanks for reporting.
I think this issue is already open at `tokenizers` library: https://github.com/huggingface/tokenizers/issues/685 | ## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
| 16 | Compatibility with Ubuntu 18 and GLIBC 2.27?
## Describe the bug
For use on Ubuntu systems, it seems that datasets requires GLIBC 2.29. However, Ubuntu 18 runs with GLIBC 2.27 and it seems [non-trivial to upgrade GLIBC to 2.29 for Ubuntu 18 users](https://www.digitalocean.com/community/questions/how-install-glibc-2-29-or-higher-in-ubuntu-18-04).
I'm not sure if there is anything that can be done about this, but I'd like to confirm that using huggingface/datasets requires either an upgrade to Ubuntu 19/20 or a hand-rolled install of a higher version of GLIBC.
## Steps to reproduce the bug
1. clone the transformers repo
2. move to examples/pytorch/language-modeling
3. run example command:
```python run_clm.py --model_name_or_path gpt2 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --do_train --do_eval --output_dir /tmp/test-clm```
## Expected results
As described in the transformers repo.
## Actual results
```Traceback (most recent call last):
File "run_clm.py", line 34, in <module>
from transformers import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2487, in __getattr__
return super().__getattr__(name)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/file_utils.py", line 1699, in __getattr__
module = self._get_module(self._class_to_module[name])
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/__init__.py", line 2481, in _get_module
return importlib.import_module("." + module_name, self.__name__)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/__init__.py", line 19, in <module>
from . import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/__init__.py", line 23, in <module>
from .tokenization_layoutlm import LayoutLMTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/layoutlm/tokenization_layoutlm.py", line 19, in <module>
from ..bert.tokenization_bert import BertTokenizer
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/models/bert/tokenization_bert.py", line 23, in <module>
from ...tokenization_utils import PreTrainedTokenizer, _is_control, _is_punctuation, _is_whitespace
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 68, in <module>
from tokenizers import AddedToken
File "/home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/__init__.py", line 79, in <module>
from .tokenizers import (
ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/tginart/anaconda3/envs/huggingface/lib/python3.7/site-packages/tokenizers/tokenizers.cpython-37m-x86_64-linux-gnu.so)
```
## Versions
Paste the output of the following code:
```
- Datasets: 1.6.1
- Python: 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0]
- Platform: Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid
```
Hi @tginart, thanks for reporting.
I think this issue is already open at `tokenizers` library: https://github.com/huggingface/tokenizers/issues/685 | [
-0.14281189441680908,
-0.17239245772361755,
0.10753287374973297,
0.1302342414855957,
0.05963827669620514,
-0.0772043913602829,
0.29086166620254517,
0.2598787248134613,
0.22593893110752106,
0.011138036847114563,
0.17404599487781525,
0.22678975760936737,
-0.20159262418746948,
0.020794743672013283,
0.059123240411281586,
-0.23972269892692566,
0.40024158358573914,
0.13422489166259766,
-0.3602031469345093,
-0.04503622651100159,
-0.15546119213104248,
0.5982701778411865,
-0.3146860599517822,
-0.010957702994346619,
-0.4952143430709839,
0.03921440243721008,
-0.05191013216972351,
0.14667657017707825,
0.13439184427261353,
-0.13093824684619904,
0.40626826882362366,
-0.12497144937515259,
-0.09097547829151154,
0.7543860673904419,
-0.00012243953824508935,
0.049388617277145386,
0.28036701679229736,
-0.03565230965614319,
-0.30916664004325867,
-0.3431195616722107,
0.46033433079719543,
-0.20342251658439636,
0.19845277070999146,
0.021075986325740814,
-0.1604524850845337,
-0.031238608062267303,
0.04316907376050949,
-0.1770751178264618,
0.30626535415649414,
0.22927282750606537,
0.16357195377349854,
0.6086137294769287,
0.28723832964897156,
-0.2450602799654007,
0.13273000717163086,
0.06710457801818848,
-0.3019823431968689,
0.17751836776733398,
0.39177945256233215,
0.08258650451898575,
0.10148921608924866,
0.33501461148262024,
0.10523824393749237,
-0.20169813930988312,
0.4753358066082001,
-0.09232579916715622,
-0.25592148303985596,
-0.2584758996963501,
0.09236481785774231,
0.11903756856918335,
0.11317332088947296,
-0.3634868562221527,
-0.40583038330078125,
-0.5498497486114502,
-0.23886387050151825,
0.20909807085990906,
0.3674345016479492,
-0.22925983369350433,
-0.05801061913371086,
0.13786205649375916,
-0.33310961723327637,
-0.3827240765094757,
-0.11972236633300781,
-0.033187344670295715,
-0.012718219310045242,
0.8859989643096924,
-0.01735854521393776,
0.16761618852615356,
0.061081983149051666,
0.0065576061606407166,
0.00012061558663845062,
-0.1602579653263092,
0.008546356111764908,
0.16476042568683624,
-0.13252775371074677,
-0.08885300159454346,
0.05308196693658829,
-0.12336742132902145,
0.00660320371389389,
-0.170561745762825,
-0.2632811963558197,
-0.1685597002506256,
-0.10617931932210922,
0.13604027032852173,
0.03998635709285736,
0.27831077575683594,
-0.15790528059005737,
0.473906010389328,
0.21863329410552979,
0.24734874069690704,
0.3216749429702759,
-0.10703907161951065,
0.10265043377876282,
-0.26378318667411804,
-0.1310984045267105,
0.1177573874592781,
0.20922978222370148,
-0.2898232042789459,
-0.017997898161411285,
-0.056671060621738434,
-0.01086486503481865,
0.22264714539051056,
0.06817477196455002,
0.16601663827896118,
-0.03284015879034996,
0.3804474472999573,
0.09281167387962341,
0.2229459285736084,
-0.1679704189300537,
0.23829403519630432,
-0.11647889763116837,
-0.09742102026939392,
-0.014435973018407822,
-0.07163065671920776,
0.1691596657037735,
-0.03916063532233238,
0.25383755564689636,
0.20590084791183472,
0.420324444770813,
0.08741624653339386,
-0.1992437243461609,
0.04575006663799286,
0.05189402773976326,
0.3462997376918793,
-0.4304388463497162,
0.3338392674922943,
0.16842037439346313,
-0.3088170886039734,
-0.3119700849056244,
-0.009893126785755157,
-0.06385979801416397,
-0.09149263799190521,
-0.04691871255636215,
0.06326562911272049,
-0.24924670159816742,
0.013064300641417503,
0.01249697059392929,
0.11445800960063934,
0.172650545835495,
-0.49468907713890076,
0.2769924998283386,
-0.23378323018550873,
-0.21197320520877838,
-0.024152018129825592,
0.10761398822069168,
0.035638563334941864,
-0.2591191530227661,
-0.44248488545417786,
0.3240973949432373,
-0.08399121463298798,
-0.03126729279756546,
0.24397039413452148,
-0.11428706347942352,
-0.3914649784564972,
-0.19420769810676575,
-0.03586766496300697,
-0.2203388810157776,
-0.152667835354805,
-0.5307198166847229,
0.020709773525595665,
0.08599711954593658,
0.23946909606456757,
-0.0067255571484565735,
-0.02624683454632759,
0.06152623891830444,
-0.26937127113342285,
-0.12758193910121918,
0.34959936141967773,
0.11978531628847122,
0.0980069562792778,
-0.40858814120292664,
-0.3331644833087921,
-0.014903947710990906,
-0.0940912514925003,
0.19425024092197418,
-0.1640089452266693,
-0.1923215091228485,
0.11747998744249344,
0.4155254065990448,
-0.2786253094673157,
-0.029060473665595055,
0.1464768946170807,
0.5196976661682129,
0.0005210787057876587,
0.06181704252958298,
-0.11145740747451782,
-0.6179242730140686,
0.4469008147716522,
-0.2873839735984802,
0.1566895842552185,
-0.31385380029678345,
-0.17213720083236694,
-0.0007825884968042374,
0.12778431177139282,
0.08361978828907013,
-0.3957599401473999,
-0.03205107897520065,
0.054722510278224945,
0.18710656464099884,
0.05262661352753639,
-0.142720565199852,
0.2477562576532364,
0.027451666072010994,
0.007892333902418613,
-0.43963801860809326,
0.315277636051178,
-0.08247487246990204,
-0.17373612523078918,
0.10703469812870026,
0.21134799718856812,
0.051297783851623535,
-0.3297808766365051,
-0.1780620813369751,
0.3240364193916321,
-0.12708187103271484,
0.19002190232276917,
-0.31055575609207153,
0.07142435759305954,
0.2983861565589905,
-0.041949979960918427,
-0.07588597387075424,
0.3169102966785431,
-0.007165498100221157,
0.06733832508325577,
0.08639967441558838,
0.18117770552635193,
0.01454244740307331,
0.15950842201709747,
0.26736849546432495,
0.07999536395072937,
0.01341891847550869,
-0.028026830404996872,
-0.055177830159664154,
-0.2057688683271408,
0.053303275257349014,
-0.05454324558377266,
-0.07221397012472153,
0.1719163954257965,
-0.14596304297447205,
-0.019642964005470276,
0.6664273142814636,
0.04518955573439598,
0.006748568266630173,
0.1859145164489746,
-0.12849780917167664,
-0.10420993715524673,
0.1641649752855301,
0.3101862370967865,
0.29091548919677734,
0.11027258634567261,
-0.039655376225709915,
0.2677048444747925,
-0.07508323341608047,
-0.14318282902240753,
0.2155100256204605,
0.0968804731965065,
0.41943851113319397,
0.019184522330760956,
0.038532815873622894,
0.30566611886024475,
0.06143121421337128,
-0.060386043041944504,
-0.26371824741363525,
0.09143539518117905,
-0.3121882379055023,
0.45076802372932434,
-0.03680340573191643,
0.07846802473068237,
-0.15868479013442993,
-0.15773212909698486,
-0.7852619290351868,
-0.18836042284965515,
0.0067409854382276535,
0.039959318935871124,
-0.1980152726173401,
0.3214106261730194,
-0.04448871314525604,
0.19159315526485443,
-0.29497766494750977,
-0.26381686329841614,
-0.2137814462184906,
0.03149225190281868,
-0.5112404823303223,
-0.023134976625442505,
0.27851057052612305,
0.1089705154299736,
0.03575441613793373,
-0.07281719893217087,
-0.10635840147733688,
0.03941771388053894,
-0.5937508344650269,
0.2073415219783783,
-0.09667174518108368,
0.3363630771636963,
0.09311359375715256,
-0.16054387390613556,
-0.15741528570652008,
-0.20984181761741638,
0.22310252487659454,
-0.8244650959968567,
-0.033241596072912216,
-0.06706051528453827,
-0.03306080773472786,
-0.21298673748970032,
-0.31090664863586426,
0.042558565735816956,
-0.19373515248298645,
-0.22459225356578827,
0.06415814161300659,
0.026793405413627625,
0.150438129901886,
0.6384629011154175,
0.06323624402284622,
0.06684223562479019,
-0.3688482642173767,
-0.019297031685709953,
0.0950939804315567,
0.10944943130016327,
0.26444438099861145,
0.02371426858007908,
-0.4643276631832123,
-0.12101514637470245,
-0.04892338812351227,
0.17500311136245728,
0.14105986058712006,
-0.30636999011039734,
-0.24724313616752625,
-0.4217749834060669,
0.08008687198162079,
0.19320595264434814,
-0.02379441075026989,
0.4895000755786896,
-0.21252022683620453,
0.11902537941932678,
-0.2503901422023773,
-0.1644296795129776,
0.1279211938381195,
-0.08800827711820602,
0.14652082324028015,
0.06953564286231995,
0.10012354701757431,
0.12340593338012695,
0.7045319080352783,
0.4875890612602234,
-0.088471919298172,
0.16422320902347565,
0.15329420566558838,
0.41748735308647156,
-0.24233421683311462,
-0.3420740067958832,
-0.009438799694180489,
0.014886483550071716,
-0.10922061651945114,
0.1582185924053192,
-0.01866675540804863,
-0.1451958566904068,
-0.3119719326496124,
-0.09974956512451172,
-0.03153292089700699,
-0.38644447922706604,
0.16106270253658295,
0.38493284583091736,
0.44696465134620667,
0.131515234708786,
0.07024095207452774,
-0.026265844702720642,
-0.006187034770846367,
0.265117347240448,
0.22889676690101624,
0.10057095438241959,
0.15924695134162903,
0.010611090809106827,
0.05637913942337036,
-0.4902713894844055,
0.15027666091918945,
0.12079854309558868,
0.27448806166648865,
-0.0123043954372406,
-0.259834349155426,
-0.09269733726978302,
-0.04161614552140236,
0.3547394275665283,
0.2080986350774765,
-0.13588078320026398,
0.003781720995903015,
-0.02524016983807087,
-0.5615040063858032,
-0.08453632146120071,
-0.19228966534137726,
0.029599424451589584,
0.6906399130821228,
0.7015839219093323,
-0.25748804211616516,
-0.22357726097106934,
-0.0012590494006872177,
0.19862209260463715,
-0.08590616285800934,
-0.1249648705124855,
-0.4714791178703308,
0.018077142536640167,
-0.242776557803154,
-0.07612457126379013,
0.20812977850437164,
0.09376216679811478,
-0.012371453456580639,
0.1114058643579483,
-0.0792526975274086,
-0.3343798816204071,
-0.115732342004776,
0.23854662477970123,
0.23723885416984558,
-0.08537501841783524,
0.16376057267189026,
0.14268968999385834,
-0.04729907214641571,
-0.09374912828207016,
0.5736647248268127,
0.08682022243738174,
-0.1973433792591095,
-0.014071941375732422,
0.25289568305015564,
0.38237613439559937,
0.3725438714027405,
-0.3145153224468231,
-0.05232872813940048,
0.05764809250831604,
0.18693020939826965,
0.07170818001031876,
-0.2260337918996811,
0.18477767705917358,
0.19694706797599792,
-0.34727680683135986,
-0.27140891551971436,
0.31546056270599365,
0.2166333794593811,
-0.04382297769188881,
-0.07232298702001572,
0.35056954622268677,
-0.20921631157398224,
0.2476395219564438,
0.026469267904758453,
0.8544820547103882,
0.1244775727391243,
0.23278599977493286,
0.29732662439346313,
-0.025873662903904915,
0.7188069820404053,
0.39946645498275757,
0.19411692023277283,
-0.4109278619289398,
-0.34186819195747375,
-0.014061489142477512,
-0.08089404553174973,
0.4022878110408783,
-0.29506564140319824,
-0.3223608732223511,
0.3390086889266968,
0.23393596708774567,
0.1027216762304306,
0.07957687973976135,
0.05889039486646652,
-0.19811442494392395,
-0.15593110024929047,
-0.29196709394454956,
0.03321921080350876,
0.05402795225381851,
0.3022697865962982,
-0.05524584650993347,
-0.1685112863779068,
-0.3493579030036926,
-0.44621050357818604,
-0.2820330858230591,
0.28051406145095825,
-0.3277347981929779,
-0.01416432112455368,
0.5910345911979675,
-0.2505151033401489,
0.48737165331840515,
-0.03316256031394005,
0.1778804510831833,
0.2963130474090576,
-0.27131110429763794,
0.2396019548177719,
-0.28516966104507446,
0.001954495906829834,
0.12239579111337662,
0.0028119543567299843,
0.31398749351501465,
-0.17768174409866333,
-0.118138886988163,
-0.24228334426879883,
-0.1403474658727646,
-0.11159229278564453,
0.0921529233455658,
-0.1329474151134491,
-0.08481639623641968,
-0.05315880849957466,
-0.11130617558956146,
0.006542280316352844,
0.18089930713176727,
-0.28633397817611694,
0.10431590676307678,
-0.03310215473175049,
-0.11114520579576492,
-0.14627644419670105,
-0.0809006541967392,
-0.2520558536052704,
-0.06803283095359802,
0.12737341225147247,
-0.17106673121452332,
0.08800262212753296,
0.42181432247161865,
0.4625125527381897,
-0.19629517197608948,
0.004767317324876785,
-0.29270046949386597,
0.17061778903007507,
-1.056074619293213,
0.04347006976604462,
0.11840388923883438,
-0.05906631797552109,
-0.23217210173606873,
0.4432278275489807,
0.38574427366256714,
-0.2091692090034485,
-0.19349591434001923,
-0.1018265038728714,
-0.26864054799079895,
0.002545654773712158,
-0.08183132112026215,
0.16684074699878693,
-0.10920504480600357,
-0.11315660178661346,
0.06596257537603378,
0.20047175884246826,
-0.2183968871831894,
-0.08782193809747696,
0.025513963773846626,
-0.10717406868934631,
-0.09511762112379074,
-0.3705214262008667,
0.2673196494579315,
-0.2820158302783966,
-0.029769577085971832,
0.17411865293979645,
-0.10127713531255722,
-0.07190662622451782,
-0.2767719328403473,
0.11092157661914825,
0.3009898066520691,
-0.1892261952161789,
-0.15926499664783478,
0.09716706722974777,
-0.04459202662110329,
-0.25125518441200256,
0.32044196128845215,
0.3702950179576874,
-0.005415149033069611,
0.1673935353755951,
0.16355052590370178,
0.07428891956806183,
0.005183137953281403,
0.13718843460083008,
0.0004128590226173401,
0.16377666592597961,
0.2630918025970459,
0.26551300287246704,
0.00878220982849598,
0.12762631475925446,
0.073577381670475,
0.24058213829994202,
-0.08426415920257568,
0.13573002815246582,
0.03598704934120178,
-0.17643846571445465,
0.0797155499458313,
0.2588964104652405,
0.37126976251602173,
0.2570677399635315,
-0.0932641550898552,
-0.10377775132656097,
0.286411851644516,
0.09471031278371811,
-0.2520168721675873,
-0.08105392009019852,
0.14294177293777466,
0.225741907954216,
0.006207611411809921,
0.29391536116600037,
0.36558976769447327,
-0.09214659780263901,
0.29260730743408203,
0.2397046983242035,
0.20224127173423767,
0.3121078610420227,
0.490681529045105,
0.3819252550601959,
0.2148485630750656,
0.17309609055519104,
0.3125346302986145,
0.08821696043014526,
0.17646250128746033,
-0.06803253293037415,
-0.22546419501304626,
0.09270549565553665,
-0.3624395728111267,
0.06122816726565361,
0.2626802623271942,
-0.3448006808757782,
-0.10633628070354462,
-0.27717089653015137,
0.15978053212165833,
0.1789626181125641,
0.06197807192802429,
0.3423141539096832,
-0.1999444216489792,
-0.10189715772867203,
-0.21472039818763733,
0.16535942256450653,
-0.15579739212989807,
-0.12437908351421356,
0.36253196001052856,
-0.05758059024810791,
-0.28773561120033264,
0.014200780540704727,
-0.13816656172275543,
-0.18851236999034882,
0.002384394407272339,
0.08629366755485535,
-0.14875079691410065,
-0.17965491116046906,
0.030943825840950012,
0.11078262329101562,
0.20172175765037537,
0.06741422414779663,
0.2881189286708832,
0.2268686294555664,
-0.10050535202026367,
-0.24745222926139832,
0.24195538461208344,
0.4578119218349457,
-0.008783657103776932,
0.08425280451774597,
0.12606577575206757,
-0.1481117159128189,
0.15413983166217804,
0.05215553194284439,
0.3505437970161438,
-0.03201910853385925,
0.13834720849990845,
0.13489851355552673,
0.04517391324043274,
-0.09821467846632004,
-0.03449723497033119,
-0.3612902760505676,
0.34557420015335083,
-0.29122528433799744,
0.7918099164962769,
-0.4724257290363312,
-0.06235944852232933,
-0.1419646441936493,
0.2556200623512268,
-0.42871445417404175,
-0.13022959232330322,
0.37875643372535706,
-0.022748533636331558,
0.14562249183654785,
-0.2917764186859131,
0.03625861555337906,
0.09797252714633942,
0.3941861689090729,
0.305956095457077,
0.21579885482788086,
0.09306028485298157,
-0.08107065409421921,
-0.48419857025146484,
0.23805510997772217,
0.020612778142094612,
0.34270960092544556,
0.21492034196853638,
-0.22248141467571259,
0.0794466957449913,
0.06941212713718414,
0.21201948821544647,
0.42792969942092896,
-0.23168104887008667,
-0.2786816358566284,
-0.12079247832298279,
0.012887680903077126,
-0.41455066204071045,
-0.3672768473625183,
0.18296873569488525,
-0.18347221612930298,
-0.06523370742797852,
-0.3103601932525635,
-0.037536490708589554,
-0.2787759304046631,
0.03377539664506912,
-0.1651550680398941,
-0.31910440325737,
0.29878097772598267,
0.34856370091438293,
0.21408773958683014,
-0.09224308282136917,
-0.3349895477294922,
-0.2125597894191742,
-0.06050167605280876,
-0.17889925837516785,
0.28376469016075134,
-0.27002716064453125,
0.31328681111335754,
-0.2699928879737854,
-0.18736818432807922,
-0.17838090658187866,
0.009153991937637329,
0.03171651065349579,
-0.16728650033473969,
-0.07905953377485275,
0.02376207523047924,
-0.298511266708374,
0.09843085706233978,
0.31867867708206177,
0.35916078090667725,
0.053078144788742065,
-0.05914203077554703,
-0.3668981194496155,
-0.23860371112823486,
0.6176965236663818,
-0.346036821603775,
-0.1892908364534378,
-0.17984707653522491,
0.12150056660175323,
0.14564940333366394,
-0.4370313286781311,
-0.6966894865036011,
-0.09743952751159668,
0.09742504358291626,
0.04749886319041252,
0.07412554323673248,
0.05903474614024162,
-0.0778413861989975,
-0.05061301589012146,
-0.06909100711345673,
0.6845300197601318,
0.015964385122060776,
-0.276054322719574,
0.23557505011558533,
-0.10130732506513596
] |
https://github.com/huggingface/datasets/issues/2278 | Loss result inGptNeoForCasual | Hi ! I think you might have to ask on the `transformers` repo on or the forum at https://discuss.huggingface.co/
Closing since it's not related to this library | Is there any way you give the " loss" and "logits" results in the gpt neo api? | 27 | Loss result inGptNeoForCasual
Is there any way you give the " loss" and "logits" results in the gpt neo api?
Hi ! I think you might have to ask on the `transformers` repo on or the forum at https://discuss.huggingface.co/
Closing since it's not related to this library | [
-0.17251892387866974,
-0.5047541856765747,
-0.04942303150892258,
0.47317683696746826,
-0.0721401795744896,
-0.34644362330436707,
0.010857734829187393,
0.0527498759329319,
-0.4997347593307495,
0.14229035377502441,
-0.09955911338329315,
-0.03886134549975395,
0.10090520977973938,
0.254296213388443,
0.06461334228515625,
-0.23453158140182495,
-0.09517809003591537,
0.29841482639312744,
-0.11359299719333649,
-0.284717857837677,
0.04672188311815262,
0.7516425848007202,
-0.04235927760601044,
0.44984155893325806,
-0.1351104974746704,
0.04913224279880524,
0.1681937426328659,
-0.1435229778289795,
-0.10154695808887482,
-0.10266180336475372,
0.0283557940274477,
-0.27631664276123047,
-0.15890763700008392,
0.20160824060440063,
-0.00012134292774135247,
-0.026412587612867355,
0.2445293515920639,
-0.0716521143913269,
-0.10240225493907928,
0.0959484875202179,
0.2629528343677521,
0.11629565060138702,
0.13161180913448334,
-0.14786815643310547,
-0.4186842143535614,
-0.4525969326496124,
-0.10506041347980499,
-0.330044686794281,
0.27863627672195435,
0.15650326013565063,
0.044749967753887177,
0.4286803901195526,
-0.23915331065654755,
0.029692215844988823,
0.12584583461284637,
0.2987281084060669,
-0.34015268087387085,
-0.2796235978603363,
0.02609512209892273,
-0.31037765741348267,
0.3510197699069977,
0.2686963677406311,
0.386342853307724,
-0.3036620616912842,
0.018108732998371124,
0.37103909254074097,
0.19630157947540283,
0.010990098118782043,
0.025102831423282623,
0.220872700214386,
0.29167935252189636,
-0.10066791623830795,
-0.1725568026304245,
-0.3272692561149597,
-0.07634803652763367,
-0.5108538866043091,
-0.09464684873819351,
0.11572271585464478,
-0.28861042857170105,
0.10270389914512634,
-0.08978492766618729,
0.15148547291755676,
-0.32569342851638794,
-0.14017079770565033,
-0.12860620021820068,
-0.009854555130004883,
0.10152187943458557,
0.06682725250720978,
0.21268130838871002,
-0.048952266573905945,
-0.4141366481781006,
0.41126328706741333,
-0.14287571609020233,
-0.29214373230934143,
-0.20071877539157867,
-0.5218162536621094,
0.45995715260505676,
0.273028165102005,
0.03126080334186554,
-0.020896300673484802,
0.13093125820159912,
-0.2003556489944458,
-0.217646062374115,
0.02790355682373047,
0.1375725418329239,
-0.09612272679805756,
0.40736737847328186,
0.14804013073444366,
0.10190144181251526,
-0.04755270853638649,
0.18736302852630615,
-0.15286791324615479,
0.4590637981891632,
0.37630724906921387,
0.07974471151828766,
0.14298024773597717,
0.02961340919137001,
-0.49534955620765686,
-0.2803034782409668,
-0.25227421522140503,
0.16319721937179565,
0.14066959917545319,
-0.1088399663567543,
-0.13431045413017273,
-0.016084911301732063,
0.13686566054821014,
0.47403883934020996,
-0.1410938799381256,
-0.22022505104541779,
0.1094309464097023,
-0.05041051656007767,
0.03395141661167145,
-0.486887127161026,
0.1971949338912964,
0.10359849035739899,
0.3923439681529999,
0.0333324670791626,
-0.39858755469322205,
-0.22814776003360748,
0.2114378809928894,
-0.023632727563381195,
-0.05812888965010643,
0.4313167929649353,
0.23633421957492828,
-0.22289498150348663,
-0.25750821828842163,
-0.16258925199508667,
-0.2158326357603073,
-0.37572211027145386,
-0.2422766387462616,
0.47039034962654114,
0.19565244019031525,
-0.16772708296775818,
0.11227458715438843,
0.07424179464578629,
-0.11506699025630951,
0.06175258755683899,
0.39461493492126465,
-0.07482046633958817,
-0.11252705752849579,
0.22804653644561768,
-0.03672272711992264,
-0.3630043864250183,
-0.10091865062713623,
0.1474127471446991,
0.20125193893909454,
-0.014039784669876099,
-0.5118093490600586,
0.24280986189842224,
-0.36415594816207886,
-0.10032442957162857,
0.6593744158744812,
0.02239714376628399,
-0.034395940601825714,
-0.15719139575958252,
0.06683652102947235,
0.13286802172660828,
-0.12987738847732544,
-0.18446122109889984,
-0.4084617495536804,
-0.1652340590953827,
-0.11200615763664246,
0.07250319421291351,
0.019482770934700966,
0.013465352356433868,
-0.11316002905368805,
0.15170705318450928,
0.22774793207645416,
-0.10847897827625275,
-0.02928708679974079,
-0.10771575570106506,
-0.15773004293441772,
0.25756019353866577,
0.0772763341665268,
0.043276719748973846,
-0.045507170259952545,
-0.06214303523302078,
-0.06673327833414078,
0.09416250884532928,
-0.14154890179634094,
-0.0810556560754776,
-0.2618049383163452,
0.3792394995689392,
-0.3635047674179077,
0.20268625020980835,
-0.2679690420627594,
-0.2763744294643402,
0.022615626454353333,
-0.5987128019332886,
0.4693305790424347,
0.07626277208328247,
-0.2173779159784317,
0.18392136693000793,
-0.0067562321200966835,
0.4335823059082031,
0.14000500738620758,
0.13242463767528534,
0.1296626329421997,
0.0034160688519477844,
0.2564792335033417,
-0.01295401155948639,
0.05171731859445572,
0.03455156087875366,
-0.04830020293593407,
-0.31507906317710876,
0.14146479964256287,
0.21877096593379974,
-0.2970019280910492,
-0.05281656235456467,
0.006446138024330139,
0.22382333874702454,
0.1665395349264145,
0.017089664936065674,
-0.013207793235778809,
-0.3755166232585907,
0.4678094983100891,
0.1800203025341034,
0.873604953289032,
0.2860046327114105,
-0.08121170103549957,
-0.20980232954025269,
0.3937199115753174,
-0.11915291100740433,
-0.17283067107200623,
-0.14443457126617432,
0.1783285290002823,
0.4140581786632538,
-0.059188731014728546,
0.2585325241088867,
-0.020666377618908882,
-0.1965886652469635,
-0.18708296120166779,
-0.30106544494628906,
0.14056554436683655,
0.17821599543094635,
-0.340376079082489,
-0.06106364727020264,
-0.17321982979774475,
-0.4480160176753998,
-0.08556149154901505,
0.545811653137207,
-0.11349035799503326,
0.14072799682617188,
0.16788935661315918,
-0.16347333788871765,
0.27425944805145264,
0.15475909411907196,
-0.16103465855121613,
0.50665682554245,
0.08892405033111572,
0.42765286564826965,
0.1344044953584671,
-0.007240270264446735,
-0.18009905517101288,
0.27079612016677856,
0.15408635139465332,
0.05853729695081711,
0.13903239369392395,
0.17046326398849487,
0.09151503443717957,
-0.2852143347263336,
0.05126337334513664,
-0.38431316614151,
-0.2931552827358246,
-0.03832387924194336,
-0.1311173290014267,
0.12867464125156403,
-0.4033593237400055,
-0.22068631649017334,
-0.12769633531570435,
0.12102371454238892,
-0.05285967141389847,
0.2827816605567932,
-0.06953504681587219,
-0.2162185162305832,
-0.21167637407779694,
0.26289883255958557,
0.517561137676239,
-0.07873612642288208,
0.503727376461029,
-0.44996732473373413,
-0.07160405814647675,
-0.2682849168777466,
0.11741580069065094,
-0.4420122504234314,
-0.3176288306713104,
0.3655708432197571,
-0.29078492522239685,
-0.09146025776863098,
-0.07599641382694244,
-0.19903606176376343,
0.37080174684524536,
0.002309802919626236,
-0.31363168358802795,
0.13985402882099152,
0.006322488188743591,
0.06892906874418259,
0.07390458881855011,
0.15047435462474823,
-0.6341797709465027,
-0.0714748203754425,
-0.216847762465477,
-0.019015908241271973,
0.18846073746681213,
-0.48383551836013794,
-0.059614814817905426,
-0.30146223306655884,
-0.2533230483531952,
0.5574225187301636,
-0.042920030653476715,
0.03899566829204559,
0.8306108713150024,
-0.5347164869308472,
0.016280602663755417,
0.08994586020708084,
0.27088382840156555,
0.05250122398138046,
-0.01019701361656189,
-0.02111993357539177,
-0.1664482206106186,
-0.032404471188783646,
-0.14540481567382812,
0.5164803266525269,
-0.06346386671066284,
0.09343278408050537,
-0.23752368986606598,
-0.31871190667152405,
0.020469648763537407,
-0.037733808159828186,
-0.12121963500976562,
0.03647422790527344,
0.6025375127792358,
0.05339040234684944,
-0.17240625619888306,
-0.03877551853656769,
-0.14113599061965942,
0.18138296902179718,
0.18291661143302917,
0.23842459917068481,
-0.02526627853512764,
0.17479559779167175,
0.15277770161628723,
0.25978022813796997,
0.17267444729804993,
-0.5284259915351868,
0.004980150610208511,
0.04441141337156296,
-0.19897769391536713,
0.11141329258680344,
-0.06151191145181656,
-0.2533993721008301,
0.026897281408309937,
-0.06747175008058548,
0.09261150658130646,
0.1822877824306488,
-0.447348028421402,
-0.2816169857978821,
-0.06431376934051514,
-0.42771872878074646,
-0.2260357141494751,
-0.23861970007419586,
0.36529743671417236,
0.049834996461868286,
-0.3288974165916443,
0.08443532139062881,
0.19464612007141113,
0.0669981837272644,
0.5939671993255615,
0.15195271372795105,
0.18122398853302002,
-0.13489064574241638,
-0.12745991349220276,
-0.036707133054733276,
-0.4204016327857971,
0.1611366868019104,
-0.35095667839050293,
-0.23121358454227448,
-0.33398693799972534,
0.001487135887145996,
-0.049428656697273254,
0.1004786416888237,
0.4226037263870239,
0.13404004275798798,
-0.010437574237585068,
0.0897461473941803,
-0.35596421360969543,
0.14119668304920197,
0.040347468107938766,
-0.22099317610263824,
-0.1935630589723587,
0.7315765023231506,
0.3855088949203491,
-0.4366109073162079,
-0.2343100756406784,
0.30288559198379517,
-0.10566045343875885,
-0.0878247395157814,
0.09882204979658127,
-0.04122397303581238,
-0.18691188097000122,
0.11699418723583221,
-0.03132171183824539,
0.23989929258823395,
-0.006487580947577953,
-0.17303285002708435,
-0.2637089192867279,
0.10859053581953049,
-0.16947808861732483,
0.08112609386444092,
0.022602364420890808,
0.22444000840187073,
-0.10656575113534927,
-0.13058960437774658,
0.14123375713825226,
0.5329355001449585,
-0.24322372674942017,
0.1484334021806717,
0.6979499459266663,
-0.020530417561531067,
0.07022437453269958,
0.1610848605632782,
0.04372081160545349,
0.27520179748535156,
0.0382404588162899,
-0.03447619825601578,
-0.2715020477771759,
0.3770996928215027,
-0.07768618315458298,
0.21623487770557404,
0.05987105518579483,
-0.011079235002398491,
-0.15312141180038452,
0.5143990516662598,
0.49527668952941895,
0.22903142869472504,
-0.3437061905860901,
0.5232909321784973,
0.2530074119567871,
-0.5994123220443726,
-0.04236013814806938,
0.09328476339578629,
1.2044787406921387,
0.07243567705154419,
0.22352708876132965,
0.0314205065369606,
-0.3536103367805481,
0.4067280888557434,
0.12426285445690155,
0.007891815155744553,
-0.07509069889783859,
-0.22308872640132904,
-0.030530240386724472,
0.04226282611489296,
0.06910078227519989,
-0.13892588019371033,
-0.07138817012310028,
0.1323724091053009,
0.42215496301651,
-0.01524384692311287,
0.08373371511697769,
0.40214112401008606,
0.3814332187175751,
-0.20515015721321106,
-0.08835174888372421,
-0.008232826367020607,
-0.013549946248531342,
0.44886118173599243,
-0.05806729197502136,
-0.32369059324264526,
0.009924616664648056,
0.058138392865657806,
-0.425767719745636,
0.04608004540205002,
-0.2219448834657669,
0.10186346620321274,
0.18660807609558105,
-0.42150580883026123,
-0.1442059725522995,
-0.06656292080879211,
0.35027241706848145,
0.11624673008918762,
-0.228877991437912,
0.2055513709783554,
-0.6553249359130859,
0.13370707631111145,
-0.11114725470542908,
-0.022360684350132942,
0.30497825145721436,
-0.1374572068452835,
-0.23202946782112122,
0.25561559200286865,
0.24604254961013794,
-0.02398126944899559,
-0.3673841953277588,
-0.3370630145072937,
-0.17865529656410217,
0.03878463804721832,
0.2585057020187378,
0.05232364311814308,
-0.37593191862106323,
0.06763105094432831,
0.033230770379304886,
0.4689508080482483,
-0.2207179069519043,
0.12798777222633362,
0.07712012529373169,
-0.1748056262731552,
-0.11038237810134888,
0.18736493587493896,
0.33560001850128174,
-0.04858862981200218,
-0.012424327433109283,
0.1048632264137268,
0.010206546634435654,
-0.03497110307216644,
-0.5182818174362183,
0.09624066203832626,
-0.48791414499282837,
0.09297702461481094,
0.17315125465393066,
-0.08343002200126648,
0.05212509632110596,
0.499067097902298,
0.15791450440883636,
0.31714940071105957,
-0.2819819450378418,
-0.025607667863368988,
-0.25165942311286926,
0.20317494869232178,
-0.034842874854803085,
0.5519406795501709,
0.3784831762313843,
0.2551999092102051,
0.23638781905174255,
-0.01355666108429432,
-0.2735293507575989,
-0.22934724390506744,
-0.13904668390750885,
0.10469740629196167,
0.35633015632629395,
-0.16560101509094238,
-0.10469207912683487,
-0.03344428911805153,
-0.060381002724170685,
0.42534351348876953,
-0.040449224412441254,
-0.01590861938893795,
0.11209303140640259,
0.14981530606746674,
0.13534624874591827,
0.06848623603582382,
-0.19538924098014832,
-0.015723733231425285,
0.20456095039844513,
0.07571841776371002,
0.1717638373374939,
-0.2325243353843689,
0.21769285202026367,
0.5747403502464294,
0.3914262354373932,
0.2458033561706543,
0.27253830432891846,
0.10718398541212082,
0.3449462354183197,
-0.0029918253421783447,
-0.1375880241394043,
0.1985436975955963,
-0.006612834520637989,
-0.17981648445129395,
-0.21696911752223969,
0.32406917214393616,
0.05331961810588837,
-0.028835736215114594,
0.2950303256511688,
0.380126416683197,
-0.44186344742774963,
-0.05998361110687256,
0.06501885503530502,
-0.40600162744522095,
0.05772416293621063,
-0.21605633199214935,
-0.21438708901405334,
0.08489207178354263,
-0.030017461627721786,
-0.04241156578063965,
0.16036836802959442,
0.08496835082769394,
0.12430427968502045,
0.13741692900657654,
0.15345126390457153,
0.0862913578748703,
0.2262294739484787,
-0.1230446919798851,
0.2260163575410843,
-0.015378519892692566,
0.07539215683937073,
-0.5670802593231201,
-0.17401745915412903,
-0.027114827185869217,
-0.0003514941781759262,
-0.1932016760110855,
0.20024612545967102,
-0.19407038390636444,
0.09596752375364304,
0.1983015090227127,
-0.15979227423667908,
0.0894911140203476,
-0.16926366090774536,
0.4100298583507538,
-0.1874137967824936,
-0.028561800718307495,
0.05042869225144386,
0.4167965054512024,
0.43559378385543823,
-0.34749531745910645,
0.06608283519744873,
-0.13345524668693542,
-0.009237106889486313,
0.40531137585639954,
-0.07009215652942657,
-0.0862431675195694,
-0.2403077632188797,
-0.16061809659004211,
0.14115457236766815,
-0.08415471017360687,
-0.028608035296201706,
0.09382450580596924,
0.15360011160373688,
-0.2205561250448227,
0.13548371195793152,
0.5547670722007751,
-0.25690653920173645,
0.4653145968914032,
0.5305712819099426,
-0.19316647946834564,
-0.14197395741939545,
0.40797966718673706,
0.1885657012462616,
-0.5202434659004211,
0.6899904012680054,
0.06749362498521805,
-0.19042354822158813,
-0.2995383143424988,
0.42379501461982727,
0.19420374929904938,
0.021233966574072838,
0.04594333469867706,
0.05507315695285797,
0.09889164566993713,
-0.09659004211425781,
0.08948421478271484,
0.09063435345888138,
-0.0860467255115509,
-0.0521744079887867,
-0.19645775854587555,
0.13919179141521454,
-0.7284788489341736,
0.12487618625164032,
-0.23124340176582336,
-0.3695221245288849,
-0.3456448018550873,
0.020657099783420563,
-0.1900031566619873,
-0.13871915638446808,
-0.022302784025669098,
0.036555804312229156,
0.015829090029001236,
-0.22005006670951843,
0.023032918572425842,
-0.06755292415618896,
0.23985661566257477,
0.18978767096996307,
0.47374263405799866,
-0.02601958066225052,
-0.3410230576992035,
0.16620276868343353,
0.09692975878715515,
0.35955891013145447,
-0.02185158059000969,
0.060838568955659866,
0.031137654557824135,
0.3090900480747223,
0.20282384753227234,
0.10553386062383652,
0.6015228629112244,
-0.013401426374912262,
-0.09214487671852112,
-0.370789110660553,
0.3012419044971466,
-0.1956477016210556,
-0.15947584807872772,
0.19067786633968353,
0.12317786365747452,
0.10674500465393066,
-0.15507103502750397,
0.06968097388744354,
-0.25852322578430176,
0.14120565354824066,
-0.09004714339971542,
0.5153776407241821,
0.29334181547164917,
0.28586506843566895,
-0.09918007254600525,
-0.14357665181159973,
-0.3841886818408966,
0.4304681122303009,
-0.07276242971420288,
-0.11527069658041,
-0.17510807514190674,
-0.0556306354701519,
0.2661163806915283,
0.11560719460248947,
-0.014645770192146301,
-0.010415182448923588,
0.0005028119776397943,
0.06097738444805145,
-0.16660426557064056,
0.12799620628356934,
-0.08953367918729782,
-0.07387794554233551,
-0.43829450011253357,
0.0800396278500557,
0.37475109100341797,
-0.04013273864984512,
-0.12455373257398605,
-0.21252909302711487,
-0.4079282283782959,
0.32290664315223694,
0.05293167382478714,
-0.10054457187652588,
-0.06485261023044586,
0.1777110993862152,
0.05447395518422127,
0.29892396926879883,
-0.5815802216529846,
-0.18610352277755737,
0.16278651356697083,
-0.12889280915260315,
-0.08014785498380661,
0.2587033212184906,
0.28083357214927673,
-0.36224547028541565,
0.058418307453393936,
0.27108579874038696,
0.37398749589920044,
-0.08818387985229492,
0.06022012606263161,
-0.2685890197753906
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Therefore, when I try to concatenate larger datasets (5x 35GB data sets) I also get an out of memory error, since over 90GB of swap space was used at the time of the crash:
```
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-6-9766d77530b9> in <module>
20 print(file_name)
21 cv_batch = load_from_disk(file_name)
---> 22 cv_sampled_train = concatenate_datasets([cv_sampled_train, cv_batch])
23
24 print("Saving to disk!")
C:\ProgramData\Anaconda3\lib\site-packages\datasets\arrow_dataset.py in concatenate_datasets(dsets, info, split, axis)
2891
2892 # Concatenate tables
-> 2893 table = concat_tables([dset._data for dset in dsets if len(dset._data) > 0], axis=axis)
2894 table = update_metadata_with_features(table, None)
2895
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in concat_tables(tables, axis)
837 if len(tables) == 1:
838 return tables[0]
--> 839 return ConcatenationTable.from_tables(tables, axis=axis)
840
841
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in from_tables(cls, tables, axis)
697 return result
698
--> 699 blocks = to_blocks(tables[0])
700 for table in tables[1:]:
701 table_blocks = to_blocks(table)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in to_blocks(table)
669 return [[InMemoryTable(table)]]
670 elif isinstance(table, ConcatenationTable):
--> 671 return copy.deepcopy(table.blocks)
672 else:
673 return [[table]]
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
151 copier = getattr(x, "__deepcopy__", None)
152 if copier is not None:
--> 153 y = copier(memo)
154 else:
155 reductor = dispatch_table.get(cls)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in __deepcopy__(self, memo)
143 # by adding it to the memo, self.table won't be copied
144 memo[id(self.table)] = self.table
--> 145 return _deepcopy(self, memo)
146
147 def __getstate__(self):
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in _deepcopy(x, memo)
62 memo[id(x)] = result
63 for k, v in x.__dict__.items():
---> 64 setattr(result, k, copy.deepcopy(v, memo))
65 return result
66
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
159 reductor = getattr(x, "__reduce_ex__", None)
160 if reductor is not None:
--> 161 rv = reductor(4)
162 else:
163 reductor = getattr(x, "__reduce__", None)
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.__reduce_ex__()
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.to_pybytes()
MemoryError:
``` | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 1,031 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Therefore, when I try to concatenate larger datasets (5x 35GB data sets) I also get an out of memory error, since over 90GB of swap space was used at the time of the crash:
```
---------------------------------------------------------------------------
MemoryError Traceback (most recent call last)
<ipython-input-6-9766d77530b9> in <module>
20 print(file_name)
21 cv_batch = load_from_disk(file_name)
---> 22 cv_sampled_train = concatenate_datasets([cv_sampled_train, cv_batch])
23
24 print("Saving to disk!")
C:\ProgramData\Anaconda3\lib\site-packages\datasets\arrow_dataset.py in concatenate_datasets(dsets, info, split, axis)
2891
2892 # Concatenate tables
-> 2893 table = concat_tables([dset._data for dset in dsets if len(dset._data) > 0], axis=axis)
2894 table = update_metadata_with_features(table, None)
2895
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in concat_tables(tables, axis)
837 if len(tables) == 1:
838 return tables[0]
--> 839 return ConcatenationTable.from_tables(tables, axis=axis)
840
841
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in from_tables(cls, tables, axis)
697 return result
698
--> 699 blocks = to_blocks(tables[0])
700 for table in tables[1:]:
701 table_blocks = to_blocks(table)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in to_blocks(table)
669 return [[InMemoryTable(table)]]
670 elif isinstance(table, ConcatenationTable):
--> 671 return copy.deepcopy(table.blocks)
672 else:
673 return [[table]]
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
151 copier = getattr(x, "__deepcopy__", None)
152 if copier is not None:
--> 153 y = copier(memo)
154 else:
155 reductor = dispatch_table.get(cls)
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in __deepcopy__(self, memo)
143 # by adding it to the memo, self.table won't be copied
144 memo[id(self.table)] = self.table
--> 145 return _deepcopy(self, memo)
146
147 def __getstate__(self):
C:\ProgramData\Anaconda3\lib\site-packages\datasets\table.py in _deepcopy(x, memo)
62 memo[id(x)] = result
63 for k, v in x.__dict__.items():
---> 64 setattr(result, k, copy.deepcopy(v, memo))
65 return result
66
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
173
174 # If is its own copy, don't memoize.
C:\ProgramData\Anaconda3\lib\copy.py in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
262 if deep and args:
263 args = (deepcopy(arg, memo) for arg in args)
--> 264 y = func(*args)
265 if deep:
266 memo[id(x)] = y
C:\ProgramData\Anaconda3\lib\copy.py in <genexpr>(.0)
261 deep = memo is not None
262 if deep and args:
--> 263 args = (deepcopy(arg, memo) for arg in args)
264 y = func(*args)
265 if deep:
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_tuple(x, memo, deepcopy)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in <listcomp>(.0)
208
209 def _deepcopy_tuple(x, memo, deepcopy=deepcopy):
--> 210 y = [deepcopy(a, memo) for a in x]
211 # We're not going to put the tuple in the memo, but it's still important we
212 # check for it, in case the tuple contains recursive mutable structures.
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
C:\ProgramData\Anaconda3\lib\copy.py in _deepcopy_list(x, memo, deepcopy)
203 append = y.append
204 for a in x:
--> 205 append(deepcopy(a, memo))
206 return y
207 d[list] = _deepcopy_list
C:\ProgramData\Anaconda3\lib\copy.py in deepcopy(x, memo, _nil)
159 reductor = getattr(x, "__reduce_ex__", None)
160 if reductor is not None:
--> 161 rv = reductor(4)
162 else:
163 reductor = getattr(x, "__reduce__", None)
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.__reduce_ex__()
C:\ProgramData\Anaconda3\lib\site-packages\pyarrow\io.pxi in pyarrow.lib.Buffer.to_pybytes()
MemoryError:
``` | [
-0.20849721133708954,
-0.1142902597784996,
0.04847157374024391,
0.43464475870132446,
0.19932998716831207,
0.17065325379371643,
-0.13739632070064545,
0.2591966390609741,
-0.16948160529136658,
0.042984627187252045,
0.026932647451758385,
0.21090881526470184,
0.005909491330385208,
-0.22838641703128815,
-0.12171649932861328,
0.1358807384967804,
0.2059147208929062,
0.04836266487836838,
-0.2932787239551544,
-0.02782241627573967,
-0.25485485792160034,
0.2438369244337082,
-0.34562408924102783,
-0.33218222856521606,
-0.36170536279678345,
0.26839980483055115,
-0.288836270570755,
0.4278263449668884,
0.053954511880874634,
0.06454852223396301,
0.3253514766693115,
-0.03450825437903404,
0.03232918679714203,
0.47216540575027466,
-0.00011296021693851799,
-0.024859432131052017,
0.19407838582992554,
-0.1648728996515274,
-0.3701837658882141,
0.07900703698396683,
-0.2577253580093384,
-0.4280102550983429,
-0.10000789910554886,
0.04405411332845688,
0.4190390408039093,
0.0337177999317646,
-0.11390689015388489,
-0.72142493724823,
0.031101815402507782,
0.10154969990253448,
0.20131467282772064,
0.04504621773958206,
0.31145861744880676,
-0.1664167046546936,
-0.039620861411094666,
0.036701351404190063,
-0.11912953853607178,
0.3378039002418518,
0.1667078733444214,
-0.25024762749671936,
0.08140689879655838,
0.037224531173706055,
-0.2164463847875595,
-0.19252841174602509,
0.061797015368938446,
0.2860528230667114,
-0.2610831558704376,
-0.403914213180542,
0.024543212726712227,
0.029022304341197014,
0.2679312229156494,
-0.4100954830646515,
-0.042093425989151,
-0.44097620248794556,
0.03662312775850296,
-0.17524325847625732,
0.2727939784526825,
0.40277519822120667,
-0.2462698370218277,
0.2937924861907959,
-0.08945978432893753,
0.06416898220777512,
0.041641682386398315,
0.01720568910241127,
-0.21329712867736816,
0.12534219026565552,
-0.08915464580059052,
0.08147560060024261,
0.410266250371933,
-0.00021712854504585266,
0.2920985221862793,
-0.3168373107910156,
-0.3524681627750397,
0.03775130212306976,
-0.5595111846923828,
-0.049827080219984055,
0.07558365911245346,
-0.45899853110313416,
0.22166234254837036,
0.10622943192720413,
0.11994075030088425,
0.018350381404161453,
0.21212661266326904,
-0.018755435943603516,
0.3851090371608734,
0.24618501961231232,
-0.06897357851266861,
0.40018483996391296,
0.053802624344825745,
-0.1622486263513565,
0.30262404680252075,
0.08243437111377716,
-0.029857903718948364,
-0.2151598483324051,
0.21674074232578278,
-0.2746644914150238,
0.25626957416534424,
-0.07931072264909744,
-0.4918820559978485,
0.20324090123176575,
-0.16622132062911987,
0.12216654419898987,
-0.032887428998947144,
0.18497954308986664,
0.031382523477077484,
0.5110001564025879,
0.17331387102603912,
0.12081433832645416,
-0.06081070750951767,
0.13801658153533936,
-0.17531456053256989,
-0.10138106346130371,
-0.21311472356319427,
0.3016292452812195,
0.2818204164505005,
-0.04651351645588875,
0.030395394191145897,
0.2547302842140198,
0.10152336955070496,
-0.22910353541374207,
0.0861583724617958,
-0.34145617485046387,
0.07327962666749954,
0.15295375883579254,
0.030075129121541977,
0.3761551082134247,
0.12555450201034546,
-0.08553218841552734,
-0.04479982331395149,
0.32579776644706726,
-0.31253594160079956,
-0.1928354799747467,
-0.2904737591743469,
0.1899365335702896,
0.08485119044780731,
0.11710944026708603,
-0.2278674840927124,
0.28892993927001953,
0.3921436667442322,
0.22761482000350952,
-0.02460961788892746,
-0.01609012484550476,
0.13026294112205505,
-0.3428184688091278,
0.32784655690193176,
0.45639610290527344,
-0.16434673964977264,
0.244218111038208,
0.15939539670944214,
0.20099899172782898,
0.5149561762809753,
0.3146005868911743,
-0.07872188091278076,
0.08989454060792923,
-0.4410287141799927,
-0.0834655910730362,
0.1891031563282013,
-0.14371943473815918,
-0.2636670172214508,
0.23893091082572937,
-0.25073400139808655,
0.35534340143203735,
-0.07724880427122116,
0.17551648616790771,
-0.09118545800447464,
0.15443533658981323,
0.7130599021911621,
0.409385085105896,
0.031751636415719986,
0.15629342198371887,
-0.35485464334487915,
-0.0897676944732666,
0.13460376858711243,
-0.031574796885252,
-0.09209296107292175,
0.2037222683429718,
-0.032673679292201996,
0.10113642364740372,
0.46647655963897705,
-0.10771112143993378,
0.15378312766551971,
0.43108803033828735,
0.05362216383218765,
-0.07148326933383942,
-0.20645807683467865,
0.07480205595493317,
-0.5007078051567078,
0.04438767582178116,
0.05699296295642853,
-0.2531942129135132,
-0.020496472716331482,
-0.025782860815525055,
-0.0208265520632267,
-0.02698977291584015,
0.004129171371459961,
0.0003343820571899414,
0.05078205466270447,
0.22453673183918,
-0.11111639440059662,
-0.05244738236069679,
-0.024155929684638977,
0.836805522441864,
-0.12545299530029297,
0.050705261528491974,
-0.41944968700408936,
0.1712571680545807,
-0.02886751852929592,
-0.23000386357307434,
-0.06602838635444641,
0.05232187360525131,
0.11581292003393173,
0.018808022141456604,
-0.10964369028806686,
0.5126364231109619,
-0.19747525453567505,
-0.05263201892375946,
-0.20703724026679993,
-0.2552229166030884,
0.016573583707213402,
-0.03630155324935913,
0.018874235451221466,
-0.25508302450180054,
0.09815662354230881,
-0.14783871173858643,
-0.015578314661979675,
0.3320586085319519,
-0.01441749557852745,
0.03402183949947357,
0.013164162635803223,
-0.09845899790525436,
-0.06943289935588837,
-0.1997835338115692,
0.11871207505464554,
-0.18787863850593567,
0.14866887032985687,
0.2488635778427124,
0.22607089579105377,
0.22369149327278137,
-0.48408257961273193,
-0.08106086403131485,
0.21940039098262787,
0.0873403549194336,
0.2150365114212036,
0.11405818909406662,
-0.3331509232521057,
-0.1729365885257721,
-0.004380786791443825,
0.16191309690475464,
0.7703344225883484,
0.15868018567562103,
0.2190234363079071,
0.027602460235357285,
-0.06704835593700409,
-0.22157543897628784,
0.2817302644252777,
-0.02539389580488205,
0.07023410499095917,
0.24138399958610535,
0.24636498093605042,
-0.00409113522619009,
-0.20636427402496338,
0.1619839072227478,
0.12507018446922302,
0.0066979434341192245,
-0.29258090257644653,
0.10937974601984024,
-0.20981177687644958,
0.07155023515224457,
-0.34823405742645264,
-0.3516213595867157,
-0.01145733892917633,
-0.45321109890937805,
-0.3251948356628418,
0.39534956216812134,
-0.09056098759174347,
-0.14366216957569122,
0.055874843150377274,
0.25279372930526733,
-0.028083737939596176,
0.028318136930465698,
0.08681020140647888,
0.29927170276641846,
-0.30615735054016113,
0.040638770908117294,
0.07824964076280594,
-0.26331353187561035,
0.049067508429288864,
0.16174718737602234,
-0.14132456481456757,
0.0032181665301322937,
-0.0775126963853836,
-0.05897049605846405,
-0.06482881307601929,
0.0027319081127643585,
-0.1926749050617218,
0.1106751412153244,
0.023820661008358,
-0.3615093529224396,
0.009396014735102654,
0.4291675090789795,
0.07705435901880264,
0.40835076570510864,
0.26998957991600037,
-0.10561482608318329,
-0.37795916199684143,
-0.131879985332489,
-0.31046441197395325,
-0.3968416750431061,
0.08828333765268326,
-0.048518307507038116,
0.024703003466129303,
0.30515235662460327,
0.18848061561584473,
-0.06424407660961151,
0.027873409911990166,
0.08802930265665054,
-0.19258904457092285,
-0.216311514377594,
0.41861841082572937,
-0.05965913459658623,
-0.20624271035194397,
-0.11504994332790375,
0.14575475454330444,
-0.24629536271095276,
0.2110215276479721,
-0.4671838879585266,
0.11916623264551163,
-0.5144684910774231,
0.03616263344883919,
-0.2598978281021118,
0.09877128899097443,
0.020459771156311035,
0.07336102426052094,
-0.07519407570362091,
-0.08736176043748856,
-0.073214590549469,
-0.14533117413520813,
-0.029052086174488068,
0.3612686097621918,
-0.2521462142467499,
-0.07339899241924286,
0.2915200889110565,
-0.06963680684566498,
0.4133872091770172,
0.028963536024093628,
0.301845908164978,
0.1516513228416443,
0.5536736845970154,
-0.23861628770828247,
-0.4298308193683624,
-0.12286197394132614,
-0.15876328945159912,
-0.0061716604977846146,
-0.12097197771072388,
-0.035755790770053864,
-0.1237008199095726,
-0.10621730983257294,
0.22749027609825134,
0.17694678902626038,
-0.19577713310718536,
0.24411708116531372,
-0.2653462290763855,
-0.04773484170436859,
-0.05986116826534271,
0.007146194577217102,
-0.07045695185661316,
-0.033044856041669846,
-0.1874563843011856,
0.009714029729366302,
0.009243927896022797,
-0.12223053723573685,
-0.258372962474823,
0.048111528158187866,
-0.6078560948371887,
0.08130355179309845,
-0.17730918526649475,
0.5477052927017212,
0.17946405708789825,
-0.3359861373901367,
-0.09030576050281525,
0.011747028678655624,
0.7129831910133362,
0.38596272468566895,
-0.4184194803237915,
0.21370725333690643,
0.1342886984348297,
-0.5084594488143921,
-0.1242012083530426,
-0.10156950354576111,
0.2427200973033905,
0.1661405861377716,
0.23377233743667603,
-0.1978386491537094,
0.0345439575612545,
0.13941046595573425,
0.36543041467666626,
-0.14431363344192505,
-0.01902400515973568,
-0.23455744981765747,
-0.2062203288078308,
-0.18283361196517944,
-0.2722640931606293,
0.10259004682302475,
0.32599344849586487,
-0.20248496532440186,
-0.3330005705356598,
-0.02666260488331318,
-0.18271535634994507,
0.2898465394973755,
-0.1630955934524536,
0.4102860987186432,
-0.0018575387075543404,
0.36909836530685425,
-0.23020628094673157,
0.24872271716594696,
0.3287048041820526,
0.5444673299789429,
0.14455556869506836,
-0.18860435485839844,
0.27958980202674866,
0.007074558176100254,
0.3126010298728943,
0.20151019096374512,
-0.12839023768901825,
0.08427663147449493,
-0.26133042573928833,
0.180906742811203,
-0.5846993923187256,
0.17111803591251373,
0.06444542109966278,
0.08068866282701492,
-0.6066938638687134,
-0.19574850797653198,
0.27111804485321045,
0.16069580614566803,
-0.01317114382982254,
0.5433201193809509,
-0.44634807109832764,
-0.4786522388458252,
0.1642613559961319,
-0.151967853307724,
0.834719717502594,
0.02071119099855423,
0.2568380832672119,
0.004403581842780113,
-0.05972340703010559,
0.2216637134552002,
0.01060415804386139,
0.23191791772842407,
-0.18239693343639374,
-0.2544626295566559,
0.1474297195672989,
-0.2599654793739319,
0.08363589644432068,
-0.2718309760093689,
-0.4256107211112976,
0.10607057064771652,
-0.3712700605392456,
-0.022935036569833755,
-0.22236548364162445,
0.011398661881685257,
-0.29869693517684937,
-0.3575040102005005,
-0.07575066387653351,
0.1579182893037796,
0.24785216152668,
-0.0842900276184082,
0.0014608781784772873,
-0.013590708374977112,
-0.14673414826393127,
-0.13078191876411438,
-0.31075745820999146,
0.3131835162639618,
-0.15984252095222473,
0.4684116244316101,
-0.2722891867160797,
-0.1829644739627838,
-0.14384636282920837,
0.13201913237571716,
0.2478923797607422,
0.34072113037109375,
0.01696506142616272,
-0.09560376405715942,
-0.1326027810573578,
0.2782519459724426,
0.08081810176372528,
-0.22571659088134766,
0.05487508699297905,
0.334530234336853,
-0.12804600596427917,
0.10263217240571976,
-0.013870826922357082,
-0.26975953578948975,
-0.2939835786819458,
0.28561529517173767,
0.019791528582572937,
-0.2719835638999939,
-0.11729583144187927,
0.275182843208313,
0.21056969463825226,
-0.1763988584280014,
0.13462744653224945,
0.22181403636932373,
-0.1078089028596878,
0.22025221586227417,
-0.42332568764686584,
-0.38269397616386414,
-0.14133262634277344,
0.33220067620277405,
0.2150716781616211,
-0.04768683388829231,
0.2619221806526184,
0.00647350400686264,
0.03733038902282715,
-0.10442348569631577,
0.21947595477104187,
0.021449360996484756,
-0.1695188581943512,
0.22136636078357697,
-0.19483613967895508,
-0.09247855842113495,
0.033900316804647446,
0.20639818906784058,
0.119603231549263,
-0.08416811376810074,
-0.08303683996200562,
-0.15799181163311005,
-0.4656391441822052,
0.07769861072301865,
0.07476423680782318,
0.35205304622650146,
-0.03519948571920395,
0.04344625771045685,
-0.11974883824586868,
0.11853402853012085,
-0.2962000072002411,
-0.03178536146879196,
-0.23561373353004456,
0.17733056843280792,
-0.1427200436592102,
0.03336372971534729,
-0.007861805148422718,
-0.09611643850803375,
0.14033913612365723,
0.22206009924411774,
0.08752933889627457,
-0.20148718357086182,
0.08183956146240234,
0.08194249868392944,
0.057759445160627365,
-0.1826285421848297,
-0.24242471158504486,
-0.4744129776954651,
0.07615276426076889,
-0.35229071974754333,
0.27118995785713196,
0.284157931804657,
-0.04296664893627167,
-0.0853777527809143,
0.0960472971200943,
0.016684625297784805,
0.08942459523677826,
0.07665219902992249,
-0.09083519876003265,
0.05582226440310478,
-0.08281010389328003,
0.2883353531360626,
-0.01665564626455307,
-0.009445160627365112,
-0.5261987447738647,
0.13556809723377228,
0.04571632295846939,
0.05808211863040924,
0.08292786031961441,
-0.2150711864233017,
-0.2936802804470062,
-0.07602465897798538,
0.0833573043346405,
0.4004901051521301,
-0.19835638999938965,
-0.010634212754666805,
-0.048232853412628174,
0.18801705539226532,
0.20029427111148834,
-0.33945974707603455,
-0.1354779452085495,
-0.05413379520177841,
-0.07550054788589478,
0.19819943606853485,
0.15973782539367676,
-0.30771511793136597,
-0.2801881432533264,
-0.06576681137084961,
0.5569902062416077,
0.2812485694885254,
0.30758434534072876,
0.2442365437746048,
0.2052917629480362,
0.10281611233949661,
0.12334674596786499,
0.050233952701091766,
0.2296522855758667,
0.380337119102478,
-0.019246116280555725,
0.28514593839645386,
0.14783595502376556,
-0.06476224958896637,
-0.19679081439971924,
-0.45742616057395935,
0.2853142321109772,
0.4371397793292999,
-0.2440536916255951,
0.32754167914390564,
0.05151504650712013,
-0.05737607926130295,
-0.4356239140033722,
-0.23607176542282104,
-0.04575125873088837,
0.11972406506538391,
-0.321219265460968,
-0.09573692083358765,
0.2676938772201538,
-0.08585358411073685,
0.06298156082630157,
0.13514025509357452,
0.1661013960838318,
-0.3355979323387146,
0.4730646312236786,
0.013857681304216385,
-0.25005078315734863,
-0.15531276166439056,
0.22238358855247498,
0.5034976601600647,
0.011902347207069397,
-0.35623428225517273,
0.04518429562449455,
0.11322386562824249,
-0.05020900070667267,
-0.05447209253907204,
0.4576027989387512,
0.5256034135818481,
0.5564417839050293,
0.2286740243434906,
0.2088666558265686,
0.3797380030155182,
-0.05634642764925957,
-0.3019237220287323,
0.2601630687713623,
-0.01576138287782669,
-0.09375950694084167,
0.04457111656665802,
0.19945836067199707,
-0.13275466859340668,
0.0180625319480896,
0.41378945112228394,
0.169202983379364,
-0.3755025267601013,
0.0050656720995903015,
-0.05619201064109802,
-0.2994551360607147,
0.07193942368030548,
0.13824360072612762,
-0.29355135560035706,
0.01997271180152893,
0.4786643087863922,
-0.1998845636844635,
0.15440645813941956,
0.08711998909711838,
0.09025909751653671,
0.30713361501693726,
0.3065684735774994,
0.24134168028831482,
-0.07286029309034348,
-0.371364563703537,
-0.37876057624816895,
-0.20452328026294708,
0.2920798063278198,
0.0131601020693779,
0.2769448161125183,
-0.0518898069858551,
0.3205883204936981,
0.0929843932390213,
-0.015890106558799744,
-0.15679360926151276,
0.24703161418437958,
-0.12676800787448883,
0.02058643102645874,
-0.5303438901901245,
-0.17066927254199982,
0.2856861352920532,
-0.035044945776462555,
-0.019806070253252983,
-0.4125315546989441,
0.413952499628067,
0.0030133379623293877,
0.08851893991231918,
-0.14320769906044006,
0.21610674262046814,
0.17103157937526703,
0.26636749505996704,
0.4304054081439972,
0.24829228222370148,
0.17416487634181976,
-0.1628275215625763,
-0.30970677733421326,
-0.29746800661087036,
-0.377763032913208,
0.07839848101139069,
-0.19546321034431458,
0.023446794599294662,
0.07844410091638565,
-0.3780975341796875,
0.014894578605890274,
-0.10691450536251068,
0.03859134763479233,
0.2003045380115509,
0.11801527440547943,
-0.12201293557882309,
0.04055636376142502,
0.030543074011802673,
0.14060433208942413,
0.1762433499097824,
0.38736867904663086,
-0.0808449536561966,
0.32793036103248596,
-0.07699811458587646,
-0.297679603099823,
-0.005227521061897278,
0.08828436583280563,
-0.2614128887653351,
-0.20033466815948486,
0.2056049406528473,
-0.07158616930246353,
0.12352866679430008,
-0.5712338089942932,
-0.1176658645272255,
0.3252486288547516,
-0.13343167304992676,
-0.4380505084991455,
0.47996747493743896,
-0.1831928789615631,
-0.09030287712812424,
-0.013281526044011116,
0.46177104115486145,
0.03765666112303734,
-0.42319926619529724,
0.3124881684780121,
-0.17702820897102356
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Hi ! this looks like an important issue. Let me try to reproduce this.
Cc @samsontmr this might be related to the memory issue you have in #2134 | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 28 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Hi ! this looks like an important issue. Let me try to reproduce this.
Cc @samsontmr this might be related to the memory issue you have in #2134 | [
-0.16557887196540833,
0.008643805980682373,
0.02508576214313507,
0.3855164647102356,
0.21441689133644104,
0.1329604685306549,
0.00009705871343612671,
0.23910754919052124,
-0.238740935921669,
0.043520569801330566,
0.1007450670003891,
0.18490931391716003,
0.13490571081638336,
-0.19638949632644653,
-0.1764700710773468,
0.25293463468551636,
0.20750102400779724,
0.1770738959312439,
-0.3354969024658203,
-0.05264008417725563,
-0.26287657022476196,
0.23212356865406036,
-0.30494216084480286,
-0.4224446415901184,
-0.4580211341381073,
0.26138147711753845,
-0.35651618242263794,
0.3417988419532776,
0.07433933019638062,
-0.02790519967675209,
0.3124290704727173,
0.08805297315120697,
0.02671867609024048,
0.4711243510246277,
-0.00010923214722424746,
-0.07902669906616211,
0.22318293154239655,
-0.17316223680973053,
-0.3741956949234009,
-0.0006450563669204712,
-0.20664793252944946,
-0.4626253545284271,
0.02483517862856388,
-0.04484381154179573,
0.32224181294441223,
0.022369228303432465,
-0.13365870714187622,
-0.5861003994941711,
0.0342048704624176,
-0.04284060373902321,
0.2663332223892212,
-0.04704451933503151,
0.13712865114212036,
-0.07612735033035278,
-0.06762529164552689,
0.15550845861434937,
-0.03150245547294617,
0.19392654299736023,
0.07484357059001923,
-0.058182165026664734,
0.14015060663223267,
0.14680899679660797,
-0.2224319875240326,
-0.05787547305226326,
0.07612244039773941,
0.382308691740036,
-0.15561634302139282,
-0.39127662777900696,
0.1003551334142685,
0.013922233134508133,
0.3194791078567505,
-0.3667292296886444,
-0.10347724705934525,
-0.3596839904785156,
0.0806933045387268,
-0.17927286028862,
0.27234211564064026,
0.4094536602497101,
-0.1917516440153122,
0.1821499913930893,
-0.09553958475589752,
0.006245490163564682,
-0.0361388623714447,
-0.032124683260917664,
-0.18078359961509705,
0.11439049243927002,
-0.13811779022216797,
0.05917607992887497,
0.28967711329460144,
0.007140699774026871,
0.22536353766918182,
-0.46838608384132385,
-0.29911279678344727,
0.10136295109987259,
-0.4785364270210266,
-0.006248101592063904,
-0.003464438021183014,
-0.39385175704956055,
0.12061808258295059,
0.1632407009601593,
0.07006147503852844,
0.02218451350927353,
0.23315125703811646,
0.02342803031206131,
0.33304932713508606,
0.19190044701099396,
-0.06011310964822769,
0.35336920619010925,
0.14680032432079315,
-0.1694047749042511,
0.17719048261642456,
0.022612007334828377,
-0.12768183648586273,
-0.2536405622959137,
0.23784030973911285,
-0.28684645891189575,
0.2203759402036667,
-0.14186307787895203,
-0.49767690896987915,
0.12401188910007477,
-0.11109166592359543,
0.06743982434272766,
-0.02263990044593811,
0.23134392499923706,
-0.030214805155992508,
0.46876296401023865,
0.22550921142101288,
0.24076087772846222,
-0.05695893615484238,
0.19360437989234924,
-0.18899261951446533,
-0.1315048187971115,
-0.13241831958293915,
0.2119246870279312,
0.2942710816860199,
-0.21707908809185028,
-0.0015043141320347786,
0.3486471176147461,
0.06588542461395264,
-0.15802541375160217,
0.09303898364305496,
-0.3391187787055969,
0.1912355273962021,
0.15249620378017426,
0.15355101227760315,
0.3738386034965515,
0.08812013268470764,
-0.14776216447353363,
-0.05775894969701767,
0.42098143696784973,
-0.21029114723205566,
-0.1051318347454071,
-0.25995808839797974,
0.2226828634738922,
0.07640712708234787,
0.15254223346710205,
-0.14441481232643127,
0.2782830595970154,
0.3907814919948578,
0.29387253522872925,
-0.13493016362190247,
0.0010444074869155884,
-0.04425648972392082,
-0.4204099774360657,
0.4669271409511566,
0.40334659814834595,
-0.1331075131893158,
0.2231314480304718,
0.09506457298994064,
0.2323826104402542,
0.5047420859336853,
0.35425710678100586,
-0.059123966842889786,
0.013012632727622986,
-0.3014683127403259,
0.053579241037368774,
0.16595427691936493,
-0.1710008680820465,
-0.19546958804130554,
0.2662735879421234,
-0.24164041876792908,
0.3232174217700958,
-0.022368162870407104,
0.13089735805988312,
-0.040677107870578766,
0.115315280854702,
0.567835807800293,
0.4280861020088196,
0.12037764489650726,
0.10593477636575699,
-0.36615121364593506,
-0.12435132265090942,
0.14309871196746826,
-0.14858302474021912,
-0.22233907878398895,
0.23673015832901,
-0.07458827644586563,
-0.11668823659420013,
0.4902274012565613,
-0.13830964267253876,
0.22937335073947906,
0.3590710163116455,
0.2224220335483551,
-0.08959448337554932,
-0.2062205970287323,
0.1898646354675293,
-0.4102155566215515,
0.0116715207695961,
0.16626352071762085,
-0.23983648419380188,
-0.07836790382862091,
-0.09487765282392502,
0.09682798385620117,
0.036040835082530975,
-0.02884707972407341,
-0.011943083256483078,
0.07891488075256348,
0.2847229838371277,
-0.022263428196310997,
-0.06590371578931808,
0.03686695918440819,
0.8320499658584595,
-0.09929084777832031,
-0.037310387939214706,
-0.266758531332016,
0.1807723343372345,
-0.00378609262406826,
-0.2975316345691681,
-0.02347836270928383,
0.10256250947713852,
0.23816660046577454,
0.058373019099235535,
-0.07103309035301208,
0.47483953833580017,
-0.293693870306015,
-0.06264640390872955,
-0.14576312899589539,
-0.2413434237241745,
-0.02730238251388073,
0.09798136353492737,
0.07349503040313721,
-0.14722561836242676,
0.19924089312553406,
-0.19144052267074585,
0.0033337660133838654,
0.3507957458496094,
0.10014587640762329,
0.130598247051239,
0.019008196890354156,
-0.10956738889217377,
0.05227296054363251,
-0.19299139082431793,
0.11656082421541214,
-0.21929073333740234,
0.19022133946418762,
0.23701943457126617,
0.18974916636943817,
0.2867831289768219,
-0.47390875220298767,
0.08532170951366425,
0.2243828922510147,
0.0859738141298294,
0.13458821177482605,
0.15282511711120605,
-0.3762897253036499,
-0.16478124260902405,
-0.11829511821269989,
0.20076672732830048,
0.7927390336990356,
0.18229317665100098,
0.18868820369243622,
-0.046179287135601044,
-0.01952921599149704,
-0.23759832978248596,
0.3301810324192047,
-0.059675902128219604,
0.04931844770908356,
0.2444155514240265,
0.26385748386383057,
-0.0619979090988636,
-0.10879316180944443,
0.2657487690448761,
0.09175200760364532,
-0.07222305983304977,
-0.2444092333316803,
0.034916117787361145,
-0.22310376167297363,
0.13634991645812988,
-0.31805339455604553,
-0.2835674285888672,
-0.010435834527015686,
-0.33554139733314514,
-0.3896484971046448,
0.4484144151210785,
-0.05300810560584068,
-0.175114706158638,
0.02524907886981964,
0.27327683568000793,
-0.07593857496976852,
0.01656201295554638,
-0.037109144032001495,
0.25513386726379395,
-0.4038930833339691,
0.051538947969675064,
0.06347997486591339,
-0.24361366033554077,
0.07195056974887848,
0.12816913425922394,
-0.034850798547267914,
-0.018050091341137886,
-0.056841686367988586,
-0.13703317940235138,
-0.08141421526670456,
0.10276704281568527,
-0.2358756959438324,
0.1462717056274414,
0.023874178528785706,
-0.38084590435028076,
0.05964188650250435,
0.3619403839111328,
0.04928130656480789,
0.357019305229187,
0.31174588203430176,
-0.2407875508069992,
-0.3567047417163849,
-0.10981065779924393,
-0.31156685948371887,
-0.3086031675338745,
0.08004342764616013,
0.01584245264530182,
0.10943131148815155,
0.1882321983575821,
0.08796610683202744,
-0.10808531939983368,
0.11198054254055023,
0.13338321447372437,
-0.22193525731563568,
-0.28041499853134155,
0.5735886096954346,
-0.13097023963928223,
-0.3618883788585663,
-0.03703632205724716,
0.05124484747648239,
-0.1881374716758728,
0.192948579788208,
-0.505926251411438,
0.14537398517131805,
-0.4991859793663025,
0.053319793194532394,
-0.2712646424770355,
0.11517765372991562,
-0.05313970148563385,
0.11628740280866623,
-0.10497325658798218,
-0.19248345494270325,
-0.14705030620098114,
0.02494083344936371,
0.04446084797382355,
0.25947263836860657,
-0.20777398347854614,
-0.10479659587144852,
0.15875159204006195,
-0.10504166781902313,
0.5049678087234497,
-0.05088936164975166,
0.3199084401130676,
0.22157248854637146,
0.45984482765197754,
-0.2015453577041626,
-0.43548712134361267,
-0.19954222440719604,
-0.2189505696296692,
0.07601682096719742,
0.0926733911037445,
0.08421516418457031,
-0.10303018987178802,
-0.08827454596757889,
0.18866299092769623,
0.10098922997713089,
-0.25923219323158264,
0.19577370584011078,
-0.1638154685497284,
0.02253067120909691,
-0.02800953947007656,
-0.06473428010940552,
-0.14122097194194794,
-0.08148202300071716,
-0.25222864747047424,
0.006988443434238434,
0.032602451741695404,
-0.09009554237127304,
-0.2615721523761749,
0.002269468503072858,
-0.6186498403549194,
0.15153314173221588,
-0.08370378613471985,
0.439443975687027,
0.10575450956821442,
-0.34082791209220886,
0.07171016186475754,
-0.051202863454818726,
0.7416382431983948,
0.3063713014125824,
-0.46229398250579834,
0.21427375078201294,
0.11285187304019928,
-0.4659014940261841,
-0.09007960557937622,
-0.04429532587528229,
0.18610988557338715,
0.17537665367126465,
0.1690661907196045,
-0.2508677840232849,
-0.05876991152763367,
0.06206019967794418,
0.3879023492336273,
-0.16289713978767395,
-0.09298469871282578,
-0.33869820833206177,
-0.2011757493019104,
-0.1498248428106308,
-0.3379557728767395,
0.05043572187423706,
0.4113534390926361,
-0.2342183142900467,
-0.2840868830680847,
-0.026943909004330635,
-0.16166788339614868,
0.27196750044822693,
-0.23627814650535583,
0.5309252142906189,
0.09175670146942139,
0.4036062955856323,
-0.08579683303833008,
0.254971981048584,
0.28402480483055115,
0.5802759528160095,
0.08431802690029144,
-0.05519552528858185,
0.2512029707431793,
-0.20156699419021606,
0.3931276202201843,
0.2361794412136078,
-0.16461226344108582,
0.2078147828578949,
-0.3127155005931854,
0.15111973881721497,
-0.6362517476081848,
0.13673007488250732,
0.1120365634560585,
0.12048070877790451,
-0.6141210198402405,
-0.2566089928150177,
0.2589709460735321,
0.08192144334316254,
-0.036166977137327194,
0.5582146644592285,
-0.5020986795425415,
-0.39508914947509766,
0.07775549590587616,
-0.1777595579624176,
0.8481454253196716,
0.06990668177604675,
0.25655946135520935,
0.0027996376156806946,
-0.20093384385108948,
0.15849606692790985,
0.10399487614631653,
0.27973467111587524,
-0.17510706186294556,
-0.18144704401493073,
0.152235746383667,
-0.2464659959077835,
0.06903817504644394,
-0.12205557525157928,
-0.4632975459098816,
0.009100313298404217,
-0.5243905782699585,
-0.02170269563794136,
-0.1231713593006134,
0.10322591662406921,
-0.21209821105003357,
-0.30286598205566406,
-0.03586656227707863,
0.20508570969104767,
0.3308334946632385,
-0.008445311337709427,
0.026814959943294525,
-0.01753869280219078,
-0.23354555666446686,
-0.1823996901512146,
-0.19975382089614868,
0.3178454041481018,
-0.17438778281211853,
0.4426387548446655,
-0.2106560915708542,
-0.3191390633583069,
-0.10324044525623322,
0.09579327702522278,
0.31532543897628784,
0.23779624700546265,
-0.00954349897801876,
-0.09682595729827881,
-0.08564218133687973,
0.3278057873249054,
0.08985153585672379,
-0.26954159140586853,
0.0056700631976127625,
0.23729348182678223,
-0.11890176683664322,
-0.0290072038769722,
-0.013060705736279488,
-0.19515223801136017,
-0.30668342113494873,
0.2422955483198166,
0.0326615534722805,
-0.3036010265350342,
-0.08496598899364471,
0.3106268048286438,
0.2804535925388336,
-0.15171939134597778,
0.18585099279880524,
0.24367479979991913,
-0.1264244019985199,
0.26944851875305176,
-0.34729090332984924,
-0.3536492586135864,
-0.14725852012634277,
0.3546774387359619,
0.3105776011943817,
-0.02070128358900547,
0.37950626015663147,
-0.02593189664185047,
-0.04615283012390137,
-0.13927173614501953,
0.1437414586544037,
-0.04922156780958176,
-0.1437404602766037,
0.2533929646015167,
-0.07236086577177048,
-0.024576552212238312,
-0.07363361865282059,
0.26423338055610657,
-0.010750360786914825,
-0.05223735421895981,
-0.04994318261742592,
-0.23277276754379272,
-0.3944983184337616,
-0.08812388777732849,
0.02239360846579075,
0.27428752183914185,
-0.025922998785972595,
0.036814846098423004,
-0.09611842036247253,
0.22368687391281128,
-0.35117578506469727,
-0.12621138989925385,
-0.18753792345523834,
0.2015400528907776,
-0.08926641196012497,
-0.0035380609333515167,
0.14606589078903198,
0.03388465195894241,
0.19572676718235016,
0.17090384662151337,
0.0599290207028389,
-0.24952825903892517,
0.035263389348983765,
0.08643987029790878,
-0.04654262959957123,
-0.2119363397359848,
-0.20394231379032135,
-0.39574605226516724,
0.018514331430196762,
-0.3560478687286377,
0.21938566863536835,
0.22032544016838074,
-0.052705682814121246,
-0.13233624398708344,
-0.06834733486175537,
0.05475061759352684,
0.05088983476161957,
0.030692405998706818,
-0.15574535727500916,
0.005094543099403381,
-0.04306890442967415,
0.18746039271354675,
-0.04397217184305191,
-0.01799492910504341,
-0.49974682927131653,
0.030665457248687744,
0.08774236589670181,
-0.020782839506864548,
-0.02018929272890091,
-0.1921585351228714,
-0.23835544288158417,
-0.12088756263256073,
0.1314786672592163,
0.35398852825164795,
-0.2005268782377243,
0.009616553783416748,
-0.002639974467456341,
0.24718385934829712,
0.09001832455396652,
-0.29267963767051697,
-0.2121765911579132,
-0.14381913840770721,
-0.16704973578453064,
0.173381507396698,
0.16121168434619904,
-0.28517797589302063,
-0.2628607749938965,
-0.06747166067361832,
0.5141934156417847,
0.15376673638820648,
0.2914770841598511,
0.1864931881427765,
0.2115909308195114,
0.15948344767093658,
0.07997231930494308,
0.14508850872516632,
0.07476966083049774,
0.2733059823513031,
-0.07315578311681747,
0.26838743686676025,
0.23692834377288818,
-0.16386374831199646,
-0.18920248746871948,
-0.4537920355796814,
0.2869056761264801,
0.4056820273399353,
-0.13358771800994873,
0.20386460423469543,
-0.045283243060112,
0.06165486201643944,
-0.3951907455921173,
-0.28490492701530457,
-0.10143941640853882,
0.1666637510061264,
-0.30340346693992615,
-0.14545345306396484,
0.183005690574646,
-0.08249419927597046,
0.0329313725233078,
0.11803390085697174,
0.19213256239891052,
-0.2573127746582031,
0.432169109582901,
0.14111223816871643,
-0.12751370668411255,
-0.2316102832555771,
0.2931308448314667,
0.3955433666706085,
0.05706139653921127,
-0.3257535398006439,
0.06506095081567764,
0.09200549870729446,
0.07391132414340973,
0.05201356112957001,
0.36365216970443726,
0.5503243207931519,
0.657899022102356,
0.22990301251411438,
0.10520244389772415,
0.29513484239578247,
-0.06387893855571747,
-0.2650018036365509,
0.2549949288368225,
-0.061702147126197815,
-0.09898637235164642,
0.11752189695835114,
0.21432100236415863,
-0.17100149393081665,
0.0013893283903598785,
0.36234423518180847,
0.15244050323963165,
-0.382571280002594,
0.1151849552989006,
-0.02615482732653618,
-0.27081361413002014,
0.06417436897754669,
0.0035994872450828552,
-0.28953197598457336,
-0.053174570202827454,
0.5402075052261353,
-0.2178839147090912,
0.14111584424972534,
0.023485157638788223,
0.11048418283462524,
0.16624386608600616,
0.30595657229423523,
0.09391634166240692,
-0.02847781777381897,
-0.4043639004230499,
-0.3820245862007141,
-0.25016337633132935,
0.2439369559288025,
0.07392977178096771,
0.2556680142879486,
-0.12452267110347748,
0.33128491044044495,
-0.030609287321567535,
-0.09760141372680664,
-0.12646064162254333,
0.1275252252817154,
-0.14152702689170837,
-0.0024956874549388885,
-0.5370718836784363,
-0.023101676255464554,
0.20883917808532715,
0.011436515487730503,
-0.0010785125195980072,
-0.34913378953933716,
0.3652958869934082,
-0.10669947415590286,
0.16086700558662415,
-0.13461022078990936,
0.22733551263809204,
0.1830497831106186,
0.37930911779403687,
0.40422576665878296,
0.2506742775440216,
0.24334770441055298,
-0.2374553382396698,
-0.24725188314914703,
-0.22800534963607788,
-0.27999770641326904,
-0.009912396781146526,
-0.12663236260414124,
0.01262814924120903,
0.08221399784088135,
-0.3894752562046051,
0.0802965834736824,
-0.1074458584189415,
0.04381034895777702,
0.17851285636425018,
0.16143454611301422,
-0.0175018310546875,
0.07400215417146683,
0.048342280089855194,
0.16933497786521912,
0.213631734251976,
0.24843376874923706,
-0.06003923714160919,
0.28753745555877686,
-0.1768733263015747,
-0.32189998030662537,
0.15248766541481018,
0.006373721174895763,
-0.2955346703529358,
-0.14899232983589172,
0.31207704544067383,
-0.06804604083299637,
0.1580917239189148,
-0.6385347843170166,
-0.14865310490131378,
0.3362165689468384,
-0.12422787398099899,
-0.45521411299705505,
0.4964093565940857,
-0.15919841825962067,
-0.11647094786167145,
-0.02375168912112713,
0.37375378608703613,
0.05525531619787216,
-0.4150146543979645,
0.22946608066558838,
-0.2355409413576126
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | @lhoestq Just went to open a similar issue.
It seems like deep copying (tested on master) the dataset object writes the table's record batches (`dset._data._batches`) into RAM.
To find the bug, I modified the `_deepcopy` function in `table.py` as follows:
```python
def _deepcopy(x, memo: dict):
"""deepcopy a regular class instance"""
import psutil # pip install this package
import time
cls = x.__class__
result = cls.__new__(cls)
memo[id(x)] = result
for k, v in x.__dict__.items():
print("="* 50)
print("Current memory:", psutil.virtual_memory().percent)
print(f"Saving object {k} with value {v}")
setattr(result, k, copy.deepcopy(v, memo))
time.sleep(5)
print("Memory after copy:", psutil.virtual_memory().percent)
return result
```
Test script:
```python
import copy
from datasets import load_dataset
bk = load_dataset("bookcorpus", split="train")
bk_copy = copy.deepcopy(bk)
``` | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 113 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
@lhoestq Just went to open a similar issue.
It seems like deep copying (tested on master) the dataset object writes the table's record batches (`dset._data._batches`) into RAM.
To find the bug, I modified the `_deepcopy` function in `table.py` as follows:
```python
def _deepcopy(x, memo: dict):
"""deepcopy a regular class instance"""
import psutil # pip install this package
import time
cls = x.__class__
result = cls.__new__(cls)
memo[id(x)] = result
for k, v in x.__dict__.items():
print("="* 50)
print("Current memory:", psutil.virtual_memory().percent)
print(f"Saving object {k} with value {v}")
setattr(result, k, copy.deepcopy(v, memo))
time.sleep(5)
print("Memory after copy:", psutil.virtual_memory().percent)
return result
```
Test script:
```python
import copy
from datasets import load_dataset
bk = load_dataset("bookcorpus", split="train")
bk_copy = copy.deepcopy(bk)
``` | [
-0.11895902454853058,
0.0833052396774292,
0.12607288360595703,
0.371997594833374,
0.017117395997047424,
0.11338674277067184,
-0.11379118263721466,
0.34220167994499207,
-0.3763221800327301,
-0.03133939206600189,
-0.0029891831800341606,
0.2833094000816345,
0.10329961031675339,
-0.1568286120891571,
0.01461054477840662,
0.4244330823421478,
0.2601240873336792,
0.1345784068107605,
-0.46252569556236267,
-0.14837267994880676,
-0.34257176518440247,
-0.0025914087891578674,
-0.17867857217788696,
-0.41952431201934814,
-0.4456119239330292,
0.32866665720939636,
-0.3202904462814331,
0.2377285361289978,
-0.05603257566690445,
0.12863318622112274,
0.3555448651313782,
0.18642140924930573,
-0.031598154455423355,
0.5348337888717651,
-0.00011916082439711317,
0.05775776505470276,
0.2564501166343689,
-0.16355867683887482,
-0.44946610927581787,
0.1362713873386383,
-0.3920058608055115,
-0.35366567969322205,
0.13147395849227905,
0.016040712594985962,
0.4164896011352539,
0.06639102101325989,
-0.22989101707935333,
-0.46348249912261963,
-0.02325044572353363,
0.06522627174854279,
0.15930821001529694,
0.11101113259792328,
-0.03503498062491417,
-0.12135082483291626,
0.00898793339729309,
0.11791978031396866,
-0.14113354682922363,
0.24530145525932312,
-0.10132361948490143,
-0.11676330119371414,
0.05765692517161369,
0.16843590140342712,
-0.35906875133514404,
-0.08743803203105927,
-0.00954863429069519,
0.29001837968826294,
-0.16208752989768982,
-0.28237301111221313,
0.2129003405570984,
0.04646994173526764,
0.21460402011871338,
-0.4365737736225128,
-0.04154781997203827,
-0.474977970123291,
-0.01969437301158905,
-0.30487313866615295,
0.09952932596206665,
0.30821314454078674,
-0.18910042941570282,
0.1121596246957779,
-0.1328096240758896,
0.05811886861920357,
0.03374709188938141,
-0.07373768091201782,
-0.12179845571517944,
-0.16956698894500732,
0.010173899121582508,
0.027148060500621796,
0.4104745388031006,
-0.054975107312202454,
0.4511060118675232,
-0.39608368277549744,
-0.2956274747848511,
0.08558967709541321,
-0.5441936254501343,
0.014193251729011536,
0.11443227529525757,
-0.2700995206832886,
0.1956009864807129,
0.23277245461940765,
0.2149357944726944,
0.04690796881914139,
0.13792195916175842,
-0.022849999368190765,
0.4365808963775635,
0.19964611530303955,
-0.10256365686655045,
0.500990629196167,
0.13047003746032715,
-0.16324631869792938,
0.3409537374973297,
0.11014165729284286,
-0.11321496218442917,
-0.07810855656862259,
0.30095115303993225,
-0.36567679047584534,
0.22924132645130157,
-0.192722350358963,
-0.37155503034591675,
0.1397656947374344,
0.006525512784719467,
0.07786571979522705,
-0.04966709390282631,
0.3585071861743927,
0.06714422255754471,
0.25470593571662903,
0.15389302372932434,
0.3614988327026367,
-0.06985175609588623,
0.19494028389453888,
-0.22376233339309692,
-0.12186844646930695,
-0.1603536456823349,
0.23499517142772675,
0.3661680817604065,
0.007492628879845142,
-0.057289689779281616,
0.30130690336227417,
0.07230447977781296,
-0.13871075212955475,
-0.0609995499253273,
-0.32626041769981384,
0.3241434395313263,
0.27037137746810913,
0.058716725558042526,
0.2103704959154129,
0.22666814923286438,
-0.13046440482139587,
-0.14230211079120636,
0.45032620429992676,
-0.254639208316803,
-0.07355617731809616,
-0.06935452669858932,
0.10335693508386612,
0.036225900053977966,
0.04434864595532417,
-0.47589924931526184,
0.31060388684272766,
0.43477630615234375,
0.232710599899292,
0.028581224381923676,
-0.11074437201023102,
-0.14648368954658508,
-0.3564538061618805,
0.44722846150398254,
0.4729631543159485,
-0.05414636433124542,
0.048705391585826874,
0.03534431755542755,
0.2649785876274109,
0.5495263934135437,
0.34020620584487915,
0.04346010833978653,
0.08792094886302948,
-0.2372007668018341,
0.01790516823530197,
0.09834132343530655,
-0.0005003511905670166,
-0.24843862652778625,
0.18721354007720947,
-0.2704434096813202,
0.33511605858802795,
-0.024154581129550934,
0.10162506252527237,
0.1242658868432045,
0.09731964021921158,
0.6602458953857422,
0.2771523594856262,
0.0627574697136879,
0.15264885127544403,
-0.3004395365715027,
-0.1258176565170288,
0.0933525562286377,
0.008636023849248886,
-0.120774045586586,
0.30709126591682434,
-0.001908235251903534,
-0.22920730710029602,
0.38633373379707336,
0.009098056703805923,
0.14055731892585754,
0.28559577465057373,
0.15494376420974731,
-0.08994089066982269,
-0.17467540502548218,
0.23796147108078003,
-0.3544643819332123,
0.0971628800034523,
0.18350274860858917,
-0.03977389633655548,
-0.18567775189876556,
-0.13832668960094452,
0.13482052087783813,
0.22850441932678223,
-0.23061977326869965,
0.09225398302078247,
0.015547435730695724,
0.0989253893494606,
-0.03271453082561493,
0.13162405788898468,
0.1348373144865036,
0.6968746781349182,
-0.15390649437904358,
0.05870062857866287,
-0.46252375841140747,
0.14152926206588745,
0.14059945940971375,
-0.2519921064376831,
-0.06219533830881119,
0.21037134528160095,
0.19678744673728943,
0.07329908758401871,
-0.10081110149621964,
0.42352399230003357,
-0.3193053603172302,
-0.1450687199831009,
-0.2693098485469818,
0.04033876955509186,
-0.02984156645834446,
-0.051696788519620895,
0.1415465921163559,
-0.22547288239002228,
0.2247689813375473,
-0.15630251169204712,
-0.056742191314697266,
0.4507274031639099,
0.011239586398005486,
0.18744656443595886,
-0.004590298980474472,
-0.19197195768356323,
0.07932263612747192,
-0.16424766182899475,
0.09018251299858093,
-0.1586996167898178,
0.1115509569644928,
0.3809700906276703,
0.15173828601837158,
0.3321411609649658,
-0.32997873425483704,
0.16860899329185486,
0.19155657291412354,
-0.06417208909988403,
0.20806318521499634,
0.248998761177063,
-0.3479629158973694,
-0.2832612097263336,
-0.14098072052001953,
0.3459078371524811,
0.7657054662704468,
0.08330018073320389,
0.22359119355678558,
-0.11264470964670181,
-0.001369427889585495,
-0.17955978214740753,
0.3187161087989807,
-0.09188231825828552,
0.17357748746871948,
0.20702096819877625,
0.22430267930030823,
-0.1472703218460083,
-0.20658022165298462,
0.4320198595523834,
0.1452317088842392,
-0.07475719600915909,
-0.27722281217575073,
0.028399402275681496,
-0.33628833293914795,
0.05188789963722229,
-0.37330079078674316,
-0.12223989516496658,
0.08178047835826874,
-0.3311994671821594,
-0.27109450101852417,
0.39290565252304077,
-0.0935637503862381,
-0.10965605825185776,
-0.04987339302897453,
0.3842969238758087,
-0.05034821853041649,
-0.1125861182808876,
0.0026578977704048157,
0.17872929573059082,
-0.2788045406341553,
-0.05258091911673546,
-0.005679943133145571,
-0.32157009840011597,
0.052007243037223816,
0.2059115469455719,
-0.16520839929580688,
0.04153723269701004,
0.05379418283700943,
0.02607915736734867,
-0.19592249393463135,
0.05130031704902649,
-0.17275837063789368,
0.15071308612823486,
0.07904314994812012,
-0.22745513916015625,
-0.016985982656478882,
0.37293896079063416,
0.016009384766221046,
0.5513110160827637,
0.21996353566646576,
-0.2465396672487259,
-0.1986984759569168,
0.065012626349926,
-0.35572680830955505,
-0.16348883509635925,
0.2513194680213928,
-0.1487257480621338,
0.02521585300564766,
0.17376326024532318,
0.0827576071023941,
-0.12293510884046555,
0.07319708168506622,
0.15646472573280334,
-0.19913211464881897,
-0.1466025412082672,
0.42204153537750244,
-0.0023798630572855473,
-0.34247153997421265,
-0.22328491508960724,
0.08010821044445038,
-0.3310309648513794,
0.15109077095985413,
-0.548454761505127,
0.2285904586315155,
-0.5363150835037231,
0.2024652361869812,
0.0190963726490736,
0.0740160346031189,
0.1360853612422943,
0.11011948436498642,
-0.038184523582458496,
-0.14376002550125122,
-0.2721315324306488,
0.033494725823402405,
0.006990956142544746,
0.06543529033660889,
-0.07459947466850281,
0.21588295698165894,
0.23051553964614868,
0.018675323575735092,
0.39075255393981934,
-0.01773746684193611,
0.39154544472694397,
0.12595748901367188,
0.570092499256134,
-0.33936792612075806,
-0.4471696615219116,
-0.31534165143966675,
-0.3729497492313385,
-0.05526593700051308,
-0.038056209683418274,
-0.0817660316824913,
-0.2075938731431961,
0.05664554238319397,
0.1470753252506256,
0.06432107836008072,
-0.22255200147628784,
0.15925537049770355,
-0.23268982768058777,
-0.15273714065551758,
0.15685097873210907,
-0.10121923685073853,
-0.13537903130054474,
-0.08308792114257812,
-0.2535189092159271,
-0.08938983082771301,
-0.1491835117340088,
-0.11356870830059052,
-0.3458331525325775,
-0.12572257220745087,
-0.6547684669494629,
0.07680666446685791,
-0.1478186845779419,
0.6040260791778564,
0.13570281863212585,
-0.37451809644699097,
0.03997517377138138,
0.04134920611977577,
0.802787184715271,
0.3686525821685791,
-0.23054401576519012,
0.13101674616336823,
-0.022433152422308922,
-0.38625091314315796,
-0.05919433385133743,
0.08136533200740814,
0.2802150249481201,
0.12290798127651215,
0.09501592814922333,
-0.24427545070648193,
0.0788230150938034,
0.23319581151008606,
0.26694220304489136,
-0.25133782625198364,
0.04505540430545807,
-0.2758743166923523,
-0.21278449892997742,
0.025718679651618004,
-0.23376372456550598,
0.2033437341451645,
0.2741469442844391,
-0.35314682126045227,
-0.24608714878559113,
-0.02679908089339733,
-0.20435935258865356,
0.2672514319419861,
-0.212370365858078,
0.43815696239471436,
0.14161716401576996,
0.4936627149581909,
-0.15872310101985931,
0.2963469922542572,
0.3730776607990265,
0.7436978220939636,
-0.1091233640909195,
-0.11794760823249817,
0.17319518327713013,
-0.2392697036266327,
0.38264691829681396,
0.2412322759628296,
-0.1666254699230194,
0.23670083284378052,
-0.23105108737945557,
-0.003340385854244232,
-0.5372431874275208,
-0.006161375902593136,
-0.03726210445165634,
0.07359952479600906,
-0.541761577129364,
-0.2735453248023987,
0.4134730100631714,
0.19980444014072418,
0.013462111353874207,
0.4708474576473236,
-0.5638399124145508,
-0.35006624460220337,
0.19624577462673187,
-0.33537086844444275,
0.8098764419555664,
0.070294588804245,
0.29551705718040466,
-0.05430839955806732,
-0.018935952335596085,
-0.049537789076566696,
0.11494362354278564,
0.1686783879995346,
-0.09946027398109436,
-0.3948719799518585,
0.20313887298107147,
-0.22481198608875275,
-0.18832626938819885,
-0.253223717212677,
-0.280116468667984,
0.0907682478427887,
-0.41507893800735474,
-0.13336081802845,
0.024523381143808365,
-0.14565131068229675,
0.0061811404302716255,
-0.2912023067474365,
0.07347510755062103,
0.13132140040397644,
0.4107922911643982,
-0.2013477385044098,
0.11820640414953232,
0.027595773339271545,
-0.31055542826652527,
-0.30018728971481323,
-0.2445828765630722,
0.22417166829109192,
-0.20564964413642883,
0.5132959485054016,
-0.2175203263759613,
-0.20472100377082825,
-0.177737757563591,
-0.014170382171869278,
0.23023712635040283,
0.18442417681217194,
0.001467287540435791,
-0.20938116312026978,
0.21691685914993286,
0.3816981315612793,
0.21629582345485687,
-0.3113328814506531,
0.0308292955160141,
0.28698816895484924,
-0.02351701259613037,
-0.0897100493311882,
-0.012928150594234467,
-0.2515479326248169,
-0.3127516210079193,
0.16242212057113647,
0.1311502605676651,
-0.2297178953886032,
-0.22218938171863556,
0.28845643997192383,
0.2736465632915497,
-0.22335322201251984,
0.10207168757915497,
0.18628770112991333,
-0.10790634900331497,
0.301954984664917,
-0.44529128074645996,
-0.40082791447639465,
-0.15047207474708557,
0.5288499593734741,
0.4275747239589691,
0.13709427416324615,
0.35895732045173645,
-0.025524407625198364,
-0.027536213397979736,
-0.09266679733991623,
0.3038042187690735,
0.2948084771633148,
-0.3083605468273163,
0.33275818824768066,
-0.23471137881278992,
-0.08898265659809113,
-0.12235517799854279,
0.19065561890602112,
-0.09030009806156158,
-0.14982211589813232,
-0.20041027665138245,
-0.15884201228618622,
-0.17923764884471893,
0.09213484078645706,
0.06298467516899109,
0.2616426348686218,
0.03338681906461716,
0.07921075820922852,
-0.13212884962558746,
0.24530920386314392,
-0.23456087708473206,
-0.10315239429473877,
-0.09351804852485657,
0.1942146122455597,
0.011016334407031536,
0.10369829833507538,
0.22828291356563568,
-0.09016504883766174,
0.07201234996318817,
0.2308770716190338,
0.18352565169334412,
-0.1775110363960266,
0.11194194853305817,
0.11604883521795273,
-0.07840439677238464,
-0.06391534954309464,
-0.3406572937965393,
-0.41533708572387695,
-0.15844939649105072,
-0.2976613938808441,
0.21955396234989166,
0.1389334797859192,
-0.057122305035591125,
-0.2025785893201828,
0.2531118094921112,
0.0496826246380806,
0.09896525740623474,
0.11897836625576019,
-0.16703549027442932,
-0.07215778529644012,
-0.059021856635808945,
0.1988935023546219,
-0.18561413884162903,
-0.044298622757196426,
-0.45699721574783325,
0.058030739426612854,
0.1112944483757019,
-0.12735113501548767,
0.06086317077279091,
-0.2804783582687378,
-0.30587735772132874,
-0.19406567513942719,
0.08915606886148453,
0.4233349561691284,
-0.16285954415798187,
-0.15744414925575256,
-0.045025989413261414,
0.1168302446603775,
0.03273579850792885,
-0.3386596739292145,
-0.25399190187454224,
-0.21168023347854614,
-0.08268294483423233,
0.3108478784561157,
0.1218881756067276,
-0.3003923296928406,
-0.27637916803359985,
-0.08225077390670776,
0.5124062299728394,
0.11080171167850494,
0.3124132752418518,
0.1702505201101303,
0.2720433175563812,
0.24926169216632843,
0.03655494749546051,
0.11583459377288818,
0.024423979222774506,
0.2108103632926941,
0.056914880871772766,
0.36013785004615784,
0.26593494415283203,
-0.23679697513580322,
-0.1599995493888855,
-0.49415361881256104,
0.3613446354866028,
0.510071873664856,
-0.14135567843914032,
0.3520648181438446,
-0.012326769530773163,
0.07298438996076584,
-0.3567439913749695,
-0.222581684589386,
-0.2216586023569107,
0.13303151726722717,
-0.19145482778549194,
-0.23466555774211884,
0.2077045887708664,
-0.1291695088148117,
-0.044978246092796326,
0.10023576021194458,
0.05680466070771217,
-0.24215011298656464,
0.32027673721313477,
0.10476294904947281,
-0.20985637605190277,
-0.08114725351333618,
0.13028977811336517,
0.3109115958213806,
-0.060378141701221466,
-0.29230982065200806,
0.07937415689229965,
-0.015129342675209045,
-0.02358698844909668,
0.044847503304481506,
0.41512179374694824,
0.4353761374950409,
0.5306362509727478,
0.21691474318504333,
0.1128673404455185,
0.39104968309402466,
-0.1669711172580719,
-0.218160018324852,
0.24842126667499542,
-0.13267678022384644,
-0.2015145868062973,
0.055564071983098984,
0.11318039894104004,
-0.10790397971868515,
-0.03614388778805733,
0.4862872064113617,
0.1950155645608902,
-0.3314708173274994,
0.11846490949392319,
0.03016585297882557,
-0.24748647212982178,
0.11256261169910431,
0.052243422716856,
-0.31386956572532654,
0.020490653812885284,
0.6549025177955627,
-0.3941720724105835,
0.05427107214927673,
0.0577680803835392,
0.0555415153503418,
0.15301349759101868,
0.48011887073516846,
0.17070117592811584,
-0.04534886032342911,
-0.3510209023952484,
-0.2779955267906189,
-0.13621573150157928,
0.1387811005115509,
-0.024879980832338333,
0.16676181554794312,
0.09251809120178223,
0.28373274207115173,
0.0989440456032753,
-0.16699852049350739,
-0.2755039930343628,
0.09359222650527954,
-0.28632357716560364,
0.04508163779973984,
-0.44075432419776917,
-0.2045115828514099,
0.11370326578617096,
0.15889227390289307,
-0.034887995570898056,
-0.3842609226703644,
0.30810707807540894,
-0.07021928578615189,
0.03743939846754074,
-0.03466939926147461,
0.18804925680160522,
0.1128128170967102,
0.41337665915489197,
0.27297404408454895,
0.2253100425004959,
0.18600024282932281,
-0.1833367943763733,
-0.18679000437259674,
-0.10631600022315979,
-0.23032104969024658,
-0.18987947702407837,
-0.16976779699325562,
0.02194860577583313,
-0.04604272544384003,
-0.28569868206977844,
0.10035359859466553,
-0.020345518365502357,
-0.08500293642282486,
0.21231357753276825,
0.007444784976541996,
-0.0953528881072998,
0.20978660881519318,
0.03743792325258255,
0.26265764236450195,
0.18962517380714417,
0.1903233528137207,
-0.07741430401802063,
0.43931344151496887,
0.03949601948261261,
-0.3373164236545563,
0.10080809891223907,
-0.04079780355095863,
-0.10567346215248108,
-0.14290116727352142,
0.33192741870880127,
-0.19109508395195007,
0.11463918536901474,
-0.4796123206615448,
-0.1773148477077484,
0.26148325204849243,
-0.1287756860256195,
-0.502069354057312,
0.6252392530441284,
-0.12506546080112457,
-0.040796034038066864,
-0.11987560987472534,
0.49055543541908264,
0.06339766085147858,
-0.49015387892723083,
0.27768823504447937,
-0.32025146484375
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Thanks for the insights @mariosasko ! I'm working on a fix.
Since this is a big issue I'll make a patch release as soon as this is fixed | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 28 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Thanks for the insights @mariosasko ! I'm working on a fix.
Since this is a big issue I'll make a patch release as soon as this is fixed | [
-0.1398511677980423,
0.015114650130271912,
0.057670366019010544,
0.36967331171035767,
0.18395699560642242,
0.15967586636543274,
-0.03367805853486061,
0.2669214904308319,
-0.21304593980312347,
0.008929677307605743,
0.07352765649557114,
0.18218213319778442,
0.10922601819038391,
-0.20466461777687073,
-0.1817609667778015,
0.3304117023944855,
0.24172741174697876,
0.2320263832807541,
-0.28739503026008606,
-0.08298881351947784,
-0.25310975313186646,
0.25071290135383606,
-0.31189900636672974,
-0.39326798915863037,
-0.41154128313064575,
0.29313817620277405,
-0.31732407212257385,
0.2868471145629883,
0.07313428819179535,
0.016312815248966217,
0.3663008511066437,
0.06849190592765808,
-0.01084158569574356,
0.4899158477783203,
-0.0001141718021244742,
-0.03994695842266083,
0.2374245971441269,
-0.166659414768219,
-0.3710733950138092,
0.03823857009410858,
-0.21153143048286438,
-0.4239184856414795,
0.09490224719047546,
0.01639043539762497,
0.3227265179157257,
0.027634166181087494,
-0.13924869894981384,
-0.6195903420448303,
-0.03633107244968414,
-0.018487239256501198,
0.20558834075927734,
-0.07360769808292389,
0.08732347190380096,
-0.03468232601881027,
-0.15454831719398499,
0.15011906623840332,
-0.056211039423942566,
0.20532095432281494,
0.046226371079683304,
-0.08684346079826355,
0.12011780589818954,
0.10360370576381683,
-0.28616464138031006,
-0.06627123057842255,
0.08697260171175003,
0.3886125683784485,
-0.16448000073432922,
-0.4153287410736084,
0.06235235556960106,
0.028984198346734047,
0.29897865653038025,
-0.38106590509414673,
-0.07508277148008347,
-0.41065388917922974,
0.07230746001005173,
-0.15187454223632812,
0.25859180092811584,
0.5170178413391113,
-0.21856854856014252,
0.22921116650104523,
-0.12423896044492722,
-0.02523825876414776,
-0.01618548482656479,
-0.029071934521198273,
-0.2198181301355362,
0.10543207824230194,
-0.1261250525712967,
0.05331194028258324,
0.33407896757125854,
0.06928180903196335,
0.26174479722976685,
-0.4625042676925659,
-0.3334726393222809,
0.10246475785970688,
-0.5122951865196228,
-0.016402579843997955,
-0.010271050035953522,
-0.3762551248073578,
0.13180413842201233,
0.20163051784038544,
0.08783957362174988,
0.0035143159329891205,
0.1841774731874466,
0.019774287939071655,
0.3769460618495941,
0.17651501297950745,
0.008063964545726776,
0.34744852781295776,
0.10524359345436096,
-0.20716175436973572,
0.26903003454208374,
0.05880022048950195,
-0.04705725237727165,
-0.20884348452091217,
0.25015729665756226,
-0.3447650671005249,
0.19840306043624878,
-0.131450816988945,
-0.4553024470806122,
0.11000563949346542,
-0.10054013133049011,
0.06879419088363647,
-0.030802752822637558,
0.2494177520275116,
-0.02829502895474434,
0.488111287355423,
0.18560099601745605,
0.31672143936157227,
-0.034531328827142715,
0.19923242926597595,
-0.1725662499666214,
-0.15506815910339355,
-0.09545019268989563,
0.21420815587043762,
0.32562124729156494,
-0.23650041222572327,
-0.00885313842445612,
0.4181313216686249,
0.03401246666908264,
-0.17666074633598328,
0.08174991607666016,
-0.31289637088775635,
0.20969265699386597,
0.19716522097587585,
0.15839464962482452,
0.4220796525478363,
0.15483492612838745,
-0.15898850560188293,
-0.06949863582849503,
0.43559545278549194,
-0.28793349862098694,
-0.06585001945495605,
-0.2847757041454315,
0.1766027957201004,
0.032000571489334106,
0.10776190459728241,
-0.20732703804969788,
0.32981187105178833,
0.40950050950050354,
0.28969821333885193,
-0.09118423610925674,
0.017162693664431572,
-0.04449441656470299,
-0.3863946497440338,
0.47461196780204773,
0.3746916651725769,
-0.12287548184394836,
0.1804332584142685,
0.07965510338544846,
0.25558942556381226,
0.5120502710342407,
0.32792356610298157,
-0.048297762870788574,
0.053170345723629,
-0.3730938732624054,
0.012581169605255127,
0.16862542927265167,
-0.15464094281196594,
-0.1727762222290039,
0.30326512455940247,
-0.24164947867393494,
0.32877495884895325,
-0.043933503329753876,
0.16948643326759338,
-0.07331789284944534,
0.16478484869003296,
0.5839229822158813,
0.46568775177001953,
0.14252503216266632,
0.12755107879638672,
-0.2993755042552948,
-0.13397039473056793,
0.17696712911128998,
-0.12945468723773956,
-0.2251119762659073,
0.32532086968421936,
-0.05896008759737015,
-0.14447635412216187,
0.5275813937187195,
-0.10062713921070099,
0.20854038000106812,
0.3714694380760193,
0.15048199892044067,
-0.1359594464302063,
-0.21123528480529785,
0.19422003626823425,
-0.43090155720710754,
0.001352749764919281,
0.16754396259784698,
-0.2653861939907074,
-0.06217151880264282,
-0.05787446349859238,
0.10200504213571548,
0.025822242721915245,
-0.06362521648406982,
0.02387325093150139,
0.012160435318946838,
0.2641776204109192,
-0.09937930107116699,
0.025863133370876312,
-0.008665844798088074,
0.8541284203529358,
-0.03314230591058731,
0.0026920423842966557,
-0.29601600766181946,
0.18311621248722076,
0.07334006577730179,
-0.26403605937957764,
-0.07469992339611053,
0.034119974821805954,
0.19438257813453674,
0.08175904303789139,
-0.09834953397512436,
0.485840767621994,
-0.30713093280792236,
-0.05350580811500549,
-0.175616055727005,
-0.23250313103199005,
-0.030166851356625557,
0.08340795338153839,
0.008474940434098244,
-0.15597748756408691,
0.19445739686489105,
-0.2200034260749817,
-0.02029554545879364,
0.3703811764717102,
0.07293419539928436,
0.16075976192951202,
-0.024884512647986412,
-0.09842028468847275,
0.05504812300205231,
-0.19476403295993805,
0.10693608969449997,
-0.20174476504325867,
0.14571134746074677,
0.2696820795536041,
0.1671738177537918,
0.31788623332977295,
-0.4692436158657074,
0.03999761492013931,
0.21824060380458832,
0.0924292653799057,
0.1402134895324707,
0.16897991299629211,
-0.43413370847702026,
-0.17354336380958557,
-0.10963286459445953,
0.18923203647136688,
0.7930136919021606,
0.1422210931777954,
0.20250800251960754,
-0.08155692368745804,
0.004443428013473749,
-0.26261743903160095,
0.34254133701324463,
-0.03303470462560654,
0.005689442157745361,
0.27060839533805847,
0.27292734384536743,
-0.10779617726802826,
-0.1397448480129242,
0.39244544506073,
0.05443292856216431,
-0.09958305209875107,
-0.2963497042655945,
0.1051601693034172,
-0.24729421734809875,
0.1749792993068695,
-0.3388809263706207,
-0.29954156279563904,
-0.042970914393663406,
-0.3729386627674103,
-0.387054443359375,
0.49660876393318176,
-0.005070915445685387,
-0.2058931440114975,
-0.000023089349269866943,
0.30294814705848694,
-0.08028841018676758,
-0.10786021500825882,
-0.04371977597475052,
0.2978873550891876,
-0.4031485915184021,
0.0023266617208719254,
0.03291070833802223,
-0.24146690964698792,
0.02559848502278328,
0.16168540716171265,
-0.07460682839155197,
0.006247282028198242,
-0.03760121390223503,
-0.14606840908527374,
-0.110878124833107,
0.1193872019648552,
-0.2633398175239563,
0.144841268658638,
0.006790738552808762,
-0.3595241904258728,
0.013994257897138596,
0.4124946594238281,
0.06070398539304733,
0.44178274273872375,
0.3276699185371399,
-0.22160916030406952,
-0.3578842878341675,
-0.07389400154352188,
-0.2946990132331848,
-0.2672674059867859,
0.09940782189369202,
0.030342411249876022,
0.07633204013109207,
0.19414135813713074,
0.07543376833200455,
-0.1641865074634552,
0.07954828441143036,
0.10355915129184723,
-0.17004962265491486,
-0.30655235052108765,
0.5985968708992004,
-0.04164090380072594,
-0.32600322365760803,
-0.05425328016281128,
0.07424136251211166,
-0.21966075897216797,
0.15074962377548218,
-0.5239771008491516,
0.2077145129442215,
-0.5243373513221741,
0.03579649701714516,
-0.23243305087089539,
0.0915297195315361,
-0.08672188222408295,
0.09827183932065964,
-0.03680863976478577,
-0.15587499737739563,
-0.1413528472185135,
0.012580044567584991,
0.004449948668479919,
0.26306554675102234,
-0.1881357729434967,
-0.12222673743963242,
0.1747363656759262,
-0.13209639489650726,
0.5040396451950073,
-0.02552945539355278,
0.3300636112689972,
0.19656424224376678,
0.5206714868545532,
-0.22527235746383667,
-0.49298176169395447,
-0.20433837175369263,
-0.20166495442390442,
0.10074284672737122,
0.05771790072321892,
0.0778430700302124,
-0.09465058147907257,
-0.08178283274173737,
0.23449093103408813,
0.09695037454366684,
-0.22225701808929443,
0.16703267395496368,
-0.2054097056388855,
-0.050610579550266266,
0.004248961806297302,
-0.031207768246531487,
-0.10992074012756348,
-0.14977329969406128,
-0.23759296536445618,
0.019927896559238434,
0.011406280100345612,
-0.06189632788300514,
-0.24882906675338745,
0.03461207449436188,
-0.5779017210006714,
0.09932047873735428,
-0.13577987253665924,
0.44807326793670654,
0.12992052733898163,
-0.33812955021858215,
0.06878648698329926,
0.004552353173494339,
0.7800455093383789,
0.3826601207256317,
-0.4314597249031067,
0.20510566234588623,
0.15318338572978973,
-0.48686861991882324,
-0.10690300166606903,
0.014635983854532242,
0.17145511507987976,
0.15499545633792877,
0.1559259593486786,
-0.18712002038955688,
-0.023666946217417717,
0.018373114988207817,
0.39273759722709656,
-0.2104063630104065,
-0.10526464134454727,
-0.36757177114486694,
-0.16921117901802063,
-0.11501214653253555,
-0.33826157450675964,
0.08031625300645828,
0.3705012798309326,
-0.2373080849647522,
-0.34666430950164795,
-0.02925068698823452,
-0.17372259497642517,
0.2647717297077179,
-0.25501134991645813,
0.5063934922218323,
0.08595548570156097,
0.38806772232055664,
-0.11798900365829468,
0.2238127738237381,
0.21970924735069275,
0.5938230752944946,
0.12319403886795044,
-0.10263025760650635,
0.2181452214717865,
-0.22526289522647858,
0.39855286478996277,
0.1742030680179596,
-0.18465566635131836,
0.18407303094863892,
-0.32197415828704834,
0.08568913489580154,
-0.6387631297111511,
0.15117721259593964,
0.07326680421829224,
0.11991255730390549,
-0.6324182748794556,
-0.23131686449050903,
0.25619378685951233,
0.10566022992134094,
-0.021633319556713104,
0.5527474284172058,
-0.5034876465797424,
-0.4059453308582306,
0.04059090092778206,
-0.2261580526828766,
0.8108165860176086,
0.05408334359526634,
0.28760984539985657,
-0.01718127354979515,
-0.18031221628189087,
0.15249095857143402,
0.11166709661483765,
0.27364492416381836,
-0.20105919241905212,
-0.2040138989686966,
0.12878002226352692,
-0.2660425007343292,
0.004418410360813141,
-0.16006144881248474,
-0.45270076394081116,
0.06914263218641281,
-0.5905040502548218,
-0.050621148198843,
-0.08062367886304855,
0.06790435314178467,
-0.14498497545719147,
-0.30619895458221436,
0.052961379289627075,
0.15918004512786865,
0.284121572971344,
0.00003682821989059448,
0.0886320024728775,
-0.05781050771474838,
-0.21993519365787506,
-0.21484380960464478,
-0.19467860460281372,
0.37774190306663513,
-0.1425355225801468,
0.4557340145111084,
-0.2058800458908081,
-0.27542510628700256,
-0.12195828557014465,
0.16347958147525787,
0.3350866436958313,
0.276588499546051,
-0.027309829369187355,
-0.13753169775009155,
-0.0673854872584343,
0.3632535934448242,
0.13020479679107666,
-0.2657192051410675,
-0.01971912942826748,
0.2913518249988556,
-0.06642171740531921,
-0.07175349444150925,
0.0024250661954283714,
-0.2321026474237442,
-0.296332985162735,
0.2948569655418396,
0.013313397765159607,
-0.2735062539577484,
-0.1186901181936264,
0.30113744735717773,
0.38066262006759644,
-0.15082405507564545,
0.13045412302017212,
0.25372427701950073,
-0.0948469266295433,
0.23178988695144653,
-0.37797895073890686,
-0.39096978306770325,
-0.1365138441324234,
0.381492555141449,
0.31440672278404236,
-0.08888521045446396,
0.34375259280204773,
-0.043045371770858765,
-0.018874526023864746,
-0.11435217410326004,
0.21741583943367004,
-0.016506142914295197,
-0.15294361114501953,
0.2706182599067688,
-0.09533080458641052,
0.008077934384346008,
-0.08058635145425797,
0.21640264987945557,
-0.05995661020278931,
-0.07981198281049728,
-0.05485343933105469,
-0.19899670779705048,
-0.3820282220840454,
-0.07183413207530975,
0.006327368319034576,
0.22805434465408325,
0.05469784885644913,
0.010607056319713593,
-0.06383639574050903,
0.21708685159683228,
-0.277656614780426,
-0.11580239981412888,
-0.15403132140636444,
0.1460757553577423,
-0.08688388764858246,
0.05775568634271622,
0.14809034764766693,
-0.0008432031609117985,
0.14070960879325867,
0.10582102090120316,
0.10667847841978073,
-0.20639950037002563,
0.03326873481273651,
0.11438581347465515,
-0.011697456240653992,
-0.13149377703666687,
-0.2068292498588562,
-0.41860276460647583,
0.0010653920471668243,
-0.36714985966682434,
0.18475206196308136,
0.2422654926776886,
-0.020805776119232178,
-0.12799301743507385,
-0.008668418973684311,
0.028005879372358322,
0.03711976855993271,
-0.018605560064315796,
-0.19176682829856873,
-0.03570073843002319,
-0.06725062429904938,
0.17545033991336823,
-0.04182106629014015,
0.00590825080871582,
-0.536748468875885,
0.08732648193836212,
0.11397869884967804,
0.00570707768201828,
-0.018788829445838928,
-0.23451437056064606,
-0.22037959098815918,
-0.1694926619529724,
0.12310503423213959,
0.37358805537223816,
-0.23586736619472504,
0.02854648418724537,
-0.039606425911188126,
0.18340328335762024,
0.11083318293094635,
-0.320586234331131,
-0.17876695096492767,
-0.052662938833236694,
-0.1876274198293686,
0.18496915698051453,
0.11931999027729034,
-0.31314605474472046,
-0.2715874910354614,
-0.07683677971363068,
0.5262078642845154,
0.12029988318681717,
0.2920238971710205,
0.2118806093931198,
0.20255641639232635,
0.16558288037776947,
0.061366647481918335,
0.12470798194408417,
0.034816987812519073,
0.3070791959762573,
-0.05308829993009567,
0.21447952091693878,
0.28653648495674133,
-0.23271697759628296,
-0.235666424036026,
-0.4283559024333954,
0.2475951761007309,
0.4237319827079773,
-0.15503081679344177,
0.22895818948745728,
0.040122173726558685,
0.07914955168962479,
-0.40217646956443787,
-0.3282315135002136,
-0.0945647582411766,
0.16221897304058075,
-0.25922340154647827,
-0.13830074667930603,
0.2126488983631134,
-0.0485825315117836,
0.04846138507127762,
0.09948509931564331,
0.21454672515392303,
-0.2807631492614746,
0.425314337015152,
0.1433027982711792,
-0.17215485870838165,
-0.24245594441890717,
0.24800682067871094,
0.4640237092971802,
0.011284805834293365,
-0.3268963694572449,
0.03662530705332756,
0.02778475731611252,
0.07656566798686981,
0.05692269280552864,
0.32080453634262085,
0.48831284046173096,
0.6327379941940308,
0.2889400124549866,
0.10406605154275894,
0.31027114391326904,
-0.07064089179039001,
-0.23280878365039825,
0.26540613174438477,
-0.10998094081878662,
-0.08063521981239319,
0.08937068283557892,
0.1750108301639557,
-0.1282295137643814,
0.07537618279457092,
0.35343751311302185,
0.21080410480499268,
-0.44260042905807495,
0.1605287790298462,
-0.0011844560503959656,
-0.23793765902519226,
0.025754781439900398,
0.02236885577440262,
-0.25376856327056885,
0.004722924903035164,
0.5532053112983704,
-0.18215052783489227,
0.11186596006155014,
0.01384455244988203,
0.07401208579540253,
0.25597813725471497,
0.2634492814540863,
0.08471807837486267,
-0.008997753262519836,
-0.3793722987174988,
-0.3257668614387512,
-0.19113798439502716,
0.26496076583862305,
0.11622078716754913,
0.36548516154289246,
-0.12731747329235077,
0.2802460789680481,
0.014183960855007172,
-0.061911553144454956,
-0.1746501475572586,
0.1437336653470993,
-0.15856768190860748,
-0.0395418182015419,
-0.4842327833175659,
-0.0827421098947525,
0.2124893218278885,
0.03456184267997742,
-0.04729289188981056,
-0.3593176305294037,
0.394759863615036,
-0.10687121003866196,
0.1028013750910759,
-0.07993822544813156,
0.2341654896736145,
0.19956530630588531,
0.33726707100868225,
0.37483319640159607,
0.24233195185661316,
0.22965851426124573,
-0.2148534059524536,
-0.19631311297416687,
-0.22131460905075073,
-0.30380842089653015,
-0.07304273545742035,
-0.1656855046749115,
0.0013528838753700256,
0.08001130819320679,
-0.4104302227497101,
0.12257635593414307,
-0.12899036705493927,
0.011527751572430134,
0.22428689897060394,
0.1620291918516159,
-0.08200938999652863,
0.08953119069337845,
0.053980469703674316,
0.21178124845027924,
0.19647015631198883,
0.1748432219028473,
-0.08052583038806915,
0.34906041622161865,
-0.10605257749557495,
-0.31388890743255615,
0.09897446632385254,
0.04679151996970177,
-0.2664644420146942,
-0.1155913770198822,
0.3089935779571533,
-0.05436687916517258,
0.16141776740550995,
-0.6315420866012573,
-0.1777593493461609,
0.35851243138313293,
-0.12322448939085007,
-0.47997233271598816,
0.5117150545120239,
-0.19255174696445465,
-0.1067781150341034,
-0.04704723507165909,
0.3618289530277252,
0.10698909312486649,
-0.4236907660961151,
0.28167393803596497,
-0.2509841322898865
] |
https://github.com/huggingface/datasets/issues/2276 | concatenate_datasets loads all the data into memory | Hi @samsontmr @TaskManager91 the fix is on the master branch, feel free to install `datasets` from source and let us know if you still have issues | ## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
| 26 | concatenate_datasets loads all the data into memory
## Describe the bug
When I try to concatenate 2 datasets (10GB each) , the entire data is loaded into memory instead of being written directly to disk.
Interestingly, this happens when trying to save the new dataset to disk or concatenating it again.

## Steps to reproduce the bug
```python
from datasets import concatenate_datasets, load_from_disk
test_sampled_pro = load_from_disk("test_sampled_pro")
val_sampled_pro = load_from_disk("val_sampled_pro")
big_set = concatenate_datasets([test_sampled_pro, val_sampled_pro])
# Loaded to memory
big_set.save_to_disk("big_set")
# Loaded to memory
big_set = concatenate_datasets([big_set, val_sampled_pro])
```
## Expected results
The data should be loaded into memory in batches and then saved directly to disk.
## Actual results
The entire data set is loaded into the memory and then saved to the hard disk.
## Versions
Paste the output of the following code:
```python
- Datasets: 1.6.1
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.10
```
Hi @samsontmr @TaskManager91 the fix is on the master branch, feel free to install `datasets` from source and let us know if you still have issues | [
-0.17059145867824554,
0.009216845035552979,
0.02928430587053299,
0.3677370548248291,
0.17550210654735565,
0.15065094828605652,
-0.03633321449160576,
0.25570133328437805,
-0.21847639977931976,
0.020554646849632263,
0.07563754916191101,
0.20069871842861176,
0.11371871083974838,
-0.1913735270500183,
-0.18780606985092163,
0.32128486037254333,
0.22412866353988647,
0.23274622857570648,
-0.30288055539131165,
-0.07997103035449982,
-0.2509790062904358,
0.253258615732193,
-0.315219521522522,
-0.40419650077819824,
-0.39267784357070923,
0.2633897364139557,
-0.32420897483825684,
0.29301831126213074,
0.055178575217723846,
0.014300552196800709,
0.3530987501144409,
0.09113086760044098,
-0.006137139163911343,
0.5166873931884766,
-0.00011193365935469046,
-0.034805651754140854,
0.21900300681591034,
-0.16030561923980713,
-0.3798380196094513,
0.013400286436080933,
-0.20820942521095276,
-0.43105489015579224,
0.0528312548995018,
-0.004553250968456268,
0.32320404052734375,
0.01654161512851715,
-0.1144322007894516,
-0.6221046447753906,
-0.021827951073646545,
-0.004022485110908747,
0.2312551885843277,
-0.05674641951918602,
0.11095529794692993,
-0.05840347707271576,
-0.1406247317790985,
0.16174617409706116,
-0.03518359735608101,
0.19277845323085785,
0.03717360645532608,
-0.07152881473302841,
0.10794144868850708,
0.07924820482730865,
-0.2629721462726593,
-0.08315996825695038,
0.07522407174110413,
0.3842877447605133,
-0.13469147682189941,
-0.41346120834350586,
0.08049559593200684,
0.015039820224046707,
0.30049267411231995,
-0.39917227625846863,
-0.09387542307376862,
-0.37973475456237793,
0.07402128726243973,
-0.1438547521829605,
0.26793181896209717,
0.490918904542923,
-0.21041880548000336,
0.21956369280815125,
-0.13311737775802612,
-0.0365266352891922,
-0.02397792786359787,
-0.028899505734443665,
-0.20432966947555542,
0.09316305071115494,
-0.13543972373008728,
0.030527211725711823,
0.3242897391319275,
0.03529975190758705,
0.27027052640914917,
-0.4690791368484497,
-0.3298487365245819,
0.11030545085668564,
-0.5132637619972229,
-0.02761569246649742,
-0.0030133724212646484,
-0.38753604888916016,
0.12438356131315231,
0.21518827974796295,
0.08758778870105743,
0.022785864770412445,
0.18449878692626953,
0.034910887479782104,
0.3635180592536926,
0.1804082840681076,
0.018464475870132446,
0.35719701647758484,
0.1284894347190857,
-0.18662598729133606,
0.2579452693462372,
0.05784628167748451,
-0.06562462449073792,
-0.2233372926712036,
0.23646266758441925,
-0.3508511483669281,
0.1808035969734192,
-0.13808754086494446,
-0.459809809923172,
0.11743605881929398,
-0.08639991283416748,
0.049602992832660675,
-0.009431821294128895,
0.2542223036289215,
-0.029217861592769623,
0.4726690948009491,
0.1849810928106308,
0.28630751371383667,
-0.03443589061498642,
0.2018055021762848,
-0.1823037713766098,
-0.14303812384605408,
-0.10713359713554382,
0.20816785097122192,
0.31833603978157043,
-0.23736771941184998,
-0.0012823916040360928,
0.38652125000953674,
0.0339648462831974,
-0.1422043740749359,
0.0747799351811409,
-0.3283981382846832,
0.18175745010375977,
0.18749552965164185,
0.15990154445171356,
0.3855150043964386,
0.12338896095752716,
-0.1299317330121994,
-0.07346126437187195,
0.4197448790073395,
-0.26367440819740295,
-0.05354538932442665,
-0.2766641676425934,
0.2080066055059433,
0.032373152673244476,
0.09005343168973923,
-0.18729111552238464,
0.32555142045021057,
0.39132124185562134,
0.2665787637233734,
-0.10220257192850113,
0.01591237261891365,
-0.02542390301823616,
-0.4058588147163391,
0.4793983995914459,
0.3491705656051636,
-0.12266504764556885,
0.17160862684249878,
0.05411525070667267,
0.22146055102348328,
0.5023226737976074,
0.31705260276794434,
-0.04114559292793274,
0.046443622559309006,
-0.36305859684944153,
0.020872220396995544,
0.17209599912166595,
-0.17139750719070435,
-0.18922990560531616,
0.29927942156791687,
-0.23270919919013977,
0.30578896403312683,
-0.01904384046792984,
0.13936573266983032,
-0.05476547032594681,
0.1674482673406601,
0.5857995748519897,
0.45506221055984497,
0.13707400858402252,
0.11116597801446915,
-0.3130154311656952,
-0.14392726123332977,
0.15258903801441193,
-0.11468635499477386,
-0.20948202908039093,
0.30836325883865356,
-0.02320871502161026,
-0.13295970857143402,
0.5200487971305847,
-0.10093575716018677,
0.21153971552848816,
0.37453025579452515,
0.1742047518491745,
-0.12615035474300385,
-0.20955388247966766,
0.17632395029067993,
-0.4116717576980591,
-0.012865083292126656,
0.14233222603797913,
-0.25364863872528076,
-0.07430526614189148,
-0.05877063050866127,
0.08626455813646317,
0.005415655672550201,
-0.04615137353539467,
0.013120535761117935,
0.04684597998857498,
0.28299039602279663,
-0.05414300411939621,
0.010065976530313492,
-0.0051473043859004974,
0.8445512652397156,
-0.05225213244557381,
-0.003874422051012516,
-0.27351170778274536,
0.20245486497879028,
0.0517793744802475,
-0.27818533778190613,
-0.06043941527605057,
0.06016672030091286,
0.17682601511478424,
0.062311816960573196,
-0.09692087769508362,
0.5086948871612549,
-0.31623172760009766,
-0.05300356447696686,
-0.12821760773658752,
-0.23867274820804596,
-0.019794536754488945,
0.08133643865585327,
0.03038259968161583,
-0.1581408530473709,
0.19515113532543182,
-0.20135563611984253,
-0.04857070744037628,
0.3627670407295227,
0.06373898684978485,
0.14708784222602844,
0.0014078952372074127,
-0.1114584356546402,
0.06175697594881058,
-0.18421314656734467,
0.11076899617910385,
-0.19295714795589447,
0.16560153663158417,
0.27174311876296997,
0.1882423460483551,
0.2941267490386963,
-0.4811876118183136,
0.024500742554664612,
0.22334712743759155,
0.07957729697227478,
0.14724482595920563,
0.16277584433555603,
-0.42709726095199585,
-0.17946889996528625,
-0.10470984876155853,
0.19445659220218658,
0.8014232516288757,
0.1726982742547989,
0.2021738737821579,
-0.08567813783884048,
-0.011620837263762951,
-0.2446804791688919,
0.34702491760253906,
-0.04301966726779938,
0.015032476745545864,
0.2690575420856476,
0.27350521087646484,
-0.10099630802869797,
-0.14826545119285583,
0.33555611968040466,
0.07422815263271332,
-0.11283716559410095,
-0.2773727476596832,
0.06317749619483948,
-0.2430238574743271,
0.16072723269462585,
-0.315087229013443,
-0.2844524681568146,
-0.028644271194934845,
-0.3622499704360962,
-0.3986130952835083,
0.4999137818813324,
0.0003715716302394867,
-0.18696656823158264,
0.006863206624984741,
0.2999923825263977,
-0.06910058110952377,
-0.0762333869934082,
-0.05264478176832199,
0.29241105914115906,
-0.39966192841529846,
0.03422464802861214,
0.03271935507655144,
-0.23504063487052917,
0.059115245938301086,
0.15516695380210876,
-0.06331457197666168,
-0.015256589278578758,
-0.03911105543375015,
-0.14431855082511902,
-0.10461083054542542,
0.13095563650131226,
-0.2461870312690735,
0.14437651634216309,
0.00024029240012168884,
-0.35219085216522217,
0.015146749094128609,
0.3860211670398712,
0.033196091651916504,
0.42610231041908264,
0.31762540340423584,
-0.22345051169395447,
-0.3679216802120209,
-0.0894455686211586,
-0.3102518320083618,
-0.29380854964256287,
0.08988364040851593,
0.036009568721055984,
0.08717123419046402,
0.18846970796585083,
0.0940237045288086,
-0.11252190917730331,
0.07526342570781708,
0.12726902961730957,
-0.19488674402236938,
-0.314613938331604,
0.5944068431854248,
-0.0795404389500618,
-0.32602226734161377,
-0.05075308308005333,
0.07385583221912384,
-0.2051510512828827,
0.15800854563713074,
-0.5181684494018555,
0.17751049995422363,
-0.5287168025970459,
0.05539657548069954,
-0.22941476106643677,
0.12875497341156006,
-0.08220016956329346,
0.10139265656471252,
-0.07310599088668823,
-0.16972482204437256,
-0.149696946144104,
-0.00043704360723495483,
0.026597466319799423,
0.26685839891433716,
-0.18638023734092712,
-0.1166984960436821,
0.17463916540145874,
-0.14220421016216278,
0.5094492435455322,
-0.0357053242623806,
0.3200167119503021,
0.19027268886566162,
0.5234615206718445,
-0.1986839473247528,
-0.4719846248626709,
-0.19321197271347046,
-0.2005855143070221,
0.08933559060096741,
0.05633658915758133,
0.06368343532085419,
-0.09208294749259949,
-0.08060798794031143,
0.2244476079940796,
0.09118019789457321,
-0.21756063401699066,
0.1473006010055542,
-0.1959725022315979,
-0.032913610339164734,
-0.019228089600801468,
-0.03872929513454437,
-0.12072376906871796,
-0.1115192100405693,
-0.24086597561836243,
0.02304729074239731,
0.00035957247018814087,
-0.056463804095983505,
-0.27144765853881836,
0.02013326622545719,
-0.5876373052597046,
0.10947603732347488,
-0.13738663494586945,
0.45355868339538574,
0.10900814831256866,
-0.3208842873573303,
0.05832698196172714,
-0.016134371981024742,
0.7636982798576355,
0.3329620659351349,
-0.4363059997558594,
0.20715932548046112,
0.15529009699821472,
-0.46583694219589233,
-0.08358052372932434,
-0.021317286416888237,
0.18997956812381744,
0.13126911222934723,
0.1583261489868164,
-0.2055952548980713,
-0.02965684048831463,
0.03583148121833801,
0.37446996569633484,
-0.20427492260932922,
-0.09558580815792084,
-0.34999874234199524,
-0.1737557351589203,
-0.1365814357995987,
-0.32456889748573303,
0.04892484098672867,
0.407643586397171,
-0.2329457849264145,
-0.3107892572879791,
-0.03681870549917221,
-0.18495696783065796,
0.27441704273223877,
-0.23085129261016846,
0.5145851373672485,
0.06394848972558975,
0.38583531975746155,
-0.09789377450942993,
0.21567676961421967,
0.24738170206546783,
0.5988702178001404,
0.10383322834968567,
-0.10609926283359528,
0.2526395618915558,
-0.21631789207458496,
0.4124968945980072,
0.16335676610469818,
-0.16023913025856018,
0.19176599383354187,
-0.3098961412906647,
0.09778419137001038,
-0.6230972409248352,
0.16412392258644104,
0.07255615293979645,
0.12769143283367157,
-0.6346243023872375,
-0.2413501888513565,
0.2271975874900818,
0.10827739536762238,
-0.018578313291072845,
0.5124952793121338,
-0.49012160301208496,
-0.4179081320762634,
0.06971300393342972,
-0.2118569314479828,
0.8130757808685303,
0.05472833663225174,
0.2585773766040802,
-0.029655084013938904,
-0.18453550338745117,
0.1582954078912735,
0.08530440926551819,
0.26781564950942993,
-0.1852395385503769,
-0.19612814486026764,
0.14387613534927368,
-0.2712044417858124,
0.010016877204179764,
-0.1378273069858551,
-0.48448091745376587,
0.06867941468954086,
-0.5488303899765015,
-0.055148374289274216,
-0.08573537319898605,
0.0833570659160614,
-0.15272650122642517,
-0.30456677079200745,
0.03719533234834671,
0.18953832983970642,
0.3127616047859192,
0.0013449415564537048,
0.06538842618465424,
-0.04481028392910957,
-0.21096216142177582,
-0.1944260448217392,
-0.19346223771572113,
0.35937291383743286,
-0.14556103944778442,
0.4600485563278198,
-0.22259384393692017,
-0.27947911620140076,
-0.1271812915802002,
0.1378699392080307,
0.31712180376052856,
0.2699975371360779,
-0.023086415603756905,
-0.1305084228515625,
-0.07305184751749039,
0.3410399854183197,
0.10887940227985382,
-0.24308685958385468,
0.0008908640593290329,
0.27798330783843994,
-0.08069197833538055,
-0.038538962602615356,
-0.0032455064356327057,
-0.22969834506511688,
-0.2879565358161926,
0.2690279483795166,
0.010951116681098938,
-0.2714540362358093,
-0.09414292871952057,
0.3045254945755005,
0.34513741731643677,
-0.14557714760303497,
0.15801642835140228,
0.25757983326911926,
-0.08736632764339447,
0.24180874228477478,
-0.36344215273857117,
-0.389384388923645,
-0.1616249531507492,
0.3766767382621765,
0.2974398732185364,
-0.08335749804973602,
0.3261156678199768,
-0.04958594590425491,
-0.036519184708595276,
-0.14329048991203308,
0.196061372756958,
-0.03546114265918732,
-0.14873109757900238,
0.27146103978157043,
-0.09117726236581802,
-0.01649521291255951,
-0.0638386458158493,
0.21764077246189117,
-0.02763848751783371,
-0.07346983999013901,
-0.05156135559082031,
-0.22010117769241333,
-0.396455317735672,
-0.05576081573963165,
-0.0022763386368751526,
0.2487778663635254,
0.05457834154367447,
0.004968460649251938,
-0.08579739928245544,
0.21775813400745392,
-0.3150092363357544,
-0.10859592258930206,
-0.1695532649755478,
0.14931735396385193,
-0.07458794862031937,
0.04307609423995018,
0.14624051749706268,
0.005567939952015877,
0.17220543324947357,
0.11931406706571579,
0.10777497291564941,
-0.23344159126281738,
0.04531203582882881,
0.09641707688570023,
-0.02590395137667656,
-0.14990410208702087,
-0.22466972470283508,
-0.4041141867637634,
0.011256863363087177,
-0.3703248202800751,
0.19640937447547913,
0.2312372922897339,
-0.03539776802062988,
-0.12009824067354202,
-0.0055269040167331696,
0.04131324589252472,
0.01976807788014412,
-0.012156087905168533,
-0.16340883076190948,
-0.04721832275390625,
-0.0828908309340477,
0.1975090503692627,
-0.061721257865428925,
-0.006147608160972595,
-0.5149456262588501,
0.08454563468694687,
0.1428636610507965,
-0.012874558568000793,
0.005239278078079224,
-0.21678851544857025,
-0.2100987285375595,
-0.15870872139930725,
0.12270708382129669,
0.37231457233428955,
-0.2173631191253662,
0.019379226490855217,
-0.024069182574748993,
0.21573641896247864,
0.09889374673366547,
-0.32505348324775696,
-0.2007528841495514,
-0.07659026235342026,
-0.15898443758487701,
0.16989390552043915,
0.1420828253030777,
-0.29915088415145874,
-0.26257628202438354,
-0.059158582240343094,
0.5463078022003174,
0.1247393786907196,
0.28979453444480896,
0.2192467451095581,
0.2227223962545395,
0.16194359958171844,
0.08210548013448715,
0.12546579539775848,
0.044391028583049774,
0.31999170780181885,
-0.04743901640176773,
0.2595841586589813,
0.278916597366333,
-0.21718448400497437,
-0.2115839421749115,
-0.42800992727279663,
0.2837201952934265,
0.4275856614112854,
-0.14435376226902008,
0.2253156304359436,
0.023359298706054688,
0.0850127637386322,
-0.41947296261787415,
-0.2932545244693756,
-0.10190866142511368,
0.13962750136852264,
-0.26744747161865234,
-0.13356775045394897,
0.19606083631515503,
-0.08385494351387024,
0.030611753463745117,
0.09071497619152069,
0.2005174160003662,
-0.2689693570137024,
0.42596137523651123,
0.12291555106639862,
-0.1554671823978424,
-0.24055500328540802,
0.2527744770050049,
0.4658412039279938,
0.002295553684234619,
-0.3160019516944885,
0.035635001957416534,
0.02716972678899765,
0.072089783847332,
0.05540543049573898,
0.34119880199432373,
0.4986341893672943,
0.6147719025611877,
0.27210554480552673,
0.10446582734584808,
0.3074154853820801,
-0.06780530512332916,
-0.24782530963420868,
0.2650796175003052,
-0.11271694302558899,
-0.10814379155635834,
0.09067827463150024,
0.20653411746025085,
-0.14850357174873352,
0.05666334554553032,
0.3594040870666504,
0.16888071596622467,
-0.4155341386795044,
0.14742077887058258,
0.008965253829956055,
-0.2527569532394409,
0.06785915791988373,
0.010829515755176544,
-0.2431136667728424,
-0.013026067055761814,
0.5400265455245972,
-0.2046990841627121,
0.11843905597925186,
0.008553403429687023,
0.09447121620178223,
0.24091540277004242,
0.27315106987953186,
0.10471272468566895,
-0.02670111507177353,
-0.37104833126068115,
-0.3345954418182373,
-0.2055731862783432,
0.25019896030426025,
0.1388462781906128,
0.3416656255722046,
-0.13822908699512482,
0.29020577669143677,
0.018928833305835724,
-0.07959162443876266,
-0.14973686635494232,
0.12101845443248749,
-0.15211282670497894,
-0.03136712312698364,
-0.4907975196838379,
-0.056384872645139694,
0.21443618834018707,
0.02611803077161312,
-0.026320766657590866,
-0.35820019245147705,
0.3783016502857208,
-0.1205616444349289,
0.1346714198589325,
-0.09682967513799667,
0.2296244502067566,
0.2119971066713333,
0.3251649737358093,
0.38905563950538635,
0.24157211184501648,
0.2294234037399292,
-0.24807891249656677,
-0.20082354545593262,
-0.2242738902568817,
-0.2944231629371643,
-0.06707204878330231,
-0.15488189458847046,
-0.01793501153588295,
0.08127498626708984,
-0.41031894087791443,
0.10244613885879517,
-0.10021526366472244,
0.018239811062812805,
0.21291546523571014,
0.154631569981575,
-0.06962298601865768,
0.09502941370010376,
0.053551413118839264,
0.19014057517051697,
0.20274488627910614,
0.19093146920204163,
-0.06718325614929199,
0.33856844902038574,
-0.11132767051458359,
-0.3111753463745117,
0.07805680483579636,
0.05009710043668747,
-0.266970694065094,
-0.13605281710624695,
0.29453152418136597,
-0.07418269664049149,
0.17264002561569214,
-0.6362549066543579,
-0.17003761231899261,
0.36007237434387207,
-0.13594099879264832,
-0.47462135553359985,
0.5072940587997437,
-0.1810394823551178,
-0.10517119616270065,
-0.03251205384731293,
0.38226279616355896,
0.07330827414989471,
-0.43181779980659485,
0.26383575797080994,
-0.24441058933734894
] |
https://github.com/huggingface/datasets/issues/2275 | SNLI dataset has labels of -1 | Hi @puzzler10,
Those examples where `gold_label` field was empty, -1 label was alloted to it. In order to remove it you can filter the samples from train/val/test splits. Here's how you can drop those rows from the dataset:
`dataset = load_dataset("snli")`
`dataset_test_filter = dataset['test'].filter(lambda example: example['label'] != -1)`
I agree it should have been mentioned in the documentation. I'll raise a PR regarding the same. Thanks for pointing out! | There are a number of rows with a label of -1 in the SNLI dataset. The dataset descriptions [here](https://nlp.stanford.edu/projects/snli/) and [here](https://github.com/huggingface/datasets/tree/master/datasets/snli) don't list -1 as a label possibility, and neither does the dataset viewer. As examples, see index 107 or 124 of the test set.
It isn't clear what these labels mean. I found a [line of code](https://github.com/huggingface/datasets/blob/80e59ef178d3bb2090d091bc32315c655eb0633d/datasets/snli/snli.py#L94) that seems to put them in but it seems still unclear why they are there. The current workaround is to just drop the rows from any model being trained.
Perhaps the documentation should be updated. | 69 | SNLI dataset has labels of -1
There are a number of rows with a label of -1 in the SNLI dataset. The dataset descriptions [here](https://nlp.stanford.edu/projects/snli/) and [here](https://github.com/huggingface/datasets/tree/master/datasets/snli) don't list -1 as a label possibility, and neither does the dataset viewer. As examples, see index 107 or 124 of the test set.
It isn't clear what these labels mean. I found a [line of code](https://github.com/huggingface/datasets/blob/80e59ef178d3bb2090d091bc32315c655eb0633d/datasets/snli/snli.py#L94) that seems to put them in but it seems still unclear why they are there. The current workaround is to just drop the rows from any model being trained.
Perhaps the documentation should be updated.
Hi @puzzler10,
Those examples where `gold_label` field was empty, -1 label was alloted to it. In order to remove it you can filter the samples from train/val/test splits. Here's how you can drop those rows from the dataset:
`dataset = load_dataset("snli")`
`dataset_test_filter = dataset['test'].filter(lambda example: example['label'] != -1)`
I agree it should have been mentioned in the documentation. I'll raise a PR regarding the same. Thanks for pointing out! | [
0.29897603392601013,
-0.3761279881000519,
-0.03285670652985573,
0.22228223085403442,
0.06941983103752136,
0.08158797770738602,
0.33123964071273804,
0.1691940277814865,
0.18132805824279785,
0.24445879459381104,
-0.3545388877391815,
0.48902782797813416,
-0.11607944220304489,
0.2643212676048279,
-0.007085484452545643,
0.1549568474292755,
0.23528257012367249,
0.3039816617965698,
0.28412073850631714,
-0.3298659324645996,
-0.27178603410720825,
0.09141090512275696,
-0.40519315004348755,
0.24796023964881897,
-0.37314826250076294,
0.02058698609471321,
0.12995141744613647,
-0.009696811437606812,
0.03359093517065048,
-0.5129570364952087,
0.09488178789615631,
0.11737880110740662,
-0.07726757228374481,
-0.07241680473089218,
-0.0001088527133106254,
-0.24033953249454498,
0.06974980980157852,
-0.04702306166291237,
-0.6223363280296326,
-0.2529820203781128,
-0.11818744242191315,
0.20770883560180664,
0.07515719532966614,
0.017291061580181122,
-0.09612204134464264,
-0.05277543514966965,
0.07443825155496597,
0.12424197793006897,
-0.08098000288009644,
0.3326578438282013,
0.17949216067790985,
0.38045838475227356,
-0.17687508463859558,
0.07073844224214554,
0.34398573637008667,
-0.15608589351177216,
0.01788242720067501,
0.21077650785446167,
-0.013328693807125092,
0.04252547025680542,
0.22604155540466309,
0.5354079604148865,
-0.04521532729268074,
0.03488527983427048,
0.33933255076408386,
0.02285804972052574,
-0.07778223603963852,
-0.4266029894351959,
0.042103111743927,
0.36389726400375366,
0.08105282485485077,
-0.23055610060691833,
-0.367146760225296,
-0.27496272325515747,
0.22447820007801056,
-0.2685077488422394,
0.05827052518725395,
0.2668513059616089,
0.06974923610687256,
0.26147863268852234,
-0.14607252180576324,
-0.05095260590314865,
-0.17519286274909973,
0.0005084723234176636,
-0.10571929812431335,
0.6413043737411499,
-0.15936926007270813,
0.12898382544517517,
0.5075032711029053,
0.07283568382263184,
-0.4432060718536377,
0.03945886716246605,
0.15684935450553894,
0.43173736333847046,
-0.5694578289985657,
-0.17179958522319794,
-0.028268232941627502,
0.16320547461509705,
0.04818771034479141,
0.21855080127716064,
0.04378562793135643,
0.02692793495953083,
-0.014058483764529228,
0.2916792333126068,
-0.06948480010032654,
0.14368224143981934,
0.30657830834388733,
-0.04669303819537163,
0.2114737629890442,
0.016228144988417625,
0.3600989580154419,
0.04819236695766449,
-0.2132718414068222,
-0.13941830396652222,
0.13085781037807465,
-0.23981401324272156,
0.19985291361808777,
-0.26267555356025696,
-0.6473469138145447,
0.20973213016986847,
-0.3907649517059326,
0.15245652198791504,
0.08668723702430725,
0.06452075392007828,
0.22032107412815094,
-0.05984308570623398,
-0.07910257577896118,
0.045698970556259155,
-0.1378146857023239,
-0.4292084276676178,
-0.19709692895412445,
0.09036973118782043,
-0.09888671338558197,
-0.11676845699548721,
0.21078424155712128,
-0.313153475522995,
0.3315538763999939,
0.05324620008468628,
-0.2020506113767624,
-0.020784957334399223,
0.17877767980098724,
0.16453136503696442,
0.24739721417427063,
0.5771650075912476,
-0.34881913661956787,
0.3330380916595459,
0.06598082929849625,
-0.196419820189476,
-0.10175726562738419,
-0.039312586188316345,
-0.17230069637298584,
-0.298944890499115,
-0.08182556927204132,
0.16999690234661102,
-0.19527117908000946,
-0.15190254151821136,
-0.09122944623231888,
0.08789472281932831,
-0.17780718207359314,
0.18139588832855225,
0.25667184591293335,
-0.21207837760448456,
-0.05851572006940842,
-0.0010469682747498155,
0.36054107546806335,
0.1575622260570526,
-0.48511362075805664,
-0.20347951352596283,
0.12377355247735977,
-0.42273205518722534,
-0.017346248030662537,
0.2736924886703491,
0.09328864514827728,
-0.19719359278678894,
-0.0713966116309166,
0.25209134817123413,
0.2139836549758911,
-0.29686439037323,
-0.3827926814556122,
0.02717428468167782,
-0.3269345164299011,
-0.16787812113761902,
-0.18954160809516907,
0.30813634395599365,
-0.14579162001609802,
0.10595155507326126,
-0.06988123059272766,
-0.20193566381931305,
0.09008559584617615,
-0.28355154395103455,
-0.5512374043464661,
-0.2125902622938156,
0.24631443619728088,
0.31271907687187195,
-0.04929241165518761,
0.05082371458411217,
-0.16390308737754822,
-0.007076942827552557,
0.272073358297348,
0.013131622225046158,
0.2313564270734787,
0.18374456465244293,
0.43089935183525085,
0.1810053586959839,
0.08232486993074417,
-0.0849984735250473,
-0.39120912551879883,
0.23219510912895203,
0.031057074666023254,
0.36581021547317505,
0.18258416652679443,
-0.2678923010826111,
-0.24100545048713684,
-0.2028995156288147,
-0.24123172461986542,
-0.20268836617469788,
0.08694164454936981,
0.061980053782463074,
0.2216905653476715,
-0.05906528979539871,
-0.3432810604572296,
0.07382909953594208,
-0.3657289743423462,
0.22407282888889313,
-0.4974216818809509,
-0.13940507173538208,
0.10598251968622208,
0.17037786543369293,
-0.17735905945301056,
0.2051088511943817,
0.20679479837417603,
0.02619514800608158,
-0.0004640026018023491,
0.32049956917762756,
-0.19983474910259247,
-0.21243925392627716,
0.23087963461875916,
0.4564019441604614,
0.11080605536699295,
-0.4229474365711212,
-0.060392700135707855,
0.30663272738456726,
0.03466096892952919,
0.07232589274644852,
-0.3624301552772522,
0.3699856996536255,
-0.1780645102262497,
0.13034182786941528,
-0.15714330971240997,
0.12588739395141602,
0.10388284921646118,
0.06230412796139717,
-0.3292539417743683,
-0.28041785955429077,
-0.10125735402107239,
-0.39511287212371826,
0.3665449619293213,
0.1523703634738922,
-0.6327459216117859,
0.11345499753952026,
0.03476032614707947,
-0.32911214232444763,
-0.08874347060918808,
0.07293377071619034,
-0.2424839437007904,
-0.11963056772947311,
0.32446470856666565,
0.24112771451473236,
0.11614729464054108,
0.23016397655010223,
0.1370829939842224,
0.1427651196718216,
-0.35133978724479675,
-0.2686562240123749,
0.03977145254611969,
0.15237948298454285,
-0.10683642327785492,
-0.12088461965322495,
0.13040673732757568,
-0.01732887700200081,
-0.34051722288131714,
-0.23088563978672028,
-0.08854741603136063,
0.27231475710868835,
-0.40209153294563293,
0.0290392879396677,
-0.21723368763923645,
-0.13949953019618988,
-0.3488059341907501,
-0.0022706277668476105,
-0.24646532535552979,
-0.2919360399246216,
0.31280022859573364,
0.004744924604892731,
-0.20304402709007263,
0.1004568561911583,
0.031631000339984894,
0.5093473196029663,
-0.15199384093284607,
0.2992752194404602,
-0.30022352933883667,
-0.26529112458229065,
-0.20742937922477722,
0.0390334390103817,
-0.25875717401504517,
0.2907179594039917,
0.30180028080940247,
-0.15765634179115295,
-0.3338998556137085,
-0.0033468175679445267,
-0.3023770749568939,
0.04802843928337097,
-0.14261965453624725,
0.10028960555791855,
0.18449285626411438,
0.03932664170861244,
-0.05117524415254593,
0.31667381525039673,
0.004994382616132498,
-0.21428821980953217,
-0.11168351024389267,
-0.0925554633140564,
-0.08108041435480118,
0.12726573646068573,
-0.5270536541938782,
-0.35871654748916626,
-0.1944817453622818,
-0.06703212857246399,
0.24882081151008606,
-0.1992383450269699,
0.07298837602138519,
0.3046569228172302,
-0.05806128308176994,
0.3074793815612793,
-0.14913056790828705,
0.1342586874961853,
-0.1992037147283554,
-0.40861138701438904,
0.1899920105934143,
0.03265611082315445,
-0.24254868924617767,
0.19301056861877441,
0.26844465732574463,
-0.016076676547527313,
-0.22441154718399048,
-0.33048075437545776,
-0.08945828676223755,
0.17582151293754578,
0.08239351212978363,
0.10619078576564789,
-0.0795193612575531,
-0.11109301447868347,
0.046524107456207275,
0.006726650521159172,
-0.22530555725097656,
0.06429208815097809,
0.3514786958694458,
-0.425473690032959,
0.25423312187194824,
-0.11001396924257278,
0.1659717559814453,
0.010235011577606201,
0.26685667037963867,
0.4718407988548279,
0.03714461997151375,
-0.1448502242565155,
0.027547581121325493,
0.14129364490509033,
-0.04838559776544571,
0.1749221235513687,
0.16578426957130432,
0.2737951874732971,
-0.09544677287340164,
0.4123091697692871,
0.001673365943133831,
0.051900312304496765,
0.08879715204238892,
-0.00690629705786705,
0.03505726903676987,
-0.10556961596012115,
-0.11939920485019684,
-0.03422366827726364,
-0.051661424338817596,
-0.0025485623627901077,
-0.07056984305381775,
-0.007627394981682301,
-0.03602352365851402,
-0.12514850497245789,
0.12996810674667358,
0.02404961735010147,
0.0580962710082531,
-0.3151973783969879,
0.04658135771751404,
-0.27118802070617676,
-0.09217016398906708,
-0.14881673455238342,
0.2241201400756836,
0.08874033391475677,
-0.08669567853212357,
0.481626033782959,
0.22330836951732635,
0.651552677154541,
-0.256972074508667,
0.17077167332172394,
0.14656874537467957,
0.3238314390182495,
-0.20314070582389832,
-0.23381203413009644,
-0.4656898081302643,
-0.286024272441864,
0.3575041890144348,
0.3194352984428406,
-0.14233040809631348,
-0.5077244639396667,
0.42953500151634216,
0.03485105559229851,
-0.13565704226493835,
0.03194919973611832,
-0.2754113972187042,
-0.22168058156967163,
-0.07456197589635849,
0.20179536938667297,
0.08777689188718796,
0.0055554755963385105,
-0.26593250036239624,
0.1474958211183548,
0.20628049969673157,
0.10891445726156235,
0.4171217679977417,
0.3996475040912628,
0.04800774157047272,
0.1336192786693573,
-0.0788365975022316,
0.4705047607421875,
0.20336364209651947,
0.12806914746761322,
0.5412424802780151,
-0.03202151879668236,
-0.4326099753379822,
0.1952376365661621,
-0.3017495274543762,
0.4824659824371338,
0.2719443440437317,
0.1515711098909378,
0.09138418734073639,
-0.24348574876785278,
0.3418336510658264,
-0.2550148367881775,
0.06719397008419037,
0.2685762047767639,
-0.056201379746198654,
-0.17020153999328613,
-0.2825743556022644,
0.5954552888870239,
-0.04945773631334305,
-0.3141207695007324,
0.02475092001259327,
0.4294596314430237,
-0.23680992424488068,
0.2148868888616562,
0.36910900473594666,
1.0459474325180054,
-0.05212441086769104,
0.011098157614469528,
0.3327118456363678,
-0.5709408521652222,
0.5602008700370789,
-0.19481128454208374,
-0.07221674919128418,
-0.25618475675582886,
0.039842478930950165,
0.12396344542503357,
0.2006249725818634,
-0.16098332405090332,
0.48002856969833374,
0.15067215263843536,
0.17873655259609222,
-0.23109860718250275,
0.18355189263820648,
0.13906428217887878,
-0.05441725254058838,
0.20796257257461548,
-0.00260009802877903,
-0.2688750922679901,
0.15457497537136078,
0.09091648459434509,
0.13725078105926514,
-0.16437271237373352,
0.07250142097473145,
0.012859296053647995,
-0.050295960158109665,
-0.0006516650319099426,
-0.20770516991615295,
0.2996360659599304,
-0.016823899000883102,
0.1648656576871872,
-0.03205936774611473,
-0.15787561237812042,
0.30238544940948486,
0.6914599537849426,
-0.15120211243629456,
-0.03648512065410614,
0.09532956033945084,
0.016868237406015396,
0.34202930331230164,
0.018735051155090332,
0.18162211775779724,
0.5679465532302856,
0.08482597023248672,
-0.3281462490558624,
-0.005545526742935181,
0.092195525765419,
0.19867752492427826,
-0.39632803201675415,
-0.02324368804693222,
-0.29786956310272217,
0.10986750572919846,
0.05108942091464996,
-0.2207343876361847,
0.2528727352619171,
-0.15296225249767303,
0.1644691675901413,
0.08123209327459335,
-0.23046527802944183,
-0.21846991777420044,
0.032696954905986786,
-0.4425135552883148,
-0.24207927286624908,
0.2558954060077667,
-0.11085603386163712,
0.2954885959625244,
0.11649686098098755,
-0.2047535479068756,
-0.14255130290985107,
-0.2471475601196289,
0.01176518201828003,
0.4294539988040924,
-0.6151471734046936,
0.11111421883106232,
0.20497603714466095,
-0.1036672443151474,
0.03052578493952751,
0.39827263355255127,
0.07232044637203217,
-0.0505543053150177,
-0.07518535852432251,
-0.18258661031723022,
-0.2546256184577942,
0.032533954828977585,
-0.04576488956809044,
0.40788108110427856,
-0.029997333884239197,
0.22715690732002258,
-0.12405147403478622,
-0.15733884274959564,
-0.3544267416000366,
-0.07507362961769104,
-0.4251209795475006,
0.2522549033164978,
0.13422349095344543,
0.354267954826355,
-0.040572211146354675,
-0.03538891673088074,
0.0837235301733017,
-0.06558411568403244,
-0.04645225778222084,
-0.13738757371902466,
-0.3091197907924652,
0.14975093305110931,
0.06853684782981873,
-0.19724830985069275,
-0.048317912966012955,
0.23642213642597198,
-0.08524206280708313,
-0.007072046399116516,
0.3630233108997345,
0.23779207468032837,
0.31871843338012695,
0.8635641932487488,
-0.0884639322757721,
0.2512859106063843,
0.005087330937385559,
-0.12777218222618103,
0.10210593044757843,
0.053688496351242065,
0.17343029379844666,
-0.03035176545381546,
-0.18726623058319092,
-0.004538789391517639,
-0.1407221555709839,
0.1538669466972351,
-0.20633696019649506,
-0.13971182703971863,
0.025237150490283966,
-0.2607499361038208,
0.2843097746372223,
-0.05733823776245117,
0.32685917615890503,
0.1496075540781021,
-0.19525952637195587,
-0.2138923704624176,
0.2366320788860321,
0.26534804701805115,
-0.17997053265571594,
0.02953333780169487,
0.26535847783088684,
0.023409247398376465,
0.08683647215366364,
0.19538149237632751,
0.16832108795642853,
0.04602247476577759,
0.07839686423540115,
-0.07257522642612457,
0.23473912477493286,
-0.27738189697265625,
0.1002284437417984,
0.37982550263404846,
-0.14740385115146637,
0.07604768127202988,
0.4589992165565491,
-0.1008724719285965,
0.13753338158130646,
0.38121289014816284,
-0.09731367975473404,
0.6287071108818054,
-0.2104887068271637,
0.30151546001434326,
-0.165384441614151,
0.059354621917009354,
-0.08937352895736694,
0.2047703117132187,
-0.3985283374786377,
0.116048164665699,
-0.06315024197101593,
0.31705576181411743,
-0.27195799350738525,
-0.2514198422431946,
0.1825876533985138,
0.317163348197937,
-0.20344233512878418,
-0.3677087128162384,
-0.625255823135376,
-0.09390532970428467,
-0.13288265466690063,
0.3004603683948517,
-0.1347043216228485,
-0.1321982741355896,
0.21447613835334778,
-0.04962886869907379,
-0.11655710637569427,
-0.3096384108066559,
-0.350544810295105,
0.20895755290985107,
0.4235254228115082,
0.008215505629777908,
-0.05338965356349945,
0.13456615805625916,
0.10747349262237549,
0.23287644982337952,
-0.059911273419857025,
0.22959239780902863,
0.09029443562030792,
0.3245144784450531,
-0.07942291349172592,
-0.13067133724689484,
-0.11071701347827911,
-0.11737477779388428,
0.14083760976791382,
0.16034182906150818,
-0.030667763203382492,
0.19410617649555206,
0.09370645880699158,
-0.1574203372001648,
0.3419397175312042,
-0.07222764194011688,
0.4403965175151825,
-0.3386833071708679,
0.15905722975730896,
-0.17958122491836548,
-0.2903948128223419,
-0.26294466853141785,
-0.1401442289352417,
-0.051908280700445175,
0.3314606249332428,
-0.060623932629823685,
0.2896048128604889,
0.17317456007003784,
-0.1960676908493042,
0.09942768514156342,
0.25728505849838257,
0.3898850083351135,
0.09608329832553864,
-0.07987368851900101,
-0.162377268075943,
-0.028262220323085785,
-0.8415148258209229,
-0.019044049084186554,
-0.023792404681444168,
-0.003485415130853653,
0.2146441489458084,
0.03835303336381912,
-0.24551555514335632,
-0.24684228003025055,
-0.024614527821540833,
-0.0062903668731451035,
0.1036544069647789,
0.03960542380809784,
-0.00954434834420681,
0.03449959680438042,
-0.2680268883705139,
-0.08066031336784363,
0.1091814786195755,
-0.0008418485522270203,
0.060521773993968964,
-0.1485963612794876,
-0.01868455298244953,
-0.09617350250482559,
0.320479154586792,
-0.10850556194782257,
0.17319998145103455,
0.12306994944810867,
-0.015440432354807854,
0.3519541621208191,
0.23100551962852478,
-0.07901718467473984,
-0.34777283668518066,
0.1440775841474533,
-0.47769418358802795,
-0.036192506551742554,
-0.2247152328491211,
0.3466443419456482,
0.08889380842447281,
-0.28707870841026306,
-0.04809100180864334,
0.16688545048236847,
0.07739495486021042,
-0.010620699264109135,
-0.5227892398834229,
0.27695778012275696,
-0.18394900858402252,
0.1439637392759323,
0.2457573264837265,
0.10540100187063217,
0.19862262904644012,
-0.11990924924612045,
-0.3376210927963257,
-0.2967921793460846,
0.42674413323402405,
-0.36067453026771545,
-0.05650351941585541,
0.05240607634186745,
0.30346423387527466,
0.43096375465393066,
-0.3343273401260376,
-0.9000048637390137,
-0.07202555239200592,
0.24165543913841248,
-0.1272202432155609,
-0.42441627383232117,
0.21121001243591309,
0.23202380537986755,
0.09094858169555664,
-0.10027048736810684,
0.04721137881278992,
0.33231011033058167,
0.053882673382759094,
0.32087358832359314,
-0.40916770696640015
] |
https://github.com/huggingface/datasets/issues/2272 | Bug in Dataset.class_encode_column | This has been fixed in this commit: https://github.com/huggingface/datasets/pull/2254/commits/88676c930216cd4cc31741b99827b477d2b46cb6
It was introduced in #2246 : using map with `input_columns` doesn't return the other columns anymore | ## Describe the bug
All the rest of the columns except the one passed to `Dataset.class_encode_column` are discarded.
## Expected results
All the original columns should be kept.
This needs regression tests.
| 24 | Bug in Dataset.class_encode_column
## Describe the bug
All the rest of the columns except the one passed to `Dataset.class_encode_column` are discarded.
## Expected results
All the original columns should be kept.
This needs regression tests.
This has been fixed in this commit: https://github.com/huggingface/datasets/pull/2254/commits/88676c930216cd4cc31741b99827b477d2b46cb6
It was introduced in #2246 : using map with `input_columns` doesn't return the other columns anymore | [
-0.035784948617219925,
-0.15752187371253967,
-0.08681079745292664,
0.23763355612754822,
0.5289877653121948,
0.11752558499574661,
0.5686448812484741,
0.37044912576675415,
0.25974535942077637,
0.19476842880249023,
-0.13328763842582703,
0.5430200695991516,
0.09942620247602463,
0.3341948390007019,
0.016678407788276672,
-0.10779863595962524,
0.10423934459686279,
0.15567830204963684,
-0.5332585573196411,
-0.2485714852809906,
-0.35391533374786377,
0.17851275205612183,
-0.18959397077560425,
0.03631431609392166,
-0.08563216775655746,
0.2268487513065338,
-0.07525134086608887,
0.07182881981134415,
-0.19680851697921753,
0.04675618186593056,
0.21463151276111603,
-0.16595250368118286,
-0.12370332330465317,
0.07715681195259094,
-0.00009902707824949175,
0.011466361582279205,
0.08591756224632263,
-0.00915621779859066,
-0.15667743980884552,
0.04741089046001434,
-0.19824081659317017,
-0.06778787076473236,
-0.08829805254936218,
-0.2672233283519745,
-0.18911612033843994,
-0.2229388803243637,
-0.17652185261249542,
-0.22526873648166656,
0.13409793376922607,
0.02119912952184677,
0.35225909948349,
0.22149990499019623,
-0.1476595550775528,
-0.060013625770807266,
0.26557430624961853,
0.21748663485050201,
-0.0632188469171524,
-0.17741486430168152,
0.020780101418495178,
-0.007830601185560226,
-0.052400968968868256,
0.4466293156147003,
0.020964303985238075,
-0.13363388180732727,
-0.005134187638759613,
0.20345328748226166,
-0.04063183814287186,
-0.030332431197166443,
0.38210329413414,
0.11625713109970093,
0.24094903469085693,
-0.08648896962404251,
-0.1750107854604721,
-0.2274492084980011,
0.034863442182540894,
-0.24145174026489258,
0.11533252894878387,
-0.09310909360647202,
0.1492735743522644,
0.17598558962345123,
-0.38226115703582764,
-0.008952226489782333,
-0.09708934277296066,
0.1939297765493393,
-0.2835181951522827,
0.1710605025291443,
-0.28218260407447815,
0.08525659888982773,
0.010729871690273285,
0.0057512614876031876,
-0.24620133638381958,
-0.17064689099788666,
-0.010234732180833817,
0.1799633651971817,
-0.05883880332112312,
-0.21397267282009125,
0.08420693129301071,
0.16278761625289917,
0.2372651994228363,
-0.11699375510215759,
-0.03695637732744217,
0.2024584412574768,
-0.017068322747945786,
0.12167098373174667,
0.33190736174583435,
0.16375508904457092,
0.11916124820709229,
0.3312910497188568,
0.2741265296936035,
0.004844235256314278,
0.04529218748211861,
-0.1319953203201294,
0.33266425132751465,
0.20482413470745087,
0.08353038132190704,
-0.11315556615591049,
0.08432967215776443,
-0.20558784902095795,
-0.13994565606117249,
0.18996047973632812,
0.020454972982406616,
-0.026158509775996208,
-0.0671980157494545,
0.3910753130912781,
0.09394277632236481,
0.15222236514091492,
0.009106960147619247,
0.1897302120923996,
0.04878845065832138,
-0.18297475576400757,
-0.41720643639564514,
-0.08338312804698944,
-0.1617065966129303,
-0.14961495995521545,
0.057154010981321335,
-0.021536707878112793,
0.39246371388435364,
0.2146303951740265,
-0.10080423951148987,
-0.0021814778447151184,
-0.15409806370735168,
-0.00791209191083908,
0.46819737553596497,
0.0567125529050827,
-0.14987598359584808,
0.20097500085830688,
0.18218858540058136,
-0.2645999789237976,
0.007670700550079346,
-0.0745367631316185,
-0.19215089082717896,
-0.0650474801659584,
-0.13825561106204987,
0.3105873465538025,
0.028327971696853638,
0.10951685905456543,
-0.11552704125642776,
0.2912950813770294,
0.33881333470344543,
-0.1750127375125885,
0.11558667570352554,
-0.3287632465362549,
-0.21493996679782867,
-0.1349686235189438,
0.18619585037231445,
0.06954611092805862,
-0.21912790834903717,
-0.2320270836353302,
0.3701493442058563,
-0.1202198714017868,
0.08868777751922607,
0.27541112899780273,
-0.18264418840408325,
-0.06557371467351913,
-0.1955094188451767,
0.2797735333442688,
0.18060362339019775,
-0.08344670385122299,
-0.41006502509117126,
0.18060757219791412,
0.09719233214855194,
0.08536361902952194,
-0.15064078569412231,
-0.07458880543708801,
0.2699149549007416,
-0.025298411026597023,
0.08800249546766281,
0.10821929574012756,
0.061347708106040955,
0.17803622782230377,
-0.15060529112815857,
-0.05854463577270508,
0.10199445486068726,
-0.13548821210861206,
-0.07860000431537628,
0.19872751832008362,
0.12268513441085815,
-0.11034976691007614,
0.35510385036468506,
-0.2854630649089813,
0.16589002311229706,
0.2804602384567261,
0.04217652603983879,
-0.13478100299835205,
0.05975943058729172,
-0.2607400119304657,
-0.4284383952617645,
-0.01994931325316429,
0.20425577461719513,
-0.1423265039920807,
-0.10816077888011932,
-0.3205409646034241,
-0.22516679763793945,
-0.03257665038108826,
-0.1822502613067627,
0.04565748944878578,
0.25563690066337585,
0.019495371729135513,
0.01973002403974533,
0.05426933988928795,
-0.2197064608335495,
0.16152818500995636,
-0.23406338691711426,
0.05890190973877907,
-0.4512903392314911,
0.16253168880939484,
0.026857439428567886,
0.05330425128340721,
-0.0592217892408371,
0.22860807180404663,
0.19070440530776978,
-0.1196361556649208,
0.0058785295113921165,
0.1681663990020752,
-0.20049723982810974,
0.10127703845500946,
-0.25521501898765564,
0.02518583834171295,
0.24356231093406677,
0.06342269480228424,
-0.00796002708375454,
-0.15256893634796143,
0.18985211849212646,
-0.06407468020915985,
-0.3242456912994385,
0.32775580883026123,
0.10527850687503815,
0.050293825566768646,
0.08349102735519409,
-0.03565094619989395,
0.07535407692193985,
-0.11341318488121033,
-0.2598533630371094,
-0.49042215943336487,
-0.10660155117511749,
-0.10746702551841736,
-0.011583339422941208,
0.05175625532865524,
-0.3236916959285736,
0.14023031294345856,
0.9188796281814575,
-0.0623418390750885,
-0.014771923422813416,
-0.09398632496595383,
-0.344565749168396,
0.07291507720947266,
0.1259705275297165,
0.32951459288597107,
0.39650899171829224,
0.2283821851015091,
0.2659597396850586,
0.05577888339757919,
-0.18045294284820557,
-0.07169723510742188,
0.2371605932712555,
0.009774826467037201,
-0.030578045174479485,
0.2169627845287323,
0.2506074011325836,
-0.04177103191614151,
-0.5560481548309326,
0.4048531949520111,
0.09058304876089096,
0.025722064077854156,
-0.39565345644950867,
0.05774412304162979,
-0.52524334192276,
-0.07193377614021301,
0.07489555329084396,
-0.08688250184059143,
0.16107696294784546,
-0.4229637086391449,
0.05893370509147644,
0.09975212812423706,
-0.4003639221191406,
0.1637858748435974,
-0.027116874232888222,
-0.013392940163612366,
0.01485334150493145,
0.05390835925936699,
-0.10092233121395111,
-0.15565644204616547,
-0.09315275400876999,
0.16484639048576355,
-0.04986735060811043,
-0.17090801894664764,
0.1399347484111786,
-0.050037920475006104,
-0.26208245754241943,
-0.2865418493747711,
-0.4427240490913391,
0.25231850147247314,
-0.30483973026275635,
0.058829739689826965,
0.10765361785888672,
0.19223710894584656,
-0.3203524351119995,
0.05161767080426216,
0.30808916687965393,
-0.19824665784835815,
-0.32382437586784363,
0.1872299611568451,
0.18016710877418518,
-0.17892222106456757,
-0.39817291498184204,
-0.4971632659435272,
0.13003048300743103,
-0.13504905998706818,
0.18158882856369019,
-0.15552926063537598,
-0.06308281421661377,
0.027586057782173157,
0.002928301692008972,
0.03854064270853996,
-0.3008106052875519,
0.029390394687652588,
-0.6573470234870911,
-0.2217814177274704,
0.36327221989631653,
-0.29662200808525085,
-0.5062739849090576,
-0.12545570731163025,
0.09790892153978348,
0.1011657565832138,
0.017190683633089066,
-0.3091312050819397,
-0.36775538325309753,
-0.08322172611951828,
0.18427525460720062,
-0.06379667669534683,
0.2143394649028778,
0.3514961898326874,
-0.006168386433273554,
-0.11576564610004425,
-0.16297647356987,
-0.11389732360839844,
0.15609249472618103,
0.21888798475265503,
0.01492442935705185,
-0.21226075291633606,
0.4909072816371918,
0.10535815358161926,
0.20709621906280518,
0.29123979806900024,
0.011997945606708527,
0.2866947054862976,
-0.08254106342792511,
0.5360159873962402,
-0.19321519136428833,
-0.21981045603752136,
0.11198500543832779,
-0.2987489700317383,
0.2717893719673157,
0.21115538477897644,
0.010997440665960312,
-0.18128523230552673,
0.08320531249046326,
0.2468913495540619,
-0.03372699022293091,
-0.30236631631851196,
0.07292230427265167,
0.1730727255344391,
0.08191539347171783,
0.3885636627674103,
0.29973265528678894,
-0.0978400707244873,
-0.04578614607453346,
0.1973557025194168,
-0.20714174211025238,
0.0532042421400547,
-0.19902312755584717,
-0.5546403527259827,
-0.1234234943985939,
-0.4953661561012268,
0.291684091091156,
0.04681381210684776,
0.05359627306461334,
-0.0667385458946228,
-0.3529548645019531,
0.044325362890958786,
0.10295715183019638,
0.44724559783935547,
-0.21071043610572815,
-0.10566329956054688,
-0.009387849830091,
0.02049846202135086,
-0.30861902236938477,
-0.004557620733976364,
-0.2849849462509155,
0.004328616429120302,
0.19698098301887512,
0.5901808738708496,
-0.33791476488113403,
-0.11792450398206711,
0.4202675223350525,
0.132851243019104,
-0.13662400841712952,
0.013324708677828312,
-0.11676321923732758,
-0.2524292767047882,
-0.12692634761333466,
-0.023257769644260406,
0.2281380444765091,
0.1141953319311142,
-0.11792494356632233,
-0.30829209089279175,
0.03134487569332123,
-0.21688199043273926,
0.07412772625684738,
0.18199987709522247,
0.29105621576309204,
0.08741206675767899,
0.1533721536397934,
0.03286968916654587,
0.2015523910522461,
-0.0967382937669754,
0.4839465916156769,
-0.1953887790441513,
-0.16451764106750488,
0.16960233449935913,
-0.37281447649002075,
0.3802327513694763,
0.30019161105155945,
-0.08730693906545639,
0.0630679726600647,
-0.06849426031112671,
-0.015705198049545288,
-0.2186795026063919,
-0.05035512521862984,
0.4710477292537689,
0.1342891901731491,
-0.07052163779735565,
-0.20622862875461578,
0.25220292806625366,
-0.12546196579933167,
-0.14176081120967865,
0.2963750958442688,
0.20179659128189087,
-0.3386617600917816,
0.2593957781791687,
0.002774074673652649,
0.6919939517974854,
0.013144172728061676,
0.14398737251758575,
0.13552168011665344,
-0.08517424762248993,
0.2800987660884857,
0.005868010222911835,
0.129984050989151,
-0.31860730051994324,
-0.40952420234680176,
0.0413687601685524,
0.11730009317398071,
0.2598937451839447,
0.02158667892217636,
-0.018492694944143295,
0.11896473169326782,
0.052926674485206604,
0.5219536423683167,
-0.10912559181451797,
-0.1962876170873642,
0.07812990993261337,
-0.28207170963287354,
-0.2800424098968506,
0.2990988492965698,
0.10227678716182709,
-0.12719108164310455,
0.10787568241357803,
0.0645860955119133,
0.02328801527619362,
-0.27492445707321167,
0.06341038644313812,
0.13095948100090027,
-0.03939799219369888,
0.15029095113277435,
0.24166239798069,
-0.3254871666431427,
-0.07236478477716446,
0.3597691059112549,
0.34539783000946045,
0.116304412484169,
0.0017099454998970032,
0.012428505346179008,
0.051276177167892456,
0.4156191647052765,
-0.0058016302064061165,
0.137318417429924,
0.19730499386787415,
0.013781152665615082,
-0.07761707901954651,
0.1323334276676178,
0.06662166118621826,
-0.08711866289377213,
-0.14240619540214539,
0.06758257746696472,
0.06471407413482666,
-0.5439122915267944,
-0.03929581865668297,
-0.020106792449951172,
0.35154256224632263,
-0.4296712875366211,
0.22503918409347534,
0.05681883171200752,
-0.18469950556755066,
0.30392003059387207,
0.31861770153045654,
-0.24021188914775848,
-0.15349052846431732,
0.4318374693393707,
0.0366683267056942,
0.11578015983104706,
0.4951031804084778,
-0.08131732046604156,
-0.26049134135246277,
-0.26376572251319885,
0.03341418504714966,
0.3343142569065094,
-0.25948184728622437,
-0.005501302890479565,
-0.14976130425930023,
-0.04822411388158798,
-0.08301488310098648,
0.15149202942848206,
-0.2278897613286972,
-0.08141111582517624,
-0.13041795790195465,
-0.19933289289474487,
-0.3260846734046936,
0.1621861606836319,
0.1392476111650467,
0.2407766878604889,
0.12893185019493103,
-0.06276743113994598,
-0.2677087187767029,
0.102572962641716,
-0.46058714389801025,
-0.05826035887002945,
-0.08029554784297943,
0.2680494785308838,
0.3867274820804596,
0.023064687848091125,
0.1932051032781601,
-0.2736714780330658,
0.32062557339668274,
0.32221198081970215,
-0.07790113985538483,
-0.37187668681144714,
-0.25995296239852905,
0.0458599328994751,
0.10769940167665482,
0.10182449966669083,
-0.030977629125118256,
0.024044930934906006,
-0.20116642117500305,
-0.3315497040748596,
0.3971157670021057,
0.053239867091178894,
0.08739964663982391,
0.30243435502052307,
-0.08639900386333466,
0.06044421344995499,
0.24158407747745514,
-0.07986896485090256,
-0.020366467535495758,
-0.06905803084373474,
0.030476901680231094,
-0.01318269595503807,
-0.04661652818322182,
0.06559930741786957,
0.06714365631341934,
0.06914966553449631,
0.011993318796157837,
0.03224834427237511,
0.5499170422554016,
-0.301332950592041,
0.026421111077070236,
0.20259757339954376,
0.2565910220146179,
-0.07167074084281921,
-0.3626755177974701,
0.001368379220366478,
0.1364889144897461,
0.38151973485946655,
-0.3571908473968506,
-0.1150803416967392,
0.40753045678138733,
0.1416529417037964,
0.13569627702236176,
0.1534605622291565,
0.15096090734004974,
-0.06153831630945206,
0.31276512145996094,
0.016229741275310516,
0.1870703101158142,
-0.18387755751609802,
0.12107384204864502,
0.384248286485672,
-0.05909526348114014,
0.14735345542430878,
0.31825029850006104,
0.2877362370491028,
-0.049593932926654816,
0.29113703966140747,
0.06631423532962799,
-0.029749670997262,
-0.17919406294822693,
0.2915975749492645,
-0.0968019887804985,
-0.2994912266731262,
0.3273136615753174,
0.1368473321199417,
-0.24083095788955688,
0.3581094741821289,
0.17083024978637695,
0.20967817306518555,
-0.19216640293598175,
-0.2833569347858429,
-0.2604635953903198,
0.3138658404350281,
-0.4095665514469147,
-0.24183376133441925,
-0.12234146147966385,
-0.1359010934829712,
0.004257798194885254,
0.13825584948062897,
-0.16985458135604858,
-0.07166074216365814,
0.43690699338912964,
-0.09631182253360748,
-0.12445323169231415,
-0.27130457758903503,
-0.052637241780757904,
-0.14269018173217773,
0.2615811824798584,
0.0010815002024173737,
0.22032926976680756,
-0.019368231296539307,
0.060274749994277954,
0.1005868911743164,
0.08356447517871857,
-0.015471462160348892,
-0.10959562659263611,
0.2074824869632721,
0.14299054443836212,
-0.10101635754108429,
-0.26375526189804077,
-0.08821772038936615,
0.37721341848373413,
0.1925724893808365,
0.08870790898799896,
0.2937479317188263,
0.24678784608840942,
-0.23899215459823608,
-0.04110446199774742,
0.155591681599617,
0.4759063422679901,
-0.24299345910549164,
0.22956597805023193,
-0.11528638005256653,
-0.3539074659347534,
-0.15495364367961884,
-0.3295598030090332,
-0.17102330923080444,
0.03757989779114723,
0.18874572217464447,
0.04514988511800766,
0.34760934114456177,
-0.1241077110171318,
0.15889781713485718,
0.24089404940605164,
0.1669628769159317,
0.04675411060452461,
-0.47080960869789124,
-0.12845784425735474,
-0.24333496391773224,
-0.5270618200302124,
-0.007869325578212738,
0.0818515419960022,
-0.02269124984741211,
-0.12376657128334045,
0.1700599640607834,
0.43727460503578186,
-0.0557212233543396,
0.16749069094657898,
-0.29889339208602905,
0.027743645012378693,
-0.05543734133243561,
-0.1381867229938507,
-0.24292154610157013,
-0.0012601539492607117,
-0.05268190801143646,
0.09436966478824615,
-0.2242772877216339,
0.18009449541568756,
0.19355663657188416,
0.1312589943408966,
-0.12391132116317749,
0.3565220236778259,
-0.5263643264770508,
-0.30314505100250244,
0.1618172824382782,
0.30169814825057983,
0.07158011943101883,
-0.24732860922813416,
-0.005823265761137009,
-0.0275595523416996,
-0.1512509286403656,
-0.07747354358434677,
0.2821401357650757,
-0.14654649794101715,
0.38066092133522034,
-0.050094179809093475,
-0.3484109342098236,
-0.06851021200418472,
0.10272438824176788,
0.2090614289045334,
-0.020418759435415268,
-0.28498679399490356,
0.3154360055923462,
-0.01718936115503311,
-0.18484848737716675,
0.09499067813158035,
0.22793224453926086,
-0.09256531298160553,
0.023107225075364113,
0.05863429605960846,
-0.4211030900478363,
0.4729940891265869,
-0.42695024609565735,
-0.37384361028671265,
0.07099795341491699,
0.13018018007278442,
0.17014990746974945,
-0.22352734208106995,
-0.6250749826431274,
-0.006051890552043915,
0.17109818756580353,
-0.3379547894001007,
-0.1425619274377823,
0.32807987928390503,
-0.1809660792350769,
0.11336614191532135,
-0.14325262606143951,
0.46122971177101135,
0.24362331628799438,
-0.2658311426639557,
0.2238108515739441,
-0.22942756116390228
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | I'm not able to reproduce this, do you think you can provide a code that creates a DatasetDict that has this issue when saving and reloading ? | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 27 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
I'm not able to reproduce this, do you think you can provide a code that creates a DatasetDict that has this issue when saving and reloading ? | [
-0.19467994570732117,
0.11409823596477509,
-0.012763982638716698,
0.284942626953125,
0.06459227204322815,
-0.06141713261604309,
0.13233943283557892,
0.4565897285938263,
0.442236989736557,
0.17922884225845337,
0.2358965277671814,
0.38085129857063293,
0.0545867383480072,
-0.05616796389222145,
-0.1504480540752411,
-0.06224930286407471,
0.2574024200439453,
0.13625237345695496,
0.04726205766201019,
0.12693332135677338,
-0.19149628281593323,
0.24653087556362152,
-0.14968959987163544,
-0.0032423511147499084,
-0.18960000574588776,
0.14378683269023895,
-0.2581939995288849,
0.29428017139434814,
-0.3553469479084015,
-0.6636255383491516,
0.29404765367507935,
0.4080148935317993,
0.342583030462265,
0.5095263123512268,
-0.00012341018009465188,
0.05441752076148987,
0.2841648459434509,
-0.20966434478759766,
-0.44848009943962097,
-0.4640182852745056,
-0.1993894875049591,
0.013694105669856071,
0.24731115996837616,
-0.15678125619888306,
0.17459121346473694,
-0.07328474521636963,
-0.03211017698049545,
-0.42203572392463684,
0.1694842278957367,
0.3417607247829437,
0.14071522653102875,
0.22665590047836304,
0.27649015188217163,
-0.22191408276557922,
-0.25477996468544006,
0.3302724361419678,
-0.02041705697774887,
0.48288407921791077,
-0.01869232952594757,
0.07316861301660538,
0.04144430160522461,
0.07422488927841187,
-0.019542811438441277,
-0.10177960991859436,
0.09392538666725159,
-0.024730894714593887,
0.1620432585477829,
-0.051342859864234924,
0.2408142387866974,
0.1979953944683075,
0.6499523520469666,
-0.20139962434768677,
-0.5342013239860535,
0.035244546830654144,
-0.06113045662641525,
0.17862267792224884,
0.3324403762817383,
-0.06982438266277313,
0.083963543176651,
0.3244956433773041,
-0.09978208690881729,
-0.36534860730171204,
-0.2351388782262802,
-0.1203211098909378,
0.07101882994174957,
-0.2877642512321472,
-0.0193994902074337,
0.1131955161690712,
-0.03970959410071373,
0.02144641801714897,
0.4245891273021698,
-0.3535502552986145,
-0.34899020195007324,
-0.10199785977602005,
-0.04592717066407204,
-0.11440081149339676,
-0.06533422321081161,
-0.2706739604473114,
0.11334694176912308,
-0.07209957391023636,
0.2517625391483307,
0.13161873817443848,
-0.03917121887207031,
0.06024612486362457,
0.21152466535568237,
0.27498859167099,
0.4198956787586212,
0.2743377089500427,
0.03575153648853302,
0.07143523544073105,
-0.23575252294540405,
0.08389294147491455,
-0.04040997475385666,
-0.15166021883487701,
0.20883211493492126,
-0.13580429553985596,
0.5703296661376953,
-0.4004870355129242,
-0.32741665840148926,
0.2602047324180603,
-0.27430546283721924,
-0.17296062409877777,
-0.10397962480783463,
0.22403156757354736,
0.09327937662601471,
0.197241872549057,
0.1087377667427063,
0.3317790627479553,
0.04689546674489975,
0.02778119221329689,
-0.1801333874464035,
0.03530392423272133,
0.040068838745355606,
0.011786631308495998,
0.01797817274928093,
-0.09995760023593903,
0.2674607038497925,
0.015178094618022442,
-0.45771729946136475,
-0.1766548901796341,
-0.04136189818382263,
-0.04732748866081238,
0.25143006443977356,
0.038321252912282944,
-0.2181580513715744,
-0.0566825345158577,
0.2363061010837555,
0.12630023062229156,
-0.22399482131004333,
0.21204230189323425,
0.07184401154518127,
-0.15890643000602722,
-0.1686420887708664,
0.12280381470918655,
-0.3944004774093628,
-0.2602536976337433,
-0.28193363547325134,
-0.04939955845475197,
-0.083664171397686,
-0.2920120656490326,
-0.11237309128046036,
-0.32877612113952637,
-0.23735608160495758,
-0.12257138639688492,
0.14289870858192444,
0.43071162700653076,
-0.5336275100708008,
0.19424393773078918,
0.18607616424560547,
-0.029021237045526505,
0.09660618007183075,
-0.023078318685293198,
0.0003097584703937173,
0.13802263140678406,
-0.17932048439979553,
0.1278734654188156,
0.4110458493232727,
-0.5454345345497131,
-0.6159429550170898,
0.3077109456062317,
-0.0049896761775016785,
0.17820580303668976,
-0.14376580715179443,
-0.021746927872300148,
0.2127341777086258,
-0.05300583690404892,
0.05443805456161499,
0.058973006904125214,
0.05343620479106903,
-0.057524338364601135,
-0.4947074055671692,
-0.33287057280540466,
0.11665244400501251,
-0.01325948815792799,
-0.05561127886176109,
0.09193755686283112,
0.15818196535110474,
-0.2094929963350296,
0.4844790995121002,
-0.08584120869636536,
-0.18125492334365845,
0.11700885742902756,
0.45155882835388184,
-0.07388898730278015,
0.027472946792840958,
-0.2316354513168335,
-0.550897479057312,
0.4312419891357422,
0.03772849589586258,
-0.022250764071941376,
-0.04894094169139862,
0.05837750434875488,
-0.43798014521598816,
0.12034308165311813,
-0.31824731826782227,
0.046510979533195496,
0.010616883635520935,
0.07837720960378647,
-0.08669508993625641,
-0.008824175223708153,
-0.11494044959545135,
0.1405704915523529,
-0.15196174383163452,
0.06985821574926376,
0.004358732141554356,
0.33659958839416504,
-0.20373782515525818,
-0.22051605582237244,
0.1709301769733429,
-0.012789398431777954,
0.2898365557193756,
-0.26781371235847473,
-0.32017815113067627,
0.4959193468093872,
0.22827482223510742,
0.021591633558273315,
-0.07041439414024353,
-0.33709716796875,
-0.09507101774215698,
-0.026020508259534836,
0.19282545149326324,
0.49834465980529785,
0.05740605294704437,
0.0559966117143631,
-0.2572023868560791,
0.3138725161552429,
0.06572319567203522,
0.05681299790740013,
0.07007813453674316,
0.17818991839885712,
0.2946602404117584,
-0.024420442059636116,
-0.017040159553289413,
-0.3440817892551422,
0.21742989122867584,
0.018818117678165436,
0.010233692824840546,
0.07537292689085007,
-0.13353221118450165,
0.1482347995042801,
0.2589491307735443,
0.03663874790072441,
0.18287676572799683,
0.08732600510120392,
0.002122841775417328,
-0.41023221611976624,
0.05919934809207916,
0.3296467661857605,
0.6812973022460938,
-0.012020837515592575,
-0.08989879488945007,
-0.05428658425807953,
-0.03938661888241768,
0.039272602647542953,
0.14949113130569458,
-0.017295323312282562,
0.27114737033843994,
0.1783985197544098,
0.19017189741134644,
0.06896668672561646,
-0.21231281757354736,
-0.1901514232158661,
-0.007371923886239529,
0.05106457322835922,
-0.3820841312408447,
0.13152764737606049,
-0.13793031871318817,
0.5604398846626282,
-0.2043236792087555,
-0.5258814692497253,
-0.0548606775701046,
-0.3896040916442871,
-0.11086899042129517,
0.3982454240322113,
-0.10519488155841827,
0.042094551026821136,
-0.5863333940505981,
0.04286506772041321,
-0.0554988756775856,
-0.32560744881629944,
-0.11134722828865051,
-0.1961996704339981,
-0.12637397646903992,
-0.15539425611495972,
0.11374306678771973,
0.19289612770080566,
0.21791379153728485,
-0.10947050154209137,
-0.1682271659374237,
-0.43471473455429077,
-0.33398208022117615,
0.15419557690620422,
-0.10126429796218872,
0.050694920122623444,
0.18500767648220062,
-0.06597936153411865,
0.17979301512241364,
-0.00648542633280158,
0.009808866307139397,
-0.15558446943759918,
-0.33245065808296204,
0.19189225137233734,
0.2623600661754608,
-0.17951488494873047,
0.04053007438778877,
-0.4744686782360077,
-0.31704819202423096,
-0.3201011121273041,
0.24106962978839874,
-0.07163342833518982,
0.029591575264930725,
0.05103490129113197,
0.17495639622211456,
0.15245549380779266,
0.015661977231502533,
0.10222288221120834,
-0.02047821879386902,
-0.1949141025543213,
0.11717486381530762,
-0.014176921918988228,
-0.45008382201194763,
0.10882437229156494,
0.03576889634132385,
0.14726465940475464,
0.20899184048175812,
-0.2778182029724121,
-0.14429721236228943,
0.004703793674707413,
0.4145680367946625,
-0.03296497464179993,
-0.29652243852615356,
0.49942445755004883,
0.33558809757232666,
0.029788224026560783,
-0.15712398290634155,
-0.05984240770339966,
0.13958890736103058,
0.09975816309452057,
0.21273687481880188,
-0.35715949535369873,
0.45449110865592957,
-0.39673739671707153,
0.26238909363746643,
-0.056121256202459335,
-0.1933417171239853,
0.21922415494918823,
0.13551419973373413,
0.3633723556995392,
-0.41957417130470276,
-0.25011932849884033,
-0.01812082529067993,
-0.22729992866516113,
-0.14209067821502686,
0.04918668791651726,
-0.1898752748966217,
0.3078673183917999,
-0.01130182296037674,
-0.2713412940502167,
-0.12127666175365448,
-0.3088129460811615,
-0.08830910921096802,
-0.6213799118995667,
0.25254547595977783,
0.12949839234352112,
0.251217246055603,
-0.15207289159297943,
0.05704820156097412,
0.054892074316740036,
0.10568425059318542,
0.3619898855686188,
-0.1298968344926834,
-0.6689377427101135,
0.4119170010089874,
-0.2728247046470642,
0.3531419038772583,
0.01700311340391636,
0.6950640082359314,
0.0251033715903759,
-0.18779173493385315,
-0.07401177287101746,
-0.0956239402294159,
0.3716631531715393,
0.13012611865997314,
0.07774682343006134,
0.18752264976501465,
-0.15032640099525452,
-0.6920769214630127,
-0.1083945780992508,
0.05039623752236366,
0.383085697889328,
0.12623141705989838,
0.3629613220691681,
-0.017780669033527374,
-0.19913393259048462,
0.21982342004776,
0.38812965154647827,
-0.1670641303062439,
-0.27437624335289,
-0.2853175103664398,
-0.13652393221855164,
-0.15154454112052917,
-0.28107982873916626,
-0.041963230818510056,
0.21960727870464325,
-0.2597104609012604,
-0.06253167241811752,
-0.5216526985168457,
-0.31587299704551697,
0.06414709240198135,
0.19993379712104797,
0.44706404209136963,
-0.3979615569114685,
0.21827881038188934,
0.25032806396484375,
0.16970522701740265,
0.5388915538787842,
0.4505366384983063,
-0.05123823508620262,
-0.47957324981689453,
-0.03966139256954193,
-0.19131849706172943,
0.046155355870723724,
0.04788430780172348,
-0.046260323375463486,
-0.18486973643302917,
0.06302392482757568,
-0.2803141474723816,
-0.3086201548576355,
0.09113585203886032,
0.09951789677143097,
0.044045526534318924,
-0.3165181875228882,
-0.17713560163974762,
0.5262098908424377,
-0.09772197902202606,
-0.13015194237232208,
0.4414812922477722,
0.33308660984039307,
-0.23646984994411469,
0.5683746933937073,
-0.035057611763477325,
0.6247904300689697,
0.20053763687610626,
0.1264469474554062,
0.2727004289627075,
-0.5154507160186768,
0.06266596913337708,
0.5921412110328674,
0.029437461867928505,
-0.5868446826934814,
-0.15536026656627655,
0.03312484174966812,
-0.12538300454616547,
0.03268200904130936,
0.03686990588903427,
-0.3613358736038208,
0.07163339853286743,
0.008446767926216125,
-0.28222760558128357,
0.11833761632442474,
0.35935771465301514,
-0.20790159702301025,
0.15893985331058502,
-0.30331963300704956,
0.09121984243392944,
0.11379021406173706,
0.10303100943565369,
-0.08773671090602875,
-0.06607595086097717,
-0.14195160567760468,
-0.3079773187637329,
-0.13253121078014374,
0.2350480556488037,
-0.11993934214115143,
0.4439120888710022,
0.2897055149078369,
-0.4493193030357361,
0.2196410745382309,
0.21744754910469055,
0.4070444703102112,
-0.05828620120882988,
-0.12899285554885864,
-0.044320713728666306,
-0.2538415193557739,
-0.05696284770965576,
0.27508339285850525,
-0.020860349759459496,
0.23575900495052338,
0.024320103228092194,
-0.24130818247795105,
0.014923810958862305,
-0.2202433943748474,
-0.34887081384658813,
-0.21365496516227722,
-0.02526117116212845,
0.09170098602771759,
-0.40334153175354004,
-0.5704158544540405,
-0.3656395673751831,
-0.13380378484725952,
-0.3513590097427368,
0.04516198858618736,
0.13698148727416992,
0.0903131514787674,
0.13455092906951904,
-0.030370380729436874,
-0.37278831005096436,
0.12868404388427734,
0.4785129427909851,
-0.1395132839679718,
-0.23650668561458588,
0.5704623460769653,
-0.06644968688488007,
0.11639682948589325,
-0.22008246183395386,
0.16686826944351196,
0.29374757409095764,
-0.21604406833648682,
0.42916789650917053,
-0.23521925508975983,
-0.10538476705551147,
-0.033432383090257645,
0.5656454563140869,
0.1970892995595932,
-0.11961065977811813,
0.05682099238038063,
-0.2952885627746582,
-0.32371941208839417,
0.13764506578445435,
-0.03804723545908928,
0.46340319514274597,
-0.017283260822296143,
-0.30750057101249695,
-0.20984911918640137,
0.11282876133918762,
-0.20284488797187805,
0.0374976322054863,
0.01600019447505474,
0.04490775242447853,
0.1605370193719864,
-0.04620515555143356,
0.18105448782444,
-0.3117868900299072,
0.09754084795713425,
-0.16287189722061157,
0.035566963255405426,
-0.020624438300728798,
-0.22627128660678864,
0.17174911499023438,
0.1430513858795166,
0.2631169259548187,
-0.09589648246765137,
-0.13932910561561584,
0.004311541095376015,
-0.07367327064275742,
-0.03780914843082428,
0.3947650194168091,
-0.12234467267990112,
0.2778862714767456,
0.08953393995761871,
0.2064661979675293,
-0.1312054991722107,
0.22921088337898254,
0.06442123651504517,
0.30759119987487793,
-0.07577773928642273,
0.21964383125305176,
-0.07942210137844086,
-0.08923641592264175,
-0.23260293900966644,
0.18260392546653748,
0.02932862937450409,
0.09558281302452087,
0.18232488632202148,
-0.18027567863464355,
-0.04118836671113968,
0.11043112725019455,
0.25676870346069336,
0.5237186551094055,
-0.14971722662448883,
-0.23714043200016022,
-0.021324634552001953,
0.1600281298160553,
-0.16015034914016724,
-0.20174361765384674,
0.30036279559135437,
-0.08352956175804138,
-0.11629049479961395,
-0.07652302831411362,
-0.2054966241121292,
-0.1942749321460724,
-0.19851623475551605,
0.3335355222225189,
0.540127158164978,
-0.07226986438035965,
0.2756752371788025,
0.10503681004047394,
-0.1331188678741455,
0.1698136031627655,
0.4339623749256134,
-0.026871714740991592,
0.27280715107917786,
0.2969134747982025,
-0.010699808597564697,
0.47526997327804565,
0.10813737660646439,
0.17630067467689514,
0.14447373151779175,
0.02955232933163643,
0.05013871192932129,
-0.23837295174598694,
0.03397581726312637,
0.03377671539783478,
0.037904299795627594,
0.20748764276504517,
-0.5338287353515625,
-0.009571323171257973,
-0.052913203835487366,
-0.3925672173500061,
-0.050362445414066315,
-0.21667374670505524,
-0.2375054508447647,
-0.11660647392272949,
0.191665381193161,
-0.08714815974235535,
-0.1870366334915161,
0.25690269470214844,
0.18545816838741302,
0.13413408398628235,
-0.12626948952674866,
-0.19911698997020721,
0.2447042167186737,
0.1286832094192505,
-0.11523232609033585,
-0.24231389164924622,
0.11653079092502594,
0.06552582234144211,
-0.02700403332710266,
0.2843687832355499,
0.3048303723335266,
0.5131983757019043,
0.4630439281463623,
-0.12355412542819977,
-0.09367375075817108,
-0.06761860847473145,
-0.08907455950975418,
0.16065973043441772,
0.11764409393072128,
-0.22886934876441956,
0.14198800921440125,
0.34979525208473206,
0.10425234586000443,
0.05256592482328415,
0.35542652010917664,
0.18288469314575195,
0.25523996353149414,
-0.07936456799507141,
0.8174863457679749,
0.06526531279087067,
-0.4018477499485016,
0.18539446592330933,
0.20612473785877228,
-0.05622737109661102,
-0.24233214557170868,
0.25479254126548767,
0.23797515034675598,
0.035411689430475235,
0.04309958219528198,
0.04295113682746887,
-0.07612974941730499,
0.406138151884079,
0.39452534914016724,
-0.009130015969276428,
-0.25308957695961,
0.20115037262439728,
-0.5567248463630676,
0.12672148644924164,
0.11506767570972443,
-0.024235811084508896,
0.17355863749980927,
0.18861617147922516,
0.17911790311336517,
-0.007998321205377579,
0.12340383976697922,
0.3020167648792267,
-0.2655389904975891,
-0.07327590882778168,
-0.20394892990589142,
-0.048358116298913956,
0.17002324759960175,
-0.03841741383075714,
-0.0339166596531868,
-0.4353083074092865,
0.23178622126579285,
-0.21523022651672363,
-0.04080244153738022,
-0.12031042575836182,
-0.1444326490163803,
-0.03168055787682533,
-0.03436101973056793,
0.419456422328949,
0.12867341935634613,
0.4079837501049042,
0.04966282844543457,
-0.407670795917511,
-0.2884944677352905,
-0.1973593384027481,
-0.15792323648929596,
0.2628084123134613,
0.09484924376010895,
0.6385337114334106,
-0.09726943075656891,
0.04521259665489197,
-0.2792316973209381,
0.25948938727378845,
-0.128692626953125,
-0.07732559740543365,
-0.20838171243667603,
0.16525332629680634,
0.13980749249458313,
0.010335864499211311,
0.26789191365242004,
0.11656053364276886,
-0.06769666820764542,
0.3758801817893982,
-0.3817225694656372,
-0.28332653641700745,
0.4406757056713104,
0.021083995699882507,
-0.19059859216213226,
-0.016219675540924072,
0.3005397915840149,
-0.04263407737016678,
-0.18162915110588074,
-0.7152318954467773,
0.0028660371899604797,
0.41550976037979126,
-0.00631801038980484,
-0.0824659988284111,
0.10223747789859772,
0.28987574577331543,
0.18652406334877014,
-0.008999347686767578,
0.5413073301315308,
-0.01087275892496109,
0.011300580576062202,
-0.09686369448900223,
-0.07294753193855286
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | Hi, I just ran into a similar error. Here is the minimal code to reproduce:
```python
from datasets import load_dataset, DatasetDict
ds = load_dataset('super_glue', 'multirc')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
```bash
Reusing dataset super_glue (/home/idahl/.cache/huggingface/datasets/super_glue/multirc/1.0.2/2fb163bca9085c1deb906aff20f00c242227ff704a4e8c9cfdfe820be3abfc83)
Traceback (most recent call last):
File "/home/idahl/eval-util-expl/multirc/tmp.py", line 7, in <module>
ds = DatasetDict.load_from_disk('tempds')
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/dataset_dict.py", line 710, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 687, in load_from_disk
return Dataset(
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 274, in __init__
raise ValueError(
ValueError: External features info don't match the dataset:
Got
{'answer': Value(dtype='string', id=None), 'idx': {'answer': Value(dtype='int32', id=None), 'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None)}, 'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<answer: int32, paragraph: int32, question: int32>, label: int64, paragraph: string, question: string>
but expected something like
{'answer': Value(dtype='string', id=None), 'idx': {'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None), 'answer': Value(dtype='int32', id=None)}, 'label': Value(dtype='int64', id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<paragraph: int32, question: int32, answer: int32>, label: int64, paragraph: string, question: string>
```
The non-matching part seems to be
`'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None),`
vs
`'label': Value(dtype='int64', id=None),`
And the order in the `<struct...` being different, which might cause the [features.type != inferred_features.type](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L274) condition to become true and raise this ValueError.
I am using datasets version 1.6.2.
Edit: can confirm, this works without error in version 1.5.0 | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 226 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
Hi, I just ran into a similar error. Here is the minimal code to reproduce:
```python
from datasets import load_dataset, DatasetDict
ds = load_dataset('super_glue', 'multirc')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
```bash
Reusing dataset super_glue (/home/idahl/.cache/huggingface/datasets/super_glue/multirc/1.0.2/2fb163bca9085c1deb906aff20f00c242227ff704a4e8c9cfdfe820be3abfc83)
Traceback (most recent call last):
File "/home/idahl/eval-util-expl/multirc/tmp.py", line 7, in <module>
ds = DatasetDict.load_from_disk('tempds')
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/dataset_dict.py", line 710, in load_from_disk
dataset_dict[k] = Dataset.load_from_disk(dataset_dict_split_path, fs, keep_in_memory=keep_in_memory)
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 687, in load_from_disk
return Dataset(
File "/home/idahl/miniconda3/envs/eval-util-expl/lib/python3.9/site-packages/datasets/arrow_dataset.py", line 274, in __init__
raise ValueError(
ValueError: External features info don't match the dataset:
Got
{'answer': Value(dtype='string', id=None), 'idx': {'answer': Value(dtype='int32', id=None), 'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None)}, 'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<answer: int32, paragraph: int32, question: int32>, label: int64, paragraph: string, question: string>
but expected something like
{'answer': Value(dtype='string', id=None), 'idx': {'paragraph': Value(dtype='int32', id=None), 'question': Value(dtype='int32', id=None), 'answer': Value(dtype='int32', id=None)}, 'label': Value(dtype='int64', id=None), 'paragraph': Value(dtype='string', id=None), 'question': Value(dtype='string', id=None)}
with type
struct<answer: string, idx: struct<paragraph: int32, question: int32, answer: int32>, label: int64, paragraph: string, question: string>
```
The non-matching part seems to be
`'label': ClassLabel(num_classes=2, names=['False', 'True'], names_file=None, id=None),`
vs
`'label': Value(dtype='int64', id=None),`
And the order in the `<struct...` being different, which might cause the [features.type != inferred_features.type](https://github.com/huggingface/datasets/blob/master/src/datasets/arrow_dataset.py#L274) condition to become true and raise this ValueError.
I am using datasets version 1.6.2.
Edit: can confirm, this works without error in version 1.5.0 | [
-0.19467994570732117,
0.11409823596477509,
-0.012763982638716698,
0.284942626953125,
0.06459227204322815,
-0.06141713261604309,
0.13233943283557892,
0.4565897285938263,
0.442236989736557,
0.17922884225845337,
0.2358965277671814,
0.38085129857063293,
0.0545867383480072,
-0.05616796389222145,
-0.1504480540752411,
-0.06224930286407471,
0.2574024200439453,
0.13625237345695496,
0.04726205766201019,
0.12693332135677338,
-0.19149628281593323,
0.24653087556362152,
-0.14968959987163544,
-0.0032423511147499084,
-0.18960000574588776,
0.14378683269023895,
-0.2581939995288849,
0.29428017139434814,
-0.3553469479084015,
-0.6636255383491516,
0.29404765367507935,
0.4080148935317993,
0.342583030462265,
0.5095263123512268,
-0.00012341018009465188,
0.05441752076148987,
0.2841648459434509,
-0.20966434478759766,
-0.44848009943962097,
-0.4640182852745056,
-0.1993894875049591,
0.013694105669856071,
0.24731115996837616,
-0.15678125619888306,
0.17459121346473694,
-0.07328474521636963,
-0.03211017698049545,
-0.42203572392463684,
0.1694842278957367,
0.3417607247829437,
0.14071522653102875,
0.22665590047836304,
0.27649015188217163,
-0.22191408276557922,
-0.25477996468544006,
0.3302724361419678,
-0.02041705697774887,
0.48288407921791077,
-0.01869232952594757,
0.07316861301660538,
0.04144430160522461,
0.07422488927841187,
-0.019542811438441277,
-0.10177960991859436,
0.09392538666725159,
-0.024730894714593887,
0.1620432585477829,
-0.051342859864234924,
0.2408142387866974,
0.1979953944683075,
0.6499523520469666,
-0.20139962434768677,
-0.5342013239860535,
0.035244546830654144,
-0.06113045662641525,
0.17862267792224884,
0.3324403762817383,
-0.06982438266277313,
0.083963543176651,
0.3244956433773041,
-0.09978208690881729,
-0.36534860730171204,
-0.2351388782262802,
-0.1203211098909378,
0.07101882994174957,
-0.2877642512321472,
-0.0193994902074337,
0.1131955161690712,
-0.03970959410071373,
0.02144641801714897,
0.4245891273021698,
-0.3535502552986145,
-0.34899020195007324,
-0.10199785977602005,
-0.04592717066407204,
-0.11440081149339676,
-0.06533422321081161,
-0.2706739604473114,
0.11334694176912308,
-0.07209957391023636,
0.2517625391483307,
0.13161873817443848,
-0.03917121887207031,
0.06024612486362457,
0.21152466535568237,
0.27498859167099,
0.4198956787586212,
0.2743377089500427,
0.03575153648853302,
0.07143523544073105,
-0.23575252294540405,
0.08389294147491455,
-0.04040997475385666,
-0.15166021883487701,
0.20883211493492126,
-0.13580429553985596,
0.5703296661376953,
-0.4004870355129242,
-0.32741665840148926,
0.2602047324180603,
-0.27430546283721924,
-0.17296062409877777,
-0.10397962480783463,
0.22403156757354736,
0.09327937662601471,
0.197241872549057,
0.1087377667427063,
0.3317790627479553,
0.04689546674489975,
0.02778119221329689,
-0.1801333874464035,
0.03530392423272133,
0.040068838745355606,
0.011786631308495998,
0.01797817274928093,
-0.09995760023593903,
0.2674607038497925,
0.015178094618022442,
-0.45771729946136475,
-0.1766548901796341,
-0.04136189818382263,
-0.04732748866081238,
0.25143006443977356,
0.038321252912282944,
-0.2181580513715744,
-0.0566825345158577,
0.2363061010837555,
0.12630023062229156,
-0.22399482131004333,
0.21204230189323425,
0.07184401154518127,
-0.15890643000602722,
-0.1686420887708664,
0.12280381470918655,
-0.3944004774093628,
-0.2602536976337433,
-0.28193363547325134,
-0.04939955845475197,
-0.083664171397686,
-0.2920120656490326,
-0.11237309128046036,
-0.32877612113952637,
-0.23735608160495758,
-0.12257138639688492,
0.14289870858192444,
0.43071162700653076,
-0.5336275100708008,
0.19424393773078918,
0.18607616424560547,
-0.029021237045526505,
0.09660618007183075,
-0.023078318685293198,
0.0003097584703937173,
0.13802263140678406,
-0.17932048439979553,
0.1278734654188156,
0.4110458493232727,
-0.5454345345497131,
-0.6159429550170898,
0.3077109456062317,
-0.0049896761775016785,
0.17820580303668976,
-0.14376580715179443,
-0.021746927872300148,
0.2127341777086258,
-0.05300583690404892,
0.05443805456161499,
0.058973006904125214,
0.05343620479106903,
-0.057524338364601135,
-0.4947074055671692,
-0.33287057280540466,
0.11665244400501251,
-0.01325948815792799,
-0.05561127886176109,
0.09193755686283112,
0.15818196535110474,
-0.2094929963350296,
0.4844790995121002,
-0.08584120869636536,
-0.18125492334365845,
0.11700885742902756,
0.45155882835388184,
-0.07388898730278015,
0.027472946792840958,
-0.2316354513168335,
-0.550897479057312,
0.4312419891357422,
0.03772849589586258,
-0.022250764071941376,
-0.04894094169139862,
0.05837750434875488,
-0.43798014521598816,
0.12034308165311813,
-0.31824731826782227,
0.046510979533195496,
0.010616883635520935,
0.07837720960378647,
-0.08669508993625641,
-0.008824175223708153,
-0.11494044959545135,
0.1405704915523529,
-0.15196174383163452,
0.06985821574926376,
0.004358732141554356,
0.33659958839416504,
-0.20373782515525818,
-0.22051605582237244,
0.1709301769733429,
-0.012789398431777954,
0.2898365557193756,
-0.26781371235847473,
-0.32017815113067627,
0.4959193468093872,
0.22827482223510742,
0.021591633558273315,
-0.07041439414024353,
-0.33709716796875,
-0.09507101774215698,
-0.026020508259534836,
0.19282545149326324,
0.49834465980529785,
0.05740605294704437,
0.0559966117143631,
-0.2572023868560791,
0.3138725161552429,
0.06572319567203522,
0.05681299790740013,
0.07007813453674316,
0.17818991839885712,
0.2946602404117584,
-0.024420442059636116,
-0.017040159553289413,
-0.3440817892551422,
0.21742989122867584,
0.018818117678165436,
0.010233692824840546,
0.07537292689085007,
-0.13353221118450165,
0.1482347995042801,
0.2589491307735443,
0.03663874790072441,
0.18287676572799683,
0.08732600510120392,
0.002122841775417328,
-0.41023221611976624,
0.05919934809207916,
0.3296467661857605,
0.6812973022460938,
-0.012020837515592575,
-0.08989879488945007,
-0.05428658425807953,
-0.03938661888241768,
0.039272602647542953,
0.14949113130569458,
-0.017295323312282562,
0.27114737033843994,
0.1783985197544098,
0.19017189741134644,
0.06896668672561646,
-0.21231281757354736,
-0.1901514232158661,
-0.007371923886239529,
0.05106457322835922,
-0.3820841312408447,
0.13152764737606049,
-0.13793031871318817,
0.5604398846626282,
-0.2043236792087555,
-0.5258814692497253,
-0.0548606775701046,
-0.3896040916442871,
-0.11086899042129517,
0.3982454240322113,
-0.10519488155841827,
0.042094551026821136,
-0.5863333940505981,
0.04286506772041321,
-0.0554988756775856,
-0.32560744881629944,
-0.11134722828865051,
-0.1961996704339981,
-0.12637397646903992,
-0.15539425611495972,
0.11374306678771973,
0.19289612770080566,
0.21791379153728485,
-0.10947050154209137,
-0.1682271659374237,
-0.43471473455429077,
-0.33398208022117615,
0.15419557690620422,
-0.10126429796218872,
0.050694920122623444,
0.18500767648220062,
-0.06597936153411865,
0.17979301512241364,
-0.00648542633280158,
0.009808866307139397,
-0.15558446943759918,
-0.33245065808296204,
0.19189225137233734,
0.2623600661754608,
-0.17951488494873047,
0.04053007438778877,
-0.4744686782360077,
-0.31704819202423096,
-0.3201011121273041,
0.24106962978839874,
-0.07163342833518982,
0.029591575264930725,
0.05103490129113197,
0.17495639622211456,
0.15245549380779266,
0.015661977231502533,
0.10222288221120834,
-0.02047821879386902,
-0.1949141025543213,
0.11717486381530762,
-0.014176921918988228,
-0.45008382201194763,
0.10882437229156494,
0.03576889634132385,
0.14726465940475464,
0.20899184048175812,
-0.2778182029724121,
-0.14429721236228943,
0.004703793674707413,
0.4145680367946625,
-0.03296497464179993,
-0.29652243852615356,
0.49942445755004883,
0.33558809757232666,
0.029788224026560783,
-0.15712398290634155,
-0.05984240770339966,
0.13958890736103058,
0.09975816309452057,
0.21273687481880188,
-0.35715949535369873,
0.45449110865592957,
-0.39673739671707153,
0.26238909363746643,
-0.056121256202459335,
-0.1933417171239853,
0.21922415494918823,
0.13551419973373413,
0.3633723556995392,
-0.41957417130470276,
-0.25011932849884033,
-0.01812082529067993,
-0.22729992866516113,
-0.14209067821502686,
0.04918668791651726,
-0.1898752748966217,
0.3078673183917999,
-0.01130182296037674,
-0.2713412940502167,
-0.12127666175365448,
-0.3088129460811615,
-0.08830910921096802,
-0.6213799118995667,
0.25254547595977783,
0.12949839234352112,
0.251217246055603,
-0.15207289159297943,
0.05704820156097412,
0.054892074316740036,
0.10568425059318542,
0.3619898855686188,
-0.1298968344926834,
-0.6689377427101135,
0.4119170010089874,
-0.2728247046470642,
0.3531419038772583,
0.01700311340391636,
0.6950640082359314,
0.0251033715903759,
-0.18779173493385315,
-0.07401177287101746,
-0.0956239402294159,
0.3716631531715393,
0.13012611865997314,
0.07774682343006134,
0.18752264976501465,
-0.15032640099525452,
-0.6920769214630127,
-0.1083945780992508,
0.05039623752236366,
0.383085697889328,
0.12623141705989838,
0.3629613220691681,
-0.017780669033527374,
-0.19913393259048462,
0.21982342004776,
0.38812965154647827,
-0.1670641303062439,
-0.27437624335289,
-0.2853175103664398,
-0.13652393221855164,
-0.15154454112052917,
-0.28107982873916626,
-0.041963230818510056,
0.21960727870464325,
-0.2597104609012604,
-0.06253167241811752,
-0.5216526985168457,
-0.31587299704551697,
0.06414709240198135,
0.19993379712104797,
0.44706404209136963,
-0.3979615569114685,
0.21827881038188934,
0.25032806396484375,
0.16970522701740265,
0.5388915538787842,
0.4505366384983063,
-0.05123823508620262,
-0.47957324981689453,
-0.03966139256954193,
-0.19131849706172943,
0.046155355870723724,
0.04788430780172348,
-0.046260323375463486,
-0.18486973643302917,
0.06302392482757568,
-0.2803141474723816,
-0.3086201548576355,
0.09113585203886032,
0.09951789677143097,
0.044045526534318924,
-0.3165181875228882,
-0.17713560163974762,
0.5262098908424377,
-0.09772197902202606,
-0.13015194237232208,
0.4414812922477722,
0.33308660984039307,
-0.23646984994411469,
0.5683746933937073,
-0.035057611763477325,
0.6247904300689697,
0.20053763687610626,
0.1264469474554062,
0.2727004289627075,
-0.5154507160186768,
0.06266596913337708,
0.5921412110328674,
0.029437461867928505,
-0.5868446826934814,
-0.15536026656627655,
0.03312484174966812,
-0.12538300454616547,
0.03268200904130936,
0.03686990588903427,
-0.3613358736038208,
0.07163339853286743,
0.008446767926216125,
-0.28222760558128357,
0.11833761632442474,
0.35935771465301514,
-0.20790159702301025,
0.15893985331058502,
-0.30331963300704956,
0.09121984243392944,
0.11379021406173706,
0.10303100943565369,
-0.08773671090602875,
-0.06607595086097717,
-0.14195160567760468,
-0.3079773187637329,
-0.13253121078014374,
0.2350480556488037,
-0.11993934214115143,
0.4439120888710022,
0.2897055149078369,
-0.4493193030357361,
0.2196410745382309,
0.21744754910469055,
0.4070444703102112,
-0.05828620120882988,
-0.12899285554885864,
-0.044320713728666306,
-0.2538415193557739,
-0.05696284770965576,
0.27508339285850525,
-0.020860349759459496,
0.23575900495052338,
0.024320103228092194,
-0.24130818247795105,
0.014923810958862305,
-0.2202433943748474,
-0.34887081384658813,
-0.21365496516227722,
-0.02526117116212845,
0.09170098602771759,
-0.40334153175354004,
-0.5704158544540405,
-0.3656395673751831,
-0.13380378484725952,
-0.3513590097427368,
0.04516198858618736,
0.13698148727416992,
0.0903131514787674,
0.13455092906951904,
-0.030370380729436874,
-0.37278831005096436,
0.12868404388427734,
0.4785129427909851,
-0.1395132839679718,
-0.23650668561458588,
0.5704623460769653,
-0.06644968688488007,
0.11639682948589325,
-0.22008246183395386,
0.16686826944351196,
0.29374757409095764,
-0.21604406833648682,
0.42916789650917053,
-0.23521925508975983,
-0.10538476705551147,
-0.033432383090257645,
0.5656454563140869,
0.1970892995595932,
-0.11961065977811813,
0.05682099238038063,
-0.2952885627746582,
-0.32371941208839417,
0.13764506578445435,
-0.03804723545908928,
0.46340319514274597,
-0.017283260822296143,
-0.30750057101249695,
-0.20984911918640137,
0.11282876133918762,
-0.20284488797187805,
0.0374976322054863,
0.01600019447505474,
0.04490775242447853,
0.1605370193719864,
-0.04620515555143356,
0.18105448782444,
-0.3117868900299072,
0.09754084795713425,
-0.16287189722061157,
0.035566963255405426,
-0.020624438300728798,
-0.22627128660678864,
0.17174911499023438,
0.1430513858795166,
0.2631169259548187,
-0.09589648246765137,
-0.13932910561561584,
0.004311541095376015,
-0.07367327064275742,
-0.03780914843082428,
0.3947650194168091,
-0.12234467267990112,
0.2778862714767456,
0.08953393995761871,
0.2064661979675293,
-0.1312054991722107,
0.22921088337898254,
0.06442123651504517,
0.30759119987487793,
-0.07577773928642273,
0.21964383125305176,
-0.07942210137844086,
-0.08923641592264175,
-0.23260293900966644,
0.18260392546653748,
0.02932862937450409,
0.09558281302452087,
0.18232488632202148,
-0.18027567863464355,
-0.04118836671113968,
0.11043112725019455,
0.25676870346069336,
0.5237186551094055,
-0.14971722662448883,
-0.23714043200016022,
-0.021324634552001953,
0.1600281298160553,
-0.16015034914016724,
-0.20174361765384674,
0.30036279559135437,
-0.08352956175804138,
-0.11629049479961395,
-0.07652302831411362,
-0.2054966241121292,
-0.1942749321460724,
-0.19851623475551605,
0.3335355222225189,
0.540127158164978,
-0.07226986438035965,
0.2756752371788025,
0.10503681004047394,
-0.1331188678741455,
0.1698136031627655,
0.4339623749256134,
-0.026871714740991592,
0.27280715107917786,
0.2969134747982025,
-0.010699808597564697,
0.47526997327804565,
0.10813737660646439,
0.17630067467689514,
0.14447373151779175,
0.02955232933163643,
0.05013871192932129,
-0.23837295174598694,
0.03397581726312637,
0.03377671539783478,
0.037904299795627594,
0.20748764276504517,
-0.5338287353515625,
-0.009571323171257973,
-0.052913203835487366,
-0.3925672173500061,
-0.050362445414066315,
-0.21667374670505524,
-0.2375054508447647,
-0.11660647392272949,
0.191665381193161,
-0.08714815974235535,
-0.1870366334915161,
0.25690269470214844,
0.18545816838741302,
0.13413408398628235,
-0.12626948952674866,
-0.19911698997020721,
0.2447042167186737,
0.1286832094192505,
-0.11523232609033585,
-0.24231389164924622,
0.11653079092502594,
0.06552582234144211,
-0.02700403332710266,
0.2843687832355499,
0.3048303723335266,
0.5131983757019043,
0.4630439281463623,
-0.12355412542819977,
-0.09367375075817108,
-0.06761860847473145,
-0.08907455950975418,
0.16065973043441772,
0.11764409393072128,
-0.22886934876441956,
0.14198800921440125,
0.34979525208473206,
0.10425234586000443,
0.05256592482328415,
0.35542652010917664,
0.18288469314575195,
0.25523996353149414,
-0.07936456799507141,
0.8174863457679749,
0.06526531279087067,
-0.4018477499485016,
0.18539446592330933,
0.20612473785877228,
-0.05622737109661102,
-0.24233214557170868,
0.25479254126548767,
0.23797515034675598,
0.035411689430475235,
0.04309958219528198,
0.04295113682746887,
-0.07612974941730499,
0.406138151884079,
0.39452534914016724,
-0.009130015969276428,
-0.25308957695961,
0.20115037262439728,
-0.5567248463630676,
0.12672148644924164,
0.11506767570972443,
-0.024235811084508896,
0.17355863749980927,
0.18861617147922516,
0.17911790311336517,
-0.007998321205377579,
0.12340383976697922,
0.3020167648792267,
-0.2655389904975891,
-0.07327590882778168,
-0.20394892990589142,
-0.048358116298913956,
0.17002324759960175,
-0.03841741383075714,
-0.0339166596531868,
-0.4353083074092865,
0.23178622126579285,
-0.21523022651672363,
-0.04080244153738022,
-0.12031042575836182,
-0.1444326490163803,
-0.03168055787682533,
-0.03436101973056793,
0.419456422328949,
0.12867341935634613,
0.4079837501049042,
0.04966282844543457,
-0.407670795917511,
-0.2884944677352905,
-0.1973593384027481,
-0.15792323648929596,
0.2628084123134613,
0.09484924376010895,
0.6385337114334106,
-0.09726943075656891,
0.04521259665489197,
-0.2792316973209381,
0.25948938727378845,
-0.128692626953125,
-0.07732559740543365,
-0.20838171243667603,
0.16525332629680634,
0.13980749249458313,
0.010335864499211311,
0.26789191365242004,
0.11656053364276886,
-0.06769666820764542,
0.3758801817893982,
-0.3817225694656372,
-0.28332653641700745,
0.4406757056713104,
0.021083995699882507,
-0.19059859216213226,
-0.016219675540924072,
0.3005397915840149,
-0.04263407737016678,
-0.18162915110588074,
-0.7152318954467773,
0.0028660371899604797,
0.41550976037979126,
-0.00631801038980484,
-0.0824659988284111,
0.10223747789859772,
0.28987574577331543,
0.18652406334877014,
-0.008999347686767578,
0.5413073301315308,
-0.01087275892496109,
0.011300580576062202,
-0.09686369448900223,
-0.07294753193855286
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | My current workaround is to remove the idx feature:
```
from datasets import load_dataset, DatasetDict, Value
ds = load_dataset('super_glue', 'multirc')
ds = ds.remove_columns('idx')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
works. | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 29 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
My current workaround is to remove the idx feature:
```
from datasets import load_dataset, DatasetDict, Value
ds = load_dataset('super_glue', 'multirc')
ds = ds.remove_columns('idx')
ds.save_to_disk('tempds')
ds = DatasetDict.load_from_disk('tempds')
```
works. | [
-0.19467994570732117,
0.11409823596477509,
-0.012763982638716698,
0.284942626953125,
0.06459227204322815,
-0.06141713261604309,
0.13233943283557892,
0.4565897285938263,
0.442236989736557,
0.17922884225845337,
0.2358965277671814,
0.38085129857063293,
0.0545867383480072,
-0.05616796389222145,
-0.1504480540752411,
-0.06224930286407471,
0.2574024200439453,
0.13625237345695496,
0.04726205766201019,
0.12693332135677338,
-0.19149628281593323,
0.24653087556362152,
-0.14968959987163544,
-0.0032423511147499084,
-0.18960000574588776,
0.14378683269023895,
-0.2581939995288849,
0.29428017139434814,
-0.3553469479084015,
-0.6636255383491516,
0.29404765367507935,
0.4080148935317993,
0.342583030462265,
0.5095263123512268,
-0.00012341018009465188,
0.05441752076148987,
0.2841648459434509,
-0.20966434478759766,
-0.44848009943962097,
-0.4640182852745056,
-0.1993894875049591,
0.013694105669856071,
0.24731115996837616,
-0.15678125619888306,
0.17459121346473694,
-0.07328474521636963,
-0.03211017698049545,
-0.42203572392463684,
0.1694842278957367,
0.3417607247829437,
0.14071522653102875,
0.22665590047836304,
0.27649015188217163,
-0.22191408276557922,
-0.25477996468544006,
0.3302724361419678,
-0.02041705697774887,
0.48288407921791077,
-0.01869232952594757,
0.07316861301660538,
0.04144430160522461,
0.07422488927841187,
-0.019542811438441277,
-0.10177960991859436,
0.09392538666725159,
-0.024730894714593887,
0.1620432585477829,
-0.051342859864234924,
0.2408142387866974,
0.1979953944683075,
0.6499523520469666,
-0.20139962434768677,
-0.5342013239860535,
0.035244546830654144,
-0.06113045662641525,
0.17862267792224884,
0.3324403762817383,
-0.06982438266277313,
0.083963543176651,
0.3244956433773041,
-0.09978208690881729,
-0.36534860730171204,
-0.2351388782262802,
-0.1203211098909378,
0.07101882994174957,
-0.2877642512321472,
-0.0193994902074337,
0.1131955161690712,
-0.03970959410071373,
0.02144641801714897,
0.4245891273021698,
-0.3535502552986145,
-0.34899020195007324,
-0.10199785977602005,
-0.04592717066407204,
-0.11440081149339676,
-0.06533422321081161,
-0.2706739604473114,
0.11334694176912308,
-0.07209957391023636,
0.2517625391483307,
0.13161873817443848,
-0.03917121887207031,
0.06024612486362457,
0.21152466535568237,
0.27498859167099,
0.4198956787586212,
0.2743377089500427,
0.03575153648853302,
0.07143523544073105,
-0.23575252294540405,
0.08389294147491455,
-0.04040997475385666,
-0.15166021883487701,
0.20883211493492126,
-0.13580429553985596,
0.5703296661376953,
-0.4004870355129242,
-0.32741665840148926,
0.2602047324180603,
-0.27430546283721924,
-0.17296062409877777,
-0.10397962480783463,
0.22403156757354736,
0.09327937662601471,
0.197241872549057,
0.1087377667427063,
0.3317790627479553,
0.04689546674489975,
0.02778119221329689,
-0.1801333874464035,
0.03530392423272133,
0.040068838745355606,
0.011786631308495998,
0.01797817274928093,
-0.09995760023593903,
0.2674607038497925,
0.015178094618022442,
-0.45771729946136475,
-0.1766548901796341,
-0.04136189818382263,
-0.04732748866081238,
0.25143006443977356,
0.038321252912282944,
-0.2181580513715744,
-0.0566825345158577,
0.2363061010837555,
0.12630023062229156,
-0.22399482131004333,
0.21204230189323425,
0.07184401154518127,
-0.15890643000602722,
-0.1686420887708664,
0.12280381470918655,
-0.3944004774093628,
-0.2602536976337433,
-0.28193363547325134,
-0.04939955845475197,
-0.083664171397686,
-0.2920120656490326,
-0.11237309128046036,
-0.32877612113952637,
-0.23735608160495758,
-0.12257138639688492,
0.14289870858192444,
0.43071162700653076,
-0.5336275100708008,
0.19424393773078918,
0.18607616424560547,
-0.029021237045526505,
0.09660618007183075,
-0.023078318685293198,
0.0003097584703937173,
0.13802263140678406,
-0.17932048439979553,
0.1278734654188156,
0.4110458493232727,
-0.5454345345497131,
-0.6159429550170898,
0.3077109456062317,
-0.0049896761775016785,
0.17820580303668976,
-0.14376580715179443,
-0.021746927872300148,
0.2127341777086258,
-0.05300583690404892,
0.05443805456161499,
0.058973006904125214,
0.05343620479106903,
-0.057524338364601135,
-0.4947074055671692,
-0.33287057280540466,
0.11665244400501251,
-0.01325948815792799,
-0.05561127886176109,
0.09193755686283112,
0.15818196535110474,
-0.2094929963350296,
0.4844790995121002,
-0.08584120869636536,
-0.18125492334365845,
0.11700885742902756,
0.45155882835388184,
-0.07388898730278015,
0.027472946792840958,
-0.2316354513168335,
-0.550897479057312,
0.4312419891357422,
0.03772849589586258,
-0.022250764071941376,
-0.04894094169139862,
0.05837750434875488,
-0.43798014521598816,
0.12034308165311813,
-0.31824731826782227,
0.046510979533195496,
0.010616883635520935,
0.07837720960378647,
-0.08669508993625641,
-0.008824175223708153,
-0.11494044959545135,
0.1405704915523529,
-0.15196174383163452,
0.06985821574926376,
0.004358732141554356,
0.33659958839416504,
-0.20373782515525818,
-0.22051605582237244,
0.1709301769733429,
-0.012789398431777954,
0.2898365557193756,
-0.26781371235847473,
-0.32017815113067627,
0.4959193468093872,
0.22827482223510742,
0.021591633558273315,
-0.07041439414024353,
-0.33709716796875,
-0.09507101774215698,
-0.026020508259534836,
0.19282545149326324,
0.49834465980529785,
0.05740605294704437,
0.0559966117143631,
-0.2572023868560791,
0.3138725161552429,
0.06572319567203522,
0.05681299790740013,
0.07007813453674316,
0.17818991839885712,
0.2946602404117584,
-0.024420442059636116,
-0.017040159553289413,
-0.3440817892551422,
0.21742989122867584,
0.018818117678165436,
0.010233692824840546,
0.07537292689085007,
-0.13353221118450165,
0.1482347995042801,
0.2589491307735443,
0.03663874790072441,
0.18287676572799683,
0.08732600510120392,
0.002122841775417328,
-0.41023221611976624,
0.05919934809207916,
0.3296467661857605,
0.6812973022460938,
-0.012020837515592575,
-0.08989879488945007,
-0.05428658425807953,
-0.03938661888241768,
0.039272602647542953,
0.14949113130569458,
-0.017295323312282562,
0.27114737033843994,
0.1783985197544098,
0.19017189741134644,
0.06896668672561646,
-0.21231281757354736,
-0.1901514232158661,
-0.007371923886239529,
0.05106457322835922,
-0.3820841312408447,
0.13152764737606049,
-0.13793031871318817,
0.5604398846626282,
-0.2043236792087555,
-0.5258814692497253,
-0.0548606775701046,
-0.3896040916442871,
-0.11086899042129517,
0.3982454240322113,
-0.10519488155841827,
0.042094551026821136,
-0.5863333940505981,
0.04286506772041321,
-0.0554988756775856,
-0.32560744881629944,
-0.11134722828865051,
-0.1961996704339981,
-0.12637397646903992,
-0.15539425611495972,
0.11374306678771973,
0.19289612770080566,
0.21791379153728485,
-0.10947050154209137,
-0.1682271659374237,
-0.43471473455429077,
-0.33398208022117615,
0.15419557690620422,
-0.10126429796218872,
0.050694920122623444,
0.18500767648220062,
-0.06597936153411865,
0.17979301512241364,
-0.00648542633280158,
0.009808866307139397,
-0.15558446943759918,
-0.33245065808296204,
0.19189225137233734,
0.2623600661754608,
-0.17951488494873047,
0.04053007438778877,
-0.4744686782360077,
-0.31704819202423096,
-0.3201011121273041,
0.24106962978839874,
-0.07163342833518982,
0.029591575264930725,
0.05103490129113197,
0.17495639622211456,
0.15245549380779266,
0.015661977231502533,
0.10222288221120834,
-0.02047821879386902,
-0.1949141025543213,
0.11717486381530762,
-0.014176921918988228,
-0.45008382201194763,
0.10882437229156494,
0.03576889634132385,
0.14726465940475464,
0.20899184048175812,
-0.2778182029724121,
-0.14429721236228943,
0.004703793674707413,
0.4145680367946625,
-0.03296497464179993,
-0.29652243852615356,
0.49942445755004883,
0.33558809757232666,
0.029788224026560783,
-0.15712398290634155,
-0.05984240770339966,
0.13958890736103058,
0.09975816309452057,
0.21273687481880188,
-0.35715949535369873,
0.45449110865592957,
-0.39673739671707153,
0.26238909363746643,
-0.056121256202459335,
-0.1933417171239853,
0.21922415494918823,
0.13551419973373413,
0.3633723556995392,
-0.41957417130470276,
-0.25011932849884033,
-0.01812082529067993,
-0.22729992866516113,
-0.14209067821502686,
0.04918668791651726,
-0.1898752748966217,
0.3078673183917999,
-0.01130182296037674,
-0.2713412940502167,
-0.12127666175365448,
-0.3088129460811615,
-0.08830910921096802,
-0.6213799118995667,
0.25254547595977783,
0.12949839234352112,
0.251217246055603,
-0.15207289159297943,
0.05704820156097412,
0.054892074316740036,
0.10568425059318542,
0.3619898855686188,
-0.1298968344926834,
-0.6689377427101135,
0.4119170010089874,
-0.2728247046470642,
0.3531419038772583,
0.01700311340391636,
0.6950640082359314,
0.0251033715903759,
-0.18779173493385315,
-0.07401177287101746,
-0.0956239402294159,
0.3716631531715393,
0.13012611865997314,
0.07774682343006134,
0.18752264976501465,
-0.15032640099525452,
-0.6920769214630127,
-0.1083945780992508,
0.05039623752236366,
0.383085697889328,
0.12623141705989838,
0.3629613220691681,
-0.017780669033527374,
-0.19913393259048462,
0.21982342004776,
0.38812965154647827,
-0.1670641303062439,
-0.27437624335289,
-0.2853175103664398,
-0.13652393221855164,
-0.15154454112052917,
-0.28107982873916626,
-0.041963230818510056,
0.21960727870464325,
-0.2597104609012604,
-0.06253167241811752,
-0.5216526985168457,
-0.31587299704551697,
0.06414709240198135,
0.19993379712104797,
0.44706404209136963,
-0.3979615569114685,
0.21827881038188934,
0.25032806396484375,
0.16970522701740265,
0.5388915538787842,
0.4505366384983063,
-0.05123823508620262,
-0.47957324981689453,
-0.03966139256954193,
-0.19131849706172943,
0.046155355870723724,
0.04788430780172348,
-0.046260323375463486,
-0.18486973643302917,
0.06302392482757568,
-0.2803141474723816,
-0.3086201548576355,
0.09113585203886032,
0.09951789677143097,
0.044045526534318924,
-0.3165181875228882,
-0.17713560163974762,
0.5262098908424377,
-0.09772197902202606,
-0.13015194237232208,
0.4414812922477722,
0.33308660984039307,
-0.23646984994411469,
0.5683746933937073,
-0.035057611763477325,
0.6247904300689697,
0.20053763687610626,
0.1264469474554062,
0.2727004289627075,
-0.5154507160186768,
0.06266596913337708,
0.5921412110328674,
0.029437461867928505,
-0.5868446826934814,
-0.15536026656627655,
0.03312484174966812,
-0.12538300454616547,
0.03268200904130936,
0.03686990588903427,
-0.3613358736038208,
0.07163339853286743,
0.008446767926216125,
-0.28222760558128357,
0.11833761632442474,
0.35935771465301514,
-0.20790159702301025,
0.15893985331058502,
-0.30331963300704956,
0.09121984243392944,
0.11379021406173706,
0.10303100943565369,
-0.08773671090602875,
-0.06607595086097717,
-0.14195160567760468,
-0.3079773187637329,
-0.13253121078014374,
0.2350480556488037,
-0.11993934214115143,
0.4439120888710022,
0.2897055149078369,
-0.4493193030357361,
0.2196410745382309,
0.21744754910469055,
0.4070444703102112,
-0.05828620120882988,
-0.12899285554885864,
-0.044320713728666306,
-0.2538415193557739,
-0.05696284770965576,
0.27508339285850525,
-0.020860349759459496,
0.23575900495052338,
0.024320103228092194,
-0.24130818247795105,
0.014923810958862305,
-0.2202433943748474,
-0.34887081384658813,
-0.21365496516227722,
-0.02526117116212845,
0.09170098602771759,
-0.40334153175354004,
-0.5704158544540405,
-0.3656395673751831,
-0.13380378484725952,
-0.3513590097427368,
0.04516198858618736,
0.13698148727416992,
0.0903131514787674,
0.13455092906951904,
-0.030370380729436874,
-0.37278831005096436,
0.12868404388427734,
0.4785129427909851,
-0.1395132839679718,
-0.23650668561458588,
0.5704623460769653,
-0.06644968688488007,
0.11639682948589325,
-0.22008246183395386,
0.16686826944351196,
0.29374757409095764,
-0.21604406833648682,
0.42916789650917053,
-0.23521925508975983,
-0.10538476705551147,
-0.033432383090257645,
0.5656454563140869,
0.1970892995595932,
-0.11961065977811813,
0.05682099238038063,
-0.2952885627746582,
-0.32371941208839417,
0.13764506578445435,
-0.03804723545908928,
0.46340319514274597,
-0.017283260822296143,
-0.30750057101249695,
-0.20984911918640137,
0.11282876133918762,
-0.20284488797187805,
0.0374976322054863,
0.01600019447505474,
0.04490775242447853,
0.1605370193719864,
-0.04620515555143356,
0.18105448782444,
-0.3117868900299072,
0.09754084795713425,
-0.16287189722061157,
0.035566963255405426,
-0.020624438300728798,
-0.22627128660678864,
0.17174911499023438,
0.1430513858795166,
0.2631169259548187,
-0.09589648246765137,
-0.13932910561561584,
0.004311541095376015,
-0.07367327064275742,
-0.03780914843082428,
0.3947650194168091,
-0.12234467267990112,
0.2778862714767456,
0.08953393995761871,
0.2064661979675293,
-0.1312054991722107,
0.22921088337898254,
0.06442123651504517,
0.30759119987487793,
-0.07577773928642273,
0.21964383125305176,
-0.07942210137844086,
-0.08923641592264175,
-0.23260293900966644,
0.18260392546653748,
0.02932862937450409,
0.09558281302452087,
0.18232488632202148,
-0.18027567863464355,
-0.04118836671113968,
0.11043112725019455,
0.25676870346069336,
0.5237186551094055,
-0.14971722662448883,
-0.23714043200016022,
-0.021324634552001953,
0.1600281298160553,
-0.16015034914016724,
-0.20174361765384674,
0.30036279559135437,
-0.08352956175804138,
-0.11629049479961395,
-0.07652302831411362,
-0.2054966241121292,
-0.1942749321460724,
-0.19851623475551605,
0.3335355222225189,
0.540127158164978,
-0.07226986438035965,
0.2756752371788025,
0.10503681004047394,
-0.1331188678741455,
0.1698136031627655,
0.4339623749256134,
-0.026871714740991592,
0.27280715107917786,
0.2969134747982025,
-0.010699808597564697,
0.47526997327804565,
0.10813737660646439,
0.17630067467689514,
0.14447373151779175,
0.02955232933163643,
0.05013871192932129,
-0.23837295174598694,
0.03397581726312637,
0.03377671539783478,
0.037904299795627594,
0.20748764276504517,
-0.5338287353515625,
-0.009571323171257973,
-0.052913203835487366,
-0.3925672173500061,
-0.050362445414066315,
-0.21667374670505524,
-0.2375054508447647,
-0.11660647392272949,
0.191665381193161,
-0.08714815974235535,
-0.1870366334915161,
0.25690269470214844,
0.18545816838741302,
0.13413408398628235,
-0.12626948952674866,
-0.19911698997020721,
0.2447042167186737,
0.1286832094192505,
-0.11523232609033585,
-0.24231389164924622,
0.11653079092502594,
0.06552582234144211,
-0.02700403332710266,
0.2843687832355499,
0.3048303723335266,
0.5131983757019043,
0.4630439281463623,
-0.12355412542819977,
-0.09367375075817108,
-0.06761860847473145,
-0.08907455950975418,
0.16065973043441772,
0.11764409393072128,
-0.22886934876441956,
0.14198800921440125,
0.34979525208473206,
0.10425234586000443,
0.05256592482328415,
0.35542652010917664,
0.18288469314575195,
0.25523996353149414,
-0.07936456799507141,
0.8174863457679749,
0.06526531279087067,
-0.4018477499485016,
0.18539446592330933,
0.20612473785877228,
-0.05622737109661102,
-0.24233214557170868,
0.25479254126548767,
0.23797515034675598,
0.035411689430475235,
0.04309958219528198,
0.04295113682746887,
-0.07612974941730499,
0.406138151884079,
0.39452534914016724,
-0.009130015969276428,
-0.25308957695961,
0.20115037262439728,
-0.5567248463630676,
0.12672148644924164,
0.11506767570972443,
-0.024235811084508896,
0.17355863749980927,
0.18861617147922516,
0.17911790311336517,
-0.007998321205377579,
0.12340383976697922,
0.3020167648792267,
-0.2655389904975891,
-0.07327590882778168,
-0.20394892990589142,
-0.048358116298913956,
0.17002324759960175,
-0.03841741383075714,
-0.0339166596531868,
-0.4353083074092865,
0.23178622126579285,
-0.21523022651672363,
-0.04080244153738022,
-0.12031042575836182,
-0.1444326490163803,
-0.03168055787682533,
-0.03436101973056793,
0.419456422328949,
0.12867341935634613,
0.4079837501049042,
0.04966282844543457,
-0.407670795917511,
-0.2884944677352905,
-0.1973593384027481,
-0.15792323648929596,
0.2628084123134613,
0.09484924376010895,
0.6385337114334106,
-0.09726943075656891,
0.04521259665489197,
-0.2792316973209381,
0.25948938727378845,
-0.128692626953125,
-0.07732559740543365,
-0.20838171243667603,
0.16525332629680634,
0.13980749249458313,
0.010335864499211311,
0.26789191365242004,
0.11656053364276886,
-0.06769666820764542,
0.3758801817893982,
-0.3817225694656372,
-0.28332653641700745,
0.4406757056713104,
0.021083995699882507,
-0.19059859216213226,
-0.016219675540924072,
0.3005397915840149,
-0.04263407737016678,
-0.18162915110588074,
-0.7152318954467773,
0.0028660371899604797,
0.41550976037979126,
-0.00631801038980484,
-0.0824659988284111,
0.10223747789859772,
0.28987574577331543,
0.18652406334877014,
-0.008999347686767578,
0.5413073301315308,
-0.01087275892496109,
0.011300580576062202,
-0.09686369448900223,
-0.07294753193855286
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | It looks like this issue comes from the order of the fields in the 'idx' struct that is different for some reason.
I'm looking into it. Note that as a workaround you can also flatten the nested features with `ds = ds.flatten()` | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 42 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
It looks like this issue comes from the order of the fields in the 'idx' struct that is different for some reason.
I'm looking into it. Note that as a workaround you can also flatten the nested features with `ds = ds.flatten()` | [
-0.19467994570732117,
0.11409823596477509,
-0.012763982638716698,
0.284942626953125,
0.06459227204322815,
-0.06141713261604309,
0.13233943283557892,
0.4565897285938263,
0.442236989736557,
0.17922884225845337,
0.2358965277671814,
0.38085129857063293,
0.0545867383480072,
-0.05616796389222145,
-0.1504480540752411,
-0.06224930286407471,
0.2574024200439453,
0.13625237345695496,
0.04726205766201019,
0.12693332135677338,
-0.19149628281593323,
0.24653087556362152,
-0.14968959987163544,
-0.0032423511147499084,
-0.18960000574588776,
0.14378683269023895,
-0.2581939995288849,
0.29428017139434814,
-0.3553469479084015,
-0.6636255383491516,
0.29404765367507935,
0.4080148935317993,
0.342583030462265,
0.5095263123512268,
-0.00012341018009465188,
0.05441752076148987,
0.2841648459434509,
-0.20966434478759766,
-0.44848009943962097,
-0.4640182852745056,
-0.1993894875049591,
0.013694105669856071,
0.24731115996837616,
-0.15678125619888306,
0.17459121346473694,
-0.07328474521636963,
-0.03211017698049545,
-0.42203572392463684,
0.1694842278957367,
0.3417607247829437,
0.14071522653102875,
0.22665590047836304,
0.27649015188217163,
-0.22191408276557922,
-0.25477996468544006,
0.3302724361419678,
-0.02041705697774887,
0.48288407921791077,
-0.01869232952594757,
0.07316861301660538,
0.04144430160522461,
0.07422488927841187,
-0.019542811438441277,
-0.10177960991859436,
0.09392538666725159,
-0.024730894714593887,
0.1620432585477829,
-0.051342859864234924,
0.2408142387866974,
0.1979953944683075,
0.6499523520469666,
-0.20139962434768677,
-0.5342013239860535,
0.035244546830654144,
-0.06113045662641525,
0.17862267792224884,
0.3324403762817383,
-0.06982438266277313,
0.083963543176651,
0.3244956433773041,
-0.09978208690881729,
-0.36534860730171204,
-0.2351388782262802,
-0.1203211098909378,
0.07101882994174957,
-0.2877642512321472,
-0.0193994902074337,
0.1131955161690712,
-0.03970959410071373,
0.02144641801714897,
0.4245891273021698,
-0.3535502552986145,
-0.34899020195007324,
-0.10199785977602005,
-0.04592717066407204,
-0.11440081149339676,
-0.06533422321081161,
-0.2706739604473114,
0.11334694176912308,
-0.07209957391023636,
0.2517625391483307,
0.13161873817443848,
-0.03917121887207031,
0.06024612486362457,
0.21152466535568237,
0.27498859167099,
0.4198956787586212,
0.2743377089500427,
0.03575153648853302,
0.07143523544073105,
-0.23575252294540405,
0.08389294147491455,
-0.04040997475385666,
-0.15166021883487701,
0.20883211493492126,
-0.13580429553985596,
0.5703296661376953,
-0.4004870355129242,
-0.32741665840148926,
0.2602047324180603,
-0.27430546283721924,
-0.17296062409877777,
-0.10397962480783463,
0.22403156757354736,
0.09327937662601471,
0.197241872549057,
0.1087377667427063,
0.3317790627479553,
0.04689546674489975,
0.02778119221329689,
-0.1801333874464035,
0.03530392423272133,
0.040068838745355606,
0.011786631308495998,
0.01797817274928093,
-0.09995760023593903,
0.2674607038497925,
0.015178094618022442,
-0.45771729946136475,
-0.1766548901796341,
-0.04136189818382263,
-0.04732748866081238,
0.25143006443977356,
0.038321252912282944,
-0.2181580513715744,
-0.0566825345158577,
0.2363061010837555,
0.12630023062229156,
-0.22399482131004333,
0.21204230189323425,
0.07184401154518127,
-0.15890643000602722,
-0.1686420887708664,
0.12280381470918655,
-0.3944004774093628,
-0.2602536976337433,
-0.28193363547325134,
-0.04939955845475197,
-0.083664171397686,
-0.2920120656490326,
-0.11237309128046036,
-0.32877612113952637,
-0.23735608160495758,
-0.12257138639688492,
0.14289870858192444,
0.43071162700653076,
-0.5336275100708008,
0.19424393773078918,
0.18607616424560547,
-0.029021237045526505,
0.09660618007183075,
-0.023078318685293198,
0.0003097584703937173,
0.13802263140678406,
-0.17932048439979553,
0.1278734654188156,
0.4110458493232727,
-0.5454345345497131,
-0.6159429550170898,
0.3077109456062317,
-0.0049896761775016785,
0.17820580303668976,
-0.14376580715179443,
-0.021746927872300148,
0.2127341777086258,
-0.05300583690404892,
0.05443805456161499,
0.058973006904125214,
0.05343620479106903,
-0.057524338364601135,
-0.4947074055671692,
-0.33287057280540466,
0.11665244400501251,
-0.01325948815792799,
-0.05561127886176109,
0.09193755686283112,
0.15818196535110474,
-0.2094929963350296,
0.4844790995121002,
-0.08584120869636536,
-0.18125492334365845,
0.11700885742902756,
0.45155882835388184,
-0.07388898730278015,
0.027472946792840958,
-0.2316354513168335,
-0.550897479057312,
0.4312419891357422,
0.03772849589586258,
-0.022250764071941376,
-0.04894094169139862,
0.05837750434875488,
-0.43798014521598816,
0.12034308165311813,
-0.31824731826782227,
0.046510979533195496,
0.010616883635520935,
0.07837720960378647,
-0.08669508993625641,
-0.008824175223708153,
-0.11494044959545135,
0.1405704915523529,
-0.15196174383163452,
0.06985821574926376,
0.004358732141554356,
0.33659958839416504,
-0.20373782515525818,
-0.22051605582237244,
0.1709301769733429,
-0.012789398431777954,
0.2898365557193756,
-0.26781371235847473,
-0.32017815113067627,
0.4959193468093872,
0.22827482223510742,
0.021591633558273315,
-0.07041439414024353,
-0.33709716796875,
-0.09507101774215698,
-0.026020508259534836,
0.19282545149326324,
0.49834465980529785,
0.05740605294704437,
0.0559966117143631,
-0.2572023868560791,
0.3138725161552429,
0.06572319567203522,
0.05681299790740013,
0.07007813453674316,
0.17818991839885712,
0.2946602404117584,
-0.024420442059636116,
-0.017040159553289413,
-0.3440817892551422,
0.21742989122867584,
0.018818117678165436,
0.010233692824840546,
0.07537292689085007,
-0.13353221118450165,
0.1482347995042801,
0.2589491307735443,
0.03663874790072441,
0.18287676572799683,
0.08732600510120392,
0.002122841775417328,
-0.41023221611976624,
0.05919934809207916,
0.3296467661857605,
0.6812973022460938,
-0.012020837515592575,
-0.08989879488945007,
-0.05428658425807953,
-0.03938661888241768,
0.039272602647542953,
0.14949113130569458,
-0.017295323312282562,
0.27114737033843994,
0.1783985197544098,
0.19017189741134644,
0.06896668672561646,
-0.21231281757354736,
-0.1901514232158661,
-0.007371923886239529,
0.05106457322835922,
-0.3820841312408447,
0.13152764737606049,
-0.13793031871318817,
0.5604398846626282,
-0.2043236792087555,
-0.5258814692497253,
-0.0548606775701046,
-0.3896040916442871,
-0.11086899042129517,
0.3982454240322113,
-0.10519488155841827,
0.042094551026821136,
-0.5863333940505981,
0.04286506772041321,
-0.0554988756775856,
-0.32560744881629944,
-0.11134722828865051,
-0.1961996704339981,
-0.12637397646903992,
-0.15539425611495972,
0.11374306678771973,
0.19289612770080566,
0.21791379153728485,
-0.10947050154209137,
-0.1682271659374237,
-0.43471473455429077,
-0.33398208022117615,
0.15419557690620422,
-0.10126429796218872,
0.050694920122623444,
0.18500767648220062,
-0.06597936153411865,
0.17979301512241364,
-0.00648542633280158,
0.009808866307139397,
-0.15558446943759918,
-0.33245065808296204,
0.19189225137233734,
0.2623600661754608,
-0.17951488494873047,
0.04053007438778877,
-0.4744686782360077,
-0.31704819202423096,
-0.3201011121273041,
0.24106962978839874,
-0.07163342833518982,
0.029591575264930725,
0.05103490129113197,
0.17495639622211456,
0.15245549380779266,
0.015661977231502533,
0.10222288221120834,
-0.02047821879386902,
-0.1949141025543213,
0.11717486381530762,
-0.014176921918988228,
-0.45008382201194763,
0.10882437229156494,
0.03576889634132385,
0.14726465940475464,
0.20899184048175812,
-0.2778182029724121,
-0.14429721236228943,
0.004703793674707413,
0.4145680367946625,
-0.03296497464179993,
-0.29652243852615356,
0.49942445755004883,
0.33558809757232666,
0.029788224026560783,
-0.15712398290634155,
-0.05984240770339966,
0.13958890736103058,
0.09975816309452057,
0.21273687481880188,
-0.35715949535369873,
0.45449110865592957,
-0.39673739671707153,
0.26238909363746643,
-0.056121256202459335,
-0.1933417171239853,
0.21922415494918823,
0.13551419973373413,
0.3633723556995392,
-0.41957417130470276,
-0.25011932849884033,
-0.01812082529067993,
-0.22729992866516113,
-0.14209067821502686,
0.04918668791651726,
-0.1898752748966217,
0.3078673183917999,
-0.01130182296037674,
-0.2713412940502167,
-0.12127666175365448,
-0.3088129460811615,
-0.08830910921096802,
-0.6213799118995667,
0.25254547595977783,
0.12949839234352112,
0.251217246055603,
-0.15207289159297943,
0.05704820156097412,
0.054892074316740036,
0.10568425059318542,
0.3619898855686188,
-0.1298968344926834,
-0.6689377427101135,
0.4119170010089874,
-0.2728247046470642,
0.3531419038772583,
0.01700311340391636,
0.6950640082359314,
0.0251033715903759,
-0.18779173493385315,
-0.07401177287101746,
-0.0956239402294159,
0.3716631531715393,
0.13012611865997314,
0.07774682343006134,
0.18752264976501465,
-0.15032640099525452,
-0.6920769214630127,
-0.1083945780992508,
0.05039623752236366,
0.383085697889328,
0.12623141705989838,
0.3629613220691681,
-0.017780669033527374,
-0.19913393259048462,
0.21982342004776,
0.38812965154647827,
-0.1670641303062439,
-0.27437624335289,
-0.2853175103664398,
-0.13652393221855164,
-0.15154454112052917,
-0.28107982873916626,
-0.041963230818510056,
0.21960727870464325,
-0.2597104609012604,
-0.06253167241811752,
-0.5216526985168457,
-0.31587299704551697,
0.06414709240198135,
0.19993379712104797,
0.44706404209136963,
-0.3979615569114685,
0.21827881038188934,
0.25032806396484375,
0.16970522701740265,
0.5388915538787842,
0.4505366384983063,
-0.05123823508620262,
-0.47957324981689453,
-0.03966139256954193,
-0.19131849706172943,
0.046155355870723724,
0.04788430780172348,
-0.046260323375463486,
-0.18486973643302917,
0.06302392482757568,
-0.2803141474723816,
-0.3086201548576355,
0.09113585203886032,
0.09951789677143097,
0.044045526534318924,
-0.3165181875228882,
-0.17713560163974762,
0.5262098908424377,
-0.09772197902202606,
-0.13015194237232208,
0.4414812922477722,
0.33308660984039307,
-0.23646984994411469,
0.5683746933937073,
-0.035057611763477325,
0.6247904300689697,
0.20053763687610626,
0.1264469474554062,
0.2727004289627075,
-0.5154507160186768,
0.06266596913337708,
0.5921412110328674,
0.029437461867928505,
-0.5868446826934814,
-0.15536026656627655,
0.03312484174966812,
-0.12538300454616547,
0.03268200904130936,
0.03686990588903427,
-0.3613358736038208,
0.07163339853286743,
0.008446767926216125,
-0.28222760558128357,
0.11833761632442474,
0.35935771465301514,
-0.20790159702301025,
0.15893985331058502,
-0.30331963300704956,
0.09121984243392944,
0.11379021406173706,
0.10303100943565369,
-0.08773671090602875,
-0.06607595086097717,
-0.14195160567760468,
-0.3079773187637329,
-0.13253121078014374,
0.2350480556488037,
-0.11993934214115143,
0.4439120888710022,
0.2897055149078369,
-0.4493193030357361,
0.2196410745382309,
0.21744754910469055,
0.4070444703102112,
-0.05828620120882988,
-0.12899285554885864,
-0.044320713728666306,
-0.2538415193557739,
-0.05696284770965576,
0.27508339285850525,
-0.020860349759459496,
0.23575900495052338,
0.024320103228092194,
-0.24130818247795105,
0.014923810958862305,
-0.2202433943748474,
-0.34887081384658813,
-0.21365496516227722,
-0.02526117116212845,
0.09170098602771759,
-0.40334153175354004,
-0.5704158544540405,
-0.3656395673751831,
-0.13380378484725952,
-0.3513590097427368,
0.04516198858618736,
0.13698148727416992,
0.0903131514787674,
0.13455092906951904,
-0.030370380729436874,
-0.37278831005096436,
0.12868404388427734,
0.4785129427909851,
-0.1395132839679718,
-0.23650668561458588,
0.5704623460769653,
-0.06644968688488007,
0.11639682948589325,
-0.22008246183395386,
0.16686826944351196,
0.29374757409095764,
-0.21604406833648682,
0.42916789650917053,
-0.23521925508975983,
-0.10538476705551147,
-0.033432383090257645,
0.5656454563140869,
0.1970892995595932,
-0.11961065977811813,
0.05682099238038063,
-0.2952885627746582,
-0.32371941208839417,
0.13764506578445435,
-0.03804723545908928,
0.46340319514274597,
-0.017283260822296143,
-0.30750057101249695,
-0.20984911918640137,
0.11282876133918762,
-0.20284488797187805,
0.0374976322054863,
0.01600019447505474,
0.04490775242447853,
0.1605370193719864,
-0.04620515555143356,
0.18105448782444,
-0.3117868900299072,
0.09754084795713425,
-0.16287189722061157,
0.035566963255405426,
-0.020624438300728798,
-0.22627128660678864,
0.17174911499023438,
0.1430513858795166,
0.2631169259548187,
-0.09589648246765137,
-0.13932910561561584,
0.004311541095376015,
-0.07367327064275742,
-0.03780914843082428,
0.3947650194168091,
-0.12234467267990112,
0.2778862714767456,
0.08953393995761871,
0.2064661979675293,
-0.1312054991722107,
0.22921088337898254,
0.06442123651504517,
0.30759119987487793,
-0.07577773928642273,
0.21964383125305176,
-0.07942210137844086,
-0.08923641592264175,
-0.23260293900966644,
0.18260392546653748,
0.02932862937450409,
0.09558281302452087,
0.18232488632202148,
-0.18027567863464355,
-0.04118836671113968,
0.11043112725019455,
0.25676870346069336,
0.5237186551094055,
-0.14971722662448883,
-0.23714043200016022,
-0.021324634552001953,
0.1600281298160553,
-0.16015034914016724,
-0.20174361765384674,
0.30036279559135437,
-0.08352956175804138,
-0.11629049479961395,
-0.07652302831411362,
-0.2054966241121292,
-0.1942749321460724,
-0.19851623475551605,
0.3335355222225189,
0.540127158164978,
-0.07226986438035965,
0.2756752371788025,
0.10503681004047394,
-0.1331188678741455,
0.1698136031627655,
0.4339623749256134,
-0.026871714740991592,
0.27280715107917786,
0.2969134747982025,
-0.010699808597564697,
0.47526997327804565,
0.10813737660646439,
0.17630067467689514,
0.14447373151779175,
0.02955232933163643,
0.05013871192932129,
-0.23837295174598694,
0.03397581726312637,
0.03377671539783478,
0.037904299795627594,
0.20748764276504517,
-0.5338287353515625,
-0.009571323171257973,
-0.052913203835487366,
-0.3925672173500061,
-0.050362445414066315,
-0.21667374670505524,
-0.2375054508447647,
-0.11660647392272949,
0.191665381193161,
-0.08714815974235535,
-0.1870366334915161,
0.25690269470214844,
0.18545816838741302,
0.13413408398628235,
-0.12626948952674866,
-0.19911698997020721,
0.2447042167186737,
0.1286832094192505,
-0.11523232609033585,
-0.24231389164924622,
0.11653079092502594,
0.06552582234144211,
-0.02700403332710266,
0.2843687832355499,
0.3048303723335266,
0.5131983757019043,
0.4630439281463623,
-0.12355412542819977,
-0.09367375075817108,
-0.06761860847473145,
-0.08907455950975418,
0.16065973043441772,
0.11764409393072128,
-0.22886934876441956,
0.14198800921440125,
0.34979525208473206,
0.10425234586000443,
0.05256592482328415,
0.35542652010917664,
0.18288469314575195,
0.25523996353149414,
-0.07936456799507141,
0.8174863457679749,
0.06526531279087067,
-0.4018477499485016,
0.18539446592330933,
0.20612473785877228,
-0.05622737109661102,
-0.24233214557170868,
0.25479254126548767,
0.23797515034675598,
0.035411689430475235,
0.04309958219528198,
0.04295113682746887,
-0.07612974941730499,
0.406138151884079,
0.39452534914016724,
-0.009130015969276428,
-0.25308957695961,
0.20115037262439728,
-0.5567248463630676,
0.12672148644924164,
0.11506767570972443,
-0.024235811084508896,
0.17355863749980927,
0.18861617147922516,
0.17911790311336517,
-0.007998321205377579,
0.12340383976697922,
0.3020167648792267,
-0.2655389904975891,
-0.07327590882778168,
-0.20394892990589142,
-0.048358116298913956,
0.17002324759960175,
-0.03841741383075714,
-0.0339166596531868,
-0.4353083074092865,
0.23178622126579285,
-0.21523022651672363,
-0.04080244153738022,
-0.12031042575836182,
-0.1444326490163803,
-0.03168055787682533,
-0.03436101973056793,
0.419456422328949,
0.12867341935634613,
0.4079837501049042,
0.04966282844543457,
-0.407670795917511,
-0.2884944677352905,
-0.1973593384027481,
-0.15792323648929596,
0.2628084123134613,
0.09484924376010895,
0.6385337114334106,
-0.09726943075656891,
0.04521259665489197,
-0.2792316973209381,
0.25948938727378845,
-0.128692626953125,
-0.07732559740543365,
-0.20838171243667603,
0.16525332629680634,
0.13980749249458313,
0.010335864499211311,
0.26789191365242004,
0.11656053364276886,
-0.06769666820764542,
0.3758801817893982,
-0.3817225694656372,
-0.28332653641700745,
0.4406757056713104,
0.021083995699882507,
-0.19059859216213226,
-0.016219675540924072,
0.3005397915840149,
-0.04263407737016678,
-0.18162915110588074,
-0.7152318954467773,
0.0028660371899604797,
0.41550976037979126,
-0.00631801038980484,
-0.0824659988284111,
0.10223747789859772,
0.28987574577331543,
0.18652406334877014,
-0.008999347686767578,
0.5413073301315308,
-0.01087275892496109,
0.011300580576062202,
-0.09686369448900223,
-0.07294753193855286
] |
https://github.com/huggingface/datasets/issues/2267 | DatasetDict save load Failing test in 1.6 not in 1.5 | I just pushed a fix on `master`. We'll do a new release soon !
Thanks for reporting | ## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
| 17 | DatasetDict save load Failing test in 1.6 not in 1.5
## Describe the bug
We have a test that saves a DatasetDict to disk and then loads it from disk. In 1.6 there is an incompatibility in the schema.
Downgrading to `>1.6` -- fixes the problem.
## Steps to reproduce the bug
```python
### Load a dataset dict from jsonl
path = '/test/foo'
ds_dict.save_to_disk(path)
ds_from_disk = DatasetDict.load_from_disk(path). ## <-- this is where I see the error on 1.6
```
## Expected results
Upgrading to 1.6 shouldn't break that test. We should be able to serialize to and from disk.
## Actual results
```
# Infer features if None
inferred_features = Features.from_arrow_schema(arrow_table.schema)
if self.info.features is None:
self.info.features = inferred_features
# Infer fingerprint if None
if self._fingerprint is None:
self._fingerprint = generate_fingerprint(self)
# Sanity checks
assert self.features is not None, "Features can't be None in a Dataset object"
assert self._fingerprint is not None, "Fingerprint can't be None in a Dataset object"
if self.info.features.type != inferred_features.type:
> raise ValueError(
"External features info don't match the dataset:\nGot\n{}\nwith type\n{}\n\nbut expected something like\n{}\nwith type\n{}".format(
self.info.features, self.info.features.type, inferred_features, inferred_features.type
)
)
E ValueError: External features info don't match the dataset:
E Got
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'child': Value(dtype='int64', id=None), 'child_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'color': Value(dtype='string', id=None), 'head': Value(dtype='int64', id=None), 'head_span': {'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None)}, 'label': Value(dtype='string', id=None)}], 'spans': [{'end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'token_end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'disabled': Value(dtype='bool', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'start': Value(dtype='int64', id=None), 'text': Value(dtype='string', id=None), 'ws': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<child: int64, child_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, color: string, head: int64, head_span: struct<end: int64, label: string, start: int64, token_end: int64, token_start: int64>, label: string>>, spans: list<item: struct<end: int64, label: string, start: int64, text: string, token_end: int64, token_start: int64, type: string>>, text: string, tokens: list<item: struct<disabled: bool, end: int64, id: int64, start: int64, text: string, ws: bool>>>
E
E but expected something like
E {'_input_hash': Value(dtype='int64', id=None), '_task_hash': Value(dtype='int64', id=None), '_view_id': Value(dtype='string', id=None), 'answer': Value(dtype='string', id=None), 'encoding__ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'encoding__offsets': Sequence(feature=Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), length=-1, id=None), 'encoding__overflowing': Sequence(feature=Value(dtype='null', id=None), length=-1, id=None), 'encoding__tokens': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'encoding__words': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_ids': Sequence(feature=Value(dtype='int64', id=None), length=-1, id=None), 'ner_labels': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'relations': [{'head': Value(dtype='int64', id=None), 'child': Value(dtype='int64', id=None), 'head_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'child_span': {'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'label': Value(dtype='string', id=None)}, 'color': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'spans': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'token_start': Value(dtype='int64', id=None), 'token_end': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'type': Value(dtype='string', id=None), 'label': Value(dtype='string', id=None)}], 'text': Value(dtype='string', id=None), 'tokens': [{'text': Value(dtype='string', id=None), 'start': Value(dtype='int64', id=None), 'end': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'ws': Value(dtype='bool', id=None), 'disabled': Value(dtype='bool', id=None)}]}
E with type
E struct<_input_hash: int64, _task_hash: int64, _view_id: string, answer: string, encoding__ids: list<item: int64>, encoding__offsets: list<item: list<item: int64>>, encoding__overflowing: list<item: null>, encoding__tokens: list<item: string>, encoding__words: list<item: int64>, ner_ids: list<item: int64>, ner_labels: list<item: string>, relations: list<item: struct<head: int64, child: int64, head_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, child_span: struct<start: int64, end: int64, token_start: int64, token_end: int64, label: string>, color: string, label: string>>, spans: list<item: struct<text: string, start: int64, token_start: int64, token_end: int64, end: int64, type: string, label: string>>, text: string, tokens: list<item: struct<text: string, start: int64, end: int64, id: int64, ws: bool, disabled: bool>>>
../../../../../.virtualenvs/tf_ner_rel_lib/lib/python3.8/site-packages/datasets/arrow_dataset.py:274: ValueError
```
## Versions
- Datasets: 1.6.1
- Python: 3.8.5 (default, Jan 26 2021, 10:01:04)
[Clang 12.0.0 (clang-1200.0.32.2)]
- Platform: macOS-10.15.7-x86_64-i386-64bit
```
I just pushed a fix on `master`. We'll do a new release soon !
Thanks for reporting | [
-0.19467994570732117,
0.11409823596477509,
-0.012763982638716698,
0.284942626953125,
0.06459227204322815,
-0.06141713261604309,
0.13233943283557892,
0.4565897285938263,
0.442236989736557,
0.17922884225845337,
0.2358965277671814,
0.38085129857063293,
0.0545867383480072,
-0.05616796389222145,
-0.1504480540752411,
-0.06224930286407471,
0.2574024200439453,
0.13625237345695496,
0.04726205766201019,
0.12693332135677338,
-0.19149628281593323,
0.24653087556362152,
-0.14968959987163544,
-0.0032423511147499084,
-0.18960000574588776,
0.14378683269023895,
-0.2581939995288849,
0.29428017139434814,
-0.3553469479084015,
-0.6636255383491516,
0.29404765367507935,
0.4080148935317993,
0.342583030462265,
0.5095263123512268,
-0.00012341018009465188,
0.05441752076148987,
0.2841648459434509,
-0.20966434478759766,
-0.44848009943962097,
-0.4640182852745056,
-0.1993894875049591,
0.013694105669856071,
0.24731115996837616,
-0.15678125619888306,
0.17459121346473694,
-0.07328474521636963,
-0.03211017698049545,
-0.42203572392463684,
0.1694842278957367,
0.3417607247829437,
0.14071522653102875,
0.22665590047836304,
0.27649015188217163,
-0.22191408276557922,
-0.25477996468544006,
0.3302724361419678,
-0.02041705697774887,
0.48288407921791077,
-0.01869232952594757,
0.07316861301660538,
0.04144430160522461,
0.07422488927841187,
-0.019542811438441277,
-0.10177960991859436,
0.09392538666725159,
-0.024730894714593887,
0.1620432585477829,
-0.051342859864234924,
0.2408142387866974,
0.1979953944683075,
0.6499523520469666,
-0.20139962434768677,
-0.5342013239860535,
0.035244546830654144,
-0.06113045662641525,
0.17862267792224884,
0.3324403762817383,
-0.06982438266277313,
0.083963543176651,
0.3244956433773041,
-0.09978208690881729,
-0.36534860730171204,
-0.2351388782262802,
-0.1203211098909378,
0.07101882994174957,
-0.2877642512321472,
-0.0193994902074337,
0.1131955161690712,
-0.03970959410071373,
0.02144641801714897,
0.4245891273021698,
-0.3535502552986145,
-0.34899020195007324,
-0.10199785977602005,
-0.04592717066407204,
-0.11440081149339676,
-0.06533422321081161,
-0.2706739604473114,
0.11334694176912308,
-0.07209957391023636,
0.2517625391483307,
0.13161873817443848,
-0.03917121887207031,
0.06024612486362457,
0.21152466535568237,
0.27498859167099,
0.4198956787586212,
0.2743377089500427,
0.03575153648853302,
0.07143523544073105,
-0.23575252294540405,
0.08389294147491455,
-0.04040997475385666,
-0.15166021883487701,
0.20883211493492126,
-0.13580429553985596,
0.5703296661376953,
-0.4004870355129242,
-0.32741665840148926,
0.2602047324180603,
-0.27430546283721924,
-0.17296062409877777,
-0.10397962480783463,
0.22403156757354736,
0.09327937662601471,
0.197241872549057,
0.1087377667427063,
0.3317790627479553,
0.04689546674489975,
0.02778119221329689,
-0.1801333874464035,
0.03530392423272133,
0.040068838745355606,
0.011786631308495998,
0.01797817274928093,
-0.09995760023593903,
0.2674607038497925,
0.015178094618022442,
-0.45771729946136475,
-0.1766548901796341,
-0.04136189818382263,
-0.04732748866081238,
0.25143006443977356,
0.038321252912282944,
-0.2181580513715744,
-0.0566825345158577,
0.2363061010837555,
0.12630023062229156,
-0.22399482131004333,
0.21204230189323425,
0.07184401154518127,
-0.15890643000602722,
-0.1686420887708664,
0.12280381470918655,
-0.3944004774093628,
-0.2602536976337433,
-0.28193363547325134,
-0.04939955845475197,
-0.083664171397686,
-0.2920120656490326,
-0.11237309128046036,
-0.32877612113952637,
-0.23735608160495758,
-0.12257138639688492,
0.14289870858192444,
0.43071162700653076,
-0.5336275100708008,
0.19424393773078918,
0.18607616424560547,
-0.029021237045526505,
0.09660618007183075,
-0.023078318685293198,
0.0003097584703937173,
0.13802263140678406,
-0.17932048439979553,
0.1278734654188156,
0.4110458493232727,
-0.5454345345497131,
-0.6159429550170898,
0.3077109456062317,
-0.0049896761775016785,
0.17820580303668976,
-0.14376580715179443,
-0.021746927872300148,
0.2127341777086258,
-0.05300583690404892,
0.05443805456161499,
0.058973006904125214,
0.05343620479106903,
-0.057524338364601135,
-0.4947074055671692,
-0.33287057280540466,
0.11665244400501251,
-0.01325948815792799,
-0.05561127886176109,
0.09193755686283112,
0.15818196535110474,
-0.2094929963350296,
0.4844790995121002,
-0.08584120869636536,
-0.18125492334365845,
0.11700885742902756,
0.45155882835388184,
-0.07388898730278015,
0.027472946792840958,
-0.2316354513168335,
-0.550897479057312,
0.4312419891357422,
0.03772849589586258,
-0.022250764071941376,
-0.04894094169139862,
0.05837750434875488,
-0.43798014521598816,
0.12034308165311813,
-0.31824731826782227,
0.046510979533195496,
0.010616883635520935,
0.07837720960378647,
-0.08669508993625641,
-0.008824175223708153,
-0.11494044959545135,
0.1405704915523529,
-0.15196174383163452,
0.06985821574926376,
0.004358732141554356,
0.33659958839416504,
-0.20373782515525818,
-0.22051605582237244,
0.1709301769733429,
-0.012789398431777954,
0.2898365557193756,
-0.26781371235847473,
-0.32017815113067627,
0.4959193468093872,
0.22827482223510742,
0.021591633558273315,
-0.07041439414024353,
-0.33709716796875,
-0.09507101774215698,
-0.026020508259534836,
0.19282545149326324,
0.49834465980529785,
0.05740605294704437,
0.0559966117143631,
-0.2572023868560791,
0.3138725161552429,
0.06572319567203522,
0.05681299790740013,
0.07007813453674316,
0.17818991839885712,
0.2946602404117584,
-0.024420442059636116,
-0.017040159553289413,
-0.3440817892551422,
0.21742989122867584,
0.018818117678165436,
0.010233692824840546,
0.07537292689085007,
-0.13353221118450165,
0.1482347995042801,
0.2589491307735443,
0.03663874790072441,
0.18287676572799683,
0.08732600510120392,
0.002122841775417328,
-0.41023221611976624,
0.05919934809207916,
0.3296467661857605,
0.6812973022460938,
-0.012020837515592575,
-0.08989879488945007,
-0.05428658425807953,
-0.03938661888241768,
0.039272602647542953,
0.14949113130569458,
-0.017295323312282562,
0.27114737033843994,
0.1783985197544098,
0.19017189741134644,
0.06896668672561646,
-0.21231281757354736,
-0.1901514232158661,
-0.007371923886239529,
0.05106457322835922,
-0.3820841312408447,
0.13152764737606049,
-0.13793031871318817,
0.5604398846626282,
-0.2043236792087555,
-0.5258814692497253,
-0.0548606775701046,
-0.3896040916442871,
-0.11086899042129517,
0.3982454240322113,
-0.10519488155841827,
0.042094551026821136,
-0.5863333940505981,
0.04286506772041321,
-0.0554988756775856,
-0.32560744881629944,
-0.11134722828865051,
-0.1961996704339981,
-0.12637397646903992,
-0.15539425611495972,
0.11374306678771973,
0.19289612770080566,
0.21791379153728485,
-0.10947050154209137,
-0.1682271659374237,
-0.43471473455429077,
-0.33398208022117615,
0.15419557690620422,
-0.10126429796218872,
0.050694920122623444,
0.18500767648220062,
-0.06597936153411865,
0.17979301512241364,
-0.00648542633280158,
0.009808866307139397,
-0.15558446943759918,
-0.33245065808296204,
0.19189225137233734,
0.2623600661754608,
-0.17951488494873047,
0.04053007438778877,
-0.4744686782360077,
-0.31704819202423096,
-0.3201011121273041,
0.24106962978839874,
-0.07163342833518982,
0.029591575264930725,
0.05103490129113197,
0.17495639622211456,
0.15245549380779266,
0.015661977231502533,
0.10222288221120834,
-0.02047821879386902,
-0.1949141025543213,
0.11717486381530762,
-0.014176921918988228,
-0.45008382201194763,
0.10882437229156494,
0.03576889634132385,
0.14726465940475464,
0.20899184048175812,
-0.2778182029724121,
-0.14429721236228943,
0.004703793674707413,
0.4145680367946625,
-0.03296497464179993,
-0.29652243852615356,
0.49942445755004883,
0.33558809757232666,
0.029788224026560783,
-0.15712398290634155,
-0.05984240770339966,
0.13958890736103058,
0.09975816309452057,
0.21273687481880188,
-0.35715949535369873,
0.45449110865592957,
-0.39673739671707153,
0.26238909363746643,
-0.056121256202459335,
-0.1933417171239853,
0.21922415494918823,
0.13551419973373413,
0.3633723556995392,
-0.41957417130470276,
-0.25011932849884033,
-0.01812082529067993,
-0.22729992866516113,
-0.14209067821502686,
0.04918668791651726,
-0.1898752748966217,
0.3078673183917999,
-0.01130182296037674,
-0.2713412940502167,
-0.12127666175365448,
-0.3088129460811615,
-0.08830910921096802,
-0.6213799118995667,
0.25254547595977783,
0.12949839234352112,
0.251217246055603,
-0.15207289159297943,
0.05704820156097412,
0.054892074316740036,
0.10568425059318542,
0.3619898855686188,
-0.1298968344926834,
-0.6689377427101135,
0.4119170010089874,
-0.2728247046470642,
0.3531419038772583,
0.01700311340391636,
0.6950640082359314,
0.0251033715903759,
-0.18779173493385315,
-0.07401177287101746,
-0.0956239402294159,
0.3716631531715393,
0.13012611865997314,
0.07774682343006134,
0.18752264976501465,
-0.15032640099525452,
-0.6920769214630127,
-0.1083945780992508,
0.05039623752236366,
0.383085697889328,
0.12623141705989838,
0.3629613220691681,
-0.017780669033527374,
-0.19913393259048462,
0.21982342004776,
0.38812965154647827,
-0.1670641303062439,
-0.27437624335289,
-0.2853175103664398,
-0.13652393221855164,
-0.15154454112052917,
-0.28107982873916626,
-0.041963230818510056,
0.21960727870464325,
-0.2597104609012604,
-0.06253167241811752,
-0.5216526985168457,
-0.31587299704551697,
0.06414709240198135,
0.19993379712104797,
0.44706404209136963,
-0.3979615569114685,
0.21827881038188934,
0.25032806396484375,
0.16970522701740265,
0.5388915538787842,
0.4505366384983063,
-0.05123823508620262,
-0.47957324981689453,
-0.03966139256954193,
-0.19131849706172943,
0.046155355870723724,
0.04788430780172348,
-0.046260323375463486,
-0.18486973643302917,
0.06302392482757568,
-0.2803141474723816,
-0.3086201548576355,
0.09113585203886032,
0.09951789677143097,
0.044045526534318924,
-0.3165181875228882,
-0.17713560163974762,
0.5262098908424377,
-0.09772197902202606,
-0.13015194237232208,
0.4414812922477722,
0.33308660984039307,
-0.23646984994411469,
0.5683746933937073,
-0.035057611763477325,
0.6247904300689697,
0.20053763687610626,
0.1264469474554062,
0.2727004289627075,
-0.5154507160186768,
0.06266596913337708,
0.5921412110328674,
0.029437461867928505,
-0.5868446826934814,
-0.15536026656627655,
0.03312484174966812,
-0.12538300454616547,
0.03268200904130936,
0.03686990588903427,
-0.3613358736038208,
0.07163339853286743,
0.008446767926216125,
-0.28222760558128357,
0.11833761632442474,
0.35935771465301514,
-0.20790159702301025,
0.15893985331058502,
-0.30331963300704956,
0.09121984243392944,
0.11379021406173706,
0.10303100943565369,
-0.08773671090602875,
-0.06607595086097717,
-0.14195160567760468,
-0.3079773187637329,
-0.13253121078014374,
0.2350480556488037,
-0.11993934214115143,
0.4439120888710022,
0.2897055149078369,
-0.4493193030357361,
0.2196410745382309,
0.21744754910469055,
0.4070444703102112,
-0.05828620120882988,
-0.12899285554885864,
-0.044320713728666306,
-0.2538415193557739,
-0.05696284770965576,
0.27508339285850525,
-0.020860349759459496,
0.23575900495052338,
0.024320103228092194,
-0.24130818247795105,
0.014923810958862305,
-0.2202433943748474,
-0.34887081384658813,
-0.21365496516227722,
-0.02526117116212845,
0.09170098602771759,
-0.40334153175354004,
-0.5704158544540405,
-0.3656395673751831,
-0.13380378484725952,
-0.3513590097427368,
0.04516198858618736,
0.13698148727416992,
0.0903131514787674,
0.13455092906951904,
-0.030370380729436874,
-0.37278831005096436,
0.12868404388427734,
0.4785129427909851,
-0.1395132839679718,
-0.23650668561458588,
0.5704623460769653,
-0.06644968688488007,
0.11639682948589325,
-0.22008246183395386,
0.16686826944351196,
0.29374757409095764,
-0.21604406833648682,
0.42916789650917053,
-0.23521925508975983,
-0.10538476705551147,
-0.033432383090257645,
0.5656454563140869,
0.1970892995595932,
-0.11961065977811813,
0.05682099238038063,
-0.2952885627746582,
-0.32371941208839417,
0.13764506578445435,
-0.03804723545908928,
0.46340319514274597,
-0.017283260822296143,
-0.30750057101249695,
-0.20984911918640137,
0.11282876133918762,
-0.20284488797187805,
0.0374976322054863,
0.01600019447505474,
0.04490775242447853,
0.1605370193719864,
-0.04620515555143356,
0.18105448782444,
-0.3117868900299072,
0.09754084795713425,
-0.16287189722061157,
0.035566963255405426,
-0.020624438300728798,
-0.22627128660678864,
0.17174911499023438,
0.1430513858795166,
0.2631169259548187,
-0.09589648246765137,
-0.13932910561561584,
0.004311541095376015,
-0.07367327064275742,
-0.03780914843082428,
0.3947650194168091,
-0.12234467267990112,
0.2778862714767456,
0.08953393995761871,
0.2064661979675293,
-0.1312054991722107,
0.22921088337898254,
0.06442123651504517,
0.30759119987487793,
-0.07577773928642273,
0.21964383125305176,
-0.07942210137844086,
-0.08923641592264175,
-0.23260293900966644,
0.18260392546653748,
0.02932862937450409,
0.09558281302452087,
0.18232488632202148,
-0.18027567863464355,
-0.04118836671113968,
0.11043112725019455,
0.25676870346069336,
0.5237186551094055,
-0.14971722662448883,
-0.23714043200016022,
-0.021324634552001953,
0.1600281298160553,
-0.16015034914016724,
-0.20174361765384674,
0.30036279559135437,
-0.08352956175804138,
-0.11629049479961395,
-0.07652302831411362,
-0.2054966241121292,
-0.1942749321460724,
-0.19851623475551605,
0.3335355222225189,
0.540127158164978,
-0.07226986438035965,
0.2756752371788025,
0.10503681004047394,
-0.1331188678741455,
0.1698136031627655,
0.4339623749256134,
-0.026871714740991592,
0.27280715107917786,
0.2969134747982025,
-0.010699808597564697,
0.47526997327804565,
0.10813737660646439,
0.17630067467689514,
0.14447373151779175,
0.02955232933163643,
0.05013871192932129,
-0.23837295174598694,
0.03397581726312637,
0.03377671539783478,
0.037904299795627594,
0.20748764276504517,
-0.5338287353515625,
-0.009571323171257973,
-0.052913203835487366,
-0.3925672173500061,
-0.050362445414066315,
-0.21667374670505524,
-0.2375054508447647,
-0.11660647392272949,
0.191665381193161,
-0.08714815974235535,
-0.1870366334915161,
0.25690269470214844,
0.18545816838741302,
0.13413408398628235,
-0.12626948952674866,
-0.19911698997020721,
0.2447042167186737,
0.1286832094192505,
-0.11523232609033585,
-0.24231389164924622,
0.11653079092502594,
0.06552582234144211,
-0.02700403332710266,
0.2843687832355499,
0.3048303723335266,
0.5131983757019043,
0.4630439281463623,
-0.12355412542819977,
-0.09367375075817108,
-0.06761860847473145,
-0.08907455950975418,
0.16065973043441772,
0.11764409393072128,
-0.22886934876441956,
0.14198800921440125,
0.34979525208473206,
0.10425234586000443,
0.05256592482328415,
0.35542652010917664,
0.18288469314575195,
0.25523996353149414,
-0.07936456799507141,
0.8174863457679749,
0.06526531279087067,
-0.4018477499485016,
0.18539446592330933,
0.20612473785877228,
-0.05622737109661102,
-0.24233214557170868,
0.25479254126548767,
0.23797515034675598,
0.035411689430475235,
0.04309958219528198,
0.04295113682746887,
-0.07612974941730499,
0.406138151884079,
0.39452534914016724,
-0.009130015969276428,
-0.25308957695961,
0.20115037262439728,
-0.5567248463630676,
0.12672148644924164,
0.11506767570972443,
-0.024235811084508896,
0.17355863749980927,
0.18861617147922516,
0.17911790311336517,
-0.007998321205377579,
0.12340383976697922,
0.3020167648792267,
-0.2655389904975891,
-0.07327590882778168,
-0.20394892990589142,
-0.048358116298913956,
0.17002324759960175,
-0.03841741383075714,
-0.0339166596531868,
-0.4353083074092865,
0.23178622126579285,
-0.21523022651672363,
-0.04080244153738022,
-0.12031042575836182,
-0.1444326490163803,
-0.03168055787682533,
-0.03436101973056793,
0.419456422328949,
0.12867341935634613,
0.4079837501049042,
0.04966282844543457,
-0.407670795917511,
-0.2884944677352905,
-0.1973593384027481,
-0.15792323648929596,
0.2628084123134613,
0.09484924376010895,
0.6385337114334106,
-0.09726943075656891,
0.04521259665489197,
-0.2792316973209381,
0.25948938727378845,
-0.128692626953125,
-0.07732559740543365,
-0.20838171243667603,
0.16525332629680634,
0.13980749249458313,
0.010335864499211311,
0.26789191365242004,
0.11656053364276886,
-0.06769666820764542,
0.3758801817893982,
-0.3817225694656372,
-0.28332653641700745,
0.4406757056713104,
0.021083995699882507,
-0.19059859216213226,
-0.016219675540924072,
0.3005397915840149,
-0.04263407737016678,
-0.18162915110588074,
-0.7152318954467773,
0.0028660371899604797,
0.41550976037979126,
-0.00631801038980484,
-0.0824659988284111,
0.10223747789859772,
0.28987574577331543,
0.18652406334877014,
-0.008999347686767578,
0.5413073301315308,
-0.01087275892496109,
0.011300580576062202,
-0.09686369448900223,
-0.07294753193855286
] |
https://github.com/huggingface/datasets/issues/2262 | NewsPH NLI dataset script fails to access test data. | Thanks @bhavitvyamalik for the fix !
The fix will be available in the next release.
It's already available on the `master` branch. For now you can either install `datasets` from source or use `script_version="master"` in `load_dataset` to use the fixed version of this dataset. | In Newsph-NLI Dataset (#1192), it fails to access test data.
According to the script below, the download manager will download the train data when trying to download the test data.
https://github.com/huggingface/datasets/blob/2a2dd6316af2cc7fdf24e4779312e8ee0c7ed98b/datasets/newsph_nli/newsph_nli.py#L71
If you download it according to the script above, you can see that train and test receive the same data as shown below.
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
```
In local, I modified the code of the source as below and got the correct result.
```python
71 test_path = os.path.join(download_path, "test.csv")
```
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 9000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': '-- JAI (@JaiPaller) September 13, 2019',
'label': 1,
'premise': 'Pinag-iingat ng Konsulado ng Pilipinas sa Dubai ang publiko, partikular ang mga donor, laban sa mga scam na gumagamit ng mga charitable organization.'}
```
I don't have experience with open source pull requests, so I suggest that you reflect them in the source.
Thank you for reading :) | 44 | NewsPH NLI dataset script fails to access test data.
In Newsph-NLI Dataset (#1192), it fails to access test data.
According to the script below, the download manager will download the train data when trying to download the test data.
https://github.com/huggingface/datasets/blob/2a2dd6316af2cc7fdf24e4779312e8ee0c7ed98b/datasets/newsph_nli/newsph_nli.py#L71
If you download it according to the script above, you can see that train and test receive the same data as shown below.
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
```
In local, I modified the code of the source as below and got the correct result.
```python
71 test_path = os.path.join(download_path, "test.csv")
```
```python
>>> from datasets import load_dataset
>>> newsph_nli = load_dataset(path="./datasets/newsph_nli.py")
>>> newsph_nli
DatasetDict({
train: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 420000
})
test: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 9000
})
validation: Dataset({
features: ['premise', 'hypothesis', 'label'],
num_rows: 90000
})
})
>>> newsph_nli["train"][0]
{'hypothesis': 'Ito ang dineklara ni Atty. Romulo Macalintal, abogado ni Robredo, kaugnay ng pagsisimula ng preliminary conference ngayong hapon sa Presidential Electoral Tribunal (PET).',
'label': 1,
'premise': '"Hindi ko ugali ang mamulitika; mas gusto kong tahimik na magtrabaho. Pero sasabihin ko ito ngayon: ang tapang, lakas, at diskarte, hindi nadadaan sa mapanirang salita. Ang kailangan ng taumbayan ay tapang sa gawa," ayon kay Robredo sa inilabas nitong statement.'}
>>> newsph_nli["test"][0]
{'hypothesis': '-- JAI (@JaiPaller) September 13, 2019',
'label': 1,
'premise': 'Pinag-iingat ng Konsulado ng Pilipinas sa Dubai ang publiko, partikular ang mga donor, laban sa mga scam na gumagamit ng mga charitable organization.'}
```
I don't have experience with open source pull requests, so I suggest that you reflect them in the source.
Thank you for reading :)
Thanks @bhavitvyamalik for the fix !
The fix will be available in the next release.
It's already available on the `master` branch. For now you can either install `datasets` from source or use `script_version="master"` in `load_dataset` to use the fixed version of this dataset. | [
-0.16071607172489166,
0.28491050004959106,
-0.1269758641719818,
0.17550498247146606,
0.08590236306190491,
0.04028947651386261,
0.25620779395103455,
0.365884929895401,
0.04193367436528206,
0.3072822391986847,
0.005247820168733597,
0.043371956795454025,
0.015891246497631073,
0.21912206709384918,
0.1775156557559967,
-0.17384766042232513,
-0.004024587571620941,
0.010989770293235779,
-0.13730952143669128,
0.05216465890407562,
-0.17754948139190674,
0.0072257742285728455,
-0.1995907425880432,
0.15833821892738342,
-0.03757762536406517,
0.21001896262168884,
-0.20310500264167786,
0.09416092932224274,
-0.19324304163455963,
-0.6549798846244812,
0.30907243490219116,
0.1273382157087326,
0.08327227085828781,
0.2888226807117462,
-0.00010821653268067166,
0.0894128829240799,
0.2988510727882385,
0.009161664173007011,
-0.3292863070964813,
-0.3701017498970032,
-0.32565703988075256,
-0.48365312814712524,
0.011381523683667183,
-0.38682347536087036,
-0.10006242245435715,
-0.1852467656135559,
0.26675257086753845,
0.10919748246669769,
0.25859200954437256,
0.6185494661331177,
0.2178415209054947,
0.3603421449661255,
0.08274894952774048,
-0.09773237258195877,
0.14497186243534088,
0.07252124696969986,
-0.16222673654556274,
0.14135470986366272,
-0.023770704865455627,
-0.14492098987102509,
0.07992410659790039,
0.19470956921577454,
0.051815323531627655,
0.12174707651138306,
-0.1871071755886078,
0.16514834761619568,
0.2658438980579376,
-0.22214949131011963,
-0.11037487536668777,
0.23965007066726685,
0.048449549823999405,
-0.2494378387928009,
-0.22264507412910461,
-0.03373544290661812,
-0.08445797860622406,
0.015999769791960716,
0.1275510936975479,
0.3240194320678711,
-0.22256241738796234,
0.11983127892017365,
-0.3047820031642914,
-0.0031718129757791758,
-0.38517510890960693,
0.39536261558532715,
-0.21531549096107483,
0.21622124314308167,
0.03541973605751991,
0.16956302523612976,
0.19480645656585693,
-0.17871813476085663,
-0.1353120505809784,
-0.16628532111644745,
-0.16642916202545166,
0.11049171537160873,
0.04476717486977577,
-0.03541305661201477,
-0.07125040143728256,
-0.317579984664917,
0.30239465832710266,
0.15093910694122314,
0.064139723777771,
0.06150238960981369,
-0.009062426164746284,
0.0035719536244869232,
0.14761404693126678,
-0.13037298619747162,
0.02900710329413414,
0.3485051095485687,
0.30610746145248413,
0.2977992594242096,
0.0741892009973526,
-0.058752380311489105,
0.037214986979961395,
-0.09119388461112976,
0.1269005835056305,
-0.019811104983091354,
0.41392117738723755,
-0.20752690732479095,
-0.12375890463590622,
0.24196086823940277,
-0.0031194202601909637,
-0.12902861833572388,
-0.07529041171073914,
0.422207772731781,
0.0038071582093834877,
0.04400905966758728,
0.061845920979976654,
0.3608468174934387,
-0.035158559679985046,
-0.08969318121671677,
-0.23088206350803375,
0.14729805290699005,
-0.32997873425483704,
0.1613570749759674,
0.6004882454872131,
0.09716509282588959,
0.2637769281864166,
-0.0439440980553627,
-0.19594384729862213,
-0.2917518615722656,
0.10340898483991623,
-0.24528709053993225,
0.5001853704452515,
0.13162292540073395,
0.2623944580554962,
0.18215680122375488,
-0.08750779926776886,
0.3129861354827881,
0.010126374661922455,
0.08531182259321213,
-0.01866289973258972,
-0.35647884011268616,
0.23506677150726318,
0.23541051149368286,
-0.24523930251598358,
-0.026149481534957886,
0.04248792305588722,
0.07786352932453156,
-0.15043988823890686,
-0.3769746422767639,
-0.06650609523057938,
-0.14498837292194366,
-0.23225440084934235,
-0.11427474766969681,
0.31403276324272156,
0.42877721786499023,
-0.03913920372724533,
-0.03883536532521248,
0.1627982258796692,
-0.032857779413461685,
0.1943427175283432,
0.019633367657661438,
-0.3911491930484772,
0.20490452647209167,
-0.1807556301355362,
0.04128880053758621,
0.5587879419326782,
-0.4500211477279663,
-0.7249735593795776,
0.253599613904953,
-0.021261222660541534,
0.05304056406021118,
0.17782863974571228,
0.06250496208667755,
-0.08602897822856903,
-0.02789301611483097,
-0.42743125557899475,
0.39015090465545654,
0.054688043892383575,
0.22252178192138672,
0.016525205224752426,
-0.16827039420604706,
0.35945796966552734,
0.2673204839229584,
0.044814299792051315,
-0.0441088005900383,
-0.0306842178106308,
0.47167423367500305,
0.6009885668754578,
0.048106029629707336,
0.009054077789187431,
0.0842781513929367,
-0.021751586347818375,
-0.13252131640911102,
-0.07500572502613068,
-0.07946518808603287,
-0.056626565754413605,
0.2953832447528839,
0.017941512167453766,
-0.017959296703338623,
-0.14772173762321472,
-0.0005189068615436554,
-0.5050708651542664,
-0.03853755071759224,
-0.364544540643692,
-0.22662895917892456,
0.2683855891227722,
0.38466402888298035,
0.3528346121311188,
0.3000052273273468,
-0.03028799779713154,
0.3504020571708679,
-0.3305170238018036,
-0.049624741077423096,
-0.24976830184459686,
0.2820427119731903,
-0.2013542354106903,
0.009111312218010426,
-0.022729285061359406,
0.15347030758857727,
0.1481286883354187,
-0.0519125834107399,
-0.05477401614189148,
0.28983378410339355,
0.11644390970468521,
0.08543482422828674,
-0.06160638481378555,
0.06673090904951096,
0.15110492706298828,
-0.5583311915397644,
0.2712528705596924,
0.3992883861064911,
0.1664094179868698,
-0.04699540138244629,
-0.2413632571697235,
0.22440838813781738,
-0.029788482934236526,
0.16608887910842896,
0.2944079637527466,
-0.08280029147863388,
0.2006489783525467,
-0.0955020934343338,
-0.26412102580070496,
-0.127871572971344,
0.03089851140975952,
-0.0712231993675232,
-0.08564525842666626,
-0.08738851547241211,
-0.069477878510952,
-0.024006806313991547,
0.5533158183097839,
-0.022869136184453964,
-0.08599162846803665,
-0.14221012592315674,
-0.1544727087020874,
-0.04017312079668045,
-0.04570537060499191,
0.3417985737323761,
0.33944612741470337,
-0.005240713246166706,
0.13327576220035553,
0.2720524072647095,
0.010629856958985329,
-0.25170207023620605,
0.1117662861943245,
0.125965416431427,
0.1259821355342865,
0.21573829650878906,
0.0531444326043129,
0.017805520445108414,
-0.10251900553703308,
0.03330058231949806,
0.3690500855445862,
0.18306700885295868,
-0.2688640058040619,
-0.019761718809604645,
-0.263347327709198,
-0.5984283685684204,
-0.28176018595695496,
-0.16182473301887512,
0.027654768899083138,
-0.41786161065101624,
-0.05831371992826462,
0.20760612189769745,
0.03336367383599281,
-0.17409473657608032,
-0.3731129467487335,
-0.05077521502971649,
0.02328701876103878,
-0.18454258143901825,
-0.06775842607021332,
-0.11101674288511276,
-0.2914595901966095,
0.08812764286994934,
0.09880461543798447,
0.23249830305576324,
0.185199573636055,
-0.33720672130584717,
-0.19362691044807434,
-0.4294443428516388,
-0.08378948271274567,
0.20522108674049377,
0.0387757234275341,
0.3248254358768463,
-0.008929744362831116,
0.4082072377204895,
0.1277257800102234,
0.07296048104763031,
0.2689097821712494,
-0.2258545160293579,
-0.21404632925987244,
0.3920102119445801,
0.00030693388544023037,
-0.024367690086364746,
-0.042040206491947174,
-0.8750800490379333,
-0.386827677488327,
-0.27106785774230957,
-0.07029223442077637,
-0.16410823166370392,
0.13715097308158875,
0.42776036262512207,
0.056492436677217484,
0.11122636497020721,
-0.06290735304355621,
0.1891738623380661,
-0.2624027729034424,
0.12134219706058502,
0.19683198630809784,
-0.41020041704177856,
-0.6001112461090088,
-0.0918637067079544,
0.10569626092910767,
0.14127357304096222,
0.06922855973243713,
-0.4383094310760498,
-0.09944624453783035,
-0.20355622470378876,
0.21119394898414612,
0.06551777571439743,
-0.1395415961742401,
0.09861790388822556,
-0.187658429145813,
0.015232091769576073,
-0.0599374920129776,
0.06330123543739319,
0.1874912977218628,
0.06819778680801392,
0.27796855568885803,
0.12457343935966492,
0.4347032904624939,
0.10530181229114532,
0.5339269638061523,
0.2907458245754242,
-0.0869295746088028,
0.40848153829574585,
-0.42601773142814636,
0.09730814397335052,
0.05228521674871445,
-0.30372336506843567,
0.1839882880449295,
0.03494184464216232,
0.19581210613250732,
0.027264147996902466,
-0.2361384928226471,
-0.06804678589105606,
-0.22920465469360352,
0.015842895954847336,
-0.25011053681373596,
-0.27465423941612244,
0.10848822444677353,
0.10415219515562057,
0.24644628167152405,
0.27212613821029663,
0.29706740379333496,
-0.025074714794754982,
-0.28638511896133423,
-0.08310779929161072,
0.1753789484500885,
0.0077822208404541016,
0.1302410364151001,
-0.14858998358249664,
-0.3568095564842224,
-0.5432792901992798,
0.049816519021987915,
0.1777336448431015,
0.6533558964729309,
-0.09522286057472229,
-0.2328333556652069,
0.057093169540166855,
-0.06566271185874939,
0.21397201716899872,
-0.26221781969070435,
0.2860744595527649,
0.09416790306568146,
-0.19255021214485168,
-0.46142324805259705,
-0.14900241792201996,
-0.5367029905319214,
0.22001609206199646,
0.04588083177804947,
0.07830315828323364,
-0.31289228796958923,
-0.0865689292550087,
0.41020169854164124,
0.06676331907510757,
-0.08958663046360016,
-0.11991135030984879,
-0.07817686349153519,
-0.23069360852241516,
-0.19836457073688507,
-0.06344608217477798,
-0.02729654125869274,
0.15443973243236542,
-0.47264188528060913,
0.04351365193724632,
0.14386044442653656,
0.15007245540618896,
0.04522472992539406,
0.48041290044784546,
0.14377060532569885,
0.11521322280168533,
0.162663996219635,
0.12068971246480942,
0.0033895038068294525,
0.04838523268699646,
0.44015246629714966,
0.33298131823539734,
-0.08843265473842621,
0.22969922423362732,
-0.2514721155166626,
0.23217257857322693,
0.40904298424720764,
-0.08432330191135406,
-0.0802554115653038,
0.012457797303795815,
-0.4772043824195862,
-0.1453661471605301,
0.10558968037366867,
0.48805344104766846,
-0.19757667183876038,
-0.16394677758216858,
-0.3932228684425354,
0.29434841871261597,
0.18796956539154053,
-0.06931741535663605,
-0.1881125271320343,
-0.31135380268096924,
-0.09016624838113785,
0.19939418137073517,
-0.3372792601585388,
0.7343433499336243,
0.2030811309814453,
0.1060783863067627,
0.3501306474208832,
0.04925796389579773,
0.14451567828655243,
-0.21735407412052155,
0.14016541838645935,
-0.2893863022327423,
-0.1896621286869049,
0.050720736384391785,
-0.133752703666687,
-0.05758935213088989,
0.0699673742055893,
-0.13883569836616516,
0.19182224571704865,
0.07651908695697784,
0.04658925160765648,
-0.09036147594451904,
0.4218003749847412,
-0.19529567658901215,
0.22799545526504517,
-0.37044557929039,
0.18075183033943176,
0.04095173999667168,
0.19492389261722565,
-0.12490061670541763,
-0.1258855015039444,
-0.2114582657814026,
-0.08055253326892853,
-0.23224510252475739,
0.3438405990600586,
-0.10148061811923981,
-0.008038992062211037,
-0.15488670766353607,
-0.07160023599863052,
-0.20923557877540588,
0.3940390348434448,
0.1898004412651062,
0.14555548131465912,
-0.2332073152065277,
-0.015182066708803177,
-0.12186231464147568,
-0.09891358762979507,
0.1702076941728592,
0.07207811623811722,
0.2749035656452179,
-0.23749971389770508,
-0.5205233693122864,
0.2717045545578003,
0.012212657369673252,
0.011516958475112915,
-0.30110007524490356,
-0.05158302187919617,
0.22214913368225098,
-0.4237348437309265,
-0.2757752537727356,
-0.12707000970840454,
-0.2994161546230316,
-0.08440598845481873,
0.17990092933177948,
-0.17244330048561096,
-0.30161744356155396,
0.053875066339969635,
0.10615096986293793,
-0.34423941373825073,
0.010217828676104546,
0.26723432540893555,
-0.049855947494506836,
0.25701361894607544,
0.5883638858795166,
0.14268141984939575,
0.09780767560005188,
-0.2515435516834259,
-0.1344151347875595,
0.39672744274139404,
-0.4480818212032318,
-0.2421756237745285,
-0.058732304722070694,
0.2318984717130661,
0.42252376675605774,
0.4979727268218994,
-0.05246599018573761,
-0.23596671223640442,
-0.0647888034582138,
-0.4515603184700012,
-0.14051347970962524,
0.045511551201343536,
0.08130493760108948,
0.20866814255714417,
0.14233607053756714,
0.029659103602170944,
-0.009256096556782722,
-0.10554619133472443,
-0.37270107865333557,
-0.10196313261985779,
-0.2531987130641937,
0.1466190367937088,
-0.06725484132766724,
0.007676765322685242,
0.1220957487821579,
0.004564709961414337,
0.12221507728099823,
0.10531723499298096,
-0.16730862855911255,
-0.24062511324882507,
-0.09038911759853363,
0.11208634078502655,
0.20749419927597046,
-0.04634903371334076,
-0.3955715000629425,
-0.21705053746700287,
-0.11752739548683167,
-0.06345440447330475,
0.15169359743595123,
-0.10893653333187103,
0.0791209265589714,
0.4872288703918457,
0.1247825026512146,
0.19114357233047485,
0.06289946287870407,
0.10008084028959274,
-0.25002485513687134,
0.3012392520904541,
-0.00087388651445508,
0.3668178915977478,
-0.0504579097032547,
-0.02846422791481018,
-0.3968820571899414,
-0.1286950409412384,
0.3236764073371887,
0.1369549036026001,
0.22938036918640137,
-0.2778629660606384,
0.17188824713230133,
-0.22853590548038483,
0.3552611172199249,
0.41848960518836975,
-0.33209162950515747,
0.07600755244493484,
0.030481483787298203,
0.25557276606559753,
-0.1592840701341629,
0.050718944519758224,
0.17916327714920044,
-0.003161666914820671,
0.14298312366008759,
0.24690553545951843,
0.33779382705688477,
-0.06953669339418411,
0.2741982340812683,
0.029977381229400635,
0.2737223207950592,
-0.1217312216758728,
0.0021440249402076006,
0.39899563789367676,
-0.124055877327919,
-0.04547008499503136,
0.024548785760998726,
0.01858832687139511,
0.08417502790689468,
0.18091343343257904,
0.014567501842975616,
0.6019999980926514,
0.34797611832618713,
0.10102660953998566,
0.15486514568328857,
-0.015883471816778183,
-0.14897336065769196,
0.07073090970516205,
-0.2232416868209839,
0.2216871678829193,
-0.12341654300689697,
0.35655343532562256,
-0.13345740735530853,
0.09581438452005386,
-0.5014272928237915,
0.116344153881073,
-0.006638932973146439,
-0.0972696840763092,
-0.3805084526538849,
-0.2218049168586731,
-0.26618117094039917,
-0.12696847319602966,
-0.07134661078453064,
-0.11149100959300995,
0.3025801181793213,
0.15854527056217194,
-0.333027720451355,
-0.38681718707084656,
0.058263860642910004,
0.17915970087051392,
0.10495337098836899,
-0.26972293853759766,
0.33258000016212463,
-0.04742683470249176,
-0.06903645396232605,
0.3110887110233307,
0.5155497193336487,
0.3372049033641815,
0.13091015815734863,
0.07484611123800278,
0.09877944737672806,
0.03507556766271591,
-0.19858112931251526,
0.0018599741160869598,
0.41884341835975647,
0.259806752204895,
-0.017660386860370636,
0.38987791538238525,
0.21894071996212006,
-0.09061400592327118,
-0.2487785369157791,
0.23017938435077667,
0.06579796969890594,
-0.2974545359611511,
0.13745279610157013,
-0.20304954051971436,
0.05377807468175888,
-0.3047027587890625,
-0.10692013055086136,
-0.5738534927368164,
-0.2494076043367386,
0.248508483171463,
0.12775471806526184,
0.373263418674469,
-0.21220147609710693,
0.1067163497209549,
-0.07658916711807251,
0.4998401701450348,
0.239332377910614,
0.2802223563194275,
-0.2526634633541107,
-0.29628145694732666,
-0.6371306777000427,
0.28000935912132263,
-0.033649031072854996,
-0.3757677376270294,
0.018093694001436234,
0.09665778279304504,
-0.1841702163219452,
0.04588497802615166,
0.01630018651485443,
-0.05027366057038307,
-0.09214229881763458,
0.4529130160808563,
-0.44186097383499146,
-0.35077446699142456,
-0.05238093435764313,
0.15370838344097137,
-0.25670668482780457,
-0.13591428101062775,
0.10696211457252502,
-0.11308319866657257,
0.04789824038743973,
0.010355135425925255,
-0.29449689388275146,
0.0620654933154583,
0.4316852390766144,
0.40631186962127686,
0.1964343637228012,
0.6059330701828003,
-0.2052845060825348,
-0.030618466436862946,
-0.47894513607025146,
-0.03310034051537514,
-0.0587771050632,
0.06317994743585587,
-0.07284407317638397,
0.19512712955474854,
0.11726408451795578,
0.1936027556657791,
-0.0026943471748381853,
-0.0902223140001297,
-0.09189099073410034,
-0.459136426448822,
-0.07000714540481567,
-0.16789083182811737,
-0.1076350063085556,
0.023489149287343025,
0.012399968691170216,
0.15258139371871948,
-0.014943495392799377,
0.0027827806770801544,
-0.043288860470056534,
-0.20132340490818024,
0.32911401987075806,
-0.17062993347644806,
-0.2205202281475067,
-0.001282962504774332,
0.0587950125336647,
-0.43192940950393677,
0.13736660778522491,
-0.6566751599311829,
0.14350661635398865,
0.13447938859462738,
0.09653032571077347,
-0.0786253809928894,
0.15401038527488708,
-0.04465658217668533,
0.2452206164598465,
-0.09603319317102432,
0.4119139611721039,
0.06310836970806122,
-0.26708200573921204,
-0.06919893622398376,
0.03404037654399872
] |
https://github.com/huggingface/datasets/issues/2256 | Running `datase.map` with `num_proc > 1` uses a lot of memory | Thanks for reporting ! We are working on this and we'll do a patch release very soon. | ## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.

## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
| 17 | Running `datase.map` with `num_proc > 1` uses a lot of memory
## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.

## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
Thanks for reporting ! We are working on this and we'll do a patch release very soon. | [
-0.07545448839664459,
-0.30183178186416626,
-0.04138430953025818,
0.35142219066619873,
0.20282043516635895,
0.09861717373132706,
0.09969004988670349,
0.28427568078041077,
0.2723551094532013,
0.22350499033927917,
0.18526265025138855,
0.43167784810066223,
-0.14579465985298157,
-0.04350974038243294,
-0.00009092316031455994,
0.14814189076423645,
0.28697821497917175,
0.014850407838821411,
0.10281562805175781,
0.05901927500963211,
-0.4523688852787018,
0.015749383717775345,
-0.39911919832229614,
-0.28988760709762573,
-0.14791816473007202,
0.14752475917339325,
-0.08651138097047806,
0.3391435742378235,
0.21119318902492523,
-0.5017672181129456,
0.13267004489898682,
-0.08520016074180603,
0.16642698645591736,
0.2540667653083801,
-0.00011370376887498423,
-0.10591086745262146,
0.13374543190002441,
0.10019873082637787,
-0.18217888474464417,
0.14869441092014313,
-0.312330961227417,
-0.38034212589263916,
-0.06053381413221359,
-0.3717798888683319,
0.07397971302270889,
0.16455981135368347,
-0.014603601768612862,
-0.6698251366615295,
0.21820378303527832,
0.3299291729927063,
0.19704964756965637,
-0.13521605730056763,
-0.12679576873779297,
0.1426888108253479,
0.26138031482696533,
0.21448515355587006,
-0.0019848402589559555,
-0.2373129427433014,
0.3164680302143097,
0.10268668830394745,
0.06360797584056854,
0.4374418556690216,
-0.2772940397262573,
-0.031457774341106415,
-0.04679647833108902,
0.1114465743303299,
0.33586442470550537,
-0.24662169814109802,
0.3791426122188568,
-0.1982058882713318,
0.176123708486557,
-0.32401856780052185,
0.19392098486423492,
-0.13675609230995178,
-0.28508317470550537,
-0.4452188014984131,
0.22630742192268372,
0.038525596261024475,
-0.1923343986272812,
0.13161034882068634,
-0.020382728427648544,
-0.07721017301082611,
0.22512677311897278,
-0.04304623603820801,
-0.051902711391448975,
0.14161904156208038,
0.005718179978430271,
0.17256534099578857,
0.2679639160633087,
-0.11353753507137299,
-0.2476181983947754,
-0.022586483508348465,
-0.03467215970158577,
0.11451749503612518,
-0.38294491171836853,
-0.16031518578529358,
0.09035129845142365,
-0.17620158195495605,
0.05101647973060608,
-0.30325233936309814,
0.10506545752286911,
0.15920975804328918,
0.21678218245506287,
0.1538216471672058,
0.3814414441585541,
0.012694723904132843,
0.036228179931640625,
0.31340673565864563,
0.24022506177425385,
-0.13461081683635712,
0.25505682826042175,
0.057650137692689896,
0.1715007722377777,
-0.2757337987422943,
0.32830628752708435,
-0.032456278800964355,
0.2573716640472412,
-0.18186865746974945,
-0.2745565176010132,
0.2707967758178711,
-0.0707864910364151,
0.25624990463256836,
0.01077082846313715,
0.2392868995666504,
0.23396773636341095,
0.4569326639175415,
-0.12908190488815308,
-0.16776175796985626,
-0.29516124725341797,
-0.17803913354873657,
-0.16123701632022858,
-0.06243846192955971,
-0.4973859488964081,
0.012790060602128506,
0.20010490715503693,
-0.015772338956594467,
-0.06724978983402252,
0.08552335947751999,
-0.10044769942760468,
-0.31986939907073975,
0.002558114007115364,
-0.10370296239852905,
0.26246270537376404,
0.25408560037612915,
-0.2491624504327774,
0.401882529258728,
-0.13850170373916626,
-0.0014931298792362213,
-0.3082483410835266,
0.47174587845802307,
-0.3724946975708008,
-0.26676490902900696,
-0.1029585599899292,
0.09553965926170349,
0.1612253189086914,
0.28922998905181885,
-0.2312072217464447,
0.2438075691461563,
0.43354126811027527,
0.03527352586388588,
-0.06866667419672012,
-0.11080954968929291,
-0.6351304054260254,
-0.26197171211242676,
-0.0059178294613957405,
0.4431116580963135,
-0.3248886168003082,
0.20435282588005066,
0.09117579460144043,
0.061570532619953156,
0.5199877619743347,
0.312188982963562,
0.0134993065148592,
-0.27046680450439453,
0.03423473984003067,
0.1604536771774292,
0.263450562953949,
-0.3385004997253418,
-0.8233775496482849,
0.4366505742073059,
-0.22586371004581451,
-0.09509027749300003,
0.1500331610441208,
0.25520360469818115,
0.3965848684310913,
-0.17067763209342957,
0.050816722214221954,
0.22312361001968384,
0.05756143480539322,
0.6018772721290588,
-0.47440946102142334,
-0.29357632994651794,
0.04396621510386467,
-0.02418679930269718,
-0.11457489430904388,
-0.14878976345062256,
0.0661744773387909,
0.19633542001247406,
0.4563106298446655,
-0.046356093138456345,
0.22465811669826508,
0.16085344552993774,
-0.10284030437469482,
-0.05635352432727814,
0.12546677887439728,
-0.2527485489845276,
-0.4038701057434082,
0.12209593504667282,
0.09620149433612823,
-0.15376172959804535,
-0.07502630352973938,
-0.19542793929576874,
0.05057629197835922,
0.014978708699345589,
0.11896808445453644,
-0.3708416521549225,
0.05181723088026047,
-0.06824277341365814,
0.015942439436912537,
-0.26036006212234497,
0.09318658709526062,
0.29027700424194336,
0.1489875316619873,
-0.011833536438643932,
-0.2216126024723053,
0.004383396357297897,
-0.03597664088010788,
-0.1321115791797638,
-0.18998587131500244,
0.11205677688121796,
0.10099208354949951,
0.04593426361680031,
-0.12238378077745438,
0.2798473536968231,
0.2700844407081604,
-0.09175132215023041,
-0.16884973645210266,
0.028682231903076172,
0.39513856172561646,
-0.24789072573184967,
0.33018758893013,
0.15034297108650208,
0.23833584785461426,
-0.17069458961486816,
-0.13152149319648743,
-0.06799988448619843,
0.18713384866714478,
0.2635292708873749,
-0.3016979694366455,
0.12579941749572754,
0.22882631421089172,
0.011069241911172867,
0.2334272265434265,
-0.3601563274860382,
0.044416964054107666,
0.266649454832077,
0.09426680207252502,
0.184788316488266,
0.0502936989068985,
0.22746789455413818,
0.38004305958747864,
0.00715772807598114,
-0.0674426481127739,
0.22895309329032898,
-0.4205147624015808,
-0.2080097496509552,
0.12678983807563782,
-0.1767045557498932,
0.42257195711135864,
0.16835594177246094,
0.03270934522151947,
-0.016371259465813637,
-0.003528956323862076,
-0.05069715529680252,
0.1758860945701599,
0.08711159229278564,
-0.07448631525039673,
-0.34628644585609436,
0.23627212643623352,
-0.13576041162014008,
-0.06633264571428299,
-0.10101833939552307,
0.07100037485361099,
0.3797440528869629,
-0.30990949273109436,
0.020358437672257423,
-0.19118936359882355,
0.3776615560054779,
0.07410671561956406,
0.10366693884134293,
0.1740550696849823,
-0.18101271986961365,
-0.04555291682481766,
0.09400270879268646,
0.010913170874118805,
0.04891340434551239,
0.044029492884874344,
0.13307178020477295,
0.05733141303062439,
0.046141378581523895,
-0.161772221326828,
-0.24328263103961945,
-0.25433531403541565,
-0.03496440500020981,
0.263314425945282,
0.01997922919690609,
0.3575659990310669,
0.041064679622650146,
-0.14433324337005615,
-0.03425787389278412,
-0.1015552505850792,
-0.02049192041158676,
0.12999893724918365,
-0.0371876060962677,
-0.199278324842453,
-0.07633619010448456,
-0.07124722003936768,
0.1608322709798813,
-0.05483689904212952,
-0.2768734395503998,
-0.14138926565647125,
0.318342924118042,
0.0626070499420166,
-0.09817575663328171,
-0.2886623740196228,
-0.21882697939872742,
-0.12633877992630005,
-0.13345901668071747,
0.16969504952430725,
0.12526214122772217,
0.40804457664489746,
-0.281424343585968,
0.29766517877578735,
0.07945972681045532,
0.12178811430931091,
-0.014147179201245308,
-0.353633314371109,
-0.05412781983613968,
0.051354363560676575,
-0.04436685889959335,
-0.14959895610809326,
0.03393254056572914,
0.1202751100063324,
-0.1339850276708603,
0.17448170483112335,
-0.4615814685821533,
0.11046425998210907,
-0.46683916449546814,
0.11160421371459961,
0.0113622285425663,
0.08001060038805008,
0.5854110717773438,
0.3444526195526123,
-0.10513525456190109,
0.04834806174039841,
-0.22941306233406067,
0.03139211982488632,
-0.08763015270233154,
0.003382839262485504,
0.23332855105400085,
0.45632484555244446,
0.2585020959377289,
0.14664293825626373,
0.5971668362617493,
-0.15719041228294373,
0.05917980521917343,
0.09310680627822876,
-0.101999431848526,
-0.006808437407016754,
-0.22075611352920532,
0.10006212443113327,
-0.15524739027023315,
-0.1417073905467987,
0.43486982583999634,
0.1866176426410675,
-0.5755246877670288,
0.036955781280994415,
0.07874438166618347,
-0.03395385295152664,
-0.26884451508522034,
0.3238789737224579,
-0.22401919960975647,
0.11537843942642212,
0.05752227082848549,
0.039731405675411224,
-0.42041826248168945,
-0.4140310287475586,
-0.1729496568441391,
-0.21008415520191193,
-0.12546995282173157,
-0.21117591857910156,
-0.2528618574142456,
-0.008726113475859165,
-0.9209542870521545,
0.4346579909324646,
0.04230639338493347,
0.2663874924182892,
0.029117342084646225,
-0.1270744800567627,
0.22691048681735992,
-0.09607905149459839,
0.5157926678657532,
-0.05528239160776138,
0.06356407701969147,
-0.033119287341833115,
0.07163994759321213,
-0.3244417905807495,
0.11784420907497406,
-0.37028536200523376,
0.2683572769165039,
0.11217258870601654,
0.4310155212879181,
-0.07073792815208435,
-0.2245577573776245,
0.32845965027809143,
-0.03985912352800369,
-0.17845241725444794,
-0.10643402487039566,
-0.22241143882274628,
-0.4364832639694214,
-0.3006705045700073,
0.1323171705007553,
0.19935248792171478,
-0.029814740642905235,
0.05941692739725113,
-0.21824169158935547,
-0.056851476430892944,
-0.19216275215148926,
0.3076767325401306,
-0.06339550018310547,
0.21527394652366638,
0.12706053256988525,
0.09362761676311493,
0.17792841792106628,
0.15573346614837646,
0.20297834277153015,
0.3056217432022095,
-0.06926766037940979,
0.0772811621427536,
0.17788365483283997,
-0.020126724615693092,
0.28975144028663635,
0.3837609887123108,
-0.0966140553355217,
-0.16512107849121094,
-0.4494529664516449,
0.444865345954895,
-0.5467808842658997,
-0.0021800801623612642,
0.35767585039138794,
0.1874076873064041,
-0.3642304837703705,
-0.46819818019866943,
0.3083806037902832,
0.43011224269866943,
-0.23086658120155334,
0.32385018467903137,
-0.3715760111808777,
-0.3439401090145111,
0.4432552456855774,
0.24626082181930542,
1.0496553182601929,
-0.41707849502563477,
0.15677599608898163,
-0.11832759529352188,
-0.10925833135843277,
0.2459251582622528,
-0.24755211174488068,
0.2015375792980194,
-0.10536076128482819,
-0.15116339921951294,
0.09925180673599243,
-0.07129871100187302,
0.2511323392391205,
0.2892047166824341,
-0.34140586853027344,
0.14958550035953522,
0.011305980384349823,
0.1863740086555481,
-0.027917051687836647,
0.03840193152427673,
0.21899442374706268,
-0.3954831659793854,
-0.09761033207178116,
0.15870705246925354,
0.0917464941740036,
-0.24103981256484985,
0.06055343896150589,
0.19792921841144562,
0.04370904341340065,
-0.4062681794166565,
-0.2723635733127594,
-0.04609982296824455,
-0.21858489513397217,
0.4199739694595337,
-0.3964388370513916,
-0.036308515816926956,
0.11375010013580322,
0.29320019483566284,
0.016906265169382095,
0.3196718096733093,
0.049814607948064804,
-0.22686053812503815,
0.3166848123073578,
0.32541462779045105,
0.24441832304000854,
-0.029882140457630157,
0.03444227576255798,
0.12235841900110245,
-0.3180612325668335,
0.16352686285972595,
0.0399920679628849,
-0.17026828229427338,
-0.274953156709671,
0.21884192526340485,
0.16918060183525085,
-0.03484594449400902,
0.0755603015422821,
0.13493013381958008,
-0.27109915018081665,
-0.20853111147880554,
0.12630702555179596,
0.0586598701775074,
-0.19138644635677338,
0.6787998676300049,
-0.15122918784618378,
-0.5358078479766846,
-0.03904047980904579,
0.4033432900905609,
0.3998195230960846,
-0.041990943253040314,
0.2359112650156021,
-0.052958887070417404,
-0.24722914397716522,
-0.2729046940803528,
0.061573900282382965,
-0.19388557970523834,
-0.21332818269729614,
0.16211743652820587,
-0.20208880305290222,
-0.17384234070777893,
-0.16148672997951508,
-0.1788175404071808,
-0.10469356179237366,
0.04174813628196716,
0.02451280876994133,
-0.16258767247200012,
-0.5511977076530457,
-0.0844380259513855,
-0.004896894097328186,
0.30563825368881226,
0.02844616025686264,
0.1492985486984253,
-0.4053388237953186,
0.26316210627555847,
-0.28549087047576904,
0.16817134618759155,
0.031189141795039177,
0.2942489683628082,
0.13968175649642944,
0.13569092750549316,
0.0485881008207798,
-0.11665947735309601,
0.11718261241912842,
0.4313504695892334,
-0.09450013935565948,
-0.2407006323337555,
0.1281098872423172,
0.12159034609794617,
-0.24006497859954834,
-0.4046660363674164,
-0.07694119960069656,
-0.10591146349906921,
-0.10607495903968811,
-0.36665308475494385,
0.33266398310661316,
0.2881287932395935,
0.0065843164920806885,
0.03317243233323097,
0.3520737290382385,
0.029405392706394196,
0.3683868646621704,
0.4676436483860016,
-0.31811437010765076,
0.43905413150787354,
-0.1310400366783142,
0.4889287054538727,
-0.009568757377564907,
-0.11776190996170044,
-0.05416059494018555,
0.12304376065731049,
0.18782179057598114,
0.2196969985961914,
0.02210395038127899,
-0.23463697731494904,
-0.08866066485643387,
0.3871628940105438,
0.011669643223285675,
0.19405272603034973,
-0.21176868677139282,
-0.09956424683332443,
0.21907171607017517,
0.19658973813056946,
-0.0653882771730423,
-0.14991895854473114,
0.3283314108848572,
0.10248967260122299,
0.05336805805563927,
0.3175072968006134,
0.15530619025230408,
-0.15664030611515045,
-0.21675612032413483,
0.056921325623989105,
0.18646590411663055,
-0.2504199743270874,
0.04450007155537605,
0.4319394826889038,
0.12195505201816559,
-0.05111928656697273,
0.13287469744682312,
0.006082853302359581,
0.33919239044189453,
0.7737323641777039,
0.029908057302236557,
0.4731135964393616,
0.25305214524269104,
0.38227325677871704,
-0.25864171981811523,
-0.2549138367176056,
0.019964441657066345,
0.5909481048583984,
-0.5202934741973877,
0.34488645195961,
0.14922191202640533,
0.127131849527359,
-0.17944961786270142,
-0.013803062960505486,
-0.27266058325767517,
0.20041899383068085,
-0.24778011441230774,
-0.3404516577720642,
0.23592832684516907,
-0.05988333001732826,
-0.21303564310073853,
0.16990087926387787,
-0.15788498520851135,
-0.18628127872943878,
0.7662408351898193,
0.11371152848005295,
-0.20512928068637848,
-0.033738814294338226,
-0.0958879217505455,
0.07576052844524384,
0.25374847650527954,
-0.40557438135147095,
0.044793348759412766,
-0.11280570924282074,
0.13318616151809692,
-0.006525170058012009,
-0.09093266725540161,
0.3416786789894104,
0.42728546261787415,
-0.3083944320678711,
0.009165463037788868,
0.07353008538484573,
-0.02139357477426529,
-0.28657788038253784,
0.2351248562335968,
-0.16211073100566864,
0.19218114018440247,
-0.00532886665314436,
0.02776063047349453,
-0.14314836263656616,
-0.3150230944156647,
0.3541501760482788,
0.27106520533561707,
0.0317654013633728,
0.23561552166938782,
0.0002751760184764862,
-0.2144954800605774,
0.08646852523088455,
-0.1226089671254158,
-0.2344953417778015,
-0.4195283055305481,
0.4404405951499939,
-0.4686652719974518,
0.4340607523918152,
-0.1359061747789383,
0.08928130567073822,
-0.024970799684524536,
0.34738361835479736,
-0.27261441946029663,
-0.30213698744773865,
-0.3087104260921478,
-0.19539004564285278,
-0.2418973743915558,
0.014777489006519318,
-0.22256019711494446,
0.013464448973536491,
-0.1187453418970108,
0.20088361203670502,
-0.21308282017707825,
0.2623046636581421,
0.04369374364614487,
0.02404918149113655,
0.07427798211574554,
0.3759101331233978,
-0.2080879658460617,
0.16248175501823425,
-0.0778406411409378,
0.0834021046757698,
0.2171083241701126,
-0.7093383073806763,
0.3202187418937683,
-0.058717381209135056,
0.027520939707756042,
-0.44661933183670044,
0.1894744336605072,
-0.01854019984602928,
0.24798470735549927,
0.5835254192352295,
0.316678911447525,
0.14921198785305023,
-0.09072543680667877,
-0.27160388231277466,
-0.24309676885604858,
0.1842837929725647,
-0.13862676918506622,
-0.14158615469932556,
-0.015617698431015015,
-0.07926537096500397,
-0.3890059292316437,
-0.08097033202648163,
-0.06480308622121811,
-0.11232990026473999,
0.002369556576013565,
0.04721909388899803,
-0.32459670305252075,
-0.008105052635073662,
0.05943837761878967,
0.2595493495464325,
-0.20235931873321533,
0.2692159116268158,
0.03537873178720474,
0.0073945485055446625,
-0.08583030104637146,
-0.44335564970970154,
0.2853230834007263,
-0.16330334544181824,
-0.3462833762168884,
-0.17087487876415253,
0.40532317757606506,
-0.20974969863891602,
-0.17062215507030487,
-0.23712310194969177,
-0.023558765649795532,
0.1602027863264084,
-0.039621226489543915,
-0.4610652029514313,
0.2239740490913391,
-0.11260297894477844,
-0.2044069617986679,
-0.06545207649469376,
0.2856174409389496,
0.00711275078356266,
0.026275528594851494,
0.22555774450302124,
-0.5136156678199768
] |
https://github.com/huggingface/datasets/issues/2256 | Running `datase.map` with `num_proc > 1` uses a lot of memory | We did a patch release to fix this issue.
It should be fixed in the new version 1.6.1
Thanks again for reporting and for the details :) | ## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.

## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
| 27 | Running `datase.map` with `num_proc > 1` uses a lot of memory
## Describe the bug
Running `datase.map` with `num_proc > 1` leads to a tremendous memory usage that requires swapping on disk and it becomes very slow.
## Steps to reproduce the bug
```python
from datasets import load_dataset
dstc8_datset = load_dataset("roskoN/dstc8-reddit-corpus", keep_in_memory=False)
def _prepare_sample(batch):
return {"input_ids": list(), "attention_mask": list()}
for split_name, dataset_split in list(dstc8_datset.items()):
print(f"Processing {split_name}")
encoded_dataset_split = dataset_split.map(
function=_prepare_sample,
batched=True,
num_proc=4,
remove_columns=dataset_split.column_names,
batch_size=10,
writer_batch_size=10,
keep_in_memory=False,
)
print(encoded_dataset_split)
path = f"./data/encoded_{split_name}"
encoded_dataset_split.save_to_disk(path)
```
## Expected results
Memory usage should stay within reasonable boundaries.
## Actual results
This is htop-output from running the provided script.

## Versions
```
- Datasets: 1.6.0
- Python: 3.8.8 (default, Apr 13 2021, 19:58:26)
[GCC 7.3.0]
- Platform: Linux-4.19.128-microsoft-standard-x86_64-with-glibc2.10
```
Running on WSL2
We did a patch release to fix this issue.
It should be fixed in the new version 1.6.1
Thanks again for reporting and for the details :) | [
-0.07295113056898117,
-0.29298198223114014,
-0.04242713004350662,
0.37070679664611816,
0.20692743360996246,
0.08793439716100693,
0.08913220465183258,
0.2784171402454376,
0.26258790493011475,
0.22960996627807617,
0.17976847290992737,
0.43095552921295166,
-0.1489769071340561,
-0.027788668870925903,
-0.01657937467098236,
0.14387431740760803,
0.28300338983535767,
0.01984194666147232,
0.09929423779249191,
0.07164432108402252,
-0.44891121983528137,
0.028354696929454803,
-0.4113304615020752,
-0.28221839666366577,
-0.15984873473644257,
0.14891158044338226,
-0.08905507624149323,
0.33829230070114136,
0.20940455794334412,
-0.5164690017700195,
0.1316252499818802,
-0.08999241888523102,
0.17361433804035187,
0.26494359970092773,
-0.00011428431753301993,
-0.10161976516246796,
0.125217467546463,
0.09715995192527771,
-0.19574633240699768,
0.12763407826423645,
-0.3146616220474243,
-0.3634471595287323,
-0.03031632862985134,
-0.3590407073497772,
0.07265237718820572,
0.1657172590494156,
-0.01943868212401867,
-0.6739726662635803,
0.21709918975830078,
0.3392876386642456,
0.19417332112789154,
-0.13664895296096802,
-0.11968645453453064,
0.13010451197624207,
0.23647114634513855,
0.21397709846496582,
0.0010627750307321548,
-0.2308274209499359,
0.3229639530181885,
0.114924356341362,
0.07475169748067856,
0.4133725166320801,
-0.26544955372810364,
-0.03843338415026665,
-0.05350959300994873,
0.09970838576555252,
0.3521294891834259,
-0.27202945947647095,
0.3823860287666321,
-0.19500732421875,
0.18141880631446838,
-0.33273330330848694,
0.1823686957359314,
-0.13487495481967926,
-0.27931806445121765,
-0.45107826590538025,
0.22989901900291443,
0.03670938313007355,
-0.18824896216392517,
0.13664251565933228,
-0.03806053102016449,
-0.0894392803311348,
0.2267848253250122,
-0.053373709321022034,
-0.03682323172688484,
0.11442740261554718,
0.0036472391802817583,
0.17407234013080597,
0.27287423610687256,
-0.1116073727607727,
-0.2295517474412918,
-0.028294436633586884,
-0.03940309211611748,
0.1216236799955368,
-0.39876455068588257,
-0.15794600546360016,
0.06896111369132996,
-0.1813657581806183,
0.04635640233755112,
-0.30800992250442505,
0.1184397041797638,
0.15781569480895996,
0.2054121345281601,
0.15229764580726624,
0.38607633113861084,
0.009393354877829552,
0.05976967513561249,
0.30858662724494934,
0.22376272082328796,
-0.14642344415187836,
0.25824829936027527,
0.04177914187312126,
0.16728270053863525,
-0.2809310853481293,
0.3191930651664734,
-0.028518319129943848,
0.23656673729419708,
-0.19378675520420074,
-0.2665582597255707,
0.2586750388145447,
-0.06105148419737816,
0.26118284463882446,
0.02228645049035549,
0.22625508904457092,
0.24486413598060608,
0.44706135988235474,
-0.1463557779788971,
-0.16092708706855774,
-0.2841986119747162,
-0.18332549929618835,
-0.1512221097946167,
-0.0574943833053112,
-0.504668116569519,
0.022480975836515427,
0.20602013170719147,
-0.028393760323524475,
-0.06643633544445038,
0.09338787943124771,
-0.10530440509319305,
-0.3432493805885315,
0.012175725772976875,
-0.11258424818515778,
0.25728026032447815,
0.262068510055542,
-0.239893838763237,
0.3993426263332367,
-0.15055957436561584,
0.01624327152967453,
-0.30131080746650696,
0.4810847342014313,
-0.3707546293735504,
-0.2709367573261261,
-0.09900850057601929,
0.08520831167697906,
0.1575818657875061,
0.29476457834243774,
-0.24208804965019226,
0.24453356862068176,
0.42864489555358887,
0.026988361030817032,
-0.08895280212163925,
-0.12134188413619995,
-0.6368370056152344,
-0.26818621158599854,
0.003034548833966255,
0.4324856996536255,
-0.326406866312027,
0.21705710887908936,
0.0809328630566597,
0.034448884427547455,
0.5263159871101379,
0.31094738841056824,
0.011852292343974113,
-0.26751068234443665,
0.03169897943735123,
0.15330085158348083,
0.26588866114616394,
-0.3270072638988495,
-0.8171918392181396,
0.4371911883354187,
-0.2157791703939438,
-0.10952852666378021,
0.1383836567401886,
0.25086119771003723,
0.4046896994113922,
-0.16637256741523743,
0.034750815480947495,
0.2282751053571701,
0.06089688092470169,
0.5903042554855347,
-0.46919897198677063,
-0.303894579410553,
0.041328396648168564,
-0.019575076177716255,
-0.11736895143985748,
-0.14512735605239868,
0.07484934478998184,
0.17786423861980438,
0.45354875922203064,
-0.058543574064970016,
0.23036760091781616,
0.17745918035507202,
-0.11101476848125458,
-0.05634884536266327,
0.12324142456054688,
-0.2524731755256653,
-0.40277528762817383,
0.13394123315811157,
0.08324342221021652,
-0.1526622474193573,
-0.08042842149734497,
-0.1751123070716858,
0.06508531421422958,
0.006381021812558174,
0.1269773691892624,
-0.36959460377693176,
0.04724489897489548,
-0.07811297476291656,
0.022302977740764618,
-0.26063820719718933,
0.09928552806377411,
0.2954150438308716,
0.16080926358699799,
-0.0029199114069342613,
-0.2119591385126114,
0.006899913772940636,
-0.025623200461268425,
-0.1433456987142563,
-0.17328143119812012,
0.10907629132270813,
0.1120462715625763,
0.033394794911146164,
-0.13820016384124756,
0.28375744819641113,
0.2842199206352234,
-0.0985986739397049,
-0.15633028745651245,
0.02728000283241272,
0.40248167514801025,
-0.23327749967575073,
0.3270910382270813,
0.14259889721870422,
0.24204175174236298,
-0.17311722040176392,
-0.1279880702495575,
-0.056908413767814636,
0.182820126414299,
0.26516836881637573,
-0.29584580659866333,
0.1233256533741951,
0.22987616062164307,
0.012120205909013748,
0.2454756200313568,
-0.36111754179000854,
0.04714328050613403,
0.2871871292591095,
0.09825772047042847,
0.1909162849187851,
0.046537645161151886,
0.21145522594451904,
0.37001413106918335,
0.005739931017160416,
-0.08265990763902664,
0.22616848349571228,
-0.4248207211494446,
-0.21125182509422302,
0.1328231394290924,
-0.1818523406982422,
0.421322226524353,
0.16415797173976898,
0.024387184530496597,
-0.024114446714520454,
0.012031430378556252,
-0.05451377481222153,
0.16925236582756042,
0.08673764765262604,
-0.05133877694606781,
-0.3676348030567169,
0.233272522687912,
-0.14038248360157013,
-0.06539049744606018,
-0.10400441288948059,
0.08892226964235306,
0.39243578910827637,
-0.29676589369773865,
0.011016277596354485,
-0.19355131685733795,
0.40058597922325134,
0.0906686931848526,
0.10550344735383987,
0.1667192429304123,
-0.1814550906419754,
-0.056736819446086884,
0.0982363224029541,
0.02940130978822708,
0.051611289381980896,
0.06562940776348114,
0.11329450458288193,
0.05566184222698212,
0.05106364190578461,
-0.1494140625,
-0.2518104910850525,
-0.2523033916950226,
-0.041108936071395874,
0.26733627915382385,
0.027815064415335655,
0.35115766525268555,
0.050459012389183044,
-0.15529903769493103,
-0.03170188516378403,
-0.0926317647099495,
-0.021825775504112244,
0.13747555017471313,
-0.03472462296485901,
-0.22577163577079773,
-0.0832703560590744,
-0.07287777960300446,
0.1783149391412735,
-0.07005404680967331,
-0.2762162387371063,
-0.12684661149978638,
0.3321940302848816,
0.061236556619405746,
-0.11370206624269485,
-0.29353150725364685,
-0.21586287021636963,
-0.1409100443124771,
-0.11935289204120636,
0.17087899148464203,
0.11513623595237732,
0.41967642307281494,
-0.2845652401447296,
0.3068888783454895,
0.0737345963716507,
0.11420197039842606,
-0.020549876615405083,
-0.35699963569641113,
-0.058535899966955185,
0.05716412141919136,
-0.0496477372944355,
-0.1584659218788147,
0.029077503830194473,
0.14495842158794403,
-0.12203821539878845,
0.1793140023946762,
-0.4542497396469116,
0.11807497590780258,
-0.46905317902565,
0.11372879147529602,
0.014140155166387558,
0.0628657117486,
0.584587812423706,
0.35043561458587646,
-0.0964847058057785,
0.05291593074798584,
-0.23062700033187866,
0.034268468618392944,
-0.08148395270109177,
-0.000593230128288269,
0.24266955256462097,
0.45324742794036865,
0.25451868772506714,
0.13416635990142822,
0.6049473881721497,
-0.15978243947029114,
0.058825261890888214,
0.09597074240446091,
-0.10343028604984283,
-0.014636985957622528,
-0.22274170815944672,
0.09802981466054916,
-0.1607871949672699,
-0.13192418217658997,
0.42678624391555786,
0.1794443428516388,
-0.5726995468139648,
0.030525557696819305,
0.07144218683242798,
-0.03046458028256893,
-0.265598326921463,
0.3138507902622223,
-0.2360406219959259,
0.13965706527233124,
0.05296536907553673,
0.038079507648944855,
-0.42116719484329224,
-0.4224819242954254,
-0.18976126611232758,
-0.21026252210140228,
-0.11486204713582993,
-0.20455142855644226,
-0.2550400197505951,
0.006943929009139538,
-0.9173234701156616,
0.4260064363479614,
0.03544243797659874,
0.28735625743865967,
0.020930860191583633,
-0.08704909682273865,
0.23745959997177124,
-0.0823640525341034,
0.5041690468788147,
-0.04623241722583771,
0.05204758793115616,
-0.03699813783168793,
0.05299467593431473,
-0.3321003019809723,
0.12693504989147186,
-0.36920931935310364,
0.2951183021068573,
0.13723081350326538,
0.4450315535068512,
-0.06863268464803696,
-0.23590685427188873,
0.31056883931159973,
-0.028055300936102867,
-0.17989863455295563,
-0.1254398673772812,
-0.21675603091716766,
-0.42009177803993225,
-0.31749293208122253,
0.12151609361171722,
0.20251278579235077,
-0.025698723271489143,
0.06262039393186569,
-0.2181413471698761,
-0.05254632979631424,
-0.18701162934303284,
0.31385451555252075,
-0.06664812564849854,
0.21870598196983337,
0.12153942883014679,
0.1070261001586914,
0.18218086659908295,
0.1268313229084015,
0.21725882589817047,
0.29164573550224304,
-0.06859016418457031,
0.08776017278432846,
0.18128612637519836,
-0.019848458468914032,
0.29865580797195435,
0.3787651062011719,
-0.09779013693332672,
-0.16535648703575134,
-0.45981839299201965,
0.44372016191482544,
-0.5339166522026062,
-0.005692708306014538,
0.3493112027645111,
0.1893453747034073,
-0.37740567326545715,
-0.46804454922676086,
0.31228089332580566,
0.4378611743450165,
-0.22643382847309113,
0.32443276047706604,
-0.3689556121826172,
-0.34005165100097656,
0.4310779571533203,
0.24595659971237183,
1.0425153970718384,
-0.41809260845184326,
0.14743036031723022,
-0.12199563533067703,
-0.1226692870259285,
0.23340778052806854,
-0.22352543473243713,
0.20288126170635223,
-0.12049299478530884,
-0.15215080976486206,
0.09988579154014587,
-0.07883510738611221,
0.24695053696632385,
0.30275022983551025,
-0.34358346462249756,
0.16288083791732788,
0.0121384859085083,
0.15441744029521942,
-0.027907108888030052,
0.06700824946165085,
0.24194929003715515,
-0.39518269896507263,
-0.07798919081687927,
0.1558913141489029,
0.09744977951049805,
-0.2486920952796936,
0.06999263167381287,
0.18408243358135223,
0.04882858321070671,
-0.38422608375549316,
-0.2763754725456238,
-0.05579041317105293,
-0.23910842835903168,
0.42492687702178955,
-0.38552117347717285,
-0.03575976938009262,
0.13847318291664124,
0.29176095128059387,
0.020908448845148087,
0.31875330209732056,
0.05446886271238327,
-0.2226586490869522,
0.30641141533851624,
0.31597110629081726,
0.2370694875717163,
-0.007357129827141762,
0.024090899154543877,
0.12451659888029099,
-0.3129645586013794,
0.15908558666706085,
0.03190042823553085,
-0.15476834774017334,
-0.2773497700691223,
0.2015645056962967,
0.14977970719337463,
-0.037750016897916794,
0.06260685622692108,
0.1266821026802063,
-0.27795571088790894,
-0.200911283493042,
0.1245695948600769,
0.06922617554664612,
-0.1845235377550125,
0.6873884797096252,
-0.15152424573898315,
-0.5412968397140503,
-0.041894663125276566,
0.39996853470802307,
0.39289960265159607,
-0.0489327535033226,
0.2371809333562851,
-0.045316796749830246,
-0.24203018844127655,
-0.26331859827041626,
0.06263554841279984,
-0.18919534981250763,
-0.21208611130714417,
0.1704222410917282,
-0.19795319437980652,
-0.16441452503204346,
-0.14948590099811554,
-0.18470421433448792,
-0.11021313071250916,
0.04723769426345825,
0.031765762716531754,
-0.16283833980560303,
-0.5576214790344238,
-0.09594203531742096,
-0.01747730001807213,
0.309683233499527,
0.02786179631948471,
0.14916642010211945,
-0.3958245515823364,
0.27387893199920654,
-0.2793937623500824,
0.17496037483215332,
0.04302047938108444,
0.29516351222991943,
0.16852830350399017,
0.12384252995252609,
0.04817364364862442,
-0.11760573089122772,
0.10808749496936798,
0.4275869131088257,
-0.09026878327131271,
-0.23111200332641602,
0.1356232613325119,
0.1214948296546936,
-0.2221672534942627,
-0.41179466247558594,
-0.10031727701425552,
-0.11029636859893799,
-0.1172306090593338,
-0.3700530230998993,
0.31816455721855164,
0.2941950261592865,
-0.00463993102312088,
0.041501715779304504,
0.34466710686683655,
0.02285033091902733,
0.3782466650009155,
0.4740273952484131,
-0.3175373673439026,
0.43982481956481934,
-0.12403962016105652,
0.502913236618042,
-0.0006956523284316063,
-0.11946532875299454,
-0.06648234277963638,
0.11353866755962372,
0.18932506442070007,
0.20191365480422974,
0.014261525124311447,
-0.21800722181797028,
-0.079220712184906,
0.38819050788879395,
0.00228261761367321,
0.18824461102485657,
-0.20107367634773254,
-0.10418057441711426,
0.21348929405212402,
0.18746744096279144,
-0.05338384211063385,
-0.15125073492527008,
0.3261015713214874,
0.11529495567083359,
0.04013383761048317,
0.31446710228919983,
0.16121670603752136,
-0.1535589098930359,
-0.22427724301815033,
0.06292245537042618,
0.19838514924049377,
-0.2453487664461136,
0.034003790467977524,
0.4191628396511078,
0.12877048552036285,
-0.05892576649785042,
0.14651547372341156,
0.008378731086850166,
0.32841405272483826,
0.7951183915138245,
0.01464536041021347,
0.46742409467697144,
0.2519783079624176,
0.37759339809417725,
-0.2475760281085968,
-0.24531719088554382,
-0.003699883818626404,
0.5977997779846191,
-0.5198108553886414,
0.34016287326812744,
0.13752208650112152,
0.14348973333835602,
-0.18459713459014893,
-0.01763271912932396,
-0.26206162571907043,
0.22128114104270935,
-0.248832106590271,
-0.33594733476638794,
0.23471739888191223,
-0.06797055900096893,
-0.22304277122020721,
0.18143495917320251,
-0.16338177025318146,
-0.18577705323696136,
0.7715326547622681,
0.12569767236709595,
-0.21118079125881195,
-0.029929345473647118,
-0.10570434480905533,
0.1067805141210556,
0.23850193619728088,
-0.4037964940071106,
0.052757628262043,
-0.12709955871105194,
0.12568777799606323,
-0.016310162842273712,
-0.08958560973405838,
0.3479727804660797,
0.43119359016418457,
-0.30919545888900757,
0.006690939888358116,
0.08314494788646698,
-0.018426015973091125,
-0.2655335068702698,
0.23270677030086517,
-0.16335049271583557,
0.2119307518005371,
-0.013277426362037659,
0.019417574629187584,
-0.12926453351974487,
-0.3239418566226959,
0.3484843373298645,
0.28207045793533325,
0.02618977800011635,
0.24552449584007263,
0.014051450416445732,
-0.21897050738334656,
0.09100191295146942,
-0.12642470002174377,
-0.2209576964378357,
-0.4252357482910156,
0.44630929827690125,
-0.47788065671920776,
0.42920276522636414,
-0.13387778401374817,
0.0863555297255516,
-0.02995089814066887,
0.3474976420402527,
-0.2645898163318634,
-0.31522512435913086,
-0.33243048191070557,
-0.2019023597240448,
-0.25127652287483215,
-0.007248334586620331,
-0.22290396690368652,
0.03007735125720501,
-0.11033151298761368,
0.17832621932029724,
-0.22341975569725037,
0.2558407783508301,
0.04235399514436722,
0.0398416705429554,
0.06814128905534744,
0.36798274517059326,
-0.21685190498828888,
0.1783958226442337,
-0.09458188712596893,
0.08184172213077545,
0.2187575101852417,
-0.6929852366447449,
0.32719773054122925,
-0.0742616206407547,
0.017531566321849823,
-0.45434463024139404,
0.18993514776229858,
-0.026617540046572685,
0.2580186724662781,
0.5818482637405396,
0.32296761870384216,
0.14318779110908508,
-0.08018159121274948,
-0.2579415738582611,
-0.22805458307266235,
0.19436761736869812,
-0.13475511968135834,
-0.14062339067459106,
-0.01317773386836052,
-0.08562567830085754,
-0.39040839672088623,
-0.07677637040615082,
-0.07374221086502075,
-0.11784457415342331,
-0.01698407344520092,
0.049050841480493546,
-0.3196548819541931,
-0.011692430824041367,
0.06863173097372055,
0.2735212445259094,
-0.1925986260175705,
0.2733895778656006,
0.04182238504290581,
0.010728444904088974,
-0.09047727286815643,
-0.4277673363685608,
0.27363693714141846,
-0.15826000273227692,
-0.3398910462856293,
-0.17139261960983276,
0.3896189033985138,
-0.19167843461036682,
-0.17811036109924316,
-0.24266350269317627,
-0.019511379301548004,
0.16016294062137604,
-0.04381761699914932,
-0.4638446271419525,
0.21885176002979279,
-0.11550289392471313,
-0.19956235587596893,
-0.06196903437376022,
0.2797384560108185,
0.023091964423656464,
0.011780081316828728,
0.2181985080242157,
-0.4928126335144043
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi ! Sorry to hear that. This may come from another issue then.
First can we check if this latency comes from the dataset itself ?
You can try to load your dataset and benchmark the speed of querying random examples inside it ?
```python
import time
import numpy as np
from datasets import load_from_disk
dataset = load_from_disk(...) # or from load_dataset...
_start = time.time()
n = 100
for i in np.random.default_rng(42).integers(0, len(dataset), size=n):
_ = dataset[i]
print(time.time() - _start)
```
If we see a significant speed difference between your two datasets then it would mean that there's an issue somewhere | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 101 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi ! Sorry to hear that. This may come from another issue then.
First can we check if this latency comes from the dataset itself ?
You can try to load your dataset and benchmark the speed of querying random examples inside it ?
```python
import time
import numpy as np
from datasets import load_from_disk
dataset = load_from_disk(...) # or from load_dataset...
_start = time.time()
n = 100
for i in np.random.default_rng(42).integers(0, len(dataset), size=n):
_ = dataset[i]
print(time.time() - _start)
```
If we see a significant speed difference between your two datasets then it would mean that there's an issue somewhere | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi @lhoestq, here is the result. I additionally measured time to `load_from_disk`:
* 60GB
```
loading took: 22.618776321411133
ramdom indexing 100 times took: 0.10214924812316895
```
* 600GB
```
loading took: 1176.1764674186707
ramdom indexing 100 times took: 2.853600025177002
```
Hmm.. I double checked that it's version 1.6.0. The difference seems quite big, could it be related to the running environment?
| Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 59 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi @lhoestq, here is the result. I additionally measured time to `load_from_disk`:
* 60GB
```
loading took: 22.618776321411133
ramdom indexing 100 times took: 0.10214924812316895
```
* 600GB
```
loading took: 1176.1764674186707
ramdom indexing 100 times took: 2.853600025177002
```
Hmm.. I double checked that it's version 1.6.0. The difference seems quite big, could it be related to the running environment?
| [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | I'm surprised by the speed change. Can you give more details about your dataset ?
The speed depends on the number of batches in the arrow tables and the distribution of the lengths of the batches.
You can access the batches by doing `dataset.data.to_batches()` (use only for debugging) (it doesn't bring data in memory).
Also can you explain what parameters you used if you used `map` calls ?
Also if you have some code that reproduces the issue I'd be happy to investigate it. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 84 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
I'm surprised by the speed change. Can you give more details about your dataset ?
The speed depends on the number of batches in the arrow tables and the distribution of the lengths of the batches.
You can access the batches by doing `dataset.data.to_batches()` (use only for debugging) (it doesn't bring data in memory).
Also can you explain what parameters you used if you used `map` calls ?
Also if you have some code that reproduces the issue I'd be happy to investigate it. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Also if you could give us more info about your env like your OS, version of pyarrow and if you're using an HDD or a SSD | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 26 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Also if you could give us more info about your env like your OS, version of pyarrow and if you're using an HDD or a SSD | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Here are some details of my 600GB dataset. This is a dataset AFTER the `map` function and once I load this dataset, I do not use `map` anymore in the training. Regarding the distribution of the lengths, it is almost uniform (90% is 512 tokens, and 10% is randomly shorter than that -- typical setting for language modeling).
```
len(batches):
492763
batches[0]:
pyarrow.RecordBatch
attention_mask: list<item: uint8>
child 0, item: uint8
input_ids: list<item: int16>
child 0, item: int16
special_tokens_mask: list<item: uint8>
child 0, item: uint8
token_type_ids: list<item: uint8>
child 0, item: uint8
```
Here the some parameters to `map` function just in case it is relevant:
```
num_proc=1 # as multi processing is slower in my case
load_from_cache_file=False
```
| Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 118 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Here are some details of my 600GB dataset. This is a dataset AFTER the `map` function and once I load this dataset, I do not use `map` anymore in the training. Regarding the distribution of the lengths, it is almost uniform (90% is 512 tokens, and 10% is randomly shorter than that -- typical setting for language modeling).
```
len(batches):
492763
batches[0]:
pyarrow.RecordBatch
attention_mask: list<item: uint8>
child 0, item: uint8
input_ids: list<item: int16>
child 0, item: int16
special_tokens_mask: list<item: uint8>
child 0, item: uint8
token_type_ids: list<item: uint8>
child 0, item: uint8
```
Here the some parameters to `map` function just in case it is relevant:
```
num_proc=1 # as multi processing is slower in my case
load_from_cache_file=False
```
| [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Regarding the environment, I am running the code on a cloud server. Here are some info:
```
Ubuntu 18.04.5 LTS # cat /etc/issue
pyarrow 3.0.0 # pip list | grep pyarrow
```
The data is stored in SSD and it is mounted to the machine via Network File System.
If you could point me to some of the commands to check the details of the environment, I would be happy to provide relevant information @lhoestq ! | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 76 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Regarding the environment, I am running the code on a cloud server. Here are some info:
```
Ubuntu 18.04.5 LTS # cat /etc/issue
pyarrow 3.0.0 # pip list | grep pyarrow
```
The data is stored in SSD and it is mounted to the machine via Network File System.
If you could point me to some of the commands to check the details of the environment, I would be happy to provide relevant information @lhoestq ! | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | I am not sure how I could provide you with the reproducible code, since the problem only arises when the data is big. For the moment, I would share the part that I think is relevant. Feel free to ask me for more info.
```python
class MyModel(pytorch_lightning.LightningModule)
def setup(self, stage):
self.dataset = datasets.load_from_disk(path)
self.dataset.set_format("torch")
def train_dataloader(self):
collate_fn = transformers.DataCollatorForLanguageModeling(
tokenizer=transformers.ElectraTokenizerFast.from_pretrained(tok_path)
)
dataloader = torch.utils.DataLoader(
self.dataset,
batch_size=32,
collate_fn=collate_fn,
num_workers=8,
pin_memory=True,
)
``` | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 71 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
I am not sure how I could provide you with the reproducible code, since the problem only arises when the data is big. For the moment, I would share the part that I think is relevant. Feel free to ask me for more info.
```python
class MyModel(pytorch_lightning.LightningModule)
def setup(self, stage):
self.dataset = datasets.load_from_disk(path)
self.dataset.set_format("torch")
def train_dataloader(self):
collate_fn = transformers.DataCollatorForLanguageModeling(
tokenizer=transformers.ElectraTokenizerFast.from_pretrained(tok_path)
)
dataloader = torch.utils.DataLoader(
self.dataset,
batch_size=32,
collate_fn=collate_fn,
num_workers=8,
pin_memory=True,
)
``` | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi ! Sorry for the delay I haven't had a chance to take a look at this yet. Are you still experiencing this issue ?
I'm asking because the latest patch release 1.6.2 fixed a few memory issues that could have lead to slow downs | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 45 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi ! Sorry for the delay I haven't had a chance to take a look at this yet. Are you still experiencing this issue ?
I'm asking because the latest patch release 1.6.2 fixed a few memory issues that could have lead to slow downs | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi! I just ran the same code with different datasets (one is 60 GB and another 600 GB), and the latter runs much slower. ETA differs by 10x. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 28 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi! I just ran the same code with different datasets (one is 60 GB and another 600 GB), and the latter runs much slower. ETA differs by 10x. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq and @hwijeen
Despite upgrading to datasets 1.6.2, still experiencing extremely slow (2h00) loading for a 300Gb local dataset shard size 1.1Gb on local HDD (40Mb/s read speed). This corresponds almost exactly to total data divided by reading speed implying that it reads the entire dataset at each load.
Stack details:
=========
> GCC version: Could not collect
> Clang version: Could not collect
> CMake version: Could not collect
>
> Python version: 3.7 (64-bit runtime)
> Is CUDA available: True
> CUDA runtime version: 10.2.89
> GPU models and configuration: GPU 0: GeForce GTX 1050
> Nvidia driver version: 457.63
> cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll
> HIP runtime version: N/A
> MIOpen runtime version: N/A
>
> Versions of relevant libraries:
> [pip3] datasets==1.6.2
> [pip3] transformers==4.5.1
> [pip3] numpy==1.19.1
> [pip3] numpydoc==1.1.0
> [pip3] pytorch-metric-learning==0.9.98
> [pip3] torch==1.8.1
> [pip3] torchaudio==0.8.1
> [pip3] torchvision==0.2.2
> [conda] blas 2.16 mkl conda-forge
> [conda] cudatoolkit 10.2.89 hb195166_8 conda-forge
> [conda] libblas 3.8.0 16_mkl conda-forge
> [conda] libcblas 3.8.0 16_mkl conda-forge
> [conda] liblapack 3.8.0 16_mkl conda-forge
> [conda] liblapacke 3.8.0 16_mkl conda-forge
> [conda] mkl 2020.1 216
> [conda] numpy 1.19.1 py37hae9e721_0 conda-forge
> [conda] numpydoc 1.1.0 py_1 conda-forge
> [conda] pytorch 1.8.1 py3.7_cuda10.2_cudnn7_0 pytorch
> [conda] pytorch-metric-learning 0.9.98 pyh39e3cac_0 metric-learning
> [conda] torchaudio 0.8.1 py37 pytorch
> [conda] torchvision 0.2.2 py_3 pytorch | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 227 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq and @hwijeen
Despite upgrading to datasets 1.6.2, still experiencing extremely slow (2h00) loading for a 300Gb local dataset shard size 1.1Gb on local HDD (40Mb/s read speed). This corresponds almost exactly to total data divided by reading speed implying that it reads the entire dataset at each load.
Stack details:
=========
> GCC version: Could not collect
> Clang version: Could not collect
> CMake version: Could not collect
>
> Python version: 3.7 (64-bit runtime)
> Is CUDA available: True
> CUDA runtime version: 10.2.89
> GPU models and configuration: GPU 0: GeForce GTX 1050
> Nvidia driver version: 457.63
> cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll
> HIP runtime version: N/A
> MIOpen runtime version: N/A
>
> Versions of relevant libraries:
> [pip3] datasets==1.6.2
> [pip3] transformers==4.5.1
> [pip3] numpy==1.19.1
> [pip3] numpydoc==1.1.0
> [pip3] pytorch-metric-learning==0.9.98
> [pip3] torch==1.8.1
> [pip3] torchaudio==0.8.1
> [pip3] torchvision==0.2.2
> [conda] blas 2.16 mkl conda-forge
> [conda] cudatoolkit 10.2.89 hb195166_8 conda-forge
> [conda] libblas 3.8.0 16_mkl conda-forge
> [conda] libcblas 3.8.0 16_mkl conda-forge
> [conda] liblapack 3.8.0 16_mkl conda-forge
> [conda] liblapacke 3.8.0 16_mkl conda-forge
> [conda] mkl 2020.1 216
> [conda] numpy 1.19.1 py37hae9e721_0 conda-forge
> [conda] numpydoc 1.1.0 py_1 conda-forge
> [conda] pytorch 1.8.1 py3.7_cuda10.2_cudnn7_0 pytorch
> [conda] pytorch-metric-learning 0.9.98 pyh39e3cac_0 metric-learning
> [conda] torchaudio 0.8.1 py37 pytorch
> [conda] torchvision 0.2.2 py_3 pytorch | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi @lhoestq thanks for the quick turn-around, actually the plain vanilla way, without an particular knack or fashion, I tried to look into the documentation for some alternative but couldn't find any
> dataset = load_from_disk(dataset_path=os.path.join(datasets_dir,dataset_dir)) | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 36 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi @lhoestq thanks for the quick turn-around, actually the plain vanilla way, without an particular knack or fashion, I tried to look into the documentation for some alternative but couldn't find any
> dataset = load_from_disk(dataset_path=os.path.join(datasets_dir,dataset_dir)) | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Iβm facing the same issue when loading a 900GB dataset (stored via `save_to_disk`): `load_from_disk(path_to_dir)` takes 1.5 hours and htop consistently shows high IO rates > 120 M/s. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 27 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Iβm facing the same issue when loading a 900GB dataset (stored via `save_to_disk`): `load_from_disk(path_to_dir)` takes 1.5 hours and htop consistently shows high IO rates > 120 M/s. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @tsproisl same here, smells like ~~teen spirit~~ intended generator inadvertently ending up iterator
@lhoestq perhaps solution to detect bug location in code is to track its signature via HD read usage monitoring, option is to add tracking decorator on top each function and sequentially close all hatches from top to bottom, suggest PySmart https://pypi.org/project/pySMART/ a Smartmontools implementation | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 57 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@tsproisl same here, smells like ~~teen spirit~~ intended generator inadvertently ending up iterator
@lhoestq perhaps solution to detect bug location in code is to track its signature via HD read usage monitoring, option is to add tracking decorator on top each function and sequentially close all hatches from top to bottom, suggest PySmart https://pypi.org/project/pySMART/ a Smartmontools implementation | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | I wasn't able to reproduce this on a toy dataset of around 300GB:
```python
import datasets as ds
s = ds.load_dataset("squad", split="train")
s4000 = ds.concatenate_datasets([s] * 4000)
print(ds.utils.size_str(s4000.data.nbytes)) # '295.48 GiB'
s4000.save_to_disk("tmp/squad_4000")
```
```python
import psutil
import time
from datasets import load_from_disk
disk = "disk0" # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("tmp/squad_4000")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
```
Could you run this on your side and tell me if how much time it takes ? Please run this when your machine is idle so that other processes don't interfere.
I got these results on my macbook pro on datasets 1.6.2 | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 130 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
I wasn't able to reproduce this on a toy dataset of around 300GB:
```python
import datasets as ds
s = ds.load_dataset("squad", split="train")
s4000 = ds.concatenate_datasets([s] * 4000)
print(ds.utils.size_str(s4000.data.nbytes)) # '295.48 GiB'
s4000.save_to_disk("tmp/squad_4000")
```
```python
import psutil
import time
from datasets import load_from_disk
disk = "disk0" # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("tmp/squad_4000")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
```
Could you run this on your side and tell me if how much time it takes ? Please run this when your machine is idle so that other processes don't interfere.
I got these results on my macbook pro on datasets 1.6.2 | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Just tried on google colab and got ~1min for a 15GB dataset (only 200 times SQuAD), while it should be instantaneous. The time is spent reading the Apache Arrow table from the memory mapped file. This might come a virtual disk management issue. I'm trying to see if I can still speed it up on colab. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 56 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Just tried on google colab and got ~1min for a 15GB dataset (only 200 times SQuAD), while it should be instantaneous. The time is spent reading the Apache Arrow table from the memory mapped file. This might come a virtual disk management issue. I'm trying to see if I can still speed it up on colab. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq what is Google Colab's HD read speed, is it possible to introspect incl. make like SSD or HDD ? | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 20 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq what is Google Colab's HD read speed, is it possible to introspect incl. make like SSD or HDD ? | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq Thank you! The issue is getting more interesting. The second script is still running, but it's definitely taking much longer than 15 seconds. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 24 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq Thank you! The issue is getting more interesting. The second script is still running, but it's definitely taking much longer than 15 seconds. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Okay, hereβs the ouput:
Blocks read 158396
Elapsed time: 529.10s
Also using datasets 1.6.2. Do you have any ideas, how to pinpoint the problem? | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 24 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Okay, hereβs the ouput:
Blocks read 158396
Elapsed time: 529.10s
Also using datasets 1.6.2. Do you have any ideas, how to pinpoint the problem? | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq, @tsproisl mmmh still writing on my side about 1h to go, thinking on it are your large datasets all monoblock unsharded ? mine is 335 times 1.18Gb shards. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 29 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq, @tsproisl mmmh still writing on my side about 1h to go, thinking on it are your large datasets all monoblock unsharded ? mine is 335 times 1.18Gb shards. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | The 529.10s was a bit too optimistic. I cancelled the reading process once before running it completely, therefore the harddrive cache probably did its work.
Here are three consecutive runs
First run (freshly written to disk):
Blocks read 309702
Elapsed time: 1267.74s
Second run (immediately after):
Blocks read 113944
Elapsed time: 417.55s
Third run (immediately after):
Blocks read 42518
Elapsed time: 199.19s
| Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 62 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
The 529.10s was a bit too optimistic. I cancelled the reading process once before running it completely, therefore the harddrive cache probably did its work.
Here are three consecutive runs
First run (freshly written to disk):
Blocks read 309702
Elapsed time: 1267.74s
Second run (immediately after):
Blocks read 113944
Elapsed time: 417.55s
Third run (immediately after):
Blocks read 42518
Elapsed time: 199.19s
| [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | @lhoestq
First test
> elapsed time: 11219.05s
Second test running bear with me, for Windows users slight trick to modify original "disk0" string:
First find physical unit relevant key in dictionnary
```
import psutil
psutil.disk_io_counters(perdisk=True)
```
> {'PhysicalDrive0': sdiskio(read_count=18453286, write_count=4075333, read_bytes=479546467840, write_bytes=161590275072, read_time=20659, write_time=2464),
> 'PhysicalDrive1': sdiskio(read_count=1495778, write_count=388781, read_bytes=548628622336, write_bytes=318234849280, read_time=426066, write_time=19085)}
In my case it's _PhysicalDrive1_
Then insert relevant key's string as _disk_ variable
```
psutil.disk_io_counters()
disk = 'PhysicalDrive1' # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("your path here")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
``` | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 115 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
@lhoestq
First test
> elapsed time: 11219.05s
Second test running bear with me, for Windows users slight trick to modify original "disk0" string:
First find physical unit relevant key in dictionnary
```
import psutil
psutil.disk_io_counters(perdisk=True)
```
> {'PhysicalDrive0': sdiskio(read_count=18453286, write_count=4075333, read_bytes=479546467840, write_bytes=161590275072, read_time=20659, write_time=2464),
> 'PhysicalDrive1': sdiskio(read_count=1495778, write_count=388781, read_bytes=548628622336, write_bytes=318234849280, read_time=426066, write_time=19085)}
In my case it's _PhysicalDrive1_
Then insert relevant key's string as _disk_ variable
```
psutil.disk_io_counters()
disk = 'PhysicalDrive1' # You may have to change your disk here
iocnt1 = psutil.disk_io_counters(perdisk=True)[disk]
time1 = time.time()
s4000_reloaded = load_from_disk("your path here")
time2 = time.time()
iocnt2 = psutil.disk_io_counters(perdisk=True)[disk]
print(f"Blocks read {iocnt2.read_count - iocnt1.read_count}") # Blocks read 18
print(f"Elapsed time: {time2 - time1:.02f}s") # Elapsed time: 14.60s
``` | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Unfortunately no. Thanks for running the benchmark though, it shows that you machine does a lot of read operations. This is not expected: in other machines it does almost no read operations which enables a very fast loading.
I did some tests on google colab and have the same issue. The first time the dataset arrow file is memory mapped takes always a lot of time (time seems linear with respect to the dataset size). Reloading the dataset is then instantaneous since the arrow file has already been memory mapped.
I also tried using the Arrow IPC file format (see #1933) instead of the current streaming format that we use but it didn't help.
Memory mapping is handled by the OS and depends on the disk you're using, so I'm not sure we can do much about it. I'll continue to investigate anyway, because I still don't know why in some cases it would go through the entire file (high `Blocks read ` as in your tests) and in other cases it would do almost no reading. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 177 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Unfortunately no. Thanks for running the benchmark though, it shows that you machine does a lot of read operations. This is not expected: in other machines it does almost no read operations which enables a very fast loading.
I did some tests on google colab and have the same issue. The first time the dataset arrow file is memory mapped takes always a lot of time (time seems linear with respect to the dataset size). Reloading the dataset is then instantaneous since the arrow file has already been memory mapped.
I also tried using the Arrow IPC file format (see #1933) instead of the current streaming format that we use but it didn't help.
Memory mapping is handled by the OS and depends on the disk you're using, so I'm not sure we can do much about it. I'll continue to investigate anyway, because I still don't know why in some cases it would go through the entire file (high `Blocks read ` as in your tests) and in other cases it would do almost no reading. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Just want to say that I am seeing the same issue. Dataset size if 268GB and it takes **3 hours** to load `load_from_disk`, using dataset version `1.9.0`. Filesystem underneath is `Lustre` | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 31 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Just want to say that I am seeing the same issue. Dataset size if 268GB and it takes **3 hours** to load `load_from_disk`, using dataset version `1.9.0`. Filesystem underneath is `Lustre` | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hi @lhoestq, confirmed Windows issue, exact same code running on Linux OS total loading time about 3 minutes. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 18 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hi @lhoestq, confirmed Windows issue, exact same code running on Linux OS total loading time about 3 minutes. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2252 | Slow dataloading with big datasets issue persists | Hmm that's different from what I got. I was on Ubuntu when reporting the initial issue. | Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate. | 16 | Slow dataloading with big datasets issue persists
Hi,
I reported too slow data fetching when data is large(#2210) a couple of weeks ago, and @lhoestq referred me to the fix (#2122).
However, the problem seems to persist. Here is the profiled results:
1) Running with 60GB
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 517.96 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
model_backward | 0.26144 |100 | 26.144 | 5.0475 |
model_forward | 0.11123 |100 | 11.123 | 2.1474 |
get_train_batch | 0.097121 |100 | 9.7121 | 1.8751 |
```
3) Running with 600GB, datasets==1.6.0
```
Action | Mean duration (s) |Num calls | Total time (s) | Percentage % |
------------------------------------------------------------------------------------------------------------------------------------
Total | - |_ | 4563.2 | 100 % |
------------------------------------------------------------------------------------------------------------------------------------
get_train_batch | 5.1279 |100 | 512.79 | 11.237 |
model_backward | 4.8394 |100 | 483.94 | 10.605 |
model_forward | 0.12162 |100 | 12.162 | 0.26652 |
```
I see that `get_train_batch` lags when data is large. Could this be related to different issues?
I would be happy to provide necessary information to investigate.
Hmm that's different from what I got. I was on Ubuntu when reporting the initial issue. | [
-0.40405941009521484,
0.21396172046661377,
-0.13430973887443542,
0.16329392790794373,
0.2269006371498108,
-0.18088936805725098,
0.21954916417598724,
0.40079012513160706,
0.11868318915367126,
-0.009201094508171082,
-0.3094535768032074,
0.0660657212138176,
0.17966300249099731,
0.14807620644569397,
-0.11640419065952301,
0.14003203809261322,
0.010011710226535797,
0.046201422810554504,
-0.10182830691337585,
-0.05991441011428833,
0.07170861214399338,
-0.12568901479244232,
0.016240954399108887,
-0.21491290628910065,
-0.32182878255844116,
-0.03517276048660278,
0.2733657956123352,
0.0361010804772377,
-0.26809385418891907,
-0.18314330279827118,
0.20460009574890137,
0.24195051193237305,
0.0882454589009285,
0.396261066198349,
-0.00010503141675144434,
-0.09510466456413269,
0.30493783950805664,
0.07264634221792221,
-0.24732057750225067,
0.13023211061954498,
0.05425293743610382,
-0.33669933676719666,
-0.12072641402482986,
0.10836286097764969,
-0.035014908760786057,
0.12105869501829147,
-0.22773493826389313,
-0.006785266101360321,
0.3558996021747589,
0.15542078018188477,
0.25863924622535706,
0.005416912958025932,
-0.22169174253940582,
-0.3251926898956299,
0.1556021273136139,
0.22885659337043762,
-0.20612983405590057,
0.3163354992866516,
0.4986959993839264,
-0.19098670780658722,
-0.534777045249939,
0.042074959725141525,
-0.037593431770801544,
0.1030174195766449,
-0.25239765644073486,
-0.06484729051589966,
0.18143236637115479,
-0.018434036523103714,
0.228866308927536,
0.23059901595115662,
0.5177356600761414,
0.28508976101875305,
-0.3112407624721527,
-0.28345030546188354,
-0.3231847882270813,
-0.3884499669075012,
0.20927539467811584,
-0.08743248879909515,
-0.08770349621772766,
0.03551241755485535,
-0.2518312633037567,
-0.20284220576286316,
0.04189545661211014,
-0.06946803629398346,
-0.37810879945755005,
-0.12019449472427368,
-0.07300704717636108,
-0.08559993654489517,
0.12837597727775574,
-0.2761493921279907,
0.2117173671722412,
-0.08865342289209366,
0.16360795497894287,
0.10161300003528595,
-0.5672922730445862,
-0.053796522319316864,
0.35137179493904114,
0.055226169526576996,
0.15296286344528198,
0.20542101562023163,
0.1399337649345398,
0.27637314796447754,
0.0849817767739296,
-0.21678176522254944,
0.37565383315086365,
0.21720336377620697,
-0.20706689357757568,
-0.07341720163822174,
0.4972681999206543,
0.17151710391044617,
-0.22571612894535065,
0.08798528462648392,
-0.14563153684139252,
-0.08049751818180084,
0.06928746402263641,
-0.28200390934944153,
-0.1707884818315506,
-0.3726629912853241,
-0.31881004571914673,
0.252096951007843,
0.11201199144124985,
0.048292338848114014,
0.1105852723121643,
0.32193484902381897,
-0.08130527287721634,
0.43265604972839355,
0.013910818845033646,
-0.18577313423156738,
-0.15171246230602264,
-0.21326525509357452,
-0.21281079947948456,
-0.27730628848075867,
-0.4498109817504883,
0.14497938752174377,
0.4436469078063965,
0.02477513626217842,
0.0010010479018092155,
0.20903289318084717,
0.12740039825439453,
-0.010391026735305786,
-0.20075534284114838,
-0.35518789291381836,
-0.24468857049942017,
0.1974935084581375,
-0.17942418158054352,
0.3334895968437195,
-0.17497257888317108,
0.15099121630191803,
-0.19557571411132812,
0.16191665828227997,
-0.3553525507450104,
-0.2452230155467987,
0.30797332525253296,
0.302539587020874,
-0.10457981377840042,
-0.044610828161239624,
-0.41290482878685,
0.264271080493927,
-0.11009462922811508,
0.05909080430865288,
-0.1334381401538849,
-0.02376369759440422,
-0.10637249052524567,
-0.0018750419840216637,
0.08081647753715515,
0.2770814299583435,
-0.39439675211906433,
0.15288835763931274,
-0.22119075059890747,
0.14942829310894012,
0.13066600263118744,
0.39774248003959656,
-0.3263542652130127,
0.08761026710271835,
-0.11062156409025192,
0.016678526997566223,
0.17025166749954224,
-0.3009157180786133,
-0.5397742986679077,
0.39983102679252625,
-0.2098788022994995,
0.10343808680772781,
0.12094041705131531,
-0.018254265189170837,
0.3900328278541565,
-0.24712786078453064,
0.2662602365016937,
0.5497123003005981,
0.06126920133829117,
0.1136699989438057,
-0.32521852850914,
-0.10475704818964005,
-0.03370874375104904,
0.564346969127655,
0.11439672112464905,
-0.11049694567918777,
0.13612079620361328,
0.09668154269456863,
0.15971755981445312,
0.0527685210108757,
-0.07502053678035736,
0.13453860580921173,
0.19698047637939453,
-0.0893595963716507,
-0.02322792261838913,
0.18391141295433044,
-0.49573034048080444,
0.4001033306121826,
-0.04509580135345459,
-0.2439488172531128,
0.37069517374038696,
0.07988238334655762,
-0.10517904907464981,
-0.17920689284801483,
-0.178762748837471,
0.15095055103302002,
0.10512547194957733,
-0.19057214260101318,
-0.053896427154541016,
0.19028674066066742,
0.13838589191436768,
0.3167603313922882,
-0.3021211326122284,
-0.001923269359394908,
0.011681752279400826,
0.10351346433162689,
0.1402077078819275,
-0.08131994307041168,
0.17528362572193146,
-0.030548520386219025,
0.05843473598361015,
-0.0661689043045044,
-0.08913177251815796,
0.08956564962863922,
0.1268128901720047,
0.34132319688796997,
-0.012441158294677734,
0.24230840802192688,
0.14560244977474213,
0.3362042307853699,
0.10862045735120773,
-0.02936646342277527,
0.05432581901550293,
-0.31891974806785583,
-0.25180038809776306,
0.4823029041290283,
-0.09205856919288635,
0.15078848600387573,
0.11645139753818512,
-0.32699277997016907,
0.41234856843948364,
-0.14849922060966492,
0.25593090057373047,
0.28747838735580444,
0.5536792278289795,
0.09510286152362823,
0.4025270938873291,
0.23067618906497955,
-0.20044448971748352,
0.22444602847099304,
0.2324165552854538,
-0.02790960669517517,
-0.3425462245941162,
0.1649186611175537,
-0.051567576825618744,
-0.2804047167301178,
0.00830093678086996,
0.05878007039427757,
0.5520933270454407,
0.11259110271930695,
0.04060879722237587,
-0.19319160282611847,
0.4311431050300598,
-0.3056516945362091,
0.27647799253463745,
-0.013750061392784119,
0.08176623284816742,
0.4084940552711487,
0.4574069678783417,
-0.20983180403709412,
-0.4086070954799652,
-0.11358626186847687,
0.38191550970077515,
0.14698472619056702,
-0.07280416786670685,
-0.12584266066551208,
-0.20399539172649384,
-0.05783279985189438,
-0.054890938103199005,
-0.11940742284059525,
-0.23672619462013245,
-0.2680537700653076,
0.01322796568274498,
0.304442435503006,
-0.06008719652891159,
0.00848678220063448,
-0.26650556921958923,
0.514874279499054,
0.04868326336145401,
-0.054311737418174744,
-0.4178194999694824,
-0.02258727140724659,
-0.21595889329910278,
0.15836431086063385,
0.16252003610134125,
-0.29939180612564087,
0.21135777235031128,
0.17746451497077942,
-0.00724402628839016,
-0.019225949421525,
-0.3806329071521759,
0.08317424356937408,
0.24744601547718048,
0.04791150614619255,
-0.23461008071899414,
0.014320902526378632,
0.19913610816001892,
0.006342767737805843,
0.06954114884138107,
-0.3881140351295471,
-0.10757564753293991,
0.009064381942152977,
-0.0538933090865612,
0.17835235595703125,
0.054212529212236404,
-0.28988999128341675,
-0.16578392684459686,
-0.4625602960586548,
0.21434618532657623,
-0.18991027772426605,
0.0008024722337722778,
0.2282605767250061,
-0.1258065104484558,
0.054425083100795746,
0.02540886215865612,
-0.11822932958602905,
-0.27137231826782227,
-0.5140333771705627,
0.391906201839447,
-0.060512106865644455,
-0.3088648021221161,
-0.22257719933986664,
0.12921078503131866,
-0.012730471789836884,
0.2743844985961914,
-0.40912294387817383,
0.17208901047706604,
-0.2697910666465759,
0.198238804936409,
0.026560837402939796,
-0.088687963783741,
0.036564555019140244,
-0.29128459095954895,
-0.22062115371227264,
-0.025242069736123085,
-0.05096835643053055,
0.14689680933952332,
0.2361966371536255,
0.3168795704841614,
-0.26977917551994324,
0.3415643274784088,
0.13936454057693481,
0.48499369621276855,
0.029721636325120926,
-0.04645726457238197,
0.306498259305954,
0.30872642993927,
0.18595656752586365,
-0.2166089415550232,
-0.1917750984430313,
0.024000443518161774,
-0.24198418855667114,
-0.18168309330940247,
0.33240675926208496,
-0.009431667625904083,
-0.48362448811531067,
-0.051954418420791626,
-0.027916396036744118,
0.22110635042190552,
-0.15555256605148315,
0.22697556018829346,
-0.14687474071979523,
0.004493050277233124,
0.17487111687660217,
0.05067925900220871,
-0.24853485822677612,
-0.25702163577079773,
0.05098327621817589,
-0.28972870111465454,
0.11292273551225662,
-0.24608758091926575,
-0.13087676465511322,
0.3246518075466156,
-0.6654970645904541,
0.05062802881002426,
-0.12677253782749176,
0.33935075998306274,
0.1319963037967682,
-0.02087228000164032,
0.2086360901594162,
0.04680400341749191,
0.5165261626243591,
0.08982032537460327,
0.13930149376392365,
0.00037102214992046356,
-0.4541066586971283,
0.0226783137768507,
-0.21417143940925598,
-0.051446106284856796,
0.04869130998849869,
0.3995549976825714,
0.38587090373039246,
-0.3827713429927826,
-0.14801020920276642,
-0.023737136274576187,
-0.052807386964559555,
-0.22260811924934387,
-0.26056715846061707,
-0.005554661154747009,
0.1305885910987854,
0.1284983903169632,
0.2395782470703125,
0.15079469978809357,
0.12188155204057693,
-0.2085505574941635,
-0.05498972535133362,
-0.06815288215875626,
0.18290242552757263,
0.2443777620792389,
-0.10954611003398895,
0.10499611496925354,
0.034652791917324066,
0.5330210328102112,
0.20219546556472778,
0.16203993558883667,
0.39164870977401733,
0.5336767435073853,
-0.021442241966724396,
-0.059032782912254333,
0.1207185685634613,
0.08488502353429794,
0.13297101855278015,
0.5663319826126099,
0.11142262071371078,
0.06594866514205933,
-0.318154901266098,
0.09069447219371796,
-0.1745763123035431,
0.1184813603758812,
0.15540668368339539,
-0.1474260836839676,
-0.3094094693660736,
-0.15911738574504852,
0.5107483267784119,
0.010608725249767303,
0.041992247104644775,
0.19512872397899628,
-0.25141555070877075,
-0.046857863664627075,
0.035732340067625046,
-0.13209375739097595,
0.8368293642997742,
-0.02609293907880783,
0.10403493791818619,
-0.06808025389909744,
-0.004018187522888184,
0.25235065817832947,
-0.3498372435569763,
-0.05055052787065506,
-0.20668372511863708,
-0.16284365952014923,
0.2075822800397873,
-0.06530136615037918,
-0.03921295702457428,
0.21601149439811707,
0.16819772124290466,
0.1074095070362091,
-0.0210481658577919,
0.3766249716281891,
-0.13308759033679962,
0.2871602177619934,
0.14282259345054626,
-0.19909699261188507,
-0.19889338314533234,
0.2173183411359787,
-0.15192142128944397,
-0.011547844856977463,
-0.0593670979142189,
-0.07383685559034348,
-0.032162588089704514,
0.026514403522014618,
-0.08230409026145935,
0.041874147951602936,
-0.1302342265844345,
0.3452494144439697,
-0.0467488132417202,
-0.33510059118270874,
0.172128826379776,
-0.22374454140663147,
-0.41767066717147827,
-0.06471338868141174,
-0.20563600957393646,
0.3521541655063629,
-0.12780866026878357,
0.3836576044559479,
0.35758423805236816,
-0.2768968343734741,
0.2228884994983673,
-0.07346445322036743,
0.08609717339277267,
-0.12760302424430847,
-0.020073428750038147,
-0.2176632434129715,
-0.24083392322063446,
0.04534957557916641,
0.18195638060569763,
-0.26637303829193115,
-0.13331098854541779,
0.06469219923019409,
0.11592578887939453,
-0.14421215653419495,
0.20716558396816254,
0.13120527565479279,
0.16094601154327393,
0.3172067105770111,
0.04312175139784813,
-0.1773994117975235,
-0.2193932682275772,
0.6642943024635315,
-0.026271216571331024,
-0.21069875359535217,
0.375223845243454,
0.16225220263004303,
-0.3655775189399719,
-0.12162331491708755,
0.03163566440343857,
0.374430775642395,
-0.45612818002700806,
0.3150385916233063,
-0.28841716051101685,
-0.07857070863246918,
0.2572210729122162,
0.04368060827255249,
-0.015567585825920105,
-0.42854422330856323,
0.00686163455247879,
-0.21454283595085144,
-0.2761789560317993,
0.027638811618089676,
-0.07781285047531128,
0.10188931226730347,
-0.3613106608390808,
-0.10525333881378174,
-0.1253165900707245,
0.325542688369751,
-0.3826211988925934,
0.21461057662963867,
0.06792763620615005,
0.12048131227493286,
-0.184823140501976,
-0.4223630726337433,
-0.011301230639219284,
-0.0841149091720581,
0.10707002878189087,
0.10579876601696014,
-0.1574966460466385,
-0.350100040435791,
-0.06941349804401398,
0.11251182109117508,
-0.011770747601985931,
-0.0029523870907723904,
0.12730906903743744,
-0.3357500433921814,
-0.02943449467420578,
-0.15730732679367065,
0.00864056870341301,
0.18674159049987793,
0.05230400338768959,
-0.3707132935523987,
0.2300565540790558,
0.0784841999411583,
-0.020380137488245964,
0.3685418665409088,
0.010748706758022308,
0.14755818247795105,
0.11663966625928879,
0.1964166909456253,
-0.11058267951011658,
-0.24090848863124847,
-0.16246618330478668,
-0.11847887188196182,
0.28052669763565063,
-0.046704232692718506,
0.3215599060058594,
-0.3202124834060669,
-0.09509801119565964,
0.20122921466827393,
0.36128243803977966,
0.5668721795082092,
-0.02422424964606762,
-0.38041284680366516,
0.07325448095798492,
0.27276647090911865,
-0.15394924581050873,
-0.1301032155752182,
0.0856582522392273,
0.03806249424815178,
-0.13325785100460052,
0.026571251451969147,
0.3532829284667969,
-0.1669163703918457,
0.1675894409418106,
0.14024624228477478,
0.4464414417743683,
0.09743503481149673,
-0.03483152016997337,
0.10655553638935089,
0.1278480440378189,
0.028068071231245995,
0.5872795581817627,
0.2597629129886627,
0.06502099335193634,
0.4543125629425049,
0.02695772424340248,
0.34396710991859436,
0.0912298783659935,
0.15990115702152252,
0.025458231568336487,
-0.41604021191596985,
-0.10905593633651733,
0.35458970069885254,
-0.3630835711956024,
0.05098184570670128,
-0.06286144256591797,
0.11601361632347107,
0.01918647438287735,
0.024634812027215958,
-0.3914387822151184,
0.049735333770513535,
-0.2921127378940582,
-0.0543966218829155,
0.1644142121076584,
-0.16116532683372498,
-0.08298395574092865,
0.2432965636253357,
-0.23234149813652039,
0.05078906938433647,
0.4543323218822479,
0.2904660403728485,
-0.06132364273071289,
-0.41440609097480774,
-0.2544575035572052,
-0.11195123940706253,
0.15964463353157043,
-0.24500544369220734,
0.16342397034168243,
-0.046811580657958984,
-0.16885662078857422,
0.10485650599002838,
0.20448820292949677,
0.18345463275909424,
0.30970582365989685,
0.10343249142169952,
-0.02177458629012108,
0.0743548721075058,
-0.08637815713882446,
-0.13775606453418732,
0.5175189971923828,
-0.009070418775081635,
0.10679218173027039,
0.1602642834186554,
0.10143976658582687,
-0.348807692527771,
-0.21754847466945648,
-0.07577323913574219,
-0.12163437902927399,
-0.2066873013973236,
0.12687690556049347,
0.2536277770996094,
-0.10207177698612213,
-0.3327086567878723,
-0.2038651406764984,
0.09377449005842209,
-0.21989001333713531,
0.2739771902561188,
-0.236227348446846,
0.06590825319290161,
-0.17437824606895447,
0.12961922585964203,
-0.35214951634407043,
0.5997632741928101,
0.09629207104444504,
0.006336960941553116,
-0.488929808139801,
-0.04702647030353546,
-0.4901948571205139,
0.11362245678901672,
-0.2887199819087982,
0.32119080424308777,
0.11834974586963654,
0.5177027583122253,
-0.006530731916427612,
0.03637569770216942,
-0.08831408619880676,
0.11468052119016647,
0.020226910710334778,
0.008520293980836868,
-0.45587095618247986,
0.23213611543178558,
-0.02804575115442276,
0.04106735438108444,
-0.10924363136291504,
-0.48954659700393677,
0.35634589195251465,
-0.015323391184210777,
0.08288643509149551,
-0.2241467833518982,
-0.13883857429027557,
0.1841084212064743,
0.49467843770980835,
0.3996107280254364,
0.09503915905952454,
0.24682746827602386,
0.1787799596786499,
-0.15249872207641602,
-0.37932997941970825,
-0.23715098202228546,
-0.03330908343195915,
-0.16250672936439514,
0.05249670147895813,
-0.09215772151947021,
0.07103494554758072,
-0.011771529912948608,
0.005239979363977909,
0.11605923622846603,
-0.2415507435798645,
-0.046359993517398834,
-0.16889508068561554,
-0.33023640513420105,
0.05036625266075134,
0.3088817298412323,
0.06633089482784271,
0.33673956990242004,
-0.1124829649925232,
0.01928107626736164,
-0.49770867824554443,
-0.38607755303382874,
0.3325391709804535,
-0.36199286580085754,
-0.11438234150409698,
-0.2368950992822647,
0.42939651012420654,
0.30341893434524536,
0.22644942998886108,
-0.29609495401382446,
-0.018742404878139496,
0.17938952147960663,
-0.10538149625062943,
-0.033227693289518356,
0.47772860527038574,
-0.04856526851654053,
0.03196362033486366,
-0.05032845214009285,
0.24420689046382904,
0.058307893574237823,
-0.24952669441699982,
-0.1617685705423355,
-0.023453649133443832
] |
https://github.com/huggingface/datasets/issues/2250 | some issue in loading local txt file as Dataset for run_mlm.py | Hi,
1. try
```python
dataset = load_dataset("text", data_files={"train": ["a1.txt", "b1.txt"], "test": ["c1.txt"]})
```
instead.
Sadly, I can't reproduce the error on my machine. If the above code doesn't resolve the issue, try to update the library to the
newest version (`pip install datasets --upgrade`).
2. https://github.com/huggingface/transformers/blob/3ed5e97ba04ce9b24b4a7161ea74572598a4c480/examples/pytorch/language-modeling/run_mlm.py#L258-L259
This is the original code. You'll have to modify the example source to work with multiple train files. To make it easier, let's say "|" will act as a delimiter between files:
```python
if data_args.train_file is not None:
data_files["train"] = data_args.train_file.split("|") # + .split("|")
```
Then call the script as follows (**dataset_name must be None**):
```bash
python run_mlm.py [... other args] --train_file a1.txt|b1.txt
``` | 
first of all, I tried to load 3 .txt files as a dataset (sure that the directory and permission is OK.), I face with the below error.
> FileNotFoundError: [Errno 2] No such file or directory: 'c'
by removing one of the training .txt files It's fixed and although if I put all file as training it's ok


after this, my question is how could I use this defined Dataset for run_mlm.py for from scratch pretraining.
by using --train_file path_to_train_file just can use one .txt , .csv or, .json file. I tried to set my defined Dataset as --dataset_name but the below issue occurs.
> Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 336, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 291, in cached_path
use_auth_token=download_config.use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 621, in get_from_cache
raise FileNotFoundError("Couldn't find file at {}".format(url))
FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/dataset/dataset.py
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
File "run_mlm.py", line 486, in <module>
main()
File "run_mlm.py", line 242, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name, cache_dir=model_args.cache_dir)
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 719, in load_dataset
use_auth_token=use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 347, in prepare_module
combined_path, github_file_path
FileNotFoundError: Couldn't find file locally at dataset/dataset.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.6.0/datasets/dataset/dataset.py.
The file is also not present on the master branch on github.
| 110 | some issue in loading local txt file as Dataset for run_mlm.py

first of all, I tried to load 3 .txt files as a dataset (sure that the directory and permission is OK.), I face with the below error.
> FileNotFoundError: [Errno 2] No such file or directory: 'c'
by removing one of the training .txt files It's fixed and although if I put all file as training it's ok


after this, my question is how could I use this defined Dataset for run_mlm.py for from scratch pretraining.
by using --train_file path_to_train_file just can use one .txt , .csv or, .json file. I tried to set my defined Dataset as --dataset_name but the below issue occurs.
> Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 336, in prepare_module
local_path = cached_path(file_path, download_config=download_config)
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 291, in cached_path
use_auth_token=download_config.use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/utils/file_utils.py", line 621, in get_from_cache
raise FileNotFoundError("Couldn't find file at {}".format(url))
FileNotFoundError: Couldn't find file at https://raw.githubusercontent.com/huggingface/datasets/master/datasets/dataset/dataset.py
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
File "run_mlm.py", line 486, in <module>
main()
File "run_mlm.py", line 242, in main
datasets = load_dataset(data_args.dataset_name, data_args.dataset_config_name, cache_dir=model_args.cache_dir)
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 719, in load_dataset
use_auth_token=use_auth_token,
File "/usr/local/lib/python3.7/dist-packages/datasets/load.py", line 347, in prepare_module
combined_path, github_file_path
FileNotFoundError: Couldn't find file locally at dataset/dataset.py, or remotely at https://raw.githubusercontent.com/huggingface/datasets/1.6.0/datasets/dataset/dataset.py.
The file is also not present on the master branch on github.
Hi,
1. try
```python
dataset = load_dataset("text", data_files={"train": ["a1.txt", "b1.txt"], "test": ["c1.txt"]})
```
instead.
Sadly, I can't reproduce the error on my machine. If the above code doesn't resolve the issue, try to update the library to the
newest version (`pip install datasets --upgrade`).
2. https://github.com/huggingface/transformers/blob/3ed5e97ba04ce9b24b4a7161ea74572598a4c480/examples/pytorch/language-modeling/run_mlm.py#L258-L259
This is the original code. You'll have to modify the example source to work with multiple train files. To make it easier, let's say "|" will act as a delimiter between files:
```python
if data_args.train_file is not None:
data_files["train"] = data_args.train_file.split("|") # + .split("|")
```
Then call the script as follows (**dataset_name must be None**):
```bash
python run_mlm.py [... other args] --train_file a1.txt|b1.txt
``` | [
-0.2187606245279312,
-0.16674183309078217,
0.03139004483819008,
0.42028743028640747,
0.41028523445129395,
0.20862680673599243,
0.3599505126476288,
0.3321826756000519,
0.09591753780841827,
-0.08650469779968262,
0.14329592883586884,
0.11218525469303131,
-0.3130260109901428,
0.11540602892637253,
0.27110934257507324,
-0.18550698459148407,
-0.054343901574611664,
0.11691564321517944,
0.00617719441652298,
-0.052779145538806915,
-0.057285793125629425,
0.21207056939601898,
-0.08562581241130829,
0.0367860421538353,
-0.5357350707054138,
-0.11246252804994583,
-0.08959177881479263,
0.5331770777702332,
-0.11135617643594742,
-0.42108041048049927,
0.20544959604740143,
-0.218999981880188,
0.5652352571487427,
0.3786007761955261,
-0.00011784078378695995,
0.13661877810955048,
0.0195881649851799,
-0.3046213686466217,
-0.2785407602787018,
-0.36741799116134644,
-0.04739296808838844,
-0.15173326432704926,
0.31319794058799744,
-0.29828163981437683,
-0.28495779633522034,
-0.2986627221107483,
0.11836828291416168,
-0.41722092032432556,
0.5750329494476318,
0.5418717861175537,
0.146499365568161,
-0.11268346011638641,
-0.11351320147514343,
0.16616478562355042,
0.16432933509349823,
0.1989792287349701,
0.053243882954120636,
0.4563588500022888,
0.23594819009304047,
-0.18661363422870636,
0.12232547998428345,
0.002842891961336136,
-0.08564670383930206,
0.28355342149734497,
0.42078697681427,
0.2291143387556076,
0.26769572496414185,
-0.3368057906627655,
-0.06595893949270248,
0.4293659031391144,
0.5069276094436646,
-0.46308234333992004,
-0.1613181233406067,
-0.21486568450927734,
0.09653066098690033,
-0.5334340333938599,
0.1466606855392456,
0.1705649495124817,
-0.16930316388607025,
0.16131295263767242,
-0.04011359438300133,
-0.12844887375831604,
-0.29603713750839233,
0.3532932996749878,
0.13733626902103424,
-0.004697881639003754,
-0.23735876381397247,
0.13422980904579163,
-0.049126703292131424,
0.21223624050617218,
0.14654915034770966,
-0.13089799880981445,
0.11606061458587646,
0.35263320803642273,
-0.23044200241565704,
0.015142597258090973,
-0.30566465854644775,
-0.2286912500858307,
-0.10492023825645447,
-0.22181059420108795,
0.06160855293273926,
-0.11233782023191452,
0.015827778726816177,
0.188626229763031,
-0.03498243913054466,
0.17837366461753845,
-0.014765501022338867,
0.25185123085975647,
0.16957524418830872,
-0.08633194863796234,
-0.22772912681102753,
-0.1104218140244484,
-0.43648332357406616,
-0.3626224994659424,
-0.1716032773256302,
0.1861090064048767,
-0.00986272282898426,
-0.2603827118873596,
-0.18686619400978088,
-0.013593106530606747,
-0.4629867970943451,
-0.11962176114320755,
0.050189029425382614,
0.42063379287719727,
0.047192011028528214,
-0.2701142430305481,
0.1909433901309967,
0.31142473220825195,
-0.29822051525115967,
-0.02053667977452278,
-0.13541854918003082,
0.267613023519516,
-0.16675376892089844,
0.006730973720550537,
0.2710704207420349,
-0.05596926435828209,
0.5489358305931091,
-0.1468859761953354,
0.018224265426397324,
-0.15805761516094208,
0.298627108335495,
-0.3071928024291992,
0.11162858456373215,
0.3208244740962982,
-0.13632987439632416,
-0.1147710382938385,
0.2910397946834564,
-0.0443100668489933,
-0.10293450206518173,
0.17772726714611053,
-0.3631928861141205,
-0.36319980025291443,
0.056677158921957016,
0.05500864237546921,
-0.0763356015086174,
0.06738753616809845,
-0.028014086186885834,
0.13931028544902802,
0.3043959438800812,
0.0021813511848449707,
-0.12480478733778,
-0.42270612716674805,
-0.21129557490348816,
-0.16338390111923218,
0.34596991539001465,
0.5008913278579712,
-0.32723525166511536,
0.13898684084415436,
-0.06140925735235214,
0.08243556320667267,
0.129308819770813,
0.17917603254318237,
-0.47403162717819214,
0.5258907675743103,
-0.35628941655158997,
0.2602773904800415,
0.3359384834766388,
-0.36610493063926697,
0.2029673159122467,
0.4296668767929077,
-0.062166206538677216,
-0.040563058108091354,
0.13383041322231293,
-0.07868043333292007,
-0.17212748527526855,
-0.061321623623371124,
0.17700761556625366,
0.22443486750125885,
-0.1008405089378357,
0.07333867251873016,
-0.19714993238449097,
-0.25770828127861023,
-0.05279691517353058,
0.19425636529922485,
-0.03668742999434471,
0.07679776847362518,
0.187515527009964,
-0.00045540183782577515,
0.12526780366897583,
-0.26781439781188965,
0.12076961994171143,
0.3422432541847229,
0.06626777350902557,
0.1107201799750328,
0.046729255467653275,
0.12257456034421921,
-0.35141244530677795,
0.16393515467643738,
-0.07991351187229156,
-0.07363095879554749,
-0.1430329978466034,
-0.06445885449647903,
-0.11373723298311234,
-0.20623040199279785,
-0.3944914638996124,
-0.24052366614341736,
0.02659599855542183,
0.02179374173283577,
0.05457383021712303,
0.017738893628120422,
-0.3444503843784332,
0.14424605667591095,
-0.4874132573604584,
-0.04217834025621414,
-0.09923042356967926,
0.20219434797763824,
0.016421660780906677,
0.0035269842483103275,
0.05935780704021454,
0.05582163482904434,
0.006058674305677414,
-0.3265492916107178,
-0.11846179515123367,
0.3234592080116272,
0.05281805247068405,
0.07713328301906586,
-0.1485338807106018,
0.21002963185310364,
0.1040450781583786,
-0.06136595457792282,
0.1945246309041977,
0.0633508712053299,
0.31945523619651794,
-0.1345401406288147,
-0.19950056076049805,
0.3969229459762573,
0.06956574320793152,
0.016577012836933136,
0.11556996405124664,
-0.22741496562957764,
0.10465604066848755,
-0.09914949536323547,
-0.00723984744399786,
-0.15977288782596588,
0.24391649663448334,
0.06105952337384224,
0.19814743101596832,
-0.1272439956665039,
-0.30915671586990356,
-0.2142791450023651,
0.32161059975624084,
0.25454071164131165,
0.03738586604595184,
0.09550277888774872,
-0.17335885763168335,
0.05059826374053955,
0.045909710228443146,
0.20777632296085358,
0.4979131817817688,
0.019274398684501648,
-0.20035728812217712,
0.3725387454032898,
0.021642982959747314,
-0.2439146488904953,
0.11911564320325851,
-0.08437855541706085,
0.33881402015686035,
0.49565303325653076,
-0.24458089470863342,
-0.06767383217811584,
-0.21415263414382935,
-0.02744784764945507,
0.30341431498527527,
0.42021429538726807,
-0.549400806427002,
0.26330357789993286,
-0.3707825839519501,
-0.14036338031291962,
-0.4049874246120453,
0.1483595073223114,
-0.033233802765607834,
0.13325291872024536,
-0.3153635859489441,
0.1717945784330368,
0.24861520528793335,
0.006779287941753864,
-0.11448940634727478,
-0.016752824187278748,
0.04405011236667633,
-0.31371358036994934,
0.0948309600353241,
-0.13022592663764954,
-0.2783365547657013,
-0.017927665263414383,
0.5486422181129456,
0.11929378658533096,
0.07767117768526077,
-0.14897048473358154,
-0.3432917594909668,
0.01737162470817566,
-0.016041111201047897,
0.13596227765083313,
0.03861825168132782,
0.3947206735610962,
-0.00017155706882476807,
0.3190339207649231,
-0.20062829554080963,
-0.03120669350028038,
0.12760645151138306,
0.1451539397239685,
-0.16767969727516174,
-0.16260813176631927,
0.004552838392555714,
-0.25009456276893616,
-0.13707758486270905,
-0.6858368515968323,
-0.5413179993629456,
-0.16935017704963684,
0.07534771412611008,
0.20033200085163116,
0.19472618401050568,
0.18138769268989563,
0.17620791494846344,
0.24503165483474731,
0.05614806339144707,
0.1711566001176834,
-0.03810626640915871,
-0.4465245008468628,
0.22645415365695953,
-0.2394656091928482,
-0.22477276623249054,
0.35803505778312683,
-0.04424362629652023,
0.02154413051903248,
0.1005164384841919,
-0.5381855368614197,
-0.1136731430888176,
0.25049373507499695,
-0.0290171317756176,
-0.01233796775341034,
-0.03332424908876419,
0.2848324775695801,
-0.08116427063941956,
0.11762441694736481,
-0.07442110776901245,
-0.07502323389053345,
0.30469197034835815,
0.15285652875900269,
0.2563612461090088,
0.33206531405448914,
0.5313271880149841,
-0.03681299835443497,
0.7044875621795654,
0.2361268699169159,
-0.22577227652072906,
0.375479131937027,
-0.30376291275024414,
0.10680507123470306,
-0.14272582530975342,
-0.11357681453227997,
0.22184531390666962,
0.08353361487388611,
-0.2613662779331207,
0.17901767790317535,
0.04719412326812744,
0.06570331007242203,
-0.2824079692363739,
0.32682564854621887,
-0.08576071262359619,
-0.1656235307455063,
0.21036852896213531,
-0.15767399966716766,
0.41890379786491394,
0.03572331741452217,
0.13113537430763245,
0.14569096267223358,
-0.20543095469474792,
-0.08277715742588043,
0.5667654871940613,
0.1291620433330536,
0.2777434289455414,
-0.5577235221862793,
-0.30434393882751465,
-0.34778091311454773,
0.13951364159584045,
0.16473308205604553,
0.48709046840667725,
-0.1520964503288269,
-0.04053359851241112,
0.3218386173248291,
0.023159557953476906,
0.47435981035232544,
-0.2974194288253784,
-0.01394021138548851,
0.3608807325363159,
-0.060835592448711395,
0.07129079103469849,
-0.12118011713027954,
0.13117192685604095,
0.5619037747383118,
-0.03623037412762642,
0.40162909030914307,
-0.10296947509050369,
-0.2938934564590454,
0.08359304070472717,
0.20289228856563568,
-0.19850167632102966,
-0.20784324407577515,
-0.16920121014118195,
-0.1432552933692932,
-0.29974454641342163,
-0.2505706548690796,
0.057117484509944916,
0.18439915776252747,
-0.0075564514845609665,
0.27153873443603516,
-0.01768653281033039,
0.16759616136550903,
0.23385833203792572,
0.06259281933307648,
0.2957533001899719,
0.12075943499803543,
0.12106551229953766,
0.26684755086898804,
0.3667300045490265,
0.4993269741535187,
0.5277523398399353,
-0.4694202244281769,
-0.16141146421432495,
0.1477745771408081,
-0.1777695268392563,
0.3248344659805298,
0.29078108072280884,
-0.20402811467647552,
-0.02627166360616684,
0.2625286281108856,
-0.29537415504455566,
-0.04720161855220795,
0.2233005166053772,
0.247966930270195,
-0.00979649368673563,
-0.06580714881420135,
-0.5862112641334534,
0.21362832188606262,
0.05217437073588371,
0.1908983737230301,
0.13542574644088745,
-0.6723158359527588,
-0.4462922215461731,
0.22540803253650665,
-0.012819752097129822,
0.7663851976394653,
-0.20992310345172882,
0.4583089351654053,
0.1677960455417633,
0.27192026376724243,
-0.02555420808494091,
-0.42538732290267944,
0.27405309677124023,
-0.4830498695373535,
0.06425119936466217,
-0.10647860914468765,
-0.15007008612155914,
0.2763530910015106,
0.1562802791595459,
0.016497831791639328,
0.15948326885700226,
0.054941728711128235,
0.18097102642059326,
-0.0730055570602417,
0.32190319895744324,
0.24343916773796082,
-0.1929604709148407,
-0.23596927523612976,
0.01029418408870697,
-0.18012121319770813,
0.21005810797214508,
-0.11297379434108734,
-0.18875548243522644,
-0.1296447068452835,
0.08621974289417267,
0.06538864970207214,
-0.09072045236825943,
-0.6141547560691833,
0.12366360425949097,
-0.1575998067855835,
-0.3965590000152588,
0.28710880875587463,
0.3647822439670563,
0.17060387134552002,
-0.07104763388633728,
-0.29541972279548645,
0.1321607232093811,
0.11225640773773193,
-0.18421760201454163,
-0.03295176476240158,
-0.05166821554303169,
0.2976560890674591,
-0.09252192080020905,
0.0413704439997673,
0.2050376832485199,
-0.3047453463077545,
-0.3144066333770752,
-0.066167913377285,
-0.2993866801261902,
0.5104275345802307,
-0.189724862575531,
-0.46315494179725647,
0.07004217058420181,
0.08605195581912994,
0.062116894870996475,
0.08426912128925323,
0.16483746469020844,
-0.2388739287853241,
0.18680620193481445,
-0.03254083916544914,
-0.4317283034324646,
0.027717260643839836,
0.5185138583183289,
-0.02893301099538803,
0.07900514453649521,
0.5657850503921509,
0.35686570405960083,
-0.029905881732702255,
-0.2044343650341034,
0.3942812979221344,
0.0715579241514206,
-0.06998613476753235,
0.11380279064178467,
0.43078985810279846,
0.2418813556432724,
0.06221241503953934,
0.29505032300949097,
0.23605595529079437,
-0.1236715093255043,
0.20505200326442719,
-0.461152046918869,
-0.5064796209335327,
-0.10169145464897156,
-0.0835033506155014,
0.2456609010696411,
0.17165791988372803,
0.17611412703990936,
0.04065897315740585,
-0.2078077346086502,
-0.21555937826633453,
0.2344580590724945,
-0.019916987046599388,
0.14333465695381165,
0.20964080095291138,
0.08125856518745422,
0.37896233797073364,
0.06723175942897797,
0.06180582940578461,
-0.027217086404561996,
-0.3651137948036194,
-0.13018059730529785,
-0.07920962572097778,
0.18247583508491516,
0.009072365239262581,
-0.3380412757396698,
-0.0017497194930911064,
-0.5721230506896973,
-0.27062514424324036,
-0.02208041585981846,
0.016805201768875122,
0.08303903043270111,
-0.08590376377105713,
0.09436913579702377,
-0.18302352726459503,
-0.07196184247732162,
-0.10911314189434052,
-0.053800515830516815,
-0.19913244247436523,
0.011490881443023682,
0.06592538952827454,
0.11018591374158859,
-0.09559846669435501,
0.007545977830886841,
-0.007455984130501747,
-0.09169342368841171,
-0.2438063770532608,
0.12404455989599228,
0.23280403017997742,
-0.4102426767349243,
0.18989990651607513,
-0.21371367573738098,
0.2356957197189331,
0.4120398163795471,
-0.41745463013648987,
0.2346378117799759,
0.5493929982185364,
0.07154251635074615,
-0.11911337077617645,
0.16001716256141663,
0.3307396471500397,
-0.03160448744893074,
-0.11061692982912064,
0.19720235466957092,
0.3799903690814972,
-0.03525053337216377,
-0.19290097057819366,
0.06094049662351608,
0.3784877359867096,
-0.1502978503704071,
0.06406048685312271,
0.2975323498249054,
-0.16036075353622437,
0.13338392972946167,
0.20916640758514404,
0.3601657748222351,
0.15454263985157013,
0.5240299105644226,
-0.08224119991064072,
-0.09315548092126846,
0.05973725765943527,
0.0534927174448967,
-0.39306649565696716,
-0.6014754176139832,
0.1731496900320053,
0.21677327156066895,
-0.12834732234477997,
0.12401050329208374,
-0.1549287736415863,
0.4967994689941406,
-0.001090528443455696,
-0.29260584712028503,
0.014284750446677208,
0.07853976637125015,
-0.22756904363632202,
-0.1339009404182434,
-0.4213930368423462,
-0.15517431497573853,
0.050254687666893005,
0.006385296583175659,
-0.1967867910861969,
-0.19831107556819916,
-0.1814773976802826,
0.2520405650138855,
-0.14877983927726746,
-0.1792176067829132,
0.09262916445732117,
0.09377509355545044,
-0.1402391493320465,
-0.2473495453596115,
0.30384352803230286,
-0.10891489684581757,
-0.07883422076702118,
0.19957111775875092,
-0.15091028809547424,
0.29785364866256714,
0.3143271505832672,
-0.17248035967350006,
-0.21891489624977112,
0.08053828775882721,
0.09419551491737366,
0.20148350298404694,
0.02832895889878273,
0.1573803722858429,
0.17230334877967834,
0.3426736891269684,
-0.0058868080377578735,
0.008685189299285412,
0.31661662459373474,
0.0011796355247497559,
-0.0813741385936737,
-0.09219761192798615,
-0.05897451192140579,
0.23956622183322906,
-0.009671535342931747,
-0.053871773183345795,
0.14665767550468445,
-0.390159010887146,
0.022580690681934357,
0.7142033576965332,
-0.01710219494998455,
0.361457884311676,
-0.06833960115909576,
0.032516974955797195,
-0.1164207011461258,
0.3474166989326477,
0.12983109056949615,
-0.08346400409936905,
-0.4065195322036743,
-0.006004206836223602,
-0.6180539131164551,
-0.04602731019258499,
-0.16174952685832977,
-0.1863463819026947,
-0.15965476632118225,
0.004388934001326561,
0.1381012499332428,
-0.03248103708028793,
-0.1281866729259491,
-0.09012892097234726,
0.16966883838176727,
0.32148656249046326,
-0.08560510724782944,
-0.22588132321834564,
-0.16796286404132843,
0.3584049940109253,
-0.003158699721097946,
-0.3093911409378052,
-0.08939477801322937,
-0.19367992877960205,
-0.011719025671482086,
-0.2749817371368408,
0.02326345443725586,
0.1074020117521286,
0.20274323225021362,
0.2969762682914734,
-0.21015788614749908,
0.4309171140193939,
0.006539277732372284,
0.1876879781484604,
-0.17052797973155975,
0.07233790308237076,
-0.08118274807929993,
0.1116093099117279,
0.049619000405073166,
0.4050958454608917,
-0.5295052528381348,
-0.11736594140529633,
-0.537040114402771,
-0.09461738169193268,
0.015608180314302444,
-0.24592225253582,
-0.17386466264724731,
0.06548790633678436,
-0.13643088936805725,
0.26753804087638855,
0.2362121343612671,
0.34131866693496704,
-0.09797210991382599,
-0.03375838324427605,
-0.3247716724872589,
-0.052678681910037994,
0.5630748271942139,
-0.4386034309864044,
0.007931206375360489,
0.10635111480951309,
0.016981296241283417,
0.12371517717838287,
0.10710611194372177,
-0.30414074659347534,
0.06483782082796097,
0.48300647735595703,
-0.1889515221118927,
-0.2679227590560913,
0.35116058588027954,
-0.03128911927342415,
0.039959270507097244,
0.02372824028134346,
0.008591137826442719,
-0.014271952211856842,
-0.318552166223526,
-0.37846139073371887,
-0.4073459506034851
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Hi @villmow, thanks for reporting.
Could you please try with the Datasets version 1.6? We released it yesterday and it fixes some issues about the processing speed. You can see the fix implemented by @lhoestq here: #2122.
Once you update Datasets, please confirm if the problem persists. | ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 47 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Hi @villmow, thanks for reporting.
Could you please try with the Datasets version 1.6? We released it yesterday and it fixes some issues about the processing speed. You can see the fix implemented by @lhoestq here: #2122.
Once you update Datasets, please confirm if the problem persists. | [
-0.3536393642425537,
-0.41076377034187317,
-0.09764088690280914,
0.25704893469810486,
-0.007618822157382965,
0.11197612434625626,
0.18846511840820312,
0.3910500109195709,
0.4355854094028473,
-0.013238787651062012,
0.256710410118103,
0.3540888726711273,
0.009039230644702911,
-0.15175262093544006,
-0.17464978992938995,
0.06981870532035828,
0.11664147675037384,
-0.143187016248703,
-0.008706778287887573,
-0.16237866878509521,
-0.32098183035850525,
-0.08776319772005081,
-0.20037317276000977,
0.04380970448255539,
-0.18605856597423553,
-0.25960245728492737,
0.013947950676083565,
0.08917742967605591,
-0.00407000444829464,
-0.3334621787071228,
-0.0190602894872427,
-0.01494654268026352,
-0.19278837740421295,
0.9497965574264526,
-0.00011685662320815027,
-0.08053312450647354,
0.24792486429214478,
0.2797505855560303,
0.10894560813903809,
0.08501695096492767,
-0.23138737678527832,
-0.35760241746902466,
0.08786323666572571,
-0.23597896099090576,
0.249798983335495,
-0.023537561297416687,
-0.0029940884560346603,
-0.5800062417984009,
0.26920753717422485,
-0.09399404376745224,
0.14032907783985138,
0.09481022506952286,
-0.3863693177700043,
-0.09082408994436264,
0.02663450688123703,
0.005713753402233124,
0.0010935161262750626,
0.16833533346652985,
0.5363389253616333,
-0.21204659342765808,
-0.14999964833259583,
0.18619224429130554,
-0.4690409302711487,
0.3006964921951294,
0.09311084449291229,
0.06928129494190216,
0.5572913885116577,
-0.5610746145248413,
0.28691422939300537,
0.17468079924583435,
0.08061745017766953,
0.05660216510295868,
-0.04436507076025009,
-0.4018826186656952,
-0.42511969804763794,
0.021194906905293465,
0.06307543069124222,
0.11589056998491287,
-0.18201977014541626,
-0.24561432003974915,
-0.4943923354148865,
0.016885343939065933,
0.22670793533325195,
0.051657967269420624,
0.005289748311042786,
0.09660112857818604,
0.13847091794013977,
0.2925824224948883,
0.34333232045173645,
0.10917843878269196,
0.06772761791944504,
-0.3050726354122162,
0.032748185098171234,
0.30523398518562317,
-0.45249903202056885,
0.08748286962509155,
0.48087620735168457,
0.05416214466094971,
0.05202764272689819,
-0.3966448903083801,
-0.14297835528850555,
0.027827197685837746,
0.02299834042787552,
0.10506667196750641,
0.3621993064880371,
-0.006308896001428366,
-0.09878840297460556,
0.21773874759674072,
0.4536740779876709,
-0.2545013129711151,
-0.3706454634666443,
0.21393069624900818,
0.040992893278598785,
-0.576433539390564,
0.17549993097782135,
0.0035548191517591476,
0.009206507354974747,
-0.029102250933647156,
-0.061253972351551056,
-0.0754595398902893,
-0.15320652723312378,
-0.19276395440101624,
0.1660398244857788,
0.34245118498802185,
-0.13986244797706604,
0.20192396640777588,
-0.17301981151103973,
-0.14049559831619263,
-0.22006000578403473,
0.2372359186410904,
-0.11238833516836166,
-0.3543468415737152,
-0.3067360818386078,
0.15076713263988495,
0.10140466690063477,
-0.2737496793270111,
0.08473660051822662,
0.38378509879112244,
-0.3222762942314148,
-0.1553744077682495,
0.1739758998155594,
-0.39591631293296814,
0.006428241729736328,
0.023021385073661804,
0.04258456453680992,
0.6243890523910522,
0.09005403518676758,
0.2955988645553589,
-0.233950674533844,
0.37100425362586975,
-0.5977979302406311,
-0.1593911349773407,
0.2099529355764389,
0.04872755706310272,
-0.019168950617313385,
0.26503732800483704,
-0.28739747405052185,
0.08048511296510696,
0.29952317476272583,
-0.17520453035831451,
-0.26211026310920715,
-0.16400502622127533,
-0.32438063621520996,
-0.309782475233078,
-0.10981356352567673,
0.376803994178772,
-0.08986032009124756,
0.09841997921466827,
-0.2508913278579712,
0.17117948830127716,
0.47215017676353455,
0.5991898775100708,
-0.23463289439678192,
0.4373858571052551,
-0.24217022955417633,
-0.02881595492362976,
0.018366575241088867,
0.0336231105029583,
-0.2913624942302704,
0.7230957746505737,
-0.3079107105731964,
0.02675441838800907,
-0.09772341698408127,
0.2283008098602295,
0.39337417483329773,
-0.2332686334848404,
0.26997828483581543,
0.31294721364974976,
-0.04747304320335388,
0.4035686254501343,
-0.3195686340332031,
-0.10587071627378464,
0.1694391667842865,
-0.034154146909713745,
0.0220109224319458,
0.07163767516613007,
0.11431156098842621,
-0.36699309945106506,
0.3592446744441986,
-0.060586366802453995,
0.03282838314771652,
0.20907966792583466,
0.044749096035957336,
-0.0553574413061142,
-0.018403993919491768,
0.09259185194969177,
-0.09471956640481949,
0.22437748312950134,
-0.01928454264998436,
-0.3248778283596039,
0.03242114931344986,
0.08418914675712585,
-0.05107306316494942,
0.06346992403268814,
-0.1481117308139801,
0.09449680894613266,
-0.0638689249753952,
0.10233327001333237,
0.022800616919994354,
-0.05695301294326782,
0.2669196128845215,
0.1030333936214447,
0.10321331024169922,
-0.24111953377723694,
-0.0628768801689148,
0.07300859689712524,
0.09169825166463852,
-0.07679567486047745,
-0.07688906043767929,
-0.26173216104507446,
0.33394256234169006,
-0.09120228886604309,
-0.17819944024085999,
0.1648809015750885,
0.0898478627204895,
0.3029913306236267,
-0.04191257804632187,
0.10135941952466965,
0.10043705254793167,
0.2621605396270752,
0.16430813074111938,
0.04805481433868408,
0.25351014733314514,
-0.36180031299591064,
-0.010860525071620941,
0.1457659751176834,
-0.032185282558202744,
0.43929746747016907,
-0.11519990861415863,
-0.031824104487895966,
-0.005930714309215546,
-0.07889977097511292,
0.2529889941215515,
0.177058607339859,
0.2835730016231537,
-0.07936115562915802,
0.4447597563266754,
0.2781108021736145,
-0.030226092785596848,
0.013217709958553314,
0.4852692484855652,
-0.027127860113978386,
-0.14360302686691284,
0.13343267142772675,
-0.13156962394714355,
-0.032865215092897415,
-0.042011648416519165,
0.17011572420597076,
0.476870059967041,
0.08050227165222168,
0.02642315998673439,
-0.18265561759471893,
0.12067940831184387,
-0.06613996624946594,
0.10084129869937897,
0.14823555946350098,
0.49154970049858093,
-0.04561807960271835,
0.32800811529159546,
-0.026298169046640396,
0.020426593720912933,
-0.16830860078334808,
0.2249910980463028,
0.2838004529476166,
-0.10664737224578857,
0.15002502501010895,
-0.0864216759800911,
0.18995526432991028,
-0.31731095910072327,
-0.05300753191113472,
0.05692494660615921,
-0.20112773776054382,
-0.17217570543289185,
0.20131699740886688,
0.008329860866069794,
0.1018986701965332,
0.19171355664730072,
-0.21703271567821503,
-0.042420901358127594,
-0.10563486069440842,
-0.022011712193489075,
-0.3020038902759552,
-0.036627888679504395,
-0.02457595244050026,
0.3743671774864197,
-0.009752275422215462,
0.2599737346172333,
0.12290657311677933,
-0.4351429343223572,
-0.03185488283634186,
0.014642849564552307,
-0.13405269384384155,
-0.17550556361675262,
0.038561806082725525,
-0.23286035656929016,
0.29028257727622986,
-0.07135175168514252,
-0.1962248831987381,
0.27035069465637207,
-0.6561155915260315,
0.00647796131670475,
-0.05686467885971069,
-0.1580042541027069,
-0.3678792119026184,
-0.04832465574145317,
-0.15013498067855835,
-0.17911790311336517,
-0.16628141701221466,
0.31948763132095337,
-0.11825330555438995,
0.35048621892929077,
-0.019389450550079346,
0.106748066842556,
0.05651494115591049,
0.11344320327043533,
-0.18439410626888275,
-0.18362969160079956,
-0.26516488194465637,
0.18305332958698273,
0.053322188556194305,
-0.08655893802642822,
-0.23103447258472443,
-0.033655501902103424,
-0.10356396436691284,
0.24715393781661987,
-0.391321063041687,
0.17524923384189606,
-0.5987241864204407,
0.2207241654396057,
0.0769207701086998,
0.2120436131954193,
0.3499598205089569,
-0.11782107502222061,
-0.06933131814002991,
-0.14903485774993896,
-0.29493042826652527,
-0.0052092596888542175,
0.23136600852012634,
-0.0322883203625679,
0.11101548373699188,
0.5043969750404358,
-0.06534380465745926,
0.6194151639938354,
0.40531599521636963,
-0.06005600467324257,
0.0572076290845871,
0.08083793520927429,
-0.13932062685489655,
-0.266507625579834,
-0.3724047541618347,
0.036068107932806015,
-0.3106938898563385,
-0.3482810854911804,
0.25954943895339966,
-0.07797098904848099,
-0.4955923855304718,
0.037873588502407074,
0.05699821934103966,
-0.23546934127807617,
-0.08127003908157349,
0.10770415514707565,
-0.039810679852962494,
0.28362736105918884,
0.045127566903829575,
0.09517375379800797,
-0.4651485085487366,
-0.08073616027832031,
0.03910653293132782,
-0.37010329961776733,
0.36408179998397827,
-0.2868105173110962,
-0.16817735135555267,
0.16316446661949158,
-0.5535621047019958,
0.2083931863307953,
0.07541030645370483,
0.18698576092720032,
0.013767387717962265,
0.14909574389457703,
0.30381304025650024,
0.14981324970722198,
0.7473876476287842,
-0.04802302271127701,
0.10537949204444885,
-0.007220551371574402,
-0.1870795488357544,
-0.5962149500846863,
-0.025959495455026627,
-0.023160813376307487,
0.4650937020778656,
0.6051086187362671,
0.3453218936920166,
-0.14463752508163452,
-0.027718976140022278,
-0.15871471166610718,
0.24467866122722626,
0.020606111735105515,
-0.27956703305244446,
-0.09738865494728088,
-0.15633200109004974,
-0.13718794286251068,
0.1207817792892456,
-0.11329440027475357,
-0.0592598132789135,
0.04479014128446579,
-0.25019216537475586,
0.17663449048995972,
0.22513866424560547,
0.10857981443405151,
0.13322713971138,
0.23695221543312073,
0.07922805845737457,
0.5708371996879578,
0.21875709295272827,
0.14663687348365784,
-0.004640674218535423,
0.35543447732925415,
-0.12927260994911194,
0.21391561627388,
0.18141376972198486,
-0.002803277224302292,
0.20905283093452454,
0.42995432019233704,
-0.04065534099936485,
0.05226024240255356,
-0.13658855855464935,
0.21627895534038544,
-0.2567059397697449,
-0.12188433855772018,
0.5087291598320007,
0.26507097482681274,
-0.4859509766101837,
-0.5629429817199707,
0.2916390001773834,
0.2924589514732361,
-0.3801584243774414,
0.6399799585342407,
-0.8032803535461426,
-0.033047206699848175,
0.4559309482574463,
-0.0678519681096077,
0.6946918368339539,
-0.2801561951637268,
-0.1290726214647293,
-0.13509419560432434,
0.10647548735141754,
-0.12220869958400726,
0.2674117088317871,
0.20525340735912323,
-0.2929270565509796,
-0.10096173733472824,
0.20860813558101654,
-0.26845648884773254,
0.055134039372205734,
0.19811595976352692,
-0.006249934434890747,
0.060606565326452255,
-0.04087763652205467,
0.041520655155181885,
-0.25432702898979187,
0.06504032760858536,
0.47011247277259827,
-0.33017998933792114,
-0.11928211152553558,
0.08435452729463577,
0.12719330191612244,
0.2608579099178314,
0.019753675907850266,
-0.09184040874242783,
-0.21892227232456207,
-0.1566542237997055,
-0.1526545286178589,
0.0026954319328069687,
-0.3488568961620331,
0.3472249507904053,
-0.051261696964502335,
0.10781818628311157,
0.15189412236213684,
0.14028260111808777,
-0.17926068603992462,
0.12579363584518433,
-0.08361918479204178,
0.16624419391155243,
0.2662297785282135,
0.3825933635234833,
0.2885950803756714,
-0.23262432217597961,
-0.17205069959163666,
0.04505840688943863,
-0.08837097138166428,
-0.15237313508987427,
-0.11403533071279526,
-0.16037829220294952,
-0.4679456055164337,
0.5018330812454224,
0.09437255561351776,
0.10715974867343903,
-0.4344457983970642,
0.2077491283416748,
-0.015878817066550255,
-0.18385453522205353,
0.07037007808685303,
0.1551688015460968,
0.1048135980963707,
0.7553776502609253,
-0.4236602485179901,
-0.39012661576271057,
-0.0019801296293735504,
0.21986642479896545,
0.29527127742767334,
0.11239828169345856,
0.33432719111442566,
0.17121350765228271,
-0.22222626209259033,
-0.08669988811016083,
0.10483793169260025,
-0.07976037263870239,
-0.28043970465660095,
0.20561276376247406,
-0.283407062292099,
0.029771700501441956,
0.293741911649704,
-0.006089184433221817,
-0.18746459484100342,
0.062297798693180084,
-0.12301893532276154,
-0.17063072323799133,
-0.220382958650589,
-0.18455971777439117,
-0.09444770216941833,
-0.032084476202726364,
-0.14172697067260742,
0.11710749566555023,
0.034649163484573364,
0.5534899830818176,
-0.21059320867061615,
0.08604522794485092,
0.14535532891750336,
0.20148278772830963,
0.031229794025421143,
-0.05784512311220169,
0.15171284973621368,
-0.1721322387456894,
0.015697339549660683,
0.16627824306488037,
-0.09272544831037521,
-0.15893417596817017,
0.00919485092163086,
0.17616179585456848,
-0.2031957507133484,
-0.3424268364906311,
0.223915234208107,
-0.31778818368911743,
0.03689529746770859,
-0.40578964352607727,
0.20864081382751465,
0.3461664319038391,
-0.02361629158258438,
-0.4323786795139313,
0.3018781542778015,
-0.08849895745515823,
0.11206290125846863,
0.2977086007595062,
-0.42483052611351013,
-0.026887476444244385,
0.02347913198173046,
0.0996796190738678,
0.35001301765441895,
-0.11383992433547974,
0.00873802974820137,
-0.18230575323104858,
0.2913300096988678,
0.21992745995521545,
0.38046833872795105,
-0.25748246908187866,
0.06624031066894531,
0.48244595527648926,
0.25242266058921814,
0.24042628705501556,
-0.013744363561272621,
-0.06941727548837662,
0.1133243590593338,
0.11856291443109512,
-0.08609919250011444,
-0.1395343840122223,
0.6526377201080322,
0.08326401561498642,
0.019928257912397385,
0.03203260898590088,
0.18435993790626526,
0.0023584067821502686,
-0.47839903831481934,
0.08494623750448227,
0.15649102628231049,
-0.2350761741399765,
0.11054965853691101,
0.3106343150138855,
0.18981245160102844,
-0.12930463254451752,
0.2571066617965698,
-0.013938277959823608,
0.06224636361002922,
0.36699700355529785,
0.22169896960258484,
0.23678717017173767,
0.22450405359268188,
0.10352854430675507,
0.025109950453042984,
-0.3650440275669098,
0.04512690752744675,
0.24239079654216766,
-0.38083532452583313,
0.11611288040876389,
0.16583463549613953,
0.20061112940311432,
-0.3007858395576477,
-0.2111152857542038,
-0.24137751758098602,
0.2320920079946518,
-0.2003004550933838,
-0.17536157369613647,
0.13622988760471344,
-0.0020118877291679382,
0.15665453672409058,
0.14072266221046448,
-0.12133866548538208,
0.011222012341022491,
0.511305570602417,
0.13516443967819214,
-0.06663361191749573,
-0.1406535655260086,
-0.42486926913261414,
-0.0930650606751442,
0.2990780174732208,
-0.30267924070358276,
0.011995146051049232,
-0.3216847777366638,
-0.17415790259838104,
-0.27001136541366577,
0.23035699129104614,
0.4243108034133911,
0.5783432722091675,
-0.06386715173721313,
0.059404339641332626,
0.038775861263275146,
0.05868282914161682,
-0.15159764885902405,
0.3526741862297058,
-0.1530967801809311,
0.17936961352825165,
0.0488220639526844,
-0.01885005459189415,
-0.17617852985858917,
-0.09273670613765717,
-0.01010996475815773,
0.245830699801445,
0.16291625797748566,
0.14760521054267883,
-0.24014505743980408,
-0.22765788435935974,
-0.04304535686969757,
0.04359317943453789,
-0.10897025465965271,
-0.1449202299118042,
0.45271944999694824,
-0.40463465452194214,
0.10823303461074829,
-0.15273095667362213,
0.0367451049387455,
-0.3230801820755005,
0.44219738245010376,
0.17696696519851685,
0.21708032488822937,
-0.42744749784469604,
-0.1645277440547943,
-0.4656025767326355,
0.09451955556869507,
-0.6270415186882019,
0.3479110896587372,
0.01844419352710247,
0.11367778480052948,
-0.04411538690328598,
0.018159711733460426,
0.19380316138267517,
-0.07540620118379593,
-0.16705137491226196,
0.2149128019809723,
-0.2346523255109787,
0.07658848166465759,
-0.353376567363739,
-0.10580269992351532,
0.15172713994979858,
-0.4540382921695709,
0.3884381055831909,
-0.3258294463157654,
0.04707367718219757,
-0.18079917132854462,
0.10867322981357574,
0.13006813824176788,
0.17818017303943634,
0.5276603102684021,
0.4160919785499573,
0.28754085302352905,
-0.15324775874614716,
-0.03576620668172836,
-0.20497605204582214,
-0.20769380033016205,
-0.09868982434272766,
0.1539008915424347,
0.10994260013103485,
0.15922966599464417,
-0.23255574703216553,
-0.06403154134750366,
-0.2706332802772522,
0.008994415402412415,
-0.11663711816072464,
0.15784423053264618,
0.07798618823289871,
-0.29596760869026184,
-0.18357491493225098,
0.24458558857440948,
0.058540087193250656,
0.2674301862716675,
0.05000946670770645,
0.07097052782773972,
-0.15087547898292542,
-0.1668473184108734,
0.3609437942504883,
-0.5754396319389343,
-0.387136310338974,
-0.3030741214752197,
0.23701785504817963,
-0.0861412063241005,
0.13555525243282318,
-0.006056159734725952,
-0.1824791431427002,
0.2757090926170349,
0.0892307385802269,
-0.2111138105392456,
0.08285252749919891,
-0.2617936432361603,
-0.027741778641939163,
0.05137748643755913,
0.04879223555326462,
0.056432418525218964,
-0.550563395023346,
0.24569663405418396,
-0.11783147603273392
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Hi @albertvillanova, thanks for the reply. I just tried the new version and the problem still persists.
Do I need to rebuild the saved dataset (which I load from disk) with the 1.6.0 version of datasets? My script loads this dataset and creates new datasets from it. I tried it without rebuilding.
See this short video of what happens. It does not create all processes at the same time:
https://user-images.githubusercontent.com/2743060/115720139-0da3a500-a37d-11eb-833a-9bbacc70868d.mp4
| ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 70 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Hi @albertvillanova, thanks for the reply. I just tried the new version and the problem still persists.
Do I need to rebuild the saved dataset (which I load from disk) with the 1.6.0 version of datasets? My script loads this dataset and creates new datasets from it. I tried it without rebuilding.
See this short video of what happens. It does not create all processes at the same time:
https://user-images.githubusercontent.com/2743060/115720139-0da3a500-a37d-11eb-833a-9bbacc70868d.mp4
| [
-0.3630146086215973,
-0.33556944131851196,
-0.08693204820156097,
0.2914976477622986,
0.004804924130439758,
0.08502497524023056,
0.20765304565429688,
0.39800554513931274,
0.43489429354667664,
-0.008964091539382935,
0.21259452402591705,
0.2832149863243103,
-0.025046374648809433,
-0.2042585015296936,
-0.19746577739715576,
0.1578703224658966,
0.12236393988132477,
-0.0891837626695633,
-0.012901127338409424,
-0.19425442814826965,
-0.3704569637775421,
-0.06112408638000488,
-0.1589694321155548,
-0.03339909017086029,
-0.20355799794197083,
-0.2246251106262207,
0.003142116591334343,
0.16731756925582886,
-0.027862874791026115,
-0.38020360469818115,
-0.022284910082817078,
0.03467836230993271,
-0.21731969714164734,
0.967049777507782,
-0.00011795578029705212,
-0.034696705639362335,
0.2712252736091614,
0.23298969864845276,
0.07767236232757568,
0.04692688584327698,
-0.17147232592105865,
-0.32235702872276306,
0.10622545331716537,
-0.19209334254264832,
0.2716531455516815,
-0.0017312942072749138,
0.020662475377321243,
-0.6094626784324646,
0.2712439000606537,
-0.07791757583618164,
0.13231338560581207,
0.11934415996074677,
-0.4176822602748871,
-0.11018593609333038,
0.00988902896642685,
0.04436943307518959,
-0.02373487502336502,
0.22115759551525116,
0.4696221649646759,
-0.1314190775156021,
-0.1615545153617859,
0.167017862200737,
-0.42163732647895813,
0.26600131392478943,
0.07063515484333038,
0.0413721427321434,
0.4938417077064514,
-0.566513180732727,
0.3148689270019531,
0.19815969467163086,
0.0256941020488739,
0.024191565811634064,
-0.09962794184684753,
-0.359322190284729,
-0.3677814304828644,
0.0037666577845811844,
0.03524870052933693,
0.10157386213541031,
-0.17807245254516602,
-0.2604909837245941,
-0.5100274682044983,
-0.014279652386903763,
0.23919084668159485,
0.010140545666217804,
0.07630003988742828,
0.005841612815856934,
0.14507585763931274,
0.2875225245952606,
0.35234785079956055,
0.1838090866804123,
0.11862510442733765,
-0.30466750264167786,
0.005790218710899353,
0.2401406168937683,
-0.41557639837265015,
0.15198756754398346,
0.4824933111667633,
0.027934718877077103,
0.08711748570203781,
-0.4267270565032959,
-0.08991120755672455,
0.057583246380090714,
0.1102226972579956,
0.038542240858078,
0.33328917622566223,
-0.08989949524402618,
-0.023903362452983856,
0.16511785984039307,
0.4020155668258667,
-0.2371513843536377,
-0.39673912525177,
0.17321166396141052,
0.028435826301574707,
-0.5089075565338135,
0.1731099784374237,
0.016015660017728806,
0.058451563119888306,
-0.007379475980997086,
-0.050387654453516006,
-0.06989501416683197,
-0.12877026200294495,
-0.2418861985206604,
0.11578048020601273,
0.348116397857666,
-0.09905484318733215,
0.28441914916038513,
-0.12214575707912445,
-0.15110154449939728,
-0.3075760304927826,
0.2642686069011688,
-0.10045906901359558,
-0.3427417278289795,
-0.31307703256607056,
0.1872941106557846,
0.10272571444511414,
-0.32539448142051697,
0.10088878124952316,
0.3663766384124756,
-0.32385802268981934,
-0.14054077863693237,
0.16407042741775513,
-0.3921980857849121,
0.03711480274796486,
0.03625921905040741,
0.10153122246265411,
0.5760559439659119,
0.061711493879556656,
0.35597848892211914,
-0.20525068044662476,
0.35548722743988037,
-0.5027270913124084,
-0.1576424092054367,
0.17600560188293457,
0.056175488978624344,
-0.061003319919109344,
0.26254135370254517,
-0.23064446449279785,
0.07710327208042145,
0.33700424432754517,
-0.269849568605423,
-0.3164976239204407,
-0.16214708983898163,
-0.2763831615447998,
-0.3266088366508484,
-0.1250043511390686,
0.485592782497406,
-0.09692135453224182,
0.09264186024665833,
-0.24999456107616425,
0.10780937969684601,
0.4460744261741638,
0.579275906085968,
-0.2000684291124344,
0.3872780203819275,
-0.22333554923534393,
-0.08582425117492676,
0.11057457327842712,
0.10914303362369537,
-0.371158629655838,
0.627905011177063,
-0.21070820093154907,
0.02520892210304737,
-0.030222095549106598,
0.21418319642543793,
0.43519672751426697,
-0.23006393015384674,
0.1898132562637329,
0.21363958716392517,
-0.07156648486852646,
0.391941100358963,
-0.35676851868629456,
-0.12343478947877884,
0.119962178170681,
-0.06861869990825653,
0.071212038397789,
0.11285556852817535,
0.14666593074798584,
-0.37489011883735657,
0.34195929765701294,
-0.08139128983020782,
0.07501687109470367,
0.23277431726455688,
0.0045926012098789215,
-0.06402486562728882,
0.025402380153536797,
0.040882714092731476,
-0.19039002060890198,
0.19501087069511414,
-0.040265168994665146,
-0.29264312982559204,
0.09487327188253403,
0.05260457843542099,
-0.09636442363262177,
0.014737540856003761,
-0.1551768183708191,
0.09351152181625366,
-0.08173707127571106,
0.22899095714092255,
0.044457774609327316,
-0.08178866654634476,
0.19540958106517792,
0.06435112655162811,
0.1163240373134613,
-0.2580950856208801,
-0.10736890137195587,
0.11229370534420013,
0.036502689123153687,
-0.15780915319919586,
-0.04450397565960884,
-0.24715054035186768,
0.289620041847229,
-0.08994370698928833,
-0.12576842308044434,
0.15439333021640778,
0.09858157485723495,
0.35157179832458496,
-0.08587335795164108,
0.06584763526916504,
0.08801194280385971,
0.3965591788291931,
0.1759849488735199,
0.0508553571999073,
0.26386046409606934,
-0.3270404040813446,
0.029637325555086136,
0.18322451412677765,
0.04147476702928543,
0.4627261757850647,
-0.022316794842481613,
-0.011606547050178051,
-0.007632389664649963,
-0.05962969735264778,
0.23569539189338684,
0.10060372948646545,
0.28563523292541504,
0.017468200996518135,
0.46513107419013977,
0.2683872878551483,
-0.008342690765857697,
0.09785234928131104,
0.5448833107948303,
-0.03847236931324005,
-0.14506447315216064,
0.16891810297966003,
-0.0935995802283287,
-0.07275450229644775,
-0.1138981282711029,
0.15754899382591248,
0.4817345142364502,
0.07906728982925415,
0.028986867517232895,
-0.16876226663589478,
0.155960813164711,
-0.05800631642341614,
0.07188817113637924,
0.1646239012479782,
0.6082305312156677,
0.043582312762737274,
0.3211418092250824,
-0.031171508133411407,
-0.04588551074266434,
-0.18599022924900055,
0.28908711671829224,
0.2805093228816986,
-0.12943506240844727,
0.15338993072509766,
-0.04612351208925247,
0.2741509675979614,
-0.29022282361984253,
-0.08804789930582047,
0.07539220154285431,
-0.23807820677757263,
-0.19740670919418335,
0.22842192649841309,
-0.002908734604716301,
0.1274893581867218,
0.1828673928976059,
-0.1537572592496872,
-0.09238582849502563,
-0.000026866793632507324,
-0.04892740771174431,
-0.3085847795009613,
-0.03684080392122269,
-0.03624773770570755,
0.3555818200111389,
-0.05315227434039116,
0.2529764473438263,
0.1141381785273552,
-0.4489085078239441,
-0.0389912948012352,
-0.006828173995018005,
-0.09054137766361237,
-0.17390047013759613,
-0.02529008500277996,
-0.18811756372451782,
0.27167806029319763,
-0.029089681804180145,
-0.20995859801769257,
0.26567938923835754,
-0.6992886662483215,
-0.06942175328731537,
-0.035769835114479065,
-0.18537209928035736,
-0.3714582622051239,
-0.06210304796695709,
-0.23397621512413025,
-0.16108372807502747,
-0.2183561474084854,
0.2947665750980377,
-0.06742480397224426,
0.37484627962112427,
-0.11499661952257156,
0.09592460840940475,
0.05734289810061455,
0.10134754329919815,
-0.17099080979824066,
-0.17483516037464142,
-0.23211239278316498,
0.15824545919895172,
-0.043994151055812836,
-0.11317746341228485,
-0.2476484626531601,
-0.1134028285741806,
-0.0751529186964035,
0.3227628469467163,
-0.34043043851852417,
0.13961973786354065,
-0.581543505191803,
0.17236945033073425,
0.052917156368494034,
0.21466779708862305,
0.4270578920841217,
-0.060847412794828415,
-0.0778912901878357,
-0.15489938855171204,
-0.3055676221847534,
-0.007854126393795013,
0.20527881383895874,
-0.00361468642950058,
0.06744183599948883,
0.5427404046058655,
-0.09264278411865234,
0.6695805191993713,
0.4467200040817261,
-0.07549558579921722,
0.04116702079772949,
0.026488130912184715,
-0.054748255759477615,
-0.32497602701187134,
-0.37883520126342773,
0.09156039357185364,
-0.27075982093811035,
-0.29351097345352173,
0.2437548041343689,
-0.11725456267595291,
-0.4212989807128906,
0.04391252249479294,
0.031234484165906906,
-0.2758793234825134,
-0.12138420343399048,
0.11628571897745132,
-0.09705774486064911,
0.3035878837108612,
0.03172403201460838,
0.141781747341156,
-0.4291802644729614,
-0.009330586530268192,
0.0107621680945158,
-0.30430835485458374,
0.4023873507976532,
-0.2962890565395355,
-0.15519705414772034,
0.30990779399871826,
-0.6096821427345276,
0.2347208559513092,
0.08064188808202744,
0.1860005110502243,
0.07096454501152039,
0.10709070414304733,
0.27775710821151733,
0.10595543682575226,
0.7209104299545288,
-0.07908273488283157,
0.02119048312306404,
0.041227180510759354,
-0.2007647603750229,
-0.6698825359344482,
-0.004952955991029739,
-0.012717925012111664,
0.4702882170677185,
0.6730165481567383,
0.33517810702323914,
-0.16381263732910156,
-0.03261741250753403,
-0.139562726020813,
0.27001529932022095,
-0.014502912759780884,
-0.24990688264369965,
-0.16225410997867584,
-0.20937952399253845,
-0.196888729929924,
0.028748951852321625,
-0.1429501175880432,
-0.014325080439448357,
0.060707755386829376,
-0.24088387191295624,
0.09200967848300934,
0.1469639539718628,
0.11340514570474625,
0.12142670154571533,
0.2578725218772888,
0.09832900017499924,
0.5815178155899048,
0.17978984117507935,
0.07006028294563293,
0.05157767981290817,
0.405794233083725,
-0.12790273129940033,
0.15457499027252197,
0.25079479813575745,
-0.0008212840184569359,
0.20904594659805298,
0.4520728290081024,
0.014489543624222279,
-0.0029069483280181885,
-0.09884302318096161,
0.19220352172851562,
-0.19402958452701569,
-0.11734317243099213,
0.42560818791389465,
0.1710866391658783,
-0.47262391448020935,
-0.5922849178314209,
0.2535351812839508,
0.25360336899757385,
-0.3607656955718994,
0.6391515731811523,
-0.7487564086914062,
-0.018329046666622162,
0.4669685959815979,
0.002820231020450592,
0.7358861565589905,
-0.2567673921585083,
-0.04183722659945488,
-0.10008970648050308,
0.08245931565761566,
-0.11979106068611145,
0.4190858006477356,
0.25962263345718384,
-0.37225934863090515,
-0.08042851090431213,
0.22138239443302155,
-0.2510465085506439,
0.07350895553827286,
0.17872264981269836,
0.012332025915384293,
0.08083678781986237,
-0.039668016135692596,
-0.02999849244952202,
-0.2865656614303589,
0.12443520128726959,
0.3993237018585205,
-0.3570461869239807,
-0.06434673070907593,
0.06372079253196716,
0.12338322401046753,
0.2416667640209198,
0.029614165425300598,
-0.08552424609661102,
-0.17524172365665436,
-0.13491562008857727,
-0.1914401352405548,
-0.01515035517513752,
-0.38845911622047424,
0.337482213973999,
-0.03569057956337929,
-0.0010971426963806152,
0.1039380431175232,
0.10016831755638123,
-0.18673647940158844,
0.10027758032083511,
-0.04992463439702988,
0.15012489259243011,
0.23665305972099304,
0.3369305729866028,
0.2823450565338135,
-0.2218933254480362,
-0.1344577670097351,
0.030493713915348053,
-0.0960112065076828,
-0.23803389072418213,
-0.11035234481096268,
-0.19368498027324677,
-0.46306613087654114,
0.4645531177520752,
0.0995129942893982,
0.07695881277322769,
-0.4267888367176056,
0.20483845472335815,
-0.1343344748020172,
-0.19006681442260742,
0.047778673470020294,
0.14048676192760468,
0.14485037326812744,
0.7204338312149048,
-0.44952085614204407,
-0.36759263277053833,
-0.036261748522520065,
0.2923370599746704,
0.3315471112728119,
0.0463176891207695,
0.38319650292396545,
0.12381239235401154,
-0.19573496282100677,
-0.11851496994495392,
0.09984401613473892,
-0.027135735377669334,
-0.23876649141311646,
0.27414318919181824,
-0.29057028889656067,
-0.001850217580795288,
0.34367629885673523,
0.015529759228229523,
-0.20627005398273468,
0.12243056297302246,
-0.1491796374320984,
-0.15169978141784668,
-0.2442891150712967,
-0.18425165116786957,
-0.0479683019220829,
0.006431475281715393,
-0.15022730827331543,
0.09695717692375183,
0.061456382274627686,
0.49714523553848267,
-0.20896753668785095,
0.06485026329755783,
0.19686739146709442,
0.18990173935890198,
0.024665987119078636,
-0.13595595955848694,
0.13534952700138092,
-0.1885117143392563,
0.016304662451148033,
0.1631898134946823,
-0.09099693596363068,
-0.11946944892406464,
0.010755378752946854,
0.18425191938877106,
-0.2022349238395691,
-0.2798933684825897,
0.18416406214237213,
-0.251542329788208,
-0.012524332851171494,
-0.4043358564376831,
0.21535111963748932,
0.39100182056427,
-0.09117794036865234,
-0.41165339946746826,
0.2231803834438324,
-0.12140975147485733,
0.1379813700914383,
0.23273859918117523,
-0.4405066668987274,
0.021924465894699097,
0.027414463460445404,
0.11549736559391022,
0.40321171283721924,
-0.11320074647665024,
0.003511992748826742,
-0.14949989318847656,
0.2916158139705658,
0.23764976859092712,
0.4089943468570709,
-0.2148100882768631,
0.0811433494091034,
0.47901806235313416,
0.25298482179641724,
0.37152954936027527,
-0.021607644855976105,
-0.07514995336532593,
0.0790516585111618,
0.10533176362514496,
-0.09863734245300293,
-0.11804073303937912,
0.5559917092323303,
0.01726139336824417,
0.022323433309793472,
0.08150078356266022,
0.11090023815631866,
-0.07340922951698303,
-0.46442127227783203,
0.13098040223121643,
0.1541842818260193,
-0.3088000416755676,
0.16407206654548645,
0.23526084423065186,
0.21347002685070038,
-0.132698655128479,
0.32341161370277405,
-0.010467298328876495,
0.06131032109260559,
0.3002293109893799,
0.19016703963279724,
0.282036691904068,
0.15834754705429077,
0.10978447645902634,
0.012935608625411987,
-0.39173251390457153,
0.07785538583993912,
0.19758889079093933,
-0.3711404800415039,
0.12100376933813095,
0.18779176473617554,
0.1419266015291214,
-0.31785789132118225,
-0.20404912531375885,
-0.2610985040664673,
0.20472276210784912,
-0.22308248281478882,
-0.1804419904947281,
0.0873599573969841,
-0.006922543048858643,
0.1763296127319336,
0.16094888746738434,
-0.1104954183101654,
0.013672582805156708,
0.5182117223739624,
0.14193576574325562,
-0.09557300806045532,
-0.13005705177783966,
-0.3889627456665039,
-0.10988213866949081,
0.3121519088745117,
-0.30085325241088867,
0.05236279219388962,
-0.2596472501754761,
-0.12287847697734833,
-0.2750818431377411,
0.34634077548980713,
0.4599645435810089,
0.652757465839386,
-0.012410717085003853,
0.06084723398089409,
0.07105904817581177,
0.05078335851430893,
-0.16796760261058807,
0.3546046316623688,
-0.06403589248657227,
0.2595692276954651,
0.05311601236462593,
-0.03219040483236313,
-0.15252599120140076,
-0.05211714282631874,
-0.02385052666068077,
0.20688439905643463,
0.16586948931217194,
0.2682730555534363,
-0.23953598737716675,
-0.2659415900707245,
-0.01722947135567665,
0.12278328835964203,
-0.1800326704978943,
-0.23282967507839203,
0.4231393039226532,
-0.4261634349822998,
0.12129312008619308,
-0.20078438520431519,
0.03584204986691475,
-0.2684953808784485,
0.454571008682251,
0.1397159993648529,
0.14880412817001343,
-0.4117129445075989,
-0.0982581302523613,
-0.4501786530017853,
0.04937300831079483,
-0.5862388610839844,
0.38148534297943115,
-0.03461778908967972,
0.17834937572479248,
-0.047356314957141876,
-0.00813266634941101,
0.16283737123012543,
-0.04437470808625221,
-0.2253892421722412,
0.19401168823242188,
-0.2575010657310486,
0.06050998717546463,
-0.3014991879463196,
-0.16966664791107178,
0.17186376452445984,
-0.4466186761856079,
0.3505326509475708,
-0.35871008038520813,
0.05643872171640396,
-0.11261984705924988,
0.08891652524471283,
0.13751046359539032,
0.1427408754825592,
0.5240486860275269,
0.48211997747421265,
0.24633611738681793,
-0.22123309969902039,
-0.12444917112588882,
-0.29738831520080566,
-0.22011637687683105,
-0.13314637541770935,
0.19749689102172852,
0.18636880815029144,
0.1875920295715332,
-0.22957399487495422,
-0.0875498354434967,
-0.28074923157691956,
-0.031283315271139145,
-0.12664112448692322,
0.22730545699596405,
0.14012585580348969,
-0.2672666013240814,
-0.11478586494922638,
0.24757632613182068,
0.08455722033977509,
0.3016544580459595,
0.04400832578539848,
0.07860397547483444,
-0.2230159491300583,
-0.13860267400741577,
0.3557646572589874,
-0.4948846995830536,
-0.3726123571395874,
-0.32322394847869873,
0.31766608357429504,
-0.06975158303976059,
0.11088438332080841,
-0.06450088322162628,
-0.14004072546958923,
0.2673555612564087,
0.04453969746828079,
-0.24837827682495117,
0.10952441394329071,
-0.29172128438949585,
-0.05582380294799805,
0.0421827994287014,
0.0037174001336097717,
0.07953973114490509,
-0.6037824153900146,
0.21046531200408936,
-0.11662319302558899
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | There can be a bit of delay between the creations of the processes but this delay should be the same for both your `map` calls. We should look into this.
Also if you hav some code that reproduces this issue on google colab that'd be really useful !
Regarding the speed differences:
This looks like a similar issue as https://github.com/huggingface/datasets/issues/1992 who is experiencing the same speed differences between processes.
This is a known bug that we are investigating. As of now I've never managed to reproduce it on my machine so it's pretty hard for me to find where this issue comes from.
| ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 103 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
There can be a bit of delay between the creations of the processes but this delay should be the same for both your `map` calls. We should look into this.
Also if you hav some code that reproduces this issue on google colab that'd be really useful !
Regarding the speed differences:
This looks like a similar issue as https://github.com/huggingface/datasets/issues/1992 who is experiencing the same speed differences between processes.
This is a known bug that we are investigating. As of now I've never managed to reproduce it on my machine so it's pretty hard for me to find where this issue comes from.
| [
-0.31948596239089966,
-0.4774059057235718,
-0.07475784420967102,
0.3302202820777893,
-0.0672009289264679,
0.041248731315135956,
0.2097332775592804,
0.3263498544692993,
0.4367236793041229,
0.029365524649620056,
0.24169370532035828,
0.3490331768989563,
0.019093399867415428,
-0.038851264864206314,
-0.13650327920913696,
0.005576580762863159,
0.17336970567703247,
-0.11914362013339996,
0.016522377729415894,
-0.13762818276882172,
-0.2373456358909607,
0.004325555637478828,
-0.19679412245750427,
-0.01592545211315155,
-0.16994410753250122,
-0.22581830620765686,
-0.024121560156345367,
0.08334531635046005,
0.018046770244836807,
-0.35018375515937805,
0.016537832096219063,
0.009158913046121597,
-0.1990930289030075,
0.9538556933403015,
-0.00011991208157269284,
-0.09843111783266068,
0.24153012037277222,
0.31964996457099915,
0.08687600493431091,
0.08232879638671875,
-0.20883482694625854,
-0.342972993850708,
0.12312141805887222,
-0.21949096024036407,
0.18177667260169983,
0.04895802214741707,
-0.005466708913445473,
-0.478477418422699,
0.29124945402145386,
-0.14007413387298584,
0.12267948687076569,
0.12240828573703766,
-0.4304051697254181,
-0.11700674146413803,
0.06437255442142487,
0.013684473931789398,
-0.0449962392449379,
0.2221289724111557,
0.5488749146461487,
-0.14463414251804352,
-0.11351724714040756,
0.17872057855129242,
-0.4208793640136719,
0.32481157779693604,
0.15503564476966858,
0.14889447391033173,
0.41243690252304077,
-0.5443952083587646,
0.25429579615592957,
0.24394339323043823,
0.06423505395650864,
0.0644446611404419,
-0.06997204571962357,
-0.45248207449913025,
-0.4557456374168396,
-0.05052553862333298,
0.15262237191200256,
0.11175481230020523,
-0.20066559314727783,
-0.2737899422645569,
-0.5146389603614807,
0.09253978729248047,
0.24865391850471497,
0.049620650708675385,
-0.03544467315077782,
0.05549251660704613,
0.08456243574619293,
0.2981019914150238,
0.3523458242416382,
0.10110131651163101,
0.017535962164402008,
-0.3595077693462372,
0.05855270475149155,
0.301678329706192,
-0.42956817150115967,
0.06511741876602173,
0.46972814202308655,
0.08746667206287384,
0.05633571743965149,
-0.3640021085739136,
-0.11275629699230194,
-0.025833699852228165,
-0.06371337920427322,
0.12328457087278366,
0.369984894990921,
0.06358428299427032,
-0.09902671724557877,
0.15809163451194763,
0.4498119354248047,
-0.20645299553871155,
-0.39553868770599365,
0.20267415046691895,
0.09949003905057907,
-0.5509961843490601,
0.1231861412525177,
0.0072417836636304855,
-0.006132761016488075,
-0.12707477807998657,
-0.07324153929948807,
-0.09960880875587463,
-0.14796195924282074,
-0.2157738357782364,
0.17603282630443573,
0.31180086731910706,
-0.17201097309589386,
0.13902625441551208,
-0.17802220582962036,
-0.10643668472766876,
-0.2601938545703888,
0.209625706076622,
-0.10995811969041824,
-0.3654552400112152,
-0.3169786334037781,
0.2297673374414444,
0.09192422032356262,
-0.2789958119392395,
0.06325538456439972,
0.4462323784828186,
-0.29746097326278687,
-0.12878108024597168,
0.19206762313842773,
-0.44552263617515564,
0.019283100962638855,
0.017779115587472916,
0.06311061978340149,
0.5827057361602783,
0.06413557380437851,
0.2910841107368469,
-0.28704386949539185,
0.35294872522354126,
-0.5255615711212158,
-0.10475029796361923,
0.24700720608234406,
0.0056426674127578735,
-0.09702318906784058,
0.2554522156715393,
-0.37248581647872925,
0.15634116530418396,
0.24684864282608032,
-0.2550654411315918,
-0.2419193983078003,
-0.15947853028774261,
-0.3996346592903137,
-0.3362621068954468,
-0.10383176058530807,
0.4296420216560364,
-0.13610771298408508,
0.014507897198200226,
-0.2160128802061081,
0.1814294308423996,
0.44970354437828064,
0.6606142520904541,
-0.24190272390842438,
0.40565991401672363,
-0.22014261782169342,
-0.04635341092944145,
-0.011175446212291718,
0.04014245793223381,
-0.2736549973487854,
0.700941801071167,
-0.2806133031845093,
0.09929829090833664,
-0.08186077326536179,
0.21875441074371338,
0.37994664907455444,
-0.2457379549741745,
0.2991667091846466,
0.32185614109039307,
-0.0316920205950737,
0.4197547435760498,
-0.3054514229297638,
-0.15770773589611053,
0.15853776037693024,
-0.08630159497261047,
-0.01911969855427742,
0.12471632659435272,
0.1028202474117279,
-0.4522359371185303,
0.30158060789108276,
-0.07584273815155029,
0.01833474263548851,
0.21892479062080383,
0.10227596759796143,
-0.06909424066543579,
-0.028585880994796753,
0.07355939596891403,
-0.11015068739652634,
0.2620704472064972,
-0.04026766121387482,
-0.23021909594535828,
0.04837685078382492,
0.09631559252738953,
-0.05155021324753761,
0.007933452725410461,
-0.1040668934583664,
0.09349320828914642,
-0.0941338986158371,
0.10837414115667343,
0.051148321479558945,
-0.030497511848807335,
0.2722039222717285,
0.1673213541507721,
0.1698072850704193,
-0.24064843356609344,
-0.09408840537071228,
0.1516321301460266,
0.11604355275630951,
-0.13406184315681458,
-0.07507842779159546,
-0.25949057936668396,
0.323490709066391,
-0.11876796931028366,
-0.18305888772010803,
0.10875189304351807,
0.0736614540219307,
0.3307231068611145,
0.004152275621891022,
0.14919540286064148,
0.17496632039546967,
0.283064067363739,
0.25051212310791016,
-0.023162756115198135,
0.2347990721464157,
-0.38157156109809875,
-0.05481623858213425,
0.20521196722984314,
-0.021836120635271072,
0.464354008436203,
-0.08364705741405487,
-0.08219537883996964,
-0.032065290957689285,
-0.05914464592933655,
0.2360590398311615,
0.17165224254131317,
0.29138854146003723,
-0.0511246882379055,
0.4382725656032562,
0.2802741825580597,
-0.06295431405305862,
0.09409815073013306,
0.5195208191871643,
0.0014683548361063004,
-0.17539244890213013,
0.13851767778396606,
-0.15146887302398682,
-0.06861379742622375,
-0.040151163935661316,
0.1637529730796814,
0.5669997334480286,
0.0724177286028862,
0.045568376779556274,
-0.14239370822906494,
0.11401580274105072,
-0.04651924595236778,
0.09074027091264725,
0.12301616370677948,
0.4285612106323242,
-0.07515066117048264,
0.34413912892341614,
0.009024436585605145,
0.03272627294063568,
-0.1939033418893814,
0.20611219108104706,
0.2143491804599762,
-0.09362705051898956,
0.1492776870727539,
-0.08330138027667999,
0.14069712162017822,
-0.37720999121665955,
-0.04027130454778671,
-0.04366571083664894,
-0.19075700640678406,
-0.21736058592796326,
0.2685175836086273,
0.024342242628335953,
0.05391703546047211,
0.2391970455646515,
-0.12735290825366974,
-0.130068838596344,
-0.10060716420412064,
-0.02425353229045868,
-0.32376599311828613,
-0.06824176758527756,
-0.04107385128736496,
0.3972000777721405,
0.023495743051171303,
0.23537155985832214,
0.06780160218477249,
-0.4454367756843567,
0.003033967688679695,
-0.04458753764629364,
-0.07158053666353226,
-0.18579517304897308,
0.1254250854253769,
-0.23036342859268188,
0.31923139095306396,
-0.10901029407978058,
-0.1898680031299591,
0.32589030265808105,
-0.61251300573349,
-0.0445978119969368,
-0.15522398054599762,
-0.15218158066272736,
-0.36600038409233093,
-0.03620975464582443,
-0.10757427662611008,
-0.163316011428833,
-0.1247296929359436,
0.37839579582214355,
-0.10274897515773773,
0.34129947423934937,
0.012991391122341156,
0.0697479099035263,
0.035846345126628876,
0.18797354400157928,
-0.09818149358034134,
-0.22705762088298798,
-0.2855248749256134,
0.09791618585586548,
-0.020262030884623528,
-0.10727870464324951,
-0.2148885279893875,
-0.027901727706193924,
-0.1364363580942154,
0.24907289445400238,
-0.43673843145370483,
0.09533663839101791,
-0.632481575012207,
0.22481954097747803,
0.1122124195098877,
0.18358518183231354,
0.36384040117263794,
-0.12438429147005081,
-0.04331531748175621,
-0.17752066254615784,
-0.4602481424808502,
-0.029975391924381256,
0.28923967480659485,
0.019462957978248596,
0.11562452465295792,
0.4566769301891327,
-0.1499716341495514,
0.6942936182022095,
0.37128302454948425,
-0.07455004751682281,
0.06248709559440613,
0.07173245400190353,
-0.12613750994205475,
-0.35538250207901,
-0.3348676860332489,
0.09749233722686768,
-0.29120421409606934,
-0.39325207471847534,
0.3314822316169739,
-0.05669328570365906,
-0.49545225501060486,
-0.011000905185937881,
0.05345534905791283,
-0.2503330409526825,
-0.13323906064033508,
0.0763656347990036,
0.09550197422504425,
0.2047004997730255,
0.05834999307990074,
0.060452163219451904,
-0.5040947198867798,
-0.06616117805242538,
-0.004187652375549078,
-0.2755478024482727,
0.32559213042259216,
-0.30123791098594666,
-0.17620159685611725,
0.09374237060546875,
-0.5581949353218079,
0.2284718155860901,
0.0903514102101326,
0.11527663469314575,
-0.0442056730389595,
0.10324952751398087,
0.3380587697029114,
0.1329393982887268,
0.7330361008644104,
-0.041895680129528046,
0.04367147758603096,
-0.026180075481534004,
-0.2548161745071411,
-0.5318095684051514,
-0.07102824747562408,
-0.02358025684952736,
0.43196001648902893,
0.5820279717445374,
0.3616739809513092,
-0.16069519519805908,
-0.0542592890560627,
-0.09872277081012726,
0.30227577686309814,
0.03902916982769966,
-0.2510150671005249,
-0.14595399796962738,
-0.14917856454849243,
-0.06765996664762497,
0.0988161712884903,
-0.1765548139810562,
-0.033134788274765015,
-0.008612117730081081,
-0.2094712108373642,
0.18044228851795197,
0.24429848790168762,
0.11388910561800003,
0.16928446292877197,
0.2778654098510742,
0.09196540713310242,
0.5838770270347595,
0.23335665464401245,
0.15035854279994965,
-0.02551242522895336,
0.3816791772842407,
-0.14567747712135315,
0.2088952362537384,
0.22135087847709656,
0.001761733554303646,
0.14076228439807892,
0.5219026803970337,
0.01682276278734207,
0.06167355924844742,
-0.09426728636026382,
0.1803191602230072,
-0.24762114882469177,
-0.1468977928161621,
0.4836447238922119,
0.30260226130485535,
-0.48021870851516724,
-0.5349168181419373,
0.30129414796829224,
0.3897212743759155,
-0.4364249110221863,
0.6425962448120117,
-0.8030803203582764,
-0.03487151116132736,
0.4852524399757385,
-0.11621963232755661,
0.7910179495811462,
-0.272652268409729,
-0.06406904757022858,
-0.09429428726434708,
0.10406595468521118,
-0.0798160657286644,
0.3242759108543396,
0.23511388897895813,
-0.31844550371170044,
-0.16845664381980896,
0.18731513619422913,
-0.30068880319595337,
0.04043794050812721,
0.14644593000411987,
-0.0381774976849556,
0.05715430900454521,
-0.03382665663957596,
0.06698287278413773,
-0.27813002467155457,
-0.015627320855855942,
0.47083863615989685,
-0.2859353721141815,
-0.1470903754234314,
0.06115679442882538,
0.11812223494052887,
0.3203129768371582,
0.0010163532570004463,
-0.0786055400967598,
-0.29987847805023193,
-0.12309034168720245,
-0.20788821578025818,
0.015003267675638199,
-0.35795143246650696,
0.29970109462738037,
-0.014496400952339172,
0.06862825155258179,
0.11349315941333771,
0.160199835896492,
-0.06639082729816437,
0.07207393646240234,
-0.10983629524707794,
0.1361836940050125,
0.28470712900161743,
0.4006177484989166,
0.2626701295375824,
-0.2824151813983917,
-0.13375112414360046,
0.04337967932224274,
-0.07404625415802002,
-0.21439245343208313,
-0.12051897495985031,
-0.1313815712928772,
-0.4387510120868683,
0.531099796295166,
0.0010713040828704834,
0.08062884956598282,
-0.4185938239097595,
0.23695671558380127,
0.04271271452307701,
-0.1557958722114563,
0.04429570585489273,
0.15025649964809418,
0.11309429258108139,
0.7382259964942932,
-0.40553709864616394,
-0.41405877470970154,
-0.018312569707632065,
0.20627376437187195,
0.3746125102043152,
0.07723008841276169,
0.3092646896839142,
0.15569444000720978,
-0.1866632103919983,
-0.04735788330435753,
0.05824187397956848,
-0.1584668755531311,
-0.2826387882232666,
0.2330799698829651,
-0.2658880352973938,
0.03360414505004883,
0.28473538160324097,
0.0910615548491478,
-0.17087630927562714,
0.1311798095703125,
-0.07728143781423569,
-0.1855892539024353,
-0.16394193470478058,
-0.17988811433315277,
-0.07237489521503448,
-0.025235723704099655,
-0.1616579294204712,
0.1054510623216629,
0.040008775889873505,
0.4681864082813263,
-0.19162407517433167,
0.09615077078342438,
0.1173214539885521,
0.1907101273536682,
0.04110494256019592,
-0.05492255836725235,
0.20539972186088562,
-0.18645386397838593,
-0.023109229281544685,
0.1262725293636322,
-0.1104043647646904,
-0.1304396688938141,
0.019809536635875702,
0.1985340565443039,
-0.1801179051399231,
-0.34883081912994385,
0.14063912630081177,
-0.24831578135490417,
0.1380700320005417,
-0.4525110721588135,
0.27662500739097595,
0.3829394578933716,
-0.01815284788608551,
-0.4886370897293091,
0.3218190670013428,
-0.028485246002674103,
0.06802722066640854,
0.3769403398036957,
-0.36039718985557556,
0.008334971964359283,
0.06339449435472488,
0.0989835187792778,
0.29957714676856995,
-0.09800747781991959,
0.0845322459936142,
-0.1769234836101532,
0.2232198268175125,
0.23176419734954834,
0.3134750425815582,
-0.22205163538455963,
0.045583803206682205,
0.44616588950157166,
0.2535213530063629,
0.2841161787509918,
0.03147276118397713,
-0.06451892107725143,
0.09511014819145203,
0.07591034471988678,
-0.03575572371482849,
-0.10705982893705368,
0.6998180150985718,
0.07967370748519897,
0.0061073750257492065,
0.0736854150891304,
0.24190786480903625,
0.08531931042671204,
-0.44884735345840454,
0.05804668366909027,
0.19699698686599731,
-0.16011640429496765,
0.14155538380146027,
0.22873751819133759,
0.23825468122959137,
-0.05947322025895119,
0.2625473439693451,
-0.013418145477771759,
0.015440158545970917,
0.23497804999351501,
0.197101891040802,
0.14154298603534698,
0.19801601767539978,
0.08847396820783615,
0.08637423068284988,
-0.4029289782047272,
0.09777529537677765,
0.2925218343734741,
-0.35695144534111023,
0.09064817428588867,
0.1319442093372345,
0.23108503222465515,
-0.37702059745788574,
-0.2672024965286255,
-0.23981168866157532,
0.2937868535518646,
-0.19311025738716125,
-0.18366922438144684,
0.13287438452243805,
-0.004769176244735718,
0.1510370820760727,
0.18589568138122559,
-0.12113022804260254,
0.02698158472776413,
0.5510708093643188,
0.12470777332782745,
-0.02905796468257904,
-0.15352916717529297,
-0.4880039095878601,
-0.09871727973222733,
0.30591562390327454,
-0.25345292687416077,
0.059258103370666504,
-0.32430940866470337,
-0.19863170385360718,
-0.20530056953430176,
0.27302366495132446,
0.4457674026489258,
0.5597252249717712,
-0.06527268886566162,
0.013448248617351055,
0.05298085883259773,
0.09904351830482483,
-0.12486130744218826,
0.2919400632381439,
-0.12257872521877289,
0.16397421061992645,
0.05350754037499428,
-0.03362444043159485,
-0.14905905723571777,
-0.05384625867009163,
-0.07913507521152496,
0.24186496436595917,
0.10190795361995697,
0.1280568242073059,
-0.3148496150970459,
-0.1739654839038849,
-0.0542585626244545,
0.04800223559141159,
-0.12281997501850128,
-0.12634623050689697,
0.39559316635131836,
-0.3989729881286621,
0.10681167244911194,
-0.0944725051522255,
0.019260350614786148,
-0.289186954498291,
0.4734736680984497,
0.21459317207336426,
0.24684011936187744,
-0.3985394835472107,
-0.12954619526863098,
-0.45356789231300354,
0.05704976245760918,
-0.6260559558868408,
0.3307383954524994,
-0.06058429926633835,
0.17038452625274658,
-0.06301667541265488,
0.006990347057580948,
0.18906687200069427,
-0.06931323558092117,
-0.16879485547542572,
0.22570183873176575,
-0.26953184604644775,
0.06635092198848724,
-0.3263704776763916,
-0.17689086496829987,
0.12850703299045563,
-0.4083442687988281,
0.3732217848300934,
-0.2949460446834564,
-0.0018862374126911163,
-0.1522424966096878,
0.10931839048862457,
0.08739277720451355,
0.13286879658699036,
0.5245754718780518,
0.4406280219554901,
0.38376325368881226,
-0.12557122111320496,
-0.10495413094758987,
-0.13820883631706238,
-0.2574092745780945,
-0.0852336436510086,
0.19457703828811646,
0.08460910618305206,
0.16918283700942993,
-0.2388860285282135,
-0.016021717339754105,
-0.26397719979286194,
0.09407055377960205,
-0.094316266477108,
0.113681860268116,
0.08260084688663483,
-0.3479434549808502,
-0.2195758819580078,
0.23553906381130219,
0.07212436944246292,
0.3229885697364807,
0.02301298826932907,
0.10627772659063339,
-0.13169583678245544,
-0.12879131734371185,
0.3937510848045349,
-0.6275827884674072,
-0.32038551568984985,
-0.329660028219223,
0.23244142532348633,
-0.08865741640329361,
0.06675352156162262,
-0.001940712332725525,
-0.20215162634849548,
0.2370859682559967,
0.07124759256839752,
-0.19322144985198975,
0.11577802896499634,
-0.2717186510562897,
-0.045711785554885864,
0.032885368913412094,
0.054297756403684616,
0.03972962498664856,
-0.5831232666969299,
0.24575582146644592,
-0.10015609115362167
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Upgrade to 1.6.1 solved my problem somehow. I did not change any of my code, but now it starts all processes around the same time. | ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 25 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Upgrade to 1.6.1 solved my problem somehow. I did not change any of my code, but now it starts all processes around the same time. | [
-0.3285203278064728,
-0.4251142144203186,
-0.09021840989589691,
0.3159680962562561,
0.017065268009901047,
0.09015657752752304,
0.20944280922412872,
0.44471967220306396,
0.4825792908668518,
0.06496218591928482,
0.25104212760925293,
0.3160925805568695,
-0.0560898631811142,
-0.3143908679485321,
-0.2324121743440628,
0.12995198369026184,
0.1601342260837555,
-0.11922748386859894,
-0.05512996017932892,
-0.202885240316391,
-0.30487725138664246,
-0.007866555824875832,
-0.1871984452009201,
0.09673290699720383,
-0.1404465138912201,
-0.15344274044036865,
-0.05397794395685196,
0.10258666425943375,
0.04833061993122101,
-0.39430707693099976,
0.021104836836457253,
0.05918630212545395,
-0.18131878972053528,
0.8799493312835693,
-0.0001220850390382111,
0.011494673788547516,
0.24772681295871735,
0.2849188446998596,
0.1633935123682022,
-0.014119327068328857,
-0.19031405448913574,
-0.27658596634864807,
0.21304410696029663,
-0.1274116337299347,
0.24563533067703247,
0.025893457233905792,
0.016451701521873474,
-0.6402497887611389,
0.1821403205394745,
-0.032141026109457016,
0.10676292330026627,
0.07385430485010147,
-0.3857874274253845,
-0.09273120015859604,
0.013570800423622131,
-0.06217876076698303,
0.018127745017409325,
0.23609036207199097,
0.508997917175293,
-0.1530720293521881,
-0.16748085618019104,
0.19867365062236786,
-0.3881817162036896,
0.3281826376914978,
0.05253469944000244,
0.03076401725411415,
0.6446439623832703,
-0.5962138175964355,
0.27339741587638855,
0.1532076746225357,
-0.08080986887216568,
0.08102937787771225,
-0.025348220020532608,
-0.35534173250198364,
-0.3839282691478729,
0.08682625740766525,
0.08888912945985794,
0.11135619133710861,
-0.19127222895622253,
-0.19456422328948975,
-0.47811704874038696,
0.07079489529132843,
0.23098605871200562,
0.030061893165111542,
0.11731286346912384,
0.1442992389202118,
0.20245081186294556,
0.30933359265327454,
0.4033645987510681,
0.24624796211719513,
0.24110208451747894,
-0.23320597410202026,
0.006406035274267197,
0.27327677607536316,
-0.4459074139595032,
0.12414945662021637,
0.52000492811203,
0.08677629381418228,
0.04754853993654251,
-0.5806801319122314,
-0.09124331921339035,
0.0393420085310936,
0.1242072731256485,
0.06339337676763535,
0.34770891070365906,
-0.0904645025730133,
-0.03574910759925842,
0.24988479912281036,
0.34419071674346924,
-0.2958388328552246,
-0.43905919790267944,
0.24861955642700195,
-0.016091223806142807,
-0.5093578100204468,
0.14713501930236816,
0.05836101621389389,
0.021453969180583954,
-0.048289503902196884,
0.013608047738671303,
-0.11493540555238724,
-0.19718044996261597,
-0.2436126172542572,
0.10316015034914017,
0.3249605596065521,
-0.11045228689908981,
0.23944485187530518,
-0.13448050618171692,
-0.17788752913475037,
-0.2257104068994522,
0.28931909799575806,
-0.11749925464391708,
-0.29584288597106934,
-0.31964361667633057,
0.1387152224779129,
0.0025332607328891754,
-0.3737702965736389,
0.03555704653263092,
0.41778066754341125,
-0.30179619789123535,
-0.18760107457637787,
0.18083420395851135,
-0.30838602781295776,
0.005610086023807526,
0.01246717944741249,
0.0029919296503067017,
0.5556015968322754,
0.1374044418334961,
0.5318370461463928,
-0.2708052098751068,
0.3144209086894989,
-0.5807899832725525,
-0.1458476334810257,
0.11880431324243546,
0.050616078078746796,
-0.02516234666109085,
0.24620580673217773,
-0.1311657726764679,
0.0963202565908432,
0.28279900550842285,
-0.3295595943927765,
-0.2998920977115631,
-0.16962838172912598,
-0.2879667580127716,
-0.2514469027519226,
-0.16458308696746826,
0.3703288733959198,
0.0015978962182998657,
0.06992809474468231,
-0.21030154824256897,
0.07873144000768661,
0.4495997726917267,
0.4156292974948883,
-0.20758533477783203,
0.35384294390678406,
-0.2240494042634964,
-0.062330082058906555,
0.13210465013980865,
0.03097204491496086,
-0.4005418121814728,
0.6677231192588806,
-0.2599673867225647,
-0.009555326774716377,
-0.06342484802007675,
0.24964484572410583,
0.445507675409317,
-0.15568676590919495,
0.2820449471473694,
0.26270949840545654,
-0.05724126100540161,
0.4519648849964142,
-0.41226810216903687,
-0.1481001228094101,
0.015562711283564568,
-0.0891285240650177,
0.02215573936700821,
0.16945989429950714,
0.14456987380981445,
-0.47434428334236145,
0.38992801308631897,
-0.07611596584320068,
0.03575962036848068,
0.18391044437885284,
-0.06943115592002869,
-0.06294739246368408,
0.033504802733659744,
0.03393414616584778,
-0.11931469291448593,
0.20325839519500732,
-0.04320680350065231,
-0.23096483945846558,
0.1026153564453125,
0.010111328214406967,
-0.08725141733884811,
-0.049290381371974945,
-0.1813875138759613,
0.07920147478580475,
-0.09216084331274033,
0.2140893042087555,
-0.033944349735975266,
-0.06528197228908539,
0.18473626673221588,
0.0358007475733757,
0.18983882665634155,
-0.22376810014247894,
0.022621644660830498,
0.0642823874950409,
0.0673079788684845,
-0.16157786548137665,
-0.026220150291919708,
-0.28957170248031616,
0.3231554329395294,
-0.1598035991191864,
-0.21338912844657898,
0.17127159237861633,
0.04859006032347679,
0.40967071056365967,
-0.062472812831401825,
-0.03134132921695709,
0.05971969664096832,
0.39307665824890137,
0.148202583193779,
0.09266732633113861,
0.1199302226305008,
-0.31026220321655273,
0.045054949820041656,
0.21585172414779663,
0.06955563277006149,
0.461722195148468,
-0.07737123966217041,
0.02623745985329151,
0.006017303094267845,
-0.08282873779535294,
0.2806045413017273,
0.09496285021305084,
0.3291275203227997,
0.006159810349345207,
0.4355294108390808,
0.30369967222213745,
0.018876202404499054,
0.07240204513072968,
0.5454030632972717,
-0.0023864060640335083,
-0.20939764380455017,
0.18214869499206543,
-0.04531358182430267,
-0.07458370923995972,
-0.018694793805480003,
0.14500954747200012,
0.4704553484916687,
0.059201762080192566,
0.04152172431349754,
-0.19765204191207886,
0.13429047167301178,
-0.011345849372446537,
0.026496827602386475,
0.14391830563545227,
0.5454499125480652,
-0.07725534588098526,
0.38177239894866943,
0.01271993387490511,
-0.04810631647706032,
-0.2288663536310196,
0.18703049421310425,
0.27646106481552124,
-0.0724954679608345,
0.20332340896129608,
-0.00348673015832901,
0.31721505522727966,
-0.2773834764957428,
-0.21610024571418762,
0.09421406686306,
-0.1857626587152481,
-0.2104177474975586,
0.17380501329898834,
0.02024942636489868,
0.13622096180915833,
0.15130726993083954,
-0.09405522048473358,
-0.0637965202331543,
0.0024557672441005707,
0.0040111057460308075,
-0.3196439743041992,
-0.044906653463840485,
-0.08132874965667725,
0.2629684805870056,
-0.04914679750800133,
0.22525204718112946,
0.15064668655395508,
-0.49772757291793823,
0.09321052581071854,
-0.046760398894548416,
-0.015513814985752106,
-0.15381067991256714,
-0.10586488246917725,
-0.20139366388320923,
0.19164294004440308,
-0.0757523700594902,
-0.2173842340707779,
0.21320010721683502,
-0.630905032157898,
-0.07813727110624313,
-0.02484651282429695,
-0.12418729811906815,
-0.27182793617248535,
-0.11867718398571014,
-0.19932734966278076,
-0.20233149826526642,
-0.19794797897338867,
0.2467658370733261,
-0.12728960812091827,
0.38114529848098755,
-0.2140098661184311,
0.11723233759403229,
0.0577181912958622,
0.045267581939697266,
-0.12536221742630005,
-0.14134973287582397,
-0.3023558557033539,
0.1250576376914978,
0.008625736460089684,
-0.06397221982479095,
-0.30125856399536133,
-0.10580211877822876,
-0.026605714112520218,
0.3626352548599243,
-0.3844188451766968,
0.10696018487215042,
-0.5251044631004333,
0.12327180802822113,
0.08088300377130508,
0.12212537229061127,
0.41947609186172485,
0.0025606241542845964,
-0.088919498026371,
-0.10343018174171448,
-0.22594515979290009,
0.0017525404691696167,
0.1917862892150879,
-0.044503189623355865,
0.038710154592990875,
0.5795581340789795,
-0.1471133977174759,
0.6572440266609192,
0.38435712456703186,
-0.0609939880669117,
-0.011135630309581757,
-0.018365388736128807,
-0.19621379673480988,
-0.25244706869125366,
-0.39309898018836975,
0.09277532994747162,
-0.2513142228126526,
-0.3111334443092346,
0.249952033162117,
-0.0659017413854599,
-0.404755175113678,
0.00304480642080307,
0.03117227554321289,
-0.23516860604286194,
-0.12246200442314148,
0.06864948570728302,
-0.14598019421100616,
0.3705109655857086,
-0.038942500948905945,
0.1677025556564331,
-0.41891440749168396,
-0.06357784569263458,
0.0560184083878994,
-0.28565430641174316,
0.351728230714798,
-0.3162990212440491,
-0.053567495197057724,
0.39081549644470215,
-0.5518410205841064,
0.2534336447715759,
0.03084420971572399,
0.10923071950674057,
0.028496306389570236,
0.12049845606088638,
0.36497950553894043,
0.18731689453125,
0.6455700993537903,
0.05694146454334259,
0.043091706931591034,
0.009590983390808105,
-0.2508569061756134,
-0.6014392971992493,
-0.016580374911427498,
0.017507847398519516,
0.473849892616272,
0.8081662654876709,
0.4271780550479889,
-0.11054852604866028,
-0.0770256519317627,
-0.0832909345626831,
0.1911303848028183,
0.02337455376982689,
-0.2846396863460541,
-0.1913907378911972,
-0.12852098047733307,
-0.1593596190214157,
0.11853998154401779,
-0.1695537120103836,
-0.005878112744539976,
0.03384561091661453,
-0.31867438554763794,
0.11426345258951187,
0.09430357068777084,
0.10525938123464584,
0.123298779129982,
0.2086755931377411,
0.03237387165427208,
0.5327064990997314,
0.27905529737472534,
0.06225043162703514,
-0.01573869399726391,
0.37717053294181824,
-0.15090318024158478,
0.07024236023426056,
0.17480263113975525,
-0.025621723383665085,
0.1866866648197174,
0.4035951495170593,
-0.007239955011755228,
0.026592940092086792,
-0.09910028427839279,
0.22365200519561768,
-0.17207887768745422,
-0.03327862173318863,
0.46762344241142273,
0.13508746027946472,
-0.4751650094985962,
-0.5731220841407776,
0.2930726408958435,
0.24548234045505524,
-0.4326724410057068,
0.7999383807182312,
-0.7203829884529114,
-0.02332121692597866,
0.46473783254623413,
-0.058202095329761505,
0.736647367477417,
-0.22521649301052094,
-0.04688286408782005,
-0.11349134892225266,
0.0016396790742874146,
-0.09664873778820038,
0.5450138449668884,
0.28739476203918457,
-0.3282623589038849,
-0.022692706435918808,
0.19144554436206818,
-0.25365760922431946,
-0.0644034668803215,
0.1602868288755417,
-0.06107405945658684,
0.00848206877708435,
-0.051601409912109375,
-0.08807525038719177,
-0.31431806087493896,
0.013299304991960526,
0.46262872219085693,
-0.28254908323287964,
-0.06960246711969376,
0.029595457017421722,
0.07741600275039673,
0.3475758135318756,
0.04960082098841667,
-0.16785399615764618,
-0.1329222470521927,
-0.1412421464920044,
-0.11069510877132416,
-0.006430892273783684,
-0.345826119184494,
0.3355684280395508,
-0.01818757876753807,
0.0017521753907203674,
0.0954992026090622,
0.07547374814748764,
-0.15314579010009766,
0.02753252163529396,
-0.010044785216450691,
0.14651130139827728,
0.3092435598373413,
0.310176819562912,
0.25977814197540283,
-0.1874200701713562,
-0.20100745558738708,
0.07284625619649887,
-0.08798876404762268,
-0.2149650752544403,
-0.10531345009803772,
-0.2370036244392395,
-0.514031171798706,
0.49337685108184814,
0.07637116312980652,
0.13742129504680634,
-0.4340174198150635,
0.1306513547897339,
-0.10922698676586151,
-0.18048863112926483,
0.03893360495567322,
0.13317382335662842,
0.17539076507091522,
0.6333760619163513,
-0.3870878517627716,
-0.4785049259662628,
-0.04711306467652321,
0.2769547402858734,
0.2634619474411011,
-0.08760996162891388,
0.266230970621109,
0.0843803733587265,
-0.18964490294456482,
-0.07172341644763947,
0.06790380924940109,
-0.04886830225586891,
-0.21460843086242676,
0.3136092722415924,
-0.30624958872795105,
-0.010104939341545105,
0.325745165348053,
0.05313067138195038,
-0.19566558301448822,
0.19328543543815613,
-0.10456498712301254,
-0.14167681336402893,
-0.30516374111175537,
-0.22529788315296173,
-0.17719267308712006,
0.040380895137786865,
-0.2287755310535431,
0.10180217027664185,
0.024986950680613518,
0.5330876111984253,
-0.1708766222000122,
0.0492284893989563,
0.2193310409784317,
0.1439284384250641,
0.0015924498438835144,
-0.05049432814121246,
0.11431415379047394,
-0.14210940897464752,
-0.010252051055431366,
0.13474780321121216,
-0.07091305404901505,
-0.07116389274597168,
-0.014539342373609543,
0.20568044483661652,
-0.20662236213684082,
-0.2353154718875885,
0.18063326179981232,
-0.26861342787742615,
0.03794637322425842,
-0.3392086923122406,
0.20730438828468323,
0.3485957980155945,
-0.07939422130584717,
-0.3916224539279938,
0.2095499336719513,
-0.07939454168081284,
0.23501621186733246,
0.1846553534269333,
-0.4053308963775635,
-0.039552584290504456,
0.07690440118312836,
0.09904085099697113,
0.35073715448379517,
-0.10541171580553055,
0.09433058649301529,
-0.145941823720932,
0.3196316361427307,
0.1992688775062561,
0.3192611038684845,
-0.10640870034694672,
0.06534221768379211,
0.5074797868728638,
0.17961356043815613,
0.30573123693466187,
-0.07810834050178528,
-0.03884443640708923,
-0.005861751735210419,
0.09305256605148315,
-0.0194854699075222,
-0.11450327187776566,
0.5450173616409302,
0.07273948937654495,
-0.028282003477215767,
0.01701173186302185,
0.048489127308130264,
-0.0953812226653099,
-0.5180802345275879,
0.1688510775566101,
0.21009384095668793,
-0.28607386350631714,
0.1390005499124527,
0.2218400239944458,
0.15802179276943207,
-0.08901894092559814,
0.3816063702106476,
-0.042255695909261703,
0.05209575966000557,
0.3182891011238098,
0.18205486238002777,
0.28862276673316956,
0.11458659917116165,
0.12587697803974152,
0.06382410228252411,
-0.3519519567489624,
0.08760932087898254,
0.2372221052646637,
-0.36629390716552734,
0.0794915184378624,
0.2309834063053131,
0.15989378094673157,
-0.4054526090621948,
-0.1986224502325058,
-0.20211374759674072,
0.18548601865768433,
-0.19955584406852722,
-0.15127691626548767,
0.16495786607265472,
0.0245291069149971,
0.1848345398902893,
0.17545758187770844,
-0.08382001519203186,
0.12550894916057587,
0.5904155969619751,
0.16921210289001465,
-0.05044904351234436,
-0.08493959903717041,
-0.4554617702960968,
-0.036217622458934784,
0.31643009185791016,
-0.2982969284057617,
0.035323552787303925,
-0.34326767921447754,
-0.09463195502758026,
-0.2026020586490631,
0.25155067443847656,
0.4208081066608429,
0.7341744303703308,
-0.09675650298595428,
-0.012422186322510242,
-0.0009807460010051727,
0.07859531044960022,
-0.17111726105213165,
0.3257127106189728,
-0.05129954218864441,
0.37295329570770264,
-0.02787776291370392,
-0.05857241898775101,
-0.13423356413841248,
0.05441310256719589,
-0.03655971214175224,
0.17063994705677032,
0.1491728574037552,
0.3705940842628479,
-0.2488197684288025,
-0.274838387966156,
0.01957477256655693,
0.06879115104675293,
-0.13722780346870422,
-0.23072457313537598,
0.36763960123062134,
-0.36152568459510803,
0.08630730211734772,
-0.1536698192358017,
0.012040980160236359,
-0.23866382241249084,
0.38004401326179504,
0.11476339399814606,
0.22159019112586975,
-0.4694235026836395,
-0.19769588112831116,
-0.450178325176239,
0.12145617604255676,
-0.5382357239723206,
0.4328242242336273,
-0.006218290887773037,
0.13623788952827454,
-0.09499087184667587,
-0.03797638416290283,
0.17843611538410187,
-0.03683079779148102,
-0.232547327876091,
0.12827366590499878,
-0.2308739870786667,
0.12679898738861084,
-0.3797703981399536,
-0.1577134132385254,
0.22433996200561523,
-0.3874175548553467,
0.3878500759601593,
-0.389094740152359,
0.012234654277563095,
-0.11717428267002106,
0.06847067177295685,
0.1629689484834671,
0.12704110145568848,
0.5165664553642273,
0.42544522881507874,
0.2855575680732727,
-0.21178725361824036,
-0.060658492147922516,
-0.28396832942962646,
-0.2531268000602722,
-0.10932009667158127,
0.1243833675980568,
0.1298407018184662,
0.11718809604644775,
-0.2266768515110016,
-0.20708034932613373,
-0.3209629952907562,
-0.014978683553636074,
-0.07325839251279831,
0.2023949921131134,
0.17997922003269196,
-0.26475289463996887,
-0.09947565197944641,
0.26984426379203796,
0.0632701888680458,
0.25816023349761963,
0.12088165432214737,
0.05239109694957733,
-0.2121666520833969,
-0.16585414111614227,
0.33007192611694336,
-0.4964948296546936,
-0.3814642131328583,
-0.35550740361213684,
0.303772509098053,
-0.08458533138036728,
0.10057668387889862,
-0.15094703435897827,
-0.1820099949836731,
0.3137875199317932,
0.019148793071508408,
-0.24666202068328857,
0.07237842679023743,
-0.1470409780740738,
0.03289565071463585,
0.04176080599427223,
-0.0022270530462265015,
0.18156200647354126,
-0.5332590937614441,
0.20905762910842896,
-0.12725920975208282
] |
https://github.com/huggingface/datasets/issues/2243 | Map is slow and processes batches one after another | Nice ! I'm glad this works now.
Closing for now, but feel free to re-open if you experience this issue again. | ## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot! | 21 | Map is slow and processes batches one after another
## Describe the bug
I have a somewhat unclear bug to me, where I can't figure out what the problem is. The code works as expected on a small subset of my dataset (2000 samples) on my local machine, but when I execute the same code with a larger dataset (1.4 million samples) this problem occurs. Thats why I can't give exact steps to reproduce, I'm sorry.
I process a large dataset in a two step process. I first call map on a dataset I load from disk and create a new dataset from it. This works like expected and `map` uses all workers I started it with. Then I process the dataset created by the first step, again with `map`, which is really slow and starting only one or two process at a time. Number of processes is the same for both steps.
pseudo code:
```python
ds = datasets.load_from_disk("path")
new_dataset = ds.map(work, batched=True, ...) # fast uses all processes
final_dataset = new_dataset.map(work2, batched=True, ...) # slow starts one process after another
```
## Expected results
Second stage should be as fast as the first stage.
## Versions
Paste the output of the following code:
- Datasets: 1.5.0
- Python: 3.8.8 (default, Feb 24 2021, 21:46:12)
- Platform: Linux-5.4.0-60-generic-x86_64-with-glibc2.10
Do you guys have any idea? Thanks a lot!
Nice ! I'm glad this works now.
Closing for now, but feel free to re-open if you experience this issue again. | [
-0.30707451701164246,
-0.46950411796569824,
-0.09229378402233124,
0.2605441212654114,
0.023779423907399178,
0.08166911453008652,
0.20609715580940247,
0.38727980852127075,
0.4719316363334656,
0.020735256373882294,
0.2926185727119446,
0.3568666875362396,
0.015233403071761131,
-0.17234329879283905,
-0.14596180617809296,
0.06272879987955093,
0.12884166836738586,
-0.1695839762687683,
0.01381143182516098,
-0.179846853017807,
-0.29917457699775696,
-0.07342660427093506,
-0.1795147955417633,
0.04214584082365036,
-0.18041643500328064,
-0.2228628695011139,
-0.0007138997316360474,
0.10771654546260834,
0.04876534640789032,
-0.2912755012512207,
-0.018966082483530045,
-0.0574137307703495,
-0.21755708754062653,
0.9546751379966736,
-0.00011760896450141445,
-0.0876428484916687,
0.2521361708641052,
0.26814621686935425,
0.1472977250814438,
0.07857607305049896,
-0.20931348204612732,
-0.33738404512405396,
0.11257750540971756,
-0.25126320123672485,
0.22991368174552917,
0.0075566815212368965,
0.0000877082347869873,
-0.5254431962966919,
0.27871865034103394,
-0.10381658375263214,
0.14105600118637085,
0.09032423794269562,
-0.38877928256988525,
-0.09743285179138184,
0.03567111864686012,
-0.01578015834093094,
-0.004197768867015839,
0.19364598393440247,
0.5403660535812378,
-0.20441213250160217,
-0.14705008268356323,
0.16563095152378082,
-0.47824278473854065,
0.2883206903934479,
0.14256462454795837,
0.10457108914852142,
0.5796032547950745,
-0.5662628412246704,
0.2586004436016083,
0.16450482606887817,
0.03641573339700699,
0.06767328083515167,
0.00024270382709801197,
-0.4046182632446289,
-0.448539137840271,
0.00043510086834430695,
0.06313633918762207,
0.11919086426496506,
-0.20136606693267822,
-0.2541603446006775,
-0.4854081869125366,
0.06044424697756767,
0.22948011755943298,
0.0657128393650055,
-0.022683363407850266,
0.14261046051979065,
0.17217004299163818,
0.2969885468482971,
0.3728102147579193,
0.13152676820755005,
-0.006109300069510937,
-0.282748818397522,
0.032969024032354355,
0.2808259427547455,
-0.4053995609283447,
0.08050309121608734,
0.5078936219215393,
0.03285722807049751,
0.04997403174638748,
-0.35418587923049927,
-0.11882422864437103,
-0.005499683320522308,
0.018532197922468185,
0.13024824857711792,
0.3539411425590515,
0.04115179553627968,
-0.13759729266166687,
0.18646641075611115,
0.451646089553833,
-0.2629924714565277,
-0.3996080756187439,
0.1982380747795105,
0.06687204539775848,
-0.5660601258277893,
0.16804610192775726,
0.008016332983970642,
0.005052460357546806,
-0.04057151824235916,
-0.048965319991111755,
-0.08656128495931625,
-0.1470603048801422,
-0.1776750087738037,
0.16139522194862366,
0.3504636287689209,
-0.11797685921192169,
0.17444366216659546,
-0.16176143288612366,
-0.09720294177532196,
-0.23605841398239136,
0.26527491211891174,
-0.10585779696702957,
-0.3608027696609497,
-0.30602312088012695,
0.13757666945457458,
0.09161631762981415,
-0.22355985641479492,
0.10499245673418045,
0.38262835144996643,
-0.30343449115753174,
-0.1787353903055191,
0.17913134396076202,
-0.39813169836997986,
0.023494400084018707,
0.02052513137459755,
0.05048191174864769,
0.5985866785049438,
0.10874885320663452,
0.26572614908218384,
-0.24673503637313843,
0.39765071868896484,
-0.5777350068092346,
-0.16019506752490997,
0.2145017385482788,
0.043226517736911774,
0.0021724719554185867,
0.27946096658706665,
-0.2627560496330261,
0.055075325071811676,
0.31599146127700806,
-0.18858332931995392,
-0.25292450189590454,
-0.16322971880435944,
-0.2909040153026581,
-0.32294973731040955,
-0.11619625985622406,
0.3648352026939392,
-0.05553565174341202,
0.0846184492111206,
-0.22704873979091644,
0.19892874360084534,
0.46078231930732727,
0.6413199305534363,
-0.2464524209499359,
0.44517162442207336,
-0.21160878241062164,
-0.028269093483686447,
0.007855385541915894,
0.023837607353925705,
-0.26970380544662476,
0.7397875785827637,
-0.35117846727371216,
0.04369961470365524,
-0.08492832630872726,
0.24995821714401245,
0.38162097334861755,
-0.22721166908740997,
0.2943173050880432,
0.31588929891586304,
-0.044889844954013824,
0.4030994474887848,
-0.3237963318824768,
-0.0970083624124527,
0.1848307102918625,
-0.06647893786430359,
0.019516928121447563,
0.09247390925884247,
0.11161384731531143,
-0.38469842076301575,
0.3901068866252899,
-0.08242176473140717,
0.020275643095374107,
0.20322875678539276,
0.05830191820859909,
-0.03746938705444336,
-0.045053306967020035,
0.1467667520046234,
-0.03630399703979492,
0.21480339765548706,
-0.029756732285022736,
-0.3130529820919037,
0.028072647750377655,
0.09012937545776367,
-0.056668367236852646,
0.040577374398708344,
-0.14810681343078613,
0.07681407779455185,
-0.06960950791835785,
0.10820797085762024,
0.006625380367040634,
-0.053109150379896164,
0.285884290933609,
0.0768037736415863,
0.13930891454219818,
-0.2579501271247864,
-0.06063487008213997,
0.06492412090301514,
0.08329743891954422,
-0.08958013355731964,
-0.11501416563987732,
-0.24784547090530396,
0.35223954916000366,
-0.07701308280229568,
-0.17284822463989258,
0.13596640527248383,
0.06812866777181625,
0.2770184874534607,
-0.08171290904283524,
0.10859987139701843,
0.08480389416217804,
0.25720328092575073,
0.16209687292575836,
0.07144039869308472,
0.23671330511569977,
-0.3935840427875519,
0.00782143697142601,
0.11397364735603333,
-0.012719880789518356,
0.45137184858322144,
-0.11874878406524658,
-0.02408440411090851,
-0.015721531584858894,
-0.10671162605285645,
0.2500285804271698,
0.18473103642463684,
0.28296568989753723,
-0.10028298199176788,
0.41872361302375793,
0.25499916076660156,
-0.03264624625444412,
0.011897161602973938,
0.4661343991756439,
-0.020353734493255615,
-0.12528377771377563,
0.12600213289260864,
-0.11912708729505539,
-0.007442936301231384,
-0.052982233464717865,
0.11719518899917603,
0.47508078813552856,
0.09153230488300323,
0.008364956825971603,
-0.17715632915496826,
0.11368084698915482,
-0.07317303121089935,
0.07996630668640137,
0.13519039750099182,
0.4936062693595886,
-0.060905031859874725,
0.3400741219520569,
-0.02513374388217926,
0.022674433887004852,
-0.1699530929327011,
0.21452784538269043,
0.24233557283878326,
-0.09092195332050323,
0.16430450975894928,
-0.06586992740631104,
0.19481971859931946,
-0.3574417531490326,
-0.0718451738357544,
0.04494474083185196,
-0.18698309361934662,
-0.17544277012348175,
0.23172226548194885,
-0.007913665845990181,
0.08539165556430817,
0.2350054681301117,
-0.21207387745380402,
-0.05868571996688843,
-0.1217837706208229,
0.029306791722774506,
-0.3171486556529999,
-0.046682313084602356,
-0.03083239682018757,
0.3746775686740875,
-0.04225253686308861,
0.24458670616149902,
0.13506007194519043,
-0.45624983310699463,
-0.010096006095409393,
0.01416470855474472,
-0.1387721300125122,
-0.19151677191257477,
0.05320744216442108,
-0.2786861062049866,
0.2900402545928955,
-0.07248377054929733,
-0.22455117106437683,
0.2720653712749481,
-0.6565889716148376,
0.00799146294593811,
-0.04807629808783531,
-0.1245819553732872,
-0.38017600774765015,
-0.08339526504278183,
-0.12914428114891052,
-0.17208120226860046,
-0.16416679322719574,
0.33997637033462524,
-0.09906403720378876,
0.3345186710357666,
-0.007592114619910717,
0.09892737865447998,
0.018951114267110825,
0.15346986055374146,
-0.1666976660490036,
-0.181357741355896,
-0.22203688323497772,
0.159707173705101,
0.02274446189403534,
-0.09230184555053711,
-0.22120721638202667,
-0.014505382627248764,
-0.11391271650791168,
0.21726219356060028,
-0.4146239757537842,
0.18906736373901367,
-0.5987949967384338,
0.20856675505638123,
0.07471926510334015,
0.18905287981033325,
0.37890541553497314,
-0.1311911791563034,
-0.07087636739015579,
-0.16193422675132751,
-0.3247304856777191,
0.01905546337366104,
0.2639816999435425,
-0.026015423238277435,
0.10037026554346085,
0.48660343885421753,
-0.07610969245433807,
0.6302147507667542,
0.3575817346572876,
-0.033317599445581436,
0.07371651381254196,
0.058478403836488724,
-0.18351812660694122,
-0.2872955799102783,
-0.3533492386341095,
0.037947434931993484,
-0.3034135401248932,
-0.3304222822189331,
0.28186464309692383,
-0.06009434163570404,
-0.5309892296791077,
0.02973083406686783,
0.06593511998653412,
-0.26619023084640503,
-0.09360140562057495,
0.1138189360499382,
-0.02314692735671997,
0.23497644066810608,
0.02734048292040825,
0.1085849478840828,
-0.46089598536491394,
-0.07674271613359451,
0.033472221344709396,
-0.3773456811904907,
0.36882978677749634,
-0.2808012366294861,
-0.13871930539608002,
0.11792311817407608,
-0.57991623878479,
0.1996641606092453,
0.03833666816353798,
0.13661061227321625,
0.0005053244531154633,
0.10175924748182297,
0.30437231063842773,
0.14292925596237183,
0.7509540319442749,
-0.0038136951625347137,
0.10731348395347595,
0.006812751293182373,
-0.21129938960075378,
-0.5945115089416504,
-0.03185819089412689,
-0.019637003540992737,
0.43586936593055725,
0.6071036458015442,
0.3249937891960144,
-0.15496261417865753,
0.011808572337031364,
-0.17623738944530487,
0.25009334087371826,
0.016284193843603134,
-0.2643996775150299,
-0.12773726880550385,
-0.18216538429260254,
-0.1377597600221634,
0.12346141040325165,
-0.12141916900873184,
-0.03928465396165848,
0.02291005663573742,
-0.22600650787353516,
0.20433330535888672,
0.23368754982948303,
0.09088897705078125,
0.10688932240009308,
0.2693607807159424,
0.0611446276307106,
0.5416278839111328,
0.21145549416542053,
0.18858981132507324,
-0.06427198648452759,
0.3505929410457611,
-0.11882270872592926,
0.2857776880264282,
0.19732698798179626,
-0.02859623357653618,
0.2222447693347931,
0.44914600253105164,
-0.004371230956166983,
0.052366822957992554,
-0.15202030539512634,
0.21840070188045502,
-0.26716098189353943,
-0.150292307138443,
0.5050218105316162,
0.23747986555099487,
-0.45411550998687744,
-0.5346491932868958,
0.2677077353000641,
0.297410249710083,
-0.3881889581680298,
0.6406939029693604,
-0.8524454236030579,
-0.052478961646556854,
0.49366867542266846,
-0.08226726204156876,
0.7306094765663147,
-0.29355406761169434,
-0.09793396294116974,
-0.12133418768644333,
0.14034831523895264,
-0.15606898069381714,
0.25402170419692993,
0.24950505793094635,
-0.3049429953098297,
-0.11736302077770233,
0.2125658392906189,
-0.2820882499217987,
0.02469848096370697,
0.16196846961975098,
-0.032685644924640656,
0.041570600122213364,
-0.08027055859565735,
0.0633884072303772,
-0.2816934883594513,
0.02059313654899597,
0.4830935299396515,
-0.306074321269989,
-0.13513968884944916,
0.07463439553976059,
0.17424261569976807,
0.2771475613117218,
-0.001876356080174446,
-0.09448789805173874,
-0.25515156984329224,
-0.19279702007770538,
-0.11498890072107315,
0.011113602668046951,
-0.30752724409103394,
0.3527851700782776,
-0.06383208930492401,
0.10497896373271942,
0.10135100781917572,
0.15931685268878937,
-0.19466029107570648,
0.13539686799049377,
-0.09780027717351913,
0.14792834222316742,
0.3188365697860718,
0.406047523021698,
0.28024911880493164,
-0.23388947546482086,
-0.17904573678970337,
0.03354239463806152,
-0.09413501620292664,
-0.16125458478927612,
-0.1206200122833252,
-0.1833857297897339,
-0.5209078192710876,
0.5433425903320312,
0.06466704607009888,
0.11506903916597366,
-0.430828332901001,
0.220236137509346,
-0.020485155284404755,
-0.1794324815273285,
0.06613221764564514,
0.13434559106826782,
0.0650714784860611,
0.7289729714393616,
-0.4065171182155609,
-0.392372190952301,
-0.002801317721605301,
0.2055422067642212,
0.30453601479530334,
0.1434856355190277,
0.32142922282218933,
0.1601705104112625,
-0.19423845410346985,
-0.08254542946815491,
0.07806835323572159,
-0.07897529751062393,
-0.2984723448753357,
0.18531319499015808,
-0.2877362370491028,
0.024494901299476624,
0.29849714040756226,
0.018313661217689514,
-0.17077837884426117,
0.09877786040306091,
-0.11915096640586853,
-0.16151046752929688,
-0.2252187877893448,
-0.17823149263858795,
-0.08966416120529175,
-0.05341176316142082,
-0.164628803730011,
0.14019082486629486,
0.04222983866930008,
0.5476225018501282,
-0.20871977508068085,
0.0895351767539978,
0.12568101286888123,
0.22313573956489563,
0.0012662429362535477,
-0.06508725136518478,
0.14484688639640808,
-0.13406583666801453,
0.01547321118414402,
0.18559974431991577,
-0.09394446760416031,
-0.15165813267230988,
0.019249428063631058,
0.18280349671840668,
-0.20723599195480347,
-0.32569921016693115,
0.19423487782478333,
-0.3056369423866272,
0.07462964951992035,
-0.41641658544540405,
0.2432858645915985,
0.344396710395813,
-0.014954239130020142,
-0.4733925759792328,
0.3334658145904541,
-0.04911831021308899,
0.10264109075069427,
0.3028346300125122,
-0.41614478826522827,
-0.01913662999868393,
0.037250131368637085,
0.06224542111158371,
0.3463119566440582,
-0.0950259268283844,
0.030849594622850418,
-0.15753990411758423,
0.2799508273601532,
0.24212348461151123,
0.3736254870891571,
-0.23098088800907135,
0.08470223844051361,
0.4543590247631073,
0.2566927671432495,
0.1965305656194687,
-0.03437049686908722,
-0.03192861005663872,
0.09315311908721924,
0.1203756257891655,
-0.07105147838592529,
-0.143508180975914,
0.6602483987808228,
0.06702124327421188,
0.005421862006187439,
0.05505389720201492,
0.21340274810791016,
-0.029026512056589127,
-0.4931352138519287,
0.08772815763950348,
0.13970309495925903,
-0.1958751082420349,
0.09221294522285461,
0.287232905626297,
0.163399338722229,
-0.14553633332252502,
0.23260751366615295,
-0.038728322833776474,
0.05471028760075569,
0.3058008551597595,
0.23993918299674988,
0.20048464834690094,
0.2051239013671875,
0.05653168261051178,
0.01621600240468979,
-0.36592522263526917,
0.047015201300382614,
0.22931146621704102,
-0.34617701172828674,
0.10947804152965546,
0.14867538213729858,
0.1915072351694107,
-0.3070210814476013,
-0.22509080171585083,
-0.24198052287101746,
0.2735801935195923,
-0.23093709349632263,
-0.15111808478832245,
0.16282227635383606,
-0.0024770572781562805,
0.16756442189216614,
0.1298668086528778,
-0.09820345044136047,
0.01165773719549179,
0.5087924003601074,
0.1298428624868393,
-0.08270794153213501,
-0.10886909067630768,
-0.4329911172389984,
-0.09314610809087753,
0.29544857144355774,
-0.3275839388370514,
0.022398030385375023,
-0.29667139053344727,
-0.1493009328842163,
-0.24139341711997986,
0.1802440583705902,
0.4253828227519989,
0.6085180044174194,
-0.07977667450904846,
0.06859035789966583,
0.03587433695793152,
0.05712442845106125,
-0.16099026799201965,
0.33882713317871094,
-0.11436091363430023,
0.20525050163269043,
0.06808300316333771,
-0.021714774891734123,
-0.17201519012451172,
-0.06405703723430634,
0.01779353991150856,
0.2640703618526459,
0.17106828093528748,
0.1635032594203949,
-0.2422293722629547,
-0.254404753446579,
-0.05350165069103241,
0.03030497580766678,
-0.13566389679908752,
-0.12872061133384705,
0.3978264331817627,
-0.3950274586677551,
0.1284877061843872,
-0.12100204080343246,
0.031105682253837585,
-0.33333253860473633,
0.42197051644325256,
0.1288328468799591,
0.2286454141139984,
-0.4557034373283386,
-0.16959965229034424,
-0.45216718316078186,
0.1259704977273941,
-0.6484366655349731,
0.3481282889842987,
0.001306882593780756,
0.11903274059295654,
-0.027990110218524933,
-0.012690551578998566,
0.17844463884830475,
-0.09670230001211166,
-0.16227275133132935,
0.19989825785160065,
-0.22432778775691986,
0.060052089393138885,
-0.33590376377105713,
-0.11058448255062103,
0.14139869809150696,
-0.4349132776260376,
0.3782953917980194,
-0.3385888934135437,
0.06000123172998428,
-0.16196151077747345,
0.09918320178985596,
0.1155298501253128,
0.23758073151111603,
0.5331745147705078,
0.43157920241355896,
0.333163857460022,
-0.1517583429813385,
-0.04995250701904297,
-0.18371818959712982,
-0.2088991403579712,
-0.0783286914229393,
0.12939158082008362,
0.11911742389202118,
0.16490119695663452,
-0.22826369106769562,
-0.05504786595702171,
-0.2991815507411957,
0.029244616627693176,
-0.09400759637355804,
0.14573627710342407,
0.08316310495138168,
-0.31368255615234375,
-0.2114546000957489,
0.2175401896238327,
0.07346801459789276,
0.28625017404556274,
0.05084313452243805,
0.061676524579524994,
-0.1026216447353363,
-0.15643642842769623,
0.39057081937789917,
-0.5741915106773376,
-0.3926384747028351,
-0.3124678134918213,
0.25739729404449463,
-0.11485626548528671,
0.14152240753173828,
0.030655398964881897,
-0.1947881281375885,
0.2509527802467346,
0.11846840381622314,
-0.22985005378723145,
0.08552776277065277,
-0.27335748076438904,
-0.054997894912958145,
0.07282336056232452,
0.0326528437435627,
0.07025713473558426,
-0.5396555066108704,
0.2391209900379181,
-0.12087467312812805
] |
https://github.com/huggingface/datasets/issues/2239 | Error loading wikihow dataset | Hi @odellus, thanks for reporting.
The `wikihow` dataset has 2 versions:
- `all`: Consisting of the concatenation of all paragraphs as the articles and the bold lines as the reference summaries.
- `sep`: Consisting of each paragraph and its summary.
Therefore, in order to load it, you have to specify which version you would like, for example:
```python
dataset = load_dataset('wikihow', 'all')
```
Please, tell me if this solves your problem. | ## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
``` | 71 | Error loading wikihow dataset
## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
```
Hi @odellus, thanks for reporting.
The `wikihow` dataset has 2 versions:
- `all`: Consisting of the concatenation of all paragraphs as the articles and the bold lines as the reference summaries.
- `sep`: Consisting of each paragraph and its summary.
Therefore, in order to load it, you have to specify which version you would like, for example:
```python
dataset = load_dataset('wikihow', 'all')
```
Please, tell me if this solves your problem. | [
-0.22749952971935272,
0.37022334337234497,
0.023809470236301422,
0.398794949054718,
0.2537098526954651,
0.27477896213531494,
0.4276535212993622,
0.439177542924881,
0.2458432912826538,
0.09350797533988953,
0.21628527343273163,
0.3853777050971985,
-0.012894685380160809,
0.18638677895069122,
0.12050217390060425,
-0.2686142027378082,
0.011066712439060211,
0.10452491044998169,
0.22370949387550354,
0.18902334570884705,
-0.34488871693611145,
0.0065286532044410706,
-0.23297789692878723,
0.10401520133018494,
-0.3400694727897644,
0.013066571205854416,
-0.0981440544128418,
0.1813105344772339,
-0.053303614258766174,
-0.5415439009666443,
0.47575604915618896,
-0.11857886612415314,
0.25181546807289124,
0.40391814708709717,
-0.00011260442261118442,
0.1877029687166214,
0.5060685873031616,
0.034202948212623596,
-0.44216665625572205,
-0.09445947408676147,
-0.3161357045173645,
-0.12283924221992493,
0.24206867814064026,
-0.13372014462947845,
-0.03265528008341789,
-0.025875918567180634,
0.004086066037416458,
0.03585946559906006,
0.2355373352766037,
0.265296995639801,
0.1653248369693756,
-0.11961863934993744,
0.37455955147743225,
-0.13606275618076324,
0.19424878060817719,
-0.09333066642284393,
-0.08691681921482086,
0.16224688291549683,
0.07398144155740738,
-0.23821723461151123,
0.1115439236164093,
0.20557311177253723,
-0.1832123100757599,
0.0634830892086029,
0.5792301893234253,
-0.00810143444687128,
0.2564977705478668,
-0.33299100399017334,
0.26322969794273376,
0.38396674394607544,
0.8194904923439026,
-0.22499766945838928,
-0.23843912780284882,
-0.21823352575302124,
0.17277173697948456,
0.16447226703166962,
0.38750338554382324,
0.30610260367393494,
-0.37484586238861084,
0.036018263548612595,
-0.03771398961544037,
-0.2557300925254822,
-0.05808757245540619,
0.28082430362701416,
-0.29466772079467773,
0.4108179211616516,
-0.07782414555549622,
0.1745569109916687,
-0.2258382886648178,
-0.06426961719989777,
0.2035178393125534,
-0.32481148838996887,
-0.23762932419776917,
0.30157631635665894,
-0.13841181993484497,
0.07686956226825714,
0.15853533148765564,
0.1928260326385498,
0.09944187849760056,
-0.03713344782590866,
-0.10083817690610886,
-0.19082266092300415,
0.1564055234193802,
0.13848382234573364,
0.44426229596138,
0.23397159576416016,
-0.013331875205039978,
0.206276535987854,
0.12074942886829376,
0.30488499999046326,
-0.1984938234090805,
-0.11413393169641495,
-0.20128986239433289,
-0.2741612195968628,
0.1328350454568863,
-0.22969093918800354,
0.3544214963912964,
-0.03382930904626846,
-0.2546578645706177,
0.20016136765480042,
0.01163766160607338,
0.07303708791732788,
0.03479447960853577,
0.41595691442489624,
-0.20648093521595,
0.1446116864681244,
0.2597595453262329,
0.2927666902542114,
0.10251545161008835,
0.12348826974630356,
-0.10050905495882034,
0.09075987339019775,
-0.05587708204984665,
-0.031838081777095795,
0.15006180107593536,
-0.19306035339832306,
0.2553028464317322,
0.1958254724740982,
0.1250934600830078,
-0.28469350934028625,
-0.009354855865240097,
0.22846218943595886,
-0.23564928770065308,
0.34940361976623535,
0.07262955605983734,
0.14317485690116882,
0.1701950877904892,
-0.647598922252655,
-0.11525670439004898,
0.16333860158920288,
-0.394199937582016,
-0.3855850398540497,
-0.2756713628768921,
0.21846573054790497,
-0.040343236178159714,
0.045025281608104706,
-0.4196183979511261,
-0.17858918011188507,
0.2975122928619385,
-0.291059672832489,
-0.23906323313713074,
-0.06991539895534515,
0.1259680539369583,
-0.1256432682275772,
0.35691553354263306,
0.47823911905288696,
-0.39086881279945374,
-0.03350840508937836,
-0.09300588816404343,
0.043877534568309784,
-0.05722469836473465,
-0.3101462423801422,
-0.3554074168205261,
0.49713921546936035,
-0.2884572446346283,
-0.28746527433395386,
0.2937494218349457,
-0.4576174020767212,
-0.28927305340766907,
0.29007455706596375,
0.019208505749702454,
0.33320051431655884,
-0.022911101579666138,
-0.16921041905879974,
-0.16821980476379395,
-0.08369956165552139,
0.2327568084001541,
0.22218772768974304,
-0.005590369924902916,
0.055096931755542755,
-0.19408540427684784,
-0.23643484711647034,
0.10460980981588364,
0.18648666143417358,
0.051164545118808746,
0.17486846446990967,
0.04371203854680061,
0.024244721978902817,
0.12567079067230225,
-0.16263532638549805,
-0.04512413591146469,
0.12033898383378983,
-0.02816968783736229,
-0.004744470119476318,
0.0483274944126606,
0.002342633903026581,
-0.46107566356658936,
0.34842824935913086,
0.04336749017238617,
0.10834093391895294,
-0.1505928784608841,
-0.05700785294175148,
-0.2748938500881195,
0.15632927417755127,
-0.5284995436668396,
-0.17723967134952545,
0.1664675921201706,
0.06184310466051102,
-0.14976532757282257,
-0.01851309835910797,
-0.12401770055294037,
0.04310697317123413,
-0.3334241807460785,
0.12228969484567642,
-0.20709539949893951,
0.1706794798374176,
-0.13069742918014526,
-0.05659039318561554,
-0.01118018850684166,
0.14893501996994019,
0.03466884419322014,
0.08487450331449509,
-0.2042342722415924,
0.3257361948490143,
0.05683712661266327,
0.11240359395742416,
-0.04447022080421448,
-0.06888575851917267,
-0.03738974779844284,
-0.1064232736825943,
0.054835885763168335,
0.22690962255001068,
0.24774253368377686,
-0.0861581340432167,
-0.09201694279909134,
0.23090232908725739,
0.054010119289159775,
0.38701143860816956,
0.029232583940029144,
0.2674029469490051,
0.20573773980140686,
-0.014384765177965164,
-0.024043872952461243,
0.005802668631076813,
0.12159514427185059,
0.20890329778194427,
0.07983186841011047,
-0.08362344652414322,
-0.16141682863235474,
-0.1593150496482849,
0.09815014898777008,
0.06214364990592003,
0.07633121311664581,
0.026456143707036972,
-0.26560094952583313,
0.054238952696323395,
0.010232923552393913,
0.2679118812084198,
0.22978569567203522,
0.05427468195557594,
-0.28230321407318115,
0.029404813423752785,
-0.08946516364812851,
-0.022446639835834503,
0.36176982522010803,
0.13211241364479065,
0.1846684068441391,
0.3180978298187256,
-0.12167031317949295,
0.14289434254169464,
-0.06018924340605736,
-0.2058873325586319,
-0.10901975631713867,
0.20142148435115814,
-0.4196123480796814,
0.0011623948812484741,
0.05542675405740738,
-0.12873174250125885,
-0.04881349951028824,
-0.2332875281572342,
-0.269505113363266,
-0.42615485191345215,
-0.09864117205142975,
0.0017244517803192139,
-0.14815740287303925,
0.1272241771221161,
-0.14936108887195587,
0.102741539478302,
0.027610694989562035,
-0.2686440348625183,
-0.23085050284862518,
-0.36501723527908325,
-0.31693795323371887,
-0.010910941287875175,
0.4290110170841217,
0.014575980603694916,
0.1516433209180832,
-0.3627825379371643,
-0.04184222221374512,
-0.06652787327766418,
-0.1820356845855713,
0.15005585551261902,
0.08053608238697052,
0.7029446363449097,
0.16696617007255554,
0.45500892400741577,
0.06907238066196442,
-0.40218138694763184,
0.3672316372394562,
0.05599121004343033,
0.1430450826883316,
0.2535715401172638,
-0.02627529762685299,
-0.23383665084838867,
0.0019271895289421082,
-0.32622790336608887,
-0.1746634691953659,
-0.27576249837875366,
-0.2295166701078415,
0.3282874524593353,
0.0036656223237514496,
0.5006691217422485,
0.29816189408302307,
0.1741962730884552,
0.0721939280629158,
0.2934996485710144,
-0.04133879765868187,
-0.6339871287345886,
0.3558412194252014,
-0.1906135529279709,
-0.27516722679138184,
0.21339628100395203,
-0.13210615515708923,
0.22319290041923523,
-0.08692768216133118,
-0.5945402979850769,
-0.018175840377807617,
-0.08567653596401215,
0.27743691205978394,
-0.021245233714580536,
0.17465342581272125,
0.08035227656364441,
0.18103747069835663,
0.04389292001724243,
-0.16777248680591583,
0.04805275425314903,
-0.140112966299057,
-0.10155832022428513,
0.19614101946353912,
0.12600310146808624,
0.1382961869239807,
-0.3169758915901184,
0.6540641188621521,
0.090955451130867,
0.13369756937026978,
0.2820765972137451,
-0.23096701502799988,
0.23726971447467804,
-0.29383671283721924,
-0.36607906222343445,
0.142866313457489,
-0.16690167784690857,
-0.11787723749876022,
0.21682986617088318,
0.04580553248524666,
-0.24758540093898773,
-0.34518885612487793,
0.01674797758460045,
-0.06485442817211151,
-0.33607086539268494,
0.0050022173672914505,
-0.02075762301683426,
0.11353301256895065,
0.18588609993457794,
0.18226438760757446,
-0.27038195729255676,
-0.23459118604660034,
0.15487340092658997,
0.42317652702331543,
0.008748814463615417,
-0.11731503903865814,
0.034741174429655075,
-0.14646802842617035,
-0.26323768496513367,
0.06736194342374802,
0.14350973069667816,
0.030182451009750366,
0.06925433874130249,
0.16013756394386292,
-0.07536710798740387,
-0.04337383434176445,
0.4331783056259155,
-0.23907382786273956,
0.2342217117547989,
0.22000186145305634,
0.2694021761417389,
-0.3107820749282837,
-0.10341840237379074,
-0.02515306882560253,
0.06292002648115158,
0.01185275986790657,
0.16882498562335968,
-0.08875029534101486,
-0.09345614910125732,
0.13115514814853668,
0.4144937992095947,
-0.2235662341117859,
-0.26989585161209106,
-0.24877585470676422,
-0.06875073909759521,
-0.4285559356212616,
-0.20236968994140625,
-0.03205680102109909,
0.46736618876457214,
-0.03267456591129303,
-0.06476355344057083,
-0.2586670517921448,
0.2108553946018219,
-0.05099456012248993,
0.11314946413040161,
0.34061822295188904,
0.032199639827013016,
0.13241063058376312,
0.10042760521173477,
0.13803201913833618,
0.11589943617582321,
0.5343759059906006,
0.2168561816215515,
-0.22388389706611633,
-0.22283896803855896,
-0.08517951518297195,
0.03130750358104706,
0.17842140793800354,
-0.22257225215435028,
-0.4367469549179077,
-0.15295983850955963,
0.07788487523794174,
-0.2856152653694153,
0.010268410667777061,
0.16093872487545013,
-0.009693938307464123,
-0.2836460769176483,
-0.5890882611274719,
0.6666557192802429,
-0.03776344656944275,
-0.016009755432605743,
0.3778902292251587,
0.2793261408805847,
-0.46823087334632874,
0.2915447950363159,
0.0237022265791893,
0.7756503224372864,
0.1787300556898117,
0.1894199550151825,
0.38533544540405273,
0.20119963586330414,
0.07713949680328369,
-0.33199483156204224,
-0.02822859212756157,
-0.26729753613471985,
-0.1985025852918625,
-0.06535416841506958,
-0.06039300933480263,
0.22443640232086182,
0.044463999569416046,
-0.34156692028045654,
0.15634360909461975,
-0.23564675450325012,
0.18245936930179596,
0.10320001095533371,
0.12547838687896729,
-0.26543405652046204,
-0.22164557874202728,
-0.32952603697776794,
0.10369753837585449,
-0.02628263086080551,
0.1340884566307068,
-0.13267168402671814,
0.04208739846944809,
0.03195120021700859,
-0.20099501311779022,
-0.2762559950351715,
0.25674811005592346,
-0.1589357852935791,
0.12369214743375778,
0.04842182248830795,
-0.1378915011882782,
0.22816601395606995,
0.582956850528717,
-0.15935905277729034,
0.2440934181213379,
-0.34770962595939636,
0.3507629334926605,
-0.19158852100372314,
-0.059512875974178314,
-0.005064912140369415,
0.11829982697963715,
0.3890744149684906,
-0.008664153516292572,
-0.1870107650756836,
0.07769697159528732,
-0.38678842782974243,
-0.07935422658920288,
-0.00037266314029693604,
-0.06029018759727478,
0.24956780672073364,
-0.377828449010849,
-0.3229055106639862,
-0.14036530256271362,
0.14963500201702118,
-0.22041426599025726,
0.1755172312259674,
0.08481790125370026,
-0.3581293821334839,
0.044924262911081314,
0.08204293251037598,
-0.2780803442001343,
0.06138039752840996,
0.15049520134925842,
-0.1318150758743286,
0.17696167528629303,
0.6715326309204102,
0.15158425271511078,
-0.08358386158943176,
-0.1752031445503235,
0.34024620056152344,
0.2391413003206253,
-0.3221227526664734,
0.07643632590770721,
0.1584533005952835,
0.17200897634029388,
-0.1837610900402069,
0.5057666301727295,
0.011120758950710297,
-0.03613479435443878,
0.12370441854000092,
-0.611213207244873,
-0.18004892766475677,
0.11549577116966248,
0.08478976041078568,
0.2263803482055664,
-0.07763814926147461,
-0.09457443654537201,
0.12795375287532806,
-0.0588708221912384,
-0.2863120436668396,
-0.05879952758550644,
-0.22544251382350922,
0.12438767403364182,
0.18439306318759918,
0.3527339994907379,
-0.07729929685592651,
-0.10344316065311432,
0.1885666400194168,
-0.293972909450531,
0.07755859196186066,
-0.26478976011276245,
-0.18147093057632446,
0.15759748220443726,
0.15621629357337952,
-0.05261128395795822,
0.14968834817409515,
-0.19116395711898804,
-0.1454010009765625,
-0.30248749256134033,
0.23011794686317444,
-0.18788668513298035,
-0.18932215869426727,
0.12736041843891144,
0.003984492272138596,
0.25139331817626953,
-0.254719614982605,
0.23074117302894592,
-0.1212226003408432,
0.3786001205444336,
-0.06941425800323486,
0.06383301317691803,
0.07541787624359131,
0.07005339860916138,
0.06367969512939453,
0.1784890592098236,
-0.46044594049453735,
0.24788513779640198,
0.4021209180355072,
-0.5224173665046692,
0.31029754877090454,
0.28878873586654663,
0.04202895611524582,
0.4635988473892212,
-0.4118160307407379,
0.2062280774116516,
0.2217870056629181,
0.20368564128875732,
-0.24389055371284485,
-0.02280309423804283,
0.37165719270706177,
0.034961748868227005,
-0.056030385196208954,
-0.005638621747493744,
-0.03072778694331646,
-0.36724036931991577,
-0.3781543970108032,
0.09171673655509949,
0.22376903891563416,
-0.3046436905860901,
0.3425472378730774,
0.6575303673744202,
0.045131850987672806,
0.17592594027519226,
-0.10878627747297287,
0.20092850923538208,
-0.10537915676832199,
0.6286641359329224,
-0.22320854663848877,
0.05224543809890747,
0.07751908898353577,
0.05447520315647125,
0.021548844873905182,
-0.33886632323265076,
0.4037070572376251,
0.24713826179504395,
-0.21438327431678772,
0.07792740315198898,
-0.05262376368045807,
0.007078640162944794,
-0.104194775223732,
0.11155763268470764,
-0.22872236371040344,
-0.05958399549126625,
-0.1917317807674408,
-0.18662379682064056,
-0.3219810128211975,
-0.29547378420829773,
0.1318516731262207,
0.20576918125152588,
0.022587457671761513,
-0.22275738418102264,
-0.029287271201610565,
0.13198603689670563,
-0.16303180158138275,
-0.47360947728157043,
0.3834293484687805,
0.18824121356010437,
0.03133926913142204,
-0.2784055769443512,
0.05105075240135193,
0.11625868082046509,
0.04568389430642128,
0.11390407383441925,
0.20921920239925385,
0.6908440589904785,
0.4375933110713959,
-0.22052711248397827,
0.12455328553915024,
0.09273867309093475,
-0.23737573623657227,
-0.10929769277572632,
0.06664448976516724,
0.010218769311904907,
0.1698521375656128,
0.32799413800239563,
0.1993827372789383,
-0.1710318922996521,
-0.1310655027627945,
0.11978977918624878,
0.18611973524093628,
-0.38832494616508484,
0.28116822242736816,
-0.18931885063648224,
-0.14612239599227905,
-0.12234757840633392,
0.09901160001754761,
-0.25632837414741516,
0.07087565213441849,
0.4077409505844116,
0.2742966115474701,
0.07257423549890518,
-0.12498249858617783,
0.06506970524787903,
-0.10794009268283844,
0.49874308705329895,
0.30136486887931824,
0.13512259721755981,
-0.3123224973678589,
-0.06837829202413559,
-0.5570697784423828,
0.06166042760014534,
0.06422663480043411,
-0.29563435912132263,
0.14041602611541748,
-0.05015610158443451,
-0.1312006711959839,
0.19871443510055542,
0.002037927508354187,
-0.21340569853782654,
0.2585369944572449,
0.2531549036502838,
-0.11393016576766968,
-0.5248925089836121,
0.11352729052305222,
0.22564318776130676,
-0.10418853908777237,
-0.35736823081970215,
-0.09461410343647003,
-0.36400288343429565,
0.026480264961719513,
0.07796908915042877,
0.023767776787281036,
0.20496384799480438,
-0.1838623583316803,
0.30861806869506836,
-0.06120235472917557,
0.5150400996208191,
-0.08273252844810486,
-0.04765482246875763,
-0.3289961814880371,
-0.28523489832878113,
-0.23132918775081635,
0.2595258057117462,
-0.03186227008700371,
0.3192122280597687,
-0.22104297578334808,
0.06577232480049133,
-0.27188006043434143,
-0.07851617783308029,
0.023978613317012787,
0.392100989818573,
-0.33121752738952637,
-0.07854031771421432,
-0.06293173134326935,
0.19229662418365479,
0.2366017997264862,
0.06477705389261246,
-0.128999724984169,
0.22951552271842957,
-0.07418910413980484,
-0.39850422739982605,
0.34203004837036133,
-0.5386349558830261,
-0.4959174692630768,
-0.019890569150447845,
-0.024396181106567383,
-0.40063515305519104,
-0.08440335839986801,
-0.5008683800697327,
0.14801257848739624,
0.36232897639274597,
-0.03703732788562775,
-0.23161397874355316,
-0.06454099714756012,
0.09312258660793304,
0.16665826737880707,
-0.08981555700302124,
0.16900596022605896,
-0.027207616716623306,
-0.11262191087007523,
-0.11060529947280884,
-0.2542306184768677
] |
https://github.com/huggingface/datasets/issues/2239 | Error loading wikihow dataset | Good call out. I did try that and that's when it told me to download the
dataset. Don't believe I have tried it with local files. Will try first
thing in the morning and get back to you.
On Mon, Apr 19, 2021, 11:17 PM Albert Villanova del Moral <
***@***.***> wrote:
> Hi @odellus <https://github.com/odellus>, thanks for reporting.
>
> The wikihow dataset has 2 versions:
>
> - all: Consisting of the concatenation of all paragraphs as the
> articles and the bold lines as the reference summaries.
> - sep: Consisting of each paragraph and its summary.
>
> Therefore, in order to load it, you have to specify which version you
> would like, for example:
>
> dataset = load_dataset('wikihow', 'all')
>
> Please, tell me if this solves your problem.
>
> β
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2239#issuecomment-823004146>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDYI3HVRTBI2QT3BOG262DTJUL57ANCNFSM43GV5BZQ>
> .
>
| ## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
``` | 168 | Error loading wikihow dataset
## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
```
Good call out. I did try that and that's when it told me to download the
dataset. Don't believe I have tried it with local files. Will try first
thing in the morning and get back to you.
On Mon, Apr 19, 2021, 11:17 PM Albert Villanova del Moral <
***@***.***> wrote:
> Hi @odellus <https://github.com/odellus>, thanks for reporting.
>
> The wikihow dataset has 2 versions:
>
> - all: Consisting of the concatenation of all paragraphs as the
> articles and the bold lines as the reference summaries.
> - sep: Consisting of each paragraph and its summary.
>
> Therefore, in order to load it, you have to specify which version you
> would like, for example:
>
> dataset = load_dataset('wikihow', 'all')
>
> Please, tell me if this solves your problem.
>
> β
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/2239#issuecomment-823004146>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABDYI3HVRTBI2QT3BOG262DTJUL57ANCNFSM43GV5BZQ>
> .
>
| [
-0.22749952971935272,
0.37022334337234497,
0.023809470236301422,
0.398794949054718,
0.2537098526954651,
0.27477896213531494,
0.4276535212993622,
0.439177542924881,
0.2458432912826538,
0.09350797533988953,
0.21628527343273163,
0.3853777050971985,
-0.012894685380160809,
0.18638677895069122,
0.12050217390060425,
-0.2686142027378082,
0.011066712439060211,
0.10452491044998169,
0.22370949387550354,
0.18902334570884705,
-0.34488871693611145,
0.0065286532044410706,
-0.23297789692878723,
0.10401520133018494,
-0.3400694727897644,
0.013066571205854416,
-0.0981440544128418,
0.1813105344772339,
-0.053303614258766174,
-0.5415439009666443,
0.47575604915618896,
-0.11857886612415314,
0.25181546807289124,
0.40391814708709717,
-0.00011260442261118442,
0.1877029687166214,
0.5060685873031616,
0.034202948212623596,
-0.44216665625572205,
-0.09445947408676147,
-0.3161357045173645,
-0.12283924221992493,
0.24206867814064026,
-0.13372014462947845,
-0.03265528008341789,
-0.025875918567180634,
0.004086066037416458,
0.03585946559906006,
0.2355373352766037,
0.265296995639801,
0.1653248369693756,
-0.11961863934993744,
0.37455955147743225,
-0.13606275618076324,
0.19424878060817719,
-0.09333066642284393,
-0.08691681921482086,
0.16224688291549683,
0.07398144155740738,
-0.23821723461151123,
0.1115439236164093,
0.20557311177253723,
-0.1832123100757599,
0.0634830892086029,
0.5792301893234253,
-0.00810143444687128,
0.2564977705478668,
-0.33299100399017334,
0.26322969794273376,
0.38396674394607544,
0.8194904923439026,
-0.22499766945838928,
-0.23843912780284882,
-0.21823352575302124,
0.17277173697948456,
0.16447226703166962,
0.38750338554382324,
0.30610260367393494,
-0.37484586238861084,
0.036018263548612595,
-0.03771398961544037,
-0.2557300925254822,
-0.05808757245540619,
0.28082430362701416,
-0.29466772079467773,
0.4108179211616516,
-0.07782414555549622,
0.1745569109916687,
-0.2258382886648178,
-0.06426961719989777,
0.2035178393125534,
-0.32481148838996887,
-0.23762932419776917,
0.30157631635665894,
-0.13841181993484497,
0.07686956226825714,
0.15853533148765564,
0.1928260326385498,
0.09944187849760056,
-0.03713344782590866,
-0.10083817690610886,
-0.19082266092300415,
0.1564055234193802,
0.13848382234573364,
0.44426229596138,
0.23397159576416016,
-0.013331875205039978,
0.206276535987854,
0.12074942886829376,
0.30488499999046326,
-0.1984938234090805,
-0.11413393169641495,
-0.20128986239433289,
-0.2741612195968628,
0.1328350454568863,
-0.22969093918800354,
0.3544214963912964,
-0.03382930904626846,
-0.2546578645706177,
0.20016136765480042,
0.01163766160607338,
0.07303708791732788,
0.03479447960853577,
0.41595691442489624,
-0.20648093521595,
0.1446116864681244,
0.2597595453262329,
0.2927666902542114,
0.10251545161008835,
0.12348826974630356,
-0.10050905495882034,
0.09075987339019775,
-0.05587708204984665,
-0.031838081777095795,
0.15006180107593536,
-0.19306035339832306,
0.2553028464317322,
0.1958254724740982,
0.1250934600830078,
-0.28469350934028625,
-0.009354855865240097,
0.22846218943595886,
-0.23564928770065308,
0.34940361976623535,
0.07262955605983734,
0.14317485690116882,
0.1701950877904892,
-0.647598922252655,
-0.11525670439004898,
0.16333860158920288,
-0.394199937582016,
-0.3855850398540497,
-0.2756713628768921,
0.21846573054790497,
-0.040343236178159714,
0.045025281608104706,
-0.4196183979511261,
-0.17858918011188507,
0.2975122928619385,
-0.291059672832489,
-0.23906323313713074,
-0.06991539895534515,
0.1259680539369583,
-0.1256432682275772,
0.35691553354263306,
0.47823911905288696,
-0.39086881279945374,
-0.03350840508937836,
-0.09300588816404343,
0.043877534568309784,
-0.05722469836473465,
-0.3101462423801422,
-0.3554074168205261,
0.49713921546936035,
-0.2884572446346283,
-0.28746527433395386,
0.2937494218349457,
-0.4576174020767212,
-0.28927305340766907,
0.29007455706596375,
0.019208505749702454,
0.33320051431655884,
-0.022911101579666138,
-0.16921041905879974,
-0.16821980476379395,
-0.08369956165552139,
0.2327568084001541,
0.22218772768974304,
-0.005590369924902916,
0.055096931755542755,
-0.19408540427684784,
-0.23643484711647034,
0.10460980981588364,
0.18648666143417358,
0.051164545118808746,
0.17486846446990967,
0.04371203854680061,
0.024244721978902817,
0.12567079067230225,
-0.16263532638549805,
-0.04512413591146469,
0.12033898383378983,
-0.02816968783736229,
-0.004744470119476318,
0.0483274944126606,
0.002342633903026581,
-0.46107566356658936,
0.34842824935913086,
0.04336749017238617,
0.10834093391895294,
-0.1505928784608841,
-0.05700785294175148,
-0.2748938500881195,
0.15632927417755127,
-0.5284995436668396,
-0.17723967134952545,
0.1664675921201706,
0.06184310466051102,
-0.14976532757282257,
-0.01851309835910797,
-0.12401770055294037,
0.04310697317123413,
-0.3334241807460785,
0.12228969484567642,
-0.20709539949893951,
0.1706794798374176,
-0.13069742918014526,
-0.05659039318561554,
-0.01118018850684166,
0.14893501996994019,
0.03466884419322014,
0.08487450331449509,
-0.2042342722415924,
0.3257361948490143,
0.05683712661266327,
0.11240359395742416,
-0.04447022080421448,
-0.06888575851917267,
-0.03738974779844284,
-0.1064232736825943,
0.054835885763168335,
0.22690962255001068,
0.24774253368377686,
-0.0861581340432167,
-0.09201694279909134,
0.23090232908725739,
0.054010119289159775,
0.38701143860816956,
0.029232583940029144,
0.2674029469490051,
0.20573773980140686,
-0.014384765177965164,
-0.024043872952461243,
0.005802668631076813,
0.12159514427185059,
0.20890329778194427,
0.07983186841011047,
-0.08362344652414322,
-0.16141682863235474,
-0.1593150496482849,
0.09815014898777008,
0.06214364990592003,
0.07633121311664581,
0.026456143707036972,
-0.26560094952583313,
0.054238952696323395,
0.010232923552393913,
0.2679118812084198,
0.22978569567203522,
0.05427468195557594,
-0.28230321407318115,
0.029404813423752785,
-0.08946516364812851,
-0.022446639835834503,
0.36176982522010803,
0.13211241364479065,
0.1846684068441391,
0.3180978298187256,
-0.12167031317949295,
0.14289434254169464,
-0.06018924340605736,
-0.2058873325586319,
-0.10901975631713867,
0.20142148435115814,
-0.4196123480796814,
0.0011623948812484741,
0.05542675405740738,
-0.12873174250125885,
-0.04881349951028824,
-0.2332875281572342,
-0.269505113363266,
-0.42615485191345215,
-0.09864117205142975,
0.0017244517803192139,
-0.14815740287303925,
0.1272241771221161,
-0.14936108887195587,
0.102741539478302,
0.027610694989562035,
-0.2686440348625183,
-0.23085050284862518,
-0.36501723527908325,
-0.31693795323371887,
-0.010910941287875175,
0.4290110170841217,
0.014575980603694916,
0.1516433209180832,
-0.3627825379371643,
-0.04184222221374512,
-0.06652787327766418,
-0.1820356845855713,
0.15005585551261902,
0.08053608238697052,
0.7029446363449097,
0.16696617007255554,
0.45500892400741577,
0.06907238066196442,
-0.40218138694763184,
0.3672316372394562,
0.05599121004343033,
0.1430450826883316,
0.2535715401172638,
-0.02627529762685299,
-0.23383665084838867,
0.0019271895289421082,
-0.32622790336608887,
-0.1746634691953659,
-0.27576249837875366,
-0.2295166701078415,
0.3282874524593353,
0.0036656223237514496,
0.5006691217422485,
0.29816189408302307,
0.1741962730884552,
0.0721939280629158,
0.2934996485710144,
-0.04133879765868187,
-0.6339871287345886,
0.3558412194252014,
-0.1906135529279709,
-0.27516722679138184,
0.21339628100395203,
-0.13210615515708923,
0.22319290041923523,
-0.08692768216133118,
-0.5945402979850769,
-0.018175840377807617,
-0.08567653596401215,
0.27743691205978394,
-0.021245233714580536,
0.17465342581272125,
0.08035227656364441,
0.18103747069835663,
0.04389292001724243,
-0.16777248680591583,
0.04805275425314903,
-0.140112966299057,
-0.10155832022428513,
0.19614101946353912,
0.12600310146808624,
0.1382961869239807,
-0.3169758915901184,
0.6540641188621521,
0.090955451130867,
0.13369756937026978,
0.2820765972137451,
-0.23096701502799988,
0.23726971447467804,
-0.29383671283721924,
-0.36607906222343445,
0.142866313457489,
-0.16690167784690857,
-0.11787723749876022,
0.21682986617088318,
0.04580553248524666,
-0.24758540093898773,
-0.34518885612487793,
0.01674797758460045,
-0.06485442817211151,
-0.33607086539268494,
0.0050022173672914505,
-0.02075762301683426,
0.11353301256895065,
0.18588609993457794,
0.18226438760757446,
-0.27038195729255676,
-0.23459118604660034,
0.15487340092658997,
0.42317652702331543,
0.008748814463615417,
-0.11731503903865814,
0.034741174429655075,
-0.14646802842617035,
-0.26323768496513367,
0.06736194342374802,
0.14350973069667816,
0.030182451009750366,
0.06925433874130249,
0.16013756394386292,
-0.07536710798740387,
-0.04337383434176445,
0.4331783056259155,
-0.23907382786273956,
0.2342217117547989,
0.22000186145305634,
0.2694021761417389,
-0.3107820749282837,
-0.10341840237379074,
-0.02515306882560253,
0.06292002648115158,
0.01185275986790657,
0.16882498562335968,
-0.08875029534101486,
-0.09345614910125732,
0.13115514814853668,
0.4144937992095947,
-0.2235662341117859,
-0.26989585161209106,
-0.24877585470676422,
-0.06875073909759521,
-0.4285559356212616,
-0.20236968994140625,
-0.03205680102109909,
0.46736618876457214,
-0.03267456591129303,
-0.06476355344057083,
-0.2586670517921448,
0.2108553946018219,
-0.05099456012248993,
0.11314946413040161,
0.34061822295188904,
0.032199639827013016,
0.13241063058376312,
0.10042760521173477,
0.13803201913833618,
0.11589943617582321,
0.5343759059906006,
0.2168561816215515,
-0.22388389706611633,
-0.22283896803855896,
-0.08517951518297195,
0.03130750358104706,
0.17842140793800354,
-0.22257225215435028,
-0.4367469549179077,
-0.15295983850955963,
0.07788487523794174,
-0.2856152653694153,
0.010268410667777061,
0.16093872487545013,
-0.009693938307464123,
-0.2836460769176483,
-0.5890882611274719,
0.6666557192802429,
-0.03776344656944275,
-0.016009755432605743,
0.3778902292251587,
0.2793261408805847,
-0.46823087334632874,
0.2915447950363159,
0.0237022265791893,
0.7756503224372864,
0.1787300556898117,
0.1894199550151825,
0.38533544540405273,
0.20119963586330414,
0.07713949680328369,
-0.33199483156204224,
-0.02822859212756157,
-0.26729753613471985,
-0.1985025852918625,
-0.06535416841506958,
-0.06039300933480263,
0.22443640232086182,
0.044463999569416046,
-0.34156692028045654,
0.15634360909461975,
-0.23564675450325012,
0.18245936930179596,
0.10320001095533371,
0.12547838687896729,
-0.26543405652046204,
-0.22164557874202728,
-0.32952603697776794,
0.10369753837585449,
-0.02628263086080551,
0.1340884566307068,
-0.13267168402671814,
0.04208739846944809,
0.03195120021700859,
-0.20099501311779022,
-0.2762559950351715,
0.25674811005592346,
-0.1589357852935791,
0.12369214743375778,
0.04842182248830795,
-0.1378915011882782,
0.22816601395606995,
0.582956850528717,
-0.15935905277729034,
0.2440934181213379,
-0.34770962595939636,
0.3507629334926605,
-0.19158852100372314,
-0.059512875974178314,
-0.005064912140369415,
0.11829982697963715,
0.3890744149684906,
-0.008664153516292572,
-0.1870107650756836,
0.07769697159528732,
-0.38678842782974243,
-0.07935422658920288,
-0.00037266314029693604,
-0.06029018759727478,
0.24956780672073364,
-0.377828449010849,
-0.3229055106639862,
-0.14036530256271362,
0.14963500201702118,
-0.22041426599025726,
0.1755172312259674,
0.08481790125370026,
-0.3581293821334839,
0.044924262911081314,
0.08204293251037598,
-0.2780803442001343,
0.06138039752840996,
0.15049520134925842,
-0.1318150758743286,
0.17696167528629303,
0.6715326309204102,
0.15158425271511078,
-0.08358386158943176,
-0.1752031445503235,
0.34024620056152344,
0.2391413003206253,
-0.3221227526664734,
0.07643632590770721,
0.1584533005952835,
0.17200897634029388,
-0.1837610900402069,
0.5057666301727295,
0.011120758950710297,
-0.03613479435443878,
0.12370441854000092,
-0.611213207244873,
-0.18004892766475677,
0.11549577116966248,
0.08478976041078568,
0.2263803482055664,
-0.07763814926147461,
-0.09457443654537201,
0.12795375287532806,
-0.0588708221912384,
-0.2863120436668396,
-0.05879952758550644,
-0.22544251382350922,
0.12438767403364182,
0.18439306318759918,
0.3527339994907379,
-0.07729929685592651,
-0.10344316065311432,
0.1885666400194168,
-0.293972909450531,
0.07755859196186066,
-0.26478976011276245,
-0.18147093057632446,
0.15759748220443726,
0.15621629357337952,
-0.05261128395795822,
0.14968834817409515,
-0.19116395711898804,
-0.1454010009765625,
-0.30248749256134033,
0.23011794686317444,
-0.18788668513298035,
-0.18932215869426727,
0.12736041843891144,
0.003984492272138596,
0.25139331817626953,
-0.254719614982605,
0.23074117302894592,
-0.1212226003408432,
0.3786001205444336,
-0.06941425800323486,
0.06383301317691803,
0.07541787624359131,
0.07005339860916138,
0.06367969512939453,
0.1784890592098236,
-0.46044594049453735,
0.24788513779640198,
0.4021209180355072,
-0.5224173665046692,
0.31029754877090454,
0.28878873586654663,
0.04202895611524582,
0.4635988473892212,
-0.4118160307407379,
0.2062280774116516,
0.2217870056629181,
0.20368564128875732,
-0.24389055371284485,
-0.02280309423804283,
0.37165719270706177,
0.034961748868227005,
-0.056030385196208954,
-0.005638621747493744,
-0.03072778694331646,
-0.36724036931991577,
-0.3781543970108032,
0.09171673655509949,
0.22376903891563416,
-0.3046436905860901,
0.3425472378730774,
0.6575303673744202,
0.045131850987672806,
0.17592594027519226,
-0.10878627747297287,
0.20092850923538208,
-0.10537915676832199,
0.6286641359329224,
-0.22320854663848877,
0.05224543809890747,
0.07751908898353577,
0.05447520315647125,
0.021548844873905182,
-0.33886632323265076,
0.4037070572376251,
0.24713826179504395,
-0.21438327431678772,
0.07792740315198898,
-0.05262376368045807,
0.007078640162944794,
-0.104194775223732,
0.11155763268470764,
-0.22872236371040344,
-0.05958399549126625,
-0.1917317807674408,
-0.18662379682064056,
-0.3219810128211975,
-0.29547378420829773,
0.1318516731262207,
0.20576918125152588,
0.022587457671761513,
-0.22275738418102264,
-0.029287271201610565,
0.13198603689670563,
-0.16303180158138275,
-0.47360947728157043,
0.3834293484687805,
0.18824121356010437,
0.03133926913142204,
-0.2784055769443512,
0.05105075240135193,
0.11625868082046509,
0.04568389430642128,
0.11390407383441925,
0.20921920239925385,
0.6908440589904785,
0.4375933110713959,
-0.22052711248397827,
0.12455328553915024,
0.09273867309093475,
-0.23737573623657227,
-0.10929769277572632,
0.06664448976516724,
0.010218769311904907,
0.1698521375656128,
0.32799413800239563,
0.1993827372789383,
-0.1710318922996521,
-0.1310655027627945,
0.11978977918624878,
0.18611973524093628,
-0.38832494616508484,
0.28116822242736816,
-0.18931885063648224,
-0.14612239599227905,
-0.12234757840633392,
0.09901160001754761,
-0.25632837414741516,
0.07087565213441849,
0.4077409505844116,
0.2742966115474701,
0.07257423549890518,
-0.12498249858617783,
0.06506970524787903,
-0.10794009268283844,
0.49874308705329895,
0.30136486887931824,
0.13512259721755981,
-0.3123224973678589,
-0.06837829202413559,
-0.5570697784423828,
0.06166042760014534,
0.06422663480043411,
-0.29563435912132263,
0.14041602611541748,
-0.05015610158443451,
-0.1312006711959839,
0.19871443510055542,
0.002037927508354187,
-0.21340569853782654,
0.2585369944572449,
0.2531549036502838,
-0.11393016576766968,
-0.5248925089836121,
0.11352729052305222,
0.22564318776130676,
-0.10418853908777237,
-0.35736823081970215,
-0.09461410343647003,
-0.36400288343429565,
0.026480264961719513,
0.07796908915042877,
0.023767776787281036,
0.20496384799480438,
-0.1838623583316803,
0.30861806869506836,
-0.06120235472917557,
0.5150400996208191,
-0.08273252844810486,
-0.04765482246875763,
-0.3289961814880371,
-0.28523489832878113,
-0.23132918775081635,
0.2595258057117462,
-0.03186227008700371,
0.3192122280597687,
-0.22104297578334808,
0.06577232480049133,
-0.27188006043434143,
-0.07851617783308029,
0.023978613317012787,
0.392100989818573,
-0.33121752738952637,
-0.07854031771421432,
-0.06293173134326935,
0.19229662418365479,
0.2366017997264862,
0.06477705389261246,
-0.128999724984169,
0.22951552271842957,
-0.07418910413980484,
-0.39850422739982605,
0.34203004837036133,
-0.5386349558830261,
-0.4959174692630768,
-0.019890569150447845,
-0.024396181106567383,
-0.40063515305519104,
-0.08440335839986801,
-0.5008683800697327,
0.14801257848739624,
0.36232897639274597,
-0.03703732788562775,
-0.23161397874355316,
-0.06454099714756012,
0.09312258660793304,
0.16665826737880707,
-0.08981555700302124,
0.16900596022605896,
-0.027207616716623306,
-0.11262191087007523,
-0.11060529947280884,
-0.2542306184768677
] |
https://github.com/huggingface/datasets/issues/2239 | Error loading wikihow dataset | Hi @odellus, yes you are right.
Due to the server where the `wikihow` dataset is hosted, the dataset can't be downloaded automatically by `huggingface` and you have to download it manually as you did.
Nevertheless, you have to specify which dataset version you would like to load anyway:
```python
dataset = load_dataset('wikihow', 'all', data_dir='./wikihow')
```
or
```python
dataset = load_dataset('wikihow', 'sep', data_dir='./wikihow')
```
I find that the instructions given by `huggingface` are not clear enough: I am going to fix this.
Please tell me if this eventually works for you. | ## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
``` | 90 | Error loading wikihow dataset
## Describe the bug
When attempting to load wikihow into a dataset with
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
I get the message:
```
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
at the end of a [full stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2).
## Steps to reproduce the bug
I have followed the instructions for creating a wikihow dataset. The [wikihow dataset site](https://huggingface.co/datasets/wikihow) says to use
```python
from datasets import load_dataset
dataset = load_dataset('wikihow')
```
to load the dataset. I do so and I get the message
```
AssertionError: The dataset wikihow with config all requires manual data.
Please follow the manual download instructions: You need to manually download two wikihow files. An overview of which files to download can be seen at https://github.com/mahnazkoupaee/WikiHow-Dataset.
You need to download the following two files manually:
1) https://ucsb.app.box.com/s/ap23l8gafpezf4tq3wapr6u8241zz358 and save the file under <path/to/folder>/wikihowAll.csv
2) https://ucsb.app.box.com/s/7yq601ijl1lzvlfu4rjdbbxforzd2oag and save the file under <path/to/folder>/wikihowSep.csv
The <path/to/folder> can e.g. be "~/manual_wikihow_data".
Wikihow can then be loaded using the following command `datasets.load_dataset("wikihow", data_dir="<path/to/folder>")`.
.
Manual data can be loaded with `datasets.load_dataset(wikihow, data_dir='<path/to/manual/data>')
```
So I create a directory `./wikihow` and download `wikihowAll.csv` and `wikihowSep.csv` into the new directory.
Then I run
```python
from datasets import load_dataset
dataset = load_dataset('wikihow', data_dir='./wikihow')
```
that's when I get the [stack trace](https://gist.github.com/odellus/602c3b2de52f541d353b1022f320ffc2)
## Expected results
I expected it to load the downloaded files into a dataset.
## Actual results
```python
Using custom data configuration default-data_dir=.%2Fwikihow
Downloading and preparing dataset wikihow/default (download: Unknown size, generated: Unknown size, post-processed: Unknown size, total: Unknown size) to /home/azureuser/.cache/huggingface/datasets/wikihow/default-data_dir=.%2Fwikihow/0.0.0/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2... ---------------------------------------------------------------------------
AttributeError
Traceback (most recent call last)
<ipython-input-9-5e4d40142f30> in <module>
----> 1 dataset = load_dataset('wikihow',data_dir='./wikihow')
~/.local/lib/python3.6/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, script_version, use_auth_token, **config_kwargs)
745 try_from_hf_gcs=try_from_hf_gcs,
746 base_path=base_path,-->
747 use_auth_token=use_auth_token,
748 )
749
~/.local/lib/python3.6/site-packages/datasets/builder.py in download_and_prepare(self, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, **download_and_prepare_kwargs)
577 if not downloaded_from_gcs:
578 self._download_and_prepare( -->
579 dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
580 )
581 # Sync info
~/.local/lib/python3.6/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
632 split_dict = SplitDict(dataset_name=self.name)
633 split_generators_kwargs = self._make_split_generators_kwargs(prepare_split_kwargs) -->
634 split_generators = self._split_generators(dl_manager, **split_generators_kwargs)
635
636 # Checksums verification
~/.cache/huggingface/modules/datasets_modules/datasets/wikihow/58f42f8f0e4d459811a0f69aaab35870093830ccd58006769e7e1eb3e0e686c2/wikihow.py in _split_generators(self, dl_manager)
132
133 path_to_manual_file = os.path.join(
--> 134 os.path.abspath(os.path.expanduser(dl_manager.manual_dir)), self.config.filename
135 )
136
AttributeError: 'BuilderConfig' object has no attribute 'filename'
```
## Versions
Paste the output of the following code:
```python
import datasets
import sys
import platform
print(f"""
- Datasets: {datasets.__version__}
- Python: {sys.version}
- Platform: {platform.platform()}
""")
```
```
- Datasets: 1.5.0
- Python: 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- Platform: Linux-5.4.0-1046-azure-x86_64-with-Ubuntu-18.04-bionic
```
Hi @odellus, yes you are right.
Due to the server where the `wikihow` dataset is hosted, the dataset can't be downloaded automatically by `huggingface` and you have to download it manually as you did.
Nevertheless, you have to specify which dataset version you would like to load anyway:
```python
dataset = load_dataset('wikihow', 'all', data_dir='./wikihow')
```
or
```python
dataset = load_dataset('wikihow', 'sep', data_dir='./wikihow')
```
I find that the instructions given by `huggingface` are not clear enough: I am going to fix this.
Please tell me if this eventually works for you. | [
-0.22749952971935272,
0.37022334337234497,
0.023809470236301422,
0.398794949054718,
0.2537098526954651,
0.27477896213531494,
0.4276535212993622,
0.439177542924881,
0.2458432912826538,
0.09350797533988953,
0.21628527343273163,
0.3853777050971985,
-0.012894685380160809,
0.18638677895069122,
0.12050217390060425,
-0.2686142027378082,
0.011066712439060211,
0.10452491044998169,
0.22370949387550354,
0.18902334570884705,
-0.34488871693611145,
0.0065286532044410706,
-0.23297789692878723,
0.10401520133018494,
-0.3400694727897644,
0.013066571205854416,
-0.0981440544128418,
0.1813105344772339,
-0.053303614258766174,
-0.5415439009666443,
0.47575604915618896,
-0.11857886612415314,
0.25181546807289124,
0.40391814708709717,
-0.00011260442261118442,
0.1877029687166214,
0.5060685873031616,
0.034202948212623596,
-0.44216665625572205,
-0.09445947408676147,
-0.3161357045173645,
-0.12283924221992493,
0.24206867814064026,
-0.13372014462947845,
-0.03265528008341789,
-0.025875918567180634,
0.004086066037416458,
0.03585946559906006,
0.2355373352766037,
0.265296995639801,
0.1653248369693756,
-0.11961863934993744,
0.37455955147743225,
-0.13606275618076324,
0.19424878060817719,
-0.09333066642284393,
-0.08691681921482086,
0.16224688291549683,
0.07398144155740738,
-0.23821723461151123,
0.1115439236164093,
0.20557311177253723,
-0.1832123100757599,
0.0634830892086029,
0.5792301893234253,
-0.00810143444687128,
0.2564977705478668,
-0.33299100399017334,
0.26322969794273376,
0.38396674394607544,
0.8194904923439026,
-0.22499766945838928,
-0.23843912780284882,
-0.21823352575302124,
0.17277173697948456,
0.16447226703166962,
0.38750338554382324,
0.30610260367393494,
-0.37484586238861084,
0.036018263548612595,
-0.03771398961544037,
-0.2557300925254822,
-0.05808757245540619,
0.28082430362701416,
-0.29466772079467773,
0.4108179211616516,
-0.07782414555549622,
0.1745569109916687,
-0.2258382886648178,
-0.06426961719989777,
0.2035178393125534,
-0.32481148838996887,
-0.23762932419776917,
0.30157631635665894,
-0.13841181993484497,
0.07686956226825714,
0.15853533148765564,
0.1928260326385498,
0.09944187849760056,
-0.03713344782590866,
-0.10083817690610886,
-0.19082266092300415,
0.1564055234193802,
0.13848382234573364,
0.44426229596138,
0.23397159576416016,
-0.013331875205039978,
0.206276535987854,
0.12074942886829376,
0.30488499999046326,
-0.1984938234090805,
-0.11413393169641495,
-0.20128986239433289,
-0.2741612195968628,
0.1328350454568863,
-0.22969093918800354,
0.3544214963912964,
-0.03382930904626846,
-0.2546578645706177,
0.20016136765480042,
0.01163766160607338,
0.07303708791732788,
0.03479447960853577,
0.41595691442489624,
-0.20648093521595,
0.1446116864681244,
0.2597595453262329,
0.2927666902542114,
0.10251545161008835,
0.12348826974630356,
-0.10050905495882034,
0.09075987339019775,
-0.05587708204984665,
-0.031838081777095795,
0.15006180107593536,
-0.19306035339832306,
0.2553028464317322,
0.1958254724740982,
0.1250934600830078,
-0.28469350934028625,
-0.009354855865240097,
0.22846218943595886,
-0.23564928770065308,
0.34940361976623535,
0.07262955605983734,
0.14317485690116882,
0.1701950877904892,
-0.647598922252655,
-0.11525670439004898,
0.16333860158920288,
-0.394199937582016,
-0.3855850398540497,
-0.2756713628768921,
0.21846573054790497,
-0.040343236178159714,
0.045025281608104706,
-0.4196183979511261,
-0.17858918011188507,
0.2975122928619385,
-0.291059672832489,
-0.23906323313713074,
-0.06991539895534515,
0.1259680539369583,
-0.1256432682275772,
0.35691553354263306,
0.47823911905288696,
-0.39086881279945374,
-0.03350840508937836,
-0.09300588816404343,
0.043877534568309784,
-0.05722469836473465,
-0.3101462423801422,
-0.3554074168205261,
0.49713921546936035,
-0.2884572446346283,
-0.28746527433395386,
0.2937494218349457,
-0.4576174020767212,
-0.28927305340766907,
0.29007455706596375,
0.019208505749702454,
0.33320051431655884,
-0.022911101579666138,
-0.16921041905879974,
-0.16821980476379395,
-0.08369956165552139,
0.2327568084001541,
0.22218772768974304,
-0.005590369924902916,
0.055096931755542755,
-0.19408540427684784,
-0.23643484711647034,
0.10460980981588364,
0.18648666143417358,
0.051164545118808746,
0.17486846446990967,
0.04371203854680061,
0.024244721978902817,
0.12567079067230225,
-0.16263532638549805,
-0.04512413591146469,
0.12033898383378983,
-0.02816968783736229,
-0.004744470119476318,
0.0483274944126606,
0.002342633903026581,
-0.46107566356658936,
0.34842824935913086,
0.04336749017238617,
0.10834093391895294,
-0.1505928784608841,
-0.05700785294175148,
-0.2748938500881195,
0.15632927417755127,
-0.5284995436668396,
-0.17723967134952545,
0.1664675921201706,
0.06184310466051102,
-0.14976532757282257,
-0.01851309835910797,
-0.12401770055294037,
0.04310697317123413,
-0.3334241807460785,
0.12228969484567642,
-0.20709539949893951,
0.1706794798374176,
-0.13069742918014526,
-0.05659039318561554,
-0.01118018850684166,
0.14893501996994019,
0.03466884419322014,
0.08487450331449509,
-0.2042342722415924,
0.3257361948490143,
0.05683712661266327,
0.11240359395742416,
-0.04447022080421448,
-0.06888575851917267,
-0.03738974779844284,
-0.1064232736825943,
0.054835885763168335,
0.22690962255001068,
0.24774253368377686,
-0.0861581340432167,
-0.09201694279909134,
0.23090232908725739,
0.054010119289159775,
0.38701143860816956,
0.029232583940029144,
0.2674029469490051,
0.20573773980140686,
-0.014384765177965164,
-0.024043872952461243,
0.005802668631076813,
0.12159514427185059,
0.20890329778194427,
0.07983186841011047,
-0.08362344652414322,
-0.16141682863235474,
-0.1593150496482849,
0.09815014898777008,
0.06214364990592003,
0.07633121311664581,
0.026456143707036972,
-0.26560094952583313,
0.054238952696323395,
0.010232923552393913,
0.2679118812084198,
0.22978569567203522,
0.05427468195557594,
-0.28230321407318115,
0.029404813423752785,
-0.08946516364812851,
-0.022446639835834503,
0.36176982522010803,
0.13211241364479065,
0.1846684068441391,
0.3180978298187256,
-0.12167031317949295,
0.14289434254169464,
-0.06018924340605736,
-0.2058873325586319,
-0.10901975631713867,
0.20142148435115814,
-0.4196123480796814,
0.0011623948812484741,
0.05542675405740738,
-0.12873174250125885,
-0.04881349951028824,
-0.2332875281572342,
-0.269505113363266,
-0.42615485191345215,
-0.09864117205142975,
0.0017244517803192139,
-0.14815740287303925,
0.1272241771221161,
-0.14936108887195587,
0.102741539478302,
0.027610694989562035,
-0.2686440348625183,
-0.23085050284862518,
-0.36501723527908325,
-0.31693795323371887,
-0.010910941287875175,
0.4290110170841217,
0.014575980603694916,
0.1516433209180832,
-0.3627825379371643,
-0.04184222221374512,
-0.06652787327766418,
-0.1820356845855713,
0.15005585551261902,
0.08053608238697052,
0.7029446363449097,
0.16696617007255554,
0.45500892400741577,
0.06907238066196442,
-0.40218138694763184,
0.3672316372394562,
0.05599121004343033,
0.1430450826883316,
0.2535715401172638,
-0.02627529762685299,
-0.23383665084838867,
0.0019271895289421082,
-0.32622790336608887,
-0.1746634691953659,
-0.27576249837875366,
-0.2295166701078415,
0.3282874524593353,
0.0036656223237514496,
0.5006691217422485,
0.29816189408302307,
0.1741962730884552,
0.0721939280629158,
0.2934996485710144,
-0.04133879765868187,
-0.6339871287345886,
0.3558412194252014,
-0.1906135529279709,
-0.27516722679138184,
0.21339628100395203,
-0.13210615515708923,
0.22319290041923523,
-0.08692768216133118,
-0.5945402979850769,
-0.018175840377807617,
-0.08567653596401215,
0.27743691205978394,
-0.021245233714580536,
0.17465342581272125,
0.08035227656364441,
0.18103747069835663,
0.04389292001724243,
-0.16777248680591583,
0.04805275425314903,
-0.140112966299057,
-0.10155832022428513,
0.19614101946353912,
0.12600310146808624,
0.1382961869239807,
-0.3169758915901184,
0.6540641188621521,
0.090955451130867,
0.13369756937026978,
0.2820765972137451,
-0.23096701502799988,
0.23726971447467804,
-0.29383671283721924,
-0.36607906222343445,
0.142866313457489,
-0.16690167784690857,
-0.11787723749876022,
0.21682986617088318,
0.04580553248524666,
-0.24758540093898773,
-0.34518885612487793,
0.01674797758460045,
-0.06485442817211151,
-0.33607086539268494,
0.0050022173672914505,
-0.02075762301683426,
0.11353301256895065,
0.18588609993457794,
0.18226438760757446,
-0.27038195729255676,
-0.23459118604660034,
0.15487340092658997,
0.42317652702331543,
0.008748814463615417,
-0.11731503903865814,
0.034741174429655075,
-0.14646802842617035,
-0.26323768496513367,
0.06736194342374802,
0.14350973069667816,
0.030182451009750366,
0.06925433874130249,
0.16013756394386292,
-0.07536710798740387,
-0.04337383434176445,
0.4331783056259155,
-0.23907382786273956,
0.2342217117547989,
0.22000186145305634,
0.2694021761417389,
-0.3107820749282837,
-0.10341840237379074,
-0.02515306882560253,
0.06292002648115158,
0.01185275986790657,
0.16882498562335968,
-0.08875029534101486,
-0.09345614910125732,
0.13115514814853668,
0.4144937992095947,
-0.2235662341117859,
-0.26989585161209106,
-0.24877585470676422,
-0.06875073909759521,
-0.4285559356212616,
-0.20236968994140625,
-0.03205680102109909,
0.46736618876457214,
-0.03267456591129303,
-0.06476355344057083,
-0.2586670517921448,
0.2108553946018219,
-0.05099456012248993,
0.11314946413040161,
0.34061822295188904,
0.032199639827013016,
0.13241063058376312,
0.10042760521173477,
0.13803201913833618,
0.11589943617582321,
0.5343759059906006,
0.2168561816215515,
-0.22388389706611633,
-0.22283896803855896,
-0.08517951518297195,
0.03130750358104706,
0.17842140793800354,
-0.22257225215435028,
-0.4367469549179077,
-0.15295983850955963,
0.07788487523794174,
-0.2856152653694153,
0.010268410667777061,
0.16093872487545013,
-0.009693938307464123,
-0.2836460769176483,
-0.5890882611274719,
0.6666557192802429,
-0.03776344656944275,
-0.016009755432605743,
0.3778902292251587,
0.2793261408805847,
-0.46823087334632874,
0.2915447950363159,
0.0237022265791893,
0.7756503224372864,
0.1787300556898117,
0.1894199550151825,
0.38533544540405273,
0.20119963586330414,
0.07713949680328369,
-0.33199483156204224,
-0.02822859212756157,
-0.26729753613471985,
-0.1985025852918625,
-0.06535416841506958,
-0.06039300933480263,
0.22443640232086182,
0.044463999569416046,
-0.34156692028045654,
0.15634360909461975,
-0.23564675450325012,
0.18245936930179596,
0.10320001095533371,
0.12547838687896729,
-0.26543405652046204,
-0.22164557874202728,
-0.32952603697776794,
0.10369753837585449,
-0.02628263086080551,
0.1340884566307068,
-0.13267168402671814,
0.04208739846944809,
0.03195120021700859,
-0.20099501311779022,
-0.2762559950351715,
0.25674811005592346,
-0.1589357852935791,
0.12369214743375778,
0.04842182248830795,
-0.1378915011882782,
0.22816601395606995,
0.582956850528717,
-0.15935905277729034,
0.2440934181213379,
-0.34770962595939636,
0.3507629334926605,
-0.19158852100372314,
-0.059512875974178314,
-0.005064912140369415,
0.11829982697963715,
0.3890744149684906,
-0.008664153516292572,
-0.1870107650756836,
0.07769697159528732,
-0.38678842782974243,
-0.07935422658920288,
-0.00037266314029693604,
-0.06029018759727478,
0.24956780672073364,
-0.377828449010849,
-0.3229055106639862,
-0.14036530256271362,
0.14963500201702118,
-0.22041426599025726,
0.1755172312259674,
0.08481790125370026,
-0.3581293821334839,
0.044924262911081314,
0.08204293251037598,
-0.2780803442001343,
0.06138039752840996,
0.15049520134925842,
-0.1318150758743286,
0.17696167528629303,
0.6715326309204102,
0.15158425271511078,
-0.08358386158943176,
-0.1752031445503235,
0.34024620056152344,
0.2391413003206253,
-0.3221227526664734,
0.07643632590770721,
0.1584533005952835,
0.17200897634029388,
-0.1837610900402069,
0.5057666301727295,
0.011120758950710297,
-0.03613479435443878,
0.12370441854000092,
-0.611213207244873,
-0.18004892766475677,
0.11549577116966248,
0.08478976041078568,
0.2263803482055664,
-0.07763814926147461,
-0.09457443654537201,
0.12795375287532806,
-0.0588708221912384,
-0.2863120436668396,
-0.05879952758550644,
-0.22544251382350922,
0.12438767403364182,
0.18439306318759918,
0.3527339994907379,
-0.07729929685592651,
-0.10344316065311432,
0.1885666400194168,
-0.293972909450531,
0.07755859196186066,
-0.26478976011276245,
-0.18147093057632446,
0.15759748220443726,
0.15621629357337952,
-0.05261128395795822,
0.14968834817409515,
-0.19116395711898804,
-0.1454010009765625,
-0.30248749256134033,
0.23011794686317444,
-0.18788668513298035,
-0.18932215869426727,
0.12736041843891144,
0.003984492272138596,
0.25139331817626953,
-0.254719614982605,
0.23074117302894592,
-0.1212226003408432,
0.3786001205444336,
-0.06941425800323486,
0.06383301317691803,
0.07541787624359131,
0.07005339860916138,
0.06367969512939453,
0.1784890592098236,
-0.46044594049453735,
0.24788513779640198,
0.4021209180355072,
-0.5224173665046692,
0.31029754877090454,
0.28878873586654663,
0.04202895611524582,
0.4635988473892212,
-0.4118160307407379,
0.2062280774116516,
0.2217870056629181,
0.20368564128875732,
-0.24389055371284485,
-0.02280309423804283,
0.37165719270706177,
0.034961748868227005,
-0.056030385196208954,
-0.005638621747493744,
-0.03072778694331646,
-0.36724036931991577,
-0.3781543970108032,
0.09171673655509949,
0.22376903891563416,
-0.3046436905860901,
0.3425472378730774,
0.6575303673744202,
0.045131850987672806,
0.17592594027519226,
-0.10878627747297287,
0.20092850923538208,
-0.10537915676832199,
0.6286641359329224,
-0.22320854663848877,
0.05224543809890747,
0.07751908898353577,
0.05447520315647125,
0.021548844873905182,
-0.33886632323265076,
0.4037070572376251,
0.24713826179504395,
-0.21438327431678772,
0.07792740315198898,
-0.05262376368045807,
0.007078640162944794,
-0.104194775223732,
0.11155763268470764,
-0.22872236371040344,
-0.05958399549126625,
-0.1917317807674408,
-0.18662379682064056,
-0.3219810128211975,
-0.29547378420829773,
0.1318516731262207,
0.20576918125152588,
0.022587457671761513,
-0.22275738418102264,
-0.029287271201610565,
0.13198603689670563,
-0.16303180158138275,
-0.47360947728157043,
0.3834293484687805,
0.18824121356010437,
0.03133926913142204,
-0.2784055769443512,
0.05105075240135193,
0.11625868082046509,
0.04568389430642128,
0.11390407383441925,
0.20921920239925385,
0.6908440589904785,
0.4375933110713959,
-0.22052711248397827,
0.12455328553915024,
0.09273867309093475,
-0.23737573623657227,
-0.10929769277572632,
0.06664448976516724,
0.010218769311904907,
0.1698521375656128,
0.32799413800239563,
0.1993827372789383,
-0.1710318922996521,
-0.1310655027627945,
0.11978977918624878,
0.18611973524093628,
-0.38832494616508484,
0.28116822242736816,
-0.18931885063648224,
-0.14612239599227905,
-0.12234757840633392,
0.09901160001754761,
-0.25632837414741516,
0.07087565213441849,
0.4077409505844116,
0.2742966115474701,
0.07257423549890518,
-0.12498249858617783,
0.06506970524787903,
-0.10794009268283844,
0.49874308705329895,
0.30136486887931824,
0.13512259721755981,
-0.3123224973678589,
-0.06837829202413559,
-0.5570697784423828,
0.06166042760014534,
0.06422663480043411,
-0.29563435912132263,
0.14041602611541748,
-0.05015610158443451,
-0.1312006711959839,
0.19871443510055542,
0.002037927508354187,
-0.21340569853782654,
0.2585369944572449,
0.2531549036502838,
-0.11393016576766968,
-0.5248925089836121,
0.11352729052305222,
0.22564318776130676,
-0.10418853908777237,
-0.35736823081970215,
-0.09461410343647003,
-0.36400288343429565,
0.026480264961719513,
0.07796908915042877,
0.023767776787281036,
0.20496384799480438,
-0.1838623583316803,
0.30861806869506836,
-0.06120235472917557,
0.5150400996208191,
-0.08273252844810486,
-0.04765482246875763,
-0.3289961814880371,
-0.28523489832878113,
-0.23132918775081635,
0.2595258057117462,
-0.03186227008700371,
0.3192122280597687,
-0.22104297578334808,
0.06577232480049133,
-0.27188006043434143,
-0.07851617783308029,
0.023978613317012787,
0.392100989818573,
-0.33121752738952637,
-0.07854031771421432,
-0.06293173134326935,
0.19229662418365479,
0.2366017997264862,
0.06477705389261246,
-0.128999724984169,
0.22951552271842957,
-0.07418910413980484,
-0.39850422739982605,
0.34203004837036133,
-0.5386349558830261,
-0.4959174692630768,
-0.019890569150447845,
-0.024396181106567383,
-0.40063515305519104,
-0.08440335839986801,
-0.5008683800697327,
0.14801257848739624,
0.36232897639274597,
-0.03703732788562775,
-0.23161397874355316,
-0.06454099714756012,
0.09312258660793304,
0.16665826737880707,
-0.08981555700302124,
0.16900596022605896,
-0.027207616716623306,
-0.11262191087007523,
-0.11060529947280884,
-0.2542306184768677
] |
https://github.com/huggingface/datasets/issues/2237 | Update Dataset.dataset_size after transformed with map | @albertvillanova I would like to take this up. It would be great if you could point me as to how the dataset size is calculated in HF. Thanks! | After loading a dataset, if we transform it by using `.map` its `dataset_size` attirbute is not updated. | 28 | Update Dataset.dataset_size after transformed with map
After loading a dataset, if we transform it by using `.map` its `dataset_size` attirbute is not updated.
@albertvillanova I would like to take this up. It would be great if you could point me as to how the dataset size is calculated in HF. Thanks! | [
-0.21400554478168488,
-0.3152700662612915,
-0.12281586229801178,
0.15191903710365295,
0.06060885265469551,
0.01968228816986084,
0.28132688999176025,
-0.1209016889333725,
0.1866588145494461,
0.11718982458114624,
-0.1872750222682953,
0.0038693633396178484,
0.3808470070362091,
0.18463115394115448,
0.2711487412452698,
0.08057679980993271,
0.2649386525154114,
0.12834268808364868,
-0.5549341440200806,
-0.0820951908826828,
-0.28582876920700073,
-0.05479952692985535,
-0.3831389546394348,
-0.33932745456695557,
0.09227323532104492,
0.01612796261906624,
-0.3735990822315216,
0.022303063422441483,
-0.05330771207809448,
-0.1949790120124817,
0.07183178514242172,
0.15694139897823334,
0.2523391544818878,
0.33287155628204346,
-0.00011860804806929082,
0.0030871033668518066,
0.06077580899000168,
-0.23263515532016754,
0.06748738884925842,
0.06120152771472931,
-0.33786600828170776,
-0.11220091581344604,
-0.3726663291454315,
-0.13108235597610474,
0.02082209661602974,
-0.10591287910938263,
-0.2514362037181854,
-0.1718563288450241,
-0.09523434937000275,
0.001906413584947586,
0.12686912715435028,
0.0038470979779958725,
0.11238022148609161,
-0.08626153320074081,
0.046917952597141266,
0.4319823980331421,
0.31829848885536194,
0.15973466634750366,
-0.12533779442310333,
0.04771699011325836,
-0.11666158586740494,
0.4219641089439392,
0.3868217468261719,
-0.1872306764125824,
0.6096599102020264,
-0.2739826738834381,
0.05803127959370613,
-0.2759188115596771,
0.25853168964385986,
-0.04724583774805069,
0.6375648379325867,
-0.042468488216400146,
-0.17041243612766266,
0.24707749485969543,
-0.029119830578565598,
0.22794358432292938,
0.007734455168247223,
-0.15123304724693298,
0.29908260703086853,
-0.08611010015010834,
-0.45541635155677795,
-0.431514173746109,
0.10404466092586517,
-0.027313299477100372,
-0.2427792251110077,
0.14469805359840393,
-0.11127953231334686,
0.2554885745048523,
-0.20859627425670624,
-0.19832013547420502,
-0.0714244693517685,
-0.10809847712516785,
-0.12980420887470245,
0.27192726731300354,
-0.16600750386714935,
-0.27045777440071106,
0.02432379126548767,
0.1149551272392273,
0.2199002504348755,
-0.5036535263061523,
-0.31621983647346497,
-0.14020031690597534,
-0.29143282771110535,
0.07980457693338394,
0.12317962944507599,
0.22727957367897034,
-0.02066190540790558,
0.15921469032764435,
-0.1066526472568512,
-0.14578594267368317,
-0.14154241979122162,
-0.155155211687088,
0.036350347101688385,
-0.13202159106731415,
0.1413969248533249,
-0.3502231240272522,
-0.12770570814609528,
-0.2908429801464081,
0.0824379101395607,
-0.1878945529460907,
0.05908207595348358,
-0.12578073143959045,
-0.0484553761780262,
0.42386913299560547,
-0.07656552642583847,
0.21123644709587097,
0.04767322540283203,
-0.07059305161237717,
0.06235723942518234,
-0.3581084609031677,
-0.15829887986183167,
-0.21739579737186432,
-0.04361389949917793,
-0.04002884775400162,
-0.28889548778533936,
-0.015396934002637863,
0.19215866923332214,
-0.06827210634946823,
-0.010062158107757568,
0.06131404638290405,
-0.24724018573760986,
-0.3080362379550934,
0.5430867075920105,
0.37259790301322937,
-0.03463957831263542,
-0.10208430141210556,
-0.20566850900650024,
0.034830011427402496,
-0.2220866084098816,
0.5323479771614075,
-0.4249653220176697,
-0.02200319617986679,
-0.016428695991635323,
0.10991553962230682,
0.3707466721534729,
-0.14291909337043762,
-0.3712681829929352,
0.40436267852783203,
0.4439755976200104,
-0.23333103954792023,
0.17667725682258606,
-0.1445429027080536,
-0.3452298045158386,
-0.19465486705303192,
-0.026519400998950005,
0.23418062925338745,
-0.42278194427490234,
-0.07696692645549774,
0.1293608397245407,
-0.09493343532085419,
-0.07586578279733658,
0.18694710731506348,
-0.20298802852630615,
0.20527289807796478,
-0.2751542329788208,
-0.02647983655333519,
0.4559621512889862,
0.1534692496061325,
-0.4716663658618927,
0.21939954161643982,
0.10932743549346924,
-0.4222336709499359,
-0.1315324604511261,
0.17977076768875122,
0.3205764591693878,
-0.18764373660087585,
-0.15638810396194458,
0.28477054834365845,
-0.15189680457115173,
-0.005131596699357033,
-0.2183377891778946,
-0.015441179275512695,
0.22944927215576172,
-0.27234965562820435,
0.3975723087787628,
0.2733162045478821,
0.41718944907188416,
0.18511773645877838,
0.2256757616996765,
0.09360241889953613,
0.21954062581062317,
0.48886638879776,
-0.10959675908088684,
0.08560138195753098,
0.3812718093395233,
0.13242554664611816,
-0.17405489087104797,
-0.07527557015419006,
-0.3204289376735687,
-0.3319670259952545,
0.6687423586845398,
-0.09660656005144119,
-0.33596569299697876,
-0.0507548451423645,
0.19696444272994995,
-0.0666559487581253,
-0.060512833297252655,
0.17998886108398438,
0.0005357395857572556,
-0.4350314736366272,
-0.02113095298409462,
0.33845752477645874,
-0.1690150797367096,
-0.05163921043276787,
-0.19356374442577362,
0.41363978385925293,
0.03341979533433914,
0.18147912621498108,
-0.2950873076915741,
-0.24743148684501648,
0.1697007119655609,
-0.12962763011455536,
-0.5138610005378723,
0.5568603873252869,
0.023189419880509377,
0.16459789872169495,
0.32356157898902893,
-0.06109628081321716,
0.07948847860097885,
-0.1397194266319275,
0.4504624009132385,
-0.2118956744670868,
0.22935716807842255,
-0.09543129801750183,
-0.09576346725225449,
-0.09367166459560394,
-0.025137614458799362,
0.06326411664485931,
0.055018723011016846,
-0.2214381992816925,
0.05084390938282013,
0.046370457857847214,
0.0053120944648981094,
-0.11540033668279648,
-0.4647922217845917,
0.06971299648284912,
0.12712180614471436,
0.09148690849542618,
0.29965248703956604,
0.08644238114356995,
0.5922946333885193,
-0.11454835534095764,
-0.2592751383781433,
0.4422222375869751,
-0.6018929481506348,
-0.30798378586769104,
0.07790690660476685,
0.09878934919834137,
0.4737577438354492,
0.15959039330482483,
0.3140648901462555,
-0.06793218851089478,
0.12761655449867249,
0.11516453325748444,
0.12535007297992706,
-0.2597391605377197,
0.28945639729499817,
0.015995468944311142,
0.35777831077575684,
0.04951047524809837,
-0.10462049394845963,
0.14679425954818726,
0.19353699684143066,
0.0009604934602975845,
-0.21410596370697021,
0.03067878447473049,
0.06109209358692169,
-0.16057604551315308,
-0.13270334899425507,
-0.07762203365564346,
-0.43615278601646423,
-0.1390068084001541,
-0.22737951576709747,
-0.12220786511898041,
0.25655850768089294,
-0.08398320525884628,
0.1252574771642685,
-0.05971495807170868,
0.13939304649829865,
-0.0056539662182331085,
0.1181037425994873,
0.06971128284931183,
-0.2667836546897888,
0.040638696402311325,
-0.18278324604034424,
-0.25200891494750977,
0.33431902527809143,
-0.19255268573760986,
0.08724874258041382,
-0.28727665543556213,
-0.5419436693191528,
0.06715896725654602,
0.07269766926765442,
-0.1776111125946045,
-0.04805101454257965,
0.05458010733127594,
-0.24044404923915863,
0.5561318397521973,
-0.033033132553100586,
-0.2603098750114441,
-0.14860418438911438,
-0.09341409802436829,
-0.26913371682167053,
0.13255691528320312,
0.006917271763086319,
-0.16637635231018066,
-0.1284462809562683,
-0.006093176081776619,
-0.11030323803424835,
-0.06782727688550949,
0.001386590301990509,
-0.0018109548836946487,
0.1627289205789566,
-0.10709740221500397,
0.0917876586318016,
-0.29057204723358154,
-0.44200587272644043,
-0.34655916690826416,
0.23331092298030853,
-0.16685524582862854,
-0.24562214314937592,
0.13607200980186462,
-0.039734385907649994,
0.053174830973148346,
0.2855846881866455,
-0.4390062093734741,
0.0019075758755207062,
-0.2569930851459503,
0.13365089893341064,
-0.38165780901908875,
0.4650993347167969,
0.4649782180786133,
-0.19310829043388367,
-0.021730097010731697,
-0.16013997793197632,
-0.34214112162590027,
0.022187083959579468,
0.5710701942443848,
0.445976197719574,
0.19226014614105225,
0.4896532893180847,
0.03264303132891655,
0.36563199758529663,
0.035914789885282516,
-0.2391733080148697,
0.30644962191581726,
-0.01820209063589573,
0.26340827345848083,
-0.3918572962284088,
0.14609308540821075,
0.13339529931545258,
0.058898717164993286,
0.014639601111412048,
0.2835104167461395,
0.11546169966459274,
-0.18757475912570953,
0.18679897487163544,
-0.6332859396934509,
-0.08560115844011307,
0.17391513288021088,
0.2057463377714157,
-0.2999034821987152,
0.522606611251831,
0.20230577886104584,
-0.11869415640830994,
-0.33706822991371155,
-0.16148126125335693,
0.08845648169517517,
0.21914300322532654,
0.3309369683265686,
0.07550622522830963,
-0.12725074589252472,
0.17835424840450287,
-0.03744979202747345,
0.46219730377197266,
0.1265324354171753,
0.12252692878246307,
0.13607236742973328,
-0.05587366223335266,
0.07838307321071625,
0.012625034898519516,
0.5038230419158936,
0.057221636176109314,
-0.013388939201831818,
-0.027639346197247505,
-0.2663758099079132,
-0.17330820858478546,
-0.030293460935354233,
-0.12009544670581818,
-0.006426895037293434,
-0.02975039929151535,
0.5657559037208557,
0.11225274950265884,
-0.2860831022262573,
0.188426673412323,
0.15132881700992584,
-0.23474568128585815,
-0.11281325668096542,
-0.09534210711717606,
-0.06339449435472488,
-0.23877586424350739,
0.03561866655945778,
-0.2177068442106247,
-0.28915083408355713,
-0.014180377125740051,
-0.06350626051425934,
-0.2371363788843155,
-0.03489912673830986,
-0.23101483285427094,
0.24617694318294525,
0.3423183858394623,
0.34966355562210083,
0.011977847665548325,
0.11204276233911514,
0.15924742817878723,
0.33828020095825195,
0.382772296667099,
-0.15933547914028168,
-0.013945691287517548,
-0.04291228950023651,
0.15226717293262482,
0.4659043550491333,
0.027484111487865448,
0.02712123841047287,
-0.07730064541101456,
0.1354241967201233,
0.27309900522232056,
-0.37039291858673096,
0.14275652170181274,
0.28647440671920776,
-0.010327860713005066,
-0.32791072130203247,
-0.39739999175071716,
0.43885472416877747,
-0.08434928953647614,
-0.0292806476354599,
0.19441401958465576,
0.23250101506710052,
-0.3296416699886322,
0.48475199937820435,
0.25738364458084106,
0.8518754243850708,
-0.10792797803878784,
-0.26346802711486816,
-0.035316236317157745,
-0.2792356014251709,
-0.3146861493587494,
-0.4570843577384949,
0.03388059139251709,
-0.3315182626247406,
-0.29033637046813965,
-0.024749755859375,
0.022228430956602097,
0.18115046620368958,
0.3551357388496399,
-0.4075712263584137,
0.18321986496448517,
0.170309379696846,
0.3071156144142151,
-0.15031857788562775,
0.06105818599462509,
0.018247757107019424,
-0.1289486140012741,
0.07568995654582977,
0.13804800808429718,
0.0011308267712593079,
0.15884749591350555,
-0.11311394721269608,
0.11534775793552399,
0.13458260893821716,
-0.11792632937431335,
0.025678440928459167,
-0.23259863257408142,
-0.31133416295051575,
0.08034981787204742,
-0.0858611911535263,
0.20420978963375092,
0.2555885314941406,
0.22754259407520294,
-0.029465384781360626,
0.24282890558242798,
0.2011035978794098,
0.21340979635715485,
0.26617300510406494,
0.43269050121307373,
0.047383863478899,
0.3145412504673004,
0.13259564340114594,
-0.05042397975921631,
-0.3777059018611908,
-0.1642899513244629,
-0.18826688826084137,
-0.32655537128448486,
-0.3648977279663086,
-0.12434953451156616,
0.2862339913845062,
-0.48438045382499695,
0.03317466750741005,
0.13099810481071472,
0.09921854734420776,
0.18600638210773468,
0.06077940762042999,
-0.06083068251609802,
-0.04251863807439804,
0.5782651901245117,
0.39055800437927246,
-0.3896172046661377,
-0.21337123215198517,
0.40473267436027527,
0.09682916849851608,
0.17134316265583038,
0.31500840187072754,
-0.27664077281951904,
-0.1403549313545227,
-0.060627296566963196,
0.21695050597190857,
0.024330638349056244,
-0.12405316531658173,
-0.07006336003541946,
0.008148274384438992,
0.19749696552753448,
-0.10249698162078857,
-0.05884396657347679,
0.006869327276945114,
0.16797271370887756,
-0.3675278425216675,
-0.38508278131484985,
-0.5609773397445679,
0.06933502107858658,
-0.14250262081623077,
0.0989467203617096,
0.2754644453525543,
-0.10745815932750702,
0.21159450709819794,
0.6015932559967041,
-0.2662201225757599,
-0.05502276122570038,
0.3377181589603424,
0.4226115047931671,
0.0877092108130455,
0.312435507774353,
-0.07619680464267731,
-0.009937290102243423,
-0.0009492263197898865,
-0.13543535768985748,
-0.14418815076351166,
-0.11400346457958221,
-0.07339926064014435,
0.13097912073135376,
-0.10959520190954208,
0.1733468472957611,
-0.28241464495658875,
-0.5237737894058228,
-0.08347119390964508,
-0.2588955760002136,
0.0914602130651474,
-0.10528393089771271,
-0.07360529899597168,
0.3677443265914917,
0.4271843731403351,
-0.15429410338401794,
0.10632914304733276,
0.2279396653175354,
0.38311049342155457,
0.16075573861598969,
-0.37903937697410583,
0.24249623715877533,
-0.04493333399295807,
-0.15469495952129364,
-0.49745604395866394,
0.13717742264270782,
0.41433554887771606,
-0.20489168167114258,
0.1745212972164154,
-0.04150240868330002,
0.5330859422683716,
-0.12150857597589493,
0.1827477067708969,
0.03995900601148605,
0.20789313316345215,
-0.11021140217781067,
0.0375654399394989,
0.11434590816497803,
-0.2187926322221756,
0.15816336870193481,
0.06329742074012756,
0.1472356617450714,
-0.07865308970212936,
0.24849268794059753,
0.27065056562423706,
0.4704919457435608,
-0.05498845875263214,
0.14682486653327942,
-0.015110219828784466,
-0.011615093797445297,
-0.23630669713020325,
0.7342292666435242,
-0.10241495072841644,
0.26392292976379395,
0.2599751055240631,
0.20736569166183472,
-0.022228755056858063,
0.543454110622406,
0.44131556153297424,
0.37453195452690125,
0.012965412810444832,
0.2651260495185852,
0.3152926564216614,
-0.4953010082244873,
0.1709747165441513,
0.31935256719589233,
0.08704080432653427,
0.020400412380695343,
0.3167508542537689,
-0.18710964918136597,
0.4784354567527771,
-0.516683042049408,
-0.04887739568948746,
0.34023916721343994,
-0.047001250088214874,
-0.11425809562206268,
0.1654682457447052,
-0.09265211224555969,
-0.2543625831604004,
0.07137109339237213,
-0.09184148907661438,
-0.05699121952056885,
0.5444129705429077,
0.011714965105056763,
0.004323102533817291,
0.016232211142778397,
-0.00631144642829895,
0.024722229689359665,
0.09597001224756241,
-0.16069148480892181,
0.4082082211971283,
-0.039390385150909424,
0.25476038455963135,
0.4199393391609192,
0.36941608786582947,
-0.06722933053970337,
0.17057377099990845,
0.04500816762447357,
0.3584499657154083,
0.21830013394355774,
-0.21902436017990112,
0.0465468168258667,
-0.1061876118183136,
-0.12346120178699493,
-0.25937288999557495,
-0.026295991614460945,
0.06565263867378235,
-0.10666562616825104,
0.11107510328292847,
-0.20475728809833527,
0.22263845801353455,
-0.24747334420681,
0.5339396595954895,
0.1450459063053131,
-0.19860127568244934,
-0.2610895037651062,
-0.20124980807304382,
-0.24194255471229553,
-0.1442001610994339,
0.437847763299942,
-0.28187498450279236,
0.1111840233206749,
-0.010188129730522633,
0.044658370316028595,
0.09889918565750122,
0.43195050954818726,
0.2890983521938324,
-0.2808115780353546,
-0.1705261766910553,
-0.41544580459594727,
-0.38104814291000366,
-0.05442912131547928,
0.17266172170639038,
-0.011667536571621895,
0.08049597591161728,
0.14265739917755127,
0.08740461617708206,
-0.1501583307981491,
0.6539114117622375,
-0.5256931781768799,
0.07525306195020676,
0.5172635912895203,
0.059982094913721085,
-0.2514146864414215,
-0.6457114815711975,
0.17923849821090698,
0.10142168402671814,
-0.1655285805463791,
0.15076234936714172,
0.20505103468894958,
-0.02685161493718624,
-0.23092879354953766,
0.11883501708507538,
0.24865269660949707,
-0.11836330592632294,
0.40650174021720886,
0.002966165542602539,
0.1948695331811905,
-0.3041277229785919,
0.23050379753112793,
0.22519586980342865,
-0.07093562185764313,
-0.3524968922138214,
0.34816810488700867,
-0.14756600558757782,
0.14798659086227417,
-0.09940081834793091,
-0.44492867588996887,
0.10515221208333969,
-0.17083142697811127,
-0.12057643383741379,
-0.14268937706947327,
-0.2406902313232422,
-0.0736689493060112,
-0.19603639841079712,
-0.0846509039402008,
0.32715433835983276,
0.3446579873561859,
0.22082239389419556,
0.03027648665010929,
-0.30228954553604126,
-0.06655306369066238,
0.27362826466560364,
-0.25329241156578064,
-0.35967856645584106,
-0.12065993249416351,
-0.04957430064678192,
-0.24901574850082397,
-0.5401296615600586,
-0.3720545172691345,
0.016562923789024353,
0.5108927488327026,
0.0008997991681098938,
0.33453884720802307,
0.24166758358478546,
0.13188190758228302,
0.3801802694797516,
-0.232273131608963,
0.4988071918487549,
-0.19607782363891602,
-0.09481457620859146,
-0.4374319612979889,
-0.07653626799583435
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Hi ! Indeed there's no verification on the uniqueness nor the types of the keys.
Do you already have some ideas of what you would like to implement and how ? | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 31 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Hi ! Indeed there's no verification on the uniqueness nor the types of the keys.
Do you already have some ideas of what you would like to implement and how ? | [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Hey @lhoestq, thank you so much for the opportunity.
Although I haven't had much experience with the HF Datasets code, after a careful look at how the `ArrowWriter` functions, I think we can implement this as follows:
1. First, we would have to update the `ArrowWriter.write()` function here:
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L296
so that it accepts an additional argument `key` which would be appended along with the example here after hashing.
2. Then, we would need to create a `Hasher` class which will take the key as its input and return a hash for it (We might need to use some hash salt which can be passed to the ArrowWriter.writer() with value equal to the `split_name` for differentiating between same keys of different splits)
We can use the `hashlib.md5` function for hashing which will conert each key to its byte code before hashing (depending on the data type of the key) **Thus, the `key` type will be verified here**.
3. Now, we would have to edit this
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L257
so that it iterates over each `(hash, example)` pair (sorted according to hash). We can then simply **check whether each hash is different from the previous hash** (since they will be sorted)
However, since I'm not very familiar with how the data is being written on disk in the form of a table, I might need some guidance for Step 3.
Please let me know your thought on this. Thanks! | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 235 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Hey @lhoestq, thank you so much for the opportunity.
Although I haven't had much experience with the HF Datasets code, after a careful look at how the `ArrowWriter` functions, I think we can implement this as follows:
1. First, we would have to update the `ArrowWriter.write()` function here:
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L296
so that it accepts an additional argument `key` which would be appended along with the example here after hashing.
2. Then, we would need to create a `Hasher` class which will take the key as its input and return a hash for it (We might need to use some hash salt which can be passed to the ArrowWriter.writer() with value equal to the `split_name` for differentiating between same keys of different splits)
We can use the `hashlib.md5` function for hashing which will conert each key to its byte code before hashing (depending on the data type of the key) **Thus, the `key` type will be verified here**.
3. Now, we would have to edit this
https://github.com/huggingface/datasets/blob/fcd3c3c8e3b1d9a2f3686a496082e21f06591380/src/datasets/arrow_writer.py#L257
so that it iterates over each `(hash, example)` pair (sorted according to hash). We can then simply **check whether each hash is different from the previous hash** (since they will be sorted)
However, since I'm not very familiar with how the data is being written on disk in the form of a table, I might need some guidance for Step 3.
Please let me know your thought on this. Thanks! | [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Interesting !
We keep the dataset sorted in the order examples are generated by the builder (we expect the dataset builders to generate examples in deterministic order). Therefore I don't think we should shuffle the examples with the hashing. Let me know what you think.
Other that that, I really like the idea of checking for keys duplicates in `write_examples_on_file` :)
This looks like a great plan ! Feel free to open a PR and ping me if you have questions or if I can help
| The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 86 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Interesting !
We keep the dataset sorted in the order examples are generated by the builder (we expect the dataset builders to generate examples in deterministic order). Therefore I don't think we should shuffle the examples with the hashing. Let me know what you think.
Other that that, I really like the idea of checking for keys duplicates in `write_examples_on_file` :)
This looks like a great plan ! Feel free to open a PR and ping me if you have questions or if I can help
| [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | @lhoestq I'm glad you liked the idea!
I think that since the keys will be unique and deterministic in the nature themselves, so even if we shuffle the examples according to the hash, a deterministic order would still be maintained (as the keys will always have the same hash, whenever the dataset is generated).
And since, we are not dealing with time series data (which would require the data to be in original order), I don't think the order of examples would matter much, as long as the order is deterministic and constant for all users.
I think that this is also what was originally envisioned as mentioned in the documentation here:
https://github.com/huggingface/datasets/blob/6775661b19d2ec339784f3d84553a3996a1d86c3/src/datasets/builder.py#L973
Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Let me know your thoughts in it! I would be opening a PR soon :) | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 171 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
@lhoestq I'm glad you liked the idea!
I think that since the keys will be unique and deterministic in the nature themselves, so even if we shuffle the examples according to the hash, a deterministic order would still be maintained (as the keys will always have the same hash, whenever the dataset is generated).
And since, we are not dealing with time series data (which would require the data to be in original order), I don't think the order of examples would matter much, as long as the order is deterministic and constant for all users.
I think that this is also what was originally envisioned as mentioned in the documentation here:
https://github.com/huggingface/datasets/blob/6775661b19d2ec339784f3d84553a3996a1d86c3/src/datasets/builder.py#L973
Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Let me know your thoughts in it! I would be opening a PR soon :) | [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | When users load their own data, they expect the order to stay the same. I think that shuffling the data can make things inconvenient.
> I think that this is also what was originally envisioned as mentioned in the documentation here:
This part was originally developed by tensorflow datasets, and tensorflow datasets indeed does the shuffling. However in this library this is probably not what we want in the general case. But if @albertvillanova and @thomwolf you have opinions on this please let us know.
> Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch, but there might still be duplicates across batches. For 10 000 examples the hashes can just be stored as a python `set`.
Otherwise if we want full deduplication, we need an extra tool that allows to temporarily save and query hashes that may need to use disk space rather than memory. | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 224 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
When users load their own data, they expect the order to stay the same. I think that shuffling the data can make things inconvenient.
> I think that this is also what was originally envisioned as mentioned in the documentation here:
This part was originally developed by tensorflow datasets, and tensorflow datasets indeed does the shuffling. However in this library this is probably not what we want in the general case. But if @albertvillanova and @thomwolf you have opinions on this please let us know.
> Also, if we avoid this, we would need to keep track of all the hashed keys in some place and compare each individual key with all others. This can cause some major overhead as each dataset consists of tens of thousands of examples.
Maybe we cam simply keep track of the hashes of of each batch being written ? The size of the batch when the data are save in arrow is 10 000 examples. This would only ensure that we don't have duplicates in each batch, but there might still be duplicates across batches. For 10 000 examples the hashes can just be stored as a python `set`.
Otherwise if we want full deduplication, we need an extra tool that allows to temporarily save and query hashes that may need to use disk space rather than memory. | [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Yes I think we want to keep the original order by default and only shuffle when the user ask for it (for instance by calling `dataset.shuffle()`). Thatβs how I had it in mind originally. | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 34 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Yes I think we want to keep the original order by default and only shuffle when the user ask for it (for instance by calling `dataset.shuffle()`). Thatβs how I had it in mind originally. | [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | Hey @lhoestq, I just had a more in-depth look at the original TFDS code about why the keys and hash were used in the first place.
In my opinion, the only use that the `hash(key)` serves is that it allows us to shuffle the examples in a deterministic order (as each example will always yield the same key and thus, the same hash on every system) so that the same dataset is generated for each user, irrespective of the order the examples are yielded by the dataset builder on different user systems.
Otherwise, if we are not shuffling, then while yielding and writing the data, after getting the key and hashing it for an example, I can't quite see the use of the hash or the key. The hash will simply be generated for each example but not actually used anywhere?
@lhoestq @thomwolf It would be great if you could explain a bit more about the usage of keys. Thanks!
| The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 160 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
Hey @lhoestq, I just had a more in-depth look at the original TFDS code about why the keys and hash were used in the first place.
In my opinion, the only use that the `hash(key)` serves is that it allows us to shuffle the examples in a deterministic order (as each example will always yield the same key and thus, the same hash on every system) so that the same dataset is generated for each user, irrespective of the order the examples are yielded by the dataset builder on different user systems.
Otherwise, if we are not shuffling, then while yielding and writing the data, after getting the key and hashing it for an example, I can't quite see the use of the hash or the key. The hash will simply be generated for each example but not actually used anywhere?
@lhoestq @thomwolf It would be great if you could explain a bit more about the usage of keys. Thanks!
| [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
https://github.com/huggingface/datasets/issues/2230 | Keys yielded while generating dataset are not being checked | In `datasets` the keys are currently ignored.
For shuffling we don't use the keys. Instead we shuffle an array of indices. Since both the original order of the dataset and the indices shuffling are deterministic, then `dataset.shuffle` is deterministic as well.
We can use it to:
1. detect duplicates
2. verify that the generation order is indeed deterministic
3. maybe more ? | The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You! | 62 | Keys yielded while generating dataset are not being checked
The keys used in the dataset generation script to ensure the same order is generated on every user's end should be checked for their types (i.e either `str` or `int`) as well as whether they are unique or not.
Currently, the keys are not being checked for any of these, as evident from `xnli' dataset generation:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/datasets/xnli/xnli.py#L196
Even after having a tuple as key, the dataset is generated without any warning.
Also, as tested in the case of `anli` dataset (I tweeked the dataset script to use `1` as a key for every example):
```
>>> import datasets
>>> nik = datasets.load_dataset('anli')
Downloading and preparing dataset anli/plain_text (download: 17.76 MiB, generated: 73.55 MiB, post-processed: Unknown size, total: 91.31 MiB) to C:\Users\nikhil\.cache\huggingface\datasets\anli\plain_text\0.1.0\43fa2c99c10bf8478f1fa0860f7b122c6b277c4c41306255b7641257cf4e3299...
0 examples [00:00, ? examples/s]1 {'uid': '0fd0abfb-659e-4453-b196-c3a64d2d8267', 'premise': 'The Parma trolleybus system (Italian: "Rete filoviaria di Parma" ) forms part of the public transport network of the city and "comune" of Parma, in the region of Emilia-Romagna, northern Italy. In operation since 1953, the system presently comprises four urban routes.', 'hypothesis': 'The trolleybus system has over 2 urban routes', 'label': 'entailment', 'reason': ''}
2021-04-16 12:38:14.483968: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
1 examples [00:01, 1.87s/ examples]1 {'uid': '7ed72ff4-40b7-4f8a-b1b9-6c612aa62c84', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Sharron Macready was a popular character through the 1980's.", 'label': 'neutral', 'reason': ''}
1 {'uid': '5d2930a3-62ac-485d-94d7-4e36cbbcd7b5', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': "Bastedo didn't keep any pets because of her views on animal rights.", 'label': 'neutral', 'reason': ''}
1 {'uid': '324db753-ddc9-4a85-a825-f09e2e5aebdd', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Alexandra Bastedo was named by her mother.', 'label': 'neutral', 'reason': ''}
1 {'uid': '4874f429-da0e-406a-90c7-22240ff3ddf8', 'premise': 'Alexandra Lendon Bastedo (9 March 1946 β 12 January 2014) was a British actress, best known for her role as secret agent Sharron Macready in the 1968 British espionage/science fiction adventure series "The Champions". She has been cited as a sex symbol of the 1960s and 1970s. Bastedo was a vegetarian and animal welfare advocate.', 'hypothesis': 'Bastedo cared for all the animals that inhabit the earth.', 'label': 'neutral', 'reason': ''}
```
Here also, the dataset was generated successfuly even hough it had same keys without any warning.
The reason appears to stem from here:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L988
Here, although it has access to every key, but it is not being checked and the example is written directly:
https://github.com/huggingface/datasets/blob/56346791aed417306d054d89bd693d6b7eab17f7/src/datasets/builder.py#L992
I would like to take this issue if you allow me. Thank You!
In `datasets` the keys are currently ignored.
For shuffling we don't use the keys. Instead we shuffle an array of indices. Since both the original order of the dataset and the indices shuffling are deterministic, then `dataset.shuffle` is deterministic as well.
We can use it to:
1. detect duplicates
2. verify that the generation order is indeed deterministic
3. maybe more ? | [
0.027536850422620773,
-0.21593120694160461,
0.029170561581850052,
0.4762757420539856,
0.06841956824064255,
-0.23636242747306824,
0.41689804196357727,
0.08041307330131531,
0.43124350905418396,
0.13391166925430298,
0.16721917688846588,
0.350257009267807,
-0.020680762827396393,
0.20651666820049286,
-0.0032001929357647896,
0.4027803838253021,
0.07707756757736206,
0.05073337256908417,
-0.38747718930244446,
-0.17463845014572144,
-0.5882227420806885,
0.04522964358329773,
-0.1532139778137207,
-0.06146383285522461,
-0.16785265505313873,
0.16185437142848969,
-0.06814280152320862,
-0.013825394213199615,
-0.19727572798728943,
-0.44472864270210266,
0.2861756980419159,
0.39542749524116516,
-0.1313849538564682,
0.361002117395401,
-0.00012439950660336763,
-0.031345706433057785,
0.07547372579574585,
-0.19166257977485657,
-0.5255255699157715,
0.026202663779258728,
-0.1937694251537323,
0.0950019583106041,
-0.017638759687542915,
-0.5688122510910034,
-0.05377543717622757,
-0.1629766821861267,
-0.09725753962993622,
-0.4674585461616516,
0.21147438883781433,
0.21589750051498413,
0.08960297703742981,
0.4042152762413025,
0.30064135789871216,
0.20420324802398682,
0.2016509771347046,
0.6070524454116821,
-0.20932240784168243,
-0.354779452085495,
0.04432177543640137,
0.31415072083473206,
0.0819108635187149,
0.177616685628891,
0.060622140765190125,
-0.17011035978794098,
0.20068559050559998,
0.14641490578651428,
-0.22462788224220276,
-0.3234051764011383,
-0.09200508147478104,
0.32674071192741394,
0.3529064357280731,
-0.17154914140701294,
-0.3823953866958618,
-0.3127990663051605,
-0.031310006976127625,
0.18853163719177246,
0.47321295738220215,
0.14203928411006927,
-0.3297612965106964,
0.004291001707315445,
-0.27195119857788086,
0.30026572942733765,
-0.01796620711684227,
-0.004173055291175842,
0.25879034399986267,
0.12447327375411987,
-0.03294738382101059,
0.06382018327713013,
0.20179027318954468,
-0.1953783929347992,
-0.17088133096694946,
-0.40196114778518677,
0.09595675766468048,
0.30713146924972534,
-0.19990579783916473,
-0.25762954354286194,
0.26602211594581604,
0.19404403865337372,
0.43870627880096436,
0.016996851190924644,
-0.007417977787554264,
0.01998978480696678,
-0.10393186658620834,
-0.13705140352249146,
-0.052976708859205246,
0.2784968316555023,
0.14456909894943237,
0.05331345275044441,
0.4216780662536621,
-0.03341138735413551,
-0.1720716953277588,
0.069368876516819,
-0.053531866520643234,
0.09501959383487701,
0.4306454360485077,
0.269684374332428,
0.3355065584182739,
0.025251436978578568,
-0.14821502566337585,
0.09748022258281708,
-0.12575547397136688,
-0.2656862437725067,
0.26672959327697754,
0.31438198685646057,
-0.07972072064876556,
0.09894288331270218,
-0.12589031457901,
0.0694407969713211,
-0.32209447026252747,
-0.03434452414512634,
-0.08533809334039688,
-0.14964281022548676,
-0.08028082549571991,
-0.06574957072734833,
0.36427947878837585,
-0.3379722237586975,
0.02427957020699978,
0.26944711804389954,
-0.20591525733470917,
-0.28842318058013916,
-0.15187513828277588,
-0.07678636908531189,
0.5315923690795898,
0.2941077947616577,
-0.11581678688526154,
0.024007553234696388,
0.06864582747220993,
-0.41605955362319946,
-0.3097439110279083,
0.34071338176727295,
-0.24123424291610718,
-0.15557990968227386,
0.2009788155555725,
0.09876387566328049,
-0.3604653477668762,
-0.12613804638385773,
-0.13066086173057556,
-0.0645974725484848,
0.33723756670951843,
0.20718148350715637,
0.07849514484405518,
-0.17082510888576508,
0.13557788729667664,
-0.4528721570968628,
0.2073250114917755,
0.8914076089859009,
-0.10231432318687439,
-0.006382904946804047,
-0.15264193713665009,
-0.027896698564291,
0.12437379360198975,
0.3553076684474945,
-0.01618567667901516,
0.3325904607772827,
-0.3431202471256256,
0.09285707771778107,
0.1716640293598175,
-0.10762816667556763,
-0.2139097899198532,
0.012116101570427418,
0.18675799667835236,
0.09679771214723587,
0.5034434795379639,
0.2218383401632309,
0.26856645941734314,
-0.05444277450442314,
-0.2298940122127533,
0.06983790546655655,
0.015606528148055077,
0.060203827917575836,
-0.2132330983877182,
-0.13085103034973145,
0.03188520297408104,
0.019485637545585632,
-0.036952052265405655,
0.21956369280815125,
0.13609758019447327,
-0.2552810311317444,
0.02555084601044655,
-0.23062732815742493,
0.050952814519405365,
-0.0563531368970871,
0.16233284771442413,
0.0917917788028717,
0.0456484891474247,
0.43618714809417725,
-0.4905923008918762,
0.22305244207382202,
-0.0022495966404676437,
0.19859804213047028,
-0.4391958713531494,
-0.2743712067604065,
-0.05836828798055649,
0.23319284617900848,
-0.3910268247127533,
0.159125417470932,
0.022154591977596283,
0.31278738379478455,
0.3133724629878998,
0.2550632059574127,
-0.0731581598520279,
0.08026174455881119,
-0.09754148125648499,
0.19543850421905518,
-0.3723427653312683,
0.0034480709582567215,
-0.07117592543363571,
0.06838271766901016,
-0.04702463001012802,
0.26440876722335815,
0.10333720594644547,
-0.14617058634757996,
-0.042986515909433365,
0.20236000418663025,
0.2752102017402649,
-0.022116295993328094,
0.045504067093133926,
0.3107893168926239,
0.2325390726327896,
-0.049133941531181335,
-0.03839893639087677,
0.1895337551832199,
0.16865850985050201,
0.07507219165563583,
-0.2943840026855469,
0.8053557276725769,
-0.25816255807876587,
0.028535157442092896,
-0.0023021548986434937,
-0.007198280654847622,
0.021775109693408012,
-0.1347505897283554,
-0.136598601937294,
-0.18844401836395264,
-0.07329365611076355,
-0.016316674649715424,
0.10728597640991211,
0.4089409410953522,
-0.2961966395378113,
0.15763825178146362,
0.7058499455451965,
0.09413501620292664,
0.2832787334918976,
-0.03212355822324753,
0.19216573238372803,
-0.08089886605739594,
-0.2282801866531372,
0.3368210792541504,
0.1522262543439865,
0.19650639593601227,
0.11858592927455902,
-0.3717745244503021,
-0.07304945588111877,
-0.14605942368507385,
0.04277212917804718,
-0.18911702930927277,
-0.3544779419898987,
0.3523740768432617,
-0.30630049109458923,
-0.1038096696138382,
-0.5338436961174011,
0.23268744349479675,
0.11942846328020096,
0.2516123056411743,
-0.534034013748169,
-0.23924949765205383,
-0.11694569140672684,
-0.08379921317100525,
-0.22839464247226715,
-0.17958037555217743,
-0.07987122237682343,
-0.34046098589897156,
0.16459591686725616,
0.04832256957888603,
-0.041505977511405945,
0.22517627477645874,
-0.027600759640336037,
0.17768530547618866,
0.036335982382297516,
-0.5385162234306335,
-0.43682727217674255,
0.05118059366941452,
-0.14541316032409668,
-0.015151242725551128,
0.2481909841299057,
-0.14092521369457245,
0.36790528893470764,
-0.32223019003868103,
0.22538688778877258,
-0.27451908588409424,
-0.3014225661754608,
0.04286319017410278,
-0.15850886702537537,
0.11965227872133255,
-0.095690056681633,
-0.07796192169189453,
-0.08544661849737167,
-0.08226972818374634,
0.24232539534568787,
-0.24792030453681946,
-0.5795607566833496,
0.2682209014892578,
0.069850392639637,
-0.18788591027259827,
-0.2038372904062271,
-0.5165560841560364,
-0.004108298569917679,
0.06177147105336189,
0.13204216957092285,
-0.07136529684066772,
0.17525295913219452,
0.04610820487141609,
0.17944788932800293,
-0.18918922543525696,
0.000035513658076524734,
-0.04430687427520752,
-0.2693851888179779,
-0.3226260244846344,
0.6126973032951355,
-0.08393410593271255,
-0.24826069176197052,
-0.09979348629713058,
-0.18793359398841858,
-0.22208404541015625,
0.1487160623073578,
-0.3126063644886017,
0.1589476317167282,
-0.5614318251609802,
0.6340059041976929,
0.27776575088500977,
0.2941860854625702,
0.4636281728744507,
0.09645779430866241,
0.015164641663432121,
-0.23176103830337524,
0.025932978838682175,
0.33659011125564575,
-0.01438450813293457,
0.2851165533065796,
0.17218783497810364,
0.2982105016708374,
-0.29470551013946533,
0.4157005548477173,
0.3359106481075287,
-0.10271941125392914,
0.3535637855529785,
-0.15269187092781067,
0.36242491006851196,
0.02081219106912613,
-0.3244889974594116,
-0.046685464680194855,
0.1976601481437683,
0.14481385052204132,
0.18761566281318665,
0.03633145987987518,
0.38863661885261536,
-0.10720595717430115,
0.4754827320575714,
-0.7206180095672607,
-0.30739396810531616,
0.030306261032819748,
-0.19158069789409637,
0.2396026849746704,
0.008561056107282639,
0.30007609724998474,
-0.1423637866973877,
-0.24029967188835144,
-0.22107891738414764,
0.39977192878723145,
0.4897814691066742,
-0.06500067561864853,
-0.45956096053123474,
-0.03505026176571846,
-0.5776283144950867,
0.07207807898521423,
-0.03436029702425003,
0.2558511197566986,
0.05831742659211159,
-0.2912880480289459,
0.15830369293689728,
-0.11527791619300842,
0.4106990098953247,
-0.20063263177871704,
0.09154932200908661,
-0.12416638433933258,
0.10592088103294373,
-0.14654095470905304,
0.07437729835510254,
-0.16926449537277222,
-0.14232563972473145,
-0.1802763193845749,
0.5174461603164673,
-0.5598751902580261,
-0.1423892378807068,
0.03480609878897667,
-0.010950700379908085,
-0.16081339120864868,
-0.429421603679657,
-0.43688610196113586,
-0.17102178931236267,
-0.17450375854969025,
0.1889989972114563,
-0.027901973575353622,
0.13972002267837524,
-0.5259870290756226,
-0.07636518776416779,
-0.20070068538188934,
0.14362284541130066,
0.34562432765960693,
0.19473592936992645,
0.3810790181159973,
0.17931298911571503,
0.29929983615875244,
0.13810724020004272,
0.012751780450344086,
0.10773023962974548,
0.6457734704017639,
-0.020929917693138123,
-0.13071872293949127,
-0.12294267863035202,
-0.36379778385162354,
-0.23489364981651306,
0.04913143068552017,
-0.31083178520202637,
0.13802199065685272,
0.08387916535139084,
0.039289701730012894,
-0.4141128659248352,
-0.22734761238098145,
0.2334345430135727,
-0.07904599606990814,
-0.3273980915546417,
-0.41194871068000793,
0.22172284126281738,
-0.052326131612062454,
-0.11616483330726624,
0.06754586100578308,
0.3800840973854065,
-0.19817383587360382,
0.17885364592075348,
0.4224412739276886,
0.679213285446167,
-0.35895663499832153,
0.07818635553121567,
0.13268828392028809,
0.00020097196102142334,
0.3454471230506897,
0.1435304433107376,
0.1005207747220993,
-0.6070395112037659,
0.03578928858041763,
-0.030985355377197266,
-0.17708593606948853,
-0.14371603727340698,
-0.028689272701740265,
-0.32846081256866455,
-0.22105881571769714,
0.03130834549665451,
0.2751149535179138,
-0.284768670797348,
0.4140976369380951,
-0.18077798187732697,
-0.20842476189136505,
0.13618263602256775,
0.03593927621841431,
0.12789785861968994,
0.6129820346832275,
0.12206131964921951,
0.03294659033417702,
-0.2541007697582245,
-0.38598042726516724,
-0.13893161714076996,
0.09614766389131546,
-0.1959286630153656,
0.10107840597629547,
0.13991506397724152,
-0.1529219001531601,
0.07520841062068939,
0.573886513710022,
0.6691452264785767,
0.1494535654783249,
0.11697375029325485,
-0.1957576423883438,
0.2974543273448944,
0.193855419754982,
-0.04345066472887993,
-0.04025262966752052,
0.0629059374332428,
0.2413102686405182,
-0.23479685187339783,
-0.2391887903213501,
0.1737241894006729,
-0.2943578362464905,
-0.4648037254810333,
-0.22374899685382843,
-0.2652672529220581,
-0.3984836935997009,
0.401369571685791,
-0.11593115329742432,
-0.28754082322120667,
-0.1351931393146515,
0.011442882940173149,
0.17815859615802765,
0.14937496185302734,
0.6839715838432312,
-0.23660151660442352,
-0.2745063602924347,
-0.07556171715259552,
0.23712238669395447,
0.1613750457763672,
0.1854301542043686,
0.3100966215133667,
0.050631631165742874,
-0.15983417630195618,
-0.2896623909473419,
0.4080945551395416,
0.12705573439598083,
-0.6538040041923523,
0.15849345922470093,
0.006957607343792915,
0.1260242611169815,
0.13208433985710144,
0.45800912380218506,
0.08315424621105194,
0.304546594619751,
0.04527876898646355,
-0.41748976707458496,
-0.3791794776916504,
0.14218470454216003,
0.12295113503932953,
0.16631346940994263,
-0.2781089246273041,
-0.12950736284255981,
0.23719215393066406,
-0.09709153324365616,
-0.2319469004869461,
-0.26860636472702026,
-0.01186445727944374,
-0.08297530561685562,
0.20231042802333832,
-0.00006159022450447083,
0.24695897102355957,
0.012341484427452087,
0.1196078509092331,
-0.31388556957244873,
-0.2301681637763977,
-0.04682964086532593,
-0.06469839811325073,
0.19689297676086426,
-0.06670498102903366,
0.24609649181365967,
-0.3984270393848419,
-0.2937808036804199,
-0.07161438465118408,
-0.2857212424278259,
0.12258259952068329,
0.23139488697052002,
-0.1323324739933014,
0.3597549796104431,
0.09981115162372589,
0.1995755434036255,
-0.14281490445137024,
0.11527599394321442,
-0.13343462347984314,
-0.061684608459472656,
0.1036156490445137,
0.1160411462187767,
-0.058195050805807114,
-0.012606747448444366,
-0.3222411870956421,
0.2602238059043884,
0.1303788125514984,
-0.029577314853668213,
0.06317044049501419,
-0.3162482976913452,
0.13046319782733917,
0.1253683865070343,
0.2124873548746109,
0.4128769040107727,
0.021322807297110558,
-0.15997247397899628,
0.12629246711730957,
0.10954621434211731,
-0.0524812676012516,
-0.07745426893234253,
-0.10575203597545624,
0.40457653999328613,
0.15394434332847595,
0.521047055721283,
-0.02728085033595562,
-0.07594011723995209,
-0.003981277346611023,
-0.14018204808235168,
0.040113553404808044,
-0.05535531044006348,
0.03701697289943695,
0.7215251922607422,
0.0033207647502422333,
0.023680325597524643,
0.5608682036399841,
0.04684866964817047,
-0.3103271722793579,
0.3334861397743225,
0.07947590947151184,
0.2596440613269806,
-0.05948416143655777,
0.33160310983657837,
0.0038180649280548096,
-0.24034671485424042,
0.2577209174633026,
0.059820570051670074,
-0.31806665658950806,
0.08274196833372116,
0.21353280544281006,
0.24277830123901367,
-0.09963127970695496,
0.013941716402769089,
-0.6906047463417053,
-0.026175741106271744,
-0.2743203043937683,
-0.24948735535144806,
-0.394823282957077,
-0.4349913001060486,
-0.12961648404598236,
-0.051681309938430786,
0.06535612791776657,
0.08371181786060333,
0.10009129345417023,
0.14210379123687744,
-0.09596100449562073,
-0.3503395915031433,
0.11308462172746658,
0.12658485770225525,
0.3152235448360443,
-0.29748180508613586,
0.13145028054714203,
0.2653692364692688,
0.15330664813518524,
0.002372417598962784,
0.3071095943450928,
0.29197123646736145,
0.3392050862312317,
0.029171360656619072,
0.20815148949623108,
-0.10078777372837067,
-0.10497386753559113,
-0.11041286587715149,
0.5324913263320923,
0.061286214739084244,
0.01254766620695591,
0.2630124092102051,
0.04730633646249771,
-0.04398075491189957,
-0.10785205662250519,
0.09492196887731552,
0.056629788130521774,
0.24694344401359558,
0.37805160880088806,
0.006283240392804146,
-0.22409379482269287,
0.16644906997680664,
0.2008964866399765,
-0.12843960523605347,
-0.22563576698303223,
0.07527600973844528,
0.26745012402534485,
0.08009397238492966,
-0.4431453347206116,
0.04447107017040253,
0.010763927362859249,
0.39733368158340454,
0.3050801753997803,
-0.22357133030891418,
-0.2529638707637787,
-0.14698603749275208,
-0.7591511607170105,
-0.08284977823495865,
-0.08847744762897491,
-0.169340580701828,
-0.07225991040468216,
0.37216928601264954,
-0.003554597496986389,
0.09001779556274414,
-0.011286929249763489,
-0.16830460727214813,
-0.028720010071992874,
0.45416176319122314,
-0.1920487880706787,
-0.10114668309688568,
-0.04370289295911789,
-0.08578178286552429,
-0.2175276279449463,
-0.40193894505500793,
0.23912304639816284,
-0.15689818561077118,
-0.05094296857714653,
0.020291609689593315,
0.4017067849636078,
0.1667451411485672,
-0.11450845003128052,
0.18573987483978271,
0.4368846118450165,
0.5208122730255127,
0.06040539592504501,
0.013640524819493294,
-0.14310237765312195,
0.0854353979229927,
-0.0707816332578659,
0.2464943528175354,
0.18115362524986267,
0.3095549941062927,
0.02878047712147236,
0.029991935938596725,
-0.3235031068325043,
-0.056405771523714066,
0.25367116928100586,
-0.13776227831840515,
-0.026903297752141953,
0.11370258778333664,
-0.021705657243728638,
-0.31727826595306396,
0.1229669451713562,
0.2679322361946106,
0.04171252250671387,
0.11680528521537781,
-0.12343565374612808,
-0.22847256064414978,
0.09676957875490189,
-0.2478918433189392,
0.03292432054877281,
-0.37601926922798157,
0.21893012523651123,
0.15717394649982452,
-0.09186998009681702,
-0.22508874535560608,
0.3122607469558716,
0.3311513662338257,
-0.16044625639915466,
0.03667883202433586,
0.12255674600601196,
-0.05651342496275902,
0.25550276041030884,
-0.08980356156826019,
0.15132519602775574,
0.04281572997570038,
-0.05267282575368881,
0.3032371699810028,
-0.10872819274663925
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.